linbl 1 рік тому
батько
коміт
0f9ce4de16
25 змінених файлів з 1761 додано та 309 видалено
  1. 1 1
      sp-core/sp-api/src/main/java/com/pj/api/client/async_server/AsyncServerInterface.java
  2. 5 1
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java
  3. 6 0
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterfaceFallback.java
  4. 38 20
      sp-core/sp-api/src/main/java/com/pj/api/dto/BordersListDto.java
  5. 65 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/HtIeportDeclBillsBpDto.java
  6. 120 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/HtIeportDeclBillsBpLimitDto.java
  7. 241 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/HtIeportDeclBillsGoodsDto.java
  8. 508 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/HtImportOrderDto.java
  9. 1 1
      sp-service/async-server/src/main/java/com/pj/feign/AmqpTemplateController.java
  10. 10 0
      sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java
  11. 172 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoods.java
  12. 85 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsController.java
  13. 4 4
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsMapper.java
  14. 89 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsMapper.xml
  15. 13 16
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsService.java
  16. 109 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrder.java
  17. 8 11
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderAppController.java
  18. 95 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderController.java
  19. 30 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.java
  20. 7 25
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.xml
  21. 104 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderService.java
  22. 0 125
      sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrder.java
  23. 0 87
      sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderController.java
  24. 12 0
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrder.java
  25. 38 18
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java

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

@@ -43,7 +43,7 @@ public interface AsyncServerInterface {
     /**
      * 发送边民确认信息
      */
-    @RequestMapping("async/rpc/sendConfirm")
+    @RequestMapping("/async/rpc/sendConfirm")
     void sendConfirm(@RequestBody PeopleConfirmDTO confirmDTO);
 
     /** 远程调用: 根据便民身份证号 和 进出口结算单号查询[进口申报单边民确认] 将该对象返还航通 */

+ 5 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java

@@ -23,7 +23,11 @@ import java.util.List;
 public interface LevelOneServerInterface {
 
 
-    /** 远程调用: 添加大订单时同事生成小定单 */
+    /** 远程调用 进口申报单同步 */
+    @RequestMapping("/TbIportOrder/rpc/importOrderDto")
+    public boolean importOrderDto(@RequestBody HtImportOrderDto importOrderDto);
+
+    /** 远程调用: 添加大订单时同时生成小订单 */
     @RequestMapping("/HtTradeSettlement/rpc/tradeSettlementDto")
     public boolean tradeSettlementDto(@RequestBody TradeSettlementDto tradeSettlementDto);
 

+ 6 - 0
sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterfaceFallback.java

@@ -24,6 +24,12 @@ public class LevelOneServerInterfaceFallback implements FallbackFactory<LevelOne
     public LevelOneServerInterface create(Throwable throwable) {
         return new LevelOneServerInterface() {
             @Override
+            public boolean importOrderDto(HtImportOrderDto importOrderDto) {
+                log.error("同步航通进口申报单时发生错误,当前对象:{},错误信息是:{}",importOrderDto.toString(),throwable.getMessage());
+                return false;
+            }
+
+            @Override
             public boolean tradeSettlementDto(TradeSettlementDto tradeSettlementDto) {
                 log.error("接收航通订单表信息时,生成大订单和小定单时错误,当前对象:{},错误信息是:{}",tradeSettlementDto.toString(),throwable.getMessage());
                 return false;

+ 38 - 20
sp-core/sp-api/src/main/java/com/pj/api/dto/BordersListDto.java

@@ -81,6 +81,15 @@ public class BordersListDto {
 
     private String preNo;
 
+    /** 边民额度序号 */
+    private Integer limitNo;
+
+    /** 商品额度 */
+    private Double gLimit;
+
+    /** 商品序号 */
+    private Integer gNo;
+
     public String getPreNo() {
         return preNo;
     }
@@ -89,25 +98,6 @@ public class BordersListDto {
         this.preNo = preNo;
     }
 
-    public BordersListDto(Long id, String platSeqNo, String borderName, String idno, String borderPutrecNo, String settleBillNo, Double buyAmount, Double netWt, Double grossWt, Double buyQty, Double buyQty1, Double buyQty2, String preIeportNo, Date createTime, Integer finishStatus, String preNo) {
-        this.id = id;
-        this.platSeqNo = platSeqNo;
-        this.borderName = borderName;
-        this.idno = idno;
-        this.borderPutrecNo = borderPutrecNo;
-        this.settleBillNo = settleBillNo;
-        this.buyAmount = buyAmount;
-        this.netWt = netWt;
-        this.grossWt = grossWt;
-        this.buyQty = buyQty;
-        this.buyQty1 = buyQty1;
-        this.buyQty2 = buyQty2;
-        this.preIeportNo = preIeportNo;
-        this.createTime = createTime;
-        this.finishStatus = finishStatus;
-        this.preNo = preNo;
-    }
-
     public Long getId() {
         return id;
     }
@@ -228,7 +218,31 @@ public class BordersListDto {
         this.finishStatus = finishStatus;
     }
 
-    public BordersListDto(Long id, String platSeqNo, String borderName, String idno, String borderPutrecNo, String settleBillNo, Double buyAmount, Double netWt, Double grossWt, Double buyQty, Double buyQty1, Double buyQty2, String preIeportNo, Date createTime, Integer finishStatus) {
+    public Integer getLimitNo() {
+        return limitNo;
+    }
+
+    public void setLimitNo(Integer limitNo) {
+        this.limitNo = limitNo;
+    }
+
+    public Double getgLimit() {
+        return gLimit;
+    }
+
+    public void setgLimit(Double gLimit) {
+        this.gLimit = gLimit;
+    }
+
+    public Integer getgNo() {
+        return gNo;
+    }
+
+    public void setgNo(Integer gNo) {
+        this.gNo = gNo;
+    }
+
+    public BordersListDto(Long id, String platSeqNo, String borderName, String idno, String borderPutrecNo, String settleBillNo, Double buyAmount, Double netWt, Double grossWt, Double buyQty, Double buyQty1, Double buyQty2, String preIeportNo, Date createTime, Integer finishStatus, String preNo, Integer limitNo, Double gLimit, Integer gNo) {
         this.id = id;
         this.platSeqNo = platSeqNo;
         this.borderName = borderName;
@@ -244,6 +258,10 @@ public class BordersListDto {
         this.preIeportNo = preIeportNo;
         this.createTime = createTime;
         this.finishStatus = finishStatus;
+        this.preNo = preNo;
+        this.limitNo = limitNo;
+        this.gLimit = gLimit;
+        this.gNo = gNo;
     }
 
     public BordersListDto() {

+ 65 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtIeportDeclBillsBpDto.java

@@ -0,0 +1,65 @@
+package com.pj.api.dto;
+
+public class HtIeportDeclBillsBpDto {
+
+    private String platSeqNo;
+
+    private String borderNo;
+
+    private String borderName;
+
+    private String ciphertextIdno;
+
+    private String borderPutrecNo;
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getBorderNo() {
+        return borderNo;
+    }
+
+    public void setBorderNo(String borderNo) {
+        this.borderNo = borderNo;
+    }
+
+    public String getBorderName() {
+        return borderName;
+    }
+
+    public void setBorderName(String borderName) {
+        this.borderName = borderName;
+    }
+
+    public String getCiphertextIdno() {
+        return ciphertextIdno;
+    }
+
+    public void setCiphertextIdno(String ciphertextIdno) {
+        this.ciphertextIdno = ciphertextIdno;
+    }
+
+    public String getBorderPutrecNo() {
+        return borderPutrecNo;
+    }
+
+    public void setBorderPutrecNo(String borderPutrecNo) {
+        this.borderPutrecNo = borderPutrecNo;
+    }
+
+    public HtIeportDeclBillsBpDto(String platSeqNo, String borderNo, String borderName, String ciphertextIdno, String borderPutrecNo) {
+        this.platSeqNo = platSeqNo;
+        this.borderNo = borderNo;
+        this.borderName = borderName;
+        this.ciphertextIdno = ciphertextIdno;
+        this.borderPutrecNo = borderPutrecNo;
+    }
+
+    public HtIeportDeclBillsBpDto() {
+    }
+}

+ 120 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtIeportDeclBillsBpLimitDto.java

@@ -0,0 +1,120 @@
+package com.pj.api.dto;
+
+public class HtIeportDeclBillsBpLimitDto {
+
+    private String platSeqNo;
+
+    private String limitNo;
+
+    private String borderName;
+
+    private String ciphertextIdno;
+
+    private String borderPutrecNo;
+
+    private String codeTs;
+
+    private String gName;
+
+    private String gLimit;
+
+    private String gGrossWt;
+
+    private String gNo;
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getLimitNo() {
+        return limitNo;
+    }
+
+    public void setLimitNo(String limitNo) {
+        this.limitNo = limitNo;
+    }
+
+    public String getBorderName() {
+        return borderName;
+    }
+
+    public void setBorderName(String borderName) {
+        this.borderName = borderName;
+    }
+
+    public String getCiphertextIdno() {
+        return ciphertextIdno;
+    }
+
+    public void setCiphertextIdno(String ciphertextIdno) {
+        this.ciphertextIdno = ciphertextIdno;
+    }
+
+    public String getBorderPutrecNo() {
+        return borderPutrecNo;
+    }
+
+    public void setBorderPutrecNo(String borderPutrecNo) {
+        this.borderPutrecNo = borderPutrecNo;
+    }
+
+    public String getCodeTs() {
+        return codeTs;
+    }
+
+    public void setCodeTs(String codeTs) {
+        this.codeTs = codeTs;
+    }
+
+    public String getgName() {
+        return gName;
+    }
+
+    public void setgName(String gName) {
+        this.gName = gName;
+    }
+
+    public String getgLimit() {
+        return gLimit;
+    }
+
+    public void setgLimit(String gLimit) {
+        this.gLimit = gLimit;
+    }
+
+    public String getgGrossWt() {
+        return gGrossWt;
+    }
+
+    public void setgGrossWt(String gGrossWt) {
+        this.gGrossWt = gGrossWt;
+    }
+
+    public String getgNo() {
+        return gNo;
+    }
+
+    public void setgNo(String gNo) {
+        this.gNo = gNo;
+    }
+
+    public HtIeportDeclBillsBpLimitDto(String platSeqNo, String limitNo, String borderName, String ciphertextIdno, String borderPutrecNo, String codeTs, String gName, String gLimit, String gGrossWt, String gNo) {
+        this.platSeqNo = platSeqNo;
+        this.limitNo = limitNo;
+        this.borderName = borderName;
+        this.ciphertextIdno = ciphertextIdno;
+        this.borderPutrecNo = borderPutrecNo;
+        this.codeTs = codeTs;
+        this.gName = gName;
+        this.gLimit = gLimit;
+        this.gGrossWt = gGrossWt;
+        this.gNo = gNo;
+    }
+
+    public HtIeportDeclBillsBpLimitDto() {
+    }
+}

+ 241 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtIeportDeclBillsGoodsDto.java

@@ -0,0 +1,241 @@
+package com.pj.api.dto;
+
+public class HtIeportDeclBillsGoodsDto {
+
+    private String platSeqNo;
+    private String gNo;
+    private String codeTs;
+    private String gName;
+    private String gModel;
+    private String gQty;
+    private String qty1;
+    private String qty2;
+    private String grossWt;
+    private String netWt;
+    private String originCountry;
+    private String gUnit;
+    private String unit1;
+    private String unit2;
+    private String declPrice;
+    private String declTotal;
+    private String storageEnvm;
+    private String useTo;
+    private String shopNo;
+    private String shopName;
+    private String ciqCode;
+    private String ciqName;
+    private String wrapType;
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getgNo() {
+        return gNo;
+    }
+
+    public void setgNo(String gNo) {
+        this.gNo = gNo;
+    }
+
+    public String getCodeTs() {
+        return codeTs;
+    }
+
+    public void setCodeTs(String codeTs) {
+        this.codeTs = codeTs;
+    }
+
+    public String getgName() {
+        return gName;
+    }
+
+    public void setgName(String gName) {
+        this.gName = gName;
+    }
+
+    public String getgModel() {
+        return gModel;
+    }
+
+    public void setgModel(String gModel) {
+        this.gModel = gModel;
+    }
+
+    public String getgQty() {
+        return gQty;
+    }
+
+    public void setgQty(String gQty) {
+        this.gQty = gQty;
+    }
+
+    public String getQty1() {
+        return qty1;
+    }
+
+    public void setQty1(String qty1) {
+        this.qty1 = qty1;
+    }
+
+    public String getQty2() {
+        return qty2;
+    }
+
+    public void setQty2(String qty2) {
+        this.qty2 = qty2;
+    }
+
+    public String getGrossWt() {
+        return grossWt;
+    }
+
+    public void setGrossWt(String grossWt) {
+        this.grossWt = grossWt;
+    }
+
+    public String getNetWt() {
+        return netWt;
+    }
+
+    public void setNetWt(String netWt) {
+        this.netWt = netWt;
+    }
+
+    public String getOriginCountry() {
+        return originCountry;
+    }
+
+    public void setOriginCountry(String originCountry) {
+        this.originCountry = originCountry;
+    }
+
+    public String getgUnit() {
+        return gUnit;
+    }
+
+    public void setgUnit(String gUnit) {
+        this.gUnit = gUnit;
+    }
+
+    public String getUnit1() {
+        return unit1;
+    }
+
+    public void setUnit1(String unit1) {
+        this.unit1 = unit1;
+    }
+
+    public String getUnit2() {
+        return unit2;
+    }
+
+    public void setUnit2(String unit2) {
+        this.unit2 = unit2;
+    }
+
+    public String getDeclPrice() {
+        return declPrice;
+    }
+
+    public void setDeclPrice(String declPrice) {
+        this.declPrice = declPrice;
+    }
+
+    public String getDeclTotal() {
+        return declTotal;
+    }
+
+    public void setDeclTotal(String declTotal) {
+        this.declTotal = declTotal;
+    }
+
+    public String getStorageEnvm() {
+        return storageEnvm;
+    }
+
+    public void setStorageEnvm(String storageEnvm) {
+        this.storageEnvm = storageEnvm;
+    }
+
+    public String getUseTo() {
+        return useTo;
+    }
+
+    public void setUseTo(String useTo) {
+        this.useTo = useTo;
+    }
+
+    public String getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(String shopNo) {
+        this.shopNo = shopNo;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getCiqCode() {
+        return ciqCode;
+    }
+
+    public void setCiqCode(String ciqCode) {
+        this.ciqCode = ciqCode;
+    }
+
+    public String getCiqName() {
+        return ciqName;
+    }
+
+    public void setCiqName(String ciqName) {
+        this.ciqName = ciqName;
+    }
+
+    public String getWrapType() {
+        return wrapType;
+    }
+
+    public void setWrapType(String wrapType) {
+        this.wrapType = wrapType;
+    }
+
+    public HtIeportDeclBillsGoodsDto(String platSeqNo, String gNo, String codeTs, String gName, String gModel, String gQty, String qty1, String qty2, String grossWt, String netWt, String originCountry, String gUnit, String unit1, String unit2, String declPrice, String declTotal, String storageEnvm, String useTo, String shopNo, String shopName, String ciqCode, String ciqName, String wrapType) {
+        this.platSeqNo = platSeqNo;
+        this.gNo = gNo;
+        this.codeTs = codeTs;
+        this.gName = gName;
+        this.gModel = gModel;
+        this.gQty = gQty;
+        this.qty1 = qty1;
+        this.qty2 = qty2;
+        this.grossWt = grossWt;
+        this.netWt = netWt;
+        this.originCountry = originCountry;
+        this.gUnit = gUnit;
+        this.unit1 = unit1;
+        this.unit2 = unit2;
+        this.declPrice = declPrice;
+        this.declTotal = declTotal;
+        this.storageEnvm = storageEnvm;
+        this.useTo = useTo;
+        this.shopNo = shopNo;
+        this.shopName = shopName;
+        this.ciqCode = ciqCode;
+        this.ciqName = ciqName;
+        this.wrapType = wrapType;
+    }
+
+    public HtIeportDeclBillsGoodsDto() {
+    }
+}

+ 508 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtImportOrderDto.java

@@ -0,0 +1,508 @@
+package com.pj.api.dto;
+
+public class HtImportOrderDto {
+
+    private Integer platSeqNo;
+    private String preNo;
+    private String itrdclDeclareId;
+    private String declareId;
+    private String declareType;
+    private String declareName;
+    private String ciphertextIdno;
+    private Integer shopNo;
+    private Integer shopName;
+    private String orgPutrecNo;
+    private String orgName;
+    private String orgScc;
+    private String veNo;
+    private String vehicleType;
+    private String btrnbBizModecd;
+    private String gFlow;
+    private String iEFlag;
+    private String fieldCode;
+    private String fieldName;
+    private String customsCode;
+    private String carPool;
+    private String note;
+    private String sumAmt;
+    private String sumGrossWt;
+    private String sumNetWt;
+    private String trafMode;
+    private String currCode;
+    private String packNo;
+    private String tradeCountry;
+    private String mName;
+    private String mScc;
+    private String shareFlag;
+    private String dclType;
+    private String mdfblRvkRsn;
+    private String borderFlag;
+    private String delStatus;
+    private String declStatus;
+    private String declTime;
+    private String rcptTime;
+    private String auditRemark;
+    private String agentCode;
+    private String manifestId;
+    private String shopPutrecNo;
+    private String borderId;
+    private String msgId;
+    private String entCode;
+    private String entName;
+    private String borderPeopleList;
+    private String borderPeopleLimitList;
+    private String goodsList;
+
+    public Integer getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(Integer platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getPreNo() {
+        return preNo;
+    }
+
+    public void setPreNo(String preNo) {
+        this.preNo = preNo;
+    }
+
+    public String getItrdclDeclareId() {
+        return itrdclDeclareId;
+    }
+
+    public void setItrdclDeclareId(String itrdclDeclareId) {
+        this.itrdclDeclareId = itrdclDeclareId;
+    }
+
+    public String getDeclareId() {
+        return declareId;
+    }
+
+    public void setDeclareId(String declareId) {
+        this.declareId = declareId;
+    }
+
+    public String getDeclareType() {
+        return declareType;
+    }
+
+    public void setDeclareType(String declareType) {
+        this.declareType = declareType;
+    }
+
+    public String getDeclareName() {
+        return declareName;
+    }
+
+    public void setDeclareName(String declareName) {
+        this.declareName = declareName;
+    }
+
+    public String getCiphertextIdno() {
+        return ciphertextIdno;
+    }
+
+    public void setCiphertextIdno(String ciphertextIdno) {
+        this.ciphertextIdno = ciphertextIdno;
+    }
+
+    public Integer getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(Integer shopNo) {
+        this.shopNo = shopNo;
+    }
+
+    public Integer getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(Integer shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getOrgPutrecNo() {
+        return orgPutrecNo;
+    }
+
+    public void setOrgPutrecNo(String orgPutrecNo) {
+        this.orgPutrecNo = orgPutrecNo;
+    }
+
+    public String getOrgName() {
+        return orgName;
+    }
+
+    public void setOrgName(String orgName) {
+        this.orgName = orgName;
+    }
+
+    public String getOrgScc() {
+        return orgScc;
+    }
+
+    public void setOrgScc(String orgScc) {
+        this.orgScc = orgScc;
+    }
+
+    public String getVeNo() {
+        return veNo;
+    }
+
+    public void setVeNo(String veNo) {
+        this.veNo = veNo;
+    }
+
+    public String getVehicleType() {
+        return vehicleType;
+    }
+
+    public void setVehicleType(String vehicleType) {
+        this.vehicleType = vehicleType;
+    }
+
+    public String getBtrnbBizModecd() {
+        return btrnbBizModecd;
+    }
+
+    public void setBtrnbBizModecd(String btrnbBizModecd) {
+        this.btrnbBizModecd = btrnbBizModecd;
+    }
+
+    public String getgFlow() {
+        return gFlow;
+    }
+
+    public void setgFlow(String gFlow) {
+        this.gFlow = gFlow;
+    }
+
+    public String getiEFlag() {
+        return iEFlag;
+    }
+
+    public void setiEFlag(String iEFlag) {
+        this.iEFlag = iEFlag;
+    }
+
+    public String getFieldCode() {
+        return fieldCode;
+    }
+
+    public void setFieldCode(String fieldCode) {
+        this.fieldCode = fieldCode;
+    }
+
+    public String getFieldName() {
+        return fieldName;
+    }
+
+    public void setFieldName(String fieldName) {
+        this.fieldName = fieldName;
+    }
+
+    public String getCustomsCode() {
+        return customsCode;
+    }
+
+    public void setCustomsCode(String customsCode) {
+        this.customsCode = customsCode;
+    }
+
+    public String getCarPool() {
+        return carPool;
+    }
+
+    public void setCarPool(String carPool) {
+        this.carPool = carPool;
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note;
+    }
+
+    public String getSumAmt() {
+        return sumAmt;
+    }
+
+    public void setSumAmt(String sumAmt) {
+        this.sumAmt = sumAmt;
+    }
+
+    public String getSumGrossWt() {
+        return sumGrossWt;
+    }
+
+    public void setSumGrossWt(String sumGrossWt) {
+        this.sumGrossWt = sumGrossWt;
+    }
+
+    public String getSumNetWt() {
+        return sumNetWt;
+    }
+
+    public void setSumNetWt(String sumNetWt) {
+        this.sumNetWt = sumNetWt;
+    }
+
+    public String getTrafMode() {
+        return trafMode;
+    }
+
+    public void setTrafMode(String trafMode) {
+        this.trafMode = trafMode;
+    }
+
+    public String getCurrCode() {
+        return currCode;
+    }
+
+    public void setCurrCode(String currCode) {
+        this.currCode = currCode;
+    }
+
+    public String getPackNo() {
+        return packNo;
+    }
+
+    public void setPackNo(String packNo) {
+        this.packNo = packNo;
+    }
+
+    public String getTradeCountry() {
+        return tradeCountry;
+    }
+
+    public void setTradeCountry(String tradeCountry) {
+        this.tradeCountry = tradeCountry;
+    }
+
+    public String getmName() {
+        return mName;
+    }
+
+    public void setmName(String mName) {
+        this.mName = mName;
+    }
+
+    public String getmScc() {
+        return mScc;
+    }
+
+    public void setmScc(String mScc) {
+        this.mScc = mScc;
+    }
+
+    public String getShareFlag() {
+        return shareFlag;
+    }
+
+    public void setShareFlag(String shareFlag) {
+        this.shareFlag = shareFlag;
+    }
+
+    public String getDclType() {
+        return dclType;
+    }
+
+    public void setDclType(String dclType) {
+        this.dclType = dclType;
+    }
+
+    public String getMdfblRvkRsn() {
+        return mdfblRvkRsn;
+    }
+
+    public void setMdfblRvkRsn(String mdfblRvkRsn) {
+        this.mdfblRvkRsn = mdfblRvkRsn;
+    }
+
+    public String getBorderFlag() {
+        return borderFlag;
+    }
+
+    public void setBorderFlag(String borderFlag) {
+        this.borderFlag = borderFlag;
+    }
+
+    public String getDelStatus() {
+        return delStatus;
+    }
+
+    public void setDelStatus(String delStatus) {
+        this.delStatus = delStatus;
+    }
+
+    public String getDeclStatus() {
+        return declStatus;
+    }
+
+    public void setDeclStatus(String declStatus) {
+        this.declStatus = declStatus;
+    }
+
+    public String getDeclTime() {
+        return declTime;
+    }
+
+    public void setDeclTime(String declTime) {
+        this.declTime = declTime;
+    }
+
+    public String getRcptTime() {
+        return rcptTime;
+    }
+
+    public void setRcptTime(String rcptTime) {
+        this.rcptTime = rcptTime;
+    }
+
+    public String getAuditRemark() {
+        return auditRemark;
+    }
+
+    public void setAuditRemark(String auditRemark) {
+        this.auditRemark = auditRemark;
+    }
+
+    public String getAgentCode() {
+        return agentCode;
+    }
+
+    public void setAgentCode(String agentCode) {
+        this.agentCode = agentCode;
+    }
+
+    public String getManifestId() {
+        return manifestId;
+    }
+
+    public void setManifestId(String manifestId) {
+        this.manifestId = manifestId;
+    }
+
+    public String getShopPutrecNo() {
+        return shopPutrecNo;
+    }
+
+    public void setShopPutrecNo(String shopPutrecNo) {
+        this.shopPutrecNo = shopPutrecNo;
+    }
+
+    public String getBorderId() {
+        return borderId;
+    }
+
+    public void setBorderId(String borderId) {
+        this.borderId = borderId;
+    }
+
+    public String getMsgId() {
+        return msgId;
+    }
+
+    public void setMsgId(String msgId) {
+        this.msgId = msgId;
+    }
+
+    public String getEntCode() {
+        return entCode;
+    }
+
+    public void setEntCode(String entCode) {
+        this.entCode = entCode;
+    }
+
+    public String getEntName() {
+        return entName;
+    }
+
+    public void setEntName(String entName) {
+        this.entName = entName;
+    }
+
+    public String getBorderPeopleList() {
+        return borderPeopleList;
+    }
+
+    public void setBorderPeopleList(String borderPeopleList) {
+        this.borderPeopleList = borderPeopleList;
+    }
+
+    public String getBorderPeopleLimitList() {
+        return borderPeopleLimitList;
+    }
+
+    public void setBorderPeopleLimitList(String borderPeopleLimitList) {
+        this.borderPeopleLimitList = borderPeopleLimitList;
+    }
+
+    public String getGoodsList() {
+        return goodsList;
+    }
+
+    public void setGoodsList(String goodsList) {
+        this.goodsList = goodsList;
+    }
+
+    public HtImportOrderDto(Integer platSeqNo, String preNo, String itrdclDeclareId, String declareId, String declareType, String declareName, String ciphertextIdno, Integer shopNo, Integer shopName, String orgPutrecNo, String orgName, String orgScc, String veNo, String vehicleType, String btrnbBizModecd, String gFlow, String iEFlag, String fieldCode, String fieldName, String customsCode, String carPool, String note, String sumAmt, String sumGrossWt, String sumNetWt, String trafMode, String currCode, String packNo, String tradeCountry, String mName, String mScc, String shareFlag, String dclType, String mdfblRvkRsn, String borderFlag, String delStatus, String declStatus, String declTime, String rcptTime, String auditRemark, String agentCode, String manifestId, String shopPutrecNo, String borderId, String msgId, String entCode, String entName, String borderPeopleList, String borderPeopleLimitList, String goodsList) {
+        this.platSeqNo = platSeqNo;
+        this.preNo = preNo;
+        this.itrdclDeclareId = itrdclDeclareId;
+        this.declareId = declareId;
+        this.declareType = declareType;
+        this.declareName = declareName;
+        this.ciphertextIdno = ciphertextIdno;
+        this.shopNo = shopNo;
+        this.shopName = shopName;
+        this.orgPutrecNo = orgPutrecNo;
+        this.orgName = orgName;
+        this.orgScc = orgScc;
+        this.veNo = veNo;
+        this.vehicleType = vehicleType;
+        this.btrnbBizModecd = btrnbBizModecd;
+        this.gFlow = gFlow;
+        this.iEFlag = iEFlag;
+        this.fieldCode = fieldCode;
+        this.fieldName = fieldName;
+        this.customsCode = customsCode;
+        this.carPool = carPool;
+        this.note = note;
+        this.sumAmt = sumAmt;
+        this.sumGrossWt = sumGrossWt;
+        this.sumNetWt = sumNetWt;
+        this.trafMode = trafMode;
+        this.currCode = currCode;
+        this.packNo = packNo;
+        this.tradeCountry = tradeCountry;
+        this.mName = mName;
+        this.mScc = mScc;
+        this.shareFlag = shareFlag;
+        this.dclType = dclType;
+        this.mdfblRvkRsn = mdfblRvkRsn;
+        this.borderFlag = borderFlag;
+        this.delStatus = delStatus;
+        this.declStatus = declStatus;
+        this.declTime = declTime;
+        this.rcptTime = rcptTime;
+        this.auditRemark = auditRemark;
+        this.agentCode = agentCode;
+        this.manifestId = manifestId;
+        this.shopPutrecNo = shopPutrecNo;
+        this.borderId = borderId;
+        this.msgId = msgId;
+        this.entCode = entCode;
+        this.entName = entName;
+        this.borderPeopleList = borderPeopleList;
+        this.borderPeopleLimitList = borderPeopleLimitList;
+        this.goodsList = goodsList;
+    }
+}

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

@@ -50,6 +50,6 @@ public class AmqpTemplateController {
      */
     @RequestMapping("rpc/sendConfirm")
     public void sendConfirm(@RequestBody PeopleConfirmDTO confirmDTO){
-        amqpTemplateFeign.sendObject(confirmDTO,"008");
+        amqpTemplateFeign.sendObject(confirmDTO,"009");
     }
 }

+ 10 - 0
sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java

@@ -232,6 +232,16 @@ public class HtByteTask {
 
                     break;
                 case "008":
+                    HtImportOrderDto importOrderDto = JSONObject.parseObject(body, HtImportOrderDto.class);
+                    boolean result = FeignFactory.levelOneServerInterface.importOrderDto(importOrderDto);
+                    methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
+                    if(result){
+                        System.err.println("\n进口申报单同步处理成功。 messageId = " + item.getMessageId() + "\n");
+                    }else {
+                        System.err.println("\n进口申报单同步处理成功。 messageId = " + item.getMessageId() + "\n");
+                    }
+                    break;
+                case "009":
                     //进口申报单边民确认
                     HtImportDeclarePeople htImportDeclarePeople = JSONObject.parseObject(body, HtImportDeclarePeople.class);
                     htImportDeclarePeople.setFinishStatus(FinishStatus.FINISH_STATUS_ZERO.getCode());

+ 172 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoods.java

@@ -0,0 +1,172 @@
+package com.pj.tb_import_goods;
+
+import java.io.Serializable;
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_import_goods -- 进口申报单商品信息
+ * @author lbl
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbImportGoods.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbImportGoods extends Model<TbImportGoods> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 此模块对应的表名
+	 */
+	public static final String TABLE_NAME = "tb_import_goods";
+	/**
+	 * 此模块对应的权限码
+	 */
+	public static final String PERMISSION_CODE = "tb-import-goods";
+	public static final String PERMISSION_CODE_ADD = "tb-import-goods-add";
+	public static final String PERMISSION_CODE_EDIT = "tb-import-goods-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-import-goods-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;
+
+	/** 进口申报单Id */
+	private Long importOrderId;
+	/**
+	 * 业务编号
+	 */
+	private String platSeqNo;
+
+	/**
+	 * 商品序号
+	 */
+	private Integer gNo;
+
+	/**
+	 * 商品编码
+	 */
+	private String codeTs;
+
+	/**
+	 * 商品名称
+	 */
+	private String gName;
+
+	/**
+	 * 规格型号
+	 */
+	private String gModel;
+
+	/**
+	 * 申报数量
+	 */
+	private String gQty;
+
+	/**
+	 * 第一数量
+	 */
+	private Double qty1;
+
+	/**
+	 * 商品第二数量
+	 */
+	private Double qty2;
+
+	/**
+	 * 商品毛重
+	 */
+	private Double grossWt;
+
+	/**
+	 * 商品净重
+	 */
+	private Double netWt;
+
+	/**
+	 * 商品产销国
+	 */
+	private String originCountry;
+
+	/**
+	 * 申报计量单位:参见计量单位参数表
+	 */
+	private String gUnit;
+
+	/**
+	 * 商品第一计量单位
+	 */
+	private String unit1;
+
+	/**
+	 * 商品第二计量单位
+	 */
+	private String unit2;
+
+	/**
+	 * 商品申报单价
+	 */
+	private Double declPrice;
+
+	/**
+	 * 申报总价
+	 */
+	private Double declTotal;
+
+	/**
+	 * 储存条件:1常温 2冷藏 3冷冻
+	 */
+	private String storageEnvm;
+
+	/**
+	 * 商品用途
+	 */
+	private String useTo;
+
+	/**
+	 * 商铺编码
+	 */
+	private String shopNo;
+
+	/**
+	 * 商铺名称
+	 */
+	private String shopName;
+
+	/**
+	 * 检疫检疫代码
+	 */
+	private String ciqCode;
+
+	/**
+	 * 检疫检疫名称
+	 */
+	private String ciqName;
+
+	/**
+	 * 包装类型
+	 */
+	private String wrapType;
+
+
+
+
+
+
+
+
+}

+ 85 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsController.java

@@ -0,0 +1,85 @@
+package com.pj.tb_import_goods;
+
+import java.util.List;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_import_goods -- 进口申报单商品信息
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/TbImportGoods/")
+public class TbImportGoodsController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbImportGoodsService tbImportGoodsService;
+
+	/** 增 */
+	@RequestMapping("add")
+	@SaCheckPermission(TbImportGoods.PERMISSION_CODE_ADD)
+	public AjaxJson add(TbImportGoods t){
+		tbImportGoodsService.add(t);
+		t = tbImportGoodsService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */
+	@RequestMapping("delete")
+	@SaCheckPermission(TbImportGoods.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 tbImportGoodsService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 删 - 根据id列表 */
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbImportGoods.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+		int line = SP.publicMapper.deleteByIds(TbImportGoods.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 改 */
+	@RequestMapping("update")
+	@SaCheckPermission(TbImportGoods.PERMISSION_CODE_EDIT)
+	public AjaxJson update(TbImportGoods t){
+		tbImportGoodsService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */
+	@RequestMapping("getById")
+		@SaCheckPermission(TbImportGoods.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		TbImportGoods t = tbImportGoodsService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	@RequestMapping("getList")
+		@SaCheckPermission(TbImportGoods.PERMISSION_CODE)
+	public AjaxJson getList() {
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbImportGoods> list = tbImportGoodsService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+
+
+
+
+
+
+
+
+
+}

+ 4 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderMapper.java → sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsMapper.java

@@ -1,4 +1,4 @@
-package com.pj.tb_iport_order;
+package com.pj.tb_import_goods;
 
 import java.util.List;
 
@@ -9,13 +9,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.springframework.stereotype.Repository;
 
 /**
- * Mapper: tb_iport_order -- 进口申报单
+ * Mapper: tb_import_goods -- 进口申报单商品信息
  * @author lbl 
  */
 
 @Mapper
 @Repository
-public interface TbIportOrderMapper extends BaseMapper <TbIportOrder> {
+public interface TbImportGoodsMapper extends BaseMapper <TbImportGoods> {
 
 
 
@@ -24,7 +24,7 @@ public interface TbIportOrderMapper extends BaseMapper <TbIportOrder> {
 	 * @param so 参数集合 
 	 * @return 数据列表 
 	 */
-	List<TbIportOrder> getList(SoMap so);
+	List<TbImportGoods> getList(SoMap so);
 
 
 }

+ 89 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsMapper.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.pj.tb_import_goods.TbImportGoodsMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, plat_seq_no, g_no, code_ts, g_name, g_model, g_qty, qty1, qty2, gross_wt, net_wt, origin_country, g_unit, unit1, unit2, decl_price, decl_total, storage_envm, use_to, shop_no, shop_name, ciq_code, ciq_name, wrap_type from tb_import_goods  -->
+	
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.tb_import_goods.TbImportGoods"></resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from tb_import_goods 
+	</sql>
+
+	
+	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
+	<select id="getList" resultMap="model">
+		<include refid="select_sql"></include>
+		<where>
+			<if test=' this.has("id") '> and id = #{id} </if>
+			<if test=' this.has("platSeqNo") '> and plat_seq_no = #{platSeqNo} </if>
+			<if test=' this.has("gNo") '> and g_no = #{gNo} </if>
+			<if test=' this.has("codeTs") '> and code_ts = #{codeTs} </if>
+			<if test=' this.has("gName") '> and g_name = #{gName} </if>
+			<if test=' this.has("gModel") '> and g_model = #{gModel} </if>
+			<if test=' this.has("gQty") '> and g_qty = #{gQty} </if>
+			<if test=' this.has("qty1") '> and qty1 = #{qty1} </if>
+			<if test=' this.has("qty2") '> and qty2 = #{qty2} </if>
+			<if test=' this.has("grossWt") '> and gross_wt = #{grossWt} </if>
+			<if test=' this.has("netWt") '> and net_wt = #{netWt} </if>
+			<if test=' this.has("originCountry") '> and origin_country = #{originCountry} </if>
+			<if test=' this.has("gUnit") '> and g_unit = #{gUnit} </if>
+			<if test=' this.has("unit1") '> and unit1 = #{unit1} </if>
+			<if test=' this.has("unit2") '> and unit2 = #{unit2} </if>
+			<if test=' this.has("declPrice") '> and decl_price = #{declPrice} </if>
+			<if test=' this.has("declTotal") '> and decl_total = #{declTotal} </if>
+			<if test=' this.has("storageEnvm") '> and storage_envm = #{storageEnvm} </if>
+			<if test=' this.has("useTo") '> and use_to = #{useTo} </if>
+			<if test=' this.has("shopNo") '> and shop_no = #{shopNo} </if>
+			<if test=' this.has("shopName") '> and shop_name = #{shopName} </if>
+			<if test=' this.has("ciqCode") '> and ciq_code = #{ciqCode} </if>
+			<if test=' this.has("ciqName") '> and ciq_name = #{ciqName} </if>
+			<if test=' this.has("wrapType") '> and wrap_type = #{wrapType} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> plat_seq_no desc </when>
+			<when test='sortType == 3'> g_no desc </when>
+			<when test='sortType == 4'> code_ts desc </when>
+			<when test='sortType == 5'> g_name desc </when>
+			<when test='sortType == 6'> g_model desc </when>
+			<when test='sortType == 7'> g_qty desc </when>
+			<when test='sortType == 8'> qty1 desc </when>
+			<when test='sortType == 9'> qty2 desc </when>
+			<when test='sortType == 10'> gross_wt desc </when>
+			<when test='sortType == 11'> net_wt desc </when>
+			<when test='sortType == 12'> origin_country desc </when>
+			<when test='sortType == 13'> g_unit desc </when>
+			<when test='sortType == 14'> unit1 desc </when>
+			<when test='sortType == 15'> unit2 desc </when>
+			<when test='sortType == 16'> decl_price desc </when>
+			<when test='sortType == 17'> decl_total desc </when>
+			<when test='sortType == 18'> storage_envm desc </when>
+			<when test='sortType == 19'> use_to desc </when>
+			<when test='sortType == 20'> shop_no desc </when>
+			<when test='sortType == 21'> shop_name desc </when>
+			<when test='sortType == 22'> ciq_code desc </when>
+			<when test='sortType == 23'> ciq_name desc </when>
+			<when test='sortType == 24'> wrap_type desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 13 - 16
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderService.java → sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsService.java

@@ -1,31 +1,28 @@
-package com.pj.tb_iport_order;
+package com.pj.tb_import_goods;
 
 import java.util.List;
-
-import com.pj.api.client.async_server.AsyncServerInterface;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.transaction.annotation.Transactional;
+import com.pj.utils.sg.*;
 
 /**
- * Service: tb_iport_order -- 进口申报单
- * @author lbl
+ * Service: tb_import_goods -- 进口申报单商品信息
+ * @author lbl 
  */
 @Service
 @Transactional(rollbackFor = Exception.class)
-public class TbIportOrderService extends ServiceImpl<TbIportOrderMapper, TbIportOrder> implements IService<TbIportOrder>{
+public class TbImportGoodsService extends ServiceImpl<TbImportGoodsMapper, TbImportGoods> implements IService<TbImportGoods>{
 
 	/** 底层 Mapper 对象 */
 	@Autowired
-	TbIportOrderMapper tbIportOrderMapper;
-	@Autowired
-	private AsyncServerInterface asyncServerInterface;
+	TbImportGoodsMapper tbImportGoodsMapper;
 
 	/** 增 */
-	void add(TbIportOrder t){
+	void add(TbImportGoods t){
 		save(t);
 	}
 
@@ -35,20 +32,20 @@ public class TbIportOrderService extends ServiceImpl<TbIportOrderMapper, TbIport
 	}
 
 	/** 改 */
-	void update(TbIportOrder t){
+	void update(TbImportGoods t){
 		updateById(t);
 
 	}
 
 	/** 查 */
-	TbIportOrder getById(Long id){
+	TbImportGoods getById(Long id){
 		return super.getById(id);
 	}
 
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
-	List<TbIportOrder> getList(SoMap so) {
-		return tbIportOrderMapper.getList(so);
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
+	List<TbImportGoods> getList(SoMap so) { 
+		return tbImportGoodsMapper.getList(so);	
 	}
-
+	
 
 }

+ 109 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrder.java

@@ -0,0 +1,109 @@
+package com.pj.tb_import_order;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+/**
+ * Model: tb_import_order -- 进口申报单
+ * @author lbl
+ */
+@Data
+@Accessors(chain = true)
+@TableName(TbImportOrder.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+public class TbImportOrder extends Model<TbImportOrder> implements Serializable {
+
+	// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id
+	 */
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 此模块对应的表名
+	 */
+	public static final String TABLE_NAME = "tb_import_order";
+	/**
+	 * 此模块对应的权限码
+	 */
+	public static final String PERMISSION_CODE = "tb-import-order";
+	public static final String PERMISSION_CODE_ADD = "tb-import-order-add";
+	public static final String PERMISSION_CODE_EDIT = "tb-import-order-edit";
+	public static final String PERMISSION_CODE_DEL = "tb-import-order-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 主键
+	 */
+	@TableId(type = IdType.AUTO)
+	private Long id;
+
+	private Integer platSeqNo;
+	private String preNo;
+	private String itrdclDeclareId;
+	private String declareId;
+	private String declareType;
+	private String declareName;
+	private String ciphertextIdno;
+	private Integer shopNo;
+	private Integer shopName;
+	private String orgPutrecNo;
+	private String orgName;
+	private String orgScc;
+	private String veNo;
+	private String vehicleType;
+	private String btrnbBizModecd;
+	private String gFlow;
+	private String iEFlag;
+	private String fieldCode;
+	private String fieldName;
+	private String customsCode;
+	private String carPool;
+	private String note;
+	private String sumAmt;
+	private String sumGrossWt;
+	private String sumNetWt;
+	private String trafMode;
+	private String currCode;
+	private String packNo;
+	private String tradeCountry;
+	private String mName;
+	private String mScc;
+	private String shareFlag;
+	private String dclType;
+	private String mdfblRvkRsn;
+	private String borderFlag;
+	private String delStatus;
+	private String declStatus;
+	private String declTime;
+	private String rcptTime;
+	private String auditRemark;
+	private String agentCode;
+	private String manifestId;
+	private String shopPutrecNo;
+	private String borderId;
+	private String msgId;
+	private String entCode;
+	private String entName;
+	private String borderPeopleList;
+	private String borderPeopleLimitList;
+	private String goodsList;
+
+	private Long createBy;
+	private String createName;
+	private Date createTime;
+	private Long updateBy;
+	private String updateName;
+	private Date updateTime;
+	private Integer deleteStatus;
+
+}

+ 8 - 11
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderAppController.java → sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderAppController.java

@@ -1,41 +1,38 @@
-package com.pj.tb_iport_order;
+package com.pj.tb_import_order;
 
-import cn.dev33.satoken.annotation.SaCheckPermission;
-import com.pj.project4sp.SP;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.util.List;
 
 
 /**
- * Controller: tb_iport_order -- 进口申报单
+ * Controller: tb_import_order -- 进口申报单
  * @author lbl
  */
 @RestController
 @RequestMapping("/app/TbIportOrder/")
-public class TbIportOrderAppController {
+public class TbImportOrderAppController {
 
 	/** 底层 Service 对象 */
 	@Autowired
-	TbIportOrderService tbIportOrderService;
+	TbImportOrderService tbImportOrderService;
 
 
 	/** 改 */
 	@RequestMapping("update")
-	public AjaxJson update(TbIportOrder t){
-		tbIportOrderService.update(t);
+	public AjaxJson update(TbImportOrder t){
+		tbImportOrderService.update(t);
 		return AjaxJson.getSuccess();
 	}
 
 	/** 查 - 根据id */
 	@RequestMapping("getById")
 	public AjaxJson getById(Long id){
-		TbIportOrder t = tbIportOrderService.getById(id);
+		TbImportOrder t = tbImportOrderService.getById(id);
 		return AjaxJson.getSuccessData(t);
 	}
 
@@ -43,7 +40,7 @@ public class TbIportOrderAppController {
 	@RequestMapping("getList")
 	public AjaxJson getList() {
 		SoMap so = SoMap.getRequestSoMap();
-		List<TbIportOrder> list = tbIportOrderService.getList(so.startPage());
+		List<TbImportOrder> list = tbImportOrderService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
 

+ 95 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderController.java

@@ -0,0 +1,95 @@
+package com.pj.tb_import_order;
+
+import java.util.List;
+
+import com.pj.api.dto.HtImportOrderDto;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import com.pj.utils.sg.*;
+import com.pj.project4sp.SP;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+
+
+/**
+ * Controller: tb_import_order -- 进口申报单
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/TbIportOrder/")
+public class TbImportOrderController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbImportOrderService tbImportOrderService;
+
+	/** 增 */
+	@RequestMapping("add")
+	@SaCheckPermission(TbImportOrder.PERMISSION_CODE_ADD)
+	public AjaxJson add(TbImportOrder t){
+		tbImportOrderService.add(t);
+		t = tbImportOrderService.getById(SP.publicMapper.getPrimarykey());
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 删 */
+	@RequestMapping("delete")
+	@SaCheckPermission(TbImportOrder.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Long id){
+		 tbImportOrderService.delete(id);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 删 - 根据id列表 */
+	@RequestMapping("deleteByIds")
+	@SaCheckPermission(TbImportOrder.PERMISSION_CODE_DEL)
+	public AjaxJson deleteByIds(){
+		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class);
+		int line = SP.publicMapper.deleteByIds(TbImportOrder.TABLE_NAME, ids);
+		return AjaxJson.getByLine(line);
+	}
+
+	/** 改 */
+	@RequestMapping("update")
+	@SaCheckPermission(TbImportOrder.PERMISSION_CODE_EDIT)
+	public AjaxJson update(TbImportOrder t){
+		tbImportOrderService.update(t);
+		return AjaxJson.getSuccess();
+	}
+
+	/** 查 - 根据id */
+	@RequestMapping("getById")
+		@SaCheckPermission(TbImportOrder.PERMISSION_CODE)
+	public AjaxJson getById(Long id){
+		TbImportOrder t = tbImportOrderService.getById(id);
+		return AjaxJson.getSuccessData(t);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	@RequestMapping("getList")
+		@SaCheckPermission(TbImportOrder.PERMISSION_CODE)
+	public AjaxJson getList() {
+		SoMap so = SoMap.getRequestSoMap();
+		List<TbImportOrder> list = tbImportOrderService.getList(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+
+
+	/*-----           正常业务逻辑👆👆    rpc远程调用👇👇 -----*/
+
+
+	/** 远程调用 进口申报单同步 */
+	@RequestMapping("rpc/importOrderDto")
+	public boolean importOrderDto(@RequestBody HtImportOrderDto importOrderDto) {
+		boolean result = tbImportOrderService.importOrderDto(importOrderDto);
+		return result;
+	}
+
+
+
+
+
+
+}

+ 30 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.java

@@ -0,0 +1,30 @@
+package com.pj.tb_import_order;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import com.pj.utils.so.*;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * Mapper: tb_import_order -- 进口申报单
+ * @author lbl
+ */
+
+@Mapper
+@Repository
+public interface TbImportOrderMapper extends BaseMapper <TbImportOrder> {
+
+
+
+	/**
+	 * 查集合 - 根据条件(参数为空时代表忽略指定条件)
+	 * @param so 参数集合
+	 * @return 数据列表
+	 */
+	List<TbImportOrder> getList(SoMap so);
+
+
+}

+ 7 - 25
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderMapper.xml → sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.xml

@@ -1,20 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.pj.tb_iport_order.TbIportOrderMapper">
+<mapper namespace="com.pj.tb_import_order.TbImportOrderMapper">
 
 
 
 
 	<!-- ================================== 查询相关 ================================== -->
-	<!-- select id, idno, border_putrec_no, border_name, settle_bill_no, pre_ieport_no, buy_confirm_status, pay_status, cooper_entrust_status, cooper_entrust_time, apply_confirm_status, apply_confirm_time from tb_iport_order  -->
+	<!-- select id, idno, border_putrec_no, border_name, settle_bill_no, pre_ieport_no, buy_confirm_status, pay_status, cooper_entrust_status, cooper_entrust_time, apply_confirm_status, apply_confirm_time from tb_import_order  -->
 
 	<!-- 通用映射:自动模式 -->
-	<resultMap id="model" autoMapping="true" type="com.pj.tb_iport_order.TbIportOrder"></resultMap>
+	<resultMap id="model" autoMapping="true" type="com.pj.tb_import_order.TbImportOrder"></resultMap>
 
 	<!-- 公共查询sql片段 -->
 	<sql id="select_sql">
 		select *
-		from tb_iport_order
+		from tb_import_order
 	</sql>
 
 
@@ -30,6 +30,8 @@
 			<if test=' this.has("preIeportNo") '> and pre_ieport_no = #{preIeportNo} </if>
 			<if test=' this.has("buyConfirmStatus") '> and buy_confirm_status = #{buyConfirmStatus} </if>
 			<if test=' this.has("payStatus") '> and pay_status = #{payStatus} </if>
+
+
 			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
 			<if test=' this.has("createBy") '> and create_by = #{createBy} </if>
 			<if test=' this.has("createName") '> and create_name = #{createName} </if>
@@ -38,27 +40,7 @@
 			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
 			<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
 		</where>
-		order by
-		<choose>
-			<when test='sortType == 1'> id desc </when>
-			<when test='sortType == 2'> idno desc </when>
-			<when test='sortType == 3'> border_putrec_no desc </when>
-			<when test='sortType == 4'> border_name desc </when>
-			<when test='sortType == 5'> settle_bill_no desc </when>
-			<when test='sortType == 6'> pre_ieport_no desc </when>
-			<when test='sortType == 7'> buy_confirm_status desc </when>
-			<when test='sortType == 8'> pay_status desc </when>
-			<otherwise> id desc </otherwise>
-		</choose>
-	</select>
-
-
-
-
-
-
-
-
 
+	</select>
 
 </mapper>

+ 104 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderService.java

@@ -0,0 +1,104 @@
+package com.pj.tb_import_order;
+
+import java.util.Date;
+import java.util.List;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.pj.api.client.async_server.AsyncServerInterface;
+import com.pj.api.dto.HtIeportDeclBillsBpLimitDto;
+import com.pj.api.dto.HtIeportDeclBillsGoodsDto;
+import com.pj.api.dto.HtImportOrderDto;
+import com.pj.enummj.DeleteStatus;
+import com.pj.project4sp.SP;
+import com.pj.tb_import_goods.TbImportGoods;
+import com.pj.tb_import_goods.TbImportGoodsService;
+import com.pj.tb_order.TbOrder;
+import com.pj.tb_order.TbOrderService;
+import com.pj.utils.so.SoMap;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * Service: tb_import_order -- 进口申报单
+ * @author lbl
+ */
+@Service
+@Transactional(rollbackFor = Exception.class)
+public class TbImportOrderService extends ServiceImpl<TbImportOrderMapper, TbImportOrder> implements IService<TbImportOrder>{
+
+	/** 底层 Mapper 对象 */
+	@Autowired
+	TbImportOrderMapper tbImportOrderMapper;
+	@Autowired
+	TbOrderService tbOrderService;
+	@Autowired
+	TbImportGoodsService importGoodsService;
+	@Autowired
+	private AsyncServerInterface asyncServerInterface;
+
+	/** 增 */
+	void add(TbImportOrder t){
+		save(t);
+	}
+
+	/** 删 */
+	void delete(Long id){
+		removeById(id);
+	}
+
+	/** 改 */
+	void update(TbImportOrder t){
+		updateById(t);
+
+	}
+
+	/** 查 */
+	TbImportOrder getById(Long id){
+		return super.getById(id);
+	}
+
+	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
+	List<TbImportOrder> getList(SoMap so) {
+		return tbImportOrderMapper.getList(so);
+	}
+
+	/** 远程调用 进口申报单同步 */
+	public boolean importOrderDto(HtImportOrderDto importOrderDto) {
+
+		TbImportOrder importOrder = new TbImportOrder();
+		BeanUtils.copyProperties(importOrderDto, importOrder);
+		importOrder.setCreateName("航通");
+		importOrder.setCreateTime(new Date());
+		importOrder.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
+		boolean save = save(importOrder);
+		long importOrderId = SP.publicMapper.getPrimarykey();
+		if(true == save) {
+			//委托边民额度
+			List<HtIeportDeclBillsBpLimitDto> ieportDeclBillsBpLimitDtoList = JSON.parseArray(importOrderDto.getBorderPeopleLimitList(), HtIeportDeclBillsBpLimitDto.class);
+			ieportDeclBillsBpLimitDtoList.forEach(ieportDeclBillsBpLimitDto -> {
+				LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
+				wrapper.set(TbOrder::getLimitNo, ieportDeclBillsBpLimitDto.getLimitNo());
+				wrapper.set(TbOrder::getGLimit, ieportDeclBillsBpLimitDto.getgLimit());
+				wrapper.set(TbOrder::getGNo, ieportDeclBillsBpLimitDto.getgNo());
+				wrapper.set(TbOrder::getImportOrderId, importOrder);
+				wrapper.eq(TbOrder::getPreIeportNo, ieportDeclBillsBpLimitDto.getPlatSeqNo());
+				boolean update = tbOrderService.update(wrapper);
+			});
+
+			//申报单商品信息
+			List<HtIeportDeclBillsGoodsDto> ieportDeclBillsGoodsDtoList = JSON.parseArray(importOrderDto.getGoodsList(), HtIeportDeclBillsGoodsDto.class);
+			ieportDeclBillsGoodsDtoList.forEach(ieportDeclBillsGoodsDto -> {
+				TbImportGoods importGoods = new TbImportGoods();
+				BeanUtils.copyProperties(ieportDeclBillsGoodsDto, importGoods);
+				importGoods.setImportOrderId(importOrderId);
+				boolean save1 = importGoodsService.save(importGoods);
+			});
+		}
+		return save;
+	}
+}

+ 0 - 125
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrder.java

@@ -1,125 +0,0 @@
-package com.pj.tb_iport_order;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.*;
-import com.baomidou.mybatisplus.extension.activerecord.Model;
-import lombok.EqualsAndHashCode;
-
-import lombok.Data;
-import lombok.experimental.Accessors;
-
-/**
- * Model: tb_iport_order -- 进口申报单
- * @author lbl
- */
-@Data
-@Accessors(chain = true)
-@TableName(TbIportOrder.TABLE_NAME)
-@EqualsAndHashCode(callSuper = false)
-public class TbIportOrder extends Model<TbIportOrder> implements Serializable {
-
-	// ---------- 模块常量 ----------
-	/**
-	 * 序列化版本id
-	 */
-	private static final long serialVersionUID = 1L;
-	/**
-	 * 此模块对应的表名
-	 */
-	public static final String TABLE_NAME = "tb_iport_order";
-	/**
-	 * 此模块对应的权限码
-	 */
-	public static final String PERMISSION_CODE = "tb-iport-order";
-	public static final String PERMISSION_CODE_ADD = "tb-iport-order-add";
-	public static final String PERMISSION_CODE_EDIT = "tb-iport-order-edit";
-	public static final String PERMISSION_CODE_DEL = "tb-iport-order-del";
-
-
-
-
-	// ---------- 表中字段 ----------
-	/**
-	 * 主键
-	 */
-	@TableId(type = IdType.AUTO)
-	private Long id;
-
-	/**
-	 * 身份证号
-	 */
-	private String idno;
-
-	/**
-	 * 边民备案编号(可选)
-	 */
-	private String borderPutrecNo;
-
-	/**
-	 * 边民姓名不能为空
-	 */
-	private String borderName;
-
-	/**
-	 * 结算单号
-	 */
-	private String settleBillNo;
-
-	/**
-	 * 进出口预申报单号
-	 */
-	private String preIeportNo;
-
-	/**
-	 * 购买申报确认状态:Y->确认购买申报,N->不购买申报
-	 */
-	private String buyConfirmStatus;
-
-	/**
-	 * 支付状态:01->未支付,02->已支付
-	 */
-	private Integer payStatus;
-
-	/**
-	 * 创建人编号
-	 */
-	private Long createBy;
-
-	/**
-	 * 创建人名称
-	 */
-	private String createName;
-
-	/**
-	 * 创建时间
-	 */
-	private Date createTime;
-
-	/**
-	 * 更新人编号
-	 */
-	private Long updateBy;
-
-	/**
-	 * 更新人名称
-	 */
-	private String updateName;
-
-	/**
-	 * 更新时间
-	 */
-	private Date updateTime;
-
-	/**
-	 * 删除状态(0=禁用,1=启用)
-	 */
-	private Integer deleteStatus;
-
-
-
-
-
-
-}

+ 0 - 87
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderController.java

@@ -1,87 +0,0 @@
-package com.pj.tb_iport_order;
-
-import java.util.List;
-import com.pj.utils.so.SoMap;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
-
-import com.pj.utils.sg.*;
-import com.pj.project4sp.SP;
-
-import com.pj.current.satoken.StpUserUtil;
-import cn.dev33.satoken.annotation.SaCheckPermission;
-
-
-/**
- * Controller: tb_iport_order -- 进口申报单
- * @author lbl 
- */
-@RestController
-@RequestMapping("/TbIportOrder/")
-public class TbIportOrderController {
-
-	/** 底层 Service 对象 */
-	@Autowired
-	TbIportOrderService tbIportOrderService;
-
-	/** 增 */  
-	@RequestMapping("add")
-	@SaCheckPermission(TbIportOrder.PERMISSION_CODE_ADD)
-	public AjaxJson add(TbIportOrder t){
-		tbIportOrderService.add(t);
-		t = tbIportOrderService.getById(SP.publicMapper.getPrimarykey());
-		return AjaxJson.getSuccessData(t);
-	}
-
-	/** 删 */  
-	@RequestMapping("delete")
-	@SaCheckPermission(TbIportOrder.PERMISSION_CODE_DEL)
-	public AjaxJson delete(Long id){
-		 tbIportOrderService.delete(id);
-		return AjaxJson.getSuccess();
-	}
-	
-	/** 删 - 根据id列表 */  
-	@RequestMapping("deleteByIds")
-	@SaCheckPermission(TbIportOrder.PERMISSION_CODE_DEL)
-	public AjaxJson deleteByIds(){
-		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
-		int line = SP.publicMapper.deleteByIds(TbIportOrder.TABLE_NAME, ids);
-		return AjaxJson.getByLine(line);
-	}
-	
-	/** 改 */  
-	@RequestMapping("update")
-	@SaCheckPermission(TbIportOrder.PERMISSION_CODE_EDIT)
-	public AjaxJson update(TbIportOrder t){
-		tbIportOrderService.update(t);
-		return AjaxJson.getSuccess();
-	}
-
-	/** 查 - 根据id */  
-	@RequestMapping("getById")
-		@SaCheckPermission(TbIportOrder.PERMISSION_CODE)
-	public AjaxJson getById(Long id){
-		TbIportOrder t = tbIportOrderService.getById(id);
-		return AjaxJson.getSuccessData(t);
-	}
-
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	@RequestMapping("getList")
-		@SaCheckPermission(TbIportOrder.PERMISSION_CODE)
-	public AjaxJson getList() { 
-		SoMap so = SoMap.getRequestSoMap();
-		List<TbIportOrder> list = tbIportOrderService.getList(so.startPage());
-		return AjaxJson.getPageData(so.getDataCount(), list);
-	}
-	
-	
-	
-	
-
-	
-	
-	
-
-}

+ 12 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrder.java

@@ -388,4 +388,16 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	 * 订单转售后是否在二级市场被下单[0=未被下单,1=已被下单]
 	 */
 	private Integer beingOrder;
+
+	/** 边民额度序号 */
+	private Integer limitNo;
+
+	/** 商品额度 */
+	private Double gLimit;
+
+	/** 商品序号 */
+	private Integer gNo;
+
+	/** 进口申报单Id */
+	private Long importOrderId;
 }

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

@@ -322,7 +322,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 
 		LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
 		wrapper.eq(TbOrder::getBuyUserId, appLoginInfo.getFk());
-		wrapper.eq(TbOrder::getPeopleConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ZERO.getCode());//订单未确认
+		wrapper.eq(TbOrder::getPeopleConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ZERO.getCode())//订单待确认
+				.or().eq(TbOrder::getCooperEntrustStatus, ConfirmStatus.CONFIRM_STATUS_ZERO.getCode())//互助委托待确认
+				.or().eq(TbOrder::getApplyConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ZERO.getCode());//进口申报待确认
 		wrapper.orderByDesc(TbOrder::getCreateTime);
 		wrapper.orderByDesc(TbOrder::getUpdateTime);
 
@@ -370,8 +372,28 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		wrapper.eq(TbOrder::getId, orderId);
 		boolean result = update(wrapper);
 
-		// TODO: 2023/8/29 调用航通008接口,发送信息
-		sendConfirmMsgToHt(tbOrder);
+		return result;
+	}
+
+	/**
+	 *  互助委托申报确认
+	 * @param orderId 一级市场订单表ID
+	 */
+	public boolean cooperOrder(Long orderId){
+		//获取登录人
+		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
+
+		LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
+		wrapper.set(TbOrder::getCooperEntrustStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//互助委托申报确认:1=确认
+		wrapper.set(TbOrder::getCooperEntrustTime, new Date());
+
+		wrapper.set(TbOrder::getUpdateBy, appLoginInfo.getLoginId());
+		wrapper.set(TbOrder::getUpdateName, appLoginInfo.getLoginName());
+		wrapper.set(TbOrder::getUpdateTime, new Date());
+
+		wrapper.eq(TbOrder::getId, orderId);
+		boolean result = update(wrapper);
+
 		return result;
 	}
 
@@ -398,8 +420,6 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		wrapper.eq(TbOrder::getId, orderId);
 		boolean result = update(wrapper);
 
-		// TODO: 2023/8/29 调用航通008接口,发送信息
-		sendConfirmMsgToHt(tbOrder);
 		return result;
 	}
 
@@ -417,25 +437,25 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 	}
 
 	/**
-	 *  互助委托申报确认
-	 * @param orderId 一级市场订单表ID
+	 *  当三个确认均完成后,发送008信息到航通
 	 */
-	public boolean cooperOrder(Long orderId){
+	public void ConfirmFinish(Long orderId){
 		//获取登录人
 		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
 
-		LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
-		wrapper.set(TbOrder::getCooperEntrustStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//互助委托申报确认:1=确认
-		wrapper.set(TbOrder::getCooperEntrustTime, new Date());
-
-		wrapper.set(TbOrder::getUpdateBy, appLoginInfo.getLoginId());
-		wrapper.set(TbOrder::getUpdateName, appLoginInfo.getLoginName());
-		wrapper.set(TbOrder::getUpdateTime, new Date());
-
+		LambdaQueryWrapper<TbOrder> wrapper = new LambdaQueryWrapper<>();
 		wrapper.eq(TbOrder::getId, orderId);
-		boolean result = update(wrapper);
+		wrapper.eq(TbOrder::getBuyUserId, appLoginInfo.getFk());
+		wrapper.eq(TbOrder::getPeopleConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//订单已确认
+		wrapper.eq(TbOrder::getCooperEntrustStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//互助委托已确认
+		wrapper.eq(TbOrder::getApplyConfirmStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//进口申报已确认
 
-		return result;
+		List<TbOrder> tbOrderList = tbOrderMapper.selectList(wrapper);
+
+		if(tbOrderList.size() > 0) {
+			// TODO: 2023/8/29 调用航通008接口,发送信息
+			sendConfirmMsgToHt(tbOrderList.get(0));
+		}
 	}