返工需求开发

tags/yfai-pcn-ext-v1.0
微笑着面对明天 12 months ago
parent 0c4f27f85b
commit 33d3ec2f66

@ -110,11 +110,14 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
*
*/
MesPartInspection mesPartInspection = getMesPartInspection(res);
/**
*
*/
List<MesPartInspectionDetail> mesPartInspectionDetails = getMesPartInspectionDetail(reworkTaskDetails);
List<MesPartInspectionDetail> mesPartInspectionDetails = null;
if (!CollectionUtils.isEmpty(reworkTaskDetails)) {
/**
*
*/
mesPartInspectionDetails = getMesPartInspectionDetail(reworkTaskDetails);
}
/**
*
*/
@ -186,7 +189,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
try {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(requestModel.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(requestModel.getSn(), "sn", packBean);
DdlPreparedPack.getStringEqualPack(requestModel.getSn(), "productSn", packBean);
MesProduceSn mesProduceSn = mesProduceSnRepository.getByProperty(packBean);
if (mesProduceSn == null) {
MesPcnException.throwFlowException("条码信息不存在");
@ -211,12 +214,12 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
mesProductionAssembly.setRepeatAssemblySn(requestModel.getSn());
mesProductionAssemblyRepository.update(mesProductionAssembly);
mesProductionAssemblyRepository.insert(mesProductionRepeatAssembly);
mesProductionAssemblyRepository.save(mesProductionRepeatAssembly);
/**
* NC
*/
for (Long detailId : requestModel.getDetailIds()) {
reworkRecord(detailId);
for (String detailId : requestModel.getDetailIds().split(",")) {
reworkRecord(Long.valueOf(detailId));
}
} catch (Exception e) {
log.error("替换条码异常", e);
@ -230,9 +233,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
DdlPreparedPack.getStringEqualPack(mesReworkTask.getSn(), "sn", packBean);
MesPartInspection mesPartInspection = mesPartInspectionRepository.getByProperty(packBean);
if (mesPartInspection == null) {
throw new ImppBusiException("返工单信息不存在");
}
return mesPartInspection;
}
@ -280,9 +281,7 @@ public class MesReworkTaskServiceImpl implements IMesReworkTaskService {
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.REWORK_TASK_DETAIL_STATUS.REWORK_TASK_DETAIL_STATUS_10.getValue(), "status", packBean);
List<MesReworkTaskDetail> res = mesReworkTaskDetailRepository.findByHqlWhere(packBean);
if (CollectionUtils.isEmpty(res)) {
throw new ImppBusiException("返工单详情信息不存在");
}
return res;
}
}

@ -39,6 +39,6 @@ public class MesReworkTaskRequestModel {
private Integer assemblyPartStatus;
private List<Long> detailIds;
private String detailIds;
}

Loading…
Cancel
Save