使用库存组织或销售组织编码为C034的组织判断
This commit is contained in:
parent
4f1f592f7d
commit
57be63bfa4
|
@ -14,6 +14,7 @@ import nc.vo.bd.supplier.SupplierVO;
|
|||
import nc.vo.ic.m45.entity.PurchaseInBodyVO;
|
||||
import nc.vo.ic.m45.entity.PurchaseInHeadVO;
|
||||
import nc.vo.ic.m45.entity.PurchaseInVO;
|
||||
import nc.vo.org.StockOrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDate;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
|
@ -131,12 +132,22 @@ public class AfterSigningSynchronizeRuleMES implements IRule<PurchaseInVO> {
|
|||
/**
|
||||
* 检查并筛选需要同步的单据
|
||||
*/
|
||||
private List<PurchaseInVO> checkAndFilterBills(PurchaseInVO[] purchaseInVOS) throws BusinessException {
|
||||
private List<PurchaseInVO> checkAndFilterBills(PurchaseInVO[] purchaseInVOS) {
|
||||
List<PurchaseInVO> result = new ArrayList<>();
|
||||
for (PurchaseInVO vo : purchaseInVOS) {
|
||||
// 检查组织是否为电缆组织
|
||||
if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
result.add(vo);
|
||||
// if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
// result.add(vo);
|
||||
// }
|
||||
|
||||
try {
|
||||
String targetCode = "C034";
|
||||
String code = transferCodeByPk(StockOrgVO.getDefaultTableName(), StockOrgVO.CODE, StockOrgVO.PK_STOCKORG, vo.getParentVO().getPk_org());
|
||||
if (code != null && code.equals(targetCode)) {
|
||||
result.add(vo);
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappBusinessException("²éѯ×é֯ʱ·¢Éú´íÎó");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -16,6 +16,7 @@ import nc.vo.cmp.util.StringUtils;
|
|||
import nc.vo.ic.m45.entity.PurchaseInVO;
|
||||
import nc.vo.ic.m45.entity.PurchaseInBodyVO;
|
||||
import nc.vo.ic.m45.entity.PurchaseInHeadVO;
|
||||
import nc.vo.org.StockOrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDate;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
|
@ -124,12 +125,22 @@ public class PurchaseReceiptRuleMES implements IRule<PurchaseInVO> {
|
|||
/**
|
||||
* 检查并筛选需要同步的单据
|
||||
*/
|
||||
private List<PurchaseInVO> checkAndFilterBills(PurchaseInVO[] purchaseInVOS) throws BusinessException {
|
||||
private List<PurchaseInVO> checkAndFilterBills(PurchaseInVO[] purchaseInVOS) {
|
||||
List<PurchaseInVO> result = new ArrayList<>();
|
||||
for (PurchaseInVO vo : purchaseInVOS) {
|
||||
// 检查组织是否为电缆组织
|
||||
if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
result.add(vo);
|
||||
// if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
// result.add(vo);
|
||||
// }
|
||||
|
||||
try {
|
||||
String targetCode = "C034";
|
||||
String code = transferCodeByPk(StockOrgVO.getDefaultTableName(), StockOrgVO.CODE, StockOrgVO.PK_STOCKORG, vo.getParentVO().getPk_org());
|
||||
if (code != null && code.equals(targetCode)) {
|
||||
result.add(vo);
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappBusinessException("²éѯ×é֯ʱ·¢Éú´íÎó");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -21,6 +21,8 @@ import nc.vo.ic.m4c.entity.SaleOutBodyVO;
|
|||
import nc.vo.ic.m4c.entity.SaleOutHeadVO;
|
||||
import nc.vo.ic.m4c.entity.SaleOutVO;
|
||||
import nc.vo.org.DeptVO;
|
||||
import nc.vo.org.SalesOrgVO;
|
||||
import nc.vo.org.StockOrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDate;
|
||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||
|
@ -186,12 +188,21 @@ public class AfterSigningSynchronizeRuleMES implements IRule<SaleOutVO> {
|
|||
/**
|
||||
* 检查并筛选需要同步的单据
|
||||
*/
|
||||
private List<SaleOutVO> checkAndFilterBills(SaleOutVO[] saleOutVOS) throws BusinessException {
|
||||
private List<SaleOutVO> checkAndFilterBills(SaleOutVO[] saleOutVOS) {
|
||||
List<SaleOutVO> result = new ArrayList<>();
|
||||
for (SaleOutVO vo : saleOutVOS) {
|
||||
// 检查组织是否为电缆组织
|
||||
if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
result.add(vo);
|
||||
// if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
// result.add(vo);
|
||||
// }
|
||||
try {
|
||||
String targetCode = "C034";
|
||||
String code = transferCodeByPk(StockOrgVO.getDefaultTableName(), StockOrgVO.CODE, StockOrgVO.PK_STOCKORG, vo.getParentVO().getPk_org());
|
||||
if (code != null && code.equals(targetCode)) {
|
||||
result.add(vo);
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappBusinessException("²éѯ×é֯ʱ·¢Éú´íÎó");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -17,6 +17,7 @@ import nc.vo.ic.m45.entity.PurchaseInVO;
|
|||
import nc.vo.ic.m4c.entity.SaleOutBodyVO;
|
||||
import nc.vo.ic.m4c.entity.SaleOutHeadVO;
|
||||
import nc.vo.ic.m4c.entity.SaleOutVO;
|
||||
import nc.vo.org.StockOrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
|
||||
import nc.vo.pubapp.pattern.pub.SqlBuilder;
|
||||
|
@ -231,12 +232,21 @@ public class SalesDeliveryOrderRuleMES implements IRule<SaleOutVO> {
|
|||
/**
|
||||
* 检查并筛选需要同步的单据
|
||||
*/
|
||||
private List<SaleOutVO> checkAndFilterBills(SaleOutVO[] saleOutVOS) throws BusinessException {
|
||||
private List<SaleOutVO> checkAndFilterBills(SaleOutVO[] saleOutVOS) {
|
||||
List<SaleOutVO> result = new ArrayList<>();
|
||||
for (SaleOutVO vo : saleOutVOS) {
|
||||
// 检查组织是否为电缆组织
|
||||
if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
result.add(vo);
|
||||
// if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
// result.add(vo);
|
||||
// }
|
||||
try {
|
||||
String targetCode = "C034";
|
||||
String code = transferCodeByPk(StockOrgVO.getDefaultTableName(), StockOrgVO.CODE, StockOrgVO.PK_STOCKORG, vo.getParentVO().getPk_org());
|
||||
if (code != null && code.equals(targetCode)) {
|
||||
result.add(vo);
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappBusinessException("²éѯ×é֯ʱ·¢Éú´íÎó");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -16,6 +16,7 @@ import nc.vo.bd.supplier.SupplierVO;
|
|||
import nc.vo.ic.m4r.entity.InvCountBillVO;
|
||||
import nc.vo.ic.m4r.entity.InvCountBodyVO;
|
||||
import nc.vo.ic.m4r.entity.InvCountHeaderVO;
|
||||
import nc.vo.org.StockOrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.lang.UFDate;
|
||||
import nc.vo.pub.lang.UFDouble;
|
||||
|
@ -73,12 +74,21 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<InvCountBillVO> {
|
|||
/**
|
||||
* 检查并筛选需要同步的单据
|
||||
*/
|
||||
private List<InvCountBillVO> checkAndFilterBills(InvCountBillVO[] invCountBillVOS) throws BusinessException {
|
||||
private List<InvCountBillVO> checkAndFilterBills(InvCountBillVO[] invCountBillVOS) {
|
||||
List<InvCountBillVO> result = new ArrayList<>();
|
||||
for (InvCountBillVO vo : invCountBillVOS) {
|
||||
// 检查组织是否为电缆组织
|
||||
if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
result.add(vo);
|
||||
// if (vo.getHead() != null && "0001A110000000000677".equals(vo.getHead().getPk_org())) {
|
||||
// result.add(vo);
|
||||
// }
|
||||
try {
|
||||
String targetCode = "C034";
|
||||
String code = transferCodeByPk(StockOrgVO.getDefaultTableName(), StockOrgVO.CODE, StockOrgVO.PK_STOCKORG, vo.getParentVO().getPk_org());
|
||||
if (code != null && code.equals(targetCode)) {
|
||||
result.add(vo);
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappBusinessException("²éѯ×é֯ʱ·¢Éú´íÎó");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
|
@ -13,6 +13,7 @@ import nc.vo.bd.cust.CustomerVO;
|
|||
import nc.vo.bd.material.MaterialVO;
|
||||
import nc.vo.bd.material.measdoc.MeasdocVO;
|
||||
import nc.vo.bd.psn.PsndocVO;
|
||||
import nc.vo.org.SalesOrgVO;
|
||||
import nc.vo.pub.BusinessException;
|
||||
import nc.vo.pub.billtype.BilltypeVO;
|
||||
import nc.vo.pub.lang.UFDate;
|
||||
|
@ -214,8 +215,17 @@ public class AfterApprovingSynchronizeRuleMES implements IRule<SaleOrderVO> {
|
|||
List<SaleOrderVO> result = new ArrayList<>();
|
||||
for (SaleOrderVO vo : saleOutVOS) {
|
||||
// 检查组织是否为电缆组织
|
||||
if (vo.getParentVO().getPk_org() != null && "0001A110000000000677".equals(vo.getParentVO().getPk_org())) {
|
||||
result.add(vo);
|
||||
// if (vo.getParentVO().getPk_org() != null && "0001A110000000000677".equals(vo.getParentVO().getPk_org())) {
|
||||
// result.add(vo);
|
||||
// }
|
||||
try {
|
||||
String targetCode = "C034";
|
||||
String code = transferCodeByPk(SalesOrgVO.getDefaultTableName(), SalesOrgVO.CODE, SalesOrgVO.PK_SALESORG, vo.getParentVO().getPk_org());
|
||||
if (code != null && code.equals(targetCode)) {
|
||||
result.add(vo);
|
||||
}
|
||||
} catch (BusinessException e) {
|
||||
ExceptionUtils.wrappBusinessException("²éѯ×é֯ʱ³öÏÖÎÊÌâ");
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue