返工需求开发

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

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

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

Loading…
Cancel
Save