From 0871a25215fb468f121785600f796a14b54d8ebc Mon Sep 17 00:00:00 2001
From: lyh <925863403@qq.com>
Date: 星期五, 06 六月 2025 15:47:00 +0800
Subject: [PATCH] 1.刀具添加字段 2.新增dnc传输日志表 3.导入NC文件默认产生nc文件对应数控程序加工确认表 4.拆分两网 修改yml配置

---
 lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml                           |   39 +----
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDncPassLogService.java                   |   19 ++
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DncPassLogServiceImpl.java           |   23 +++
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java               |    7 +
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/DncPassLogMapper.java                      |   18 ++
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/response/DocumentCode.java                        |    5 
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/MdcPassLogMapper.xml                   |    9 +
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java       |   91 +++++++++++-
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/DncPassLog.java                            |   36 +++++
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/Cutter.java                                |    9 +
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java              |    9 +
 lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java |   74 ++++++++-
 lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/message/enums/DeployEnum.java      |   36 +++++
 13 files changed, 321 insertions(+), 54 deletions(-)

diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/Cutter.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/Cutter.java
index ad604fe..cabeeb0 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/Cutter.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/Cutter.java
@@ -38,6 +38,11 @@
     @TableField(value = "doc_id")
     private String docId;
 
+    //瀵瑰簲鍒�鍏峰簱id
+    @Excel(name = "瀵瑰簲鍒�鍏峰簱id", width = 15)
+    @TableField(value = "tools_id")
+    private String toolsId;
+
     //鍒�鍏峰悕绉�
     @Excel(name = "鍒�鍏峰悕绉�", width = 15)
     @TableField(value = "cutter_name")
@@ -48,8 +53,8 @@
     @TableField(value = "cutter_code")
     private String cutterCode;
 
-    //鍒�鍏风被鍨�
-    @Excel(name = "鍒�鍏风被鍨�", width = 15,dicCode = "cutter_type")
+    //鍒�鍏风畝绉�
+    @Excel(name = "鍒�鍏风畝绉�", width = 15,dicCode = "cutter_type")
     @TableField(value = "cutter_type")
     @Dict(dicCode = "cutter_type")
     private String cutterType;
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/DncPassLog.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/DncPassLog.java
new file mode 100644
index 0000000..625a104
--- /dev/null
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/entity/DncPassLog.java
@@ -0,0 +1,36 @@
+package org.jeecg.modules.dnc.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+/**
+ * @author clown
+ * * @date 2023/11/29
+ */
+@Data
+@NoArgsConstructor
+@TableName(value = "dnc_pass_log")
+public class DncPassLog {
+    @TableId
+    private String id;
+    //鍚嶇О
+    private String passName;
+    //搴忓彿
+    private String sequenceOrder;
+    //鏃堕棿
+    private String dayTime;
+    //绫诲瀷
+    private String passType;
+    // 鏂囦欢鍚嶇О
+    private String passLogFileName;
+    //椤哄簭鍙�
+    private Integer sequenceNumber;
+
+    private Date createTime;
+
+
+}
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/DncPassLogMapper.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/DncPassLogMapper.java
new file mode 100644
index 0000000..8ab732a
--- /dev/null
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/DncPassLogMapper.java
@@ -0,0 +1,18 @@
+package org.jeecg.modules.dnc.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.jeecg.modules.dnc.entity.DncPassLog;
+
+/**
+ * @author clown
+ * * @date 2023/11/29
+ */
+public interface DncPassLogMapper extends BaseMapper<DncPassLog> {
+    /**
+     * 鏌ヨ鏌愪竴澶╂渶鍚庝竴鏉¤褰�
+     * @param dayTime
+     * @return
+     */
+    DncPassLog findDateTimeDay(@Param("dayTime")String dayTime);
+}
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/MdcPassLogMapper.xml b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/MdcPassLogMapper.xml
new file mode 100644
index 0000000..3c74dd4
--- /dev/null
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/mapper/xml/MdcPassLogMapper.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="org.jeecg.modules.dnc.mapper.DncPassLogMapper">
+    <select id="findDateTimeDay" resultType="org.jeecg.modules.dnc.entity.DncPassLog" parameterType="String">
+        select top 1 *
+        from dnc_pass_log u
+        where day_time = #{dayTime} order by create_time desc
+    </select>
+</mapper>
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/response/DocumentCode.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/response/DocumentCode.java
index 5b7ef8e..7deaa38 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/response/DocumentCode.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/response/DocumentCode.java
@@ -31,7 +31,8 @@
     DOC_UPLOAD_ERROR(false, 25323, "鏂囨。瀵煎叆澶辫触锛�"),
     DOC_DEL_ERROR(false, 25324, "璇ユ枃妗f棤娉曞垹闄わ紒"),
     DOC_IS_EXIST(false, 25325, "璇ユ枃妗e凡瀛樺湪锛�"),
-    DOC_DEVICE_EXIST(false, 25326, "璇ユ枃妗f湁璁惧鍏宠仈淇℃伅锛�");
+    DOC_DEVICE_EXIST(false, 25326, "璇ユ枃妗f湁璁惧鍏宠仈淇℃伅锛�"),
+    DOC_BATCH_ERROR(false, 25327, "瀵煎叆鏂囨。鏂板鎵规澶辫触锛岃閲嶈瘯锛�");
 
     //鎿嶄綔浠g爜
     @ApiModelProperty(value = "鎿嶄綔鏄惁鎴愬姛", example = "true", required = true)
@@ -43,7 +44,7 @@
     //鎻愮ず淇℃伅
     @ApiModelProperty(value = "鎿嶄綔鎻愮ず", example = "鎿嶄綔杩囦簬棰戠箒锛�", required = true)
     String message;
-    private DocumentCode(boolean success, int code, String message){
+    DocumentCode(boolean success, int code, String message){
         this.success = success;
         this.code = code;
         this.message = message;
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDncPassLogService.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDncPassLogService.java
new file mode 100644
index 0000000..96f2c4b
--- /dev/null
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IDncPassLogService.java
@@ -0,0 +1,19 @@
+package org.jeecg.modules.dnc.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.jeecg.modules.dnc.entity.DncPassLog;
+
+/**
+ * @author clown
+ * * @date 2023/11/29
+ */
+public interface IDncPassLogService extends IService<DncPassLog> {
+
+    /**
+     * 鏌ヨ鏌愪竴澶╃殑鏁版嵁
+     * @param dateDay
+     * @return
+     */
+    DncPassLog findDayTime(String dateDay);
+
+}
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java
index b40927f..7666932 100644
--- a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/IGuideCardBatchService.java
@@ -17,4 +17,11 @@
      * @return
      */
     String getSerialNumber(String code);
+
+    /**
+     * 瀵煎叆NC鏂囦欢榛樿浜х敓nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛�
+     * @param docId
+     * @return
+     */
+    boolean importGuideCardBatch(String docId,String attributionId,Integer attributionType);
 }
diff --git a/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DncPassLogServiceImpl.java b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DncPassLogServiceImpl.java
new file mode 100644
index 0000000..45e0481
--- /dev/null
+++ b/lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DncPassLogServiceImpl.java
@@ -0,0 +1,23 @@
+package org.jeecg.modules.dnc.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.jeecg.modules.dnc.entity.DncPassLog;
+import org.jeecg.modules.dnc.mapper.DncPassLogMapper;
+import org.jeecg.modules.dnc.service.IDncPassLogService;
+import org.jeecg.modules.dnc.utils.ValidateUtil;
+import org.springframework.stereotype.Service;
+/**
+ * @author clown
+ * * @date 2023/11/29
+ */
+@Service
+public class DncPassLogServiceImpl extends ServiceImpl<DncPassLogMapper, DncPassLog> implements IDncPassLogService {
+
+    @Override
+    public DncPassLog findDayTime(String dateDay) {
+        if (!ValidateUtil.validateString(dateDay)) {
+            return null;
+        }
+        return super.baseMapper.findDateTimeDay(dateDay);
+    }
+}
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 32a53c1..d6de4b9 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
@@ -67,6 +67,9 @@
     @Autowired
     @Lazy
     private IComponentInfoService componentInfoService;
+    @Autowired
+    @Lazy
+    private IGuideCardBatchService guideCardBatchService;
 
     /*澶囦唤澶勭悊*/
     @Override
@@ -176,6 +179,12 @@
                 }
             }
         }
+        if (uploadRequest.getDocClassCode().equals("NC")){
+            boolean savaGuideCardBatch=guideCardBatchService.importGuideCardBatch(docInfo.getDocId(),uploadRequest.getAttributionId(),uploadRequest.getAttributionType());
+            if (!savaGuideCardBatch) {
+                ExceptionCast.cast(DocumentCode.DOC_BATCH_ERROR);
+            }
+        }
         return saveBool;
     }
 
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 e108ded..1061927 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
@@ -5,12 +5,14 @@
 import org.apache.shiro.SecurityUtils;
 import org.jeecg.common.system.vo.LoginUser;
 import org.jeecg.common.util.DateUtils;
-import org.jeecg.modules.dnc.entity.GuideCardBatch;
+import org.jeecg.modules.dnc.constant.DocAttributionTypeEnum;
+import org.jeecg.modules.dnc.entity.*;
 import org.jeecg.modules.dnc.mapper.GuideCardBatchMapper;
-import org.jeecg.modules.dnc.service.IGuideCardBatchService;
+import org.jeecg.modules.dnc.service.*;
 import org.jeecg.modules.system.service.ISysDictService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.List;
@@ -27,6 +29,24 @@
     @Autowired
     private ISysDictService sysDictService;
 
+    @Autowired
+    private IDocInfoService docInfoService;
+
+    @Autowired
+    private IDocRelativeService docRelativeService;
+
+    @Autowired
+    private IPartsInfoService partsInfoService;
+
+    @Autowired
+    private IProcessStreamService processStreamService;
+
+    @Autowired
+    private IWorkStepService workStepService;
+
+    @Autowired
+    private IDeviceTypeService deviceTypeService;
+
     /**
      * 鐢熸垚娴佹按鍙�
      * @param code
@@ -42,9 +62,9 @@
 
         // 鏌ヨ褰撳勾鎵�鏈夎褰�
         QueryWrapper<GuideCardBatch> wrapper = new QueryWrapper<>();
-        wrapper.likeRight("create_time", DateUtils.formatDate(new Date(), "yyyy"));
+        wrapper.apply("YEAR(create_time) = YEAR(GETDATE())");
         wrapper.isNotNull("serial_number");
-        wrapper.orderByDesc("SUBSTR(serial_number, -4)");
+        wrapper.orderByDesc("SUBSTRING(serial_number, LEN(serial_number)-3, 4)");
 
         List<GuideCardBatch> list = this.list(wrapper);
 
@@ -62,10 +82,65 @@
             serialSuffix = "0001"; // 褰撳勾鏃犺褰曞垯鍒濆鍖�
         }
 
-        // 鑾峰彇鍗曚綅缂栫爜
-        String unitCode = sysDictService.queryDictTextByKey("unit_code", code);
-
         // 鎷兼帴瀹屾暣缂栧彿
-        return yearSuffix + unitCode + user.getUsername() + serialSuffix;
+        return yearSuffix + code + user.getUsername() + serialSuffix;
+    }
+
+    /**
+     * 瀵煎叆NC鏂囦欢榛樿浜х敓nc鏂囦欢瀵瑰簲鏁版帶绋嬪簭鍔犲伐纭琛�
+     * @param docId
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public boolean importGuideCardBatch(String docId,String attributionId,Integer attributionType){
+        LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
+        DocInfo docInfo=docInfoService.getById(docId);
+        if (docInfo==null){
+            return false;
+        }
+        PartsInfo partsInfo=new PartsInfo();
+        ProcessStream processStream;
+        WorkStep workStep;
+        DeviceType deviceType;
+        GuideCardBatch guideCardBatch=new GuideCardBatch();
+        if (DocAttributionTypeEnum.PROCESS.getCode().equals(attributionType)){
+            //宸ュ簭璁惧绫�
+            deviceType=deviceTypeService.getById(attributionId);
+            if (deviceType==null){
+                return false;
+            }
+            processStream=processStreamService.getById(deviceType.getAttributionId());
+            if (processStream==null){
+                return false;
+            }
+            guideCardBatch.setProcessWorkCode(processStream.getProcessCode());
+            partsInfo=partsInfoService.getById(processStream.getPartsId());
+        }else if (DocAttributionTypeEnum.WORKSITE.getCode().equals(attributionType)){
+            //宸ユ璁惧绫�
+            deviceType=deviceTypeService.getById(attributionId);
+            if (deviceType==null){
+                return false;
+            }
+            workStep=workStepService.getById(deviceType.getAttributionId());
+            if (workStep==null){
+                return false;
+            }
+            guideCardBatch.setProcessWorkCode(workStep.getStepCode());
+            partsInfo=partsInfoService.getById(workStep.getPartsId());
+        }
+        if (partsInfo==null){
+            return false;
+        }
+        guideCardBatch.setDocId(docId);
+        guideCardBatch.setSerialNumber(getSerialNumber("C140"));
+        guideCardBatch.setUnit(sysDictService.queryDictTextByKey("unit_code", "C140"));
+        guideCardBatch.setDocName(docInfo.getDocName());
+        guideCardBatch.setPartsCode(partsInfo.getPartsCode());
+        guideCardBatch.setPartsName(partsInfo.getPartsName());
+        guideCardBatch.setMaterielDesp(partsInfo.getMaterielDesp());
+        guideCardBatch.setCompiler(user.getUsername());
+        guideCardBatch.setCreateTime(new Date());
+        return this.save(guideCardBatch);
     }
 }
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 3bfd2bb..a287e73 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
@@ -44,6 +44,7 @@
 import org.jeecg.modules.flowable.service.IFlowTaskService;
 import org.jeecg.modules.mdc.entity.MdcEquipment;
 import org.jeecg.modules.mdc.service.IMdcEquipmentService;
+import org.jeecg.modules.message.enums.DeployEnum;
 import org.jeecg.modules.system.service.IMdcProductionService;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -103,11 +104,14 @@
     private IFlowMyBusinessService flowMyBusinessService;
     @Autowired
     private PermissionService permissionService;
-
-    @Value("${securedoc.whether}")
-    private String whether;
-    @Value("${securedoc.localFilePath}")
-    private String localFilePath;
+    @Autowired
+    private IDncPassLogService dncPassLogService;
+    @Value("${deploy.deployType}")
+    //宸ユ帶缃�/娑夊瘑缃戦儴缃� 0涓哄伐鎺х綉 1涓烘秹瀵嗙綉
+    private String deployType;
+    @Value("${deploy.secretFolder}")
+    //娑夊瘑缃戜紶杈搉c鏂囦欢澶�
+    private String secretFolder;
 
     @Override
     @Transactional(rollbackFor = {Exception.class})
@@ -258,7 +262,10 @@
 
         }
         handleFileTransfer(mdcEquipment, docFile);
-        handleFileProcessing(docFile, mdcEquipment, whether, localFilePath);
+        //娉ㄦ剰----鍖哄垎宸ユ帶缃戜笌娑夊瘑缃戯紒锛侊紒  娑夊瘑缃戣繘琛孨C鏂囦欢鐨勬嫹璐濓紝宸ユ帶缃戣礋璐h繘琛岃В鏋怤C鏂囦欢
+        if (deployType.equals(DeployEnum.SMW.getCode())) {
+            handleFileProcessing(docFile, mdcEquipment, secretFolder);
+        }
         synchronizedFlagService.updateFlag(2);
         return Result.OK("鎿嶄綔鎴愬姛");
     }
@@ -380,6 +387,10 @@
                                 docFile.getFileName(),docFile.getFileSuffix());
                     }
                 }
+            }
+            //娉ㄦ剰----鍖哄垎宸ユ帶缃戜笌娑夊瘑缃戯紒锛侊紒  娑夊瘑缃戣繘琛孨C鏂囦欢鐨勬嫹璐濓紝宸ユ帶缃戣礋璐h繘琛岃В鏋怤C鏂囦欢
+            if (deployType.equals(DeployEnum.SMW.getCode())) {
+                handleFileProcessing(docFile, mdcEquipment, secretFolder);
             }
             return synchronizedFlagService.updateFlag(1);
         }else if(up.getStatus() == 3) {
@@ -650,22 +661,61 @@
     }
 
     //灏佽澶勭悊鏂囦欢
-    private void handleFileProcessing(DocFile docFile, MdcEquipment mdcEquipment, String whether, String localFilePath) {
-        if (whether.equals("true") && !docFile.getFileSuffix().equals("zip") && !docFile.getFileSuffix().equals("rar")) {
+    private void handleFileProcessing(DocFile docFile, MdcEquipment mdcEquipment, String secretFolder) {
+        if (!docFile.getFileSuffix().equals("zip") && !docFile.getFileSuffix().equals("rar")) {
             String size = FileUtilS.fileSizeNC(docFile.getFilePath(), docFile.getFileEncodeName());
             List<String> strings = iMdcProductionService.findListParentTreeAll(mdcEquipment.getId());
             if (strings != null && !strings.isEmpty()) {
+                DncPassLog passInfoTxt = new DncPassLog();
+
                 String path = StringUtils.join(strings.toArray(), "/");
                 Date dateFirst = DateUtil.getNow();
+                passInfoTxt.setDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY));
+                /*鏌ヨ鏈�鍚庝竴鏉¤褰�*/
+                //浼戠湢 500姣
+                DncPassLog dncPassLog  = dncPassLogService.findDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY));
+                int fileTxt = 0, fileNc =0;
+                if (dncPassLog !=null) {
+                    fileTxt = dncPassLog.getSequenceNumber() + 1;
+                } else {
+                    fileTxt =  1;
+                }
+                fileNc = fileTxt + 1;
+                //澶勭悊鏂囦欢鍚嶇О  鏂囦欢璺緞
+                String sequence = String.format("%06d",fileTxt);
+                String sequenceNc = String.format("%06d",fileNc);
+                passInfoTxt.setSequenceNumber(fileTxt);
+                passInfoTxt.setSequenceOrder(sequence);
+                passInfoTxt.setCreateTime(dateFirst);
+                System.out.println(DateUtil.format(dateFirst,DateUtil.STR_DATE_TIME));
+                passInfoTxt.setPassType("02");
+                dncPassLogService.save(passInfoTxt);
+
+                DncPassLog passInfoNc = new DncPassLog();
+                passInfoNc.setSequenceNumber(fileNc);
+                passInfoNc.setSequenceOrder(sequenceNc);
+                passInfoNc.setDayTime(DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY));
+                passInfoNc.setPassType("02");
+                passInfoNc.setPassName(docFile.getFileName());
+                try {
+                    Thread.sleep(1000);
+                    Date date = new Date();
+                    passInfoNc.setCreateTime(date);
+                    System.out.println(DateUtil.format(date,DateUtil.STR_DATE_TIME));
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+
+                dncPassLogService.save(passInfoNc);
                 NcTxtFilePathInfo ncTxt = new NcTxtFilePathInfo();
                 ncTxt.setEquipmentId(mdcEquipment.getEquipmentId());
-                ncTxt.setFileNcName("02A" + DateUtil.format(dateFirst, DateUtil.STR_YEARMONTHDAY));
-                ncTxt.setFileTxtName("02A" + DateUtil.format(dateFirst, DateUtil.STR_YEARMONTHDAY));
+                ncTxt.setFileNcName("10A"+DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)+sequenceNc);
+                ncTxt.setFileTxtName("10A"+DateUtil.format(dateFirst,DateUtil.STR_YEARMONTHDAY)+sequence);
                 ncTxt.setFilePath(path + "/" + mdcEquipment.getEquipmentId() + "/");
                 ncTxt.setOrigFileName(docFile.getFileName());
                 ncTxt.setOrigFileSuffix(docFile.getFileSuffix());
                 ncTxt.setFileAddOrDelete(1);
-                String loFilePath = localFilePath + ncTxt.getFileTxtName() + ".nc";
+                String loFilePath = secretFolder +"/"+ ncTxt.getFileTxtName() + ".nc";
                 try {
                     String allList = ncTxt.getFileTxtName() + "\n"
                             + ncTxt.getFileNcName() + "\n"
@@ -678,7 +728,7 @@
                     FileUtilS.fileWriterSql(loFilePath, allList);
                     boolean copyFileNc = FileUtilS.copyFileUpName(path + "/" + mdcEquipment.getEquipmentId() + "/send/" +
                                     docFile.getFileName(),
-                            localFilePath + ncTxt.getFileNcName(),
+                            secretFolder +"/"+ncTxt.getFileNcName(),
                             docFile.getFileSuffix(), "NC");
                     if (!copyFileNc) {
                         FileUtilS.deleteNcFile(loFilePath);
diff --git a/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/message/enums/DeployEnum.java b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/message/enums/DeployEnum.java
new file mode 100644
index 0000000..40d6cf7
--- /dev/null
+++ b/lxzn-module-system/lxzn-system-biz/src/main/java/org/jeecg/modules/message/enums/DeployEnum.java
@@ -0,0 +1,36 @@
+package org.jeecg.modules.message.enums;
+
+/**
+ * 鍖哄垎宸ユ帶缃�/娑夊瘑缃戦儴缃茬浉鍏抽厤缃�
+ */
+public enum DeployEnum {
+    SMW("0", "娑夊瘑缃�"),
+    GW("1", "宸ユ帶缃�");
+
+    private String code;
+    private String name;
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    DeployEnum() {
+    }
+
+    DeployEnum(String code, String name) {
+        this.code = code;
+        this.name = name;
+    }
+}
diff --git a/lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml b/lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml
index 2e398df..d79ea82 100644
--- a/lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml
+++ b/lxzn-module-system/lxzn-system-start/src/main/resources/application-dev.yml
@@ -135,7 +135,7 @@
     database: 0
     host: 127.0.0.1
     port: 6379
-    password: ''
+    password: '123456'
 flowable:
   enable: true
   #鍏抽棴瀹氭椂浠诲姟JOB
@@ -298,35 +298,6 @@
   namespace: http://service.server.webservice.example.com
   statusMethod: equipmentStatus
   rateMethod: equipmentRate
-securedoc: #鍥尯缃戜笌缃戦椄閫氳瀹㈡埛绔�
-  whether: true  #鏄惁鍚敤 true / false
-  serverIp: 10.118.10.63  #鏁版嵁鏈嶅姟绔疘P
-  serverPort: 8399  #鏁版嵁鏈嶅姟绔帴鍙�
-  #  serverIp: 127.0.0.1  #鏁版嵁鏈嶅姟绔疘P
-  #  serverPort: 8399  #鏁版嵁鏈嶅姟绔帴鍙�
-  username: admin  #瀹氫箟璐﹀彿
-  pwd: 123 #瀹氫箟瀵嗙爜
-  addressToken: /outer/appAuth #鏈嶅姟娈佃幏鍙杢oken鍦板潃
-  addressUploadFile: /outer/fileUpload #鏈嶅姟娈典笂浼犲湴鍧�
-  localFilePath: E:\\test\\a #鎺ユ敹鍦板潃
-  servicePath: E:\\test\\b #鍙戦�佸湴鍧�
-  copyFilePath: E:\\test\\bak_a  #鏂囦欢澶囦唤鍦板潃
-  #  localFilePath: /jar/test/a/ #鎺ユ敹鍦板潃
-  #  servicePath: /jar/test/b/ #鍙戦�佸湴鍧�
-  #  copyFilePath: /jar/test/bak_a/  #鏂囦欢澶囦唤鍦板潃
-  logIp: 127.0.0.1  #鏃ュ織绯荤粺鍦板潃
-  logPort: 8888   #鏃ュ織绯荤粺绔彛
-serviceIntranet: #鍥尯缃戜笌缃戦椄閫氳鏈嶅姟娈�
-  #  filePath: E:\\test\\b   #闆嗘垚瀹㈡埛绔繚瀛樺湴鍧�
-  #  newFilePath: E:/test/bak_sql/ #鏂囦欢澶囦唤鍦板潃
-  filePath: /jar/test/b/   #闆嗘垚瀹㈡埛绔繚瀛樺湴鍧�
-  newFilePath: /jar/test/bak_sql/ #鏂囦欢澶囦唤鍦板潃
-  appIdCheck: admin  #token 鐢ㄦ埛鍚�
-  passwordCheck: 123 #token 瀵嗙爜
-  logIp: 127.0.0.1
-  logPort: 8888
-  clientIp: 127.0.0.1  #瀹㈡埛绔疘P
-fileNumPath: D:/demo/fileNum.txt  #椤哄簭鍙疯褰曞湴鍧�
 #鏂囦欢涓婁紶鐩綍锛堟敞鎰廘inux鍜學indows涓婄殑鐩綍缁撴瀯涓嶅悓锛�
 #file.uploadFolder=/root/uploadFiles/
 #fileHomePath: ${UPLOAD_FOLDER:/jar/lxzn_storage}
@@ -336,3 +307,11 @@
 ncSend:
   addOrDelete: false  #//鏄惁鍒犻櫎seed 涓殑涔嬪墠鏂囦欢
 #staticAccessPath: /api/ffile/** # 褰撳墠椤圭洰鐨勯潤鎬佽祫婧愯闂厤缃湪nginx涓�
+#宸ユ帶缃�/娑夊瘑缃戦儴缃茬浉鍏抽厤缃�------------閫氳繃鍏夌洏鎽嗘浮
+deploy:
+    #宸ユ帶缃�/娑夊瘑缃戦儴缃� 0涓烘秹瀵嗙綉 1涓哄伐鎺х綉
+    deployType: 0
+    #娑夊瘑缃戜紶杈搉c鏂囦欢澶�
+    secretFolder: D:\\hy_test\\a
+    #宸ユ帶缃戠洃鎺c鏂囦欢澶�
+    workFolder: D:\\hy_test\\b

--
Gitblit v1.9.3