From 6617e503c2d04b4fc22aa9c5d801f640cd4c9c47 Mon Sep 17 00:00:00 2001 From: "476474485@qq.com" Date: Wed, 19 Mar 2025 15:40:37 +0800 Subject: [PATCH 01/10] =?UTF-8?q?U8C=20=E5=88=B6=E5=8D=95=E4=BA=BA=20admin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stomerSynchronizationEventServiceImpl.java | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index f46fc74b..42380294 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -337,9 +337,9 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Thu, 20 Mar 2025 16:30:17 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=A2=E5=95=86?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=BC=A0=E9=80=92=E5=BC=80=E6=88=B7=E8=A1=8C?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/WsCustomerSynchronizationEventServiceImpl.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index 42380294..45bf6959 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -325,8 +325,9 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Fri, 21 Mar 2025 09:51:33 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=A2=E5=95=86?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=BC=A0=E9=80=92=E5=BC=80=E6=88=B7=E8=A1=8C?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stomerSynchronizationEventServiceImpl.java | 247 ++++++++++-------- 1 file changed, 131 insertions(+), 116 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index 45bf6959..12a436f4 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -12,21 +12,23 @@ import com.hzya.frame.plugin.wscustomersynchronizationevent.entity.WsCustomerSyn import com.hzya.frame.plugin.wscustomersynchronizationevent.service.IWsCustomerSynchronizationEventService; import com.hzya.frame.web.entity.BaseResult; import com.hzya.frame.web.entity.JsonResultEntity; +import com.sun.org.apache.xerces.internal.dom.DeferredEntityReferenceImpl; import org.springframework.beans.factory.annotation.Autowired; -import java.util.HashMap; import java.util.Map; /*** * 万盛客商档案同步插件 * @content: * @author 👻👻👻👻👻👻👻👻 gjh - * @date 2025-03-03 10:56 + * @date 2025-03-03 10:56 * @param * @return **/ public class WsCustomerSynchronizationEventServiceImpl extends BaseService implements IWsCustomerSynchronizationEventService { - + //定义两个环境属性,根据环境绑定OA参数 + private final String TEST = "TEST"; + private final String DEV = "DEV"; private IWsCustomerSynchronizationEventDao wsCustomerSynchronizationEventDao; @Autowired @@ -37,90 +39,87 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService0){ + if (allcount > 0) { return BaseResult.getFailureMessageEntity("客商名称重复!"); - }else{ + } else { requestJson = new JSONObject(); - requestJson.put("taxpayer",field0007); - body = requestApi("validateCustomerName",requestJson, "800054","8000540095",null); + requestJson.put("taxpayer", field0007); + body = requestApi("validateCustomerName", requestJson, "800054", "8000540095", null); req = JSON.parseObject(body); - flag = req.getBoolean("flag"); - if(flag){ + flag = req.getBoolean("flag"); + if (flag) { attribute = req.getJSONObject("attribute"); - status = attribute.getString("status"); - if("success".equals(status)){ - detailsData = attribute.getJSONObject("data"); - allcount = detailsData.getInteger("allcount"); - if(allcount>0){ + status = attribute.getString("status"); + if ("success".equals(status)) { + detailsData = attribute.getJSONObject("data"); + allcount = detailsData.getInteger("allcount"); + if (allcount > 0) { return BaseResult.getFailureMessageEntity("纳税人识别号重复!"); - }else{ - return BaseResult.getSuccessMessageEntity("客商未重复!"); + } else { + return BaseResult.getSuccessMessageEntity("客商未重复!"); } - }else{ + } else { return BaseResult.getFailureMessageEntity("转发失败!"); } - }else{ - return BaseResult.getFailureMessageEntity("转发失败!"+req.getString("msg")); + } else { + return BaseResult.getFailureMessageEntity("转发失败!" + req.getString("msg")); } } - }else{ + } else { return BaseResult.getFailureMessageEntity("转发失败!"); } - }else{ + } else { - return BaseResult.getFailureMessageEntity("转发失败!"+req.getString("msg")); + return BaseResult.getFailureMessageEntity("转发失败!" + req.getString("msg")); } - - - } @@ -128,7 +127,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService0){ + if (null != returnData && returnData.size() > 0) { pk_cubasdoc = returnData.getJSONObject(0).getJSONObject("parentvo").getString("pk_cubasdoc"); String custcode = returnData.getJSONObject(0).getJSONObject("parentvo").getString("custcode"); //执行客商档案编码回传OA - updateCustomerCode(formBean.getString("id"),custcode); + updateCustomerCode(formBean.getString("id"), custcode,DEV); } - logger.info("客商新增成功!返回数据",body); + logger.info("客商新增成功!返回数据", body); } else { - logger.info("客商新增失败!返回数据",body); + logger.info("客商新增失败!返回数据", body); } } else { return BaseResult.getFailureMessageEntity("转发失败!" + req.getJSONObject("attribute").getString("errormsg")); } //绑定客商分配参数 - requestJson = bindMerchantDefineParameters(data,pk_cubasdoc); - body = requestApi("optionCustomerSynchronization客商分配",requestJson, "800054","8000540094",null); + requestJson = bindMerchantDefineParameters(data, pk_cubasdoc,DEV); + body = requestApi("optionCustomerSynchronization客商分配", requestJson, "800054", "8000540094", null); req = JSON.parseObject(body); flag = req.getBoolean("flag"); if (flag) { JSONObject attribute = req.getJSONObject("attribute"); String status = attribute.getString("status"); if ("success".equals(status)) { - logger.info("客商分配成功!返回数据",body); + logger.info("客商分配成功!返回数据", body); } else { - logger.info("客商分配失败!返回数据",body); + logger.info("客商分配失败!返回数据", body); } } else { return BaseResult.getFailureMessageEntity("转发失败!" + req.getJSONObject("attribute").getString("errormsg")); @@ -189,40 +188,40 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService headerMap = MapBuilder.create(true) .put("apiCode", String.valueOf(apiCode)) //这里用中台做为发送方 .put("publicKey", "ZJYAWb7lhAUTYqekPkU+uHJv1/ObJxb7dT7sD8HPRDGAgyhCe7eDIk+3zDUT+v578prj") .put("secretKey", "fviZnLBsQUAGF8w8FSOdJi7XlIm/XAZclMxRagDLfTyJFlvnIBF3w66Hrpfzs8cYj3JzOP8MtA1LSGvL+2BWG8c/o7DKi92S4mr3zcGearA=") - .put("appId",appId) + .put("appId", appId) .build(); - if(null != token){ - headerMap .put("token",token); - } + if (null != token) { + headerMap.put("token", token); + } String body = HttpRequest.post("http://127.0.0.1:10086/kangarooDataCenterV3/entranceController/externalCallInterface").addHeaders(headerMap).body(requestJson.toJSONString()).timeout(60000).execute().body(); - logger.info("中台转发到ESB"+method+":{}", body); + logger.info("中台转发到ESB" + method + ":{}", body); return body; } @@ -288,11 +287,11 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Fri, 21 Mar 2025 22:31:30 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AE=A2=E5=95=86?= =?UTF-8?q?=E6=A1=A3=E6=A1=88=E4=BC=A0=E9=80=92=E5=BC=80=E6=88=B7=E8=A1=8C?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stomerSynchronizationEventServiceImpl.java | 70 +++++++++++++++---- 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index 12a436f4..a68706bb 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -194,13 +194,23 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Mon, 24 Mar 2025 11:05:53 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E7=B1=BB=E5=9E=8B=E9=BB=98=E8=AE=A4=E5=80=BC=E4=B8=BA?= =?UTF-8?q?null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WsCustomerSynchronizationEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index a68706bb..51d47cbb 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -467,7 +467,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Mon, 24 Mar 2025 12:45:45 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E7=B1=BB=E5=9E=8B=E9=BB=98=E8=AE=A4=E5=80=BC=E4=B8=BA?= =?UTF-8?q?null?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...stomerSynchronizationEventServiceImpl.java | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index 51d47cbb..a0572a66 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -89,26 +89,31 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService 0) { - return BaseResult.getFailureMessageEntity("纳税人识别号重复!"); + if(null != field0007 && !"".equals(field0007)){ + + requestJson.put("taxpayer", field0007); + body = requestApi("validateCustomerName", requestJson, "800054", "8000540095", null); + req = JSON.parseObject(body); + flag = req.getBoolean("flag"); + if (flag) { + attribute = req.getJSONObject("attribute"); + status = attribute.getString("status"); + if ("success".equals(status)) { + detailsData = attribute.getJSONObject("data"); + allcount = detailsData.getInteger("allcount"); + if (allcount > 0) { + return BaseResult.getFailureMessageEntity("纳税人识别号重复!"); + } else { + return BaseResult.getSuccessMessageEntity("客商未重复!"); + } } else { - return BaseResult.getSuccessMessageEntity("客商未重复!"); + return BaseResult.getFailureMessageEntity("转发失败!"); } } else { - return BaseResult.getFailureMessageEntity("转发失败!"); + return BaseResult.getFailureMessageEntity("转发失败!" + req.getString("msg")); } - } else { - return BaseResult.getFailureMessageEntity("转发失败!" + req.getString("msg")); + }else{ + return BaseResult.getSuccessMessageEntity("纳税人识别号为空,不校验!"); } } } else { @@ -364,7 +369,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Mon, 24 Mar 2025 17:09:01 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E5=BC=80=E6=88=B7=E8=A1=8C=E4=B8=8D=E8=83=BD=E4=BC=A0?= =?UTF-8?q?=E9=80=92=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WsCustomerSynchronizationEventServiceImpl.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index a0572a66..e744e779 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -71,7 +71,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService=18){ + return BaseResult.getFailureMessageEntity("纳税人识别号不允许超过18位!"); + } + requestJson.put("taxpayer", field0007.trim()); body = requestApi("validateCustomerName", requestJson, "800054", "8000540095", null); req = JSON.parseObject(body); flag = req.getBoolean("flag"); @@ -279,6 +281,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Tue, 25 Mar 2025 10:12:35 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E7=BA=B3=E7=A8=8E=E4=BA=BA=E8=AF=86=E5=88=AB=E5=8F=B7?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99=EF=BC=8C=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E8=B6=85=E8=BF=8718=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WsCustomerSynchronizationEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index e744e779..4230b4ab 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -90,7 +90,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService=18){ + if(field0007.trim().length()>18){ return BaseResult.getFailureMessageEntity("纳税人识别号不允许超过18位!"); } requestJson.put("taxpayer", field0007.trim()); From 5811f56a9dc303e943adcdbc22bae30ad161440b Mon Sep 17 00:00:00 2001 From: "476474485@qq.com" Date: Tue, 25 Mar 2025 17:30:38 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E7=BA=B3=E7=A8=8E=E4=BA=BA=E8=AF=86=E5=88=AB=E5=8F=B7?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E8=A7=84=E5=88=99=EF=BC=8C=E4=B8=8D=E5=85=81?= =?UTF-8?q?=E8=AE=B8=E8=B6=85=E8=BF=8718=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/WsCustomerSynchronizationEventServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java index 4230b4ab..7b36cc1c 100644 --- a/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java +++ b/base-buildpackage/src/main/java/com/hzya/frame/plugin/wscustomersynchronizationevent/service/impl/WsCustomerSynchronizationEventServiceImpl.java @@ -372,7 +372,7 @@ public class WsCustomerSynchronizationEventServiceImpl extends BaseService Date: Mon, 7 Apr 2025 16:35:14 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E8=B0=83=E6=95=B4OA=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java index db64394e..b2e196b3 100644 --- a/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java +++ b/fw-oa/src/main/java/com/hzya/frame/seeyon/service/impl/SeeYonInterFaceImpl.java @@ -545,6 +545,10 @@ public class SeeYonInterFaceImpl implements ISeeYonInterFace { // logger.info("调用中台返回的参数:{}",body); // return body; } + }else{ + // StrUtil.isNotEmpty(jsonStr) && StrUtil.isNotEmpty(formAppId) && StrUtil.isNotEmpty(eventType) + logger.info("jsonStr,formAppId,eventType为空!执行错误"+jsonStr+formAppId+eventType); + throw new BaseSystemException("jsonStr,formAppId,eventType为空!执行错误"); } return null; }