Procházet zdrojové kódy

8.27 基础内容更正

Mechrevo před 1 rokem
rodič
revize
f8eba1c95f
38 změnil soubory, kde provedl 2180 přidání a 410 odebrání
  1. 8 0
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java
  2. 12 0
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterfaceFallback.java
  3. 116 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/BorderList.java
  4. 443 36
      sp-core/sp-api/src/main/java/com/pj/api/dto/CooperativeDto.java
  5. 100 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/DclBorderList.java
  6. 211 16
      sp-core/sp-api/src/main/java/com/pj/api/dto/GroupDto.java
  7. 587 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/ShopDto.java
  8. 7 0
      sp-core/sp-base/pom.xml
  9. 24 0
      sp-core/sp-base/src/main/java/com/pj/enummj/FinishStatus.java
  10. 4 5
      sp-core/sp-base/src/main/java/com/pj/rabbitmq/RabbitMQ.java
  11. 0 0
      sp-core/sp-base/src/main/java/com/pj/rabbitmq/RabbitmqConfig.java
  12. 1 5
      sp-service/async-server/pom.xml
  13. 92 0
      sp-service/async-server/src/main/java/com/pj/ht_byte/HtByte.java
  14. 24 22
      sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteController.java
  15. 4 4
      sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteMapper.java
  16. 53 0
      sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteMapper.xml
  17. 10 9
      sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteService.java
  18. 0 95
      sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytes.java
  19. 0 59
      sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytesMapper.xml
  20. 8 22
      sp-service/async-server/src/main/java/com/pj/listen/BaseInfoListen.java
  21. 66 67
      sp-service/async-server/src/main/java/com/pj/service/ObjectService.java
  22. 144 0
      sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java
  23. 3 2
      sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeAppController.java
  24. 12 0
      sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeController.java
  25. 2 2
      sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeMapper.xml
  26. 8 1
      sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeService.java
  27. 1 2
      sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeUtil.java
  28. 0 3
      sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/TbGoodsCartService.java
  29. 7 5
      sp-service/level-one-server/src/main/java/com/pj/tb_group/MethodGroupService.java
  30. 85 31
      sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroup.java
  31. 39 6
      sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupMapper.xml
  32. 7 7
      sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupService.java
  33. 1 6
      sp-service/level-one-server/src/main/java/com/pj/tb_order/MethodOrderService.java
  34. 27 0
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java
  35. 36 5
      sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleService.java
  36. 8 0
      sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopController.java
  37. 10 0
      sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopService.java
  38. 20 0
      sp-service/transport-server/src/main/java/com/pj/project/tb_vehicle/TbVehicleService.java

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

@@ -22,6 +22,14 @@ import java.util.List;
 )
 public interface LevelOneServerInterface {
 
+    /** 远程调用: 对合作社信息进行事务处理 */
+    @RequestMapping("/TbCooperative/rpc/cooperativeDto")
+    public boolean cooperativeDto(CooperativeDto cooperativeDto);
+
+    /** 商铺信息处理 */
+    @RequestMapping("/TbShop/rpc/shopDto")
+    public boolean shopDto(ShopDto shopDto);
+
     /** 远程调用  修改订单的叫车状态 */
     @RequestMapping("/app/TbOrder/rpc/updateOrderCallCarStatus")
     public boolean updateOrderCallCarStatus(@RequestBody OrderDto orderDto);

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

@@ -24,6 +24,18 @@ public class LevelOneServerInterfaceFallback implements FallbackFactory<LevelOne
     public LevelOneServerInterface create(Throwable throwable) {
         return new LevelOneServerInterface() {
             @Override
+            public boolean cooperativeDto(CooperativeDto cooperativeDto) {
+                log.error("查询一级市场商户错误,当前对象:{},错误信息是:{}",cooperativeDto.toString(),throwable.getMessage());
+                return false;
+            }
+
+            @Override
+            public boolean shopDto(ShopDto shopDto) {
+                log.error("查询一级市场商户错误,当前对象:{},错误信息是:{}",shopDto.toString(),throwable.getMessage());
+                return false;
+            }
+
+            @Override
             public boolean updateOrderCallCarStatus(OrderDto orderDto) {
                 System.out.println(throwable.getMessage());
                 log.error("查询一级市场商户错误,当前对象:{},错误信息是:{}",orderDto.toString(),throwable.getMessage());

+ 116 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/BorderList.java

@@ -0,0 +1,116 @@
+package com.pj.api.dto;
+
+
+/**
+ * 互助组边民信息字段
+ * @Author Mechrevo
+ * @Date 2023 08 27 10 46
+ **/
+
+public class BorderList {
+
+    /**
+     * 互助组中边民的序号
+     */
+    private String borderNo;
+
+    /**
+     * 边民备案编号
+     */
+    private String borderPutrecNo;
+
+    /**
+     * 边民姓名
+     */
+    private String borderName;
+
+    /**
+     * 边民身份证号码
+     */
+    private String idCardNo;
+
+    /**
+     * 户籍地址
+     */
+    private String borderAddr;
+
+    public String getBorderNo() {
+        return borderNo;
+    }
+
+    public void setBorderNo(String borderNo) {
+        this.borderNo = borderNo;
+    }
+
+    public String getBorderPutrecNo() {
+        return borderPutrecNo;
+    }
+
+    public void setBorderPutrecNo(String borderPutrecNo) {
+        this.borderPutrecNo = borderPutrecNo;
+    }
+
+    public String getBorderName() {
+        return borderName;
+    }
+
+    public void setBorderName(String borderName) {
+        this.borderName = borderName;
+    }
+
+    public String getIdCardNo() {
+        return idCardNo;
+    }
+
+    public void setIdCardNo(String idCardNo) {
+        this.idCardNo = idCardNo;
+    }
+
+    public String getBorderAddr() {
+        return borderAddr;
+    }
+
+    public void setBorderAddr(String borderAddr) {
+        this.borderAddr = borderAddr;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public String getBorderTel() {
+        return borderTel;
+    }
+
+    public void setBorderTel(String borderTel) {
+        this.borderTel = borderTel;
+    }
+
+    public BorderList(String borderNo, String borderPutrecNo, String borderName, String idCardNo, String borderAddr, String groupId, String borderTel) {
+        this.borderNo = borderNo;
+        this.borderPutrecNo = borderPutrecNo;
+        this.borderName = borderName;
+        this.idCardNo = idCardNo;
+        this.borderAddr = borderAddr;
+        this.groupId = groupId;
+        this.borderTel = borderTel;
+    }
+
+    public BorderList() {
+    }
+
+    /**
+     * 本系统中互助组 id
+     */
+    private String groupId;
+
+    /**
+     * 手机号码
+     */
+    private String borderTel;
+
+}

+ 443 - 36
sp-core/sp-api/src/main/java/com/pj/api/dto/CooperativeDto.java

@@ -1,5 +1,6 @@
 package com.pj.api.dto;
 
+
 import java.util.Date;
 
 /**
@@ -9,15 +10,7 @@ import java.util.Date;
 public class CooperativeDto {
 
 
-	/**
-	 * 贸易区域id
-	 */
-	private Long tradeAreaId;
-
-	/**
-	 * 贸易区域名称
-	 */
-	private String tradeAreaName;
+	private Long id;
 
 	/**
 	 * 名称
@@ -25,19 +18,19 @@ public class CooperativeDto {
 	private String name;
 
 	/**
-	 * 法人
+	 * 法人代表姓名
 	 */
-	private String legalPerson;
+	private String correpName;
 
 	/**
 	 * 身份证号
 	 */
-	private String idCard;
+	private String ciphertextIdno;
 
 	/**
 	 * 手机号码
 	 */
-	private String contact;
+	private String correpTel;
 
 	/**
 	 * 营业执照
@@ -60,24 +53,161 @@ public class CooperativeDto {
 	private String dutyParagraph;
 
 	/**
-	 * 地址
+	 * 审核状态(0=未通过,1=已通过,2=审核不通过)
+	 */
+	private String judgeStatus;
+
+	/**
+	 * 审核意见
+	 */
+	private String judgeContent;
+
+	/**
+	 * 上次审核时间
+	 */
+	private Date judgeTime;
+
+	/**
+	 * 注册时间
+	 */
+	private Date registerTime;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 创建人编号
+	 */
+	private String createBy;
+
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+	/**
+	 * 更新人编号
+	 */
+	private String updateBy;
+
+	/**
+	 * 更新人名称
+	 */
+	private String updateName;
+
+	/**
+	 * 删除状态(0=禁用,1=启用)
+	 */
+	private Integer deleteStatus;
+
+	/**
+	 * 0=锁住 1=启用
+	 */
+	private String isLock;
+
+	/**
+	 * 审核人
+	 */
+	private String judgeBy;
+
+	/**
+	 * 贸易区域ID
+	 */
+	private Long tradeAreaId;
+
+	/**
+	 * 贸易区域名称
+	 */
+	private String tradeAreaName;
+
+	/**
+	 * 地方平台的内部业务编号,每次申请都是新编号
+	 */
+	private String platSeqNo;
+
+	/**
+	 * 关区代码
+	 */
+	private String customsCode;
+
+	/**
+	 *  合作社名称
+	 */
+	private String orgName;
+
+	/**
+	 * 社会统一信用代码 证 ( 业 务 主键,变更时该字段不允许修改)
+	 */
+	private String orgSccd;
+
+	/**
+	 * 成立日期
+	 */
+	private String createDate;
+
+	/**
+	 * 所属边境市(县、区)乡镇村屯名称
 	 */
 	private String address;
 
-	public Long getTradeAreaId() {
-		return tradeAreaId;
-	}
+	/**
+	 * 启停用状态:1- 启用、2-停用、3-注销
+	 */
+	private String eDStatus;
 
-	public void setTradeAreaId(Long tradeAreaId) {
-		this.tradeAreaId = tradeAreaId;
-	}
+	/**
+	 * 有效效截止时间yyyy-MM-dd
+	 */
+	private String expiry;
 
-	public String getTradeAreaName() {
-		return tradeAreaName;
+	/**
+	 * 备案编号,如果为新增备案,传空值;如果为变更备案,必须传值;
+	 */
+	private String putrecNo;
+
+	/**
+	 * 地方政府编号
+	 */
+	private String localGovernmentNo;
+
+	/**
+	 * 监管场所编号
+	 */
+	private String fieldCode;
+
+	/**
+	 * 监管场所名称
+	 */
+	private String fieldName;
+
+	/**
+	 * 申报状态 D0,暂存,D1 发往海关,D2-发往海关成功, D3-发往海关失败,Y-海关入库成功,N- 海关入库失败,04 退单, 03 通过
+	 */
+	private String declStatus;
+
+	/**
+	 * 边民信息集合List<E> borderList
+	 */
+	private String borderList;
+
+	/**
+	 * 合作社代表信息
+	 */
+	private String dclBorderList;
+
+	public Long getId() {
+		return id;
 	}
 
-	public void setTradeAreaName(String tradeAreaName) {
-		this.tradeAreaName = tradeAreaName;
+	public void setId(Long id) {
+		this.id = id;
 	}
 
 	public String getName() {
@@ -88,28 +218,28 @@ public class CooperativeDto {
 		this.name = name;
 	}
 
-	public String getLegalPerson() {
-		return legalPerson;
+	public String getCorrepName() {
+		return correpName;
 	}
 
-	public void setLegalPerson(String legalPerson) {
-		this.legalPerson = legalPerson;
+	public void setCorrepName(String correpName) {
+		this.correpName = correpName;
 	}
 
-	public String getIdCard() {
-		return idCard;
+	public String getCiphertextIdno() {
+		return ciphertextIdno;
 	}
 
-	public void setIdCard(String idCard) {
-		this.idCard = idCard;
+	public void setCiphertextIdno(String ciphertextIdno) {
+		this.ciphertextIdno = ciphertextIdno;
 	}
 
-	public String getContact() {
-		return contact;
+	public String getCorrepTel() {
+		return correpTel;
 	}
 
-	public void setContact(String contact) {
-		this.contact = contact;
+	public void setCorrepTel(String correpTel) {
+		this.correpTel = correpTel;
 	}
 
 	public String getBusinessLicense() {
@@ -144,6 +274,166 @@ public class CooperativeDto {
 		this.dutyParagraph = dutyParagraph;
 	}
 
+	public String getJudgeStatus() {
+		return judgeStatus;
+	}
+
+	public void setJudgeStatus(String judgeStatus) {
+		this.judgeStatus = judgeStatus;
+	}
+
+	public String getJudgeContent() {
+		return judgeContent;
+	}
+
+	public void setJudgeContent(String judgeContent) {
+		this.judgeContent = judgeContent;
+	}
+
+	public Date getJudgeTime() {
+		return judgeTime;
+	}
+
+	public void setJudgeTime(Date judgeTime) {
+		this.judgeTime = judgeTime;
+	}
+
+	public Date getRegisterTime() {
+		return registerTime;
+	}
+
+	public void setRegisterTime(Date registerTime) {
+		this.registerTime = registerTime;
+	}
+
+	public Date getCreateTime() {
+		return createTime;
+	}
+
+	public void setCreateTime(Date createTime) {
+		this.createTime = createTime;
+	}
+
+	public String getCreateBy() {
+		return createBy;
+	}
+
+	public void setCreateBy(String createBy) {
+		this.createBy = createBy;
+	}
+
+	public String getCreateName() {
+		return createName;
+	}
+
+	public void setCreateName(String createName) {
+		this.createName = createName;
+	}
+
+	public Date getUpdateTime() {
+		return updateTime;
+	}
+
+	public void setUpdateTime(Date updateTime) {
+		this.updateTime = updateTime;
+	}
+
+	public String getUpdateBy() {
+		return updateBy;
+	}
+
+	public void setUpdateBy(String updateBy) {
+		this.updateBy = updateBy;
+	}
+
+	public String getUpdateName() {
+		return updateName;
+	}
+
+	public void setUpdateName(String updateName) {
+		this.updateName = updateName;
+	}
+
+	public Integer getDeleteStatus() {
+		return deleteStatus;
+	}
+
+	public void setDeleteStatus(Integer deleteStatus) {
+		this.deleteStatus = deleteStatus;
+	}
+
+	public String getIsLock() {
+		return isLock;
+	}
+
+	public void setIsLock(String isLock) {
+		this.isLock = isLock;
+	}
+
+	public String getJudgeBy() {
+		return judgeBy;
+	}
+
+	public void setJudgeBy(String judgeBy) {
+		this.judgeBy = judgeBy;
+	}
+
+	public Long getTradeAreaId() {
+		return tradeAreaId;
+	}
+
+	public void setTradeAreaId(Long tradeAreaId) {
+		this.tradeAreaId = tradeAreaId;
+	}
+
+	public String getTradeAreaName() {
+		return tradeAreaName;
+	}
+
+	public void setTradeAreaName(String tradeAreaName) {
+		this.tradeAreaName = tradeAreaName;
+	}
+
+	public String getPlatSeqNo() {
+		return platSeqNo;
+	}
+
+	public void setPlatSeqNo(String platSeqNo) {
+		this.platSeqNo = platSeqNo;
+	}
+
+	public String getCustomsCode() {
+		return customsCode;
+	}
+
+	public void setCustomsCode(String customsCode) {
+		this.customsCode = customsCode;
+	}
+
+	public String getOrgName() {
+		return orgName;
+	}
+
+	public void setOrgName(String orgName) {
+		this.orgName = orgName;
+	}
+
+	public String getOrgSccd() {
+		return orgSccd;
+	}
+
+	public void setOrgSccd(String orgSccd) {
+		this.orgSccd = orgSccd;
+	}
+
+	public String getCreateDate() {
+		return createDate;
+	}
+
+	public void setCreateDate(String createDate) {
+		this.createDate = createDate;
+	}
+
 	public String getAddress() {
 		return address;
 	}
@@ -151,4 +441,121 @@ public class CooperativeDto {
 	public void setAddress(String address) {
 		this.address = address;
 	}
+
+	public String geteDStatus() {
+		return eDStatus;
+	}
+
+	public void seteDStatus(String eDStatus) {
+		this.eDStatus = eDStatus;
+	}
+
+	public String getExpiry() {
+		return expiry;
+	}
+
+	public void setExpiry(String expiry) {
+		this.expiry = expiry;
+	}
+
+	public String getPutrecNo() {
+		return putrecNo;
+	}
+
+	public void setPutrecNo(String putrecNo) {
+		this.putrecNo = putrecNo;
+	}
+
+	public String getLocalGovernmentNo() {
+		return localGovernmentNo;
+	}
+
+	public void setLocalGovernmentNo(String localGovernmentNo) {
+		this.localGovernmentNo = localGovernmentNo;
+	}
+
+	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 getDeclStatus() {
+		return declStatus;
+	}
+
+	public void setDeclStatus(String declStatus) {
+		this.declStatus = declStatus;
+	}
+
+	public String getBorderList() {
+		return borderList;
+	}
+
+	public void setBorderList(String borderList) {
+		this.borderList = borderList;
+	}
+
+	public String getDclBorderList() {
+		return dclBorderList;
+	}
+
+	public void setDclBorderList(String dclBorderList) {
+		this.dclBorderList = dclBorderList;
+	}
+
+	public CooperativeDto(Long id, String name, String correpName, String ciphertextIdno, String correpTel, String businessLicense, String bankName, String bankAccount, String dutyParagraph, String judgeStatus, String judgeContent, Date judgeTime, Date registerTime, Date createTime, String createBy, String createName, Date updateTime, String updateBy, String updateName, Integer deleteStatus, String isLock, String judgeBy, Long tradeAreaId, String tradeAreaName, String platSeqNo, String customsCode, String orgName, String orgSccd, String createDate, String address, String eDStatus, String expiry, String putrecNo, String localGovernmentNo, String fieldCode, String fieldName, String declStatus, String borderList, String dclBorderList) {
+		this.id = id;
+		this.name = name;
+		this.correpName = correpName;
+		this.ciphertextIdno = ciphertextIdno;
+		this.correpTel = correpTel;
+		this.businessLicense = businessLicense;
+		this.bankName = bankName;
+		this.bankAccount = bankAccount;
+		this.dutyParagraph = dutyParagraph;
+		this.judgeStatus = judgeStatus;
+		this.judgeContent = judgeContent;
+		this.judgeTime = judgeTime;
+		this.registerTime = registerTime;
+		this.createTime = createTime;
+		this.createBy = createBy;
+		this.createName = createName;
+		this.updateTime = updateTime;
+		this.updateBy = updateBy;
+		this.updateName = updateName;
+		this.deleteStatus = deleteStatus;
+		this.isLock = isLock;
+		this.judgeBy = judgeBy;
+		this.tradeAreaId = tradeAreaId;
+		this.tradeAreaName = tradeAreaName;
+		this.platSeqNo = platSeqNo;
+		this.customsCode = customsCode;
+		this.orgName = orgName;
+		this.orgSccd = orgSccd;
+		this.createDate = createDate;
+		this.address = address;
+		this.eDStatus = eDStatus;
+		this.expiry = expiry;
+		this.putrecNo = putrecNo;
+		this.localGovernmentNo = localGovernmentNo;
+		this.fieldCode = fieldCode;
+		this.fieldName = fieldName;
+		this.declStatus = declStatus;
+		this.borderList = borderList;
+		this.dclBorderList = dclBorderList;
+	}
+
+	public CooperativeDto() {
+	}
 }

+ 100 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/DclBorderList.java

@@ -0,0 +1,100 @@
+package com.pj.api.dto;
+
+
+/**
+ * 互助组边民代表信息
+ * @Author Mechrevo
+ * @Date 2023 08 27 10 48
+ **/
+public class DclBorderList {
+
+    /**
+     * 序号
+     */
+    private String dclNo;
+
+    /**
+     * 边民备案编号
+     */
+    private String borderPutrecNo;
+
+    /**
+     * 互助组申报代表姓名
+     */
+    private String declareName;
+
+    /**
+     * 边民身份证号码
+     */
+    private String idCardNo;
+
+    /**
+     * 手机号码
+     */
+    private String declareTel;
+
+    /**
+     * 本系统中互助组 id
+     */
+    private String groupId;
+
+    public String getDclNo() {
+        return dclNo;
+    }
+
+    public void setDclNo(String dclNo) {
+        this.dclNo = dclNo;
+    }
+
+    public String getBorderPutrecNo() {
+        return borderPutrecNo;
+    }
+
+    public void setBorderPutrecNo(String borderPutrecNo) {
+        this.borderPutrecNo = borderPutrecNo;
+    }
+
+    public String getDeclareName() {
+        return declareName;
+    }
+
+    public void setDeclareName(String declareName) {
+        this.declareName = declareName;
+    }
+
+    public String getIdCardNo() {
+        return idCardNo;
+    }
+
+    public void setIdCardNo(String idCardNo) {
+        this.idCardNo = idCardNo;
+    }
+
+    public String getDeclareTel() {
+        return declareTel;
+    }
+
+    public void setDeclareTel(String declareTel) {
+        this.declareTel = declareTel;
+    }
+
+    public String getGroupId() {
+        return groupId;
+    }
+
+    public void setGroupId(String groupId) {
+        this.groupId = groupId;
+    }
+
+    public DclBorderList(String dclNo, String borderPutrecNo, String declareName, String idCardNo, String declareTel, String groupId) {
+        this.dclNo = dclNo;
+        this.borderPutrecNo = borderPutrecNo;
+        this.declareName = declareName;
+        this.idCardNo = idCardNo;
+        this.declareTel = declareTel;
+        this.groupId = groupId;
+    }
+
+    public DclBorderList() {
+    }
+}

+ 211 - 16
sp-core/sp-api/src/main/java/com/pj/api/dto/GroupDto.java

@@ -1,6 +1,7 @@
 package com.pj.api.dto;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -12,13 +13,15 @@ import java.util.Date;
 public class GroupDto {
 
 
+    private Long id;
+
     /**
      *
      */
     private String addressIds;
 
     /**
-     *
+     * 所属边境市(县、区)乡镇村屯
      */
     private String address;
 
@@ -28,9 +31,9 @@ public class GroupDto {
     private String detailAddress;
 
     /**
-     * 组名称
+     * 互助组名称
      */
-    private String name;
+    private String orgName;
 
     /**
      * 组长ID
@@ -60,12 +63,13 @@ public class GroupDto {
     /**
      * 创建时间
      */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date createTime;
 
     /**
      * 创建人编号
      */
-    private String createBy;
+    private Long createBy;
 
     /**
      * 创建人名称
@@ -75,12 +79,13 @@ public class GroupDto {
     /**
      * 更新时间
      */
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     private Date updateTime;
 
     /**
      * 更新人编号
      */
-    private String updateBy;
+    private Long updateBy;
 
     /**
      * 更新人名称
@@ -93,11 +98,83 @@ public class GroupDto {
     private Integer deleteStatus;
 
     /**
-     * 是否锁
+     * 是否锁
      */
     private Integer isLock;
 
+    /**
+     * 互市区id
+     */
+    private Long tradeAreaId;
+
+    /**
+     * 互市区名称
+     */
+    private String tradeAreaName;
+
+    /**
+     * 地方平台的内部业务编号,每次申请都是新编号
+     */
+    private String platSeqNo;
+
+    /**
+     * 关区代码
+     */
+    private String customsCode;
+
+    /**
+     * 登记号
+     */
+    private String shopsSccd;
+
+    /**
+     * 启停用状态:1-启用、2-停用、3-注销
+     */
+    private String eDStatus;
+
+    /**
+     * 有效效截止时间 yyyy-MM-dd
+     */
+    private String expiry;
+
+    /**
+     * 备案编号,如果为新增备案,传空值;如果为变更备案,必须传值;
+     */
+    private String putrecNo;
+
+    /**
+     *  地方政府编号
+     */
+    private String localGovernmentNo;
+
+    /**
+     * 备案状态:默认 0、待申报,1、已申报,2、备案通过,3、备案失败
+     */
+    private String filingStatus;
+
+    /**
+     * 场站编码
+     */
+    private String fieldCode;
+
+    /**
+     * 边民信息表体信息,json 数组List,
+     */
+    private String borderList;
+
+    /**
+     * 互助组申报边民代表表体信息,json 数组 List
+     */
+    private String dclBorderList;
+
+
+    public Long getId() {
+        return id;
+    }
 
+    public void setId(Long id) {
+        this.id = id;
+    }
 
     public String getAddressIds() {
         return addressIds;
@@ -123,12 +200,12 @@ public class GroupDto {
         this.detailAddress = detailAddress;
     }
 
-    public String getName() {
-        return name;
+    public String getOrgName() {
+        return orgName;
     }
 
-    public void setName(String name) {
-        this.name = name;
+    public void setOrgName(String orgName) {
+        this.orgName = orgName;
     }
 
     public Long getLeaderId() {
@@ -179,11 +256,11 @@ public class GroupDto {
         this.createTime = createTime;
     }
 
-    public String getCreateBy() {
+    public Long getCreateBy() {
         return createBy;
     }
 
-    public void setCreateBy(String createBy) {
+    public void setCreateBy(Long createBy) {
         this.createBy = createBy;
     }
 
@@ -203,11 +280,11 @@ public class GroupDto {
         this.updateTime = updateTime;
     }
 
-    public String getUpdateBy() {
+    public Long getUpdateBy() {
         return updateBy;
     }
 
-    public void setUpdateBy(String updateBy) {
+    public void setUpdateBy(Long updateBy) {
         this.updateBy = updateBy;
     }
 
@@ -235,11 +312,116 @@ public class GroupDto {
         this.isLock = isLock;
     }
 
-    public GroupDto(String addressIds, String address, String detailAddress, String name, Long leaderId, String leaderName, String leaderPhone, String code, Double leftPrice, Date createTime, String createBy, String createName, Date updateTime, String updateBy, String updateName, Integer deleteStatus, Integer isLock) {
+    public Long getTradeAreaId() {
+        return tradeAreaId;
+    }
+
+    public void setTradeAreaId(Long tradeAreaId) {
+        this.tradeAreaId = tradeAreaId;
+    }
+
+    public String getTradeAreaName() {
+        return tradeAreaName;
+    }
+
+    public void setTradeAreaName(String tradeAreaName) {
+        this.tradeAreaName = tradeAreaName;
+    }
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getCustomsCode() {
+        return customsCode;
+    }
+
+    public void setCustomsCode(String customsCode) {
+        this.customsCode = customsCode;
+    }
+
+    public String getShopsSccd() {
+        return shopsSccd;
+    }
+
+    public void setShopsSccd(String shopsSccd) {
+        this.shopsSccd = shopsSccd;
+    }
+
+    public String geteDStatus() {
+        return eDStatus;
+    }
+
+    public void seteDStatus(String eDStatus) {
+        this.eDStatus = eDStatus;
+    }
+
+    public String getExpiry() {
+        return expiry;
+    }
+
+    public void setExpiry(String expiry) {
+        this.expiry = expiry;
+    }
+
+    public String getPutrecNo() {
+        return putrecNo;
+    }
+
+    public void setPutrecNo(String putrecNo) {
+        this.putrecNo = putrecNo;
+    }
+
+    public String getLocalGovernmentNo() {
+        return localGovernmentNo;
+    }
+
+    public void setLocalGovernmentNo(String localGovernmentNo) {
+        this.localGovernmentNo = localGovernmentNo;
+    }
+
+    public String getFilingStatus() {
+        return filingStatus;
+    }
+
+    public void setFilingStatus(String filingStatus) {
+        this.filingStatus = filingStatus;
+    }
+
+    public String getFieldCode() {
+        return fieldCode;
+    }
+
+    public void setFieldCode(String fieldCode) {
+        this.fieldCode = fieldCode;
+    }
+
+    public String getBorderList() {
+        return borderList;
+    }
+
+    public void setBorderList(String borderList) {
+        this.borderList = borderList;
+    }
+
+    public String getDclBorderList() {
+        return dclBorderList;
+    }
+
+    public void setDclBorderList(String dclBorderList) {
+        this.dclBorderList = dclBorderList;
+    }
+
+    public GroupDto(Long id, String addressIds, String address, String detailAddress, String orgName, Long leaderId, String leaderName, String leaderPhone, String code, Double leftPrice, Date createTime, Long createBy, String createName, Date updateTime, Long updateBy, String updateName, Integer deleteStatus, Integer isLock, Long tradeAreaId, String tradeAreaName, String platSeqNo, String customsCode, String shopsSccd, String eDStatus, String expiry, String putrecNo, String localGovernmentNo, String filingStatus, String fieldCode, String borderList, String dclBorderList) {
+        this.id = id;
         this.addressIds = addressIds;
         this.address = address;
         this.detailAddress = detailAddress;
-        this.name = name;
+        this.orgName = orgName;
         this.leaderId = leaderId;
         this.leaderName = leaderName;
         this.leaderPhone = leaderPhone;
@@ -253,6 +435,19 @@ public class GroupDto {
         this.updateName = updateName;
         this.deleteStatus = deleteStatus;
         this.isLock = isLock;
+        this.tradeAreaId = tradeAreaId;
+        this.tradeAreaName = tradeAreaName;
+        this.platSeqNo = platSeqNo;
+        this.customsCode = customsCode;
+        this.shopsSccd = shopsSccd;
+        this.eDStatus = eDStatus;
+        this.expiry = expiry;
+        this.putrecNo = putrecNo;
+        this.localGovernmentNo = localGovernmentNo;
+        this.filingStatus = filingStatus;
+        this.fieldCode = fieldCode;
+        this.borderList = borderList;
+        this.dclBorderList = dclBorderList;
     }
 
     public GroupDto() {

+ 587 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/ShopDto.java

@@ -0,0 +1,587 @@
+package com.pj.api.dto;
+
+import java.util.Date;
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 08 27 10 28
+ **/
+public class ShopDto {
+
+    private String id;
+
+    /**
+     *
+     */
+    private Long enterpriseId;
+
+    /**
+     * 互市区id
+     */
+    private Long tradeAreaId;
+
+    /**
+     * 互市区名称
+     */
+    private String tradeAreaName;
+
+    /**
+     *
+     */
+    private String address;
+
+    /**
+     *
+     */
+    private String addressIds;
+
+    /**
+     * 区域(A区=A区,B区=B区,C区=C区)
+     */
+    private String area;
+
+    /**
+     * 是否可用(0=否,1=是)
+     */
+    private Integer status;
+
+    /**
+     *
+     */
+    private String remark;
+
+    /**
+     *
+     */
+    private String enterpriseName;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建者id
+     */
+    private String createBy;
+
+    /**
+     * 创建者名称
+     */
+    private String createName;
+
+    /**
+     * 更新者id
+     */
+    private String updateBy;
+
+    /**
+     * 更新者名称
+     */
+    private String updateName;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 删除状态
+     */
+    private Integer deleteStatus;
+
+    /**
+     * 地方平台的内部业务编号,每次申请都是新编号
+     */
+    private String platSeqNo;
+
+    /**
+     * 商铺名称
+     */
+    private String shopName;
+
+    /**
+     * 商铺编码
+     */
+    private String shopNo;
+
+    /**
+     * 监管场所编号
+     */
+    private String fieldCode;
+
+    /**
+     * 监管场所名称
+     */
+    private String fieldName;
+
+    /**
+     * 关区代码
+     */
+    private String customsCode;
+
+    /**
+     * 营业执照号或社会信用统一代码
+     */
+    private String shopSccd;
+
+    /**
+     *  经营范围
+     */
+    private String bnsScope;
+
+    /**
+     * 铺主姓名
+     */
+    private String ownerName;
+
+    /**
+     * 铺主证件类型 01:身份证 02 护照
+     */
+    private String ownerIdtype;
+
+    /**
+     * 铺主联系方式
+     */
+    private String ownerTel;
+
+    /**
+     *  店铺地址
+     */
+    private String shopAddr;
+
+    /**
+     * 商铺类型:1-中方商铺 2-外国商铺
+     */
+    private String shopType;
+
+    /**
+     * 启停用状态: 1- 启用 2-停用 3-注销
+     */
+    private String eDStatus;
+
+    /**
+     * 有 效 效 截 止 时 间
+     */
+    private String expiry;
+
+    /**
+     * 备案编号,如果为新增备案,传空值;如果为变更备案,必须传值;
+     */
+    private String putrecNo;
+
+    /**
+     * 代理人姓名:商铺类型为外方商铺时必填
+     */
+    private String agentName;
+
+    /**
+     * 代理人联系方式:商铺类型为外方商铺时必填
+     */
+    private String agentTel;
+
+    /**
+     * 代理人证件类型:01-身份证,02-护照商铺类型为外方商铺时必填
+     */
+    private String agentIdtype;
+
+    /**
+     * 代理人身份证:商铺类型为外方商铺时必填
+     */
+    private String agentCiphertextIdno;
+
+    /**
+     * 地方政府编号
+     */
+    private String localGovernmentNo;
+
+    /**
+     * 备案状态:默认 0、待申报,1、已申报,2、备案通过,3、备案失败
+     */
+    private String filingStatus;
+
+    /**
+     * 店铺开户行
+     */
+    private String bank;
+
+    /**
+     * 店铺开户行账号
+     */
+    private String bankAccount;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public Long getEnterpriseId() {
+        return enterpriseId;
+    }
+
+    public void setEnterpriseId(Long enterpriseId) {
+        this.enterpriseId = enterpriseId;
+    }
+
+    public Long getTradeAreaId() {
+        return tradeAreaId;
+    }
+
+    public void setTradeAreaId(Long tradeAreaId) {
+        this.tradeAreaId = tradeAreaId;
+    }
+
+    public String getTradeAreaName() {
+        return tradeAreaName;
+    }
+
+    public void setTradeAreaName(String tradeAreaName) {
+        this.tradeAreaName = tradeAreaName;
+    }
+
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getAddressIds() {
+        return addressIds;
+    }
+
+    public void setAddressIds(String addressIds) {
+        this.addressIds = addressIds;
+    }
+
+    public String getArea() {
+        return area;
+    }
+
+    public void setArea(String area) {
+        this.area = area;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getEnterpriseName() {
+        return enterpriseName;
+    }
+
+    public void setEnterpriseName(String enterpriseName) {
+        this.enterpriseName = enterpriseName;
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    public String getCreateName() {
+        return createName;
+    }
+
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public Integer getDeleteStatus() {
+        return deleteStatus;
+    }
+
+    public void setDeleteStatus(Integer deleteStatus) {
+        this.deleteStatus = deleteStatus;
+    }
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getShopName() {
+        return shopName;
+    }
+
+    public void setShopName(String shopName) {
+        this.shopName = shopName;
+    }
+
+    public String getShopNo() {
+        return shopNo;
+    }
+
+    public void setShopNo(String shopNo) {
+        this.shopNo = shopNo;
+    }
+
+    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 getShopSccd() {
+        return shopSccd;
+    }
+
+    public void setShopSccd(String shopSccd) {
+        this.shopSccd = shopSccd;
+    }
+
+    public String getBnsScope() {
+        return bnsScope;
+    }
+
+    public void setBnsScope(String bnsScope) {
+        this.bnsScope = bnsScope;
+    }
+
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    public String getOwnerIdtype() {
+        return ownerIdtype;
+    }
+
+    public void setOwnerIdtype(String ownerIdtype) {
+        this.ownerIdtype = ownerIdtype;
+    }
+
+    public String getOwnerTel() {
+        return ownerTel;
+    }
+
+    public void setOwnerTel(String ownerTel) {
+        this.ownerTel = ownerTel;
+    }
+
+    public String getShopAddr() {
+        return shopAddr;
+    }
+
+    public void setShopAddr(String shopAddr) {
+        this.shopAddr = shopAddr;
+    }
+
+    public String getShopType() {
+        return shopType;
+    }
+
+    public void setShopType(String shopType) {
+        this.shopType = shopType;
+    }
+
+    public String geteDStatus() {
+        return eDStatus;
+    }
+
+    public void seteDStatus(String eDStatus) {
+        this.eDStatus = eDStatus;
+    }
+
+    public String getExpiry() {
+        return expiry;
+    }
+
+    public void setExpiry(String expiry) {
+        this.expiry = expiry;
+    }
+
+    public String getPutrecNo() {
+        return putrecNo;
+    }
+
+    public void setPutrecNo(String putrecNo) {
+        this.putrecNo = putrecNo;
+    }
+
+    public String getAgentName() {
+        return agentName;
+    }
+
+    public void setAgentName(String agentName) {
+        this.agentName = agentName;
+    }
+
+    public String getAgentTel() {
+        return agentTel;
+    }
+
+    public void setAgentTel(String agentTel) {
+        this.agentTel = agentTel;
+    }
+
+    public String getAgentIdtype() {
+        return agentIdtype;
+    }
+
+    public void setAgentIdtype(String agentIdtype) {
+        this.agentIdtype = agentIdtype;
+    }
+
+    public String getAgentCiphertextIdno() {
+        return agentCiphertextIdno;
+    }
+
+    public void setAgentCiphertextIdno(String agentCiphertextIdno) {
+        this.agentCiphertextIdno = agentCiphertextIdno;
+    }
+
+    public String getLocalGovernmentNo() {
+        return localGovernmentNo;
+    }
+
+    public void setLocalGovernmentNo(String localGovernmentNo) {
+        this.localGovernmentNo = localGovernmentNo;
+    }
+
+    public String getFilingStatus() {
+        return filingStatus;
+    }
+
+    public void setFilingStatus(String filingStatus) {
+        this.filingStatus = filingStatus;
+    }
+
+    public String getBank() {
+        return bank;
+    }
+
+    public void setBank(String bank) {
+        this.bank = bank;
+    }
+
+    public String getBankAccount() {
+        return bankAccount;
+    }
+
+    public void setBankAccount(String bankAccount) {
+        this.bankAccount = bankAccount;
+    }
+
+    public ShopDto(String id, Long enterpriseId, Long tradeAreaId, String tradeAreaName, String address, String addressIds, String area, Integer status, String remark, String enterpriseName, Date createTime, String createBy, String createName, String updateBy, String updateName, Date updateTime, Integer deleteStatus, String platSeqNo, String shopName, String shopNo, String fieldCode, String fieldName, String customsCode, String shopSccd, String bnsScope, String ownerName, String ownerIdtype, String ownerTel, String shopAddr, String shopType, String eDStatus, String expiry, String putrecNo, String agentName, String agentTel, String agentIdtype, String agentCiphertextIdno, String localGovernmentNo, String filingStatus, String bank, String bankAccount) {
+        this.id = id;
+        this.enterpriseId = enterpriseId;
+        this.tradeAreaId = tradeAreaId;
+        this.tradeAreaName = tradeAreaName;
+        this.address = address;
+        this.addressIds = addressIds;
+        this.area = area;
+        this.status = status;
+        this.remark = remark;
+        this.enterpriseName = enterpriseName;
+        this.createTime = createTime;
+        this.createBy = createBy;
+        this.createName = createName;
+        this.updateBy = updateBy;
+        this.updateName = updateName;
+        this.updateTime = updateTime;
+        this.deleteStatus = deleteStatus;
+        this.platSeqNo = platSeqNo;
+        this.shopName = shopName;
+        this.shopNo = shopNo;
+        this.fieldCode = fieldCode;
+        this.fieldName = fieldName;
+        this.customsCode = customsCode;
+        this.shopSccd = shopSccd;
+        this.bnsScope = bnsScope;
+        this.ownerName = ownerName;
+        this.ownerIdtype = ownerIdtype;
+        this.ownerTel = ownerTel;
+        this.shopAddr = shopAddr;
+        this.shopType = shopType;
+        this.eDStatus = eDStatus;
+        this.expiry = expiry;
+        this.putrecNo = putrecNo;
+        this.agentName = agentName;
+        this.agentTel = agentTel;
+        this.agentIdtype = agentIdtype;
+        this.agentCiphertextIdno = agentCiphertextIdno;
+        this.localGovernmentNo = localGovernmentNo;
+        this.filingStatus = filingStatus;
+        this.bank = bank;
+        this.bankAccount = bankAccount;
+    }
+
+    public ShopDto() {
+    }
+}

+ 7 - 0
sp-core/sp-base/pom.xml

@@ -29,6 +29,13 @@
 		<!-- ================= 模块依赖 end ================= -->
 
 
+        <!-- rabbitmq 依赖 -->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+
+
         <!-- 阿里云短信服务 -->
         <dependency>
             <groupId>com.aliyun</groupId>

+ 24 - 0
sp-core/sp-base/src/main/java/com/pj/enummj/FinishStatus.java

@@ -0,0 +1,24 @@
+package com.pj.enummj;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 08 27 10 00
+ **/
+@Getter
+@AllArgsConstructor
+public enum FinishStatus {
+
+    FINISH_STATUS_ZERO(0,"待处理"),
+    FINISH_STATUS_ONE(1,"处理完成"),
+    FINISH_STATUS_TWO(2,"处理失败");
+
+    private Integer code;
+
+    private String msg;
+
+
+
+}

+ 4 - 5
sp-service/async-server/src/main/java/com/pj/rabbitmq/RabbitMQ.java → sp-core/sp-base/src/main/java/com/pj/rabbitmq/RabbitMQ.java

@@ -7,7 +7,6 @@ package com.pj.rabbitmq;
  **/
 public class RabbitMQ {
 
-    //todo: 注意: 站在航通考虑的,航通发数据给我们就是send , 我们发数据过去给航通就是accept
 
     public static final String ACC_KEY = "klfksd78974s1d4f";
 
@@ -15,22 +14,22 @@ public class RabbitMQ {
     /**
      *  发送方队列
      */
-    public static final String TEST_SEND_QUEUE = "testSend";
+    public static final String TEST_SEND_QUEUE = "testAccept";
 
     /**
      *  发送方路由键
      */
-    public static final String TEST_SEND_ROUTING_KEY = "testSendKey";
+    public static final String TEST_SEND_ROUTING_KEY = "testAcceptKey";
 
     /**
      *  接收方队列
      */
-    public static final String TEST_ACCEPT_QUEUE = "testAccept";
+    public static final String TEST_ACCEPT_QUEUE = "testSend";
 
     /**
      *  接收方路由键
      */
-    public static final String TEST_ACCEPT_ROUTING_KEY = "testAcceptKey";
+    public static final String TEST_ACCEPT_ROUTING_KEY = "testSendKey";
 
     /**
      *  发送方MQ地址

+ 0 - 0
sp-service/async-server/src/main/java/com/pj/rabbitmq/RabbitmqConfig.java → sp-core/sp-base/src/main/java/com/pj/rabbitmq/RabbitmqConfig.java


+ 1 - 5
sp-service/async-server/pom.xml

@@ -15,6 +15,7 @@
         <java.run.main.class>com.pj.AsyncServerApplication</java.run.main.class>
     </properties>
     <dependencies>
+
         <!-- 依赖base基础包 -->
         <dependency>
             <groupId>com.pj</groupId>
@@ -22,11 +23,6 @@
             <version>${project.parent.version}</version>
         </dependency>
 
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-amqp</artifactId>
-<!--            <version>2.2.14.RELEASE</version>-->
-        </dependency>
     </dependencies>
 
 

+ 92 - 0
sp-service/async-server/src/main/java/com/pj/ht_byte/HtByte.java

@@ -0,0 +1,92 @@
+package com.pj.ht_byte;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import lombok.AllArgsConstructor;
+import lombok.EqualsAndHashCode;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+/**
+ * Model: ht_byte -- 航通基础信息字节码表
+ * @author yzs 
+ */
+@Data
+@Accessors(chain = true)
+@TableName(HtByte.TABLE_NAME)
+@EqualsAndHashCode(callSuper = false)
+@AllArgsConstructor
+public class HtByte extends Model<HtByte> implements Serializable {
+	public HtByte(String messageId, String body, String queueName, Integer finishStatus, Date createTime) {
+		this.messageId = messageId;
+		this.body = body;
+		this.queueName = queueName;
+		this.finishStatus = finishStatus;
+		this.createTime = createTime;
+	}
+// ---------- 模块常量 ----------
+	/**
+	 * 序列化版本id 
+	 */
+	private static final long serialVersionUID = 1L;	
+	/**
+	 * 此模块对应的表名 
+	 */
+	public static final String TABLE_NAME = "ht_byte";	
+	/**
+	 * 此模块对应的权限码 
+	 */
+	public static final String PERMISSION_CODE = "ht-byte";
+	public static final String PERMISSION_CODE_ADD = "ht-byte-add";
+	public static final String PERMISSION_CODE_EDIT = "ht-byte-edit";
+	public static final String PERMISSION_CODE_DEL = "ht-byte-del";
+
+
+
+
+	// ---------- 表中字段 ----------
+	/**
+	 * 字节表主键 
+	 */
+	@TableId(type = IdType.AUTO)
+	private Integer id;	
+
+	/**
+	 * mq消息主键 
+	 */
+	private String messageId;	
+
+	/**
+	 * 字节数据主体 
+	 */
+	private String body;	
+
+	/**
+	 * mq队列名称 
+	 */
+	private String queueName;	
+
+	/**
+	 * 完成对象转换状态 
+	 */
+	private Integer finishStatus;	
+
+	/**
+	 * 创建时间 
+	 */
+	@DateTimeFormat(pattern = "yyyy-MM-dd")
+	private Date createTime;
+
+
+
+
+
+	
+
+
+}

+ 24 - 22
sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytesController.java → sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteController.java

@@ -1,76 +1,78 @@
-package com.pj.ht_bytes;
+package com.pj.ht_byte;
 
 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: ht_bytes -- ht数据备份
+ * Controller: ht_byte -- 航通基础信息字节码表
  * @author yzs 
  */
 @RestController
-@RequestMapping("/HtBytes/")
-public class HtBytesController {
+@RequestMapping("/HtByte/")
+public class HtByteController {
 
 	/** 底层 Service 对象 */
 	@Autowired
-	HtBytesService htBytesService;
+	HtByteService htByteService;
 
 	/** 增 */  
 	@RequestMapping("add")
-	@SaCheckPermission(HtBytes.PERMISSION_CODE_ADD)
-	public AjaxJson add(HtBytes h){
-		htBytesService.add(h);
-		h = htBytesService.getById(SP.publicMapper.getPrimarykey());
+	@SaCheckPermission(HtByte.PERMISSION_CODE_ADD)
+	public AjaxJson add(HtByte h){
+		htByteService.add(h);
+		h = htByteService.getById(SP.publicMapper.getPrimarykey());
 		return AjaxJson.getSuccessData(h);
 	}
 
 	/** 删 */  
 	@RequestMapping("delete")
-	@SaCheckPermission(HtBytes.PERMISSION_CODE_DEL)
-	public AjaxJson delete(Long id){
-		 htBytesService.delete(id);
+	@SaCheckPermission(HtByte.PERMISSION_CODE_DEL)
+	public AjaxJson delete(Integer id){
+		 htByteService.delete(Long.valueOf(id));
 		return AjaxJson.getSuccess();
 	}
 	
 	/** 删 - 根据id列表 */  
 	@RequestMapping("deleteByIds")
-	@SaCheckPermission(HtBytes.PERMISSION_CODE_DEL)
+	@SaCheckPermission(HtByte.PERMISSION_CODE_DEL)
 	public AjaxJson deleteByIds(){
 		List<Long> ids = SoMap.getRequestSoMap().getListByComma("ids", long.class); 
-		int line = SP.publicMapper.deleteByIds(HtBytes.TABLE_NAME, ids);
+		int line = SP.publicMapper.deleteByIds(HtByte.TABLE_NAME, ids);
 		return AjaxJson.getByLine(line);
 	}
 	
 	/** 改 */  
 	@RequestMapping("update")
-	@SaCheckPermission(HtBytes.PERMISSION_CODE_EDIT)
-	public AjaxJson update(HtBytes h){
-		htBytesService.update(h);
+	@SaCheckPermission(HtByte.PERMISSION_CODE_EDIT)
+	public AjaxJson update(HtByte h){
+		htByteService.update(h);
 		return AjaxJson.getSuccess();
 	}
 
 	/** 查 - 根据id */  
 	@RequestMapping("getById")
-		@SaCheckPermission(HtBytes.PERMISSION_CODE)
-	public AjaxJson getById(Long id){
-		HtBytes h = htBytesService.getById(id);
+		@SaCheckPermission(HtByte.PERMISSION_CODE)
+	public AjaxJson getById(Integer id){
+		HtByte h = htByteService.getById(id);
 		return AjaxJson.getSuccessData(h);
 	}
 
 	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
 	@RequestMapping("getList")
-		@SaCheckPermission(HtBytes.PERMISSION_CODE)
+		@SaCheckPermission(HtByte.PERMISSION_CODE)
 	public AjaxJson getList() { 
 		SoMap so = SoMap.getRequestSoMap();
-		List<HtBytes> list = htBytesService.getList(so.startPage());
+		List<HtByte> list = htByteService.getList(so.startPage());
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
 	

+ 4 - 4
sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytesMapper.java → sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteMapper.java

@@ -1,4 +1,4 @@
-package com.pj.ht_bytes;
+package com.pj.ht_byte;
 
 import java.util.List;
 
@@ -9,13 +9,13 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.springframework.stereotype.Repository;
 
 /**
- * Mapper: ht_bytes -- ht数据备份
+ * Mapper: ht_byte -- 航通基础信息字节码表
  * @author yzs 
  */
 
 @Mapper
 @Repository
-public interface HtBytesMapper extends BaseMapper <HtBytes> {
+public interface HtByteMapper extends BaseMapper <HtByte> {
 
 
 
@@ -24,7 +24,7 @@ public interface HtBytesMapper extends BaseMapper <HtBytes> {
 	 * @param so 参数集合 
 	 * @return 数据列表 
 	 */
-	List<HtBytes> getList(SoMap so);
+	List<HtByte> getList(SoMap so);
 
 
 }

+ 53 - 0
sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteMapper.xml

@@ -0,0 +1,53 @@
+<?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.ht_byte.HtByteMapper">
+
+
+
+
+	<!-- ================================== 查询相关 ================================== -->
+	<!-- select id, message_id, body, queue_name, finish_status, create_time from ht_byte  -->
+	
+	<!-- 通用映射:自动模式 -->
+	<resultMap id="model" autoMapping="true" type="com.pj.ht_byte.HtByte"></resultMap>
+	
+	<!-- 公共查询sql片段 -->
+	<sql id="select_sql">
+		select * 
+		from ht_byte 
+	</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("messageId") '> and message_id = #{messageId} </if>
+			<if test=' this.has("body") '> and body = #{body} </if>
+			<if test=' this.has("queueName") '> and queue_name = #{queueName} </if>
+			<if test=' this.has("finishStatus") '> and finish_status = #{finishStatus} </if>
+			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
+		</where>
+		order by
+		<choose>
+			<when test='sortType == 1'> id desc </when>
+			<when test='sortType == 2'> message_id desc </when>
+			<when test='sortType == 3'> body desc </when>
+			<when test='sortType == 4'> queue_name desc </when>
+			<when test='sortType == 5'> finish_status desc </when>
+			<when test='sortType == 6'> create_time desc </when>
+			<otherwise> id desc </otherwise>
+		</choose>
+	</select>
+	
+	
+	
+	
+	
+	
+	
+	
+	
+
+</mapper>

+ 10 - 9
sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytesService.java → sp-service/async-server/src/main/java/com/pj/ht_byte/HtByteService.java

@@ -1,4 +1,4 @@
-package com.pj.ht_bytes;
+package com.pj.ht_byte;
 
 import java.util.List;
 import com.pj.utils.so.SoMap;
@@ -7,21 +7,22 @@ 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: ht_bytes -- ht数据备份
+ * Service: ht_byte -- 航通基础信息字节码表
  * @author yzs 
  */
 @Service
 @Transactional(rollbackFor = Exception.class)
-public class HtBytesService extends ServiceImpl<HtBytesMapper, HtBytes> implements IService<HtBytes>{
+public class HtByteService extends ServiceImpl<HtByteMapper, HtByte> implements IService<HtByte>{
 
 	/** 底层 Mapper 对象 */
 	@Autowired
-	HtBytesMapper htBytesMapper;
+	HtByteMapper htByteMapper;
 
 	/** 增 */
-	void add(HtBytes h){
+	void add(HtByte h){
 		save(h);
 	}
 
@@ -31,19 +32,19 @@ public class HtBytesService extends ServiceImpl<HtBytesMapper, HtBytes> implemen
 	}
 
 	/** 改 */
-	void update(HtBytes h){
+	void update(HtByte h){
 		updateById(h);
 
 	}
 
 	/** 查 */
-	HtBytes getById(Long id){
+	HtByte getById(Integer id){
 		return super.getById(id);
 	}
 
 	/** 查集合 - 根据条件(参数为空时代表忽略指定条件) */  
-	List<HtBytes> getList(SoMap so) { 
-		return htBytesMapper.getList(so);	
+	List<HtByte> getList(SoMap so) { 
+		return htByteMapper.getList(so);	
 	}
 	
 

+ 0 - 95
sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytes.java

@@ -1,95 +0,0 @@
-package com.pj.ht_bytes;
-
-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: ht_bytes -- ht数据备份
- * @author yzs 
- */
-@Data
-@Accessors(chain = true)
-@TableName(HtBytes.TABLE_NAME)
-@EqualsAndHashCode(callSuper = false)
-public class HtBytes extends Model<HtBytes> implements Serializable {
-
-	// ---------- 模块常量 ----------
-	/**
-	 * 序列化版本id 
-	 */
-	private static final long serialVersionUID = 1L;	
-	/**
-	 * 此模块对应的表名 
-	 */
-	public static final String TABLE_NAME = "ht_bytes";	
-	/**
-	 * 此模块对应的权限码 
-	 */
-	public static final String PERMISSION_CODE = "ht-bytes";
-	public static final String PERMISSION_CODE_ADD = "ht-bytes-add";
-	public static final String PERMISSION_CODE_EDIT = "ht-bytes-edit";
-	public static final String PERMISSION_CODE_DEL = "ht-bytes-del";
-
-
-
-
-	// ---------- 表中字段 ----------
-	/**
-	 * 航通数据字节表ID 
-	 */
-	@TableId(type = IdType.AUTO)
-	private Long id;	
-
-	/**
-	 * 报文 ID,唯一标识,每个报文的 ID 都不一样 
-	 */
-	private String msgId;	
-
-	/**
-	 * 接入方ID 
-	 */
-	private String appId;	
-
-	/**
-	 * 报文类型 
-	 */
-	private String dataType;	
-
-	/**
-	 * 报文生成时间 
-	 */
-	private String msgTime;	
-
-	/**
-	 * 签名 
-	 */
-	private String sign;	
-
-	/**
-	 * 报文内容密文 
-	 */
-	private String data;	
-
-	/**
-	 * 队列名称 
-	 */
-	private String queueName;	
-
-	/**
-	 * 创建时间 
-	 */
-	private String createTime;	
-
-
-
-
-
-	
-
-
-}

+ 0 - 59
sp-service/async-server/src/main/java/com/pj/ht_bytes/HtBytesMapper.xml

@@ -1,59 +0,0 @@
-<?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.ht_bytes.HtBytesMapper">
-
-
-
-
-	<!-- ================================== 查询相关 ================================== -->
-	<!-- select id, msgId, appId, dataType, msgTime, sign, data, queue_name, create_time from ht_bytes  -->
-	
-	<!-- 通用映射:自动模式 -->
-	<resultMap id="model" autoMapping="true" type="com.pj.ht_bytes.HtBytes"></resultMap>
-	
-	<!-- 公共查询sql片段 -->
-	<sql id="select_sql">
-		select * 
-		from ht_bytes 
-	</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("msgId") '> and msgId = #{msgId} </if>
-			<if test=' this.has("appId") '> and appId = #{appId} </if>
-			<if test=' this.has("dataType") '> and dataType = #{dataType} </if>
-			<if test=' this.has("msgTime") '> and msgTime = #{msgTime} </if>
-			<if test=' this.has("sign") '> and sign = #{sign} </if>
-			<if test=' this.has("data") '> and data = #{data} </if>
-			<if test=' this.has("queueName") '> and queue_name = #{queueName} </if>
-			<if test=' this.has("createTime") '> and create_time = #{createTime} </if>
-		</where>
-		order by
-		<choose>
-			<when test='sortType == 1'> id desc </when>
-			<when test='sortType == 2'> msgId desc </when>
-			<when test='sortType == 3'> appId desc </when>
-			<when test='sortType == 4'> dataType desc </when>
-			<when test='sortType == 5'> msgTime desc </when>
-			<when test='sortType == 6'> sign desc </when>
-			<when test='sortType == 7'> data desc </when>
-			<when test='sortType == 8'> queue_name desc </when>
-			<when test='sortType == 9'> create_time desc </when>
-			<otherwise> id desc </otherwise>
-		</choose>
-	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
-
-</mapper>

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

@@ -1,19 +1,15 @@
 package com.pj.listen;
 
-import com.alibaba.fastjson2.JSONObject;
-import com.pj.bo.PersonBO;
-import com.pj.ht_bytes.HtBytes;
-import com.pj.ht_bytes.HtBytesMapper;
+import com.pj.enummj.FinishStatus;
+import com.pj.ht_byte.HtByte;
+import com.pj.ht_byte.HtByteMapper;
 import com.pj.rabbitmq.RabbitMQ;
-import com.pj.service.ObjectService;
-import com.pj.utils.ht.AESUtil;
 import org.springframework.amqp.core.Message;
 import org.springframework.amqp.rabbit.annotation.Queue;
 import org.springframework.amqp.rabbit.annotation.RabbitListener;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
-import java.text.SimpleDateFormat;
 import java.util.Date;
 
 /**
@@ -23,34 +19,24 @@ import java.util.Date;
 @Component
 public class BaseInfoListen {
 
-    @Autowired
-    private ObjectService objectService;
-
     /**
      * 保存航通传过来的字节
      */
     @Autowired
-    private HtBytesMapper htBytesMapper;
-
+    private HtByteMapper htByteMapper;
 
     /**
      * 接收: 信息同步
      * @param json
      */
-    @RabbitListener(queuesToDeclare = @Queue(RabbitMQ.TEST_SEND_QUEUE))
+    @RabbitListener(queuesToDeclare = @Queue(RabbitMQ.TEST_ACCEPT_QUEUE))
     public void accept(Message json){
-        System.out.println("\n发送:信息同步\n");
+        System.out.println("\n接收:信息同步\n");
         byte[] content = json.getBody();
         //保存到数据库
         String jsonString = new String(content);
-        //数据转换
-        HtBytes htBytes = JSONObject.parseObject(jsonString, HtBytes.class);
-        htBytes.setCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
-        htBytes.setQueueName(RabbitMQ.TEST_SEND_QUEUE);
-        //保存到数据库
-        htBytesMapper.insert(htBytes);
-        //匹配类型,方法调用
-        objectService.saveEntityByType(htBytes);
+        htByteMapper.insert(new HtByte(json.getMessageProperties().getMessageId(),jsonString,RabbitMQ.TEST_ACCEPT_QUEUE, FinishStatus.FINISH_STATUS_ZERO.getCode(),new Date()));
+        System.out.println("\n消息同步完成。\n");
 
     }
 

+ 66 - 67
sp-service/async-server/src/main/java/com/pj/service/ObjectService.java

@@ -1,67 +1,66 @@
-package com.pj.service;
-
-import com.alibaba.fastjson2.JSONObject;
-import com.pj.bo.PersonBO;
-import com.pj.ht_bytes.HtBytes;
-import com.pj.rabbitmq.RabbitMQ;
-import com.pj.utils.ht.AESUtil;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author Mechrevo
- * @Date 2023 08 25 15 48
- **/
-@Service
-public class ObjectService {
-
-
-    /**
-     * 报文类型
-     * 001=边民备案
-     * 002=商铺备案
-     * 003=边民互助组备案
-     * 004=边民合作社备案
-     * 005=车辆
-     * 006=进境申报单
-     * 007=进口申报单
-     * @param htBytes
-     */
-    public void saveEntityByType(HtBytes htBytes){
-        //数据解析
-        String decrypt = AESUtil.decryptCBC(htBytes.getData(), RabbitMQ.ACC_KEY);
-        //身份证是唯一的,有身份证就是修改,没有就是新增
-        // 根据类型匹配对象
-        switch (htBytes.getDataType()){
-            case "001":
-                //对象转换
-                PersonBO personBO = JSONObject.parseObject(decrypt, PersonBO.class);
-                break;
-            case "002":
-                //商铺备案
-
-                break;
-            case "003":
-                //边民互助组备案
-
-                break;
-            case "004":
-                //边民合作社备案
-
-                break;
-            case "005":
-                //车辆
-
-                break;
-            case "006":
-                //进境申报单
-
-                break;
-            case "007":
-                //进口申报单
-
-                break;
-        }
-
-    }
-
-}
+//package com.pj.service;
+//
+//import com.alibaba.fastjson2.JSONObject;
+//import com.pj.bo.PersonBO;
+//import com.pj.rabbitmq.RabbitMQ;
+//import com.pj.utils.ht.AESUtil;
+//import org.springframework.stereotype.Service;
+//
+///**
+// * @Author Mechrevo
+// * @Date 2023 08 25 15 48
+// **/
+//@Service
+//public class ObjectService {
+//
+//
+//    /**
+//     * 报文类型
+//     * 001=边民备案
+//     * 002=商铺备案
+//     * 003=边民互助组备案
+//     * 004=边民合作社备案
+//     * 005=车辆
+//     * 006=进境申报单
+//     * 007=进口申报单
+//     * @param htBytes
+//     */
+//    public void saveEntityByType(HtBytes htBytes){
+//        //数据解析
+//        String decrypt = AESUtil.decryptCBC(htBytes.getData(), RabbitMQ.ACC_KEY);
+//        //身份证是唯一的,有身份证就是修改,没有就是新增
+//        // 根据类型匹配对象
+//        switch (htBytes.getDataType()){
+//            case "001":
+//                //对象转换
+//                PersonBO personBO = JSONObject.parseObject(decrypt, PersonBO.class);
+//                break;
+//            case "002":
+//                //商铺备案
+//
+//                break;
+//            case "003":
+//                //边民互助组备案
+//
+//                break;
+//            case "004":
+//                //边民合作社备案
+//
+//                break;
+//            case "005":
+//                //车辆
+//
+//                break;
+//            case "006":
+//                //进境申报单
+//
+//                break;
+//            case "007":
+//                //进口申报单
+//
+//                break;
+//        }
+//
+//    }
+//
+//}

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

@@ -0,0 +1,144 @@
+package com.pj.task;
+
+import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.pj.api.client.level_one_server.LevelOneServerInterface;
+import com.pj.api.dto.CooperativeDto;
+import com.pj.api.dto.GroupDto;
+import com.pj.api.dto.PeopleDto;
+import com.pj.api.dto.ShopDto;
+import com.pj.dto.DataDto;
+import com.pj.enummj.FinishStatus;
+import com.pj.ht_byte.HtByte;
+import com.pj.ht_byte.HtByteMapper;
+import com.pj.rabbitmq.RabbitMQ;
+import com.pj.utils.ht.AESUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.Scheduled;
+
+import java.util.List;
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 08 27 09 57
+ **/
+@Configuration
+@EnableScheduling
+public class HtByteTask {
+
+    /**
+     * 航通字节mapper
+     */
+    @Autowired
+    private HtByteMapper htByteMapper;
+    /**
+     * 一级市场
+     */
+    @Autowired
+    private LevelOneServerInterface levelOneServerInterface;
+
+    /**
+     * 启动定时任务
+     *
+     *      * 报文类型
+     *      * 001=边民备案
+     *      * 002=商铺备案
+     *      * 003=边民互助组备案
+     *      * 004=边民合作社备案
+     *      * 005=车辆
+     *      * 006=进境申报单
+     *      * 007=进口申报单
+     */
+    @Scheduled(cron = "*/7 * * * * ?")  // 测试阶段,每7秒扫描一次
+    private void htByteTask(){
+        //扫描表内是否有待处理任务
+        List<HtByte> byteList = htByteMapper.selectList(new LambdaQueryWrapper<HtByte>().eq(HtByte::getFinishStatus, FinishStatus.FINISH_STATUS_ZERO.getCode()));
+        //判断是否有任务,没有则返回
+        if(byteList.size() == 0){
+            System.out.println("\n暂无待处理任务。\n");
+        }
+        //执行任务处理流程
+        byteList.forEach(item -> {
+            //对象转换
+            DataDto dataDto = JSONObject.parseObject(item.getBody(), DataDto.class);
+            //数据解析
+            String body = AESUtil.decryptCBC(dataDto.getData(), RabbitMQ.ACC_KEY);
+            //控制台输出
+            dataDto.setData(body);
+            System.out.println("开始处理数据: " + dataDto);
+            //数据处理完成状态
+            boolean flag = false;
+            // 根据类型匹配对象
+            switch (dataDto.getDataType()){
+                case "001":
+                    //对象转换
+                    PeopleDto peopleDto = JSONObject.parseObject(body, PeopleDto.class);
+                    //根据其内的身份证,有则新增,无则修改???
+                    flag = levelOneServerInterface.peopleDto(peopleDto);
+                    if(!flag){
+                        //将完成状态设置成 2 , 表示处理失败
+                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+                        //保存
+                        htByteMapper.updateById(item);
+                        //todo: 发送失败信息给管理员
+                    }
+                    break;
+                case "002":
+                    //商铺备案
+                    ShopDto shopDto = JSONObject.parseObject(body, ShopDto.class);
+                    //保存
+                    flag = levelOneServerInterface.shopDto(shopDto);
+                    if(!flag){
+                        //将完成状态设置成 2 , 表示处理失败
+                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+                        //保存
+                        htByteMapper.updateById(item);
+                        //todo: 发送失败信息给管理员
+                    }
+                    break;
+                case "003":
+                    //边民互助组备案
+                    GroupDto groupDto = JSONObject.parseObject(body, GroupDto.class);
+                    //保存
+                    flag = levelOneServerInterface.groupDto(groupDto);
+                    if(!flag){
+                        //将完成状态设置成 2 , 表示处理失败
+                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+                        //保存
+                        htByteMapper.updateById(item);
+                        //todo: 发送失败信息给管理员
+                    }
+                    break;
+                case "004":
+                    //边民合作社备案
+                    CooperativeDto cooperativeDto = JSONObject.parseObject(body, CooperativeDto.class);
+                    //保存
+                    flag = levelOneServerInterface.cooperativeDto(cooperativeDto);
+                    if(!flag){
+                        //将完成状态设置成 2 , 表示处理失败
+                        item.setFinishStatus(FinishStatus.FINISH_STATUS_TWO.getCode());
+                        //保存
+                        htByteMapper.updateById(item);
+                        //todo: 发送失败信息给管理员
+                    }
+                    break;
+                case "005":
+                    //车辆
+
+                    break;
+                case "006":
+                    //进境申报单
+
+                    break;
+                case "007":
+                    //进口申报单
+
+                    break;
+            }
+        });
+
+    }
+
+}

+ 3 - 2
sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeAppController.java

@@ -1,5 +1,6 @@
 package com.pj.tb_cooperative;
 
+import com.pj.api.dto.CooperativeDto;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -42,8 +43,8 @@ public class TbCooperativeAppController {
 
 	/** 查 - 根据合作社Id */
 	@RequestMapping("rpc/getCooperativeById")
-	public com.pj.api.dto.CooperativeDto getCooperativeById(@RequestParam("id")Long cooperativeId) {
-		com.pj.api.dto.CooperativeDto dto = tbCooperativeService.getCooperativeById(cooperativeId);
+	public CooperativeDto getCooperativeById(@RequestParam("id")Long cooperativeId) {
+		CooperativeDto dto = tbCooperativeService.getCooperativeById(cooperativeId);
 		return dto;
 	}
 

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

@@ -1,6 +1,7 @@
 package com.pj.tb_cooperative;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.pj.api.dto.CooperativeDto;
 import com.pj.project4sp.SP;
 import com.pj.utils.sg.AjaxJson;
 import com.pj.utils.so.SoMap;
@@ -81,4 +82,15 @@ public class TbCooperativeController {
 		int line = SP.publicMapper.updateColumnById(TbCooperative.TABLE_NAME, "delete_status", value, id);
 		return AjaxJson.getByLine(line);
 	}
+
+
+	/*------            正常业务👆👆    rpc远程调用👇👇                         -----------*/
+
+
+	/** 远程调用: 对合作社信息进行事务处理 */
+	@RequestMapping("rpc/cooperativeDto")
+	public boolean cooperativeDto(CooperativeDto cooperativeDto){
+		boolean b = tbCooperativeService.cooperativeDto(cooperativeDto);
+		return b;
+	}
 }

+ 2 - 2
sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeMapper.xml

@@ -1,13 +1,13 @@
 <?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_cooperative.tb_cooperative.TbCooperativeMapper">
+<mapper namespace="com.pj.tb_cooperative.TbCooperativeMapper">
 
 
 	<!-- ================================== 查询相关 ================================== -->
 	<!-- select id, name, legal_person, id_card, contact, business_license, bank_name, bank_account, duty_paragraph, address, judge_status, judge_content, judge_time, register_time, create_time, create_by, create_name, update_time, update_by, update_name, delete_status, is_lock, judge_by from tb_cooperative  -->
 	
 	<!-- 通用映射:自动模式 -->
-	<resultMap id="model" autoMapping="true" type="com.pj.tb_cooperative.tb_cooperative.TbCooperative"></resultMap>
+	<resultMap id="model" autoMapping="true" type="com.pj.tb_cooperative.TbCooperative"></resultMap>
 	
 	<!-- 公共查询sql片段 -->
 	<sql id="select_sql">

+ 8 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeService.java

@@ -60,9 +60,16 @@ public class TbCooperativeService extends ServiceImpl<TbCooperativeMapper,TbCoop
 
 	public CooperativeDto getCooperativeById(Long id) {
 		TbCooperative cooperative = tbCooperativeMapper.selectById(id);
-		com.pj.api.dto.CooperativeDto dto = new CooperativeDto();
+		CooperativeDto dto = new CooperativeDto();
 		BeanUtils.copyProperties(cooperative, dto);
 		return dto;
 	}
 
+	/** 远程调用: 对合作社信息进行事务处理 */
+	public boolean cooperativeDto(CooperativeDto cooperativeDto){
+		TbCooperative tbCooperative = new TbCooperative();
+		BeanUtils.copyProperties(cooperativeDto,tbCooperative);
+		return this.save(tbCooperative);
+	}
+
 }

+ 1 - 2
sp-service/level-one-server/src/main/java/com/pj/tb_cooperative/TbCooperativeUtil.java

@@ -1,6 +1,5 @@
 package com.pj.tb_cooperative;
 
-import com.pj.tb_cooperative.tb_cooperative.TbCooperativeMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -14,7 +13,7 @@ public class TbCooperativeUtil {
 
 	
 	/** 底层 Mapper 对象 */
-	public static com.pj.tb_cooperative.tb_cooperative.TbCooperativeMapper tbCooperativeMapper;
+	public static TbCooperativeMapper tbCooperativeMapper;
 	@Autowired
 	private void setTbCooperativeMapper(TbCooperativeMapper tbCooperativeMapper) {
 		TbCooperativeUtil.tbCooperativeMapper = tbCooperativeMapper;

+ 0 - 3
sp-service/level-one-server/src/main/java/com/pj/tb_goods_cart/TbGoodsCartService.java

@@ -9,14 +9,11 @@ import com.pj.current.dto.APPLoginUserInfo;
 import com.pj.current.satoken.StpAPPUserUtil;
 import com.pj.enummj.DeleteStatus;
 import com.pj.enummj.IsLock;
-import com.pj.enummj.People;
 import com.pj.enummj.UserType;
 import com.pj.tb_goods_cart.dto.GoodsCartInfoDto;
 import com.pj.tb_goods_cart.vo.GoodsCartVo;
 import com.pj.tb_goods_transit.TbGoodsTransit;
 import com.pj.tb_goods_transit.TbGoodsTransitMapper;
-import com.pj.tb_group.TbGroup;
-import com.pj.tb_group.TbGroupMapper;
 import com.pj.tb_people.TbPeople;
 import com.pj.tb_people.TbPeopleMapper;
 import com.pj.utils.so.SoMap;

+ 7 - 5
sp-service/level-one-server/src/main/java/com/pj/tb_group/MethodGroupService.java

@@ -56,7 +56,7 @@ public class MethodGroupService {
                 tbGroup.setDetailAddress(row.getCell(3).getStringCellValue());
 
             if(row.getCell(4) != null && !row.getCell(4).toString().trim().equals(""))
-                tbGroup.setName(row.getCell(4).getStringCellValue());
+                tbGroup.setOrgName(row.getCell(4).getStringCellValue());
 
 
             HSSFCell cell6 = row.getCell(5);
@@ -83,14 +83,16 @@ public class MethodGroupService {
                 tbGroup.setCreateTime(cell4.getDateCellValue());
             }
 
-            if(row.getCell(11) != null && !row.getCell(11).toString().trim().equals(""))
-                tbGroup.setCreateBy(row.getCell(11).getStringCellValue());
+            HSSFCell cell = row.getCell(11);
+            if (cell != null && (cell.getCellType() == CellType.NUMERIC || cell.getCellType() == CellType.FORMULA))
+                tbGroup.setCreateBy((long) row.getCell(11).getNumericCellValue());
 
             if(row.getCell(12) != null && !row.getCell(12).toString().trim().equals(""))
                 tbGroup.setCreateName(row.getCell(12).getStringCellValue());
 
-            if(row.getCell(13) != null && !row.getCell(13).toString().trim().equals(""))
-                tbGroup.setUpdateBy(row.getCell(13).getStringCellValue());
+            HSSFCell cel3 = row.getCell(13);
+            if (cel3 != null && (cel3.getCellType() == CellType.NUMERIC || cel3.getCellType() == CellType.FORMULA))
+                tbGroup.setUpdateBy(Long.valueOf(row.getCell(13).getStringCellValue()));
 
             if(row.getCell(14) != null && !row.getCell(14).toString().trim().equals(""))
                 tbGroup.setUpdateName(row.getCell(14).getStringCellValue());

+ 85 - 31
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroup.java

@@ -1,21 +1,20 @@
 package com.pj.tb_group;
 
-import java.io.Serializable;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 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;
-
 import lombok.Data;
+import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
 
 /**
  * Model: tb_group -- 互助组
- * @author qzy 
+ * @author yzs 
  */
 @Data
 @Accessors(chain = true)
@@ -48,27 +47,15 @@ public class TbGroup extends Model<TbGroup> implements Serializable {
 	 *  
 	 */
 	@TableId(type = IdType.AUTO)
-	@JsonSerialize(using = ToStringSerializer.class)
 	private Long id;
 
-
-	/**
-	 * 互市区id
-	 */
-	private Long tradeAreaId;
-	/**
-	 * 互市区名称
-	 */
-	private String tradeAreaName;
-
-
 	/**
 	 *  
 	 */
 	private String addressIds;	
 
 	/**
-	 *  
+	 * 所属边境市(县、区)乡镇村屯 
 	 */
 	private String address;	
 
@@ -78,9 +65,9 @@ public class TbGroup extends Model<TbGroup> implements Serializable {
 	private String detailAddress;	
 
 	/**
-	 * 名称 
+	 * 互助组名称 
 	 */
-	private String name;	
+	private String orgName;	
 
 	/**
 	 * 组长ID 
@@ -110,13 +97,13 @@ public class TbGroup extends Model<TbGroup> implements Serializable {
 	/**
 	 * 创建时间 
 	 */
-	@JsonFormat(pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date createTime;
 
 	/**
 	 * 创建人编号 
 	 */
-	private String createBy;	
+	private Long createBy;
 
 	/**
 	 * 创建人名称 
@@ -126,13 +113,13 @@ public class TbGroup extends Model<TbGroup> implements Serializable {
 	/**
 	 * 更新时间 
 	 */
-	@JsonFormat(pattern = "yyyy-MM-dd")
+	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
 	private Date updateTime;
 
 	/**
 	 * 更新人编号 
 	 */
-	private String updateBy;	
+	private Long updateBy;
 
 	/**
 	 * 更新人名称 
@@ -142,13 +129,80 @@ public class TbGroup extends Model<TbGroup> implements Serializable {
 	/**
 	 * 删除状态(0=禁用,1=启用) 
 	 */
-	private Integer deleteStatus;
+	private Integer deleteStatus;	
 
 	/**
-	 * 是否锁
+	 * 是否锁
 	 */
 	private Integer isLock;
 
+	/**
+	 * 互市区id 
+	 */
+	private Long tradeAreaId;	
+
+	/**
+	 * 互市区名称 
+	 */
+	private String tradeAreaName;	
+
+	/**
+	 * 地方平台的内部业务编号,每次申请都是新编号 
+	 */
+	private String platSeqNo;	
+
+	/**
+	 * 关区代码 
+	 */
+	private String customsCode;	
+
+	/**
+	 * 登记号 
+	 */
+	private String shopsSccd;	
+
+	/**
+	 * 启停用状态:1-启用、2-停用、3-注销 
+	 */
+	private String eDStatus;	
+
+	/**
+	 * 有效效截止时间 yyyy-MM-dd 
+	 */
+	private String expiry;	
+
+	/**
+	 * 备案编号,如果为新增备案,传空值;如果为变更备案,必须传值; 
+	 */
+	private String putrecNo;	
+
+	/**
+	 *  地方政府编号 
+	 */
+	private String localGovernmentNo;	
+
+	/**
+	 * 备案状态:默认 0、待申报,1、已申报,2、备案通过,3、备案失败 
+	 */
+	private String filingStatus;	
+
+	/**
+	 * 场站编码 
+	 */
+	private String fieldCode;	
+
+	/**
+	 * 边民信息表体信息,json 数组List, 
+	 */
+	private String borderList;
+
+	/**
+	 * 互助组申报边民代表表体信息,json 数组 List 
+	 */
+	private String dclBorderList;
+
+
+
 
 
 	

+ 39 - 6
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupMapper.xml

@@ -6,7 +6,7 @@
 
 
 	<!-- ================================== 查询相关 ================================== -->
-	<!-- select id, address_ids, address, detail_address, name, leader_id, leader_name, leader_phone, code, left_price, create_time, create_by, create_name, update_time, update_by, update_name, delete_status from tb_group  -->
+	<!-- select id, address_ids, address, detail_address, org_name, leader_id, leader_name, leader_phone, code, left_price, create_time, create_by, create_name, update_time, update_by, update_name, delete_status, is_lock, trade_area_id, trade_area_name, plat_seq_no, customs_code, shops_sccd, e_d_status, expiry, putrec_no, local_government_no, filing_status, field_code, border_list, dcl_border_list from tb_group  -->
 	
 	<!-- 通用映射:自动模式 -->
 	<resultMap id="model" autoMapping="true" type="com.pj.tb_group.TbGroup"></resultMap>
@@ -26,8 +26,7 @@
 			<if test=' this.has("addressIds") '> and address_ids = #{addressIds} </if>
 			<if test=' this.has("address") '> and address = #{address} </if>
 			<if test=' this.has("detailAddress") '> and detail_address = #{detailAddress} </if>
-			<if test=' this.has("tradeAreaId") '> and trade_area_id = #{tradeAreaId} </if>
-			<if test=' this.has("name") '> and name = #{name} </if>
+			<if test=' this.has("orgName") '> and org_name = #{orgName} </if>
 			<if test=' this.has("leaderId") '> and leader_id = #{leaderId} </if>
 			<if test=' this.has("leaderName") '> and leader_name = #{leaderName} </if>
 			<if test=' this.has("leaderPhone") '> and leader_phone = #{leaderPhone} </if>
@@ -40,6 +39,20 @@
 			<if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
 			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
 			<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
+			<if test=' this.has("isLock") '> and is_lock = #{isLock} </if>
+			<if test=' this.has("tradeAreaId") '> and trade_area_id = #{tradeAreaId} </if>
+			<if test=' this.has("tradeAreaName") '> and trade_area_name = #{tradeAreaName} </if>
+			<if test=' this.has("platSeqNo") '> and plat_seq_no = #{platSeqNo} </if>
+			<if test=' this.has("customsCode") '> and customs_code = #{customsCode} </if>
+			<if test=' this.has("shopsSccd") '> and shops_sccd = #{shopsSccd} </if>
+			<if test=' this.has("eDStatus") '> and e_d_status = #{eDStatus} </if>
+			<if test=' this.has("expiry") '> and expiry = #{expiry} </if>
+			<if test=' this.has("putrecNo") '> and putrec_no = #{putrecNo} </if>
+			<if test=' this.has("localGovernmentNo") '> and local_government_no = #{localGovernmentNo} </if>
+			<if test=' this.has("filingStatus") '> and filing_status = #{filingStatus} </if>
+			<if test=' this.has("fieldCode") '> and field_code = #{fieldCode} </if>
+			<if test=' this.has("borderList") '> and border_list = #{borderList} </if>
+			<if test=' this.has("dclBorderList") '> and dcl_border_list = #{dclBorderList} </if>
 		</where>
 		order by
 		<choose>
@@ -47,7 +60,7 @@
 			<when test='sortType == 2'> address_ids desc </when>
 			<when test='sortType == 3'> address desc </when>
 			<when test='sortType == 4'> detail_address desc </when>
-			<when test='sortType == 5'> name desc </when>
+			<when test='sortType == 5'> org_name desc </when>
 			<when test='sortType == 6'> leader_id desc </when>
 			<when test='sortType == 7'> leader_name desc </when>
 			<when test='sortType == 8'> leader_phone desc </when>
@@ -60,11 +73,31 @@
 			<when test='sortType == 15'> update_by desc </when>
 			<when test='sortType == 16'> update_name desc </when>
 			<when test='sortType == 17'> delete_status desc </when>
+			<when test='sortType == 18'> is_lock desc </when>
+			<when test='sortType == 19'> trade_area_id desc </when>
+			<when test='sortType == 20'> trade_area_name desc </when>
+			<when test='sortType == 21'> plat_seq_no desc </when>
+			<when test='sortType == 22'> customs_code desc </when>
+			<when test='sortType == 23'> shops_sccd desc </when>
+			<when test='sortType == 24'> e_d_status desc </when>
+			<when test='sortType == 25'> expiry desc </when>
+			<when test='sortType == 26'> putrec_no desc </when>
+			<when test='sortType == 27'> local_government_no desc </when>
+			<when test='sortType == 28'> filing_status desc </when>
+			<when test='sortType == 29'> field_code desc </when>
+			<when test='sortType == 30'> border_list desc </when>
+			<when test='sortType == 31'> dcl_border_list desc </when>
 			<otherwise> id desc </otherwise>
 		</choose>
 	</select>
 	
-
-
+	
+	
+	
+	
+	
+	
+	
+	
 
 </mapper>

+ 7 - 7
sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupService.java

@@ -59,7 +59,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 	void add(TbGroup t) {
 		t.setCreateTime(new Date())
 				.setCreateName(StpUserUtil.getPCLoginInfo().getLoginName())
-				.setCreateBy(StpUserUtil.getPCLoginInfo().getLoginId())
+				.setCreateBy(Long.valueOf(StpUserUtil.getPCLoginInfo().getLoginId()))
 				.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode())
 				.setIsLock(IsLock.IS_LOCK_ON.getCode());
 		save(t);
@@ -78,7 +78,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 	void update(TbGroup t) {
 		t.setUpdateTime(new Date())
 				.setUpdateName(StpUserUtil.getPCLoginInfo().getLoginName())
-				.setUpdateBy(StpUserUtil.getPCLoginInfo().getLoginId());
+				.setUpdateBy(Long.valueOf(StpUserUtil.getPCLoginInfo().getLoginId()));
 		updateById(t);
 
 	}
@@ -125,7 +125,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 		tbGroup.setLeaderName(tbPeople.getBorderName());
 		tbGroup.setLeaderPhone(tbPeople.getBorderTel());
 		// 写入更新者id
-		tbGroup.setUpdateBy(String.valueOf(loginId));
+		tbGroup.setUpdateBy(loginId);
 		// 更新互助组
 		int line = tbGroupMapper.updateById(tbGroup);
 		return line;
@@ -154,7 +154,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 		for (Long peopleId : list) {
 			TbPeople tbPeople = tbPeopleMapper.selectById(peopleId);
 			tbPeople.setGroupId(tbGroup.getId());
-			tbPeople.setGroupName(tbGroup.getName());
+			tbPeople.setGroupName(tbGroup.getOrgName());
 			// 写入更新者id
 //			tbPeople.setUpdateBy(String.valueOf(loginId));
 			int i = tbPeopleMapper.updateById(tbPeople);
@@ -212,7 +212,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 		}
 		BeanUtils.copyProperties(tbGroupDto, tbGroup);
 		// 写入更新者id
-		tbGroup.setUpdateBy(String.valueOf(loginId));
+		tbGroup.setUpdateBy(loginId);
 		// 更新互助组信息
 		int line = tbGroupMapper.updateById(tbGroup);
 		return line;
@@ -286,7 +286,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 		}
 		filepath = filepath + "\\互助组数据表_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx";
 		//根据需求查询数据
-		List<TbGroup> selectedList = tbGroupMapper.selectList(new LambdaQueryWrapper<TbGroup>().eq(StringUtils.isNoneBlank(keyword), TbGroup::getName, keyword));
+		List<TbGroup> selectedList = tbGroupMapper.selectList(new LambdaQueryWrapper<TbGroup>().eq(StringUtils.isNoneBlank(keyword), TbGroup::getOrgName, keyword));
 		if (selectedList.size() == 0) return "没有可导出的数据。";
 		//建立excel对象封装数据
 		HSSFWorkbook workbook = new HSSFWorkbook();
@@ -322,7 +322,7 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
 			sheetRow.createCell(1).setCellValue((selectedList.get(i).getAddressIds() + "").equals("null") ? "" : selectedList.get(i).getAddressIds() + "");
 			sheetRow.createCell(2).setCellValue((selectedList.get(i).getAddress() + "").equals("null") ? "" : selectedList.get(i).getAddress() + "");
 			sheetRow.createCell(3).setCellValue((selectedList.get(i).getDetailAddress() + "").equals("null") ? "" : selectedList.get(i).getDetailAddress() + "");
-			sheetRow.createCell(4).setCellValue((selectedList.get(i).getName() + "").equals("null") ? "" : selectedList.get(i).getName() + "");
+			sheetRow.createCell(4).setCellValue((selectedList.get(i).getOrgName() + "").equals("null") ? "" : selectedList.get(i).getOrgName() + "");
 			sheetRow.createCell(5).setCellValue((selectedList.get(i).getLeaderId() + "").equals("null") ? "" : selectedList.get(i).getLeaderId() + "");
 			sheetRow.createCell(6).setCellValue((selectedList.get(i).getLeaderName() + "").equals("null") ? "" : selectedList.get(i).getLeaderName() + "");
 			sheetRow.createCell(7).setCellValue((selectedList.get(i).getLeaderPhone() + "").equals("null") ? "" : selectedList.get(i).getLeaderPhone() + "");

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

@@ -2,19 +2,15 @@ package com.pj.tb_order;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.pj.api.dto.MessageDto;
-import com.pj.api.dto.PeopleDto;
 import com.pj.common.core.exception.ServiceException;
 import com.pj.enummj.DeleteStatus;
 import com.pj.enummj.IsLock;
-import com.pj.enummj.JudgeStatus;
 import com.pj.tb_enterprise.TbEnterprise;
 import com.pj.tb_enterprise.TbEnterpriseMapper;
 import com.pj.tb_goods_transit.TbGoodsTransit;
 import com.pj.tb_goods_transit.TbGoodsTransitMapper;
-import com.pj.tb_group.TbGroup;
 import com.pj.tb_group.TbGroupMapper;
 import com.pj.tb_order.vo.OrderVo;
-import com.pj.tb_order_people_confirm.TbOrderPeopleConfirm;
 import com.pj.tb_order_people_confirm.TbOrderPeopleConfirmMapper;
 import com.pj.tb_people.TbPeople;
 import com.pj.tb_people.TbPeopleMapper;
@@ -23,7 +19,6 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Date;
 import java.util.List;
@@ -137,7 +132,7 @@ public class MethodOrderService {
         //订单创建时间
         orderVo.setOrderCreateTime(tbOrder.getCreateTime());
         //购买的互市组名称
-        orderVo.setGroupName(tbGroupMapper.selectById(tbOrder.getGroupId()).getName());
+        orderVo.setGroupName(tbGroupMapper.selectById(tbOrder.getGroupId()).getOrgName());
         //商户确认时间
         orderVo.setEnterpriseConfirmTime(tbOrder.getCreateTime());
         //todo: orderVo进境时间

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

@@ -374,6 +374,33 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 		return result;
 	}
 
+	/**
+	 * 接收订单推送消息,
+	 * 边民进行交易确认,
+	 * 支付申请,刷脸认
+	 * 证,系统发起进行交
+	 * 易
+	 */
+	public void receiveOrderMessageFromHT(){
+		//todo: 8月27日 接收航通订单推送消息
+		//1. 获取订单,并将订单保存到订单表
+
+		//2 根据订单内容获取边民集合,创建订单监听表,将该订单内需要完成的边民数逐条保存到监听表内
+
+		//3. 发起支付申请 , 刷脸认证
+
+		//4. 第3步完成且通过后,调用银行的sdk,验证边民的支付信息,由银行将钱转入第三方监管账户,并给出回执
+
+		//5. 拿到银行回执,判断其状态,修改监听表内该订单的完成情况
+
+		//6. 如果监听表内全部边民完成验证,则更新订单表该订单的边民验证完成情况
+
+		//7. todo: 如果订单表的边民验证状态为已完成,将信息同步至航通
+
+	}
+
+
+
 
 	/** 远程调用  查订单 */
 	OrderDto getOrderDtoById(Long id){

+ 36 - 5
sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleService.java

@@ -13,6 +13,7 @@ import com.pj.common.core.exception.ServiceException;
 import com.pj.current.dto.PCLoginUserInfo;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.enummj.*;
+import com.pj.rabbitmq.RabbitMQ;
 import com.pj.tb_group.TbGroup;
 import com.pj.tb_group.TbGroupMapper;
 import com.pj.tb_order.TbOrder;
@@ -28,6 +29,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.springframework.amqp.core.AmqpTemplate;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -68,6 +70,12 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 	@Autowired
 	TbGroupMapper tbGroupMapper;
 
+	/**
+	 * mq
+	 */
+	@Autowired
+	private AmqpTemplate amqpTemplate;
+
 	/** 增 */
 	void add(TbPeople t){
 		t.setCreateTime(new Date())
@@ -276,7 +284,7 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		tbPeopleMapper.updateApplyStatus(approve,peopleId);
 		// 把互助组信息写入申请的边民表
 		tbPeople.setGroupId(tbGroup.getId());
-		tbPeople.setGroupName(tbGroup.getName());
+		tbPeople.setGroupName(tbGroup.getOrgName());
 		int line = tbPeopleMapper.updateById(tbPeople);
 		return line;
 	}
@@ -315,7 +323,6 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 				int updateById = tbOrderMapper.updateById(tbOrder);
 				if(updateById != 1)throw new RuntimeException("执行边民确认异常!");
 				//todo:发送冻结请求 -> 接收冻结请求,边民账户货款进行冻结,并给出回执
-
 				return true;
 			}
 		}
@@ -344,7 +351,23 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		return update == 1;
 	}
 
+	/**
+	 * 边民进行互助委托申报,委
+	 * 托边民组长做集中进口申
+	 * 报,进口申报确认;
+	 */
+	public void entrustDeclarationFromHT(){
+		//todo: 8月27日 获取航通传输过来的边民委托申报(申报材料),我方app只负责给个确认委托申报的按钮给边民进行点击
 
+		//1. 创建 [委托申报表] 和 [边民委托申报监听表] ,将航通传输过来的每个边民的申报信息逐条保存到 [边民委托申报监听表] ,监听表初始状态为[未委托]
+
+		//2. 每个边民进入app点击确认委托申报后,将每个边民的 [委托申报监听] 状态改成[已完成委托]
+
+		//3. 实时监听该 [委托申报表] 的需要完成的边民确认订数,如果该 [委托申报表] 需要完成的[边民确认委托]书足够,则修改委托申报表的完成状态
+
+		//4. 如果边民委托申报全部完成,则将进口确认申报完成状态发送至航通
+
+	}
 
 
 
@@ -504,12 +527,20 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		return "数据导出完成!共导出 " + count + " 条数据。";
 	}
 
-	/** 远程调用方法 注册身份为普通边民时调用*/
+	/** 远程调用方法 边民信息事务处理 */
 	public boolean peopleDto(PeopleDto peopleDto){
+		//创建对象
 		TbPeople tbPeople = new TbPeople();
+		//数据拷贝
 		BeanUtils.copyProperties(peopleDto,tbPeople);
-		boolean save = this.save(tbPeople);
-		return save;
+		//todo: 判断其身份证? 有责新增,无则修改
+		if(tbPeople.getIdCardNo() != null){
+			boolean save = this.save(tbPeople);
+			return save;
+		}else{
+			int update = tbPeopleMapper.update(tbPeople, new LambdaQueryWrapper<TbPeople>().eq(TbPeople::getBorderTel, tbPeople.getBorderTel()));
+			return update == 1;
+		}
 	}
 
 	/** 远程调用查 */

+ 8 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopController.java

@@ -2,6 +2,8 @@ package com.pj.tb_shop;
 
 import java.io.IOException;
 import java.util.List;
+
+import com.pj.api.dto.ShopDto;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -126,7 +128,13 @@ public class TbShopController {
 	}
 
 
+	/*------            正常业务👆👆    rpc远程调用👇👇                         -----------*/
 
+	@RequestMapping("rpc/shopDto")
+	public boolean shopDto(ShopDto shopDto){
+		boolean b = tbShopService.shopDto(shopDto);
+		return b;
+	}
 
 
 }

+ 10 - 0
sp-service/level-one-server/src/main/java/com/pj/tb_shop/TbShopService.java

@@ -7,11 +7,13 @@ import java.time.format.DateTimeFormatter;
 import java.util.List;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.pj.api.dto.ShopDto;
 import com.pj.utils.so.SoMap;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFRow;
 import org.apache.poi.hssf.usermodel.HSSFSheet;
 import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.IService;
@@ -172,4 +174,12 @@ public class TbShopService extends ServiceImpl<TbShopMapper, TbShop> implements
 		return "数据导出完成!共导出 " + count + " 条数据。";
 	}
 
+	/** 远程调用方法 */
+	public boolean shopDto(ShopDto shopDto){
+		TbShop tbShop = new TbShop();
+		BeanUtils.copyProperties(shopDto,tbShop);
+		int insert = tbShopMapper.insert(tbShop);
+		return insert == 1;
+	}
+
 }

+ 20 - 0
sp-service/transport-server/src/main/java/com/pj/project/tb_vehicle/TbVehicleService.java

@@ -150,7 +150,27 @@ public class TbVehicleService extends ServiceImpl<TbVehicleMapper, TbVehicle> im
 		return insert == 1;
 	}
 
+	/**
+	 * 车辆出一级市
+	 * 场,一级市场
+	 * 交易完成
+	 */
+	public void vehicleMessageFromHT(){
+		//todo: 8月27日 航通将车辆出一级市场信息发送过来时,一级市场订单已完成
+		//1. 一级市场交易完成;边民需要付款给到外籍商户
+
+		//1.1 创建[边民支付信息表],明确需要进行支付的边民数量,将每个主要支付的边民逐条保存到[便民支付信息表]内 ,边民在app内发起支付
+
+		//2. 调用银行的sdk,银行将边民存放于第三方账户的钱划扣给外籍收购商户,并获取银行的返回结果
 
+		//3. 获取银行返回的回执信息,修改[边民支付信息表]的支付状态(通常不存在支付失败的情况)
+
+		//4. 判断边民的支付完成数量,更新我方订单状态
+
+		//5. 如果该订单支付状态为[已完成],将划扣等信息同步至航通或将每个边民划扣信息逐条同步至航通???
+
+		//6. todo: 调用系统message和短信,通知边民上架货物至二级市场???
+	}