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-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/DocInfoServiceImpl.java | 37 ++++++++++++++++++++++++------------- 1 files changed, 24 insertions(+), 13 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 3b4b965..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 @@ -159,19 +162,27 @@ } } boolean saveBool = super.save(docInfo); - SysParams sysParams=sysParamsService.getSysPramBySettingKey("nc_dispatch_file"); - if (sysParams ==null){ - throw new JeecgBootException("鏈厤缃鍏C涓庣數瀛愬浘鐗堟槸鍚﹁Е鍙戝绛炬祦绋嬶紝璇疯仈绯荤鐞嗗憳"); - }else { - if (saveBool&&sysParams.getSettingValue().equals("1")){ - //瑙﹀彂瀹$ - DispatchFile dispatchFile = new DispatchFile(); - dispatchFile.setDocId(docInfo.getDocId()); - dispatchFile.setFileId(docFile.getFileId()); - dispatchFile.setAttributionId(uploadRequest.getAttributionId()); - dispatchFile.setAttributionType(String.valueOf(uploadRequest.getAttributionType())); - dispatchFile.setDocClassCode(uploadRequest.getDocClassCode()); - dispatchFileService.saveDispatchFile(dispatchFile); + if (uploadRequest.getDocClassCode().equals("NC")||uploadRequest.getDocClassCode().equals("other")){ + SysParams sysParams=sysParamsService.getSysPramBySettingKey("nc_dispatch_file"); + if (sysParams ==null){ + throw new JeecgBootException("鏈厤缃鍏C涓庣數瀛愬浘鐗堟槸鍚﹁Е鍙戝绛炬祦绋嬶紝璇疯仈绯荤鐞嗗憳"); + }else { + if (saveBool&&sysParams.getSettingValue().equals("1")){ + //瑙﹀彂瀹$ + DispatchFile dispatchFile = new DispatchFile(); + dispatchFile.setDocId(docInfo.getDocId()); + dispatchFile.setFileId(docFile.getFileId()); + dispatchFile.setAttributionId(uploadRequest.getAttributionId()); + dispatchFile.setAttributionType(String.valueOf(uploadRequest.getAttributionType())); + dispatchFile.setDocClassCode(uploadRequest.getDocClassCode()); + dispatchFileService.saveDispatchFile(dispatchFile); + } + } + } + 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; -- Gitblit v1.9.3