From ff361539e3ffd6e62100e392ddda2f4ab9dfee62 Mon Sep 17 00:00:00 2001
From: liyong <18434998025@163.com>
Date: 星期三, 27 五月 2026 13:15:42 +0800
Subject: [PATCH] 工序调整, 报工反改订单数量,判断是最后一道工序才修改订单完成数量

---
 src/main/java/com/ruoyi/production/service/impl/ProductProcessServiceImpl.java |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/main/java/com/ruoyi/production/service/impl/ProductProcessServiceImpl.java b/src/main/java/com/ruoyi/production/service/impl/ProductProcessServiceImpl.java
index 71bf805..60b3dc2 100644
--- a/src/main/java/com/ruoyi/production/service/impl/ProductProcessServiceImpl.java
+++ b/src/main/java/com/ruoyi/production/service/impl/ProductProcessServiceImpl.java
@@ -84,18 +84,18 @@
             throw new ServiceException("鏂板澶辫触,璁″垝宸ユ椂涓嶈兘涓虹┖");
         }
         // 鍒ゆ柇浜у搧鏄惁瀛樺湪
-        if (ObjectUtils.isEmpty(productProcessDto.getProductModelId())) {
-            throw new ServiceException("鏂板澶辫触,閮ㄤ欢涓嶈兘涓虹┖");
-        }
-        ProductModel productModel = productModelService.getById(productProcessDto.getProductModelId());
-        if (productModel == null) {
-            throw new ServiceException("鏂板澶辫触,璇ラ儴浠朵笉瀛樺湪");
-        }
-        validateDuplicateTypeForSameProduct(productModel.getId(), productProcessDto.getType(), null);
+//        if (ObjectUtils.isEmpty(productProcessDto.getProductModelId())) {
+//            throw new ServiceException("鏂板澶辫触,閮ㄤ欢涓嶈兘涓虹┖");
+//        }
+//        ProductModel productModel = productModelService.getById(productProcessDto.getProductModelId());
+//        if (productModel == null) {
+//            throw new ServiceException("鏂板澶辫触,璇ラ儴浠朵笉瀛樺湪");
+//        }
+//        validateDuplicateTypeForSameProduct(productModel.getId(), productProcessDto.getType(), null);
 
         ProductProcess productProcess = new ProductProcess();
         BeanUtils.copyProperties(productProcessDto, productProcess);
-        productProcess.setProductModelId(productModel.getId());
+//        productProcess.setProductModelId(productModel.getId());
 
         validatePlanner(productProcessDto.getPlannerId(), productProcessDto.getPlannerName(), null);
 
@@ -129,17 +129,17 @@
         if (oldProductProcess == null) {
             throw new ServiceException("淇敼澶辫触锛屽伐搴忎笉瀛樺湪");
         }
-        Long finalProductModelId = ObjectUtils.isNotEmpty(productProcessDto.getProductModelId())
-                ? productProcessDto.getProductModelId() : oldProductProcess.getProductModelId();
-        Integer finalType = ObjectUtils.isNotEmpty(productProcessDto.getType())
-                ? productProcessDto.getType() : oldProductProcess.getType();
-
+//        Long finalProductModelId = ObjectUtils.isNotEmpty(productProcessDto.getProductModelId())
+//                ? productProcessDto.getProductModelId() : oldProductProcess.getProductModelId();
+//        Integer finalType = ObjectUtils.isNotEmpty(productProcessDto.getType())
+//                ? productProcessDto.getType() : oldProductProcess.getType();
+//
         // 鍒ゆ柇鍏宠仈浜у搧鏄惁瀛樺湪
-        ProductModel productModel = productModelService.getById(finalProductModelId);
-        if (productModel == null) {
-            throw new ServiceException("淇敼澶辫触锛屽叧鑱旈儴浠朵笉瀛樺湪");
-        }
-        validateDuplicateTypeForSameProduct(productModel.getId(), finalType, productProcessDto.getId());
+//        ProductModel productModel = productModelService.getById(finalProductModelId);
+//        if (productModel == null) {
+//            throw new ServiceException("淇敼澶辫触锛屽叧鑱旈儴浠朵笉瀛樺湪");
+//        }
+//        validateDuplicateTypeForSameProduct(productModel.getId(), finalType, productProcessDto.getId());
 
         // 鏍¢獙璁″垝浜哄憳
         validatePlanner(productProcessDto.getPlannerId(), productProcessDto.getPlannerName(), null);

--
Gitblit v1.9.3