|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.shippingscan.strategy;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesCustomerPartService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.*;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.aspect.MonitorLog;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.shippingscan.IMesShippingScanStrategyService;
|
|
|
|
@ -19,7 +20,6 @@ import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroupDetail;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesCustomerPartRepository;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesProduceSnRepository;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementDetailRepository;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.repository.MesShippingOrderManagementRepository;
|
|
|
|
@ -60,7 +60,7 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
private IMesProduceSnExtService produceSnExtService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesCustomerPartRepository mesCustomerPartRepository;
|
|
|
|
|
private IMesCustomerPartService customerPartService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesConfigService mesConfigService;
|
|
|
|
@ -107,8 +107,6 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void checkShippingDetails(MesSortShippingCheckModel model, MesShippingOrderManagement orderManagement, MesPartShippingGroup shippingGroup, MesProduceSn produceSn, MesShippingOrderManagementDetail detail) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验发运单明细顺序
|
|
|
|
|
if (!Objects.isNull(shippingGroup) && !StringUtils.isEmpty(shippingGroup.getIsEnableShippingFailSafe()) && CommonEnumUtil.VALID == shippingGroup.getIsEnableShippingFailSafe()) {
|
|
|
|
|
//45550 PDA-MES-PDA发运扫描排序方式修改
|
|
|
|
@ -147,10 +145,7 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
|
|
|
|
|
//校验客户零件信息是否存在 (默认需要验证, 值可能是[空/0/20])
|
|
|
|
|
if (StringUtils.isEmpty(shippingGroup.getScanMethodJudgment()) || !shippingGroup.getScanMethodJudgment().equals(MesExtEnumUtil.SHIPPING_GROUP_SCAN_METHOD_JUDGMENT.PART_NO.getValueStr())) {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(detail.getPartNo(), "erpPartNo", packBean);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(detail.getCustPartNo(), "custPartNo", packBean);
|
|
|
|
|
if (!mesCustomerPartRepository.isExitByHql(packBean)) {
|
|
|
|
|
if (!customerPartService.isExistCustomerPart(model.getOrganizeCode(), detail.getPartNo(), detail.getCustPartNo())) {
|
|
|
|
|
throw new ImppBusiException(String.format("零件号【%s】客户零件号【%s】关系不存在,请检查数据!", detail.getPartNo(), detail.getCustPartNo()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -241,10 +236,7 @@ public class MesShippingScanSnStrategyServiceImpl implements IMesShippingScanStr
|
|
|
|
|
List<MesShippingOrderManagementDetail> detailList = model.getDetailList().stream().filter(k -> !StringUtils.isEmpty(k.getCustPartNo()) && StringUtils.isEmpty(k.getBarcode()) && !Objects.equals(k.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)).collect(Collectors.toList());
|
|
|
|
|
MesShippingOrderManagementDetail mesShippingOrderManagementDetail = null;
|
|
|
|
|
for (MesShippingOrderManagementDetail managementDetail : detailList) {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(managementDetail.getPartNo(), "erpPartNo", packBean);
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(managementDetail.getCustPartNo(), "custPartNo", packBean);
|
|
|
|
|
if (checkMesPartShippingGroupDetailRule(model, managementDetail) && mesCustomerPartRepository.isExitByHql(packBean)) {
|
|
|
|
|
if (checkMesPartShippingGroupDetailRule(model, managementDetail) && customerPartService.isExistCustomerPart(model.getOrganizeCode(), managementDetail.getPartNo(), managementDetail.getCustPartNo())) {
|
|
|
|
|
mesShippingOrderManagementDetail = managementDetail;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|