期初流程生产订单不填充序列号-增加组织判断
This commit is contained in:
parent
ffd6b82aed
commit
5f2d4be2cb
|
|
@ -5,10 +5,10 @@
|
||||||
|
|
||||||
package nc.bs.mmpac.pmo.pac0002.rule.fill;
|
package nc.bs.mmpac.pmo.pac0002.rule.fill;
|
||||||
|
|
||||||
import java.util.*;
|
|
||||||
|
|
||||||
import nc.bs.framework.common.NCLocator;
|
import nc.bs.framework.common.NCLocator;
|
||||||
|
import nc.bs.logging.Logger;
|
||||||
import nc.bs.mmpac.pmo.pac0002.bp.service.PMOSNServiceAdapter;
|
import nc.bs.mmpac.pmo.pac0002.bp.service.PMOSNServiceAdapter;
|
||||||
|
import nc.bs.uapbd.util.MyHelper;
|
||||||
import nc.impl.pubapp.pattern.rule.IRule;
|
import nc.impl.pubapp.pattern.rule.IRule;
|
||||||
import nc.pubitf.mmpac.pmo.adapter.PMOMaterlAdapter;
|
import nc.pubitf.mmpac.pmo.adapter.PMOMaterlAdapter;
|
||||||
import nc.pubitf.sn.doc.ISnService;
|
import nc.pubitf.sn.doc.ISnService;
|
||||||
|
|
@ -29,10 +29,13 @@ import nc.vo.mmpac.pmo.pac0002.enumeration.PMOSnsrcEnum;
|
||||||
import nc.vo.mmpac.pmo.pac0002.util.PMOModuleUtil;
|
import nc.vo.mmpac.pmo.pac0002.util.PMOModuleUtil;
|
||||||
import nc.vo.mmpac.pmo.pac0002.util.PMOSNUtil;
|
import nc.vo.mmpac.pmo.pac0002.util.PMOSNUtil;
|
||||||
import nc.vo.mmpac.pmo.parameter.PMOMaterlKey;
|
import nc.vo.mmpac.pmo.parameter.PMOMaterlKey;
|
||||||
|
import nc.vo.org.OrgVO;
|
||||||
import nc.vo.pub.BusinessException;
|
import nc.vo.pub.BusinessException;
|
||||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||||
import nc.vo.sn.doc.entity.SerialNoVO;
|
import nc.vo.sn.doc.entity.SerialNoVO;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public class PMOFillSNPkAndCodeRule implements IRule<PMOAggVO> {
|
public class PMOFillSNPkAndCodeRule implements IRule<PMOAggVO> {
|
||||||
public PMOFillSNPkAndCodeRule() {
|
public PMOFillSNPkAndCodeRule() {
|
||||||
}
|
}
|
||||||
|
|
@ -202,6 +205,10 @@ public class PMOFillSNPkAndCodeRule implements IRule<PMOAggVO> {
|
||||||
PMOHeadVO headVO = aggvo.getParentVO();
|
PMOHeadVO headVO = aggvo.getParentVO();
|
||||||
String pkOrg = headVO.getPk_org();
|
String pkOrg = headVO.getPk_org();
|
||||||
if (MMValueCheck.isNotEmpty(pkOrg)) {
|
if (MMValueCheck.isNotEmpty(pkOrg)) {
|
||||||
|
try {
|
||||||
|
String orgCode = MyHelper.transferField(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pkOrg);
|
||||||
|
Map<String, String> configParams = MyHelper.getConfigParams("Dldz-config", null);
|
||||||
|
if (!MyHelper.checkIfDldzOrg(orgCode, configParams)) {
|
||||||
// ½»Ò×ÀàÐͱàÂë
|
// ½»Ò×ÀàÐͱàÂë
|
||||||
String vtrantypecode = headVO.getVtrantypecode();
|
String vtrantypecode = headVO.getVtrantypecode();
|
||||||
Set<String> billTypeCodes = Set.of(
|
Set<String> billTypeCodes = Set.of(
|
||||||
|
|
@ -212,6 +219,10 @@ public class PMOFillSNPkAndCodeRule implements IRule<PMOAggVO> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
Logger.error("fillPMOGrandSNVoValues-exp = " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
for (PMOItemVO itemvo : aggvo.getChildrenVO()) {
|
for (PMOItemVO itemvo : aggvo.getChildrenVO()) {
|
||||||
if (MMValueCheck.isNotEmpty(itemvo.getSerialnos())) {
|
if (MMValueCheck.isNotEmpty(itemvo.getSerialnos())) {
|
||||||
for (PMOSerialNoVO snvo : itemvo.getSerialnos()) {
|
for (PMOSerialNoVO snvo : itemvo.getSerialnos()) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue