From f3a7d211a4a616d8ed2a08b103d8d162f06d389e Mon Sep 17 00:00:00 2001
From: Lius <Lius2225@163.com>
Date: 星期四, 07 八月 2025 17:23:00 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java       |    2 +-
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java        |    5 ++---
 lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java   |    1 +
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java              |   11 ++++++++---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java |   13 ++++++-------
 5 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java
index a6f9814..97e0f46 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java
@@ -101,10 +101,15 @@
             ExceptionCast.cast(DocumentCode.DOC_CLASS_ERROR);
         String fileName = FileUtilS.getFilenameNonSuffix(file.getOriginalFilename());
         String fileNameAll = file.getOriginalFilename();
-        DocInfo en = findByAttrAndDocName(fileName, uploadRequest.getAttributionType(), uploadRequest.getAttributionId());
+        List<DocInfo> docInfoList = super.getBaseMapper().findByAttrAndDocName(fileName, uploadRequest.getAttributionType(), uploadRequest.getAttributionId());
         //閽堝瀛樺湪鐨勫鐞�
-        if(en != null)
-            ExceptionCast.cast(DocumentCode.DOC_IS_EXIST);
+        if(docInfoList != null){
+            docInfoList.forEach(item->{
+                if (item.getClassificationId().equals(docClass.getClassificationId())) {
+                    ExceptionCast.cast(DocumentCode.DOC_IS_EXIST);
+                }
+            });
+        }
         FileUploadResult fileUploadResult = FileUtilS.uploadFile(file);
         if(fileUploadResult == null)
             ExceptionCast.cast(DocumentCode.DOC_UPLOAD_ERROR);
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java
index 100a954..c8e3358 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java
@@ -241,7 +241,7 @@
                                     .eq("data_id", guideCardBatch.getId())
                     );
                     if (businessList.isEmpty()) {
-                        return Result.error("娴佺▼璁板綍涓嶅瓨鍦�");
+                        return null;
                     }
                     FlowMyBusiness flowMyBusiness = businessList.get(0);
 
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java
index 0afad22..5770843 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/controller/DispatchFileController.java
@@ -240,9 +240,8 @@
 	 @AutoLog(value = "鏂囨。琛�-瀹氬瀷娴佺▼鍙戣捣")
 	 @ApiOperation(value = "鏂囨。琛�-瀹氬瀷娴佺▼鍙戣捣", notes = "鏂囨。琛�-瀹氬瀷娴佺▼鍙戣捣")
 	 @PostMapping("/submitProccess")
-	 public ResponseResult submitProccess(@RequestBody DispatchFile dispatchFile) {
-		 dispatchFileService.submitProccess(dispatchFile);
-		 return new ResponseResult(CommonCode.SUCCESS);
+	 public Result<?> submitProccess(@RequestBody DispatchFile dispatchFile) {
+		 return dispatchFileService.submitProccess(dispatchFile);
 	 }
 	 @AutoLog(value = "鏂囨。琛�-淇℃伅鏌ヨ")
 	 @ApiOperation(value = "鏂囨。琛�-淇℃伅鏌ヨ", notes = "鏂囨。琛�-淇℃伅鏌ヨ")
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java
index 4a8d8ed..1b89f6f 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java
@@ -182,14 +182,13 @@
         validateParams(stream);
         DocInfo docInfo = getDocInfo(stream);
         MdcEquipment mdcEquipment = getMdcEquipment(stream);
-        DocFile docFile = docFileService.getById(stream.getFileId());
         DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(stream.getDocId(), 7, stream.getDeviceId());
         if (deviceDoc != null) {
-            handleExistingDeviceDoc(docFile, mdcEquipment, stream.getDeviceId());
+            return Result.error("瀛樺湪鐩稿悓鏂囨。,涓嶅厑璁搁噸澶嶆寚娲撅紝璇峰垹闄ゅ悗鎸囨淳");
         }
         deviceDoc = docInfoService.findByAttrAndDocName(docInfo.getDocName(), 7, stream.getDeviceId());
         if (deviceDoc != null) {
-            handleExistingDeviceDoc(docFile, mdcEquipment, stream.getDeviceId());
+            return Result.error("瀛樺湪鐩稿悓鏂囨。,涓嶅厑璁搁噸澶嶆寚娲撅紝璇峰垹闄ゅ悗鎸囨淳");
         }
         PermissionStreamNew permissionStreams = getPermissionStreams(stream);
         if (permissionStreams==null){
@@ -199,7 +198,7 @@
         String userId = user.getId();
         saveBusinessObject(stream, userId);
         System.out.println("鎸囨淳NC鏂囨。鍒拌澶囨祦绋嬶細" + stream.getDocId());
-        flowCommonService.initActBusiness("鎸囨淳NC鏂囨。鍒拌澶囨祦绋嬶細" +docInfo.getDocName()+"."+docInfo.getDocSuffix()+"鍒拌澶�->"+mdcEquipment.getEquipmentName() ,
+        flowCommonService.initActBusiness("鎸囨淳NC鏂囨。鍒拌澶囨祦绋嬶細" +docInfo.getDocName()+"."+docInfo.getDocSuffix()+"鍒拌澶�->"+mdcEquipment.getEquipmentId() ,
                 stream.getStreamId(), "IAssignFileStreamService", "assign_nc_to_device", null);
         Map<String, Object> variables = new HashMap<>();
         variables.put("dataId", stream.getStreamId());
@@ -532,16 +531,16 @@
     }
 
     //鑾峰彇鏂囦欢
-    private void handleExistingDeviceDoc(DocFile docFile, MdcEquipment mdcEquipment, String deviceId) {
+    private void handleExistingDeviceDoc(DocInfo docInfo,DocFile docFile, MdcEquipment mdcEquipment, String deviceId) {
         List<String> strings = iMdcProductionService.findListParentTreeAll(mdcEquipment.getId());
         if (strings != null && !strings.isEmpty()) {
             String path = StringUtils.join(strings.toArray(), "/");
             boolean copyFileNc = FileUtilS.copyFileNcToBak(path + "/" + mdcEquipment.getEquipmentId(),
                     docFile.getFileName(), docFile.getFileSuffix());
             if (!copyFileNc) {
-                ExceptionCast.cast(ActivitiCode.ACT_FILE_ERROR);
+                ExceptionCast.cast(ActivitiCode.ACT_DEVICE_DOC_ERROR);
             } else {
-                DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(deviceId, 7, deviceId);
+                DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(docInfo.getDocId(), 7, deviceId);
                 boolean doc = docRelativeService.deleteDocByAttr(deviceDoc.getDocId(), 7, deviceId);
                 if (!doc) {
                     ExceptionCast.cast(ActivitiCode.ACT_DOC_ERROR_DELEVE);
diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java
index 94195b3..390ec70 100644
--- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java
+++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamEquipmentSealUpServiceImpl.java
@@ -367,6 +367,7 @@
                 }
                 entity.setUnsealApprovalUser(user.getUsername());
                 entity.setUnsealApprovalComment(request.getUnsealApprovalComment());
+                entity.setUnsealApprovalDealType(request.getUnsealApprovalDealType());
                 entity.setUnsealApprovalTime(new Date());
                 // 淇敼璁惧鐘舵��
                 equipment.setAssetStatus(AssetStatusEnum.NORMAL.name());

--
Gitblit v1.9.3