From eac91bdfc217fc6137b7875d2ab55b8061e0bd74 Mon Sep 17 00:00:00 2001 From: yuxueliang0813 <407010292@qq.com> Date: Wed, 25 Sep 2024 10:03:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=97=A5=E5=BF=97=E4=BF=9D?= =?UTF-8?q?=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repc/recon/opplugin/YongyouBIPOperation.java | 3 ++- .../src/main/java/shkd/utils/DobeDWUtils.java | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/repc/recon/opplugin/YongyouBIPOperation.java b/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/repc/recon/opplugin/YongyouBIPOperation.java index d9b54bd..9847919 100644 --- a/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/repc/recon/opplugin/YongyouBIPOperation.java +++ b/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/repc/recon/opplugin/YongyouBIPOperation.java @@ -319,6 +319,7 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen log.error(String.format("用友付款接口处理失败,具体原因:%s", json_reuslt.toString())); //此时除了日志打印,增加日志记录 DobeDWUtils.saveLog(payrequestinfo.getString("billno"),"用友BIP",payData.toString(),json_reuslt.toString(),false); + return; }else{ yynum = json_reuslt.getJSONObject("data").getString("billno"); } @@ -334,8 +335,8 @@ public class YongyouBIPOperation extends AbstractOperationServicePlugIn implemen //推送用友bip成功后,反写合同付款申请单的用友付款单id字段值 String sql = "UPDATE t_xxx SET fk_qeug_yynum=? WHERE fid=?;"; DB.update(DBRoute.of("scm"), sql, new Object[]{yynum, payrequestinfo.getLong("id")}); + DobeDWUtils.saveLog(payrequestinfo.getString("billno"),"用友BIP",payData.toString(),json_reuslt.toString(),true); } - DobeDWUtils.saveLog(payrequestinfo.getString("billno"),"用友BIP",payData.toString(),json_reuslt.toString(),true); } private void handleWithOutContract(String eventName, DynamicObject payrequestinfo){ diff --git a/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/utils/DobeDWUtils.java b/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/utils/DobeDWUtils.java index c873825..9876e6d 100644 --- a/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/utils/DobeDWUtils.java +++ b/fi/fi/shkd-fi-fi-plugin/src/main/java/shkd/utils/DobeDWUtils.java @@ -2,6 +2,9 @@ package shkd.utils; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; +import kd.bos.dataentity.entity.DynamicObject; +import kd.bos.servicehelper.BusinessDataServiceHelper; +import kd.bos.servicehelper.operation.SaveServiceHelper; import okhttp3.MediaType; import okhttp3.RequestBody; import okio.ByteString; @@ -36,13 +39,23 @@ public class DobeDWUtils { //付款金额查询接口 public static final String payQueryUrl = "http://106.14.25.83:8090/nccloud/api/arap/paybill/insertandcommit"; + private static final String jklogEntityName = "qeug_recon_jklog"; + public static boolean isEmpty(String value) { return value == null || value.trim().length() <= 0; } public static void saveLog(String billno,String jkname,String inputs,String outputs,boolean isSuccess){ //保存星瀚与第三方接口调用之间的日志记录 - //参数说明:单据编号、接口名称、接口入参、接口返回值、接口调用是否成功 + //参数说明:单据编号、接口名称、接口入参、接口返回值、接口执行结果是否成功 + DynamicObject billinfo = BusinessDataServiceHelper.newDynamicObject(jklogEntityName); + billinfo.set("number",billno); + billinfo.set("name",jkname); + billinfo.set("qeug_inputs_tag",inputs);//大文本赋值,标识后加_tag 是内容,不加是文本标题 + billinfo.set("qeug_outputs_tag",outputs); + billinfo.set("qeug_issuccess",isSuccess); + billinfo.set("status","A"); //单据状态默认暂存 + SaveServiceHelper.save(new DynamicObject[]{billinfo}); } public static String getDateString(Date billDate){