|
|
|
@ -79,10 +79,10 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
boolean scanFlg = false;
|
|
|
|
|
for (MesShippingOrderManagementDetail detail : model.getDetailList()) {
|
|
|
|
|
boolean notScan;
|
|
|
|
|
if (Objects.equals(model.getSecondShipping(), false)) {
|
|
|
|
|
notScan = StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER);
|
|
|
|
|
} else {
|
|
|
|
|
if (Objects.equals(model.getSecondShipping(), true)) {
|
|
|
|
|
notScan = Objects.equals(detail.getSecondScanFlg(), MesCommonConstant.FALSE_INTEGER) && Objects.equals(detail.getBarcode(), model.getSn());
|
|
|
|
|
} else {
|
|
|
|
|
notScan = StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER);
|
|
|
|
|
}
|
|
|
|
|
if (detail.getPartNo().equals(produceSn.getPartNo()) && notScan) {
|
|
|
|
|
//校验发运明细
|
|
|
|
@ -94,10 +94,10 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!scanFlg) {
|
|
|
|
|
if (Objects.equals(model.getSecondShipping(), false)) {
|
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码对应的【%s】物料号与发运单中物料号不匹配,请检查数据!", model.getSn(), produceSn.getPartNo()));
|
|
|
|
|
if (Objects.equals(model.getSecondShipping(), true)) {
|
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码不在原发运单中,若要通过请强过!", model.getSn()));
|
|
|
|
|
} else {
|
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码不在原发运单中,若要通过请强过!", model.getSn(), produceSn.getPartNo()));
|
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码对应的【%s】物料号与发运单中物料号不匹配,请检查数据!", model.getSn(), produceSn.getPartNo()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
model.setMsg(String.format("条码【%s】扫描完成,请扫描下一个条码", model.getSn()));
|
|
|
|
@ -277,7 +277,7 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (Objects.equals(model.getSecondShipping(), false)) {
|
|
|
|
|
if (!Objects.equals(model.getSecondShipping(), true)) {
|
|
|
|
|
orderManagement.setStatus(MesExtEnumUtil.SHIPPING_ORDER_STATUS.SHIPPING.getValue());
|
|
|
|
|
}
|
|
|
|
|
orderManagement.setSystemSyncStatus(CommonEnumUtil.FALSE);
|
|
|
|
|