瀏覽代碼

运行记录优化0924

yuanchao 1 周之前
父節點
當前提交
7287297ff1

+ 1 - 1
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/controller/admin/iotopeationfill/IotOpeationFillController.java

@@ -229,7 +229,7 @@ public class IotOpeationFillController {
         if(fillDO1.getIsReport()!=null && fillDO1.getIsReport()==1){
         if(fillDO1.getIsReport()!=null && fillDO1.getIsReport()==1){
 
 
             IotRhDailyReportSaveReqVO saveReqVO = new IotRhDailyReportSaveReqVO();
             IotRhDailyReportSaveReqVO saveReqVO = new IotRhDailyReportSaveReqVO();
-            IotRyDailyReportPageReqVO saveReqRyVO = new IotRyDailyReportPageReqVO();
+            IotRyDailyReportSaveReqVO saveReqRyVO = new IotRyDailyReportSaveReqVO();
 
 
             Map<String,Object> stringRhObjectMap = BeanUtil.beanToMap(saveReqVO);
             Map<String,Object> stringRhObjectMap = BeanUtil.beanToMap(saveReqVO);
             Map<String,Object> stringRyObjectMap = BeanUtil.beanToMap(saveReqRyVO);
             Map<String,Object> stringRyObjectMap = BeanUtil.beanToMap(saveReqRyVO);

+ 23 - 18
yudao-module-pms/yudao-module-pms-biz/src/main/java/cn/iocoder/yudao/module/pms/job/IotOperationPlanJob.java

@@ -41,7 +41,7 @@ import static cn.iocoder.yudao.module.pms.framework.config.MultiThreadConfigurat
  * @date 2025/5/11 10:26
  * @date 2025/5/11 10:26
  * @description
  * @description
  */
  */
-@Component
+/*@Component*/
 @Slf4j
 @Slf4j
 public class IotOperationPlanJob implements JobHandler {
 public class IotOperationPlanJob implements JobHandler {
 
 
@@ -228,14 +228,6 @@ public class IotOperationPlanJob implements JobHandler {
         iotOpeationFillOrderMapper.insertBatch(orderList1);
         iotOpeationFillOrderMapper.insertBatch(orderList1);
 
 
 
 
-        Set<Long> pdeptList = new HashSet<>();
-        pdeptList =  deptService.getChildDeptIdListFromCache(plan.getDeptId());
-        pdeptList.add(plan.getDeptId());
-
-        //查询日报计划
-        List<IotOperationPlanDO> rpList = planMapper.getReportPlan(pdeptList);
-        List<Long> rpdList = rpList.stream().map(IotOperationPlanDO::getDeptId).collect(Collectors.toList());
-
 
 
         Set<Long> rdIdList = new HashSet<>();
         Set<Long> rdIdList = new HashSet<>();
         rdIdList =  deptService.getChildDeptIdListFromCache(163L);
         rdIdList =  deptService.getChildDeptIdListFromCache(163L);
@@ -249,18 +241,31 @@ public class IotOperationPlanJob implements JobHandler {
         boolean exist = rdIdList.contains(plan.getDeptId());
         boolean exist = rdIdList.contains(plan.getDeptId());
 
 
         if(!exist){
         if(!exist){
-            //1、有指定队伍插入指定队伍日报设备
 
 
-            if(rpList.size()>0){
+
+            //瑞鹰SCP项目部50010队伍临时创建
+            if(plan.getDeptId()==287){
                 //筛选日报工单
                 //筛选日报工单
-                List<IotOpeationFillOrderDO> virOrderList = orderList1.stream().filter(e->rpdList.contains(e.getDeptId())).collect(Collectors.toList());
-                if(virOrderList.size()>0){
-                    //创建日报设备
-                    List <IotOpeationFillDO> devList = opeationFillService.reportMethod(virOrderList);
-                    //插入日报设备
-                    iotOpeationFillMapper.insertFill(devList);
+                List<IotOpeationFillOrderDO> virOrderList = new ArrayList<>();
+
+                IotOpeationFillOrderDO fillDO = new IotOpeationFillOrderDO();
+
+                fillDO.setOrderName("50010队"+"/"+LocalDate.now()+"运行记录填报");
+                fillDO.setDeptId(293L);
+                fillDO.setOrderStatus(0);
+                fillDO.setCreateTime(LocalDateTime.now());
+                fillDO.setUserName("李小虎");
+                fillDO.setUserId(486);
+                fillDO.setMobile(String.valueOf(17723897643L));
+                virOrderList.add(fillDO);
+
+                orderList1.addAll(virOrderList);
+                iotOpeationFillOrderMapper.insertBatch(virOrderList);
+                //创建日报设备
+                List <IotOpeationFillDO> devList = opeationFillService.reportMethod(virOrderList);
+                //插入日报设备
+                iotOpeationFillMapper.insertFill(devList);
 
 
-                }
 
 
             }
             }