Browse Source

修改:统计月报生成逻辑

zhongwei
ty 3 months ago
parent
commit
920b6860c4
  1. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/MonthReportServiceImpl.java

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/report/service/impl/MonthReportServiceImpl.java

@ -88,6 +88,7 @@ public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, OperM
eq(OperMonthReportEntity::getIsDeleted, 0); eq(OperMonthReportEntity::getIsDeleted, 0);
last("limit 1;"); last("limit 1;");
}}); }});
if (ObjectUtil.isEmpty(operMonthReportEntityByMonth) || month.equals(YearMonth.now().toString())) {
if (ObjectUtil.isNotEmpty(operMonthReportEntityByMonth)) { if (ObjectUtil.isNotEmpty(operMonthReportEntityByMonth)) {
this.removeById(operMonthReportEntityByMonth.getId()); this.removeById(operMonthReportEntityByMonth.getId());
} }
@ -108,6 +109,9 @@ public class MonthReportServiceImpl extends ServiceImpl<MonthReportMapper, OperM
//修改为每运行一次,保存一次 //修改为每运行一次,保存一次
this.save(operMonthReportEntity); this.save(operMonthReportEntity);
} }
} else {
log.info("该月{}已生成月报", deptVO.getDeptName());
}
} }
} }

Loading…
Cancel
Save