修改薪资导出的跨列问题

修改请假回调的数据丢失问题
处理多个请假的幂等问题
餐饮统计新增修改接口
This commit is contained in:
andy 2026-09-22 16:00:47 +08:00
parent 9de61513b7
commit e32a08bb2b
5 changed files with 32 additions and 12 deletions

View File

@ -316,9 +316,16 @@ public class ExcelUtilSs<T>{
for (int index = 0; index <= sheetNo; index++){ for (int index = 0; index <= sheetNo; index++){
createSheet(sheetNo, index); createSheet(sheetNo, index);
//sheet1和后边的sheet表头不一致,所以需要分开处理 //sheet1和后边的sheet表头不一致,所以需要分开处理
//计算跨行结束
int finalIndex = index;
Long lastCol = fields2.stream().filter(os -> {
Excel excel = (Excel) os[1];
return excel.showAllSheet() ? true : (finalIndex == 0 && excel.showViewHome()) || (finalIndex != 0 && !excel.showViewHome());})
.count();
// 产生一行 // 产生一行
Row row = sheet.createRow(0); Row row = sheet.createRow(0);
sheet.addMergedRegion(new CellRangeAddress(0,0,0,fields2.size()-1)); sheet.addMergedRegion(new CellRangeAddress(0,0,0, (int) (lastCol-1)));
Cell cell = row.createCell(0); Cell cell = row.createCell(0);
cell.setCellStyle(styles.get("title")); cell.setCellStyle(styles.get("title"));
if(index == 0){ if(index == 0){
@ -342,7 +349,7 @@ public class ExcelUtilSs<T>{
// 产生一行 // 产生一行
Integer lastIndex = (index == 0 ? list.size() :this.lists.get(index-1).size())+5; Integer lastIndex = (index == 0 ? list.size() :this.lists.get(index-1).size())+5;
Row rows = sheet.createRow( lastIndex); Row rows = sheet.createRow( lastIndex);
sheet.addMergedRegion(new CellRangeAddress(lastIndex,lastIndex,0,fields2.size()-1)); sheet.addMergedRegion(new CellRangeAddress(lastIndex,lastIndex,0,(int) (lastCol-1)));
Cell cells = rows.createCell(0); Cell cells = rows.createCell(0);
cells.setCellStyle(styles.get("footer")); cells.setCellStyle(styles.get("footer"));
cells.setCellValue(this.footer); cells.setCellValue(this.footer);

View File

@ -107,6 +107,13 @@ public class ApproveStatusLeaveExchangeProcessor implements AttendanceApproveSta
} }
RzLeave rzLeave = getIRzLeaveService().selectRzLeaveByUserId(sysStaff.getUserId()); RzLeave rzLeave = getIRzLeaveService().selectRzLeaveByUserId(sysStaff.getUserId());
if(rzLeave == null){
rzLeave = new RzLeave();
rzLeave.setUserId(sysStaff.getUserId());
rzLeave.setDeptId(sysStaff.getDeptId());
getIRzLeaveService().insertRzLeave(rzLeave);
rzLeave = getIRzLeaveService().selectRzLeaveByUserId(sysStaff.getUserId());
}
RzLeaveDetail rzLeaveDetail = new RzLeaveDetail(); RzLeaveDetail rzLeaveDetail = new RzLeaveDetail();
rzLeaveDetail.setName(sysStaff.getName()); rzLeaveDetail.setName(sysStaff.getName());
rzLeaveDetail.setLeaveStartTime(beginTime); rzLeaveDetail.setLeaveStartTime(beginTime);
@ -120,11 +127,6 @@ public class ApproveStatusLeaveExchangeProcessor implements AttendanceApproveSta
// } // }
rzLeaveDetail.setRemarks("钉钉"+tag); rzLeaveDetail.setRemarks("钉钉"+tag);
rzLeaveDetail.setProcessInstanceId(processInstanceId); rzLeaveDetail.setProcessInstanceId(processInstanceId);
//没查到原因, 一直出现多个数据, 做个幂等数据处理
if(getIRzLeaveDetailService().checkExistsRzLeaveDetail(rzLeaveDetail).compareTo(0l)>0){
log.error("当前请假信息已经记录, 不需要继续进行持久化");
return;
}
getIRzLeaveDetailService().insertRzLeaveDetail(rzLeaveDetail); getIRzLeaveDetailService().insertRzLeaveDetail(rzLeaveDetail);
} }
} }

View File

@ -7,10 +7,7 @@ import com.evo.attendance.domain.RzAttendanceStatistical;
import com.evo.common.constant.Constants; import com.evo.common.constant.Constants;
import com.evo.common.core.domain.AjaxResult; import com.evo.common.core.domain.AjaxResult;
import com.evo.common.core.domain.entity.SysDictData; import com.evo.common.core.domain.entity.SysDictData;
import com.evo.common.utils.Collections; import com.evo.common.utils.*;
import com.evo.common.utils.DateUtils;
import com.evo.common.utils.ParamUtils;
import com.evo.common.utils.SecurityUtils;
import com.evo.personnelMatters.domain.RzLeave; import com.evo.personnelMatters.domain.RzLeave;
import com.evo.personnelMatters.domain.RzLeaveDetail; import com.evo.personnelMatters.domain.RzLeaveDetail;
import com.evo.personnelMatters.domain.RzOverTime; import com.evo.personnelMatters.domain.RzOverTime;
@ -95,6 +92,11 @@ public class RzLeaveDetailServiceImpl extends ServiceImpl<RzLeaveDetailMapper, R
// } // }
// } // }
rzLeaveDetail.setDelFlag(Constants.DELETE_FLAG_0); rzLeaveDetail.setDelFlag(Constants.DELETE_FLAG_0);
//没查到原因, 钉钉回调一直出现多个数据, 做个幂等数据处理
if(StringUtils.isNotEmpty(rzLeaveDetail.getProcessInstanceId()) && checkExistsRzLeaveDetail(rzLeaveDetail).compareTo(0l)>0){
log.error("当前请假信息已经记录, 不需要继续进行持久化");
return AjaxResult.error("请假详情已经存在, 无需就行新增");
}
if(getBaseMapper().insert(rzLeaveDetail) < 1){ if(getBaseMapper().insert(rzLeaveDetail) < 1){
return AjaxResult.error("请假详情新增失败"); return AjaxResult.error("请假详情新增失败");
} }

View File

@ -84,4 +84,12 @@ public class RzRestaurantStatisticsController extends BaseController
return rzRestaurantStatisticsService.correct(rzRestaurantStatistics); return rzRestaurantStatisticsService.correct(rzRestaurantStatistics);
} }
@PutMapping
public AjaxResult putData(@RequestBody RzRestaurantStatistics rzRestaurantStatistics)
{
return AjaxResult.success(rzRestaurantStatisticsService.updateById(rzRestaurantStatistics));
}
} }

View File

@ -1,5 +1,6 @@
package com.evo.restaurant.service; package com.evo.restaurant.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.evo.common.core.domain.AjaxResult; import com.evo.common.core.domain.AjaxResult;
import com.evo.restaurant.domain.RzRestaurantImages; import com.evo.restaurant.domain.RzRestaurantImages;
import com.evo.restaurant.domain.RzRestaurantStatistics; import com.evo.restaurant.domain.RzRestaurantStatistics;
@ -14,7 +15,7 @@ import java.util.List;
* @author chenyj * @author chenyj
* @date 2024-09-18 * @date 2024-09-18
*/ */
public interface IRzRestaurantStatisticsService public interface IRzRestaurantStatisticsService extends IService<RzRestaurantStatistics>
{ {
/** /**
* 查询餐饮统计 * 查询餐饮统计