Эх сурвалжийг харах

Merge branch 'feature/asyncOrder' of http://git.aseanbusiness.cn/qzyReal/market-server into feature/asyncOrder

# Conflicts:
#	sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java
qzyReal 1 жил өмнө
parent
commit
2292040a56
32 өөрчлөгдсөн 2254 нэмэгдсэн , 566 устгасан
  1. 1 1
      sp-core/sp-api/src/main/java/com/pj/api/client/async_server/AsyncServerInterface.java
  2. 6 0
      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. 2 0
      sp-service/level-one-server/src/main/java/com/pj/ht_trade_settlement/HtTradeSettlementService.java
  12. 172 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoods.java
  13. 85 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsController.java
  14. 4 4
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsMapper.java
  15. 89 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsMapper.xml
  16. 13 16
      sp-service/level-one-server/src/main/java/com/pj/tb_import_goods/TbImportGoodsService.java
  17. 74 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/ImportOrderVo.java
  18. 102 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrder.java
  19. 33 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderAppController.java
  20. 95 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderController.java
  21. 30 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.java
  22. 7 25
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.xml
  23. 124 0
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderService.java
  24. 0 125
      sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrder.java
  25. 0 51
      sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderAppController.java
  26. 0 87
      sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderController.java
  27. 216 116
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrder.java
  28. 1 1
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderAppController.java
  29. 52 27
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderMapper.xml
  30. 64 21
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java
  31. 94 70
      sp-service/level-one-server/src/main/java/com/pj/tb_order/vo/OrderVo.java
  32. 1 1
      sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.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);
 
     /** 远程调用: 根据便民身份证号 和 进出口结算单号查询[进口申报单边民确认] 将该对象返还航通 */

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

@@ -26,6 +26,12 @@ public interface LevelOneServerInterface {
 
     /** 远程调用: 添加大订单时同事生成小定单 */
     @PostMapping("/HtTradeSettlement/rpc/tradeSettlementDto")
+    /** 远程调用 进口申报单同步 */
+    @PostMapping("/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());

+ 2 - 0
sp-service/level-one-server/src/main/java/com/pj/ht_trade_settlement/HtTradeSettlementService.java

@@ -125,6 +125,8 @@ public class HtTradeSettlementService extends ServiceImpl<HtTradeSettlementMappe
 			tbOrder.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
 			tbOrder.setResaleStatus(ResaleStatus.RESALE_STATUS_ZERO.getCode());
 			tbOrder.setFinishStatus(OrderStatus.ORDER_STATUS_ZERO.getCode());
+            //申报单类型,用以后续判断当前订单是否是委托单
+            tbOrder.setDeclareType(tradeSettlementDto.getDeclareType());
 
 			//根据边民身份证号获取边民的订单商品列表(目前逻辑为一个边民对应一个商品)
 			List<BorderBuyGoodsListDto> collect = borderBuyGoodsListDtoList.stream().filter(borderBuyGoods -> item.getIdno().equals(borderBuyGoods.getIdno())).collect(Collectors.toList());

+ 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);	
 	}
-
+	
 
 }

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

@@ -0,0 +1,74 @@
+package com.pj.tb_import_order;
+
+import lombok.Data;
+
+/**
+ * @author lbl
+ */
+@Data
+public class ImportOrderVo {
+
+
+	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 String goodsNames;
+	/**
+	 * 商品额度
+	 */
+	private Double gLimit;
+
+}

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

@@ -0,0 +1,102 @@
+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;
+
+
+}

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

@@ -0,0 +1,33 @@
+package com.pj.tb_import_order;
+
+import com.pj.utils.sg.AjaxJson;
+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;
+
+
+
+/**
+ * Controller: tb_import_order -- 进口申报单
+ * @author lbl
+ */
+@RestController
+@RequestMapping("/app/TbImportOrder/")
+public class TbImportOrderAppController {
+
+	/** 底层 Service 对象 */
+	@Autowired
+	TbImportOrderService tbImportOrderService;
+
+
+	/**
+	 * 获取进口申报单详情
+	 * @param orderId
+	 * @return
+	 */
+	@RequestMapping("importOrderDetail")
+	public AjaxJson importOrderDetail(@RequestParam("orderId")Long orderId){
+		return AjaxJson.getSuccessData(tbImportOrderService.importOrderDetail(orderId));
+	}
+}

+ 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("/TbImportOrder/")
+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>

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

@@ -0,0 +1,124 @@
+package com.pj.tb_import_order;
+
+import java.util.List;
+
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.pj.api.dto.HtIeportDeclBillsBpLimitDto;
+import com.pj.api.dto.HtIeportDeclBillsGoodsDto;
+import com.pj.api.dto.HtImportOrderDto;
+import com.pj.common.core.exception.ServiceException;
+import com.pj.current.dto.APPLoginUserInfo;
+import com.pj.current.satoken.StpAPPUserUtil;
+import com.pj.project4sp.SP;
+import com.pj.tb_import_goods.TbImportGoods;
+import com.pj.tb_import_goods.TbImportGoodsMapper;
+import com.pj.tb_order.TbOrder;
+import com.pj.tb_order.TbOrderService;
+import com.pj.tb_people.TbPeopleMapper;
+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
+	TbImportGoodsMapper importGoodsMapper;
+	@Autowired
+	private TbPeopleMapper tbPeopleMapper;
+
+	/** 增 */
+	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);
+	}
+
+	/**
+	 *  查看订单详情
+	 * @param orderId  一级市场订单ID
+	 * @return 订单的vo
+	 */
+	public ImportOrderVo importOrderDetail(Long orderId){
+		TbOrder peopleOrder = tbOrderService.getById(orderId);
+		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
+		if(!appLoginInfo.getFk().equals(peopleOrder.getBuyUserId())) throw new ServiceException("当前边民订单信息异常,请联系管理员!");
+
+		//根据边民订单获取关联的进口申报单Id,查询进口申报单详情
+		TbImportOrder importOrder = tbImportOrderMapper.selectById(peopleOrder.getImportOrderId());
+		if(importOrder == null) throw new ServiceException("进口申报单信息异常,请联系管理员!");
+
+		ImportOrderVo importOrderVo = new ImportOrderVo();
+		BeanUtils.copyProperties(importOrder,importOrderVo);
+
+		importOrderVo.setGoodsNames(peopleOrder.getGoodsNames());
+		importOrderVo.setGLimit(peopleOrder.getGLimit());
+		return importOrderVo;
+	}
+
+	/** 远程调用 进口申报单同步 */
+	public boolean importOrderDto(HtImportOrderDto importOrderDto) {
+
+		TbImportOrder importOrder = new TbImportOrder();
+		BeanUtils.copyProperties(importOrderDto, importOrder);
+		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);
+				int insert = importGoodsMapper.insert(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 - 51
sp-service/level-one-server/src/main/java/com/pj/tb_iport_order/TbIportOrderAppController.java

@@ -1,51 +0,0 @@
-package com.pj.tb_iport_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 -- 进口申报单
- * @author lbl
- */
-@RestController
-@RequestMapping("/app/TbIportOrder/")
-public class TbIportOrderAppController {
-
-	/** 底层 Service 对象 */
-	@Autowired
-	TbIportOrderService tbIportOrderService;
-
-
-	/** 改 */
-	@RequestMapping("update")
-	public AjaxJson update(TbIportOrder t){
-		tbIportOrderService.update(t);
-		return AjaxJson.getSuccess();
-	}
-
-	/** 查 - 根据id */
-	@RequestMapping("getById")
-	public AjaxJson getById(Long id){
-		TbIportOrder t = tbIportOrderService.getById(id);
-		return AjaxJson.getSuccessData(t);
-	}
-
-	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */
-	@RequestMapping("getList")
-	public AjaxJson getList() {
-		SoMap so = SoMap.getRequestSoMap();
-		List<TbIportOrder> list = tbIportOrderService.getList(so.startPage());
-		return AjaxJson.getPageData(so.getDataCount(), list);
-	}
-
-
-}

+ 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);
-	}
-	
-	
-	
-	
-
-	
-	
-	
-
-}

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

@@ -1,10 +1,10 @@
 package com.pj.tb_order;
 
 import java.io.Serializable;
-import java.util.*;
+import java.util.Date;
+
 import com.baomidou.mybatisplus.annotation.*;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
 import lombok.EqualsAndHashCode;
@@ -14,7 +14,7 @@ import lombok.experimental.Accessors;
 
 /**
  * Model: tb_order -- 订单表
- * @author loovi
+ * @author lbl
  */
 @Data
 @Accessors(chain = true)
@@ -50,48 +50,56 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	@JsonSerialize(using = ToStringSerializer.class)
 	private Long id;
 
-	private Integer cooperEntrustStatus;
-	private Date cooperEntrustTime;
-
 	/**
-	 * 预申报编
+	 * 订单号
 	 */
-	private String platSeqNo;
+	private String tradeNo;
 
 	/**
-	 *
+	 * 交易地区ID
 	 */
 	@JsonSerialize(using = ToStringSerializer.class)
 	private Long tradeAreaId;
 
 	/**
-	 *
+	 * 交易地区名称
 	 */
 	private String tradeAreaName;
 
 	/**
-	 *
+	 * 地区ID集合
 	 */
 	private String addressIds;
 
 	/**
-	 *
+	 * 过审商品id
 	 */
-	private Long saleMainId;
+	private Long goodsId;
+
 	/**
-	 *
+	 * 商品名称字符串
 	 */
-	private Long groupId;
+	private String goodsNames;
 
 	/**
-	 *  商品id
+	 * 商品单位
 	 */
-	private Long goodsId;
+	private String goodsUnit;
 
 	/**
-	 * 订单号
+	 * 商品图片
 	 */
-	private String tradeNo;
+	private String goodsImg;
+
+	/**
+	 * 总重量
+	 */
+	private Double totalWeight;
+
+	/**
+	 * 总金额
+	 */
+	private Double totalPrice;
 
 	/**
 	 * 买家ID
@@ -99,67 +107,64 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	private Long buyUserId;
 
 	/**
-	 * 买家
+	 * 买家名称
 	 */
 	private String buyUserName;
 
 	/**
-	 * 购买用户类型(3=边民,2=组长)
+	 * 买家类型(1=边民,2=组长)
 	 */
 	private String buyUserType;
 
 	/**
-	 * 商家ID
+	 * 交易状态(0=未支付,1=已支付)
 	 */
-	private Long enterpriseId;
+	private Integer tradeStatus;
 
 	/**
-	 * 商家名称
+	 * 交易时间
 	 */
-	private String enterpriseName;
+	private Date tradeTime;
 
 	/**
-	 * 总重量
-	 */
-	private Double totalWeight;
-	/**
-	 * 单证代码
+	 * 支付方式(0=金融互助,1=现金刷卡)
 	 */
-	private String preNo;
+	private Integer payType;
+
 	/**
-	 *进出口预申报单
+	 * 商铺ID
 	 */
-	private String preIeportNo;
+	private Long shopId;
 
 	/**
-	 * 总金额
+	 * 商铺名称
 	 */
-	private Double totalPrice;
+	private String shopName;
 
 	/**
-	 * 交易时间
+	 * 商户ID
 	 */
-	private Date tradeTime;
+	private Long enterpriseId;
 
 	/**
-	 * 交易状态(0=未支付,1=已支付)
+	 * 商户名称
 	 */
-	private Integer tradeStatus;
+	private String enterpriseName;
 
 	/**
-	 * 边民或组长取消订单(0=未取消,1=已取消)
+	 * 商户确认(0=待确认,1=是,2=否)
 	 */
-	private Integer cancelPeople;
+	private Integer enterpriseConfirm;
 
 	/**
-	 * 支付方式(0=金融互助,1=现金刷卡)
+	 * 购买的互市组ID
 	 */
-	private Integer payType;
+	private Long groupId;
 
 	/**
 	 * 结算时间
 	 */
-	private String settleTime;
+	private Date settleTime;
 
 	/**
 	 * 当前结算金额
@@ -172,6 +177,11 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	private Double shouldPrice;
 
 	/**
+	 * 是否对账(0=否,)
+	 */
+	private String record;
+
+	/**
 	 * 对账人
 	 */
 	private Long settleUserId;
@@ -181,17 +191,10 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	 */
 	private Long recordUserId;
 
-
-
 	/**
 	 * 对账时间
 	 */
-	private String recordTime;
-
-	/**
-	 * 是否对账(0=否,)
-	 */
-	private String record;
+	private Date recordTime;
 
 	/**
 	 * 退款原因
@@ -201,35 +204,105 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	/**
 	 * 退款时间
 	 */
-	private String refundTime;
+	private Date refundTime;
 
 	/**
-	 *
+	 * 收货人名称
 	 */
 	private String receiveName;
 
 	/**
-	 *
+	 * 收货人电话
 	 */
 	private String receivePhone;
 
 	/**
-	 *
+	 * 收货地址
 	 */
 	private String receiveAddress;
 
 	/**
 	 * 出互市区时间
 	 */
-	private String outTime;
+	private Date outTime;
 
 	/**
-	 * 商品名称字符串
+	 * 分配方式(0=均分,1=自选数量)
 	 */
-	private String goodsNames;
+	private String distribution;
+
+	/**
+	 * 是否接单
+	 */
+	private String pick;
 
 	/**
-	 * 是否申报
+	 * 接单时间
+	 */
+	private Date pickTime;
+
+	/**
+	 * 是否发货
+	 */
+	private Integer send;
+
+	/**
+	 * 发货时间
+	 */
+	private Date sendTime;
+
+	/**
+	 * 叫车状态
+	 */
+	private Integer callCarStatus;
+
+	/**
+	 * 创建人编号
+	 */
+	private Long createBy;
+
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 更新人编号
+	 */
+	private Long updateBy;
+
+	/**
+	 * 更新人名称
+	 */
+	private String updateName;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+	/**
+	 * 删除状态(0=禁用,1=启用)
+	 */
+	private Integer deleteStatus;
+
+	/**
+	 * 对应合作社的拼单订单ID
+	 */
+	private Long collageOrdersId;
+
+	/**
+	 * 申报单编号
+	 */
+	private Long applyNo;
+
+	/**
+	 * 申报
 	 */
 	private Integer apply;
 
@@ -244,148 +317,175 @@ public class TbOrder extends Model<TbOrder> implements Serializable {
 	private String applyResult;
 
 	/**
-	 *
+	 * 申报失败理由
 	 */
 	private String applyFailReason;
 
 	/**
-	 * 分配方式(0=均分,1=自选数量)
+	 * 边民确认
 	 */
-	private String distribution;
+	private Integer peopleConfirmStatus;
 
 	/**
-	 * 一级市场边民确认状态(0=待确认,1=是)
+	 * 边民确认类型
 	 */
-	private Integer peopleConfirmStatus;
+	private String peopleConfirmType;
+
 	/**
-	 * 一级市场边民确认类型(1=刷脸,2=指纹)
+	 * 边民确认时间
 	 */
-	private Integer peopleConfirmType;
+	private Date peopleConfirmTime;
+
 	/**
-	 * 一级市场边民确认时间
+	 * 互助委托申报确认状态
 	 */
-	private Date peopleConfirmTime;
+	private Integer cooperEntrustStatus;
 
 	/**
-	 * 边民进口申报确认状态(0=待确认,1=是)
+	 * 互助委托申报确认时间
+	 */
+	private Date cooperEntrustTime;
+
+	/**
+	 * 边民进口申报确认状态
 	 */
 	private Integer applyConfirmStatus;
+
 	/**
 	 * 边民进口申报确认时间
 	 */
 	private Date applyConfirmTime;
 
 	/**
-	 * 一级市场商户确认(0=待确认,1=是)[j]
+	 * 订单完成状态(0=未完成,1=已完成)
 	 */
-	private Integer enterpriseConfirm;
+	private Integer finishStatus;
 
 	/**
-	 * 是否接单
+	 * 是否转售(0=未转售,1=已转售,2=转售中)
 	 */
-	private String pick;
+	private Integer resaleStatus;
 
 	/**
-	 * 接单时间
+	 * 订单转售后是否在二级市场被下单
 	 */
-	private Date pickTime;
+	private Integer beingOrder;
 
 	/**
-	 *
+	 * 预申报编号
 	 */
-	private Long shopId;
+	private String platSeqNo;
 
 	/**
-	 *
+	 * 结算单号
 	 */
-	private String shopName;
+	private String settleBillNo;
 
 	/**
-	 * 是否发货
+	 * 进出口预申报单号
 	 */
-	private Integer send;
+	private String preIeportNo;
 
 	/**
-	 * 发货时间
+	 * 单证代码
 	 */
-	private String sendTime;
+	private String preNo;
 
 	/**
-	 * 对应合作社的拼单订单ID
+	 * 车牌号
 	 */
-	private Long collageOrdersId;
+	private String veNo;
 
 	/**
-	 * 创建时间
+	 * 车航次(班)号
 	 */
-	private Date createTime;
+	private String voyageNo;
 
 	/**
-	 * 创建人编号
+	 * 边民姓名
 	 */
-	private Long createBy;
+	private String borderName;
 
 	/**
-	 * 创建人名称
+	 * 身份证号
 	 */
-	private String createName;
+	private String idno;
+
 	/**
-	 * 车牌
+	 * 边民备案编
 	 */
-	private String veNo;
+	private String borderPutrecNo;
 
 	/**
-	 * 更新时间
+	 * 申报金额
 	 */
-	private Date updateTime;
+	private Double buyAmount;
 
 	/**
-	 * 更新人编号
+	 * 净重
 	 */
-	private Long updateBy;
+	private Double netWt;
 
 	/**
-	 * 更新人名称
+	 * 毛重
 	 */
-	private String updateName;
+	private Double grossWt;
 
 	/**
-	 * 删除状态(0=禁用,1=启用)
+	 * 申报数量
 	 */
-	private Integer deleteStatus;
+	private Double buyQty;
 
 	/**
-	 * 订单状态(0=未完成,1=已完成)
+	 * 第一数量
 	 */
-	private Integer finishStatus;
+	private Double buyQty1;
 
 	/**
-	 * 申报单号
+	 * 第二数量
 	 */
-	private Long applyNo;
+	private Double buyQty2;
 
 	/**
-	 * 是否转售(0=未转售,1=已转售)
+	 * 不知道
 	 */
-	private Integer resaleStatus;
+	private Long saleMainId;
 
 	/**
-	 * 叫车状态[默认是0=待叫车,1=已叫车,2=完成叫车]
+	 *
 	 */
-	private Integer callCarStatus;
+	private Integer cancelPeople;
 
+	/**
+	 * 边民额度序号
+	 */
+	private Integer limitNo;
 
 	/**
-	 * 商品单位
+	 * 商品额度
 	 */
-	private String goodsUnit;
+	private Double gLimit;
+
 	/**
-	 * 结算单
+	 * 商品序
 	 */
-	private String settleBillNo;
+	private Integer gNo;
 
 	/**
-	 * 订单转售后是否在二级市场被下单[0=未被下单,1=已被下单]
+	 * 进口申报单Id
 	 */
-	private Integer beingOrder;
+	private Long importOrderId;
+
+	/**
+	 *  1-边民,2-商铺业主或其代理人,3-合作社代表,4-互助组代表
+	 */
+	private String declareType;
+
+
+
+
+
+
+
+
 }

+ 1 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderAppController.java

@@ -126,7 +126,7 @@ public class TbOrderAppController {
 	/** app首页获取边民未确认订单 */
 	@RequestMapping("getNoConfirmOrder")
 	public AjaxJson getNoConfirmOrder() {
-		return AjaxJson.getSuccessData(tbOrderService.getNoConfirmOrder());
+		return AjaxJson.getSuccessData(tbOrderService.getByDeclareType());
 	}
 
 	/** 获取一级市场边民订单的所有确认状态 */

+ 52 - 27
sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderMapper.xml

@@ -28,67 +28,92 @@
 		<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("tradeNo") '> and trade_no like concat('%',#{tradeNo},'%') </if>
 			<if test=' this.has("tradeAreaId") '> and trade_area_id = #{tradeAreaId} </if>
-			<if test=' this.has("callCarStatus") '> and call_car_status = #{callCarStatus} </if>
-			<if test=' this.has("finishStatus") '> and finish_status = #{finishStatus} </if>
-			<if test=' this.has("cancelPeople") '> and cancel_people = #{cancelPeople} </if>
-			<if test=' this.has("groupId") '> and group_id = #{groupId} </if>
 			<if test=' this.has("tradeAreaName") '> and trade_area_name = #{tradeAreaName} </if>
 			<if test=' this.has("addressIds") '> and address_ids = #{addressIds} </if>
-			<if test=' this.has("saleMainId") '> and sale_main_id = #{saleMainId} </if>
-			<if test=' this.has("tradeNo") '> and trade_no like concat('%',#{tradeNo},'%') </if>
+			<if test=' this.has("goodsId") '> and goods_id = #{goodsId} </if>
+			<if test=' this.has("goodsNames") '> and goods_names = #{goodsNames} </if>
+			<if test=' this.has("goodsUnit") '> and goods_unit = #{goodsUnit} </if>
+			<if test=' this.has("goodsImg") '> and goods_img = #{goodsImg} </if>
+			<if test=' this.has("totalWeight") '> and total_weight = #{totalWeight} </if>
+			<if test=' this.has("totalPrice") '> and total_price = #{totalPrice} </if>
 			<if test=' this.has("buyUserId") '> and buy_user_id = #{buyUserId} </if>
 			<if test=' this.has("buyUserName") '> and buy_user_name like concat('%',#{buyUserName},'%') </if>
 			<if test=' this.has("buyUserType") '> and buy_user_type = #{buyUserType} </if>
-			<if test=' this.has("enterpriseId") '> and enterprise_id = #{enterpriseId} </if>
-			<if test=' this.has("enterpriseName") '> and enterprise_name like concat('%',#{enterpriseName},'%') </if>
-			<if test=' this.has("totalWeight") '> and total_weight = #{totalWeight} </if>
-			<if test=' this.has("totalPrice") '> and total_price = #{totalPrice} </if>
 			<if test=' this.has("tradeStatus") '> and trade_status = #{tradeStatus} </if>
+			<if test=' this.has("tradeTime") '> and trade_time = #{tradeTime} </if>
 			<if test=' this.has("payType") '> and pay_type = #{payType} </if>
+			<if test=' this.has("shopId") '> and shop_id = #{shopId} </if>
+			<if test=' this.has("shopName") '> and shop_name = #{shopName} </if>
+			<if test=' this.has("enterpriseId") '> and enterprise_id = #{enterpriseId} </if>
+			<if test=' this.has("enterpriseName") '> and enterprise_name like concat('%',#{enterpriseName},'%') </if>
+			<if test=' this.has("enterpriseConfirm") '> and enterprise_confirm = #{enterpriseConfirm} </if>
+			<if test=' this.has("groupId") '> and group_id = #{groupId} </if>
 			<if test=' this.has("settleTime") '> and settle_time = #{settleTime} </if>
 			<if test=' this.has("realPrice") '> and real_price = #{realPrice} </if>
 			<if test=' this.has("shouldPrice") '> and should_price = #{shouldPrice} </if>
+			<if test=' this.has("record") '> and record = #{record} </if>
 			<if test=' this.has("settleUserId") '> and settle_user_id = #{settleUserId} </if>
 			<if test=' this.has("recordUserId") '> and record_user_id = #{recordUserId} </if>
 			<if test=' this.has("recordTime") '> and record_time = #{recordTime} </if>
-			<if test=' this.has("record") '> and record = #{record} </if>
 			<if test=' this.has("refundReason") '> and refund_reason = #{refundReason} </if>
 			<if test=' this.has("refundTime") '> and refund_time = #{refundTime} </if>
 			<if test=' this.has("receiveName") '> and receive_name = #{receiveName} </if>
 			<if test=' this.has("receivePhone") '> and receive_phone = #{receivePhone} </if>
 			<if test=' this.has("receiveAddress") '> and receive_address = #{receiveAddress} </if>
 			<if test=' this.has("outTime") '> and out_time = #{outTime} </if>
-			<if test=' this.has("goodsNames") '> and goods_names = #{goodsNames} </if>
-			<if test=' this.has("apply") '> and apply = #{apply} </if>
-			<if test=' this.has("applyTime") '> and apply_time = #{applyTime} </if>
-			<if test=' this.has("applyResult") '> and apply_result = #{applyResult} </if>
-			<if test=' this.has("applyFailReason") '> and apply_fail_reason = #{applyFailReason} </if>
 			<if test=' this.has("distribution") '> and distribution = #{distribution} </if>
-			<if test=' this.has("confirm") '> and confirm = #{confirm} </if>
 			<if test=' this.has("pick") '> and pick = #{pick} </if>
 			<if test=' this.has("pickTime") '> and pick_time = #{pickTime} </if>
-			<if test=' this.has("shopId") '> and shop_id = #{shopId} </if>
-			<if test=' this.has("shopName") '> and shop_name = #{shopName} </if>
 			<if test=' this.has("send") '> and send = #{send} </if>
 			<if test=' this.has("sendTime") '> and send_time = #{sendTime} </if>
-			<if test=' this.has("levelTwoOrderId") '> and level_two_order_id = #{levelTwoOrderId} </if>
-			<if test="dateBegin != null  and dateBegin != ''"> AND create_time BETWEEN #{dateBegin} AND #{dateEnd} + INTERVAL 1 DAY</if>
+			<if test=' this.has("callCarStatus") '> and call_car_status = #{callCarStatus} </if>
 			<if test=' this.has("createBy") '> and create_by = #{createBy} </if>
 			<if test=' this.has("createName") '> and create_name = #{createName} </if>
-			<if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
 			<if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
 			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
+			<if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>
 			<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
-			<if test=' this.has("enterpriseConfirm") '> and enterprise_confirm = #{enterpriseConfirm} </if>
-			<if test=' this.has("resaleStatus") '> and resale_status = #{resaleStatus} </if>
+			<if test=' this.has("collageOrdersId") '> and collage_orders_id = #{collageOrdersId} </if>
+			<if test=' this.has("applyNo") '> and apply_no = #{applyNo} </if>
+			<if test=' this.has("apply") '> and apply = #{apply} </if>
+			<if test=' this.has("applyTime") '> and apply_time = #{applyTime} </if>
+			<if test=' this.has("applyResult") '> and apply_result = #{applyResult} </if>
+			<if test=' this.has("applyFailReason") '> and apply_fail_reason = #{applyFailReason} </if>
 			<if test=' this.has("peopleConfirmStatus") '> and people_confirm_status = #{peopleConfirmStatus} </if>
 			<if test=' this.has("peopleConfirmType") '> and people_confirm_type = #{peopleConfirmType} </if>
-			<if test=' this.has("collageOrdersId") '> and collage_orders_id = #{collageOrdersId} </if>
-			<if test=' this.has("applyConfirmStatus") '> and apply_confirm_status = #{applyConfirmStatus} </if>
+			<if test=' this.has("peopleConfirmTime") '> and people_confirm_time = #{peopleConfirmTime} </if>
 			<if test=' this.has("cooperEntrustStatus") '> and cooper_entrust_status = #{cooperEntrustStatus} </if>
+			<if test=' this.has("cooperEntrustTime") '> and cooper_entrust_time = #{cooperEntrustTime} </if>
+			<if test=' this.has("applyConfirmStatus") '> and apply_confirm_status = #{applyConfirmStatus} </if>
+			<if test=' this.has("applyConfirmTime") '> and apply_confirm_time = #{applyConfirmTime} </if>
+			<if test=' this.has("finishStatus") '> and finish_status = #{finishStatus} </if>
+			<if test=' this.has("resaleStatus") '> and resale_status = #{resaleStatus} </if>
 			<if test=' this.has("beingOrder") '> and being_order = #{beingOrder} </if>
+			<if test=' this.has("platSeqNo") '> and plat_seq_no = #{platSeqNo} </if>
+			<if test=' this.has("settleBillNo") '> and settle_bill_no = #{settleBillNo} </if>
+			<if test=' this.has("preIeportNo") '> and pre_ieport_no = #{preIeportNo} </if>
+			<if test=' this.has("preNo") '> and pre_no = #{preNo} </if>
+			<if test=' this.has("veNo") '> and ve_no = #{veNo} </if>
+			<if test=' this.has("voyageNo") '> and voyage_no = #{voyageNo} </if>
+			<if test=' this.has("borderName") '> and border_name = #{borderName} </if>
+			<if test=' this.has("idno") '> and idno = #{idno} </if>
+			<if test=' this.has("borderPutrecNo") '> and border_putrec_no = #{borderPutrecNo} </if>
+			<if test=' this.has("buyAmount") '> and buy_amount = #{buyAmount} </if>
+			<if test=' this.has("netWt") '> and net_wt = #{netWt} </if>
+			<if test=' this.has("grossWt") '> and gross_wt = #{grossWt} </if>
+			<if test=' this.has("buyQty") '> and buy_qty = #{buyQty} </if>
+			<if test=' this.has("buyQty1") '> and buy_qty1 = #{buyQty1} </if>
+			<if test=' this.has("buyQty2") '> and buy_qty2 = #{buyQty2} </if>
+			<if test=' this.has("saleMainId") '> and sale_main_id = #{saleMainId} </if>
+			<if test=' this.has("cancelPeople") '> and cancel_people = #{cancelPeople} </if>
+			<if test=' this.has("limitNo") '> and limit_no = #{limitNo} </if>
+			<if test=' this.has("gLimit") '> and g_limit = #{gLimit} </if>
+			<if test=' this.has("gNo") '> and g_no = #{gNo} </if>
+			<if test=' this.has("importOrderId") '> and import_order_id = #{importOrderId} </if>
+			<if test=' this.has("declareType") '> and declare_type = #{declareType} </if>
 		</where>
 		order by
 		<choose>

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

@@ -1,7 +1,7 @@
 package com.pj.tb_order;
 
-import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.stream.Collectors;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
@@ -30,7 +30,6 @@ import com.pj.tb_people.TbPeopleMapper;
 import com.pj.tb_people.TbPeopleService;
 import com.pj.utils.sg.AjaxError;
 import com.pj.utils.so.SoMap;
-import org.apache.poi.ss.formula.functions.T;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -68,6 +67,8 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 	private TbEnterpriseMapper tbEnterpriseMapper;
 	@Autowired
 	private AsyncServerInterface asyncServerInterface;
+	@Autowired
+	private TbPeopleMapper tbPeopleMapper;
 
 	/**
 	 * 远程调用
@@ -322,7 +323,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 +373,32 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		wrapper.eq(TbOrder::getId, orderId);
 		boolean result = update(wrapper);
 
-		// TODO: 2023/8/29 调用航通008接口,发送信息
-		sendConfirmMsgToHt(tbOrder);
+		if(result && "1".equals(tbOrder.getDeclareType())) {
+			// TODO: 2023/8/29 调用航通009接口,发送信息
+			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,13 +425,16 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		wrapper.eq(TbOrder::getId, orderId);
 		boolean result = update(wrapper);
 
-		// TODO: 2023/8/29 调用航通008接口,发送信息
-		sendConfirmMsgToHt(tbOrder);
+		if(result && !"1".equals(tbOrder.getDeclareType())
+				&& tbOrder.getPeopleConfirmStatus() == 1 && tbOrder.getCooperEntrustStatus() == 1) {
+			// TODO: 2023/8/29 调用航通009接口,发送信息
+			sendConfirmMsgToHt(tbOrder);
+		}
 		return result;
 	}
 
 	/**
-	 * 发送008信息到航通
+	 * 发送009信息到航通
 	 */
 	private void sendConfirmMsgToHt(TbOrder tbOrder){
 		TbPeople tbPeople=tbPeopleService.getById(tbOrder.getBuyUserId());
@@ -416,29 +446,42 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		FeignFactory.asyncServerInterface.sendConfirm(peopleConfirmDTO);
 	}
 
+
+
 	/**
-	 *  互助委托申报确认
-	 * @param orderId 一级市场订单表ID
+	 *  判断当前边民的边民订单是否委托
 	 */
-	public boolean cooperOrder(Long orderId){
-		//获取登录人
+	public OrderVo getByDeclareType() {
 		APPLoginUserInfo appLoginInfo = StpAPPUserUtil.getAPPLoginInfo();
+		TbPeople tbPeople = tbPeopleMapper.selectById(appLoginInfo.getFk());
+		if(tbPeople == null)throw new ServiceException("当前用户不存在,请联系管理员!");
 
-		LambdaUpdateWrapper<TbOrder> wrapper = new LambdaUpdateWrapper<>();
-		wrapper.set(TbOrder::getCooperEntrustStatus, ConfirmStatus.CONFIRM_STATUS_ONE.getCode());//互助委托申报确认:1=确认
-		wrapper.set(TbOrder::getCooperEntrustTime, new Date());
+		SoMap so = new SoMap();
+		so.put("buyUserId",appLoginInfo.getFk());
+		so.put("deleteStatus",DeleteStatus.DELETE_STATUS_ON.getCode());
+		List<TbOrder> orderList = tbOrderMapper.getList(so);
 
-		wrapper.set(TbOrder::getUpdateBy, appLoginInfo.getLoginId());
-		wrapper.set(TbOrder::getUpdateName, appLoginInfo.getLoginName());
-		wrapper.set(TbOrder::getUpdateTime, new Date());
+		OrderVo orderVo = new OrderVo();
 
-		wrapper.eq(TbOrder::getId, orderId);
-		boolean result = update(wrapper);
+		//被委托订单,并且三个状态中有一个未确认
+		List<TbOrder> declareList2 = orderList.stream().filter(item -> !"1".equals(item.getDeclareType()) &&
+				(item.getPeopleConfirmStatus() == 0||item.getCooperEntrustStatus() == 0||item.getApplyConfirmStatus() == 0)).collect(Collectors.toList());
+		if(declareList2.size() > 0) {
+			BeanUtils.copyProperties(declareList2.get(0),orderVo);
+			return orderVo;
+		}
 
-		return result;
+		//未被委托订单,并且订单未确认
+		List<TbOrder> declareList1 = orderList.stream().filter(item -> "1".equals(item.getDeclareType()) && item.getPeopleConfirmStatus() == 0).collect(Collectors.toList());
+		if(declareList1.size() > 0) {
+			BeanUtils.copyProperties(declareList1.get(0),orderVo);
+			return orderVo;
+		}
+		return null;
 	}
 
 
+
 	/*-----           正常业务逻辑👆👆    rpc远程调用👇👇 -----*/
 
 

+ 94 - 70
sp-service/level-one-server/src/main/java/com/pj/tb_order/vo/OrderVo.java

@@ -1,11 +1,8 @@
 package com.pj.tb_order.vo;
 
-import com.pj.tb_order_people_confirm.TbOrderPeopleConfirm;
-import com.pj.tb_people.TbPeople;
 import lombok.Data;
 
 import java.util.Date;
-import java.util.List;
 
 /**
  * @Author Mechrevo
@@ -18,180 +15,207 @@ public class OrderVo {
     private Long id;
 
     /**
-     * 订单
+     * 订单号
      */
     private String tradeNo;
 
-
     /**
-     * 申报单号
+     * 交易地区名称
      */
-    private String applyNo;
+    private String tradeAreaName;
 
     /**
-     * 商家名称
+     * 过审商品id
      */
-    private String enterpriseName;
+    private Long goodsId;
 
+    /**
+     * 商品名称字符串
+     */
+    private String goodsNames;
 
     /**
-     * 计价单位
+     * 商品单位
      */
     private String goodsUnit;
 
     /**
-     * 净重
+     * 商品图片
      */
-    private Double netWeight;
+    private String goodsImg;
 
     /**
-     * 毛重
+     * 总重量
      */
-    private Double grossWeight;
+    private Double totalWeight;
 
     /**
-     * 价格
+     * 总金额
      */
     private Double totalPrice;
 
+    /**
+     * 买家名称
+     */
+    private String buyUserName;
 
     /**
-     * 订单创建时间
+     * 买家类型(1=边民,2=组长)
      */
-    private Date orderCreateTime;
+    private String buyUserType;
 
     /**
-     * 购买的互市组名称
+     * 交易状态(0=未支付,1=已支付)
      */
-    private String groupName;
+    private Integer tradeStatus;
 
+    /**
+     * 交易时间
+     */
+    private Date tradeTime;
 
     /**
-     * 买家ID
+     * 支付方式(0=金融互助,1=现金刷卡)
      */
-    private Long buyUserId;
+    private Integer payType;
 
     /**
-     * 买家
+     * 商铺ID
      */
-    private String buyUserName;
+    private Long shopId;
 
     /**
-     * 购买用户类型(3=边民,2=组长)
+     * 商铺名称
      */
-    private String buyUserType;
+    private String shopName;
 
     /**
-     * 商ID
+     * 商ID
      */
     private Long enterpriseId;
 
+    /**
+     * 商户名称
+     */
+    private String enterpriseName;
 
     /**
-     * 总重量
+     * 边民确认
      */
-    private Double totalWeight;
+    private Integer peopleConfirmStatus;
 
+    /**
+     * 边民确认类型
+     */
+    private String peopleConfirmType;
 
     /**
-     * 交易时间
+     * 边民确认时间
      */
-    private Date tradeTime;
+    private Date peopleConfirmTime;
 
     /**
-     * 交易状态(0=未支付,1=已支付)
+     * 互助委托申报确认状态
      */
-    private Integer tradeStatus;
+    private Integer cooperEntrustStatus;
 
     /**
-     * 支付方式(0=金融互助,1=现金刷卡)
+     * 互助委托申报确认时间
      */
-    private Integer payType;
+    private Date cooperEntrustTime;
 
     /**
-     * 结算时间
+     * 边民进口申报确认状态
      */
-    private String settleTime;
+    private Integer applyConfirmStatus;
 
     /**
-     * 当前结算金额
+     * 边民进口申报确认时间
      */
-    private Double realPrice;
+    private Date applyConfirmTime;
 
     /**
-     * 应结金额
+     * 订单完成状态(0=未完成,1=已完成)
      */
-    private Double shouldPrice;
+    private Integer finishStatus;
 
     /**
-     * 商品名称字符串
+     * 是否转售(0=未转售,1=已转售,2=转售中)
      */
-    private String goodsNames;
+    private Integer resaleStatus;
 
     /**
-     * 是否申报
+     * 订单转售后是否在二级市场被下单
      */
-    private Integer apply;
+    private Integer beingOrder;
 
     /**
-     * 申报时间
+     * 预申报编号
      */
-    private Date applyTime;
+    private String platSeqNo;
 
     /**
-     * 申报结果
+     * 结算单号
      */
-    private String applyResult;
+    private String settleBillNo;
 
     /**
-     *
+     * 进出口预申报单号
      */
-    private String applyFailReason;
+    private String preIeportNo;
 
     /**
-     * 一级市场边民确认状态(0=待确认,1=是)
+     * 单证代码
      */
-    private Integer peopleConfirmStatus;
+    private String preNo;
+
     /**
-     * 一级市场边民确认时间
+     * 车牌号
      */
-    private Date peopleConfirmTime;
+    private String veNo;
 
     /**
-     * 互助委托申报确认状态
+     * 车航次(班)号
      */
-    private String cooperEntrustStatus;
+    private String voyageNo;
+
     /**
-     * 互助委托申报确认时间
+     * 边民姓名
      */
-    private String cooperEntrustTime;
+    private String borderName;
 
     /**
-     * 边民进口申报确认状态(0=待确认,1=是)
+     * 身份证号
      */
-    private Integer applyConfirmStatus;
+    private String idno;
+
     /**
-     * 边民进口申报确认时间
+     * 边民备案编号
      */
-    private Date applyConfirmTime;
+    private String borderPutrecNo;
 
     /**
-     *
+     * 申报数量
      */
-    private Long shopId;
+    private Double buyQty;
 
     /**
-     *
+     * 商品额度
      */
-    private String shopName;
+    private Double gLimit;
 
     /**
-     * 车牌
+     * 商品序
      */
-    private String veNo;
+    private Integer gNo;
 
     /**
-     * 车航次(班)号
+     * 进口申报单Id
      */
-    private String voyageNo;
+    private Long importOrderId;
+
+    /**
+     *  1-边民,2-商铺业主或其代理人,3-合作社代表,4-互助组代表
+     */
+    private String declareType;
 }

+ 1 - 1
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.java

@@ -216,7 +216,7 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
         String smsCode = RedisUtil.get(PREFIX + registerDto.getPhone());
         if (smsCode == null) throw new RuntimeException("验证码已过期,请重新发送!");
         //比对验证码
-        if (!registerDto.getSmsCode().toString().equals(smsCode)) throw new SecurityException("验证码输入错误,请检查!");
+        if (registerDto.getSmsCode()!=Integer.parseInt(smsCode)) throw new SecurityException("验证码输入错误,请检查!");
         //4.开始新增
         AppUser appUser = new AppUser();
         //手机号