|
|
|
@ -3,6 +3,7 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesEquipmentExtService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesEquipmentLogExtService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.spot.IMesSpotCheckOrderService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.util.MesPcnException;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesEquipmentSpotCheckModel;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesSpotCheckOrderModel;
|
|
|
|
@ -147,6 +148,10 @@ public class MesSpotCheckOrderService implements IMesSpotCheckOrderService {
|
|
|
|
|
checkEquipment(model, org);
|
|
|
|
|
return model;
|
|
|
|
|
} else {
|
|
|
|
|
//校验是否重复扫描
|
|
|
|
|
if(model.getOrderPartList().stream().anyMatch(t -> !StringUtils.isEmpty(t.getSn()) && Objects.equals(model.getProduceSn(), t.getSn()))){
|
|
|
|
|
MesPcnException.throwMesBusiException("条码【%s】已扫描,请勿重复扫描", model.getProduceSn());
|
|
|
|
|
}
|
|
|
|
|
//检查条码
|
|
|
|
|
MesProduceSn produceSn = checkProduceSn(model.getProduceSn(), org);
|
|
|
|
|
|
|
|
|
@ -161,7 +166,7 @@ public class MesSpotCheckOrderService implements IMesSpotCheckOrderService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!flg) {
|
|
|
|
|
throw new ImppBusiException(String.format("扫描的条码【%s】对应的物料号【%s】在点检单中不存在", produceSn.getProductSn(), produceSn.getPartNo()));
|
|
|
|
|
throw new ImppBusiException(String.format("扫描的条码【%s】对应的物料号【%s】在点检单中未匹配到待匹配的数据", produceSn.getProductSn(), produceSn.getPartNo()));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return model;
|
|
|
|
|