From 80823b3d91e180ed4babf9cc4b8a19ea4191268e Mon Sep 17 00:00:00 2001 From: hyingbo <1363390067@qq.com> Date: 星期三, 20 八月 2025 11:55:32 +0800 Subject: [PATCH] 程序加工确认表修改零件信息取值 --- lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) 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 c8e3358..5babb26 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 @@ -55,6 +55,9 @@ private IDocInfoService docInfoService; @Autowired + private IComponentInfoService componentInfoService; + + @Autowired private IPartsInfoService partsInfoService; @Autowired @@ -130,7 +133,9 @@ if (docInfo==null){ return false; } - PartsInfo partsInfo=new PartsInfo(); + /** 瀹㈡埛鏂硅姹傚姞宸ョ▼搴忕‘璁よ〃涓殑闆朵欢鍥惧彿銆佸悕绉般�佹潗璐ㄥ彇閮ㄤ欢鐨勪俊鎭� 2025-08-19 **/ +// PartsInfo partsInfo=new PartsInfo(); + ComponentInfo componentInfo=new ComponentInfo(); ProcessStream processStream; WorkStep workStep; DeviceType deviceType; @@ -146,7 +151,8 @@ return false; } guideCardBatch.setProcessWorkCode(processStream.getProcessCode()); - partsInfo=partsInfoService.getById(processStream.getPartsId()); +// partsInfo=partsInfoService.getById(processStream.getPartsId()); + componentInfo=componentInfoService.getById(processStream.getComponentId()); }else if (DocAttributionTypeEnum.WORKSITE.getCode().equals(attributionType)){ //宸ユ璁惧绫� deviceType=deviceTypeService.getById(attributionId); @@ -158,18 +164,27 @@ return false; } guideCardBatch.setProcessWorkCode(workStep.getStepCode()); - partsInfo=partsInfoService.getById(workStep.getPartsId()); +// partsInfo=partsInfoService.getById(workStep.getPartsId()); + componentInfo=componentInfoService.getById(workStep.getComponentId()); + } - if (partsInfo==null){ +// if (partsInfo==null){ +// return false; +// } + if (componentInfo==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.setPartsCode(partsInfo.getPartsCode()); +// guideCardBatch.setPartsName(partsInfo.getPartsName()); +// guideCardBatch.setMaterielDesp(partsInfo.getMaterielDesp()); + guideCardBatch.setPartsCode(componentInfo.getComponentCode()); + guideCardBatch.setPartsName(componentInfo.getComponentName()); + guideCardBatch.setMaterielDesp(componentInfo.getStructureType()); + guideCardBatch.setCompiler(user.getUsername()); guideCardBatch.setCreateTime(new Date()); return this.save(guideCardBatch); -- Gitblit v1.9.3