|
|
|
@ -102,8 +102,8 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
//判断是否需要排序校验 默认排序则需要校验
|
|
|
|
|
if (!StringUtils.isEmpty(orderManagement.getScanSeqWay()) && !Objects.isNull(MesExtEnumUtil.SHIPPING_GROUP_SCAN_CONFIRM_SEQ_MODE.valueOfDescription(orderManagement.getScanSeqWay()))) {
|
|
|
|
|
//按照页面显示顺序校验
|
|
|
|
|
Optional<String> nextPartNo = model.getDetailList().stream().filter(k -> StringUtils.isEmpty(k.getBarcode()) && !Objects.equals(k.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)).findFirst().map(MesShippingOrderManagementDetail::getPartNo);
|
|
|
|
|
if (nextPartNo.isPresent() && !nextPartNo.get().equals(produceSn.getPartNo())) {
|
|
|
|
|
Optional<MesShippingOrderManagementDetail> nextShippingDetail = model.getDetailList().stream().filter(k -> StringUtils.isEmpty(k.getBarcode()) && !Objects.equals(k.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)).findFirst();
|
|
|
|
|
if (nextShippingDetail.isPresent() && !StringUtils.isEmpty(nextShippingDetail.get().getPartTypeCode()) && !nextShippingDetail.get().getPartNo().equals(produceSn.getPartNo())) {
|
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码扫描顺序错误,请检查数据!", model.getSn()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|