From e3de30c57a6ed6ac4ca6bf71fe6bf04d259366be Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Mon, 15 Dec 2025 11:23:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=85=B6=E4=BB=96=E5=87=BA=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E7=9B=98=E7=9B=88=E7=9B=98=E4=BA=8F=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=B3=9B=E5=BE=AE=E3=80=91=E5=A2=9E=E5=8A=A0=E7=9B=98=E7=9B=88?= =?UTF-8?q?=E5=85=A5=E5=BA=93=EF=BC=8C=E7=9B=98=E4=BA=8F=E5=87=BA=E5=BA=93?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E6=B3=9B=E5=BE=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../operate/im/OtherInApplySubmitToFwOp.java | 60 +++++++++++++++++++ .../operate/im/OtherInSubmitToFwOp.java | 15 ++--- .../operate/im/OtherOutApplySubmitToFwOp.java | 59 ++++++++++++++++++ .../operate/im/OtherOutSubmitToFwOp.java | 15 +++-- 4 files changed, 132 insertions(+), 17 deletions(-) create mode 100644 lc123/cloud/app/plugin/operate/im/OtherInApplySubmitToFwOp.java create mode 100644 lc123/cloud/app/plugin/operate/im/OtherOutApplySubmitToFwOp.java diff --git a/lc123/cloud/app/plugin/operate/im/OtherInApplySubmitToFwOp.java b/lc123/cloud/app/plugin/operate/im/OtherInApplySubmitToFwOp.java new file mode 100644 index 0000000..f720d49 --- /dev/null +++ b/lc123/cloud/app/plugin/operate/im/OtherInApplySubmitToFwOp.java @@ -0,0 +1,60 @@ +package tqq9.lc123.cloud.app.plugin.operate.im; + +import com.alibaba.fastjson.JSONObject; +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.entity.operate.result.OperationResult; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.AfterOperationArgs; +import kd.bos.servicehelper.BusinessDataServiceHelper; +import kd.bos.servicehelper.operation.SaveServiceHelper; +import org.apache.commons.lang3.StringUtils; +import tqq9.lc123.cloud.app.plugin.trd.FWImpl; + +import java.util.List; + +/** + * 其他入库申请单提交泛微 + */ +public class OtherInApplySubmitToFwOp extends AbstractOperationServicePlugIn { + + @Override + public void afterExecuteOperationTransaction(AfterOperationArgs e) { + super.afterExecuteOperationTransaction(e); + OperationResult operationResult = this.getOperationResult(); + List successPkIds = operationResult.getSuccessPkIds(); + for (Object successPkId : successPkIds) { + DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "tqq9_otherinapply"); + DynamicObject tqq9_biztype = bill.getDynamicObject("biztype"); + if (tqq9_biztype != null) { + //调拨入库不推送泛微 + String biztypenumber = tqq9_biztype.getString("number"); + if ("605".equals(biztypenumber)) { + continue; + } + } + String resultStr = FWImpl.pushFwOtherInApply(bill); + if (StringUtils.isNotBlank(resultStr)) { + JSONObject resultObj = JSONObject.parseObject(resultStr); + String code = resultObj.getString("code"); + if ("SUCCESS".equals(code)) { + JSONObject data = resultObj.getJSONObject("data"); + if (data != null) { + String requestid = data.getString("requestid"); + bill.set("tqq9_fwrequestid", requestid); + bill.set("tqq9_fwstate", "B"); + SaveServiceHelper.save(new DynamicObject[]{bill}); + } + String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid"); + if (StringUtils.isNotBlank(tqq9_fwrequestid)) {//驳回后提交修改泛微审批状态 + bill.set("tqq9_fwstate", "B"); + SaveServiceHelper.save(new DynamicObject[]{bill}); + } + } + } + } + + + } + + +} diff --git a/lc123/cloud/app/plugin/operate/im/OtherInSubmitToFwOp.java b/lc123/cloud/app/plugin/operate/im/OtherInSubmitToFwOp.java index a74c462..7960437 100644 --- a/lc123/cloud/app/plugin/operate/im/OtherInSubmitToFwOp.java +++ b/lc123/cloud/app/plugin/operate/im/OtherInSubmitToFwOp.java @@ -13,7 +13,8 @@ import tqq9.lc123.cloud.app.plugin.trd.FWImpl; import java.util.List; /** - * 其他入库申请单提交泛微 + * 其他入库单提交推送泛微 + * 只推盘盈 */ public class OtherInSubmitToFwOp extends AbstractOperationServicePlugIn { @@ -23,16 +24,16 @@ public class OtherInSubmitToFwOp extends AbstractOperationServicePlugIn { OperationResult operationResult = this.getOperationResult(); List successPkIds = operationResult.getSuccessPkIds(); for (Object successPkId : successPkIds) { - DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "tqq9_otherinapply"); + DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "im_otherinbill"); DynamicObject tqq9_biztype = bill.getDynamicObject("biztype"); if (tqq9_biztype != null) { - //调拨入库不推送泛微 + //推送泛微盘盈 String biztypenumber = tqq9_biztype.getString("number"); - if ("605".equals(biztypenumber)) { + if (!"350".equals(biztypenumber)) { continue; } } - String resultStr = FWImpl.pushFwOtherInApply(bill); + String resultStr = FWImpl.pushFwOtherIn(bill); if (StringUtils.isNotBlank(resultStr)) { JSONObject resultObj = JSONObject.parseObject(resultStr); String code = resultObj.getString("code"); @@ -52,9 +53,5 @@ public class OtherInSubmitToFwOp extends AbstractOperationServicePlugIn { } } } - - } - - } diff --git a/lc123/cloud/app/plugin/operate/im/OtherOutApplySubmitToFwOp.java b/lc123/cloud/app/plugin/operate/im/OtherOutApplySubmitToFwOp.java new file mode 100644 index 0000000..84e4757 --- /dev/null +++ b/lc123/cloud/app/plugin/operate/im/OtherOutApplySubmitToFwOp.java @@ -0,0 +1,59 @@ +package tqq9.lc123.cloud.app.plugin.operate.im; + +import com.alibaba.fastjson.JSONObject; +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.entity.operate.result.OperationResult; +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.AfterOperationArgs; +import kd.bos.servicehelper.BusinessDataServiceHelper; +import kd.bos.servicehelper.operation.SaveServiceHelper; +import org.apache.commons.lang3.StringUtils; +import tqq9.lc123.cloud.app.plugin.trd.FWImpl; + +import java.util.List; + +/** + * 其他出库申请单提交泛微 + */ +public class OtherOutApplySubmitToFwOp extends AbstractOperationServicePlugIn { + + + @Override + public void afterExecuteOperationTransaction(AfterOperationArgs e) { + super.afterExecuteOperationTransaction(e); + OperationResult operationResult = this.getOperationResult(); + List successPkIds = operationResult.getSuccessPkIds(); + for (Object successPkId : successPkIds) { + DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "tqq9_otheroutapply"); + DynamicObject tqq9_biztype = bill.getDynamicObject("tqq9_biztype"); + if(tqq9_biztype != null){ + //样品 礼品 拍照 展会 四类不推泛微 + String biztypenumber = tqq9_biztype.getString("number"); + if("613".equals(biztypenumber) || "614".equals(biztypenumber) ||"615".equals(biztypenumber) ||"616".equals(biztypenumber)){ + continue; + } + } + String resultStr = FWImpl.pushFwOtherOutApply(bill); + if(StringUtils.isNotBlank(resultStr)){ + JSONObject resultObj = JSONObject.parseObject(resultStr); + String code = resultObj.getString("code"); + if("SUCCESS".equals(code)){ + JSONObject data = resultObj.getJSONObject("data"); + if(data != null){ + String requestid = data.getString("requestid"); + bill.set("tqq9_fwrequestid", requestid); + bill.set("tqq9_fwstate", "B"); + SaveServiceHelper.save(new DynamicObject[]{bill}); + } + String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid"); + if (StringUtils.isNotBlank(tqq9_fwrequestid)) {//驳回后提交修改泛微审批状态 + bill.set("tqq9_fwstate", "B"); + SaveServiceHelper.save(new DynamicObject[]{bill}); + } + } + } + } + } + + +} diff --git a/lc123/cloud/app/plugin/operate/im/OtherOutSubmitToFwOp.java b/lc123/cloud/app/plugin/operate/im/OtherOutSubmitToFwOp.java index bfc0301..ccc4416 100644 --- a/lc123/cloud/app/plugin/operate/im/OtherOutSubmitToFwOp.java +++ b/lc123/cloud/app/plugin/operate/im/OtherOutSubmitToFwOp.java @@ -13,7 +13,8 @@ import tqq9.lc123.cloud.app.plugin.trd.FWImpl; import java.util.List; /** - * 其他出库申请单提交泛微 + * 其他出库单推送泛微 + * 只推盘亏 */ public class OtherOutSubmitToFwOp extends AbstractOperationServicePlugIn { @@ -24,16 +25,16 @@ public class OtherOutSubmitToFwOp extends AbstractOperationServicePlugIn { OperationResult operationResult = this.getOperationResult(); List successPkIds = operationResult.getSuccessPkIds(); for (Object successPkId : successPkIds) { - DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "tqq9_otheroutapply"); - DynamicObject tqq9_biztype = bill.getDynamicObject("tqq9_biztype"); + DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "im_otheroutbill"); + DynamicObject tqq9_biztype = bill.getDynamicObject("biztype"); if(tqq9_biztype != null){ - //样品 礼品 拍照 展会 四类不推泛微 + //推泛微盘亏 String biztypenumber = tqq9_biztype.getString("number"); - if("613".equals(biztypenumber) || "614".equals(biztypenumber) ||"615".equals(biztypenumber) ||"616".equals(biztypenumber)){ + if("351".equals(biztypenumber)){ continue; } } - String resultStr = FWImpl.pushFwOtherOutApply(bill); + String resultStr = FWImpl.pushFwOtherOut(bill); if(StringUtils.isNotBlank(resultStr)){ JSONObject resultObj = JSONObject.parseObject(resultStr); String code = resultObj.getString("code"); @@ -54,6 +55,4 @@ public class OtherOutSubmitToFwOp extends AbstractOperationServicePlugIn { } } } - - }