|
|
@@ -19,7 +19,6 @@ import cn.iocoder.yudao.module.system.api.permission.RoleApi;
|
|
|
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
|
|
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
|
|
import cn.iocoder.yudao.module.system.service.dept.DeptService;
|
|
|
-import com.google.common.collect.ImmutableList;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.time.LocalDateTime;
|
|
|
@@ -89,6 +88,7 @@ public class MonthReportJob implements JobHandler {
|
|
|
qhseMonthReportDO.setTitle(dept.getName()+yearMonth+"QHSE月报");
|
|
|
qhseMonthReportDO.setYearMonths(yearMonth);
|
|
|
qhseMonthReportDO.setDeleted(false);
|
|
|
+ qhseMonthReportDO.setStatus("unsubmit");//未提交
|
|
|
qhseMonthReportDO.setSocCards(String.valueOf(socCount));
|
|
|
qhseMonthReportDO.setJsa(String.valueOf(jsaCount));
|
|
|
qhseMonthReportDO.setPtwAudit(String.valueOf(ptwCount));
|
|
|
@@ -101,33 +101,34 @@ public class MonthReportJob implements JobHandler {
|
|
|
});
|
|
|
});
|
|
|
});
|
|
|
- ImmutableList.of(156L,157L,158L,163L).forEach(e ->{
|
|
|
- Set<Long> ids = new HashSet<>();
|
|
|
- ids = deptService.getChildDeptIdListFromCache(e);
|
|
|
- ids.add(e);
|
|
|
- IotSocSummaryPageReqVO pageReqVO = new IotSocSummaryPageReqVO();
|
|
|
- pageReqVO.setObservationDate(new LocalDateTime[]{firstDayOfLastMonth, lastDayOfLastMonth});
|
|
|
- Long socCount = iotSocSummaryMapper.selectCountBySocClassAndTime(pageReqVO, ids);
|
|
|
- QhseJsaPageReqVO qhseJsaPageReqVO = new QhseJsaPageReqVO();
|
|
|
- qhseJsaPageReqVO.setJsaTime(new LocalDateTime[]{firstDayOfLastMonth, lastDayOfLastMonth});
|
|
|
- Long jsaCount = qhseJsaMapper.selectCountByDeptAndTime(qhseJsaPageReqVO, ids);
|
|
|
- QhsePtwPageReqVO qhsePtwPageReqVO = new QhsePtwPageReqVO();
|
|
|
- qhsePtwPageReqVO.setPtwTime(new LocalDateTime[]{firstDayOfLastMonth, lastDayOfLastMonth});
|
|
|
- Long ptwCount = qhsePtwMapper.selectCountByDeptAndTime(qhsePtwPageReqVO, ids);
|
|
|
-
|
|
|
-
|
|
|
- QhseMonthReportDO reportDO = new QhseMonthReportDO();
|
|
|
- DeptRespDTO dept = deptApi.getDept(e);
|
|
|
- reportDO.setTitle(dept.getName()+yearMonth+"QHSE月报");
|
|
|
- reportDO.setYearMonths(yearMonth);
|
|
|
- reportDO.setDeleted(false);
|
|
|
- reportDO.setSocCards(String.valueOf(socCount));
|
|
|
- reportDO.setJsa(String.valueOf(jsaCount));
|
|
|
- reportDO.setPtwAudit(String.valueOf(ptwCount));
|
|
|
-// reportDO.setDutyPerson();
|
|
|
- reportDO.setDeptId(e);
|
|
|
- qhseMonthReportMapper.insert(reportDO);
|
|
|
- });
|
|
|
+ //各专业公司生成
|
|
|
+// ImmutableList.of(156L,157L,158L,163L).forEach(e ->{
|
|
|
+// Set<Long> ids = new HashSet<>();
|
|
|
+// ids = deptService.getChildDeptIdListFromCache(e);
|
|
|
+// ids.add(e);
|
|
|
+// IotSocSummaryPageReqVO pageReqVO = new IotSocSummaryPageReqVO();
|
|
|
+// pageReqVO.setObservationDate(new LocalDateTime[]{firstDayOfLastMonth, lastDayOfLastMonth});
|
|
|
+// Long socCount = iotSocSummaryMapper.selectCountBySocClassAndTime(pageReqVO, ids);
|
|
|
+// QhseJsaPageReqVO qhseJsaPageReqVO = new QhseJsaPageReqVO();
|
|
|
+// qhseJsaPageReqVO.setJsaTime(new LocalDateTime[]{firstDayOfLastMonth, lastDayOfLastMonth});
|
|
|
+// Long jsaCount = qhseJsaMapper.selectCountByDeptAndTime(qhseJsaPageReqVO, ids);
|
|
|
+// QhsePtwPageReqVO qhsePtwPageReqVO = new QhsePtwPageReqVO();
|
|
|
+// qhsePtwPageReqVO.setPtwTime(new LocalDateTime[]{firstDayOfLastMonth, lastDayOfLastMonth});
|
|
|
+// Long ptwCount = qhsePtwMapper.selectCountByDeptAndTime(qhsePtwPageReqVO, ids);
|
|
|
+//
|
|
|
+//
|
|
|
+// QhseMonthReportDO reportDO = new QhseMonthReportDO();
|
|
|
+// DeptRespDTO dept = deptApi.getDept(e);
|
|
|
+// reportDO.setTitle(dept.getName()+yearMonth+"QHSE月报");
|
|
|
+// reportDO.setYearMonths(yearMonth);
|
|
|
+// reportDO.setDeleted(false);
|
|
|
+// reportDO.setSocCards(String.valueOf(socCount));
|
|
|
+// reportDO.setJsa(String.valueOf(jsaCount));
|
|
|
+// reportDO.setPtwAudit(String.valueOf(ptwCount));
|
|
|
+//// reportDO.setDutyPerson();
|
|
|
+// reportDO.setDeptId(e);
|
|
|
+// qhseMonthReportMapper.insert(reportDO);
|
|
|
+// });
|
|
|
return "";
|
|
|
}
|
|
|
}
|