Merge remote-tracking branch 'origin/uat-temp-nht-2505160000-46987' into mes-test

mes-test-batch-report-bug
王杰 2 months ago
commit 375ace3baa

@ -78,6 +78,13 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer
@Autowired
private IMesProductionRecordService mesProductionRecordService;
@Autowired
private MesCustomerPartRepository mesCustomerPartRDao;
@Autowired
private MesCustPartInvoicedRepository partInvoicedRao;
@Override
public ListPager<MesPackageDetail> queryMesPackageDetailByPager(MesPackage mesPackage, Pager pager) {
@ -618,6 +625,9 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer
}
private void checkOrganizeCode(MesPackageDetail mesPackageDetail, MesPackingDefine packingDefine, String[] split) {
if (Objects.equals(packingDefine.getCheckOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue())) {
return;
}
if (StringUtils.isEmpty(packingDefine.getOrganizeIndex()) || packingDefine.getOrganizeIndex() > split.length
|| StringUtils.isEmpty(split[packingDefine.getOrganizeIndex() - 1])) {
MesPcnException.throwMesBusiException("工厂所在位置不存在,请检查数据!");
@ -633,7 +643,27 @@ public class MesBoxingErrorProofingService implements IMesBoxingErrorProofingSer
|| StringUtils.isEmpty(split[packingDefine.getPartNoIndex() - 1])) {
MesPcnException.throwMesBusiException("物料号所在位置不存在,请检查数据!");
}
return getPart(mesPackageDetail.getOrganizeCode(), split[packingDefine.getPartNoIndex() - 1]);
String partNo = split[packingDefine.getPartNoIndex() - 1];
if (Objects.equals(packingDefine.getPackBarcodeCustPartNo(), CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue())) {
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();
}
if (StringUtils.isEmpty(partNo)) {
MesPcnException.throwMesBusiException("客户零件号[%s]未绑定物料号数据,请检查数据!", split[packingDefine.getPartNoIndex() - 1]);
}
}
return getPart(mesPackageDetail.getOrganizeCode(), partNo);
}
private MesPart getPart(String organizeCode, String partNo) {

Loading…
Cancel
Save