真空MES-流程生产订单-增加单据类型判断
This commit is contained in:
parent
1aac295eb6
commit
bf5c6aeb5a
|
|
@ -28,6 +28,7 @@ import java.net.URL;
|
|||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.zip.GZIPInputStream;
|
||||
|
||||
/**
|
||||
|
|
@ -122,13 +123,17 @@ public class AfterPmoSyncZkMesRule implements IRule<PMOAggVO> {
|
|||
|
||||
private void buildSyncDelData(PMOAggVO[] useVOs) throws BusinessException {
|
||||
for (PMOAggVO vo : useVOs) {
|
||||
PMOHeadVO headVO = vo.getParentVO();
|
||||
PMOItemVO[] itemVOS = vo.getChildrenVO();
|
||||
// 判断是否是真空公司,不是则跳过
|
||||
String pkOrg = vo.getParentVO().getPk_org();
|
||||
String pkOrg = headVO.getPk_org();
|
||||
String orgCode = MyHelper.transferField(OrgVO.getDefaultTableName(), OrgVO.CODE, OrgVO.PK_ORG, pkOrg);
|
||||
if (checkIfOrg(orgCode, configParams)) {
|
||||
continue;
|
||||
}
|
||||
PMOItemVO[] itemVOS = vo.getChildrenVO();
|
||||
// 判断单据类型,部分类型的生产订单推送
|
||||
String vtrantypecode = headVO.getVtrantypecode();
|
||||
if (!checkBillType(vtrantypecode)) continue;
|
||||
|
||||
// 组装数据
|
||||
JSONArray contentArray = new JSONArray();
|
||||
|
|
@ -186,6 +191,24 @@ public class AfterPmoSyncZkMesRule implements IRule<PMOAggVO> {
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断单据类型
|
||||
*
|
||||
* @param vtrantypecode 单据类型编码
|
||||
*/
|
||||
private boolean checkBillType(String vtrantypecode) {
|
||||
String typeCodeStr = configParams.get("pmoBillType");
|
||||
if (MMValueCheck.isNotEmpty(typeCodeStr)) {
|
||||
if (typeCodeStr.contains(",")) {
|
||||
Set<String> codeSet = Set.of(typeCodeStr.split(",", -1));
|
||||
return codeSet.contains(vtrantypecode);
|
||||
} else {
|
||||
return typeCodeStr.equals(vtrantypecode);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务请求方法
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue