|
|
@ -17,7 +17,6 @@ import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroup;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroupDetail;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesPartShippingGroupDetail;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesProduceSn;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesWorkOrder;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.edi.cd.MesCimVolvoJisRackIdDetail;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesCustSortInfo;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesCustSortInfo;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagement;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesShippingOrderManagementDetail;
|
|
|
@ -46,7 +45,7 @@ import java.util.stream.Stream;
|
|
|
|
**/
|
|
|
|
**/
|
|
|
|
@Service
|
|
|
|
@Service
|
|
|
|
@Slf4j
|
|
|
|
@Slf4j
|
|
|
|
public class mesShippingCheckVolvoRackNoAndPartNoStrategyServiceImpl implements IMesShippingScanStrategyService {
|
|
|
|
public class MesShippingCheckVolvoRackNoAndPartNoStrategyServiceImpl implements IMesShippingScanStrategyService {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private MesShippingOrderManagementRepository shippingOrderManagementRepository;
|
|
|
|
private MesShippingOrderManagementRepository shippingOrderManagementRepository;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
@ -86,8 +85,8 @@ public class mesShippingCheckVolvoRackNoAndPartNoStrategyServiceImpl implements
|
|
|
|
boolean scanFlg = false;
|
|
|
|
boolean scanFlg = false;
|
|
|
|
for (MesShippingOrderManagementDetail detail : model.getDetailList()) {
|
|
|
|
for (MesShippingOrderManagementDetail detail : model.getDetailList()) {
|
|
|
|
if (detail.getPartNo().equals(produceSn.getPartNo()) && StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) {
|
|
|
|
if (detail.getPartNo().equals(produceSn.getPartNo()) && StringUtils.isEmpty(detail.getBarcode()) && !Objects.equals(detail.getIsScanFlg(), MesCommonConstant.TRUE_INTEGER)) {
|
|
|
|
if (Objects.equals(detail.getVin(), workOrder.getVinCode())) {
|
|
|
|
if (!Objects.equals(detail.getVin(), workOrder.getVinCode())) {
|
|
|
|
throw new ImppBusiException(String.format("产品条码明细【%s】与发运单明细不匹配,请重新扫描!", model.getSn()));
|
|
|
|
throw new ImppBusiException(String.format("产品条码【%s】对应工单Vince号与发运单明细的Vin号不匹配,请重新扫描!", model.getSn()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
checkDetailScanSeq(orderManagement, detail, workOrder);
|
|
|
|
checkDetailScanSeq(orderManagement, detail, workOrder);
|
|
|
|
//校验发运明细
|
|
|
|
//校验发运明细
|
|
|
@ -177,7 +176,7 @@ public class mesShippingCheckVolvoRackNoAndPartNoStrategyServiceImpl implements
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码已经扫描过,请检查数据!", model.getSn()));
|
|
|
|
throw new ImppBusiException(String.format("【%s】此条码已经扫描过,请检查数据!", model.getSn()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode());
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode());
|
|
|
|
DdlPreparedPack.getStringEqualPack(model.getSn(), "productSn", packBean);
|
|
|
|
DdlPreparedPack.getStringEqualPack(model.getSn(), "custSn", packBean);
|
|
|
|
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
|
|
|
|
DdlPreparedPack.getOrderByPack(new Object[]{CommonEnumUtil.ASC_OR_DESC.DESC.getValue()}, new String[]{"createDatetime"}, packBean);
|
|
|
|
MesProduceSn produceSn = produceSnRepository.getByProperty(packBean);
|
|
|
|
MesProduceSn produceSn = produceSnRepository.getByProperty(packBean);
|
|
|
|
if (!StringUtils.isEmpty(produceSn)) {
|
|
|
|
if (!StringUtils.isEmpty(produceSn)) {
|
|
|
@ -242,23 +241,11 @@ public class mesShippingCheckVolvoRackNoAndPartNoStrategyServiceImpl implements
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void updateOrderManagementDetails(MesProduceSn produceSn, MesShippingOrderManagement orderManagement, MesShippingOrderManagementDetail detail, MesWorkOrder workOrder, String userInfo) {
|
|
|
|
private void updateOrderManagementDetails(MesProduceSn produceSn, MesShippingOrderManagement orderManagement, MesShippingOrderManagementDetail detail, MesWorkOrder workOrder, String userInfo) {
|
|
|
|
// if (StringUtils.isEmpty(orderManagement.getCheckSeqCode())) {
|
|
|
|
detail.setBarcode(produceSn.getCustSn());
|
|
|
|
detail.setBarcode(produceSn.getProductSn());
|
|
|
|
|
|
|
|
detail.setIsScanFlg(MesCommonConstant.TRUE_INTEGER);
|
|
|
|
detail.setIsScanFlg(MesCommonConstant.TRUE_INTEGER);
|
|
|
|
detail.setStatus(MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue());
|
|
|
|
detail.setStatus(MesExtEnumUtil.SHIPPING_ORDER_DETAIL_SHIPPING_STATUS.SHIPPINGED.getValue());
|
|
|
|
detail.setRemark("扫描完成");
|
|
|
|
detail.setRemark("扫描完成");
|
|
|
|
updateDetail(detail);
|
|
|
|
|
|
|
|
orderManagement.setCheckSeqCode("1");
|
|
|
|
orderManagement.setCheckSeqCode("1");
|
|
|
|
update(orderManagement);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// MesCustSortInfo custSoftInfo = custSoftInfoRDao.getById(Long.parseLong(workOrder.getWorkOrderSource()));
|
|
|
|
|
|
|
|
// if (custSoftInfo != null) {
|
|
|
|
|
|
|
|
// MesCimVolvoJisRackIdDetail rackIdDetail = rackIdDetailRDao.getById(custSoftInfo.getSourceId());
|
|
|
|
|
|
|
|
// if (rackIdDetail != null) {
|
|
|
|
|
|
|
|
// detail.setPartPosition(rackIdDetail.getPosition());
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//根据是否启动记忆判断 若启用记忆,则根据保存数据库
|
|
|
|
//根据是否启动记忆判断 若启用记忆,则根据保存数据库
|
|
|
|
if (!StringUtils.isEmpty(orderManagement.getIsEnableMemory()) && Objects.equals(orderManagement.getIsEnableMemory(), MesCommonConstant.TRUE_INTEGER)) {
|
|
|
|
if (!StringUtils.isEmpty(orderManagement.getIsEnableMemory()) && Objects.equals(orderManagement.getIsEnableMemory(), MesCommonConstant.TRUE_INTEGER)) {
|
|
|
|
|
|
|
|
|
|
|
@ -289,7 +276,6 @@ public class mesShippingCheckVolvoRackNoAndPartNoStrategyServiceImpl implements
|
|
|
|
mesShippingSnUniqueService.insertMesShippingSnUnique(orderManagement.getOrganizeCode(),detail.getBarcode(),orderManagement.getShippingCode(),userInfo);
|
|
|
|
mesShippingSnUniqueService.insertMesShippingSnUnique(orderManagement.getOrganizeCode(),detail.getBarcode(),orderManagement.getShippingCode(),userInfo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@MonitorLog
|
|
|
|
@MonitorLog
|