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

uat-temp-wj-chongqingdaqu-dev
jason 4 months ago
commit e70c057aa3

@ -1024,6 +1024,27 @@ public class MesSortShippingCheckService implements IMesSortShippingCheckService
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());

@ -139,14 +139,18 @@ public class MesProductionRecordGenerateStepService extends BaseStepService {
if (workCenter.getCenterType().compareTo(MesExtEnumUtil.WORK_CENTER_TYPE.NOSORT.getValue()) == 0) {
//非排序
productionRecord.setReportType((null != prodRuleContext && !StringUtils.isEmpty(prodRuleContext.getReportType())) ? prodRuleContext.getReportType() : MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue());
productionRecord.setReportType((null != prodRuleContext && !StringUtils.isEmpty(prodRuleContext.getReportType()) && prodRuleContext.getReportType().compareTo(MesPcnExtConstWords.ZERO) != 0) ? prodRuleContext.getReportType() : MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue());
if (productionRecord.getReportType().compareTo(MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue()) != 0) productionRecord.setReportPartNo(productionPsOutContext.getPartNo());
productionRecord.setReportStatus(productionRecord.getReportType().compareTo(MesExtEnumUtil.NOSORT_REPORT_TYPE.NO_REPORT.getValue()) != 0 ? MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_10.getValue() : MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_30.getValue());
} else {
//排序
List<MesProductionAssemblySortContext> productionAssemblySortContextList = prodRuleContext.getSortAssemblyDataContext();
Optional<MesProductionAssemblySortContext> optional = CollectionUtils.isEmpty(productionAssemblySortContextList) ? null :
productionAssemblySortContextList.stream().filter(o -> (null != o && !StringUtils.isEmpty(o.getReportType()) && o.getReportType().compareTo(MesExtEnumUtil.MES_REPORT_TYPE.NO_REPORT.getValue()) != 0)).findFirst();
productionAssemblySortContextList.stream().filter(o -> (null != o
&& !StringUtils.isEmpty(o.getWorkCellCode()) && !StringUtils.isEmpty(o.getReportType())
&& o.getWorkCellCode().equals(reqBean.getWorkCellCode())
&& o.getReportType().compareTo(MesExtEnumUtil.MES_REPORT_TYPE.NO_REPORT.getValue()) != 0
&& o.getReportType().compareTo(MesPcnExtConstWords.ZERO) != 0)).findFirst();
if (null == optional || !optional.isPresent()) {
productionRecord.setReportType(MesExtEnumUtil.MES_REPORT_TYPE.NO_REPORT.getValue());
productionRecord.setReportStatus(MesExtEnumUtil.REPORT_STATUS.REPORT_STATUS_30.getValue());

Loading…
Cancel
Save