Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
5f566a3ede
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务请求方法
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -20,4 +20,9 @@
|
|||
<label>电力电子物料推送艾普MES</label>
|
||||
<clazz>nccloud.web.uapbd.material.action.MaterialPushToEpicMesAction</clazz>
|
||||
</action>
|
||||
<action>
|
||||
<name>uapbd.material.pushtowms</name>
|
||||
<label>电力电子物料推送富勒WMS</label>
|
||||
<clazz>nccloud.web.uapbd.material.action.MaterialPushToFLWMSAction</clazz>
|
||||
</action>
|
||||
</actions>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
<action>uapbd.material.pushtoqms</action>
|
||||
<action>uapbd.material.pushtojmqy</action>
|
||||
<action>uapbd.material.pushtodldzmes</action>
|
||||
<action>uapbd.material.pushtowms</action>
|
||||
</actions>
|
||||
</authorize>
|
||||
</authorizes>
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ public class ErpIaI2billFromGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
headJson.put("cpayfinorgvid", "C003");// 应付财务组织最新版本
|
||||
headJson.put("cpayfinorgoid", "C003");// 应付财务组织
|
||||
headJson.put("creator", "BIP");
|
||||
headJson.put("billmaker", MyHelper.getUserId((String) map.get("billmaker")));
|
||||
headJson.put("billmaker", map.get("billmaker"));
|
||||
if (map.get("dbilldate") != null && map.get("dbilldate") instanceof Timestamp dbilldate) {
|
||||
String dbilldateStr = DATETIME_FORMATTER.format(dbilldate);
|
||||
headJson.put("dbilldate", dbilldateStr); // 单据日期
|
||||
|
|
@ -130,7 +130,7 @@ public class ErpIaI2billFromGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
if (body.get("dbizdate") != null && body.get("dbizdate") instanceof Timestamp dbizdate) {
|
||||
String creationtimeStr = DATETIME_FORMATTER.format(dbizdate);
|
||||
bodyJson.put("dbizdate", creationtimeStr);
|
||||
}else{
|
||||
} else {
|
||||
bodyJson.put("dbizdate", "2025-12-01 20:42:24");
|
||||
}
|
||||
bodyJsonArr.add(bodyJson);
|
||||
|
|
|
|||
|
|
@ -73,6 +73,13 @@ public class MaterialOutGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
String csourcebillhid = detailList.get(0).get("vbdef16") + "";// 备料计划主键
|
||||
// 查询备料计划的VO
|
||||
AggPickmVO[] pickmVOS = queryService.queryBillsByPks(new String[]{csourcebillhid});
|
||||
if (MMValueCheck.isEmpty(pickmVOS)) {
|
||||
String updateSql = "update BIPOutMainTab set err_msg = '[err_msg]' where cgeneralhid = '[cgeneralhid]'";
|
||||
updateSql = updateSql.replace("[err_msg]", "备料计划未查询到,备料计划id:" + csourcebillhid);
|
||||
updateSql = updateSql.replace("[cgeneralhid]", cgeneralhid);
|
||||
GyImsDbUtil.update(updateSql);
|
||||
continue;
|
||||
}
|
||||
// 调用单据转换规则转换出流程材料出库的VO
|
||||
MaterialOutVO[] vos = (MaterialOutVO[]) PFPubService.runChangeData(MMBillType.PickMo.getCode(), ICBillType.MaterialOut.getCode(),
|
||||
pickmVOS, null, PfButtonClickContext.ClassifyByItfdef);
|
||||
|
|
|
|||
|
|
@ -75,6 +75,13 @@ public class ProductReportGyImsPlugin implements IBackgroundWorkPlugin {
|
|||
String vbdef22 = detailList.get(0).get("vbdef22") + "";// 流程生产订单主键
|
||||
// 查询流程生产订单的VO
|
||||
PMOAggVO[] pmoAggVOS = pmoQueryService.queryByPks(new String[]{vbdef22});
|
||||
if (MMValueCheck.isEmpty(pmoAggVOS)) {
|
||||
String updateSql = "update BIPReportMainTab set err_msg = '[err_msg]' where pk_wr = '[pkWr]'";
|
||||
updateSql = updateSql.replace("[err_msg]", "流程生产订单未查询到,流程生产订单主键:" + vbdef22);
|
||||
updateSql = updateSql.replace("[pkWr]", pkWr);
|
||||
GyImsDbUtil.update(updateSql);
|
||||
continue;
|
||||
}
|
||||
// 调用单据转换规则转换出流程生产报告的VO
|
||||
AggWrVO[] vos = (AggWrVO[]) PFPubService.runChangeData(MMBillType.ProduceOrder.getCode(), MMBillType.ProduceReport.getCode(),
|
||||
pmoAggVOS, null, PfButtonClickContext.ClassifyByItfdef);
|
||||
|
|
|
|||
Loading…
Reference in New Issue