hyingbo
3 天以前 80823b3d91e180ed4babf9cc4b8a19ea4191268e
程序加工确认表修改零件信息取值
已修改1个文件
29 ■■■■ 文件已修改
lxzn-module-dnc/src/main/java/org/jeecg/modules/dnc/service/impl/GuideCardBatchServiceImpl.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);