|
|
@ -683,10 +683,10 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private MesMove createMove(MesPartInspectionInputModel model, String source, String target, String org, String workCenterCode) {
|
|
|
|
private MesMove createMove(MesPartInspectionInputModel model, String source, String target, String org, String workCenterCode) {
|
|
|
|
|
|
|
|
if (StringUtils.isEmpty(model.getUserInfo())) model.setUserInfo("系统");
|
|
|
|
GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM");
|
|
|
|
GenSerialNoModel serialNoModel = new GenSerialNoModel("INPUT_DEFECT_ZRSUM");
|
|
|
|
serialNoModel.setPartNo(model.getPart().getPartNo());
|
|
|
|
serialNoModel.setPartNo(model.getPart().getPartNo());
|
|
|
|
// ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, AuthUtil.getSessionUser().getUserName(), org, 1);
|
|
|
|
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, model.getUserInfo(), org, 1);
|
|
|
|
ResultBean rb = syncFuncService.syncSerialNo(serialNoModel, "系统", org, 1);
|
|
|
|
|
|
|
|
String zrsum = "";
|
|
|
|
String zrsum = "";
|
|
|
|
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
|
|
|
|
if (null != rb && !CollectionUtils.isEmpty(rb.getResultList())) {
|
|
|
|
zrsum = (rb.getResultList().get(0)).toString();
|
|
|
|
zrsum = (rb.getResultList().get(0)).toString();
|
|
|
@ -707,8 +707,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
move.setMoveType(MesExtEnumUtil.MOVE_TYPE.SUSPICIOUS_MOVE.getValue());
|
|
|
|
move.setMoveType(MesExtEnumUtil.MOVE_TYPE.SUSPICIOUS_MOVE.getValue());
|
|
|
|
move.setProductSn(model.getSn());
|
|
|
|
move.setProductSn(model.getSn());
|
|
|
|
move.setWorkCenter(prodOrgExtService.getErpWorkCenterCode(org, workCenterCode));
|
|
|
|
move.setWorkCenter(prodOrgExtService.getErpWorkCenterCode(org, workCenterCode));
|
|
|
|
// ConvertBean.serviceModelInitialize(move, AuthUtil.getSessionUser().getUserName());
|
|
|
|
ConvertBean.serviceModelInitialize(move, model.getUserInfo());
|
|
|
|
ConvertBean.serviceModelInitialize(move, "系统");
|
|
|
|
|
|
|
|
return move;
|
|
|
|
return move;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -894,7 +893,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
public void saveSusPartInspection(MesPartInspectionInputModel model, String org) {
|
|
|
|
public void saveSusPartInspection(MesPartInspectionInputModel model, String org) {
|
|
|
|
|
|
|
|
|
|
|
|
MesPartInspection partInspection = new MesPartInspection();
|
|
|
|
MesPartInspection partInspection = new MesPartInspection();
|
|
|
|
BeanUtils.copyProperties(model, partInspection);
|
|
|
|
BeanUtils.copyProperties(model, partInspection, "id");
|
|
|
|
partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
|
|
|
|
partInspection.setInspectionStatus(MesExtEnumUtil.PART_INSPECTION_STATUS.FAIL.getValue());
|
|
|
|
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue());
|
|
|
|
partInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.CREATE.getValue());
|
|
|
|
partInspection.setOrganizeCode(org);
|
|
|
|
partInspection.setOrganizeCode(org);
|
|
|
@ -908,8 +907,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
|
|
|
|
|
|
|
partInspection.setDefectTypeCode(defectType.getDefectTypeCode());
|
|
|
|
partInspection.setDefectTypeCode(defectType.getDefectTypeCode());
|
|
|
|
partInspection.setDefectTypeId(defectType.getId());
|
|
|
|
partInspection.setDefectTypeId(defectType.getId());
|
|
|
|
|
|
|
|
ConvertBean.serviceModelInitialize(partInspection, model.getUserInfo());
|
|
|
|
partInspectionRepository.save(partInspection);
|
|
|
|
partInspection = partInspectionRepository.insert(partInspection);
|
|
|
|
log.info("生成的缺陷记录id ={}", partInspection);
|
|
|
|
log.info("生成的缺陷记录id ={}", partInspection);
|
|
|
|
|
|
|
|
|
|
|
|
MesPartInspectionDetail detail = new MesPartInspectionDetail();
|
|
|
|
MesPartInspectionDetail detail = new MesPartInspectionDetail();
|
|
|
@ -923,7 +922,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
detail.setDefectTypeName(defectType.getDefectTypeName());
|
|
|
|
detail.setDefectTypeName(defectType.getDefectTypeName());
|
|
|
|
detail.setId(null);
|
|
|
|
detail.setId(null);
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
ConvertBean.serviceModelInitialize(detail, "系统");
|
|
|
|
ConvertBean.serviceModelInitialize(detail, model.getUserInfo());
|
|
|
|
partInspectionDetailRepository.insert(detail);
|
|
|
|
partInspectionDetailRepository.insert(detail);
|
|
|
|
//
|
|
|
|
//
|
|
|
|
String source = configService.getCfgValue(org, "LGORT");
|
|
|
|
String source = configService.getCfgValue(org, "LGORT");
|
|
|
@ -945,7 +944,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
MesMove move = createMove(model, source, configService.getCfgValue(org, "UMLGO"), org, model.getWorkCenterCode());
|
|
|
|
MesMove move = createMove(model, source, configService.getCfgValue(org, "UMLGO"), org, model.getWorkCenterCode());
|
|
|
|
moveRepository.save(move);
|
|
|
|
moveRepository.insert(move);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "客退品查询")
|
|
|
|
@ApiOperation(value = "客退品查询")
|
|
|
|