Browse Source

8.30 MQ将信息同步至航通测试完成

Mechrevo 1 year ago
parent
commit
3a8917e766

+ 17 - 5
sp-core/sp-api/src/main/java/com/pj/api/client/async_server/AsyncServerInterface.java

@@ -2,8 +2,12 @@ package com.pj.api.client.async_server;
 
 
 import com.pj.api.FeignInterceptor;
 import com.pj.api.FeignInterceptor;
 import com.pj.api.consts.FeignConsts;
 import com.pj.api.consts.FeignConsts;
+import com.pj.api.dto.OrderDto;
+import com.pj.api.dto.OrdersDto;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 
 
 /**
 /**
  * 异步通信
  * 异步通信
@@ -18,11 +22,19 @@ import org.springframework.web.bind.annotation.RequestMapping;
 public interface AsyncServerInterface {
 public interface AsyncServerInterface {
 
 
     /**
     /**
-     * 发送对象至航通
-     * @param t
-     * @param <T>
+     * 发送一级市场订单对象至航通
+     * @param
+     * @param
      */
      */
-    @RequestMapping("/async/rpc/sendObject")
-    public <T> void sendObject(T t,String dataType);
+    @RequestMapping("/async/rpc/sendLevelOneOrderDto")
+    public  void sendLevelOneOrderDto(@RequestBody OrderDto tbOrderDto, @RequestParam("dataType")String dataType);
+
 
 
+    /**
+     * 发送二级市场订单对象至航通
+     * @param t
+     * @param dataType
+     */
+    @RequestMapping("/async/rpc/sendLevelTwoOrdersDto")
+    public void sendLevelTwoOrdersDto(@RequestBody OrdersDto t, @RequestParam("dataType")String dataType);
 }
 }

+ 8 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/async_server/AsyncServerInterfaceFallback.java

@@ -1,6 +1,8 @@
 package com.pj.api.client.async_server;
 package com.pj.api.client.async_server;
 
 
 import com.pj.api.client.cfg.SpCfgInterfaceFallback;
 import com.pj.api.client.cfg.SpCfgInterfaceFallback;
+import com.pj.api.dto.OrderDto;
+import com.pj.api.dto.OrdersDto;
 import feign.hystrix.FallbackFactory;
 import feign.hystrix.FallbackFactory;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
@@ -20,7 +22,12 @@ public class AsyncServerInterfaceFallback implements FallbackFactory<AsyncServer
         return new AsyncServerInterface() {
         return new AsyncServerInterface() {
 
 
             @Override
             @Override
-            public <T> void sendObject(T t,String dataType) {
+            public  void sendLevelOneOrderDto(OrderDto t, String dataType) {
+                log.error("错误对象:{},类型:{}",t,dataType);
+            }
+
+            @Override
+            public void sendLevelTwoOrdersDto(OrdersDto t, String dataType) {
                 log.error("错误对象:{},类型:{}",t,dataType);
                 log.error("错误对象:{},类型:{}",t,dataType);
             }
             }
         };
         };

+ 3 - 3
sp-core/sp-api/src/main/java/com/pj/api/consts/FeignFactory.java

@@ -62,9 +62,9 @@ public class FeignFactory {
 	/**
 	/**
 	 * 异步通信接口
 	 * 异步通信接口
 	 */
 	 */
-	public static AsyncServerInterface ansyncServerInterface;
+	public static AsyncServerInterface asyncServerInterface;
 	@Autowired
 	@Autowired
-	public void setAnsyncServerInterface(AsyncServerInterface ansyncServerInterface){
-		FeignFactory.ansyncServerInterface = ansyncServerInterface;
+	public void setAsyncServerInterface(AsyncServerInterface asyncServerInterface){
+		FeignFactory.asyncServerInterface = asyncServerInterface;
 	}
 	}
 }
 }

+ 141 - 68
sp-core/sp-api/src/main/java/com/pj/api/dto/OrderDto.java

@@ -1,46 +1,13 @@
 package com.pj.api.dto;
 package com.pj.api.dto;
 
 
-import com.fasterxml.jackson.annotation.JsonFormat;
-
+import java.io.Serializable;
 import java.util.Date;
 import java.util.Date;
 
 
 /**
 /**
- * 一级市场订单表
  * @Author Mechrevo
  * @Author Mechrevo
- * @Date 2023 08 07 11 51
+ * @Date 2023 08 30 09 12
  **/
  **/
-public class OrderDto {
-    /**
-     * 边民或组长取消订单(0=未取消,1=已取消)
-     */
-    private Integer cancelPeople;
-
-    /**
-     * 申报单号
-     */
-    private Long applyNo;
-
-
-    public Long getApplyNo() {
-        return applyNo;
-    }
-
-    public void setApplyNo(Long applyNo) {
-        this.applyNo = applyNo;
-    }
-
-    public Integer getCancelPeople() {
-        return cancelPeople;
-    }
-
-    public void setCancelPeople(Integer cancelPeople) {
-        this.cancelPeople = cancelPeople;
-    }
-
-    public OrderDto() {
-    }
-
-
+public class OrderDto implements Serializable {
     private Long id;
     private Long id;
 
 
     /**
     /**
@@ -68,7 +35,7 @@ public class OrderDto {
     private Long groupId;
     private Long groupId;
 
 
     /**
     /**
-     *  商品ID
+     *  过审商品id[goodstransitid]
      */
      */
     private Long goodsId;
     private Long goodsId;
 
 
@@ -115,7 +82,6 @@ public class OrderDto {
     /**
     /**
      * 交易时间
      * 交易时间
      */
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
     private Date tradeTime;
     private Date tradeTime;
 
 
     /**
     /**
@@ -124,6 +90,11 @@ public class OrderDto {
     private Integer tradeStatus;
     private Integer tradeStatus;
 
 
     /**
     /**
+     * 边民或组长取消订单(0=未取消,1=已取消)
+     */
+    private Integer cancelPeople;
+
+    /**
      * 支付方式(0=金融互助,1=现金刷卡)
      * 支付方式(0=金融互助,1=现金刷卡)
      */
      */
     private Integer payType;
     private Integer payType;
@@ -144,20 +115,6 @@ public class OrderDto {
     private Double shouldPrice;
     private Double shouldPrice;
 
 
     /**
     /**
-     * 叫车状态[默认是0=待叫车,1=已叫车,2=完成叫车]
-     */
-    private Integer callCarStatus;
-
-    public Integer getCallCarStatus() {
-        return callCarStatus;
-    }
-
-    public void setCallCarStatus(Integer callCarStatus) {
-        this.callCarStatus = callCarStatus;
-    }
-
-
-    /**
      * 对账人
      * 对账人
      */
      */
     private Long settleUserId;
     private Long settleUserId;
@@ -167,6 +124,8 @@ public class OrderDto {
      */
      */
     private Long recordUserId;
     private Long recordUserId;
 
 
+
+
     /**
     /**
      * 对账时间
      * 对账时间
      */
      */
@@ -251,11 +210,6 @@ public class OrderDto {
     private Date peopleConfirmTime;
     private Date peopleConfirmTime;
 
 
     /**
     /**
-     * 一级市场商户确认(0=待确认,1=是,2=否)[j]
-     */
-    private Integer enterpriseConfirm;
-
-    /**
      * 边民进口申报确认状态(0=待确认,1=是)
      * 边民进口申报确认状态(0=待确认,1=是)
      */
      */
     private Integer applyConfirmStatus;
     private Integer applyConfirmStatus;
@@ -265,6 +219,11 @@ public class OrderDto {
     private Date applyConfirmTime;
     private Date applyConfirmTime;
 
 
     /**
     /**
+     * 一级市场商户确认(0=待确认,1=是)[j]
+     */
+    private Integer enterpriseConfirm;
+
+    /**
      * 是否接单
      * 是否接单
      */
      */
     private String pick;
     private String pick;
@@ -272,7 +231,6 @@ public class OrderDto {
     /**
     /**
      * 接单时间
      * 接单时间
      */
      */
-    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss SSS")
     private Date pickTime;
     private Date pickTime;
 
 
     /**
     /**
@@ -296,14 +254,13 @@ public class OrderDto {
     private String sendTime;
     private String sendTime;
 
 
     /**
     /**
-     * 订单ID
+     * 对应合作社的拼单订单ID
      */
      */
     private Long collageOrdersId;
     private Long collageOrdersId;
 
 
     /**
     /**
      * 创建时间
      * 创建时间
      */
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
     private Date createTime;
     private Date createTime;
 
 
     /**
     /**
@@ -319,7 +276,6 @@ public class OrderDto {
     /**
     /**
      * 更新时间
      * 更新时间
      */
      */
-    @JsonFormat(pattern = "yyyy-MM-dd")
     private Date updateTime;
     private Date updateTime;
 
 
     /**
     /**
@@ -343,10 +299,26 @@ public class OrderDto {
     private Integer finishStatus;
     private Integer finishStatus;
 
 
     /**
     /**
+     * 申报单号
+     */
+    private Long applyNo;
+
+    /**
      * 是否转售(0=未转售,1=已转售)
      * 是否转售(0=未转售,1=已转售)
      */
      */
     private Integer resaleStatus;
     private Integer resaleStatus;
 
 
+    /**
+     * 叫车状态[默认是0=待叫车,1=已叫车,2=完成叫车]
+     */
+    private Integer callCarStatus;
+
+
+    /**
+     * 商品单位
+     */
+    private String goodsUnit;
+
     public Long getId() {
     public Long getId() {
         return id;
         return id;
     }
     }
@@ -483,6 +455,14 @@ public class OrderDto {
         this.tradeStatus = tradeStatus;
         this.tradeStatus = tradeStatus;
     }
     }
 
 
+    public Integer getCancelPeople() {
+        return cancelPeople;
+    }
+
+    public void setCancelPeople(Integer cancelPeople) {
+        this.cancelPeople = cancelPeople;
+    }
+
     public Integer getPayType() {
     public Integer getPayType() {
         return payType;
         return payType;
     }
     }
@@ -667,6 +647,22 @@ public class OrderDto {
         this.peopleConfirmTime = peopleConfirmTime;
         this.peopleConfirmTime = peopleConfirmTime;
     }
     }
 
 
+    public Integer getApplyConfirmStatus() {
+        return applyConfirmStatus;
+    }
+
+    public void setApplyConfirmStatus(Integer applyConfirmStatus) {
+        this.applyConfirmStatus = applyConfirmStatus;
+    }
+
+    public Date getApplyConfirmTime() {
+        return applyConfirmTime;
+    }
+
+    public void setApplyConfirmTime(Date applyConfirmTime) {
+        this.applyConfirmTime = applyConfirmTime;
+    }
+
     public Integer getEnterpriseConfirm() {
     public Integer getEnterpriseConfirm() {
         return enterpriseConfirm;
         return enterpriseConfirm;
     }
     }
@@ -795,6 +791,14 @@ public class OrderDto {
         this.finishStatus = finishStatus;
         this.finishStatus = finishStatus;
     }
     }
 
 
+    public Long getApplyNo() {
+        return applyNo;
+    }
+
+    public void setApplyNo(Long applyNo) {
+        this.applyNo = applyNo;
+    }
+
     public Integer getResaleStatus() {
     public Integer getResaleStatus() {
         return resaleStatus;
         return resaleStatus;
     }
     }
@@ -803,19 +807,88 @@ public class OrderDto {
         this.resaleStatus = resaleStatus;
         this.resaleStatus = resaleStatus;
     }
     }
 
 
-    public Integer getApplyConfirmStatus() {
-        return applyConfirmStatus;
+    public Integer getCallCarStatus() {
+        return callCarStatus;
     }
     }
 
 
-    public void setApplyConfirmStatus(Integer applyConfirmStatus) {
-        this.applyConfirmStatus = applyConfirmStatus;
+    public void setCallCarStatus(Integer callCarStatus) {
+        this.callCarStatus = callCarStatus;
     }
     }
 
 
-    public Date getApplyConfirmTime() {
-        return applyConfirmTime;
+    public String getGoodsUnit() {
+        return goodsUnit;
     }
     }
 
 
-    public void setApplyConfirmTime(Date applyConfirmTime) {
+    public void setGoodsUnit(String goodsUnit) {
+        this.goodsUnit = goodsUnit;
+    }
+
+    public OrderDto(Long id, Long tradeAreaId, String tradeAreaName, String addressIds, Long saleMainId, Long groupId, Long goodsId, String tradeNo, Long buyUserId, String buyUserName, String buyUserType, Long enterpriseId, String enterpriseName, Double totalWeight, Double totalPrice, Date tradeTime, Integer tradeStatus, Integer cancelPeople, Integer payType, String settleTime, Double realPrice, Double shouldPrice, Long settleUserId, Long recordUserId, String recordTime, String record, String refundReason, String refundTime, String receiveName, String receivePhone, String receiveAddress, String outTime, String goodsNames, Integer apply, Date applyTime, String applyResult, String applyFailReason, String distribution, Integer peopleConfirmStatus, Integer peopleConfirmType, Date peopleConfirmTime, Integer applyConfirmStatus, Date applyConfirmTime, Integer enterpriseConfirm, String pick, Date pickTime, Long shopId, String shopName, Integer send, String sendTime, Long collageOrdersId, Date createTime, Long createBy, String createName, Date updateTime, Long updateBy, String updateName, Integer deleteStatus, Integer finishStatus, Long applyNo, Integer resaleStatus, Integer callCarStatus, String goodsUnit) {
+        this.id = id;
+        this.tradeAreaId = tradeAreaId;
+        this.tradeAreaName = tradeAreaName;
+        this.addressIds = addressIds;
+        this.saleMainId = saleMainId;
+        this.groupId = groupId;
+        this.goodsId = goodsId;
+        this.tradeNo = tradeNo;
+        this.buyUserId = buyUserId;
+        this.buyUserName = buyUserName;
+        this.buyUserType = buyUserType;
+        this.enterpriseId = enterpriseId;
+        this.enterpriseName = enterpriseName;
+        this.totalWeight = totalWeight;
+        this.totalPrice = totalPrice;
+        this.tradeTime = tradeTime;
+        this.tradeStatus = tradeStatus;
+        this.cancelPeople = cancelPeople;
+        this.payType = payType;
+        this.settleTime = settleTime;
+        this.realPrice = realPrice;
+        this.shouldPrice = shouldPrice;
+        this.settleUserId = settleUserId;
+        this.recordUserId = recordUserId;
+        this.recordTime = recordTime;
+        this.record = record;
+        this.refundReason = refundReason;
+        this.refundTime = refundTime;
+        this.receiveName = receiveName;
+        this.receivePhone = receivePhone;
+        this.receiveAddress = receiveAddress;
+        this.outTime = outTime;
+        this.goodsNames = goodsNames;
+        this.apply = apply;
+        this.applyTime = applyTime;
+        this.applyResult = applyResult;
+        this.applyFailReason = applyFailReason;
+        this.distribution = distribution;
+        this.peopleConfirmStatus = peopleConfirmStatus;
+        this.peopleConfirmType = peopleConfirmType;
+        this.peopleConfirmTime = peopleConfirmTime;
+        this.applyConfirmStatus = applyConfirmStatus;
         this.applyConfirmTime = applyConfirmTime;
         this.applyConfirmTime = applyConfirmTime;
+        this.enterpriseConfirm = enterpriseConfirm;
+        this.pick = pick;
+        this.pickTime = pickTime;
+        this.shopId = shopId;
+        this.shopName = shopName;
+        this.send = send;
+        this.sendTime = sendTime;
+        this.collageOrdersId = collageOrdersId;
+        this.createTime = createTime;
+        this.createBy = createBy;
+        this.createName = createName;
+        this.updateTime = updateTime;
+        this.updateBy = updateBy;
+        this.updateName = updateName;
+        this.deleteStatus = deleteStatus;
+        this.finishStatus = finishStatus;
+        this.applyNo = applyNo;
+        this.resaleStatus = resaleStatus;
+        this.callCarStatus = callCarStatus;
+        this.goodsUnit = goodsUnit;
+    }
+
+    public OrderDto() {
     }
     }
 }
 }

+ 563 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/OrdersDto.java

@@ -0,0 +1,563 @@
+package com.pj.api.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 08 30 09 13
+ **/
+public class OrdersDto implements Serializable {
+    private Long id;
+
+    /**
+     * 一级市场订单ID
+     */
+    private Long levelOneOrderId;
+
+    /**
+     * 订单编号
+     */
+    private String orderNo;
+
+    /**
+     * 商品id
+     */
+    private Long goodsId;
+
+    /**
+     * 商品名称
+     */
+    private String goodsName;
+
+    /**
+     * 商品来源(国家)
+     */
+    private String goodsFrom;
+
+    /**
+     * 发货商电话
+     */
+    private String shipperPhone;
+
+    /**
+     * 发货商名称
+     */
+    private String shipperName;
+
+    /**
+     * 司机ID
+     */
+    private Long driverId;
+
+    /**
+     * 司机名称
+     */
+    private String driverName;
+
+    /**
+     * 司机电话
+     */
+    private String driverPhone;
+
+    /**
+     * 车型ID
+     */
+    private Long carId;
+
+    /**
+     * 车型名称
+     */
+    private String carType;
+
+    /**
+     * 收货人名称
+     */
+    private String consigneeName;
+
+    /**
+     * 收货人电话号码
+     */
+    private String consigneePhone;
+
+    /**
+     * (预留字段) 申报订单号
+     */
+    private String declarationNumber;
+
+    /**
+     * 订单完成状态 (0=未完成,1=已完成)
+     */
+    private Integer orderFinish;
+
+    /**
+     * 装货地址
+     */
+    private String loadingAddress;
+
+    /**
+     * 卸货地址
+     */
+    private String unloadingAddress;
+
+    /**
+     * 备注
+     */
+    private String comment;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date updateTime;
+
+
+    /**
+     * 更新人编号
+     */
+    private Long updateBy;
+    /**
+     * 更新人名称
+     */
+    private String updateName;
+
+    /**
+     * 删除状态(0=禁用,1=启用)
+     */
+    private Integer deleteStatus;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date createTime;
+
+    /**
+     * 创建人编号
+     */
+    private Long createBy;
+
+    /**
+     * 创建人名称
+     */
+    private String createName;
+
+    /**
+     * 贸易区域id
+     */
+    private Long tradeAreaId;
+
+    /**
+     * 贸易区域名称
+     */
+    private String tradeAreaName;
+
+    /**
+     * 买家ID
+     */
+    private Long purchaserId;
+
+    /**
+     * 买家名称
+     */
+    private String purchaserName;
+
+    /**
+     * 组长Id
+     */
+    private Long leaderId;
+
+    /**
+     * 二级收购商需求发布表的主键id
+     */
+    private Long fkGoodsDemandId;
+
+    /**
+     * 是否收货[0=未收货,1=已收货]
+     */
+    private Integer isDelivery;
+
+    /**
+     * 转售金额
+     */
+    private Double resalePrice;
+
+    /**
+     * 是否支付(0=未支付,1=已支付)
+     */
+    private Integer isPay;
+
+    /**
+     * 支付时间
+     */
+    private Date payTime;
+
+    /**
+     * 是否缴税缴费
+     */
+    private Integer payTax;
+
+    /**
+     * 缴税缴费时间
+     */
+    private Date payTaxTime;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getLevelOneOrderId() {
+        return levelOneOrderId;
+    }
+
+    public void setLevelOneOrderId(Long levelOneOrderId) {
+        this.levelOneOrderId = levelOneOrderId;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public Long getGoodsId() {
+        return goodsId;
+    }
+
+    public void setGoodsId(Long goodsId) {
+        this.goodsId = goodsId;
+    }
+
+    public String getGoodsName() {
+        return goodsName;
+    }
+
+    public void setGoodsName(String goodsName) {
+        this.goodsName = goodsName;
+    }
+
+    public String getGoodsFrom() {
+        return goodsFrom;
+    }
+
+    public void setGoodsFrom(String goodsFrom) {
+        this.goodsFrom = goodsFrom;
+    }
+
+    public String getShipperPhone() {
+        return shipperPhone;
+    }
+
+    public void setShipperPhone(String shipperPhone) {
+        this.shipperPhone = shipperPhone;
+    }
+
+    public String getShipperName() {
+        return shipperName;
+    }
+
+    public void setShipperName(String shipperName) {
+        this.shipperName = shipperName;
+    }
+
+    public Long getDriverId() {
+        return driverId;
+    }
+
+    public void setDriverId(Long driverId) {
+        this.driverId = driverId;
+    }
+
+    public String getDriverName() {
+        return driverName;
+    }
+
+    public void setDriverName(String driverName) {
+        this.driverName = driverName;
+    }
+
+    public String getDriverPhone() {
+        return driverPhone;
+    }
+
+    public void setDriverPhone(String driverPhone) {
+        this.driverPhone = driverPhone;
+    }
+
+    public Long getCarId() {
+        return carId;
+    }
+
+    public void setCarId(Long carId) {
+        this.carId = carId;
+    }
+
+    public String getCarType() {
+        return carType;
+    }
+
+    public void setCarType(String carType) {
+        this.carType = carType;
+    }
+
+    public String getConsigneeName() {
+        return consigneeName;
+    }
+
+    public void setConsigneeName(String consigneeName) {
+        this.consigneeName = consigneeName;
+    }
+
+    public String getConsigneePhone() {
+        return consigneePhone;
+    }
+
+    public void setConsigneePhone(String consigneePhone) {
+        this.consigneePhone = consigneePhone;
+    }
+
+    public String getDeclarationNumber() {
+        return declarationNumber;
+    }
+
+    public void setDeclarationNumber(String declarationNumber) {
+        this.declarationNumber = declarationNumber;
+    }
+
+    public Integer getOrderFinish() {
+        return orderFinish;
+    }
+
+    public void setOrderFinish(Integer orderFinish) {
+        this.orderFinish = orderFinish;
+    }
+
+    public String getLoadingAddress() {
+        return loadingAddress;
+    }
+
+    public void setLoadingAddress(String loadingAddress) {
+        this.loadingAddress = loadingAddress;
+    }
+
+    public String getUnloadingAddress() {
+        return unloadingAddress;
+    }
+
+    public void setUnloadingAddress(String unloadingAddress) {
+        this.unloadingAddress = unloadingAddress;
+    }
+
+    public String getComment() {
+        return comment;
+    }
+
+    public void setComment(String comment) {
+        this.comment = comment;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Long getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(Long updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    public Integer getDeleteStatus() {
+        return deleteStatus;
+    }
+
+    public void setDeleteStatus(Integer deleteStatus) {
+        this.deleteStatus = deleteStatus;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public Long getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(Long createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public Long getTradeAreaId() {
+        return tradeAreaId;
+    }
+
+    public void setTradeAreaId(Long tradeAreaId) {
+        this.tradeAreaId = tradeAreaId;
+    }
+
+    public String getTradeAreaName() {
+        return tradeAreaName;
+    }
+
+    public void setTradeAreaName(String tradeAreaName) {
+        this.tradeAreaName = tradeAreaName;
+    }
+
+    public Long getPurchaserId() {
+        return purchaserId;
+    }
+
+    public void setPurchaserId(Long purchaserId) {
+        this.purchaserId = purchaserId;
+    }
+
+    public String getPurchaserName() {
+        return purchaserName;
+    }
+
+    public void setPurchaserName(String purchaserName) {
+        this.purchaserName = purchaserName;
+    }
+
+    public Long getLeaderId() {
+        return leaderId;
+    }
+
+    public void setLeaderId(Long leaderId) {
+        this.leaderId = leaderId;
+    }
+
+    public Long getFkGoodsDemandId() {
+        return fkGoodsDemandId;
+    }
+
+    public void setFkGoodsDemandId(Long fkGoodsDemandId) {
+        this.fkGoodsDemandId = fkGoodsDemandId;
+    }
+
+    public Integer getIsDelivery() {
+        return isDelivery;
+    }
+
+    public void setIsDelivery(Integer isDelivery) {
+        this.isDelivery = isDelivery;
+    }
+
+    public Double getResalePrice() {
+        return resalePrice;
+    }
+
+    public void setResalePrice(Double resalePrice) {
+        this.resalePrice = resalePrice;
+    }
+
+    public Integer getIsPay() {
+        return isPay;
+    }
+
+    public void setIsPay(Integer isPay) {
+        this.isPay = isPay;
+    }
+
+    public Date getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(Date payTime) {
+        this.payTime = payTime;
+    }
+
+    public Integer getPayTax() {
+        return payTax;
+    }
+
+    public void setPayTax(Integer payTax) {
+        this.payTax = payTax;
+    }
+
+    public Date getPayTaxTime() {
+        return payTaxTime;
+    }
+
+    public void setPayTaxTime(Date payTaxTime) {
+        this.payTaxTime = payTaxTime;
+    }
+
+    public OrdersDto(Long id, Long levelOneOrderId, String orderNo, Long goodsId, String goodsName, String goodsFrom, String shipperPhone, String shipperName, Long driverId, String driverName, String driverPhone, Long carId, String carType, String consigneeName, String consigneePhone, String declarationNumber, Integer orderFinish, String loadingAddress, String unloadingAddress, String comment, Date updateTime, Long updateBy, String updateName, Integer deleteStatus, Date createTime, Long createBy, String createName, Long tradeAreaId, String tradeAreaName, Long purchaserId, String purchaserName, Long leaderId, Long fkGoodsDemandId, Integer isDelivery, Double resalePrice, Integer isPay, Date payTime, Integer payTax, Date payTaxTime) {
+        this.id = id;
+        this.levelOneOrderId = levelOneOrderId;
+        this.orderNo = orderNo;
+        this.goodsId = goodsId;
+        this.goodsName = goodsName;
+        this.goodsFrom = goodsFrom;
+        this.shipperPhone = shipperPhone;
+        this.shipperName = shipperName;
+        this.driverId = driverId;
+        this.driverName = driverName;
+        this.driverPhone = driverPhone;
+        this.carId = carId;
+        this.carType = carType;
+        this.consigneeName = consigneeName;
+        this.consigneePhone = consigneePhone;
+        this.declarationNumber = declarationNumber;
+        this.orderFinish = orderFinish;
+        this.loadingAddress = loadingAddress;
+        this.unloadingAddress = unloadingAddress;
+        this.comment = comment;
+        this.updateTime = updateTime;
+        this.updateBy = updateBy;
+        this.updateName = updateName;
+        this.deleteStatus = deleteStatus;
+        this.createTime = createTime;
+        this.createBy = createBy;
+        this.createName = createName;
+        this.tradeAreaId = tradeAreaId;
+        this.tradeAreaName = tradeAreaName;
+        this.purchaserId = purchaserId;
+        this.purchaserName = purchaserName;
+        this.leaderId = leaderId;
+        this.fkGoodsDemandId = fkGoodsDemandId;
+        this.isDelivery = isDelivery;
+        this.resalePrice = resalePrice;
+        this.isPay = isPay;
+        this.payTime = payTime;
+        this.payTax = payTax;
+        this.payTaxTime = payTaxTime;
+    }
+
+    public OrdersDto() {
+    }
+}

+ 6 - 0
sp-service/async-server/pom.xml

@@ -30,6 +30,12 @@
             <artifactId>spring-boot-starter-amqp</artifactId>
             <artifactId>spring-boot-starter-amqp</artifactId>
         </dependency>
         </dependency>
 
 
+        <!-- mq的消息转换器 -->
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-xml</artifactId>
+            <version>2.9.10</version>
+        </dependency>
 
 
 
 
     </dependencies>
     </dependencies>

+ 12 - 0
sp-service/async-server/src/main/java/com/pj/AsyncServerApplication.java

@@ -1,11 +1,14 @@
 package com.pj;
 package com.pj;
 
 
 import com.pj.current.SpCloudUtil;
 import com.pj.current.SpCloudUtil;
+import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
+import org.springframework.amqp.support.converter.MessageConverter;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.ApplicationPidFileWriter;
 import org.springframework.boot.context.ApplicationPidFileWriter;
 import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.cache.annotation.EnableCaching;
 import org.springframework.cloud.openfeign.EnableFeignClients;
 import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.Bean;
 import org.springframework.retry.annotation.EnableRetry;
 import org.springframework.retry.annotation.EnableRetry;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
 import org.springframework.transaction.annotation.EnableTransactionManagement;
@@ -30,4 +33,13 @@ public class AsyncServerApplication {
         SpCloudUtil.printCurrentServiceInfo();
         SpCloudUtil.printCurrentServiceInfo();
     }
     }
 
 
+    /**
+     * rabbitMQ 的消息转换器
+     * @return
+     */
+    @Bean
+    public MessageConverter jsonMessageConverter(){
+        return new Jackson2JsonMessageConverter();
+    }
+
 }
 }

+ 3 - 1
sp-service/async-server/src/main/java/com/pj/dto/DataDto.java

@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import lombok.NoArgsConstructor;
 
 
+import java.io.Serializable;
+
 /**
 /**
  * @Author Mechrevo
  * @Author Mechrevo
  * @Date 2023 08 25 13 03
  * @Date 2023 08 25 13 03
@@ -12,7 +14,7 @@ import lombok.NoArgsConstructor;
 @Data
 @Data
 @AllArgsConstructor
 @AllArgsConstructor
 @NoArgsConstructor
 @NoArgsConstructor
-public class DataDto {
+public class DataDto implements Serializable {
 
 
     /**
     /**
      * 报文 ID,唯一标识,每个报文的 ID 都不一样
      * 报文 ID,唯一标识,每个报文的 ID 都不一样

+ 19 - 11
sp-service/async-server/src/main/java/com/pj/feign/AmqpTemplateController.java

@@ -1,17 +1,14 @@
 package com.pj.feign;
 package com.pj.feign;
 
 
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.pj.dto.DataDto;
-import com.pj.rabbitmq.RabbitMQ;
-import com.pj.utils.MD5;
-import com.pj.utils.ht.AESUtil;
+
+import com.pj.api.dto.OrderDto;
+import com.pj.api.dto.OrdersDto;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
-import java.text.SimpleDateFormat;
-import java.util.Date;
 
 
 /**
 /**
  * @Author Mechrevo
  * @Author Mechrevo
@@ -29,10 +26,21 @@ public class AmqpTemplateController {
      * @param t
      * @param t
      * @param <T>
      * @param <T>
      */
      */
-    @RequestMapping("rpc/sendObject")
-    public <T> void sendObject(T t,String dataType){
+    @RequestMapping("rpc/sendLevelOneOrderDto")
+    public void sendLevelOneOrderDto(@RequestBody OrderDto t, @RequestParam("dataType")String dataType){
+        //发送
+        amqpTemplateFeign.sendLevelOneOrderDto(t,dataType);
+    }
+
+    /**
+     * 发送对象至航通
+     * @param t
+     * @param dataType
+     */
+    @RequestMapping("rpc/sendLevelTwoOrdersDto")
+    public void sendLevelTwoOrdersDto(@RequestBody OrdersDto t, @RequestParam("dataType") String dataType){
         //发送
         //发送
-        amqpTemplateFeign.sendObject(t,dataType);
+        amqpTemplateFeign.sendLevelTwoOrdersDto(t,dataType);
     }
     }
 
 
 }
 }

+ 39 - 5
sp-service/async-server/src/main/java/com/pj/feign/AmqpTemplateFeign.java

@@ -1,6 +1,8 @@
 package com.pj.feign;
 package com.pj.feign;
 
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSON;
+import com.pj.api.dto.OrderDto;
+import com.pj.api.dto.OrdersDto;
 import com.pj.dto.DataDto;
 import com.pj.dto.DataDto;
 import com.pj.rabbitmq.RabbitMQ;
 import com.pj.rabbitmq.RabbitMQ;
 import com.pj.utils.MD5;
 import com.pj.utils.MD5;
@@ -26,19 +28,18 @@ public class AmqpTemplateFeign {
     /**
     /**
      * 发送对象至航通
      * 发送对象至航通
      * @param t
      * @param t
-     * @param <T>
+     * @param dataType
      */
      */
-    public<T> void sendObject(T t,String dataType){
+    public void sendLevelOneOrderDto(OrderDto t, String dataType){
         //todo: 数据暂时定死
         //todo: 数据暂时定死
         DataDto dataDto = new DataDto();
         DataDto dataDto = new DataDto();
         //msgId
         //msgId
-        String msgId = "";
+        String msgId = "msgid";
         dataDto.setMsgId(msgId);
         dataDto.setMsgId(msgId);
         //appId
         //appId
         String appId = "shop01";
         String appId = "shop01";
         dataDto.setAppId(appId);
         dataDto.setAppId(appId);
         //dataType
         //dataType
-        dataType = "001";
         dataDto.setDataType(dataType);
         dataDto.setDataType(dataType);
         //data
         //data
         //加密
         //加密
@@ -54,7 +55,40 @@ public class AmqpTemplateFeign {
         dataDto.setSign(sign);
         dataDto.setSign(sign);
 
 
         //mq发送信息
         //mq发送信息
-        amqpTemplate.convertAndSend(RabbitMQ.TEST_SEND_QUEUE,t);
+        amqpTemplate.convertAndSend(RabbitMQ.TEST_SEND_QUEUE,dataDto);
+    }
+
+    /**
+     * 发送对象至航通
+     * @param t
+     * @param dataType
+     */
+    public void sendLevelTwoOrdersDto(OrdersDto t, String dataType){
+        //todo: 数据暂时定死
+        DataDto dataDto = new DataDto();
+        //msgId
+        String msgId = "msgid";
+        dataDto.setMsgId(msgId);
+        //appId
+        String appId = "shop01";
+        dataDto.setAppId(appId);
+        //dataType
+        dataDto.setDataType(dataType);
+        //data
+        //加密
+        String jsonString = JSON.toJSONString(t);
+        String encryptCBC = AESUtil.encryptCBC(jsonString, RabbitMQ.ACC_KEY);
+        dataDto.setData(encryptCBC);
+        //msgTime
+        String msgTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date());
+        dataDto.setMsgTime(msgTime);
+        //sign
+        String signString = "msgId=" + msgId + "&appId=" + appId + "&dataType=" + dataType + "&msgTime=" + msgTime + "&data=" + encryptCBC;
+        String sign = MD5.getMd5(signString, 32);
+        dataDto.setSign(sign);
+
+        //mq发送信息
+        amqpTemplate.convertAndSend(RabbitMQ.TEST_SEND_QUEUE,dataDto);
     }
     }
 
 
 }
 }

+ 15 - 8
sp-service/async-server/src/main/java/com/pj/listen/BaseInfoListen.java

@@ -1,9 +1,13 @@
 package com.pj.listen;
 package com.pj.listen;
 
 
+import com.alibaba.fastjson2.JSONObject;
+import com.pj.api.dto.OrderDto;
+import com.pj.dto.DataDto;
 import com.pj.enummj.FinishStatus;
 import com.pj.enummj.FinishStatus;
 import com.pj.ht_byte.HtByte;
 import com.pj.ht_byte.HtByte;
 import com.pj.ht_byte.HtByteMapper;
 import com.pj.ht_byte.HtByteMapper;
 import com.pj.rabbitmq.RabbitMQ;
 import com.pj.rabbitmq.RabbitMQ;
+import com.pj.utils.ht.AESUtil;
 import org.springframework.amqp.core.Message;
 import org.springframework.amqp.core.Message;
 import org.springframework.amqp.rabbit.annotation.Queue;
 import org.springframework.amqp.rabbit.annotation.Queue;
 import org.springframework.amqp.rabbit.annotation.RabbitListener;
 import org.springframework.amqp.rabbit.annotation.RabbitListener;
@@ -41,15 +45,18 @@ public class BaseInfoListen {
     }
     }
 
 
 
 
-//    /**
-//     * 测试接收
-//     */
-//    @RabbitListener(queuesToDeclare = @Queue(RabbitMQ.TEST_SEND_QUEUE))
-//    public void sendMessage(Message message){
-//        System.out.println("\n测试:接收信息\n");
+    /**
+     * 测试接收
+     */
+    @RabbitListener(queuesToDeclare = @Queue(RabbitMQ.TEST_SEND_QUEUE))
+    public void sendMessage(DataDto dataDto){
+        System.out.println("\n测试:接收信息\n");
 //        byte[] body = message.getBody();
 //        byte[] body = message.getBody();
 //        String s = new String(body);
 //        String s = new String(body);
-//        System.out.println("\n" + s + "\n");
-//    }
+//        DataDto dataDto = JSONObject.parseObject(s, DataDto.class);
+        String cbc = AESUtil.decryptCBC(dataDto.getData(), RabbitMQ.ACC_KEY);
+        OrderDto orderDto = JSONObject.parseObject(cbc, OrderDto.class);
+        System.out.println("\n" + orderDto + "\n");
+    }
 
 
 }
 }

+ 119 - 129
sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java

@@ -1,26 +1,15 @@
 package com.pj.task;
 package com.pj.task;
 
 
-import com.alibaba.fastjson2.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.pj.api.client.async_server.AsyncServerInterface;
 import com.pj.api.client.async_server.AsyncServerInterface;
 import com.pj.api.client.level_one_server.LevelOneServerInterface;
 import com.pj.api.client.level_one_server.LevelOneServerInterface;
-import com.pj.api.dto.CooperativeDto;
-import com.pj.api.dto.GroupDto;
-import com.pj.api.dto.PeopleDto;
-import com.pj.api.dto.ShopDto;
-import com.pj.dto.DataDto;
+import com.pj.api.dto.*;
 import com.pj.enummj.DataType;
 import com.pj.enummj.DataType;
-import com.pj.enummj.FinishStatus;
-import com.pj.ht_byte.HtByte;
 import com.pj.ht_byte.HtByteMapper;
 import com.pj.ht_byte.HtByteMapper;
-import com.pj.rabbitmq.RabbitMQ;
-import com.pj.utils.ht.AESUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.context.annotation.Configuration;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.EnableScheduling;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.annotation.Scheduled;
 
 
-import java.util.List;
 
 
 /**
 /**
  * @Author Mechrevo
  * @Author Mechrevo
@@ -62,124 +51,125 @@ public class HtByteTask {
     private void htByteTask(){
     private void htByteTask(){
         /*  测试mq */
         /*  测试mq */
 //        List<HtByte> htBytes = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, 2));
 //        List<HtByte> htBytes = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, 2));
-//        asyncServerInterface.sendMessage(htBytes.get(0), DataType.DATA_TYPE_ONE.getCode());
-//        return;
+        OrderDto orderDtoById = levelOneServerInterface.getOrderDtoById(8833342005355478419L);
+        asyncServerInterface.sendLevelOneOrderDto(orderDtoById, DataType.DATA_TYPE_ONE.getCode());
+        return;
         /*  测试mq */
         /*  测试mq */
-        //扫描表内是否有待处理任务
-        List<HtByte> byteList = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, FinishStatus.FINISH_STATUS_ZERO.getCode()));
-        //判断是否有任务,没有则返回
-        if(byteList.size() == 0)System.out.println("\n暂无待处理任务。\n");
-        //执行任务处理流程
-        byteList.forEach(item -> {
-            //对象转换
-            DataDto dataDto = JSONObject.parseObject(item.getBody(), DataDto.class);
-            //数据解析
-            String body = AESUtil.decryptCBC(dataDto.getData(), RabbitMQ.ACC_KEY);
-            //控制台输出
-            dataDto.setData(body);
-//            System.out.println("开始处理数据: " + dataDto);
-            //数据处理完成状态
-            boolean flag = false;
-            // 根据类型匹配对象
-            switch (dataDto.getDataType()){
-                case "001":
-                    //对象转换
-                    PeopleDto peopleDto = JSONObject.parseObject(body, PeopleDto.class);
-                    //根据其内的身份证,有则新增,无则修改???
-                    flag = levelOneServerInterface.peopleDto(peopleDto);
-                    if(flag){
-                        //将完成状态设置成 2 , 表示处理失败
-                        item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
-                        item.setMessageId(dataDto.getMsgId());
-                        //保存
-                        htByteMapper.updateById(item);
-                        System.out.println("\n边民信息处理完成。 messageId = " + item.getMessageId() + "\n");
-                        //todo: 发送失败信息给管理员
-
-                        break;
-                    }
-                    item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
-                    item.setMessageId(dataDto.getMsgId());
-                    htByteMapper.updateById(item);
-                    System.out.println("\n边民信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                    break;
-                case "002":
-                    //商铺备案
-                    ShopDto shopDto = JSONObject.parseObject(body, ShopDto.class);
-                    //保存
-                    flag = levelOneServerInterface.shopDto(shopDto);
-                    if(!flag){
-                        //将完成状态设置成 2 , 表示处理失败
-                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
-                        item.setMessageId(dataDto.getMsgId());
-                        //保存
-                        htByteMapper.updateById(item);
-                        System.out.println("\n店铺信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                        //todo: 发送失败信息给管理员
-
-                        break;
-                    }
-                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
-                    item.setMessageId(dataDto.getMsgId());
-                    htByteMapper.updateById(item);
-                    System.out.println("\n店铺信息处理完成。 messageId = " + item.getMessageId() + "\n");
-                    break;
-                case "003":
-                    //边民互助组备案
-                    GroupDto groupDto = JSONObject.parseObject(body, GroupDto.class);
-                    //保存
-                    flag = levelOneServerInterface.groupDto(groupDto);
-                    if(!flag){
-                        //将完成状态设置成 2 , 表示处理失败
-                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
-                        item.setMessageId(dataDto.getMsgId());
-                        //保存
-                        htByteMapper.updateById(item);
-                        System.out.println("\n互助组信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                        //todo: 发送失败信息给管理员
-
-                        break;
-                    }
-                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
-                    item.setMessageId(dataDto.getMsgId());
-                    htByteMapper.updateById(item);
-                    System.out.println("\n互助组信息处理完成。 messageId = " + item.getMessageId() + "\n");
-                    break;
-                case "004":
-                    //边民合作社备案
-                    CooperativeDto cooperativeDto = JSONObject.parseObject(body, CooperativeDto.class);
-                    //保存
-                    flag = levelOneServerInterface.cooperativeDto(cooperativeDto);
-                    if(!flag){
-                        //将完成状态设置成 2 , 表示处理失败
-                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
-                        item.setMessageId(dataDto.getMsgId());
-                        //保存
-                        htByteMapper.updateById(item);
-                        System.out.println("\n边民合作社信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                        //todo: 发送失败信息给管理员
-
-                        break;
-                    }
-                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
-                    item.setMessageId(dataDto.getMsgId());
-                    htByteMapper.updateById(item);
-                    System.out.println("\n边民合作社信息处理完成。 messageId = " + item.getMessageId() + "\n");
-                    break;
-                case "005":
-                    //车辆
-
-                    break;
-                case "006":
-                    //进境申报单
-
-                    break;
-                case "007":
-                    //进口申报单
-
-                    break;
-            }
-        });
+//        //扫描表内是否有待处理任务
+//        List<HtByte> byteList = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, FinishStatus.FINISH_STATUS_ZERO.getCode()));
+//        //判断是否有任务,没有则返回
+//        if(byteList.size() == 0)System.out.println("\n暂无待处理任务。\n");
+//        //执行任务处理流程
+//        byteList.forEach(item -> {
+//            //对象转换
+//            DataDto dataDto = JSONObject.parseObject(item.getBody(), DataDto.class);
+//            //数据解析
+//            String body = AESUtil.decryptCBC(dataDto.getData(), RabbitMQ.ACC_KEY);
+//            //控制台输出
+//            dataDto.setData(body);
+////            System.out.println("开始处理数据: " + dataDto);
+//            //数据处理完成状态
+//            boolean flag = false;
+//            // 根据类型匹配对象
+//            switch (dataDto.getDataType()){
+//                case "001":
+//                    //对象转换
+//                    PeopleDto peopleDto = JSONObject.parseObject(body, PeopleDto.class);
+//                    //根据其内的身份证,有则新增,无则修改???
+//                    flag = levelOneServerInterface.peopleDto(peopleDto);
+//                    if(flag){
+//                        //将完成状态设置成 2 , 表示处理失败
+//                        item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+//                        item.setMessageId(dataDto.getMsgId());
+//                        //保存
+//                        htByteMapper.updateById(item);
+//                        System.out.println("\n边民信息处理完成。 messageId = " + item.getMessageId() + "\n");
+//                        //todo: 发送失败信息给管理员
+//
+//                        break;
+//                    }
+//                    item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+//                    item.setMessageId(dataDto.getMsgId());
+//                    htByteMapper.updateById(item);
+//                    System.out.println("\n边民信息处理失败。 messageId = " + item.getMessageId() + "\n");
+//                    break;
+//                case "002":
+//                    //商铺备案
+//                    ShopDto shopDto = JSONObject.parseObject(body, ShopDto.class);
+//                    //保存
+//                    flag = levelOneServerInterface.shopDto(shopDto);
+//                    if(!flag){
+//                        //将完成状态设置成 2 , 表示处理失败
+//                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+//                        item.setMessageId(dataDto.getMsgId());
+//                        //保存
+//                        htByteMapper.updateById(item);
+//                        System.out.println("\n店铺信息处理失败。 messageId = " + item.getMessageId() + "\n");
+//                        //todo: 发送失败信息给管理员
+//
+//                        break;
+//                    }
+//                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+//                    item.setMessageId(dataDto.getMsgId());
+//                    htByteMapper.updateById(item);
+//                    System.out.println("\n店铺信息处理完成。 messageId = " + item.getMessageId() + "\n");
+//                    break;
+//                case "003":
+//                    //边民互助组备案
+//                    GroupDto groupDto = JSONObject.parseObject(body, GroupDto.class);
+//                    //保存
+//                    flag = levelOneServerInterface.groupDto(groupDto);
+//                    if(!flag){
+//                        //将完成状态设置成 2 , 表示处理失败
+//                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+//                        item.setMessageId(dataDto.getMsgId());
+//                        //保存
+//                        htByteMapper.updateById(item);
+//                        System.out.println("\n互助组信息处理失败。 messageId = " + item.getMessageId() + "\n");
+//                        //todo: 发送失败信息给管理员
+//
+//                        break;
+//                    }
+//                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+//                    item.setMessageId(dataDto.getMsgId());
+//                    htByteMapper.updateById(item);
+//                    System.out.println("\n互助组信息处理完成。 messageId = " + item.getMessageId() + "\n");
+//                    break;
+//                case "004":
+//                    //边民合作社备案
+//                    CooperativeDto cooperativeDto = JSONObject.parseObject(body, CooperativeDto.class);
+//                    //保存
+//                    flag = levelOneServerInterface.cooperativeDto(cooperativeDto);
+//                    if(!flag){
+//                        //将完成状态设置成 2 , 表示处理失败
+//                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+//                        item.setMessageId(dataDto.getMsgId());
+//                        //保存
+//                        htByteMapper.updateById(item);
+//                        System.out.println("\n边民合作社信息处理失败。 messageId = " + item.getMessageId() + "\n");
+//                        //todo: 发送失败信息给管理员
+//
+//                        break;
+//                    }
+//                    item.setFinishStatus(FinishStatus.FINISH_STATUS_ONE.getCode());
+//                    item.setMessageId(dataDto.getMsgId());
+//                    htByteMapper.updateById(item);
+//                    System.out.println("\n边民合作社信息处理完成。 messageId = " + item.getMessageId() + "\n");
+//                    break;
+//                case "005":
+//                    //车辆
+//
+//                    break;
+//                case "006":
+//                    //进境申报单
+//
+//                    break;
+//                case "007":
+//                    //进口申报单
+//
+//                    break;
+//            }
+//        });
 
 
     }
     }
 
 

+ 9 - 3
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java

@@ -426,7 +426,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 
 
 		// TODO: 2023/8/29 同步交易信息(由于目前未知航通传过来的订单数据形式,暂未做)
 		// TODO: 2023/8/29 同步交易信息(由于目前未知航通传过来的订单数据形式,暂未做)
 		// TODO: 2023/8/29 监听航通传过来的大订单里的所有边民订单,当所有边民都进行订单确认后,调用航通接口发送信息
 		// TODO: 2023/8/29 监听航通传过来的大订单里的所有边民订单,当所有边民都进行订单确认后,调用航通接口发送信息
-		asyncServerInterface.sendObject(tbOrderMapper.selectById(orderId),DataType.DATA_TYPE_ONE.getCode()); // 发送至航通
+		OrderDto tbOrderDto = new OrderDto();
+		BeanUtils.copyProperties(tbOrderMapper.selectById(orderId),tbOrderDto);
+		asyncServerInterface.sendLevelOneOrderDto(tbOrderDto,DataType.DATA_TYPE_ONE.getCode()); // 发送至航通
 
 
 		return result;
 		return result;
 	}
 	}
@@ -452,7 +454,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 
 
 		// TODO: 2023/8/29 发送信息(由于目前未知航通传过来的订单数据形式,暂未做)
 		// TODO: 2023/8/29 发送信息(由于目前未知航通传过来的订单数据形式,暂未做)
 		// TODO: 2023/8/29 监听航通传过来的大订单里的所有边民订单,当所有边民都进行进口申报确认后,调用航通接口发送信息
 		// TODO: 2023/8/29 监听航通传过来的大订单里的所有边民订单,当所有边民都进行进口申报确认后,调用航通接口发送信息
-		asyncServerInterface.sendObject(tbOrderMapper.selectById(orderId),DataType.DATA_TYPE_TWO.getCode());
+		OrderDto tbOrderDto = new OrderDto();
+		BeanUtils.copyProperties(tbOrderMapper.selectById(orderId),tbOrderDto);
+		asyncServerInterface.sendLevelOneOrderDto(tbOrderDto,DataType.DATA_TYPE_TWO.getCode());
 
 
 		return result;
 		return result;
 	}
 	}
@@ -490,7 +494,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		}
 		}
 
 
 		//3、todo: 调用航通接口,发送划扣成功回执信息给航通(只发送)
 		//3、todo: 调用航通接口,发送划扣成功回执信息给航通(只发送)
-		asyncServerInterface.sendObject(order,DataType.DATA_TYPE_THREE.getCode());
+		OrderDto tbOrderDto = new OrderDto();
+		BeanUtils.copyProperties(order,tbOrderDto);
+		asyncServerInterface.sendLevelOneOrderDto(tbOrderDto,DataType.DATA_TYPE_THREE.getCode());
 	}
 	}
 
 
 	/** 远程调用  查订单 */
 	/** 远程调用  查订单 */

+ 4 - 1
sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersService.java

@@ -13,6 +13,7 @@ import com.pj.api.client.async_server.AsyncServerInterface;
 import com.pj.api.client.level_one_server.LevelOneServerInterface;
 import com.pj.api.client.level_one_server.LevelOneServerInterface;
 import com.pj.api.dto.GoodsDto;
 import com.pj.api.dto.GoodsDto;
 import com.pj.api.dto.MessageDto;
 import com.pj.api.dto.MessageDto;
+import com.pj.api.dto.OrdersDto;
 import com.pj.common.core.text.Convert;
 import com.pj.common.core.text.Convert;
 import com.pj.common.core.utils.StringUtils;
 import com.pj.common.core.utils.StringUtils;
 import com.pj.current.config.SystemObject;
 import com.pj.current.config.SystemObject;
@@ -117,7 +118,9 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
         //todo 接收国内采购商的货款支付申请,划扣至边民账户并给出回执 并且同步至航通
         //todo 接收国内采购商的货款支付申请,划扣至边民账户并给出回执 并且同步至航通
         orders.setIsPay(1);//支付成功
         orders.setIsPay(1);//支付成功
         orders.setPayTime(new Date());
         orders.setPayTime(new Date());
-        asyncServerInterface.sendObject(orders, DataType.DATA_TYPE_FOUR.getCode()); // 发送航通
+        OrdersDto ordersDto = new OrdersDto();
+        BeanUtils.copyProperties(orders,ordersDto);
+        asyncServerInterface.sendLevelTwoOrdersDto(ordersDto, DataType.DATA_TYPE_FOUR.getCode()); // 发送航通
 
 
         for (Long id : idArr) {
         for (Long id : idArr) {