|
|
@ -45,10 +45,6 @@ public class MesContainerBindPackageSnService extends MesAbstractContainerBindDi
|
|
|
|
result.put(MesPcnExtConstWords.MESSAGE, String.format("自制件箱码【%s】格式不对, 请检查数据!", barcode));
|
|
|
|
result.put(MesPcnExtConstWords.MESSAGE, String.format("自制件箱码【%s】格式不对, 请检查数据!", barcode));
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String barOrganizeCode = splitBarcode[2];
|
|
|
|
|
|
|
|
if (!Objects.equals(barOrganizeCode, organizeCode)) {
|
|
|
|
|
|
|
|
MesPcnException.throwMesBusiException("自制件箱码【%s】的工厂代码【%s】与当前工厂不匹配, 请检查数据!", barcode, barOrganizeCode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String partNo = splitBarcode[3];
|
|
|
|
String partNo = splitBarcode[3];
|
|
|
|
MesPart mesPart = mesPartRDao.getByProperty(
|
|
|
|
MesPart mesPart = mesPartRDao.getByProperty(
|
|
|
@ -61,23 +57,11 @@ public class MesContainerBindPackageSnService extends MesAbstractContainerBindDi
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
String barProductSn = splitBarcode[1];
|
|
|
|
String barOrganizeCode = splitBarcode[2];
|
|
|
|
MesProduceSn produceSn = produceSnRDao.getByProperty(
|
|
|
|
if (!Objects.equals(barOrganizeCode, organizeCode)) {
|
|
|
|
new String[]{MesPcnExtConstWords.ORGANIZE_CODE, MesPcnExtConstWords.IS_DELETED, MesPcnExtConstWords.IS_VALID, "productSn"},
|
|
|
|
MesPcnException.throwMesBusiException("自制件箱码【%s】的工厂代码【%s】与当前工厂不匹配, 请检查数据!", barcode, barOrganizeCode);
|
|
|
|
new Object[]{organizeCode, CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue(), CommonEnumUtil.IS_VAILD.VAILD.getValue(), barProductSn});
|
|
|
|
|
|
|
|
if (produceSn == null) {
|
|
|
|
|
|
|
|
MesPcnException.throwMesBusiException("自制件箱码【%s】的条码【%s】在条码表不存在, 请检查数据!", barcode, barProductSn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Objects.equals(produceSn.getSnStatus(), MesExtEnumUtil.PRODUCE_SN_STATUS.CREATE.getValue()) &&
|
|
|
|
|
|
|
|
!Objects.equals(produceSn.getSnStatus(), MesExtEnumUtil.PRODUCE_SN_STATUS.OFFLINE.getValue())) {
|
|
|
|
|
|
|
|
MesPcnException.throwMesBusiException("扫描条码【%s】的条码状态必须为“创建”或“已完成”, 请检查数据!", barcode);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!Objects.equals(produceSn.getQcStatus(), MesExtEnumUtil.PRODUCE_QC_STATUS.QUALIFIED.getValue()) &&
|
|
|
|
|
|
|
|
!Objects.equals(produceSn.getQcStatus(), MesExtEnumUtil.PRODUCE_QC_STATUS.SUSPICIOUS_TO_QUALIFIED.getValue())) {
|
|
|
|
|
|
|
|
MesPcnException.throwMesBusiException("扫描条码【%s】的质量状态必须为“合格”或“可疑转正常”, 请检查数据!", barcode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String barQty = splitBarcode[4];
|
|
|
|
String barQty = splitBarcode[4];
|
|
|
|
if (StringUtils.isEmpty(barQty)) {
|
|
|
|
if (StringUtils.isEmpty(barQty)) {
|
|
|
|
MesPcnException.throwMesBusiException("自制件箱码【%s】的数量为空, 请检查数据!", barcode);
|
|
|
|
MesPcnException.throwMesBusiException("自制件箱码【%s】的数量为空, 请检查数据!", barcode);
|
|
|
|