|
|
|
@ -389,7 +389,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
produceSn.setQcStatus(MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS.getValue());
|
|
|
|
|
String defectTypeCode = MesEnumUtil.DEFECT_TYPE_CODE.DETERMIND.getValue();
|
|
|
|
|
|
|
|
|
|
String defectTypeCodeStr = configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE") == null ? "QX130" :configService.getCfgValue(org, "");
|
|
|
|
|
String defectTypeCodeStr = configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE") == null ? "QX130" :configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据页面上选择的位置 查询位置,若不存在则提示 位置不存在,请检查数据
|
|
|
|
@ -861,10 +861,36 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
|
|
|
|
|
MesPartInspection partInspection = new MesPartInspection();
|
|
|
|
|
BeanUtils.copyProperties(model, partInspection);
|
|
|
|
|
partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.QUALIFIED.getValue());
|
|
|
|
|
partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
|
|
|
|
|
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue());
|
|
|
|
|
partInspection.setOrganizeCode(org);
|
|
|
|
|
|
|
|
|
|
String defectTypeCodeStr = configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE") == null ? "QX130" :configService.getCfgValue(org, "MES_SUSPICIOUS_DEFECT_TYPE_CODE");
|
|
|
|
|
|
|
|
|
|
//根据页面上选择的位置 查询位置,若不存在则提示 位置不存在,请检查数据
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(defectTypeCodeStr, "defectTypeCode", packBean);
|
|
|
|
|
MesDefectType defectType = defectTypeRepository.getByProperty(packBean);
|
|
|
|
|
|
|
|
|
|
partInspection.setDefectTypeCode(defectType.getDefectTypeCode());
|
|
|
|
|
partInspection.setDefectTypeId(defectType.getId());
|
|
|
|
|
|
|
|
|
|
partInspectionRepository.save(partInspection);
|
|
|
|
|
log.info("生成的缺陷记录id ={}", partInspection);
|
|
|
|
|
|
|
|
|
|
MesPartInspectionDetail detail = new MesPartInspectionDetail();
|
|
|
|
|
|
|
|
|
|
detail.setPid(partInspection.getId());
|
|
|
|
|
detail.setFrontBack(10);
|
|
|
|
|
detail.setDefectLocation("A01");
|
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
|
detail.setDefectTypeId(defectType.getId());
|
|
|
|
|
detail.setDefectTypeCode(defectType.getDefectTypeCode());
|
|
|
|
|
detail.setDefectTypeName(defectType.getDefectTypeName());
|
|
|
|
|
detail.setId(null);
|
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
|
ConvertBean.serviceModelInitialize(detail, "系统");
|
|
|
|
|
partInspectionDetailRepository.insert(detail);
|
|
|
|
|
//
|
|
|
|
|
String source = configService.getCfgValue(org, "LGORT");
|
|
|
|
|
//移库
|
|
|
|
|