From bc263d8bed5d1405f275bb8638a9bec9eaf06585 Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期一, 31 三月 2025 09:42:00 +0800
Subject: [PATCH] 添加审签逻辑,移动flow通用代码,添加根据角色查询用户,新增时间工具类,修改指派设备bug

---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java |   29 +++++++++++++++++++----------
 1 files changed, 19 insertions(+), 10 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java
index b3d3397..b5e0bb4 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/ProcessStreamServiceImpl.java
@@ -21,10 +21,7 @@
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
+import java.util.*;
 
 @Service
 public class ProcessStreamServiceImpl extends ServiceImpl<ProcessStreamMapper, ProcessStream> implements IProcessStreamService {
@@ -50,6 +47,8 @@
     private IProcessStreamPermissionService processStreamPermissionService;
     @Autowired
     private IProductMixService productMixService;
+    @Autowired
+    private IProductPermissionService productPermissionService;
 
     @Override
     @Transactional(rollbackFor = {Exception.class})
@@ -124,14 +123,19 @@
                     ExceptionCast.cast(CommonCode.FAIL);
             }
         }
+        //娣诲姞鐢ㄦ埛鏉冮檺
+        b = productPermissionService.add(stream.getProcessId(), userId,"5");
+        if (!b) {
+            ExceptionCast.cast(ProductInfoCode.PRODUCT_SAVE_ERROR);
+        }
         //娣诲姞缁撴瀯鏍�
         ProductMix productMix;
-        if (stream.getPartsId() != null) {
-            productMix = new ProductMix(Long.parseLong(stream.getProcessId()),Long.parseLong(stream.getPartsId())
-                    ,stream.getProcessName(),stream.getProcessCode(),"5");
+        if (stream.getPsvId() != null) {
+            productMix = new ProductMix(Long.parseLong(stream.getProcessId()),Long.parseLong(stream.getPsvId())
+                    ,stream.getProcessName(),stream.getProcessCode(),5,new Date());
         }else {
             productMix = new ProductMix(Long.parseLong(stream.getProcessId()),Long.parseLong(stream.getComponentId())
-                    ,stream.getProcessName(),stream.getProcessCode(),"5");
+                    ,stream.getProcessName(),stream.getProcessCode(),5,new Date());
         }
         productMixService.save(productMix);
         //娣诲姞鏉冮檺楠岃瘉
@@ -139,7 +143,7 @@
         permissionStream.setUserId(userId);
         permissionStream.setBusinessId(stream.getProcessId());
         permissionStream.setBusinessType("5");
-        return permissionStreamNewService.save(permissionStream);
+        return permissionStreamNewService.addPermissionStreamNew(permissionStream);
     }
 
     @Override
@@ -157,8 +161,13 @@
         stream.setComponentId(null);
         stream.setPartsId(null);
         stream.setProcessName(stream.getProcessName().toUpperCase());
-        stream.setProcessCode(null);
+        stream.setProcessCode(stream.getProcessCode().toUpperCase());
         boolean b = super.updateById(stream);
+        //鍚屾淇敼缁撴瀯鏍�
+        ProductMix productMix = productMixService.getById(Long.parseLong(id));
+        productMix.setName(stream.getProcessName());
+        productMix.setCode(stream.getProcessCode());
+        productMixService.updateById(productMix);
         if(!b)
             ExceptionCast.cast(CommonCode.FAIL);
         ProcessInfo processInfo = new ProcessInfo();

--
Gitblit v1.9.3