Browse Source

2025-12-16

异常续卷优化
master
fengyuan_yang 4 weeks ago
parent
commit
0926c70038
  1. 8
      src/main/java/com/gaotao/modules/base/service/Impl/BaseServiceImpl.java
  2. 5
      src/main/java/com/gaotao/modules/schedule/service/impl/ShiftAbnormalRollReportServiceImpl.java

8
src/main/java/com/gaotao/modules/base/service/Impl/BaseServiceImpl.java

@ -512,7 +512,7 @@ public class BaseServiceImpl implements BaseService {
CalendarDatetypeOutData cdd = null;//工作日类型
List<CalendarDatetypeShiftOutData> cdsdList = null;//工作班次类型
try {
if (listData.size() == 0) {
if (listData.isEmpty()) {
responseData.setMsg(sysMsgService.getLanguageMsg(SysMsgConstant.OBJECT_ID_200029));
return responseData;
} else {
@ -555,12 +555,12 @@ public class BaseServiceImpl implements BaseService {
ced.setCreatedDate(new Date());
//删除已经维护的日历安排
List<CalendarExceptionData> ceData = baseMapper.getCalendarEByCIdAndSDate(listData.get(i).getSite(), listData.get(i).getCalendarId(), timeList.get(k));
if (ceData.size() > 0) {
if (!ceData.isEmpty()) {
deleteAllCE(ceData);
}
//删除已经维护的日历班次安排
List<CalendarExceptionShiftData> cesData = baseMapper.getCalendarESByCIdAndSDate(listData.get(i).getSite(), listData.get(i).getCalendarId(), timeList.get(k));
if (cesData.size() > 0) {
if (!cesData.isEmpty()) {
deleteAllCES(cesData);
}
baseMapper.saveCED(ced);
@ -568,7 +568,7 @@ public class BaseServiceImpl implements BaseService {
newInData.setSite(listData.get(i).getSite());
newInData.setDatetype(valArr[k]);
cdsdList = baseMapper.findBySiteAndDatetype(newInData);
if (cdsdList.size() > 0) {
if (!cdsdList.isEmpty()) {
for (int j = 0; j < cdsdList.size(); j++) {
cesd = new CalendarExceptionShiftData();//实例化工作日历班次
cesd.setSite(cdsdList.get(j).getSite());

5
src/main/java/com/gaotao/modules/schedule/service/impl/ShiftAbnormalRollReportServiceImpl.java

@ -41,10 +41,7 @@ public class ShiftAbnormalRollReportServiceImpl
@Override
@Transactional
public void saveAbnormalRollData(List<ShiftAbnormalRollReportEntity> dataList, String site, String orderNo, Integer seqNo) {
// 先删除旧的未处理数据
shiftAbnormalRollReportMapper.deleteUnprocessedData(site, orderNo, seqNo);
// 再批量插入新数据
// 直接追加新数据不删除旧数据每次截卷的数据通过currentRollNo和newRollNo区分
if (dataList != null && !dataList.isEmpty()) {
shiftAbnormalRollReportMapper.batchInsert(dataList);
}

Loading…
Cancel
Save