|
|
|
@ -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());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -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());
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -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
|
|
|
|
@ -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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|