From c9cc74fad46adaa4bc448cba673e830baf705fce Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期二, 24 六月 2025 17:40:45 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FileFerryService.java |   46 ++--------------------------------------------
 1 files changed, 2 insertions(+), 44 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FileFerryService.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FileFerryService.java
index 419c241..4661dcd 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FileFerryService.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/FileFerryService.java
@@ -1,19 +1,13 @@
 package org.jeecg.modules.dnc.service.impl;
 
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import org.apache.commons.lang3.StringUtils;
 import org.jeecg.modules.dnc.dto.ComponentHierarchy;
 import org.jeecg.modules.dnc.dto.TransferPackage;
-import org.jeecg.modules.dnc.entity.*;
-import org.jeecg.modules.dnc.exception.ExceptionCast;
-import org.jeecg.modules.dnc.response.ActivitiCode;
-import org.jeecg.modules.dnc.response.DocumentCode;
+import org.jeecg.modules.dnc.entity.ComponentInfo;
+import org.jeecg.modules.dnc.entity.DocFile;
 import org.jeecg.modules.dnc.service.IDocClassificationService;
 import org.jeecg.modules.dnc.service.IDocInfoService;
 import org.jeecg.modules.dnc.service.IDocRelativeService;
 import org.jeecg.modules.dnc.utils.JsonUtils;
-import org.jeecg.modules.dnc.utils.file.FileUtilS;
-import org.jeecg.modules.mdc.entity.MdcEquipment;
 import org.jeecg.modules.mdc.mapper.MdcEquipmentMapper;
 import org.jeecg.modules.system.service.IMdcProductionService;
 import org.slf4j.Logger;
@@ -146,7 +140,6 @@
 
             // 6. 鑾峰彇鏂囦欢澶嶅埗鐩爣璺緞
             DocFile docFile = pkg.getTraceChain().getDocFile();
-            DocInfo docInfo = pkg.getTraceChain().getDocInfo();
             if (docFile == null) {
                 throw new IllegalStateException("浼犺緭鍖呬腑缂哄皯鏂囨。鏂囦欢淇℃伅");
             }
@@ -165,41 +158,6 @@
             logger.info("澶嶅埗鏂囦欢: {} 鈫� {}", ncFilePath, targetPath);
             Path source = Paths.get(ncFilePath);
             Files.copy(source, Paths.get(targetPath), StandardCopyOption.REPLACE_EXISTING);
-
-            // 8. 鏌ヨ璁惧id
-            MdcEquipment mdcEquipment=mdcEquipmentMapper.selectOne(new QueryWrapper<MdcEquipment>().eq("equipment_id",equipmentId));
-            if (mdcEquipment == null) {
-                throw new IllegalArgumentException("鏃犳晥鐨勮澶嘔D: " + equipmentId);
-            }
-
-            // 9.浼犺緭鏂囦欢鍒拌澶囦笅
-            List<String> strings = mdcProductionService.findListParentTreeAll(mdcEquipment.getId());
-            if (strings != null && !strings.isEmpty()) {
-                DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(docInfo.getDocId(), 7, mdcEquipment.getId());
-                if (deviceDoc == null) {
-                    DocClassification classification = classificationService.getByCode("send");
-                    if(classification == null)
-                        ExceptionCast.cast(DocumentCode.DOC_CLASS_ERROR);
-                    DocRelative docRelative = new DocRelative();
-                    docRelative.setDocId(docInfo.getDocId());
-                    docRelative.setClassificationId(classification.getClassificationId());
-                    docRelative.setAttributionType(7);
-                    docRelative.setAttributionId(mdcEquipment.getId());
-                    docRelativeService.save(docRelative);
-                }
-                String sendPath = StringUtils.join(strings.toArray(), "/");
-                boolean copyFileNc = FileUtilS.copyFileNc(docFile.getFilePath(), sendPath + "/" + mdcEquipment.getEquipmentId(),
-                        docFile.getFileEncodeName(),
-                        docFile.getFileName(), docFile.getFileSuffix());
-                if (!copyFileNc) {
-                    ExceptionCast.cast(ActivitiCode.ACT_FILE_ERROR);
-                } else {
-                    FileUtilS.deleteZipFromToSend(sendPath + "/" + mdcEquipment.getEquipmentId(),
-                            docFile.getFileName(), docFile.getFileSuffix());
-                }
-            } else {
-                throw new RuntimeException("鏂囦欢浼犺緭璺緞鑾峰彇澶辫触");
-            }
 
             // 10.鍒犻櫎涓存椂NC鏂囦欢涓巎son鏂囦欢
             logger.info("鍒犻櫎涓存椂鏂囦欢: {}", ncFilePath);

--
Gitblit v1.9.3