From 1186079993a07182bf3a74c3df27001fe39ad2d5 Mon Sep 17 00:00:00 2001 From: "tanfengling@x-ri.com" <123456> Date: Fri, 31 Oct 2025 18:41:46 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=B3=9B=E5=BE=AE=E7=89=A9=E6=96=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=B5=81=E7=A8=8B]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc123/cloud/app/plugin/trd/FWImpl.java | 67 +++++++------------ .../app/plugin/utils/FWRestfulUtils.java | 4 +- 2 files changed, 27 insertions(+), 44 deletions(-) diff --git a/lc123/cloud/app/plugin/trd/FWImpl.java b/lc123/cloud/app/plugin/trd/FWImpl.java index 4423da6..4ca55c5 100644 --- a/lc123/cloud/app/plugin/trd/FWImpl.java +++ b/lc123/cloud/app/plugin/trd/FWImpl.java @@ -496,7 +496,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCGDD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, cjr); } @@ -800,7 +800,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCRKD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "入库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "入库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, sqr); } @@ -1202,7 +1202,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_XZCRKD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "出库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "出库单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid,sqr); } @@ -1505,7 +1505,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_FKSQD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "付款申请单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "付款申请单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, cjr); } @@ -1952,7 +1952,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_BGCGD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "变更采购单流程", fw_wfid_xzcgdd, lcbh, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "变更采购单流程", fw_wfid_xzcgdd, lcbh, tqq9_fwrequestid, cjr); } @@ -2140,7 +2140,7 @@ public class FWImpl { FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购退货申请流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购退货申请流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, cjr); } @@ -2588,7 +2588,7 @@ public class FWImpl { FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购合同流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购合同流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, cjr); } @@ -3072,7 +3072,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_CGHTBG"); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购合同变更流程", fw_wfid_xzcgdd, lcbh, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购合同变更流程", fw_wfid_xzcgdd, lcbh, tqq9_fwrequestid, cjr); } @@ -3392,7 +3392,7 @@ public class FWImpl { String fw_wfid_zgyfd = ConfigUtils.getThirdConfigByNumber("FW_WFID_ZGYFD"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购费用申请流程", fw_wfid_zgyfd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "采购费用申请流程", fw_wfid_zgyfd, billno, tqq9_fwrequestid, sqr); } @@ -3709,7 +3709,7 @@ public class FWImpl { String fw_wfid_pdb = ConfigUtils.getThirdConfigByNumber("FW_WFID_PDB"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "盘点结果确认审批流程", fw_wfid_pdb, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "盘点结果确认审批流程", fw_wfid_pdb, billno, tqq9_fwrequestid, sqr); } @@ -3937,7 +3937,7 @@ public class FWImpl { String fw_wfid_xzcgdd = ConfigUtils.getThirdConfigByNumber("FW_WFID_CGDQ"); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "短缺处理单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, "短缺处理单流程", fw_wfid_xzcgdd, billno, tqq9_fwrequestid, cjr); } @@ -4670,7 +4670,7 @@ public class FWImpl { //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); - return fwRestfulUtils.doBillAction(mainArr, detailRootArr, requestName, wfID, gysbh, requestid); + return fwRestfulUtils.doBillAction(mainArr, detailRootArr, requestName, wfID, gysbh, requestid, cjr); } @@ -4810,12 +4810,11 @@ public class FWImpl { }else if("1".equals(tqq9_ccystj)){ ccystj = "2"; } - String xxs = null; + BigDecimal xxs = null; DynamicObject taxrate = bill.getDynamicObject("taxrate"); if(taxrate != null){ taxrate = BusinessDataServiceHelper.loadSingle(taxrate.getPkValue(), "bd_taxrate", "id,name,number,taxrate"); - BigDecimal value = taxrate.getBigDecimal("taxrate"); - xxs = value.toString(); + xxs = taxrate.getBigDecimal("taxrate"); } String ylflml = null; DynamicObject tqq9_ylflml = bill.getDynamicObject("tqq9_ylflml"); @@ -4932,31 +4931,15 @@ public class FWImpl { if(volumnunit != null){ tjdw = volumnunit.getString("name"); } - String tj = null; - BigDecimal volume = bill.getBigDecimal("volume"); - if(volume != null){ - tj = volume.toString(); - } + BigDecimal tj = bill.getBigDecimal("volume"); String ccdw = null; DynamicObject lengthunit = bill.getDynamicObject("lengthunit"); if(lengthunit != null){ ccdw = lengthunit.getString("name"); } - String kd = null; - BigDecimal width = bill.getBigDecimal("width"); - if(width != null){ - kd = width.toString(); - } - String cd2 = null; - BigDecimal length = bill.getBigDecimal("length"); - if(length != null){ - cd2 = length.toString(); - } - String gd = null; - BigDecimal height = bill.getBigDecimal("height"); - if(height != null){ - gd = height.toString(); - } + BigDecimal kd = bill.getBigDecimal("width"); + BigDecimal cd2 = bill.getBigDecimal("length"); + BigDecimal gd = bill.getBigDecimal("height"); //单头赋值 JSONObject m1 = new JSONObject(); @@ -4973,7 +4956,7 @@ public class FWImpl { m4.put("fieldValue", sqrq); JSONObject m5 = new JSONObject(); m5.put("fieldName", "ywgz"); - m5.put("fieldValue", ywgz); + m5.put("fieldValue", "4"); JSONObject m6 = new JSONObject(); m6.put("fieldName", "wlmc"); m6.put("fieldValue", wlmc); @@ -5015,7 +4998,7 @@ public class FWImpl { m18.put("fieldValue", ccystj); JSONObject m19 = new JSONObject(); m19.put("fieldName", "xxs"); - m19.put("fieldValue", xxs); + m19.put("fieldValue", xxs!=null&&xxs.compareTo(BigDecimal.ZERO)!=0?xxs:0); JSONObject m21 = new JSONObject(); m21.put("fieldName", "ylflml"); m21.put("fieldValue", ylflml); @@ -5087,19 +5070,19 @@ public class FWImpl { m45.put("fieldValue", tjdw); JSONObject m46 = new JSONObject(); m46.put("fieldName", "tj"); - m46.put("fieldValue", tj); + m46.put("fieldValue", tj!=null&&tj.compareTo(BigDecimal.ZERO)!=0?tj:0); JSONObject m47 = new JSONObject(); m47.put("fieldName", "ccdw"); m47.put("fieldValue", ccdw); JSONObject m48 = new JSONObject(); m48.put("fieldName", "kd"); - m48.put("fieldValue", kd); + m48.put("fieldValue", kd!=null&&kd.compareTo(BigDecimal.ZERO)!=0?kd:0); JSONObject m49 = new JSONObject(); m49.put("fieldName", "cd2"); - m49.put("fieldValue", cd2); + m49.put("fieldValue", cd2!=null&&cd2.compareTo(BigDecimal.ZERO)!=0?cd2:0); JSONObject m51 = new JSONObject(); m51.put("fieldName", "gd"); - m51.put("fieldValue", gd); + m51.put("fieldValue", gd!=null&&gd.compareTo(BigDecimal.ZERO)!=0?gd:0); //区分新建审核与修改审批 String requestName = "新增物料流程"; @@ -5118,6 +5101,6 @@ public class FWImpl { mainArr.addAll(mlist); FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); //如果单据上纯在泛微流程id,重新提交调用泛微提交接口,如果没有泛微流程id,就调用新增接口 - return fwRestfulUtils.doBillAction(mainArr, null, requestName, wfID, lcbh, requestid); + return fwRestfulUtils.doBillAction(mainArr, null, requestName, wfID, lcbh, requestid, sqr); } } diff --git a/lc123/cloud/app/plugin/utils/FWRestfulUtils.java b/lc123/cloud/app/plugin/utils/FWRestfulUtils.java index a8f552c..11d1e56 100644 --- a/lc123/cloud/app/plugin/utils/FWRestfulUtils.java +++ b/lc123/cloud/app/plugin/utils/FWRestfulUtils.java @@ -180,7 +180,7 @@ public class FWRestfulUtils { * @param billno * @return */ - public String doBillAction(JSONArray mainData, JSONArray detailData, String requestName, String workflowid, String billno, String requestId){ + public String doBillAction(JSONArray mainData, JSONArray detailData, String requestName, String workflowid, String billno, String requestId, String userId){ Map registMap = regist(); if(registMap != null && registMap.size() > 0){ String spk = StrUtil.nullToEmpty((String) registMap.get("spk")); @@ -216,7 +216,7 @@ public class FWRestfulUtils { //封装请求头参数 RSA rsa = new RSA(null,spk); //对用户信息进行加密传输,暂仅支持传输OA用户ID - String encryptUserid = rsa.encryptBase64("363", CharsetUtil.CHARSET_UTF_8, KeyType.PublicKey); + String encryptUserid = rsa.encryptBase64(userId, CharsetUtil.CHARSET_UTF_8, KeyType.PublicKey); DynamicObject pushlog = BusinessDataServiceHelper.newDynamicObject("tqq9_fwpushlog"); pushlog.set("name", requestName);