From 5d16b8e2a68a858a0c82c9e5a63618ed932241eb Mon Sep 17 00:00:00 2001
From: PigBaoBei <2739175034@qq.com>
Date: Mon, 8 Apr 2024 17:36:23 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E9=85=8D=E9=80=81=E4=BB=BB=E5=8A=A1?=
=?UTF-8?q?=E7=8A=B6=E6=80=81=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/DistributionDeliveryListMapper.xml | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
index fa37446a7..78d5e8e7d 100644
--- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
+++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/mapper/DistributionDeliveryListMapper.xml
@@ -2032,8 +2032,16 @@
From 85d5d86bf60c42976a9be35186beb2c462a8e087 Mon Sep 17 00:00:00 2001
From: zhaoqiaobo
Date: Mon, 8 Apr 2024 17:37:18 +0800
Subject: [PATCH 2/2] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E5=BF=97?=
=?UTF-8?q?=E9=82=A6=E6=8E=A8=E9=80=81=E6=95=B0=E6=8D=AE=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../zbom/mq/ZbomFactoryOrderListener.java | 6 ++--
.../logpm/factorydata/zbom/util/ZbomUtil.java | 12 ++++++--
blade-service/logpm-report/pom.xml | 17 +++++++++--
.../ReportBillLoadingController.java | 30 +++++++++++++++++++
4 files changed, 58 insertions(+), 7 deletions(-)
diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java
index d64d2c466..819de6934 100644
--- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java
+++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/mq/ZbomFactoryOrderListener.java
@@ -213,9 +213,9 @@ public class ZbomFactoryOrderListener {
advanceEntity.setStoreCode(orderPackageDTO.getCustomerCode());
advanceEntity.setStoreName(orderPackageDTO.getCustomerName());
advanceEntity.setServiceNum(orderPackageDTO.getRelationOrderCode());
- advanceEntity.setConsigneePerson(orderPackageDTO.getReceiverName());
- advanceEntity.setConsigneeMobile(orderPackageDTO.getReceiverMobile());
- advanceEntity.setConsigneeAddress(orderPackageDTO.getReceiverAddress());
+ advanceEntity.setCustomerName(orderPackageDTO.getReceiverName());
+ advanceEntity.setCustomerPhone(orderPackageDTO.getReceiverMobile());
+ advanceEntity.setCustomerAddress(orderPackageDTO.getReceiverAddress());
// 封装包件
TrunklineAdvanceDetailEntity advanceDetailEntity = new TrunklineAdvanceDetailEntity();
diff --git a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/util/ZbomUtil.java b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/util/ZbomUtil.java
index a7d3f6714..8b5375319 100644
--- a/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/util/ZbomUtil.java
+++ b/blade-service/logpm-factory-data/logpm-factory-data-zbom/src/main/java/com/logpm/factorydata/zbom/util/ZbomUtil.java
@@ -3,7 +3,9 @@ package com.logpm.factorydata.zbom.util;
import cn.hutool.core.map.MapUtil;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
+import cn.hutool.json.JSONUtil;
import com.logpm.factorydata.zbom.pros.ZbFactoryProperties;
+import lombok.extern.slf4j.Slf4j;
import org.springblade.common.constant.HttpConstants;
import org.springblade.common.utils.CommonUtil;
@@ -18,19 +20,22 @@ import java.util.Map;
* @author zhaoqiaobo
* @create 2024-03-21 15:23
*/
+@Slf4j
public class ZbomUtil {
/**
* 推送数据
+ *
* @param zbProperties 志邦配置信息
- * @param body 请求提
- * @param method 请求方法
+ * @param body 请求提
+ * @param method 请求方法
* @return 返回请求结果
* @throws Exception
*/
public static String pushZbomSystem(ZbFactoryProperties zbProperties, String body, String method) throws Exception {
// 构建请求url
String url = ZbomUtil.buildUrl(zbProperties, body, method);
+ log.info("推送志邦url:{}", url);
// 请求数据
HashMap headers = MapUtil.of(HttpConstants.HTTP.HEADER_NAME.CONTENT_TYPE, HttpConstants.HTTP.HEADER_VALUE.JSON);
HttpResponse execute = HttpUtil.createPost(url).headerMap(headers, false).body(body).timeout(5 * 1000).execute();
@@ -47,8 +52,11 @@ public class ZbomUtil {
params.put("sign_method", "md5");
params.put("timestamp", CommonUtil.dateToStringGeneral(new Date()));
params.put("v", "1.0");
+ log.info("推送志邦参数:{}", JSONUtil.toJsonStr(params));
String body = bodyParam.replaceAll("\\s+", "");
+ log.info("推送志邦请求体:{}", body);
String sign = QmSignUntil.signTopRequest(params, zbProperties.getSecretkey(), "md5", body);
+ log.info("推送志邦签名:{}", sign);
String url = getZbUrl(zbProperties.getUrl() + "/api/edi/ots/in?", params, sign);
return url;
}
diff --git a/blade-service/logpm-report/pom.xml b/blade-service/logpm-report/pom.xml
index cd1eab52a..536029f00 100644
--- a/blade-service/logpm-report/pom.xml
+++ b/blade-service/logpm-report/pom.xml
@@ -33,8 +33,21 @@
logpm-basicdata-api
3.2.0.RELEASE
-
-
+
+ org.springblade
+ logpm-report-api
+ 3.2.0.RELEASE
+
+
+ org.springblade
+ blade-dict-api
+ 3.2.0.RELEASE
+
+
+ org.springblade
+ logpm-factory-data-api
+ 3.2.0.RELEASE
+
diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java
index 5469f68be..9fd6ff0e9 100644
--- a/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java
+++ b/blade-service/logpm-report/src/main/java/com/logpm/report/controller/ReportBillLoadingController.java
@@ -1,7 +1,12 @@
package com.logpm.report.controller;
+import cn.hutool.core.util.EnumUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.logpm.factorydata.enums.BrandEnums;
+import com.logpm.factorydata.enums.NodeEnums;
+import com.logpm.factorydata.util.FactoryDataMessageSender;
+import com.logpm.factorydata.vo.NodePushMsg;
import com.logpm.report.query.BillDetailsQuery;
import com.logpm.report.query.BillLoadingTasksQuery;
import com.logpm.report.service.IReportBillLoadingAsyncService;
@@ -12,13 +17,19 @@ import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
/**
* 自提报表前端控制器
+ *
* @Author zqb
* @Date 2024/3/14
**/
@@ -30,6 +41,25 @@ public class ReportBillLoadingController {
private IReportBillLoadingAsyncService reportBillLoadingAsyncService;
+ private final FactoryDataMessageSender sender;
+
+ @PostMapping("/sendMessage")
+ @ApiOperation(value = "发送消息测试", notes = "发送消息测试")
+ public R tasksPage(@RequestBody Map map) {
+ String node = (String) map.get("node");
+ NodeEnums nodeEnums = EnumUtil.fromString(NodeEnums.class, node);
+ NodePushMsg build = NodePushMsg.builder()
+ .node(nodeEnums)
+ .brand(BrandEnums.ZB)
+ .operatorTime(new Date())
+ .operator("test")
+ .address("test")
+ .content((List