From 862ce715220e822a883468b36cfdd040af71d03d Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期二, 05 八月 2025 23:37:17 +0800 Subject: [PATCH] 修改文件检验与启动指派流程 --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dncFlow/service/impl/AssignFileStreamServiceImpl.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) 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..0f183e4 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 @@ -185,11 +185,11 @@ DocFile docFile = docFileService.getById(stream.getFileId()); DocInfo deviceDoc = docInfoService.getByDocAttrAndDocId(stream.getDocId(), 7, stream.getDeviceId()); if (deviceDoc != null) { - handleExistingDeviceDoc(docFile, mdcEquipment, stream.getDeviceId()); + handleExistingDeviceDoc(docInfo,docFile, mdcEquipment, stream.getDeviceId()); } deviceDoc = docInfoService.findByAttrAndDocName(docInfo.getDocName(), 7, stream.getDeviceId()); if (deviceDoc != null) { - handleExistingDeviceDoc(docFile, mdcEquipment, stream.getDeviceId()); + handleExistingDeviceDoc(docInfo,docFile, mdcEquipment, stream.getDeviceId()); } PermissionStreamNew permissionStreams = getPermissionStreams(stream); if (permissionStreams==null){ @@ -199,7 +199,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 +532,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); -- Gitblit v1.9.3