修复抛异常,但报工数量依然增加

tags/yfai-pcn-ext-v2.5
xiangwei.zhang 5 months ago
parent c737d7bd54
commit 872c8d629e

@ -512,12 +512,15 @@ public class MesWorkOrderService implements IMesWorkOrderService {
LOGGER.error(String.format("产线【%s】不存在", productionRecord.getWorkCenterCode()));
throw new ImppBusiException(String.format("产线【%s】不存在", productionRecord.getWorkCenterCode()));
}
MesWorkOrder oldMesWorkOrder = getBestWorkOrder(productionRecord, oldMesWorkOrderList, mesWorkCenter);
if (oldMesWorkOrder == null) {
MesWorkOrder mesWorkOrder = getBestWorkOrder(productionRecord, oldMesWorkOrderList, mesWorkCenter);
if (mesWorkOrder == null) {
LOGGER.error(String.format("未找到匹配的加工单, 条码=%s", productionRecord.getCustSn()));
return;
//throw new ImppBusiException(String.format("未找到匹配的加工单"));
}
// 2024-12-12 报工失败但set值依然被update了
MesWorkOrder oldMesWorkOrder = new MesWorkOrder();
BeanUtils.copyProperties(mesWorkOrder, oldMesWorkOrder);
//获取生产版本
MesProductVersion mesProductVersion = getProductVersion(organizeCode, productionRecord.getPartNo(), oldMesWorkOrder.getProductVersion());

Loading…
Cancel
Save