|
|
|
@ -712,6 +712,8 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
|
|
|
|
|
String refundSource = configService.getCfgValue(org, "REFUND");
|
|
|
|
|
List<MesPartInspectionPerson> personList = new ArrayList<>();
|
|
|
|
|
|
|
|
|
|
MesPartInspection mesPartInspection = model.getPartInspection();
|
|
|
|
|
for (MesNcPersonModel mesNcPersonModel : model.getPersonModelList()) {
|
|
|
|
|
Integer type = mesNcPersonModel.getNcStatus();
|
|
|
|
|
|
|
|
|
@ -727,7 +729,17 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
//partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
MesPartInspectionPerson mesPartInspectionPerson = new MesPartInspectionPerson();
|
|
|
|
|
mesPartInspectionPerson.setQty(Double.valueOf(mesNcPersonModel.getQty()));
|
|
|
|
|
mesPartInspectionPerson.setNcStatus(mesNcPersonModel.getNcStatus());
|
|
|
|
|
mesPartInspectionPerson.setSn(model.getPartInspection().getSn());
|
|
|
|
|
mesPartInspectionPerson.setOrganizeCode(model.getOrganizeCode());
|
|
|
|
|
mesPartInspectionPerson.setPid(model.getPartInspection().getId());
|
|
|
|
|
ConvertBean.serviceModelInitialize(mesPartInspectionPerson, model.getUserName());
|
|
|
|
|
personList.add(mesPartInspectionPerson);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String target = configService.getCfgValue(org, "LGORT");
|
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(org);
|
|
|
|
@ -757,6 +769,8 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
mesPartInspectionPerson.setQty(Double.valueOf(mesNcPersonModel.getQty()));
|
|
|
|
|
mesPartInspectionPerson.setNcStatus(mesNcPersonModel.getNcStatus());
|
|
|
|
|
mesPartInspectionPerson.setSn(model.getPartInspection().getSn());
|
|
|
|
|
mesPartInspectionPerson.setOrganizeCode(model.getOrganizeCode());
|
|
|
|
|
mesPartInspectionPerson.setPid(model.getPartInspection().getId());
|
|
|
|
|
|
|
|
|
|
DdlPackBean partyPackBean = DdlPackBean.getDdlPackBean(org);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(mesNcPersonModel.getOnlyPerson(), "responsibleParty", partyPackBean);
|
|
|
|
@ -767,7 +781,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
personList.add(mesPartInspectionPerson);
|
|
|
|
|
|
|
|
|
|
MesReworkTask reworkTask = new MesReworkTask();
|
|
|
|
|
reworkTask.setQty(model.getPartInspection().getQty());
|
|
|
|
|
reworkTask.setQty(mesNcPersonModel.getQty());
|
|
|
|
|
reworkTask.setSn(model.getPartInspection().getSn());
|
|
|
|
|
reworkTask.setReworkOrder(rework);
|
|
|
|
|
reworkTask.setStatus(MesExtEnumUtil.REWORK_TASK_STATUS.CREATE.getValue());
|
|
|
|
@ -808,7 +822,7 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
//partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
MesMove move = createMove(model, sourceValue, mesNcPersonModel.getInventoryLocationCode(), org,workCenterCode, MesExtEnumUtil.MOVE_TYPE.RETURN_MOVE);
|
|
|
|
|
ConvertBean.serviceModelInitialize(move, model.getUserName());
|
|
|
|
@ -826,12 +840,14 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
//partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
MesPartInspectionPerson mesPartInspectionPerson = new MesPartInspectionPerson();
|
|
|
|
|
mesPartInspectionPerson.setQty(Double.valueOf(mesNcPersonModel.getQty()));
|
|
|
|
|
mesPartInspectionPerson.setNcStatus(mesNcPersonModel.getNcStatus());
|
|
|
|
|
mesPartInspectionPerson.setSn(model.getPartInspection().getSn());
|
|
|
|
|
mesPartInspectionPerson.setOrganizeCode(model.getOrganizeCode());
|
|
|
|
|
mesPartInspectionPerson.setPid(model.getPartInspection().getId());
|
|
|
|
|
|
|
|
|
|
DdlPackBean partyPackBean = DdlPackBean.getDdlPackBean(org);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(mesNcPersonModel.getOnlyPerson(), "responsibleParty", partyPackBean);
|
|
|
|
@ -863,7 +879,19 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
sourceValue = refundSource;
|
|
|
|
|
model.getPartInspection().setRefundFlag(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
}
|
|
|
|
|
partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
//partInspectionRepository.save(model.getPartInspection());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MesPartInspectionPerson mesPartInspectionPerson = new MesPartInspectionPerson();
|
|
|
|
|
mesPartInspectionPerson.setQty(Double.valueOf(mesNcPersonModel.getQty()));
|
|
|
|
|
mesPartInspectionPerson.setNcStatus(mesNcPersonModel.getNcStatus());
|
|
|
|
|
mesPartInspectionPerson.setSn(model.getPartInspection().getSn());
|
|
|
|
|
mesPartInspectionPerson.setOrganizeCode(model.getOrganizeCode());
|
|
|
|
|
mesPartInspectionPerson.setPid(model.getPartInspection().getId());
|
|
|
|
|
|
|
|
|
|
ConvertBean.serviceModelInitialize(mesPartInspectionPerson, model.getUserName());
|
|
|
|
|
personList.add(mesPartInspectionPerson);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String target = configService.getCfgValue(org, "LGORT");
|
|
|
|
|
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean();
|
|
|
|
@ -880,6 +908,9 @@ public class MesNcProcessingService implements IMesNcProcessingService {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
mesPartInspection.setNcStatus(MesExtEnumUtil.PART_INSPECTION_NC_STATUS.SUCCESS.getValue());
|
|
|
|
|
ConvertBean.serviceModelUpdate(mesPartInspection, model.getUserName());
|
|
|
|
|
partInspectionRepository.save(mesPartInspection);
|
|
|
|
|
mesPartInspectionPersonRepository.saveAll(personList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|