|
|
|
@ -81,6 +81,10 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesCustomerPartRepository mesCustomerPartRDao;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private MesCustPartInvoicedRepository partInvoicedRao;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public ListPager<MesPackageDetail> queryMesPackageDetailByPager(MesPackage mesPackage, Pager pager) {
|
|
|
|
|
|
|
|
|
@ -641,15 +645,22 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer
|
|
|
|
|
}
|
|
|
|
|
String partNo = split[packingDefine.getPartNoIndex() - 1];
|
|
|
|
|
if (Objects.equals(packingDefine.getPackBarcodeCustPartNo(), CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue())) {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesPackageDetail.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(partNo, MesPcnExtConstWords.CUST_PART_NO, packBean);
|
|
|
|
|
MesCustomerPart mesCustomerPart = mesCustomerPartRDao.getByProperty(packBean);
|
|
|
|
|
if (mesCustomerPart == null) {
|
|
|
|
|
MesPcnException.throwMesBusiException("客户零件号[%s]信息不存在,请检查数据!", partNo);
|
|
|
|
|
DdlPackBean invoicePackBean = DdlPackBean.getDdlPackBean(mesPackageDetail.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(partNo, MesPcnExtConstWords.CUST_PART_NO, invoicePackBean);
|
|
|
|
|
MesCustPartInvoiced invoiced = partInvoicedRao.getByProperty(invoicePackBean);
|
|
|
|
|
if (invoiced != null && !StringUtils.isEmpty(invoiced.getPartNo())) {
|
|
|
|
|
partNo = invoiced.getPartNo();
|
|
|
|
|
} else {
|
|
|
|
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(mesPackageDetail.getOrganizeCode());
|
|
|
|
|
DdlPreparedPack.getStringEqualPack(partNo, MesPcnExtConstWords.CUST_PART_NO, packBean);
|
|
|
|
|
MesCustomerPart mesCustomerPart = mesCustomerPartRDao.getByProperty(packBean);
|
|
|
|
|
if (mesCustomerPart == null) {
|
|
|
|
|
MesPcnException.throwMesBusiException("客户零件号[%s]信息不存在,请检查数据!", partNo);
|
|
|
|
|
}
|
|
|
|
|
partNo = mesCustomerPart.getErpPartNo();
|
|
|
|
|
}
|
|
|
|
|
partNo = mesCustomerPart.getErpPartNo();
|
|
|
|
|
if (StringUtils.isEmpty(partNo)) {
|
|
|
|
|
MesPcnException.throwMesBusiException("客户零件号[%s]未绑定物料号数据,请检查数据!", mesCustomerPart.getCustPartNo());
|
|
|
|
|
MesPcnException.throwMesBusiException("客户零件号[%s]未绑定物料号数据,请检查数据!", split[packingDefine.getPartNoIndex() - 1]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return getPart(mesPackageDetail.getOrganizeCode(), partNo);
|
|
|
|
|