From e32a08bb2b67f2d08ce018fae8a0016b5cbf538c Mon Sep 17 00:00:00 2001 From: andy <1042025947@qq.com> Date: Tue, 22 Sep 2026 16:00:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=96=AA=E8=B5=84=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E7=9A=84=E8=B7=A8=E5=88=97=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AF=B7=E5=81=87=E5=9B=9E=E8=B0=83=E7=9A=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98=20?= =?UTF-8?q?=E5=A4=84=E7=90=86=E5=A4=9A=E4=B8=AA=E8=AF=B7=E5=81=87=E7=9A=84?= =?UTF-8?q?=E5=B9=82=E7=AD=89=E9=97=AE=E9=A2=98=20=E9=A4=90=E9=A5=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/evo/common/utils/poi/ExcelUtilSs.java | 11 +++++++++-- .../impl/ApproveStatusLeaveExchangeProcessor.java | 12 +++++++----- .../service/impl/RzLeaveDetailServiceImpl.java | 10 ++++++---- .../controller/RzRestaurantStatisticsController.java | 8 ++++++++ .../service/IRzRestaurantStatisticsService.java | 3 ++- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/evo-admin/src/main/java/com/evo/common/utils/poi/ExcelUtilSs.java b/evo-admin/src/main/java/com/evo/common/utils/poi/ExcelUtilSs.java index 2bca92a..f8556ab 100644 --- a/evo-admin/src/main/java/com/evo/common/utils/poi/ExcelUtilSs.java +++ b/evo-admin/src/main/java/com/evo/common/utils/poi/ExcelUtilSs.java @@ -316,9 +316,16 @@ public class ExcelUtilSs{ for (int index = 0; index <= sheetNo; index++){ createSheet(sheetNo, index); //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); - 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.setCellStyle(styles.get("title")); if(index == 0){ @@ -342,7 +349,7 @@ public class ExcelUtilSs{ // 产生一行 Integer lastIndex = (index == 0 ? list.size() :this.lists.get(index-1).size())+5; 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); cells.setCellStyle(styles.get("footer")); cells.setCellValue(this.footer); diff --git a/evo-admin/src/main/java/com/evo/ding/processor/approveStatus/impl/ApproveStatusLeaveExchangeProcessor.java b/evo-admin/src/main/java/com/evo/ding/processor/approveStatus/impl/ApproveStatusLeaveExchangeProcessor.java index 9135721..2e7faca 100644 --- a/evo-admin/src/main/java/com/evo/ding/processor/approveStatus/impl/ApproveStatusLeaveExchangeProcessor.java +++ b/evo-admin/src/main/java/com/evo/ding/processor/approveStatus/impl/ApproveStatusLeaveExchangeProcessor.java @@ -107,6 +107,13 @@ public class ApproveStatusLeaveExchangeProcessor implements AttendanceApproveSta } 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.setName(sysStaff.getName()); rzLeaveDetail.setLeaveStartTime(beginTime); @@ -120,11 +127,6 @@ public class ApproveStatusLeaveExchangeProcessor implements AttendanceApproveSta // } rzLeaveDetail.setRemarks("钉钉"+tag); rzLeaveDetail.setProcessInstanceId(processInstanceId); - //没查到原因, 一直出现多个数据, 做个幂等数据处理 - if(getIRzLeaveDetailService().checkExistsRzLeaveDetail(rzLeaveDetail).compareTo(0l)>0){ - log.error("当前请假信息已经记录, 不需要继续进行持久化"); - return; - } getIRzLeaveDetailService().insertRzLeaveDetail(rzLeaveDetail); } } diff --git a/evo-admin/src/main/java/com/evo/personnelMatters/service/impl/RzLeaveDetailServiceImpl.java b/evo-admin/src/main/java/com/evo/personnelMatters/service/impl/RzLeaveDetailServiceImpl.java index da6f9f0..17ec5fe 100644 --- a/evo-admin/src/main/java/com/evo/personnelMatters/service/impl/RzLeaveDetailServiceImpl.java +++ b/evo-admin/src/main/java/com/evo/personnelMatters/service/impl/RzLeaveDetailServiceImpl.java @@ -7,10 +7,7 @@ import com.evo.attendance.domain.RzAttendanceStatistical; import com.evo.common.constant.Constants; import com.evo.common.core.domain.AjaxResult; import com.evo.common.core.domain.entity.SysDictData; -import com.evo.common.utils.Collections; -import com.evo.common.utils.DateUtils; -import com.evo.common.utils.ParamUtils; -import com.evo.common.utils.SecurityUtils; +import com.evo.common.utils.*; import com.evo.personnelMatters.domain.RzLeave; import com.evo.personnelMatters.domain.RzLeaveDetail; import com.evo.personnelMatters.domain.RzOverTime; @@ -95,6 +92,11 @@ public class RzLeaveDetailServiceImpl extends ServiceImpl0){ + log.error("当前请假信息已经记录, 不需要继续进行持久化"); + return AjaxResult.error("请假详情已经存在, 无需就行新增"); + } if(getBaseMapper().insert(rzLeaveDetail) < 1){ return AjaxResult.error("请假详情新增失败"); } diff --git a/evo-admin/src/main/java/com/evo/restaurant/controller/RzRestaurantStatisticsController.java b/evo-admin/src/main/java/com/evo/restaurant/controller/RzRestaurantStatisticsController.java index b4838fc..05837cc 100644 --- a/evo-admin/src/main/java/com/evo/restaurant/controller/RzRestaurantStatisticsController.java +++ b/evo-admin/src/main/java/com/evo/restaurant/controller/RzRestaurantStatisticsController.java @@ -84,4 +84,12 @@ public class RzRestaurantStatisticsController extends BaseController return rzRestaurantStatisticsService.correct(rzRestaurantStatistics); } + @PutMapping + public AjaxResult putData(@RequestBody RzRestaurantStatistics rzRestaurantStatistics) + { + return AjaxResult.success(rzRestaurantStatisticsService.updateById(rzRestaurantStatistics)); + } + + + } diff --git a/evo-admin/src/main/java/com/evo/restaurant/service/IRzRestaurantStatisticsService.java b/evo-admin/src/main/java/com/evo/restaurant/service/IRzRestaurantStatisticsService.java index b09cb29..1d2ee27 100644 --- a/evo-admin/src/main/java/com/evo/restaurant/service/IRzRestaurantStatisticsService.java +++ b/evo-admin/src/main/java/com/evo/restaurant/service/IRzRestaurantStatisticsService.java @@ -1,5 +1,6 @@ package com.evo.restaurant.service; +import com.baomidou.mybatisplus.extension.service.IService; import com.evo.common.core.domain.AjaxResult; import com.evo.restaurant.domain.RzRestaurantImages; import com.evo.restaurant.domain.RzRestaurantStatistics; @@ -14,7 +15,7 @@ import java.util.List; * @author chenyj * @date 2024-09-18 */ -public interface IRzRestaurantStatisticsService +public interface IRzRestaurantStatisticsService extends IService { /** * 查询餐饮统计