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 @@ 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) map.get("content")) + .build(); + sender.sendNodeDataByBrand(build); + return R.data("成功"); + } + @GetMapping("/tasks") @ApiOperationSupport(order = 1) @ApiOperation(value = "自提任务维度", notes = "自提任务维度")