45858 MES:电子化检验初判和终判批量导入

dev_temp_xw_202504170000_45858
xiangwei.zhang 3 months ago
parent e69d160c0c
commit ccd313952d

@ -303,7 +303,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
MesPartInspection mesPartInspection = null;
if (!StringUtils.isEmpty(mesReworkTask.getId())){
DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesReworkTask.getOrganizeCode());
DdlPreparedPack.getNumEqualPack(mesReworkTask.getPartInspectionId(), "id", packBean);
DdlPreparedPack.getNumEqualPack(mesReworkTask.getId(), "reworkTaskId", packBean);
mesPartInspection = mesPartInspectionRepository.getByProperty(packBean);
if (!Objects.isNull(mesPartInspection)){
if(!CollectionUtils.isEmpty(requestModel.getAssemblyModelList())){

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

Loading…
Cancel
Save