修复上料问题

uat-temp-nht-2506120000-jialiao
jason 4 weeks ago
parent 93a2743b15
commit 892e331ef2

@ -214,28 +214,29 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerTypeCode"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerTypeCode"},
new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerTypeCode()}); new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerTypeCode()});
if (containerType == null) { if (containerType == null) {
MesPcnException.throwMesBusiException("容器类型代码【%s】信息不存在,请检查容器类型主数据", containerSn.getContainerTypeCode()); MesPcnException.throwMesBusiException("容器类型代码[%s]信息不存在,请检查容器类型主数据", containerSn.getContainerTypeCode());
} }
model.setBindIsChoosePart(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue()); model.setBindIsChoosePart(CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
if (Objects.equals(containerType.getBindIsChoosePart(), CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue())) { if (Objects.equals(containerType.getBindIsChoosePart(), CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue())) {
List<MesContainerPartsModel> partsModelList = getContainerParts(model.getOrganizeCode(), containerType.getContainerTypeCode(), containerSn.getContainerSn()); List<MesContainerPartsModel> partsModelList = getContainerParts(model.getOrganizeCode(), containerType.getContainerTypeCode(), containerSn.getContainerSn());
if (CollectionUtils.isEmpty(partsModelList)) { if (CollectionUtils.isEmpty(partsModelList)) {
MesPcnException.throwMesBusiException("容器条码【%s】或容器类型代码【%s】未维护与容器关系,请检查数据", containerSn.getContainerSn(), containerType.getContainerTypeCode()); MesPcnException.throwMesBusiException("容器条码[%s]或容器类型代码[%s]未维护与容器关系,请检查数据", containerSn.getContainerSn(), containerType.getContainerTypeCode());
} }
if (partsModelList.size() > 1 && isEmptyBindSn(model.getOrganizeCode(), model.getContainerSn())) { if (partsModelList.size() > 1 && isEmptyBindSn(model.getOrganizeCode(), model.getContainerSn())) {
model.setContainerParts(partsModelList); model.setContainerParts(partsModelList);
model.setBindIsChoosePart(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()); model.setBindIsChoosePart(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
} }
} }
autoOpenContainerSn(model.getOrganizeCode(), containerSn.getContainerSn(), false, model.getUserName());
MesContainerPackage containerPackage = containerPackageRDao.getByProperty( MesContainerPackage containerPackage = containerPackageRDao.getByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerSn"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerSn"},
new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerSn()}); new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerSn()});
if (containerPackage != null) { if (containerPackage != null) {
List<MesContainerPackageDetail> packageDetails = containerPackageDetailRDao.findByProperty( List<MesContainerPackageDetail> packageDetails = containerPackageDetailRDao.findByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerSn"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "pid", "snStatus"},
new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerSn()}); new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerPackage.getId(), MesExtEnumUtil.CONTAINER_BARCODE_STATUS.STATUS_10.getValue()});
model.setPackageDetails(packageDetails); model.setPackageDetails(packageDetails);
} }
@ -283,7 +284,7 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerSn"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerSn"},
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), barcode}); new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), barcode});
if (containerPackage == null || !Objects.equals(containerPackage.getPackageStatus(),MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) { if (containerPackage == null || !Objects.equals(containerPackage.getPackageStatus(),MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) {
MesPcnException.throwMesBusiException("容器条码【%s】未关箱,不能进行上料操作!", barcode); MesPcnException.throwMesBusiException("容器条码[%s]未关箱,不能进行上料操作!", barcode);
} }
List<MesContainerPackageDetail> bottomPackageDetails = new ArrayList<>(); List<MesContainerPackageDetail> bottomPackageDetails = new ArrayList<>();
@ -350,6 +351,7 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
} }
// 容器置为拆箱状态。 // 容器置为拆箱状态。
containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_30.getValue()); containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_30.getValue());
containerPackageRDao.update(containerPackage);
} }
// 全部扣减完成 // 全部扣减完成
if (!deductionDetails.isEmpty() && deductionDetails.size() == bottomPackageDetails.size()) { if (!deductionDetails.isEmpty() && deductionDetails.size() == bottomPackageDetails.size()) {
@ -377,10 +379,10 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerTypeCode"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "containerTypeCode"},
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerTypeCode()}); new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerTypeCode()});
if (containerType == null) { if (containerType == null) {
MesPcnException.throwMesBusiException("容器类型代码【%s】信息不存在,请检查容器类型主数据", containerSn.getContainerTypeCode()); MesPcnException.throwMesBusiException("容器类型代码[%s]信息不存在,请检查容器类型主数据", containerSn.getContainerTypeCode());
} }
if (containerType.getMixType() == null) { if (containerType.getMixType() == null) {
MesPcnException.throwMesBusiException("容器类型代码【%s】未配置混包类型,请检查容器类型主数据", containerSn.getContainerTypeCode()); MesPcnException.throwMesBusiException("容器类型代码[%s]未配置混包类型,请检查容器类型主数据", containerSn.getContainerTypeCode());
} }
MesContainerPackage containerPackage = autoOpenContainerSn(organizeCode, containerSn.getContainerSn(), bStep, model.getUserName()); MesContainerPackage containerPackage = autoOpenContainerSn(organizeCode, containerSn.getContainerSn(), bStep, model.getUserName());
@ -390,16 +392,16 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
packageDetails = new ArrayList<>(); packageDetails = new ArrayList<>();
} else { } else {
if (Objects.equals(containerPackage.getPackageStatus(), MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) { if (Objects.equals(containerPackage.getPackageStatus(), MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) {
MesPcnException.throwMesBusiException("容器条码【%s】已关箱,不能再进行上料", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]已关箱,不能再进行上料", containerSn.getContainerSn());
} }
packageDetails = containerPackageDetailRDao.findByProperty( packageDetails = containerPackageDetailRDao.findByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "pid"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "pid", "snStatus"},
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerPackage.getId()}); new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerPackage.getId(), MesExtEnumUtil.CONTAINER_BARCODE_STATUS.STATUS_10.getValue()});
} }
MesContainerPackageDetail barcodePackageDetail = containerPackageDetailRDao.getByProperty(new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "barCode"}, MesContainerPackageDetail barcodePackageDetail = containerPackageDetailRDao.getByProperty(new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "barCode"},
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), model.getBarCode()}); new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), model.getBarCode()});
if (barcodePackageDetail != null) { if (barcodePackageDetail != null) {
MesPcnException.throwMesBusiException("条码【%s】已被容器【%s】绑定,请检查数据!", model.getBarCode(), barcodePackageDetail.getContainerSn()); MesPcnException.throwMesBusiException("条码[%s]已被容器[%s]绑定,请检查数据!", model.getBarCode(), barcodePackageDetail.getContainerSn());
} }
List<MesContainerPackageDetail> oldPackageDetails = new ArrayList<>(); List<MesContainerPackageDetail> oldPackageDetails = new ArrayList<>();
getBottomPackageDetails(organizeCode, containerPackage, oldPackageDetails); getBottomPackageDetails(organizeCode, containerPackage, oldPackageDetails);
@ -409,12 +411,12 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
MesContainerSn childContainerSn = containerSnService.getContainerSn(organizeCode, model.getBarCode()); MesContainerSn childContainerSn = containerSnService.getContainerSn(organizeCode, model.getBarCode());
if (childContainerSn != null) { if (childContainerSn != null) {
if (!Objects.equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), containerType.getIsAllowRecursion())) { if (!Objects.equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), containerType.getIsAllowRecursion())) {
MesPcnException.throwBusiException("容器条码【%s】不能绑定容器,请重新扫描!", containerSn.getContainerSn()); MesPcnException.throwBusiException("容器条码[%s]不能绑定容器,请重新扫描!", containerSn.getContainerSn());
} }
bottomPackageDetails = checkContainerBarcode(organizeCode, model.getBarCode(), oldPackageDetails); bottomPackageDetails = checkContainerBarcode(organizeCode, model.getBarCode(), oldPackageDetails);
} else { } else {
if (Objects.equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), containerType.getIsAllowRecursion())) { if (Objects.equals(CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue(), containerType.getIsAllowRecursion())) {
MesPcnException.throwBusiException("容器条码【%s】不能扫描原料条码,请重新扫描!", containerSn.getContainerSn()); MesPcnException.throwBusiException("容器条码[%s]不能扫描原料条码,请重新扫描!", containerSn.getContainerSn());
} }
bottomPackageDetails = new ArrayList<>(); bottomPackageDetails = new ArrayList<>();
} }
@ -485,11 +487,11 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn()); MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn());
MesContainerPackage containerPackage = getContainerPackage(model, containerSn); MesContainerPackage containerPackage = getContainerPackage(model, containerSn);
if (containerPackage == null) { if (containerPackage == null) {
MesPcnException.throwMesBusiException("容器条码【%s】未生成容器条码上料主表,请检查数据", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]未生成容器条码上料主表,请检查数据", containerSn.getContainerSn());
} }
List<MesContainerPackageDetail> packageDetails = getContainerPackageDetail(model, containerSn); List<MesContainerPackageDetail> packageDetails = getContainerPackageDetail(model, containerSn);
if (CollectionUtils.isEmpty(packageDetails)) { if (CollectionUtils.isEmpty(packageDetails)) {
MesPcnException.throwMesBusiException("容器条码【%s】不包含上料明细数据,请检查数据", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]不包含上料明细数据,请检查数据", containerSn.getContainerSn());
} }
DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode()); DdlPackBean ddlPackBean = DdlPackBean.getDdlPackBean(model.getOrganizeCode());
@ -515,7 +517,7 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn()); MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn());
MesContainerPackage containerPackage = getContainerPackage(model, containerSn); MesContainerPackage containerPackage = getContainerPackage(model, containerSn);
if (containerPackage == null) { if (containerPackage == null) {
MesPcnException.throwMesBusiException("容器条码【%s】未生成容器条码上料主表,请检查数据", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]未生成容器条码上料主表,请检查数据", containerSn.getContainerSn());
} }
List<Long> deleteDetailIds = new ArrayList<>(); List<Long> deleteDetailIds = new ArrayList<>();
for (MesContainerPackageDetail detail : model.getPackageDetails()) { for (MesContainerPackageDetail detail : model.getPackageDetails()) {
@ -540,10 +542,10 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn()); MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn());
MesContainerPackage containerPackage = getContainerPackage(model, containerSn); MesContainerPackage containerPackage = getContainerPackage(model, containerSn);
if (containerPackage == null) { if (containerPackage == null) {
MesPcnException.throwMesBusiException("容器条码【%s】未生成容器条码上料主表,请检查数据", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]未生成容器条码上料主表,请检查数据", containerSn.getContainerSn());
} }
if (Objects.equals(containerPackage.getPackageStatus(), MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) { if (Objects.equals(containerPackage.getPackageStatus(), MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) {
MesPcnException.throwMesBusiException("容器条码【%s】已关箱,请务重复操作!", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]已关箱,请务重复操作!", containerSn.getContainerSn());
} }
List<MesContainerPackageDetail> packageDetails = containerPackageDetailRDao.findByProperty( List<MesContainerPackageDetail> packageDetails = containerPackageDetailRDao.findByProperty(
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "pid"}, new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "pid"},
@ -567,15 +569,15 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn()); MesContainerSn containerSn = containerSnService.checkContainerSn(model.getOrganizeCode(), model.getContainerSn());
MesContainerPackage containerPackage = getContainerPackage(model, containerSn); MesContainerPackage containerPackage = getContainerPackage(model, containerSn);
if (containerPackage == null) { if (containerPackage == null) {
MesPcnException.throwMesBusiException("容器条码【%s】未生成容器条码上料主表,请检查数据", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]未生成容器条码上料主表,请检查数据", containerSn.getContainerSn());
} }
if (!Objects.equals(containerPackage.getPackageStatus(), MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) { if (!Objects.equals(containerPackage.getPackageStatus(), MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue())) {
MesPcnException.throwMesBusiException("容器条码【%s】未关箱,不能执行开箱操作!", containerSn.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]未关箱,不能执行开箱操作!", containerSn.getContainerSn());
} }
MesContainerPackageDetail packageDetail = containerPackageDetailRDao.getByProperty(new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "barCode"}, MesContainerPackageDetail packageDetail = containerPackageDetailRDao.getByProperty(new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "barCode"},
new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerSn()}); new Object[]{model.getOrganizeCode(), CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), containerSn.getContainerSn()});
if (packageDetail != null) { if (packageDetail != null) {
MesPcnException.throwMesBusiException("容器条码【%s】已被容器【%s】绑定,请先解绑再执行开箱操作!", containerSn.getContainerSn(), packageDetail.getContainerSn()); MesPcnException.throwMesBusiException("容器条码[%s]已被容器[%s]绑定,请先解绑再执行开箱操作!", containerSn.getContainerSn(), packageDetail.getContainerSn());
} }
containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_10.getValue()); containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_10.getValue());
@ -602,10 +604,10 @@ public class MesContainerSnBindServiceImpl implements IMesContainerSnBindService
} }
} }
if (model == null) { if (model == null) {
MesPcnException.throwMesBusiException("容器条码【%s】或容器类型代码【%s】未维护与零件关系,请检查数据", containerSn.getContainerSn(), containerSn.getContainerTypeCode()); MesPcnException.throwMesBusiException("容器条码[%s]或容器类型代码[%s]未维护与零件关系,请检查数据", containerSn.getContainerSn(), containerSn.getContainerTypeCode());
} }
if (!StringUtils.isEmpty(selectPartNo) && !Objects.equals(selectPartNo, model.getPartNo())) { if (!StringUtils.isEmpty(selectPartNo) && !Objects.equals(selectPartNo, model.getPartNo())) {
MesPcnException.throwMesBusiException("条码【%s】的零件号【%s】与选择的零件不匹配请检查数据", barCode, model.getPartNo()); MesPcnException.throwMesBusiException("条码[%s]的零件号【%s】与选择的零件不匹配请检查数据", barCode, model.getPartNo());
} }
return model; return model;

@ -37,10 +37,10 @@ public class MesContainerBindMixService extends MesAbstractContainerBindCheckQty
continue; continue;
} }
if (packageQty > containerPart.getQty()) { if (packageQty > containerPart.getQty()) {
result.put(MesPcnExtConstWords.MESSAGE, String.format("容器条码【%s】超出了包装规格", containerPackage.getContainerSn())); result.put(MesPcnExtConstWords.MESSAGE, String.format("容器条码[%s]超出了包装规格[%s]", containerPackage.getContainerSn(), containerPart.getQty()));
return result; return result;
} }
if (Objects.equals(packageQty, containerPart.getQty().intValue())) { if (packageQty == containerPart.getQty().intValue()) {
containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue()); containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue());
} }
} }

@ -31,7 +31,7 @@ public class MesContainerBindNotMixService extends MesAbstractContainerBindCheck
return result; return result;
} }
if (partNoSet.size() > 1) { if (partNoSet.size() > 1) {
result.put(MesPcnExtConstWords.MESSAGE, String.format("容器条码【%s】不允许混包!", containerPackage.getContainerSn())); result.put(MesPcnExtConstWords.MESSAGE, String.format("容器条码[%s]不允许混包!", containerPackage.getContainerSn()));
return result; return result;
} }
String partNo = partNoSet.iterator().next(); String partNo = partNoSet.iterator().next();
@ -41,10 +41,10 @@ public class MesContainerBindNotMixService extends MesAbstractContainerBindCheck
} }
if (packageQty > containerPart.getQty()) { if (packageQty > containerPart.getQty()) {
result.put(MesPcnExtConstWords.MESSAGE, String.format("容器条码【%s】超出了包装规格", containerPackage.getContainerSn())); result.put(MesPcnExtConstWords.MESSAGE, String.format("容器条码[%s]超出了包装规格[%s]", containerPackage.getContainerSn(), containerPart.getQty()));
return result; return result;
} }
if (Objects.equals(packageQty, containerPart.getQty().intValue())) { if (packageQty == containerPart.getQty().intValue()) {
containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue()); containerPackage.setPackageStatus(MesExtEnumUtil.CONTAINER_PACKAGE_STATUS.STATUS_20.getValue());
} }
} }

Loading…
Cancel
Save