fix #bug 43977 芜湖正式环境边缘端,质检单明细表,同步状态写入为1,且有写同步状态。

master
jun 6 months ago
parent 944a5029cc
commit 5776846493

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

Loading…
Cancel
Save