From e0f827f71f5bb9d1ed9f6414221e90eeb34632a7 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期四, 04 九月 2025 11:07:01 +0800
Subject: [PATCH] 排产工单模块设备点检涉及接口

---
 src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java b/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java
index c021299..9c1c227 100644
--- a/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java
+++ b/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java
@@ -27,6 +27,7 @@
 import org.springframework.web.servlet.ModelAndView;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
 import java.util.*;
 import java.util.stream.Collectors;
 
@@ -38,7 +39,7 @@
  */
 @Api(tags = "鎺掍骇宸ュ崟")
 @RestController
-@RequestMapping("/mesproductionworkorder/mesProductionWorkOrder")
+@RequestMapping("/mes/mesProductionWorkOrder")
 @Slf4j
 public class MesProductionWorkOrderController extends JeecgController<MesProductionWorkOrder, IMesProductionWorkOrderService> {
     @Autowired
@@ -93,6 +94,11 @@
         mesProductionWorkOrderList.forEach(item -> {
             if (Objects.isNull(item.getId())) {
                 item.setWorkOrderStatus(ProductionWorkOrderStatus.NEW.name());
+                item.setCompletenessCheckFlag(CommonConstant.DEFAULT_0);
+                item.setEquipmentInspectionFlag(CommonConstant.DEFAULT_0);
+                item.setProcessInspectionFlag(CommonConstant.DEFAULT_0);
+                item.setActualQuantity(BigDecimal.ZERO);
+                item.setFinishedPallets(0);
             }
         });
         mesProductionWorkOrderService.saveOrUpdateBatch(mesProductionWorkOrderList);
@@ -204,10 +210,12 @@
     @GetMapping(value = "/execute")
     public Result<?> execute(@RequestParam("id") String id) {
         MesProductionWorkOrder workOrder = mesProductionWorkOrderService.getById(id);
-        if (!ProductionWorkOrderStatus.PUBLISHED.name().equals(workOrder.getWorkOrderStatus())) {
+        if (!ProductionWorkOrderStatus.PUBLISHED.name().equals(workOrder.getWorkOrderStatus())
+                && !CommonConstant.DEFAULT_1.equals(workOrder.getCompletenessCheckFlag())
+                && !CommonConstant.DEFAULT_1.equals(workOrder.getEquipmentInspectionFlag())
+                && !CommonConstant.DEFAULT_1.equals(workOrder.getProcessInspectionFlag())) {
             return Result.error("褰撳墠宸ュ崟鐘舵�佷笉鑳芥墽琛岋紒");
         }
-        //todo 榻愬鎬ф鏌ャ�佸伐鑹虹偣妫�銆佽澶囩偣妫� 鐨勬牎楠岄�昏緫
         MesProductionWorkOrder executeOrder = new MesProductionWorkOrder()
                 .setId(id)
                 .setWorkOrderStatus(ProductionWorkOrderStatus.EXECUTING.name());

--
Gitblit v1.9.3