|
|
|
@ -328,6 +328,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
detail.setId(null);
|
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
|
detail.setPid(model.getPartInspection().getId());
|
|
|
|
|
setSystemSyncStatus(detail);
|
|
|
|
|
ConvertBean.serviceModelInitialize(detail, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -402,6 +403,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
detail.setId(null);
|
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
|
detail.setPid(partInspection.getId());
|
|
|
|
|
setSystemSyncStatus(detail);
|
|
|
|
|
ConvertBean.serviceModelInitialize(detail, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -429,7 +431,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
}
|
|
|
|
|
//查询条码所在库位
|
|
|
|
|
// 20241010不找当前所在库位,先找生产版本库位,再找2000
|
|
|
|
|
// srcLocateNo = getDestLocateNo(model, org);
|
|
|
|
|
// srcLocateNo = getDestLocateNo(model, org);
|
|
|
|
|
}
|
|
|
|
|
if (Objects.isNull(srcLocateNo)) {
|
|
|
|
|
srcLocateNo = configService.getCfgValue(org, "LGORT");
|
|
|
|
@ -477,6 +479,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
detail.setId(null);
|
|
|
|
|
detail.setOrganizeCode(org);
|
|
|
|
|
detail.setPid(model.getPartInspection().getId());
|
|
|
|
|
setSystemSyncStatus(detail);
|
|
|
|
|
ConvertBean.serviceModelInitialize(detail, AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -506,7 +509,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
|
|
|
|
|
//移库
|
|
|
|
|
if (model.getOptType() != 2) {
|
|
|
|
|
String srcLocateNo = configService.getCfgValue(org, "LGORT");
|
|
|
|
|
String srcLocateNo = configService.getCfgValue(org, "LGORT");
|
|
|
|
|
|
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(model.getPartNo(), "partNo", ddlPackBean);
|
|
|
|
@ -610,6 +613,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
List<MesPartInspectionDetail> resultDetailList = partInspectionDetailRepository.findByHqlWhere(packBean);
|
|
|
|
|
resultDetailList.forEach(k -> {
|
|
|
|
|
k.setIsDeleted(MesCommonConstant.TRUE_INTEGER);
|
|
|
|
|
setSystemSyncStatus(k);
|
|
|
|
|
ConvertBean.serviceModelUpdate(model.getPartInspection(), AuthUtil.getSessionUser().getUserName());
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -977,9 +981,8 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
private List<MesPartInspectionDetail> checkPartInspectionDetail(MesPartInspection partInspection, String org) {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(org);
|
|
|
|
|
DdlPreparedPack.getNumEqualPack(partInspection.getId(), MesPcnExtConstWords.PID, packBean);
|
|
|
|
|
List<MesPartInspectionDetail> detailList = partInspectionDetailRepository.findByHqlWhere(packBean);
|
|
|
|
|
|
|
|
|
|
return detailList;
|
|
|
|
|
return partInspectionDetailRepository.findByHqlWhere(packBean);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1071,7 +1074,7 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
}
|
|
|
|
|
produceSn.setSnStatus(MesExtEnumUtil.PRODUCE_SN_STATUS.OFFLINE.getValue());
|
|
|
|
|
ConvertBean.serviceModelUpdate(produceSn, userName);
|
|
|
|
|
produceSnExtService.update(produceSn);
|
|
|
|
|
produceSnExtService.update(produceSn);
|
|
|
|
|
|
|
|
|
|
produceSnLog.setProductSn(produceSn.getProductSn());
|
|
|
|
|
produceSnLog.setCustSn(produceSn.getCustSn());
|
|
|
|
@ -1081,4 +1084,9 @@ public class MesInputDefectRecordService implements IMesInputDefectRecordService
|
|
|
|
|
ConvertBean.serviceModelInitialize(produceSnLog, userName);
|
|
|
|
|
produceSnLogRepository.save(produceSnLog);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void setSystemSyncStatus(MesPartInspectionDetail detail) {
|
|
|
|
|
detail.setSystemSyncStatus(CommonEnumUtil.FALSE);
|
|
|
|
|
detail.setSystemSyncDatetime(MesPcnExtConstWords.EMPTY);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|