Merge branch 'uat-temp-nht-2504100000-46214' into uat-temp-wj-chongqingdaqu-prod-temp-merge

uat-temp-wj-chongqingdaqu-prod-temp-merge yfai-pcn-ext-v3.6
jason 3 months ago
commit 2f9c19ee6b

@ -975,10 +975,31 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
if (StringUtil.isEmpty(detail.getVin())) {
MesPcnException.throwMesBusiException("发运单【%s】零件号【%s】vin号为空请检查数据", orderManagement.getShippingCode(), detail.getPartNo());
}
final boolean matchCfgValue = mesConfigService.checkCfgValueIsContainItem(orderManagement.getOrganizeCode(), MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, null, null, ",", orderManagement.getShippingGroupCode());
final boolean matchCfgValue = mesConfigService.checkCfgValueIsContainItem(orderManagement.getOrganizeCode(), MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, null, ",", orderManagement.getShippingGroupCode());
if (!matchCfgValue) {
return;
}
int limitValue = 0;
List<MesConfig> limitConfig = mesConfigService.getConfigList(orderManagement.getOrganizeCode(), MesPcnExtConstWords.MES_SHIPPING_QUEUE_SAVE_CFG, "LIMIT", null);
if (!CollectionUtils.isEmpty(limitConfig)) {
String strLimitValue = limitConfig.get(0).getCfgValue();
if (!StringUtil.isEmpty(strLimitValue)) {
try {
limitValue = Integer.parseInt(strLimitValue);
} catch (Exception ignored) {
}
}
}
if (limitValue > 0) {
DdlPackBean packBean = DdlPackBean.getDdlPackBean(orderManagement.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(orderManagement.getShippingGroupCode(), "shippingGroupCode", packBean);
DdlPreparedPack.getNumEqualPack(MesExtEnumUtil.QUEUE_ORDER_STATUS.CREATE.getValue(), "queueStatus", packBean);
int count = shippingQueueRDao.findByHqlWhereCount(packBean);
if (count >= limitValue) {
MesPcnException.throwMesBusiException("当前发运组【%s】的发运队列已满请稍后重试", orderManagement.getShippingGroupCode());
}
}
MesShippingQueue mesShippingQueue = new MesShippingQueue();
mesShippingQueue.setOrganizeCode(orderManagement.getOrganizeCode());

Loading…
Cancel
Save