Procházet zdrojové kódy

运行记录1105-新增工单状态更新接口

yuanchao před 4 dny
rodič
revize
1a9c7d56a3

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

@@ -296,6 +296,26 @@ public class IotOpeationFillController {
 
     }
 
+    @PostMapping("/upOperationOrder")
+    @Operation(summary = "创建运行记录填写信息")
+    public CommonResult<Integer> upOperationOrder(@Valid @RequestBody IotOpeationFillRespVO respVO) {
+
+        List<IotOpeationFillRespVO> fillList1 = iotOpeationFillService.getFillList(respVO);
+
+        boolean result = fillList1.stream().allMatch(e->e.getIsFill()==1);
+
+        IotDeviceRunLogDO deviceRunLogDO = new IotDeviceRunLogDO();
+        deviceRunLogDO.setId(respVO.getId());
+
+        if(result){
+            iotOpeationFillService.updateFillOrder(deviceRunLogDO);
+        }
+
+        return success(1);
+    }
+
+
+
     @PutMapping("/update")
     @Operation(summary = "更新运行记录填报")
     @PreAuthorize("@ss.hasPermission('rq:iot-opeation-fill:update')")