2 次代码提交 7f9d318ee3 ... d15ef024b6

作者 SHA1 备注 提交日期
  Mechrevo d15ef024b6 Merge remote-tracking branch 'origin/feature/asyncOrder' into feature/asyncOrder 1 年之前
  Mechrevo fbaf6dc9b4 9.02 ...... 1 年之前
共有 24 个文件被更改,包括 760 次插入497 次删除
  1. 1 1
      sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterface.java
  2. 1 1
      sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterfaceFallback.java
  3. 3 3
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java
  4. 3 3
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterfaceFallback.java
  5. 18 46
      sp-core/sp-api/src/main/java/com/pj/api/dto/GoodsDto.java
  6. 94 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/HtGoodsDto.java
  7. 190 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/HtPeopleDto.java
  8. 85 77
      sp-core/sp-api/src/main/java/com/pj/api/dto/PeopleDto.java
  9. 14 1
      sp-service/async-server/src/main/java/com/pj/feign/AmqpTemplateFeign.java
  10. 36 35
      sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java
  11. 3 3
      sp-service/level-one-server/src/main/java/com/pj/tb_goods/MethodGoodsService.java
  12. 3 3
      sp-service/level-one-server/src/main/java/com/pj/tb_goods/TbGoods.java
  13. 3 2
      sp-service/level-one-server/src/main/java/com/pj/tb_goods/TbGoodsController.java
  14. 10 7
      sp-service/level-one-server/src/main/java/com/pj/tb_goods/TbGoodsService.java
  15. 1 1
      sp-service/level-one-server/src/main/java/com/pj/tb_goods_transit/MethodGoodsTransitService.java
  16. 2 2
      sp-service/level-one-server/src/main/java/com/pj/tb_goods_transit/TbGoodsTransitService.java
  17. 230 248
      sp-service/level-one-server/src/main/java/com/pj/tb_group/TbGroupService.java
  18. 2 2
      sp-service/level-one-server/src/main/java/com/pj/tb_order/TbOrderService.java
  19. 4 4
      sp-service/level-one-server/src/main/java/com/pj/tb_people/MethodPeopleService.java
  20. 4 4
      sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeople.java
  21. 2 1
      sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleController.java
  22. 14 9
      sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeopleService.java
  23. 2 5
      sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java
  24. 35 39
      sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserService.java

+ 1 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterface.java

@@ -78,7 +78,7 @@ public interface AdminInterface {
      * 同步航通边民信息时,自动给边民注册app账号
      */
     @RequestMapping("/AppUser/rpc/generatePeopleAccount")
-    public boolean generatePeopleAccount(@RequestBody PeopleDto peopleDto) throws Exception;
+    public boolean generatePeopleAccount(@RequestBody HtPeopleDto peopleDto) throws Exception;
 
     /**
      * 同步航通边民信息时,自动给外籍商户注册app账号

+ 1 - 1
sp-core/sp-api/src/main/java/com/pj/api/client/admin/AdminInterfaceFallback.java

@@ -76,7 +76,7 @@ public class AdminInterfaceFallback implements FallbackFactory<AdminInterface> {
             }
 
             @Override
-            public boolean generatePeopleAccount(PeopleDto appUser) throws Exception {
+            public boolean generatePeopleAccount(HtPeopleDto appUser) throws Exception {
                 log.error("边民注册app账户失败。对象:{}",appUser);
                 return false;
             }

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

@@ -59,7 +59,7 @@ public interface LevelOneServerInterface {
     public List<PeopleDto> getPeopleList(@RequestParam("groupId")Long groupId);
 
     /** 查 - 根据id */
-    @RequestMapping("/TbGoods/rpc/getBygoodsId")
+    @RequestMapping("/TbGoods/rpc/getBygoodtosId")
     public GoodsDto getByGoodsId(@RequestParam("goodsId") Long goodsId);
 
     /** 根据ID获取边民信息 */
@@ -80,7 +80,7 @@ public interface LevelOneServerInterface {
 
     /** 添加普通边民信息 */
     @RequestMapping("/TbPeople/rpc/peopleDto")
-    public boolean peopleDto(@RequestBody PeopleDto peopleDto);
+    public boolean peopleDto(@RequestBody HtPeopleDto peopleDto);
 
     @RequestMapping("/AppUser/rpc/audit")
     public boolean audit(@RequestBody EnterpriseAuditDto dto);
@@ -104,7 +104,7 @@ public interface LevelOneServerInterface {
 
     /** 远程调用: 同步航通海关监管商品信息 */
     @RequestMapping("/TbGoods/rpc/goodsDto")
-    public boolean goodsDto(@RequestBody GoodsDto goodsDto);
+    public boolean goodsDto(@RequestBody HtGoodsDto goodsDto);
 
     /** 根据航通主键查询appUser */
     @RequestMapping("/TbPeople/rpc/getAppUserByBorderPutrecNo")

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

@@ -119,7 +119,7 @@ public class LevelOneServerInterfaceFallback implements FallbackFactory<LevelOne
             }
 
             @Override
-            public boolean peopleDto(PeopleDto peopleDto) {
+            public boolean peopleDto(HtPeopleDto peopleDto) {
                 System.out.println(throwable.getMessage());
                 log.error("互市区普通边民信息添加错误:{},错误信息是:{}",peopleDto,throwable.getMessage());
                 return false;
@@ -157,9 +157,9 @@ public class LevelOneServerInterfaceFallback implements FallbackFactory<LevelOne
             }
 
             @Override
-            public boolean goodsDto(GoodsDto goodsDto) {
+            public boolean goodsDto(HtGoodsDto htGoodsDto) {
                 System.out.println(throwable.getMessage());
-                log.error("海关监管商品错误,当前对象:{},错误信息是:{}",goodsDto,throwable.getMessage());
+                log.error("海关监管商品错误,当前对象:{},错误信息是:{}",htGoodsDto,throwable.getMessage());
                 return false;
             }
 

+ 18 - 46
sp-core/sp-api/src/main/java/com/pj/api/dto/GoodsDto.java

@@ -16,7 +16,7 @@ public class GoodsDto {
     /**
      * 名称
      */
-    private String gName;
+    private String name;
 
     /**
      * 主图
@@ -36,7 +36,7 @@ public class GoodsDto {
     /**
      * 编号
      */
-    private String hsCode;
+    private String code;
 
     /**
      * 备注
@@ -58,7 +58,7 @@ public class GoodsDto {
     /**
      *
      */
-    private String gUnit;
+    private String unit;
 
     /**
      *
@@ -126,34 +126,6 @@ public class GoodsDto {
     private String storageEnvm;
 
 
-    @Override
-    public String toString() {
-        return "GoodsDto{" +
-                "id=" + id +
-                ", gName='" + gName + '\'' +
-                ", avatar='" + avatar + '\'' +
-                ", typeIds='" + typeIds + '\'' +
-                ", typeNames='" + typeNames + '\'' +
-                ", hsCode='" + hsCode + '\'' +
-                ", remark='" + remark + '\'' +
-                ", source='" + source + '\'' +
-                ", status=" + status +
-                ", gUnit='" + gUnit + '\'' +
-                ", singlePrice=" + singlePrice +
-                ", taxNo='" + taxNo + '\'' +
-                ", createTime=" + createTime +
-                ", createBy='" + createBy + '\'' +
-                ", createName='" + createName + '\'' +
-                ", updateTime=" + updateTime +
-                ", updateBy='" + updateBy + '\'' +
-                ", updateName='" + updateName + '\'' +
-                ", deleteStatus=" + deleteStatus +
-                ", unit1='" + unit1 + '\'' +
-                ", unit2='" + unit2 + '\'' +
-                ", useTo='" + useTo + '\'' +
-                ", storageEnvm='" + storageEnvm + '\'' +
-                '}';
-    }
 
     public Long getId() {
         return id;
@@ -163,12 +135,12 @@ public class GoodsDto {
         this.id = id;
     }
 
-    public String getgName() {
-        return gName;
+    public String getName() {
+        return name;
     }
 
-    public void setgName(String gName) {
-        this.gName = gName;
+    public void setName(String name) {
+        this.name = name;
     }
 
     public String getAvatar() {
@@ -195,12 +167,12 @@ public class GoodsDto {
         this.typeNames = typeNames;
     }
 
-    public String getHsCode() {
-        return hsCode;
+    public String getCode() {
+        return code;
     }
 
-    public void setHsCode(String hsCode) {
-        this.hsCode = hsCode;
+    public void setCode(String code) {
+        this.code = code;
     }
 
     public String getRemark() {
@@ -227,12 +199,12 @@ public class GoodsDto {
         this.status = status;
     }
 
-    public String getgUnit() {
-        return gUnit;
+    public String getUnit() {
+        return unit;
     }
 
-    public void setgUnit(String gUnit) {
-        this.gUnit = gUnit;
+    public void setUnit(String unit) {
+        this.unit = unit;
     }
 
     public Double getSinglePrice() {
@@ -341,15 +313,15 @@ public class GoodsDto {
 
     public GoodsDto(Long id, String gName, String avatar, String typeIds, String typeNames, String hsCode, String remark, String source, int status, String gUnit, Double singlePrice, String taxNo, Date createTime, String createBy, String createName, Date updateTime, String updateBy, String updateName, Integer deleteStatus, String unit1, String unit2, String useTo, String storageEnvm) {
         this.id = id;
-        this.gName = gName;
+        this.name = gName;
         this.avatar = avatar;
         this.typeIds = typeIds;
         this.typeNames = typeNames;
-        this.hsCode = hsCode;
+        this.code = hsCode;
         this.remark = remark;
         this.source = source;
         this.status = status;
-        this.gUnit = gUnit;
+        this.unit = gUnit;
         this.singlePrice = singlePrice;
         this.taxNo = taxNo;
         this.createTime = createTime;

+ 94 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtGoodsDto.java

@@ -0,0 +1,94 @@
+package com.pj.api.dto;
+
+
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 09 02 15 31
+ **/
+
+public class HtGoodsDto {
+
+    private String hsCode;
+
+    private String gName;
+
+    private String gUnit;
+
+    private String unit1;
+
+    private String unit2;
+
+    private String useTo;
+
+    private String storageEnvm;
+
+    public String getHsCode() {
+        return hsCode;
+    }
+
+    public void setHsCode(String hsCode) {
+        this.hsCode = hsCode;
+    }
+
+    public String getgName() {
+        return gName;
+    }
+
+    public void setgName(String gName) {
+        this.gName = gName;
+    }
+
+    public String getgUnit() {
+        return gUnit;
+    }
+
+    public void setgUnit(String gUnit) {
+        this.gUnit = gUnit;
+    }
+
+    public String getUnit1() {
+        return unit1;
+    }
+
+    public void setUnit1(String unit1) {
+        this.unit1 = unit1;
+    }
+
+    public String getUnit2() {
+        return unit2;
+    }
+
+    public void setUnit2(String unit2) {
+        this.unit2 = unit2;
+    }
+
+    public String getUseTo() {
+        return useTo;
+    }
+
+    public void setUseTo(String useTo) {
+        this.useTo = useTo;
+    }
+
+    public String getStorageEnvm() {
+        return storageEnvm;
+    }
+
+    public void setStorageEnvm(String storageEnvm) {
+        this.storageEnvm = storageEnvm;
+    }
+
+    public HtGoodsDto(String hsCode, String gName, String gUnit, String unit1, String unit2, String useTo, String storageEnvm) {
+        this.hsCode = hsCode;
+        this.gName = gName;
+        this.gUnit = gUnit;
+        this.unit1 = unit1;
+        this.unit2 = unit2;
+        this.useTo = useTo;
+        this.storageEnvm = storageEnvm;
+    }
+
+    public HtGoodsDto() {
+    }
+}

+ 190 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/HtPeopleDto.java

@@ -0,0 +1,190 @@
+package com.pj.api.dto;
+
+/**
+ * @Author Mechrevo
+ * @Date 2023 09 02 15 43
+ **/
+public class HtPeopleDto {
+
+    private String platSeqNo;
+
+    private String borderName;
+
+    private String gencd;
+
+    private String idCardNo;
+
+    private String startDate;
+
+    private String endDate;
+
+    private String idcdGcertPgoffNm;
+
+    private String borderTel;
+
+    private String birplAddr;
+
+    private String customsCode;
+
+    private String expiry;
+
+    private Long id;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    private String putrecNo;
+
+    private String localGovernmentNo;
+
+    private String filingStatus;
+
+    private String fieldCode;
+
+
+    public String getPlatSeqNo() {
+        return platSeqNo;
+    }
+
+    public void setPlatSeqNo(String platSeqNo) {
+        this.platSeqNo = platSeqNo;
+    }
+
+    public String getBorderName() {
+        return borderName;
+    }
+
+    public void setBorderName(String borderName) {
+        this.borderName = borderName;
+    }
+
+    public String getGencd() {
+        return gencd;
+    }
+
+    public void setGencd(String gencd) {
+        this.gencd = gencd;
+    }
+
+    public String getIdCardNo() {
+        return idCardNo;
+    }
+
+    public void setIdCardNo(String idCardNo) {
+        this.idCardNo = idCardNo;
+    }
+
+    public String getStartDate() {
+        return startDate;
+    }
+
+    public void setStartDate(String startDate) {
+        this.startDate = startDate;
+    }
+
+    public String getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(String endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getIdcdGcertPgoffNm() {
+        return idcdGcertPgoffNm;
+    }
+
+    public void setIdcdGcertPgoffNm(String idcdGcertPgoffNm) {
+        this.idcdGcertPgoffNm = idcdGcertPgoffNm;
+    }
+
+    public String getBorderTel() {
+        return borderTel;
+    }
+
+    public void setBorderTel(String borderTel) {
+        this.borderTel = borderTel;
+    }
+
+    public String getBirplAddr() {
+        return birplAddr;
+    }
+
+    public void setBirplAddr(String birplAddr) {
+        this.birplAddr = birplAddr;
+    }
+
+    public String getCustomsCode() {
+        return customsCode;
+    }
+
+    public void setCustomsCode(String customsCode) {
+        this.customsCode = customsCode;
+    }
+
+    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 HtPeopleDto(String platSeqNo, String borderName, String gencd, String idCardNo, String startDate, String endDate, String idcdGcertPgoffNm, String borderTel, String birplAddr, String customsCode, String expiry, String putrecNo, String localGovernmentNo, String filingStatus, String fieldCode) {
+        this.platSeqNo = platSeqNo;
+        this.borderName = borderName;
+        this.gencd = gencd;
+        this.idCardNo = idCardNo;
+        this.startDate = startDate;
+        this.endDate = endDate;
+        this.idcdGcertPgoffNm = idcdGcertPgoffNm;
+        this.borderTel = borderTel;
+        this.birplAddr = birplAddr;
+        this.customsCode = customsCode;
+        this.expiry = expiry;
+        this.putrecNo = putrecNo;
+        this.localGovernmentNo = localGovernmentNo;
+        this.filingStatus = filingStatus;
+        this.fieldCode = fieldCode;
+    }
+
+    public HtPeopleDto() {
+    }
+}

+ 85 - 77
sp-core/sp-api/src/main/java/com/pj/api/dto/PeopleDto.java

@@ -11,56 +11,6 @@ import java.util.Date;
  * @Date 2023 08 01 09 59
  **/
 public class PeopleDto {
-    public PeopleDto(Long id, Long tradeAreaId, String tradeAreaName, String borderName, String code, Integer gencd, Integer age, String idCardNo, String idCardImg, String borderTel, String bankNo, String bankCode, String bankName, Long groupId, String groupName, Integer status, Integer role, Double lng, Double lat, String lastLocation, String address, String addressIds, String detailAddress, Integer isLock, Double leftPrice, Integer judgeStatus, String judgeContent, Date registerTime, Date judgeTime, String personId, Date createTime, String createBy, String createName, Date updateTime, String updateBy, String updateName, Integer deleteStatus, String platSeqNo, Date startDate, Date endDate, String idcdGcertPgoffNm, String birplAddr, String customsCode, Date expiry, String putrecNo, String localGovernmentNo, String filingStatus, String fieldCode) {
-        this.id = id;
-        this.tradeAreaId = tradeAreaId;
-        this.tradeAreaName = tradeAreaName;
-        this.borderName = borderName;
-        this.code = code;
-        this.gencd = gencd;
-        this.age = age;
-        this.idCardNo = idCardNo;
-        this.idCardImg = idCardImg;
-        this.borderTel = borderTel;
-        this.bankNo = bankNo;
-        this.bankCode = bankCode;
-        this.bankName = bankName;
-        this.groupId = groupId;
-        this.groupName = groupName;
-        this.status = status;
-        this.role = role;
-        this.lng = lng;
-        this.lat = lat;
-        this.lastLocation = lastLocation;
-        this.address = address;
-        this.addressIds = addressIds;
-        this.detailAddress = detailAddress;
-        this.isLock = isLock;
-        this.leftPrice = leftPrice;
-        this.judgeStatus = judgeStatus;
-        this.judgeContent = judgeContent;
-        this.registerTime = registerTime;
-        this.judgeTime = judgeTime;
-        this.personId = personId;
-        this.createTime = createTime;
-        this.createBy = createBy;
-        this.createName = createName;
-        this.updateTime = updateTime;
-        this.updateBy = updateBy;
-        this.updateName = updateName;
-        this.deleteStatus = deleteStatus;
-        this.platSeqNo = platSeqNo;
-        this.startDate = startDate;
-        this.endDate = endDate;
-        this.idcdGcertPgoffNm = idcdGcertPgoffNm;
-        this.birplAddr = birplAddr;
-        this.customsCode = customsCode;
-        this.expiry = expiry;
-        this.putrecNo = putrecNo;
-        this.localGovernmentNo = localGovernmentNo;
-        this.filingStatus = filingStatus;
-        this.fieldCode = fieldCode;
-    }
 
     public PeopleDto() {
     }
@@ -89,13 +39,7 @@ public class PeopleDto {
         this.tradeAreaName = tradeAreaName;
     }
 
-    public String getBorderName() {
-        return borderName;
-    }
 
-    public void setBorderName(String borderName) {
-        this.borderName = borderName;
-    }
 
     public String getCode() {
         return code;
@@ -105,13 +49,7 @@ public class PeopleDto {
         this.code = code;
     }
 
-    public Integer getGencd() {
-        return gencd;
-    }
 
-    public void setGencd(Integer gencd) {
-        this.gencd = gencd;
-    }
 
     public Integer getAge() {
         return age;
@@ -121,28 +59,98 @@ public class PeopleDto {
         this.age = age;
     }
 
-    public String getIdCardNo() {
-        return idCardNo;
-    }
 
-    public void setIdCardNo(String idCardNo) {
-        this.idCardNo = idCardNo;
-    }
 
     public String getIdCardImg() {
         return idCardImg;
     }
 
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Integer getSex() {
+        return sex;
+    }
+
+    public void setSex(Integer sex) {
+        this.sex = sex;
+    }
+
+    public String getIdCard() {
+        return idCard;
+    }
+
+    public void setIdCard(String idCard) {
+        this.idCard = idCard;
+    }
+
+    public String getPhone() {
+        return phone;
+    }
+
+    public void setPhone(String phone) {
+        this.phone = phone;
+    }
+
     public void setIdCardImg(String idCardImg) {
         this.idCardImg = idCardImg;
     }
 
-    public String getBorderTel() {
-        return borderTel;
-    }
 
-    public void setBorderTel(String borderTel) {
-        this.borderTel = borderTel;
+    public PeopleDto(Long id, Long tradeAreaId, String tradeAreaName, String name, String code, Integer sex, Integer age, String idCard, String idCardImg, String phone, String bankNo, String bankCode, String bankName, Long groupId, String groupName, Integer status, Integer role, Double lng, Double lat, String lastLocation, String address, String addressIds, String detailAddress, Integer isLock, Double leftPrice, Integer judgeStatus, String judgeContent, Date registerTime, Date judgeTime, String personId, Date createTime, String createBy, String createName, Date updateTime, String updateBy, String updateName, Integer deleteStatus, String platSeqNo, Date startDate, Date endDate, String idcdGcertPgoffNm, String birplAddr, String customsCode, Date expiry, String putrecNo, String localGovernmentNo, String filingStatus, String fieldCode) {
+        this.id = id;
+        this.tradeAreaId = tradeAreaId;
+        this.tradeAreaName = tradeAreaName;
+        this.name = name;
+        this.code = code;
+        this.sex = sex;
+        this.age = age;
+        this.idCard = idCard;
+        this.idCardImg = idCardImg;
+        this.phone = phone;
+        this.bankNo = bankNo;
+        this.bankCode = bankCode;
+        this.bankName = bankName;
+        this.groupId = groupId;
+        this.groupName = groupName;
+        this.status = status;
+        this.role = role;
+        this.lng = lng;
+        this.lat = lat;
+        this.lastLocation = lastLocation;
+        this.address = address;
+        this.addressIds = addressIds;
+        this.detailAddress = detailAddress;
+        this.isLock = isLock;
+        this.leftPrice = leftPrice;
+        this.judgeStatus = judgeStatus;
+        this.judgeContent = judgeContent;
+        this.registerTime = registerTime;
+        this.judgeTime = judgeTime;
+        this.personId = personId;
+        this.createTime = createTime;
+        this.createBy = createBy;
+        this.createName = createName;
+        this.updateTime = updateTime;
+        this.updateBy = updateBy;
+        this.updateName = updateName;
+        this.deleteStatus = deleteStatus;
+        this.platSeqNo = platSeqNo;
+        this.startDate = startDate;
+        this.endDate = endDate;
+        this.idcdGcertPgoffNm = idcdGcertPgoffNm;
+        this.birplAddr = birplAddr;
+        this.customsCode = customsCode;
+        this.expiry = expiry;
+        this.putrecNo = putrecNo;
+        this.localGovernmentNo = localGovernmentNo;
+        this.filingStatus = filingStatus;
+        this.fieldCode = fieldCode;
     }
 
     public String getBankNo() {
@@ -464,7 +472,7 @@ public class PeopleDto {
     /**
      * 姓名
      */
-    private String borderName;
+    private String name;
 
     /**
      * 边民号
@@ -474,7 +482,7 @@ public class PeopleDto {
     /**
      * 性别(1=男,2=女)
      */
-    private Integer gencd;
+    private Integer sex;
 
     /**
      * 年龄
@@ -484,7 +492,7 @@ public class PeopleDto {
     /**
      * 身份证
      */
-    private String idCardNo;
+    private String idCard;
 
     /**
      * 身份证复印件
@@ -494,7 +502,7 @@ public class PeopleDto {
     /**
      * 手机号码
      */
-    private String borderTel;
+    private String phone;
 
     /**
      * 银行编号

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

@@ -3,6 +3,7 @@ package com.pj.feign;
 import com.alibaba.fastjson.JSON;
 import com.pj.api.dto.OrderDto;
 import com.pj.api.dto.OrdersDto;
+import com.pj.common.core.exception.ServiceException;
 import com.pj.dto.DataDto;
 import com.pj.rabbitmq.RabbitMQ;
 import com.pj.utils.IdWorker;
@@ -29,7 +30,6 @@ public class AmqpTemplateFeign {
 
     /**
      * 发送对象至航通
-     *
      * @param t
      * @param dataType
      */
@@ -64,5 +64,18 @@ public class AmqpTemplateFeign {
         log.info("send mq msg finish:{},{}", dataType,JSON.toJSONString(t));
     }
 
+    /**
+     * 获取航通数据时,验证其是否被篡改
+     */
+    public boolean verifyContent(DataDto dataDto){
+        //获取其签名
+        String sign = dataDto.getSign();
+        String signString = "msgId=" + dataDto.getMsgId() + "&appId=" + dataDto.getAppId() + "&dataType=" + dataDto.getDataType() + "&msgTime=" + dataDto.getMsgTime() + "&data=" + dataDto.getData();
+        String md5 = MD5.getMd5(signString, 32);
+        if(!sign.equals(md5))
+            throw new ServiceException("报文已经被修改。");
+        return true;
+    }
+
 
 }

+ 36 - 35
sp-service/async-server/src/main/java/com/pj/task/HtByteTask.java

@@ -12,9 +12,9 @@ import com.pj.api.consts.FeignFactory;
 import com.pj.api.dto.*;
 import com.pj.common.core.exception.ServiceException;
 import com.pj.dto.DataDto;
-import com.pj.enummj.DataType;
+import com.pj.api.dto.HtGoodsDto;
 import com.pj.enummj.FinishStatus;
-import com.pj.ht_border_buy_goods_list.HtBorderBuyGoodsList;
+import com.pj.feign.AmqpTemplateFeign;
 import com.pj.ht_border_buy_goods_list.HtBorderBuyGoodsListMapper;
 import com.pj.ht_borders_list.HtBordersList;
 import com.pj.ht_borders_list.HtBordersListMapper;
@@ -108,7 +108,7 @@ public class HtByteTask {
      * * 007=放行记录(过卡记录)
      */
     @Scheduled(cron = "*/9 * * * * ?")  // 测试阶段,每9秒扫描一次
-    private void htByteTask() {
+    private void htByteTask(){
         /*  测试mq */
 //        OrderDto orderDtoById = levelOneServerInterface.getOrderDtoById(8833342005355478419L);
 //        asyncServerInterface.sendLevelOneOrderDto(orderDtoById, DataType.DATA_TYPE_ONE.getCode());
@@ -124,22 +124,23 @@ public class HtByteTask {
         byteList.forEach(item -> {
             //对象转换
             DataDto dataDto = JSONObject.parseObject(item.getBody(), DataDto.class);
+            //todo: 届时开启该数据校验
+//             amqpTemplateFeign.verifyContent(dataDto);
             //数据解析
             String body = AESUtil.decryptCBC(dataDto.getData(), RabbitMQ.ACC_KEY);
             //数据处理完成状态
             boolean flag = false;
             // 根据类型匹配对象
-            switch (dataDto.getDataType()) {
+            switch (dataDto.getDataType()){
                 case "001":
                     //对象转换
                     PeopleDto peopleDto = JSONObject.parseObject(body, PeopleDto.class);
-
                     //根据其内的身份证,有则新增,无则修改???
                     flag = FeignFactory.levelOneServerInterface.peopleDto(peopleDto);
                     methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
                     if (!flag) {
                         System.out.println("\n边民信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                    } else {
+                    }else {
                         System.out.println("\n边民信息处理成功。 messageId = " + item.getMessageId() + "\n");
                     }
                     break;
@@ -151,7 +152,7 @@ public class HtByteTask {
                     methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
                     if (!flag) {
                         System.out.println("\n店铺信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                    } else {
+                    }else {
                         System.out.println("\n店铺信息处理完成。 messageId = " + item.getMessageId() + "\n");
                     }
                     break;
@@ -163,7 +164,7 @@ public class HtByteTask {
                     methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
                     if (!flag) {
                         System.out.println("\n互助组信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                    } else {
+                    }else {
                         System.out.println("\n互助组信息处理完成。 messageId = " + item.getMessageId() + "\n");
                     }
                     break;
@@ -175,20 +176,20 @@ public class HtByteTask {
                     methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
                     if (!flag) {
                         System.out.println("\n边民合作社信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                    } else {
+                    }else {
                         System.out.println("\n边民合作社信息处理完成。 messageId = " + item.getMessageId() + "\n");
                     }
                     break;
                 case "005":
                     //商品基础信息
-                    GoodsDto goodsDto = JSONObject.parseObject(body, GoodsDto.class);
+                    HtGoodsDto goodsDto = JSONObject.parseObject(body, HtGoodsDto.class);
                     //保存
                     flag = FeignFactory.levelOneServerInterface.goodsDto(goodsDto);
                     methodHtByteTask.updateHtByteInfo(flag, item, dataDto);
                     if (!flag) {
                         System.out.println("\n海关监管商品信息处理失败。 messageId = " + item.getMessageId() + "\n");
-                    } else {
-                        System.out.println("\n海关监管商品信息处理完成。 messageId = " + item.getMessageId() + "\n");
+                    }else {
+                    System.out.println("\n海关监管商品信息处理完成。 messageId = " + item.getMessageId() + "\n");
                     }
                     break;
                 case "006":
@@ -203,72 +204,72 @@ public class HtByteTask {
                     //保存
                     int insert = htTradeSettlementMapper.insert(importDeclarePeople);
                     long primarykey = SP.publicMapper.getPrimarykey();
-                    if (insert == 1) {
+                    if(insert == 1){
                         //购买边民列表
-                        List<HtBordersList> bordersLists = JSON.parseArray(importDeclarePeople.getBordersList(), HtBordersList.class);
+                        List<BordersListDto> bordersLists = JSON.parseArray(importDeclarePeople.getBordersList(), BordersListDto.class);
                         //边民购买商品列表
-                        List<HtBorderBuyGoodsList> buyGoodsList = JSON.parseArray(importDeclarePeople.getBorderBuyGoodsList(), HtBorderBuyGoodsList.class);
+                        List<BorderBuyGoodsListDto> buyGoodsList = JSON.parseArray(importDeclarePeople.getBorderBuyGoodsList(), BorderBuyGoodsListDto.class);
                         //商铺卖货物列表
                         List<HtSellGoodsList> htSellGoodsList = JSON.parseArray(importDeclarePeople.getSellGoodsList(), HtSellGoodsList.class);
                         //航通关联主键
                         String platSeqNo = importDeclarePeople.getPlatSeqNo();
                         //保存购买边民
                         List<BordersListDto> bordersListDtoList = new ArrayList<>();
-                        if (bordersLists.size() > 0) {
+                        if(bordersLists.size() > 0){
                             bordersLists.forEach(t -> {
 //                                t.setCreateTime(new Date());
 //                                t.setFinishStatus(FinishStatus.FINISH_STATUS_ZERO.getCode());
 //                                htBordersListMapper.insert(t);
                                 BordersListDto bordersListDto = new BordersListDto();
-                                BeanUtils.copyProperties(t, bordersListDto);
+                                BeanUtils.copyProperties(t,bordersListDto);
                                 bordersListDtoList.add(bordersListDto);
                             });
-                            /**
-                             * 接收订单推送消息,边民进行交易确认,支付申请,刷脸认证,系统发起进行交易
-                             */
+                        /**
+                         * 接收订单推送消息,边民进行交易确认,支付申请,刷脸认证,系统发起进行交易
+                         */
                             List<HtBordersList> htBordersLists = htBordersListMapper.selectList(new LambdaQueryWrapper<HtBordersList>().eq(HtBordersList::getPlatSeqNo, platSeqNo));
                             methodHtByteTask.sendMessageToPeople(htBordersLists);
                         }
                         //保存边民购买商品
                         List<BorderBuyGoodsListDto> borderBuyGoodsListDtoList = new ArrayList<>();
-                        if (buyGoodsList.size() > 0) {
+                        if(buyGoodsList.size() > 0){
                             buyGoodsList.forEach(t -> {
 //                                t.setCreateTime(new Date());
 //                                t.setFinishStatus(FinishStatus.FINISH_STATUS_ZERO.getCode());
 //                                htBorderBuyGoodsListMapper.insert(t);
                                 BorderBuyGoodsListDto borderBuyGoodsListDto = new BorderBuyGoodsListDto();
-                                BeanUtils.copyProperties(t, borderBuyGoodsListDto);
+                                BeanUtils.copyProperties(t,borderBuyGoodsListDto);
                                 borderBuyGoodsListDtoList.add(borderBuyGoodsListDto);
                             });
                             // ???
                         }
                         //保存商铺卖货物
                         List<SellGoodsListDto> sellGoodsListDtoList = new ArrayList<>();
-                        if (htSellGoodsList.size() > 0) {
+                        if(htSellGoodsList.size() > 0){
                             htSellGoodsList.forEach(t -> {
 //                                t.setCreateTime(new Date());
 //                                t.setFinishStatus(FinishStatus.FINISH_STATUS_ZERO.getCode());
 //                                htSellGoodsListMapper.insert(t);
                                 SellGoodsListDto sellGoodsListDto = new SellGoodsListDto();
-                                BeanUtils.copyProperties(t, sellGoodsListDto);
+                                BeanUtils.copyProperties(t,sellGoodsListDto);
                                 sellGoodsListDtoList.add(sellGoodsListDto);
                             });
                             // ???
                         }
                         //保存航通监听记录
-                        methodHtByteTask.updateHtByteInfo(true, item, dataDto);
+                        methodHtByteTask.updateHtByteInfo(true,item,dataDto);
                         TradeSettlementDto tradeSettlementDto = new TradeSettlementDto();
-                        BeanUtils.copyProperties(importDeclarePeople, tradeSettlementDto);
+                        BeanUtils.copyProperties(importDeclarePeople,tradeSettlementDto);
                         tradeSettlementDto.setId(primarykey);
                         tradeSettlementDto.setBordersListDtoList(bordersListDtoList);
                         tradeSettlementDto.setBorderBuyGoodsListDtoList(borderBuyGoodsListDtoList);
-                        boolean b = FeignFactory.levelOneServerInterface.tradeSettlementDto(tradeSettlementDto);
-                        if (!b) throw new ServiceException("添加错误;");
+                        boolean b = levelOneServerInterface.tradeSettlementDto(tradeSettlementDto);
+                        if(!b)throw new ServiceException("添加错误;");
                         System.out.println("\n交易结算信息处理成功。 messageId = " + item.getMessageId() + "\n");
                         break;
                     }
                     //保存航通监听记录
-                    methodHtByteTask.updateHtByteInfo(false, item, dataDto);
+                    methodHtByteTask.updateHtByteInfo(false,item,dataDto);
                     System.out.println("\n交易结算信息处理失败。 messageId = " + item.getMessageId() + "\n");
                     break;
                 case "007":
@@ -278,10 +279,10 @@ public class HtByteTask {
                     htPassCardRecord.setCreateTime(new Date());
                     //保存
                     int insert1 = htPassCardRecordMapper.insert(htPassCardRecord);
-                    methodHtByteTask.updateHtByteInfo(true, item, dataDto);
-                    if (insert1 == 1) {
+                    methodHtByteTask.updateHtByteInfo(true,item,dataDto);
+                    if(insert1 == 1){
                         System.out.println("\n放行记录(过卡记录)信息处理成功。 messageId = " + item.getMessageId() + "\n");
-                    } else {
+                    }else {
                         System.out.println("\n放行记录(过卡记录)信息处理失败。 messageId = " + item.getMessageId() + "\n");
                     }
 
@@ -297,10 +298,10 @@ public class HtByteTask {
                     htImportDeclarePeople.setFinishStatus(FinishStatus.FINISH_STATUS_ZERO.getCode());
                     htImportDeclarePeople.setCreateTime(new Date());
                     int insert2 = htImportDeclarePeopleMapper.insert(htImportDeclarePeople);
-                    methodHtByteTask.updateHtByteInfo(insert2 == 1, item, dataDto);
-                    if (insert2 == 1) {
+                    methodHtByteTask.updateHtByteInfo(insert2 == 1,item,dataDto);
+                    if(insert2 == 1){
                         System.out.println("\n进口申报单边民确认信息处理成功。 messageId = " + item.getMessageId() + "\n");
-                    } else {
+                    }else {
                         System.out.println("\n进口申报单边民确认信息处理失败。 messageId = " + item.getMessageId() + "\n");
                     }
                     break;

+ 3 - 3
sp-service/level-one-server/src/main/java/com/pj/tb_goods/MethodGoodsService.java

@@ -46,7 +46,7 @@ public class MethodGoodsService {
             TbGoods tbGoods = new TbGoods();
             //解析数据
             if(row.getCell(1) != null)
-                tbGoods.setGName(row.getCell(1).getStringCellValue());
+                tbGoods.setName(row.getCell(1).getStringCellValue());
             if(row.getCell(2) != null)
                 tbGoods.setAvatar(row.getCell(2).getStringCellValue());
             if(row.getCell(3) != null)
@@ -54,7 +54,7 @@ public class MethodGoodsService {
             if(row.getCell(4) != null)
                 tbGoods.setTypeNames(row.getCell(4).getStringCellValue());
             if(row.getCell(5) != null)
-                tbGoods.setHsCode(row.getCell(5).getStringCellValue());
+                tbGoods.setCode(row.getCell(5).getStringCellValue());
             if(row.getCell(6) != null)
                 tbGoods.setRemark(row.getCell(6).getStringCellValue());
             if(row.getCell(7) != null)
@@ -65,7 +65,7 @@ public class MethodGoodsService {
                 tbGoods.setStatus((int)row.getCell(9).getNumericCellValue());
 
             if(row.getCell(9) != null)
-                tbGoods.setGUnit(row.getCell(9).getStringCellValue());
+                tbGoods.setUnit(row.getCell(9).getStringCellValue());
 
             HSSFCell cell11 = row.createCell(10);
             if (cell11 != null && (cell11.getCellType() == CellType.NUMERIC || cell11.getCellType() == CellType.FORMULA))

+ 3 - 3
sp-service/level-one-server/src/main/java/com/pj/tb_goods/TbGoods.java

@@ -54,7 +54,7 @@ public class TbGoods extends Model<TbGoods> implements Serializable {
 	/**
 	 * 名称 
 	 */
-	private String gName;
+	private String name;
 
 	/**
 	 * 主图 
@@ -74,7 +74,7 @@ public class TbGoods extends Model<TbGoods> implements Serializable {
 	/**
 	 * 编号 
 	 */
-	private String hsCode;
+	private String code;
 
 	/**
 	 * 备注 
@@ -96,7 +96,7 @@ public class TbGoods extends Model<TbGoods> implements Serializable {
 	/**
 	 *  
 	 */
-	private String gUnit;
+	private String unit;
 
 	/**
 	 *  

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

@@ -4,6 +4,7 @@ import java.io.IOException;
 import java.util.List;
 
 import com.pj.api.dto.GoodsDto;
+import com.pj.api.dto.HtGoodsDto;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
@@ -134,8 +135,8 @@ public class TbGoodsController {
 
 	/** 远程调用: 同步航通海关监管商品信息 */
 	@RequestMapping("rpc/goodsDto")
-	public boolean goodsDto(@RequestBody GoodsDto goodsDto){
-		boolean b = tbGoodsService.goodsDto(goodsDto);
+	public boolean goodsDto(@RequestBody HtGoodsDto htGoodsDto){
+		boolean b = tbGoodsService.goodsDto(htGoodsDto);
 		return b;
 	}
 

+ 10 - 7
sp-service/level-one-server/src/main/java/com/pj/tb_goods/TbGoodsService.java

@@ -12,9 +12,9 @@ import java.util.stream.Collectors;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.pj.api.dto.GoodsDto;
+import com.pj.api.dto.HtGoodsDto;
 import com.pj.enummj.DeleteStatus;
 import com.pj.enummj.Status;
-import com.pj.tb_enterprise.TbEnterprise;
 import com.pj.utils.so.SoMap;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.poi.hssf.usermodel.HSSFRow;
@@ -80,13 +80,16 @@ public class TbGoodsService extends ServiceImpl<TbGoodsMapper, TbGoods> implemen
 
 
 	/** 远程调用: 同步航通海关监管商品信息 */
-	public boolean goodsDto(GoodsDto goodsDto){
+	public boolean goodsDto(HtGoodsDto goodsDto){
 		TbGoods tbGoods = new TbGoods();
-		List<TbGoods> tbGoodsList = tbGoodsMapper.selectList(new LambdaQueryWrapper<TbGoods>().eq(TbGoods::getHsCode, goodsDto.getHsCode()));
+		List<TbGoods> tbGoodsList = tbGoodsMapper.selectList(new LambdaQueryWrapper<TbGoods>().eq(TbGoods::getCode, goodsDto.getHsCode()));
 		//数据库没有就是新增
 		if(tbGoodsList.size() == 0){
 			BeanUtils.copyProperties(goodsDto,tbGoods);
 			//设计基本信息
+			tbGoods.setName(goodsDto.getgName());
+			tbGoods.setUnit(goodsDto.getgUnit());
+			tbGoods.setCode(goodsDto.getHsCode());
 			tbGoods.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode()); // 默认未删除
 			tbGoods.setStatus(Status.STATUS_ONE.getCode()); // 默认可用
 			tbGoods.setCreateTime(new Date());
@@ -143,7 +146,7 @@ public class TbGoodsService extends ServiceImpl<TbGoodsMapper, TbGoods> implemen
 		}
 		filepath = filepath + "\\商品数据表_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx";
 		//根据需求查询数据
-		List<TbGoods> selectedList = tbGoodsMapper.selectList(new LambdaQueryWrapper<TbGoods>().eq(StringUtils.isNoneBlank(keyword), TbGoods::getGName, keyword));
+		List<TbGoods> selectedList = tbGoodsMapper.selectList(new LambdaQueryWrapper<TbGoods>().eq(StringUtils.isNoneBlank(keyword), TbGoods::getName, keyword));
 		if(selectedList.size() == 0)return "没有可导出的数据。";
 		//建立excel对象封装数据
 		HSSFWorkbook workbook = new HSSFWorkbook();
@@ -177,15 +180,15 @@ public class TbGoodsService extends ServiceImpl<TbGoodsMapper, TbGoods> implemen
 		for (int i = 0; i < selectedList.size(); i++) {
 			HSSFRow sheetRow = sheet.createRow(sheet.getLastRowNum() + 1);
 			sheetRow.createCell(0).setCellValue(i + 1);
-			sheetRow.createCell(1).setCellValue((selectedList.get(i).getGName() + "").equals("null")? "": selectedList.get(i).getGName() + "");
+			sheetRow.createCell(1).setCellValue((selectedList.get(i).getName() + "").equals("null")? "": selectedList.get(i).getName() + "");
 			sheetRow.createCell(2).setCellValue((selectedList.get(i).getAvatar() + "").equals("null")? "": selectedList.get(i).getAvatar() + "");
 			sheetRow.createCell(3).setCellValue((selectedList.get(i).getTypeIds() + "").equals("null")? "": selectedList.get(i).getTypeIds() + "");
 			sheetRow.createCell(4).setCellValue((selectedList.get(i).getTypeNames() + "").equals("null")? "": selectedList.get(i).getTypeNames() + "");
-			sheetRow.createCell(5).setCellValue((selectedList.get(i).getHsCode() + "").equals("null")? "": selectedList.get(i).getHsCode() + "");
+			sheetRow.createCell(5).setCellValue((selectedList.get(i).getCode() + "").equals("null")? "": selectedList.get(i).getCode() + "");
 			sheetRow.createCell(6).setCellValue((selectedList.get(i).getRemark() + "").equals("null")? "": selectedList.get(i).getRemark() + "");
 			sheetRow.createCell(7).setCellValue((selectedList.get(i).getSource() + "").equals("null")? "": selectedList.get(i).getSource() + "");
 			sheetRow.createCell(8).setCellValue((selectedList.get(i).getStatus() + "" ).equals("null")? "": selectedList.get(i).getStatus() + "");
-			sheetRow.createCell(9).setCellValue((selectedList.get(i).getGUnit() + "").equals("null")? "": selectedList.get(i).getGUnit() + "");
+			sheetRow.createCell(9).setCellValue((selectedList.get(i).getUnit() + "").equals("null")? "": selectedList.get(i).getUnit() + "");
 			sheetRow.createCell(10).setCellValue((selectedList.get(i).getSinglePrice() + "").equals("null")? "": selectedList.get(i).getSinglePrice() + "");
 			sheetRow.createCell(11).setCellValue((selectedList.get(i).getTaxNo() + "").equals("null")? "": selectedList.get(i).getTaxNo() + "");
 			sheetRow.createCell(22).setCellValue((selectedList.get(i).getCreateTime() + "").equals("null")? "": selectedList.get(i).getCreateTime() + "");

+ 1 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_goods_transit/MethodGoodsTransitService.java

@@ -78,7 +78,7 @@ public class MethodGoodsTransitService {
                 enterpriseList.forEach(item -> {
                     // 给边民发送短信,调用短信商接口API
                     try {
-                        smsRetryService.sendSmsMsg(item.getBorderTel());
+                        smsRetryService.sendSmsMsg(item.getPhone());
                     } catch (Exception e) {
                         System.out.println("异常被抓住了!");
                         throw new RuntimeException(e);

+ 2 - 2
sp-service/level-one-server/src/main/java/com/pj/tb_goods_transit/TbGoodsTransitService.java

@@ -214,10 +214,10 @@ public class TbGoodsTransitService extends ServiceImpl<TbGoodsTransitMapper, TbG
 		BeanUtils.copyProperties(transactionGoodsParam,tbGoodsTransit);
 		//获取并保存当前商品基本信息
 		tbGoodsTransit.setTradeAreaName(tbTradeArea.getName());  // 交易地区(互市区)
-		tbGoodsTransit.setGoodsName(tbGoods.getGName());  // 商品名称
+		tbGoodsTransit.setGoodsName(tbGoods.getName());  // 商品名称
 		tbGoodsTransit.setDescription(tbGoods.getRemark());  // 商品描述
 		tbGoodsTransit.setPlaceOrigin(tbGoods.getSource()); // 商品产地
-		tbGoodsTransit.setGoodsUnits(tbGoods.getGUnit());  // 商品单位
+		tbGoodsTransit.setGoodsUnits(tbGoods.getUnit());  // 商品单位
 		tbGoodsTransit.setGoodsType(tbGoods.getTypeNames()); // 商品类型名称
 		tbGoodsTransit.setGoodsImg(tbGoods.getAvatar());  // 商品图片
 		tbGoodsTransit.setGoodsId(tbGoods.getId());//保存监管商品表id

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

@@ -37,12 +37,10 @@ import org.springframework.transaction.annotation.Transactional;
 import com.pj.utils.sg.*;
 import org.springframework.web.multipart.MultipartFile;
 
-import javax.annotation.Resource;
 import javax.swing.filechooser.FileSystemView;
 
 /**
  * Service: tb_group -- 互助组
- *
  * @author qzy
  */
 @Service
@@ -140,268 +138,252 @@ public class TbGroupService extends ServiceImpl<TbGroupMapper, TbGroup> implemen
         return line;
     }
 
-    public int AddGroupPeople(Long groupId, Long[] peopleIds) {
-        // 获取当前登录用户id
+	public int AddGroupPeople(Long groupId, Long[] peopleIds) {
+		// 获取当前登录用户id
 //		Long loginId = StpUserUtil.getLoginIdAsLong();
-        int line = 0;
-        // 获取互助组信息
-        TbGroup tbGroup = tbGroupMapper.selectById(groupId);
-        // 如果互助组不存在则抛异常
-        if (Objects.isNull(tbGroup)) {
-            throw new RuntimeException("该互助组不存在");
-        }
-        // 如果互助组被锁定则抛异常
-        if (tbGroup.getIsLock() == 1) {
-            throw new RuntimeException("该互助组已被锁定");
-        }
-        // 如果互助组被删除则抛异常
-        if (tbGroup.getDeleteStatus() == 1) {
-            throw new RuntimeException("该互助组已被删除");
-        }
-        List<Long> list = Arrays.asList(peopleIds);
-        // 把互助组信息写入边民表
-        for (Long peopleId : list) {
-            TbPeople tbPeople = tbPeopleService.getById(peopleId);
-            tbPeople.setGroupId(tbGroup.getId());
-            tbPeople.setGroupName(tbGroup.getOrgName());
-            // 写入更新者id
+		int line = 0;
+		// 获取互助组信息
+		TbGroup tbGroup = tbGroupMapper.selectById(groupId);
+		// 如果互助组不存在则抛异常
+		if (Objects.isNull(tbGroup)) {
+			throw new RuntimeException("该互助组不存在");
+		}
+		// 如果互助组被锁定则抛异常
+		if (tbGroup.getIsLock() == 1) {
+			throw new RuntimeException("该互助组已被锁定");
+		}
+		// 如果互助组被删除则抛异常
+		if (tbGroup.getDeleteStatus() == 1) {
+			throw new RuntimeException("该互助组已被删除");
+		}
+		List<Long> list = Arrays.asList(peopleIds);
+		// 把互助组信息写入边民表
+		for (Long peopleId : list) {
+			TbPeople tbPeople = tbPeopleMapper.selectById(peopleId);
+			tbPeople.setGroupId(tbGroup.getId());
+			tbPeople.setGroupName(tbGroup.getOrgName());
+			// 写入更新者id
 //			tbPeople.setUpdateBy(String.valueOf(loginId));
-            int i = tbPeopleService.updateById(tbPeople) ? 1 : 0;
-            line = i + 1;
-        }
-        return line;
+			int i = tbPeopleMapper.updateById(tbPeople);
+			line = i + 1;
+		}
+		return line;
 
-    }
+	}
 
-    public int DelGroupPeople(Long groupId, Long[] peopleIds) {
+	public int DelGroupPeople(Long groupId, Long[] peopleIds) {
 
-        // 获取当前登录用户id
-        Long loginId = StpUserUtil.getLoginIdAsLong();
-        int line = 0;
-        // 获取互助组信息
-        TbGroup tbGroup = tbGroupMapper.selectById(groupId);
-        // 如果互助组不存在则抛异常
-        if (Objects.isNull(tbGroup)) {
-            throw new RuntimeException("该互助组不存在");
-        }
-        // 如果互助组被锁定则抛异常
-        if (tbGroup.getIsLock() == 1) {
-            throw new RuntimeException("该互助组已被锁定");
-        }
-        // 如果互助组被删除则抛异常
-        if (tbGroup.getDeleteStatus() == 1) {
-            throw new RuntimeException("该互助组已被删除");
-        }
-        List<Long> list = Arrays.asList(peopleIds);
-        // 把边民表互助组信息置空
-        for (Long peopleId : list) {
-            TbPeople tbPeople = tbPeopleService.getById(peopleId);
-            tbPeople.setGroupId(0L);
-            tbPeople.setGroupName("");
-            // 写入更新者id
-            tbPeople.setUpdateBy(String.valueOf(loginId));
-            int i = tbPeopleService.updateById(tbPeople) ? 1 : 0;
-            line = i + 1;
-        }
-        return line;
-    }
-
-    public int isLock(TbGroupDto tbGroupDto) {
-        // 获取当前登录用户id
-        Long loginId = StpUserUtil.getLoginIdAsLong();
-        // 获取互助组信息
-        TbGroup tbGroup = tbGroupMapper.selectById(tbGroupDto.getId());
-        // 如果互助组不存在则抛异常
-        if (Objects.isNull(tbGroup)) {
-            throw new RuntimeException("该互助组不存在");
-        }
-        // 如果互助组被删除则抛异常
-        if (tbGroup.getDeleteStatus() == 1) {
-            throw new RuntimeException("该互助组已被删除");
-        }
-        BeanUtils.copyProperties(tbGroupDto, tbGroup);
-        // 写入更新者id
-        tbGroup.setUpdateBy(loginId);
-        // 更新互助组信息
-        int line = tbGroupMapper.updateById(tbGroup);
-        return line;
-    }
+		// 获取当前登录用户id
+		Long loginId = StpUserUtil.getLoginIdAsLong();
+		int line = 0;
+		// 获取互助组信息
+		TbGroup tbGroup = tbGroupMapper.selectById(groupId);
+		// 如果互助组不存在则抛异常
+		if (Objects.isNull(tbGroup)) {
+			throw new RuntimeException("该互助组不存在");
+		}
+		// 如果互助组被锁定则抛异常
+		if (tbGroup.getIsLock() == 1) {
+			throw new RuntimeException("该互助组已被锁定");
+		}
+		// 如果互助组被删除则抛异常
+		if (tbGroup.getDeleteStatus() == 1) {
+			throw new RuntimeException("该互助组已被删除");
+		}
+		List<Long> list = Arrays.asList(peopleIds);
+		// 把边民表互助组信息置空
+		for (Long peopleId : list) {
+			TbPeople tbPeople = tbPeopleMapper.selectById(peopleId);
+			tbPeople.setGroupId(0L);
+			tbPeople.setGroupName("");
+			// 写入更新者id
+			tbPeople.setUpdateBy(String.valueOf(loginId));
+			int i = tbPeopleMapper.updateById(tbPeople);
+			line = i + 1;
+		}
+		return line;
+	}
 
-    /**
-     * 根据互助组id查看组内成员
-     *
-     * @author loovi
-     * @date
-     */
-    public AjaxJson getMemberListByGroupId(Long id) {
-        SoMap so = SoMap.getRequestSoMap();
-        so.set("groupId", id);
-        List<TbPeople> list = tbPeopleService.getMemberListByGroupId(so.startPage());
-        return AjaxJson.getPageData(so.getDataCount(), list);
-    }
+	public int isLock(TbGroupDto tbGroupDto) {
+		// 获取当前登录用户id
+		Long loginId = StpUserUtil.getLoginIdAsLong();
+		// 获取互助组信息
+		TbGroup tbGroup = tbGroupMapper.selectById(tbGroupDto.getId());
+		// 如果互助组不存在则抛异常
+		if (Objects.isNull(tbGroup)) {
+			throw new RuntimeException("该互助组不存在");
+		}
+		// 如果互助组被删除则抛异常
+		if (tbGroup.getDeleteStatus() == 1) {
+			throw new RuntimeException("该互助组已被删除");
+		}
+		BeanUtils.copyProperties(tbGroupDto, tbGroup);
+		// 写入更新者id
+		tbGroup.setUpdateBy(loginId);
+		// 更新互助组信息
+		int line = tbGroupMapper.updateById(tbGroup);
+		return line;
+	}
 
-    /**
-     * 组长查看互助组内成员
-     *
-     * @author loovi
-     * @date
-     */
-    public AjaxJson getMemberListByLeaderId(Long id) {
-        SoMap so = SoMap.getRequestSoMap();
-        so.set("leaderId", id);
-        List<TbPeople> list = tbPeopleService.getMemberListByLeaderId(so.startPage());
-        return AjaxJson.getPageData(so.getDataCount(), list);
-    }
+	/**
+	 * 根据互助组id查看组内成员
+	 *
+	 * @author loovi
+	 * @date
+	 */
+	public AjaxJson getMemberListByGroupId(Long id) {
+		SoMap so = SoMap.getRequestSoMap();
+		so.set("groupId",id);
+		List<TbPeople> list = tbPeopleMapper.getMemberListByGroupId(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
+	/**
+	 *组长查看互助组内成员
+	 *
+	 * @author loovi
+	 * @date
+	 */
+	public AjaxJson getMemberListByLeaderId(Long id){
+		SoMap so = SoMap.getRequestSoMap();
+		so.set("leaderId",id);
+		List<TbPeople> list = tbPeopleMapper.getMemberListByLeaderId(so.startPage());
+		return AjaxJson.getPageData(so.getDataCount(), list);
+	}
 
-    /**
-     * 导入
-     *
-     * @param file excel文件
-     * @return
-     * @throws IOException
-     */
-    public String importData(MultipartFile file) throws IOException {
-        System.out.println("\n开始执行文件上传....\n");
+	/**
+	 * 导入
+	 *
+	 * @param file excel文件
+	 * @return
+	 * @throws IOException
+	 */
+	public String importData(MultipartFile file) throws IOException {
+		System.out.println("\n开始执行文件上传....\n");
 
-        //判空
-        if (file.isEmpty()) return "文件为空,无法执行上传...";
-        //获取文件上传数据
-        HSSFWorkbook wb = new HSSFWorkbook(file.getInputStream());
-        //获取第一页sheet
-        HSSFSheet sheet = wb.getSheetAt(0);
-        //定义计数器
-        int count = 0;
-        //定义行对象
-        HSSFRow row = null;
-        //解析数据封装到集合
-        count = methodGroupService.importMethod(row, sheet, count);
-        wb.close();
-        System.out.println("\n文件上传完成,共上传 " + count + "条 " + "数据...\n");
-        return "上传完成,共上传" + count + "条" + "数据。";
-    }
+		//判空
+		if (file.isEmpty()) return "文件为空,无法执行上传...";
+		//获取文件上传数据
+		HSSFWorkbook wb = new HSSFWorkbook(file.getInputStream());
+		//获取第一页sheet
+		HSSFSheet sheet = wb.getSheetAt(0);
+		//定义计数器
+		int count = 0;
+		//定义行对象
+		HSSFRow row = null;
+		//解析数据封装到集合
+		count = methodGroupService.importMethod(row, sheet, count);
+		wb.close();
+		System.out.println("\n文件上传完成,共上传 " + count + "条 " + "数据...\n");
+		return "上传完成,共上传" + count + "条" + "数据。";
+	}
 
-    /**
-     * 导出 excel文件
-     *
-     * @param keyword
-     * @return
-     */
-    public String outportExcel(String keyword, String filepath) throws IOException {
-        System.out.println("\n开始执行文件导出....\n");
-        //导出的文件的路径
-        if (filepath == null || filepath.trim().equals("")) {
-            // 获取当前用户的桌面路径
-            FileSystemView fileSystemView = FileSystemView.getFileSystemView();
-            filepath = fileSystemView.getHomeDirectory().getPath();
-        }
-        filepath = filepath + "\\互助组数据表_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx";
-        //根据需求查询数据
-        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();
-        //创建excel表格右下角的sheet页名称
-        HSSFSheet sheet = workbook.createSheet("1");
-        //创建表头
-        HSSFRow row = sheet.createRow(0);
-        row.createCell(0).setCellValue("序号");
-        row.createCell(1).setCellValue("IDs");
-        row.createCell(2).setCellValue("地址");
-        row.createCell(3).setCellValue("详细地址");
-        row.createCell(4).setCellValue("组名称");
-        row.createCell(5).setCellValue("组长ID");
-        row.createCell(6).setCellValue("组长名");
-        row.createCell(7).setCellValue("组长电话");
-        row.createCell(8).setCellValue("编码");
-        row.createCell(9).setCellValue("当天该组剩余额度");
+	/**
+	 * 导出 excel文件
+	 *
+	 * @param keyword
+	 * @return
+	 */
+	public String outportExcel(String keyword, String filepath) throws IOException {
+		System.out.println("\n开始执行文件导出....\n");
+		//导出的文件的路径
+		if (filepath == null || filepath.trim().equals("")) {
+			// 获取当前用户的桌面路径
+			FileSystemView fileSystemView = FileSystemView.getFileSystemView();
+			filepath = fileSystemView.getHomeDirectory().getPath();
+		}
+		filepath = filepath + "\\互助组数据表_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx";
+		//根据需求查询数据
+		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();
+		//创建excel表格右下角的sheet页名称
+		HSSFSheet sheet = workbook.createSheet("1");
+		//创建表头
+		HSSFRow row = sheet.createRow(0);
+		row.createCell(0).setCellValue("序号");
+		row.createCell(1).setCellValue("IDs");
+		row.createCell(2).setCellValue("地址");
+		row.createCell(3).setCellValue("详细地址");
+		row.createCell(4).setCellValue("组名称");
+		row.createCell(5).setCellValue("组长ID");
+		row.createCell(6).setCellValue("组长名");
+		row.createCell(7).setCellValue("组长电话");
+		row.createCell(8).setCellValue("编码");
+		row.createCell(9).setCellValue("当天该组剩余额度");
 
-        row.createCell(14).setCellValue("创建时间");
-        row.createCell(15).setCellValue("创建人编号");
-        row.createCell(16).setCellValue("创建人名称");
-        row.createCell(17).setCellValue("更新时间");
-        row.createCell(18).setCellValue("更新人编号");
-        row.createCell(19).setCellValue("更新人名称");
-        row.createCell(20).setCellValue("删除状态");
+		row.createCell(14).setCellValue("创建时间");
+		row.createCell(15).setCellValue("创建人编号");
+		row.createCell(16).setCellValue("创建人名称");
+		row.createCell(17).setCellValue("更新时间");
+		row.createCell(18).setCellValue("更新人编号");
+		row.createCell(19).setCellValue("更新人名称");
+		row.createCell(20).setCellValue("删除状态");
 
-        //定义计数器
-        int count = 0;
-        //遍历集合
-        for (int i = 0; i < selectedList.size(); i++) {
-            HSSFRow sheetRow = sheet.createRow(sheet.getLastRowNum() + 1);
-            sheetRow.createCell(0).setCellValue(i + 1);
-            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).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() + "");
-            sheetRow.createCell(8).setCellValue((selectedList.get(i).getCode() + "").equals("null") ? "" : selectedList.get(i).getCode() + "");
-            sheetRow.createCell(9).setCellValue((selectedList.get(i).getLeftPrice() + "").equals("null") ? "" : selectedList.get(i).getLeftPrice() + "");
+		//定义计数器
+		int count = 0;
+		//遍历集合
+		for (int i = 0; i < selectedList.size(); i++) {
+			HSSFRow sheetRow = sheet.createRow(sheet.getLastRowNum() + 1);
+			sheetRow.createCell(0).setCellValue(i + 1);
+			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).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() + "");
+			sheetRow.createCell(8).setCellValue((selectedList.get(i).getCode() + "").equals("null") ? "" : selectedList.get(i).getCode() + "");
+			sheetRow.createCell(9).setCellValue((selectedList.get(i).getLeftPrice() + "").equals("null") ? "" : selectedList.get(i).getLeftPrice() + "");
 
-            //公共字段
-            sheetRow.createCell(22).setCellValue((selectedList.get(i).getCreateTime() + "").equals("null") ? "" : selectedList.get(i).getCreateTime() + "");
-            sheetRow.createCell(23).setCellValue((selectedList.get(i).getCreateBy() + "").equals("null") ? "" : selectedList.get(i).getCreateBy() + "");
-            sheetRow.createCell(24).setCellValue((selectedList.get(i).getCreateName() + "").equals("null") ? "" : selectedList.get(i).getCreateName() + "");
-            sheetRow.createCell(25).setCellValue((selectedList.get(i).getUpdateTime() + "").equals("null") ? "" : selectedList.get(i).getUpdateTime() + "");
-            sheetRow.createCell(26).setCellValue((selectedList.get(i).getUpdateBy() + "").equals("null") ? "" : selectedList.get(i).getUpdateBy() + "");
-            sheetRow.createCell(27).setCellValue((selectedList.get(i).getUpdateName() + "").equals("null") ? "" : selectedList.get(i).getUpdateName() + "");
-            sheetRow.createCell(28).setCellValue((selectedList.get(i).getDeleteStatus() + "").equals("null") ? "" : selectedList.get(i).getDeleteStatus() + "");
-            count += 1;
-        }
-        //建立输出流,输出文件
-        FileOutputStream fos = new FileOutputStream(filepath);
+			//公共字段
+			sheetRow.createCell(22).setCellValue((selectedList.get(i).getCreateTime() + "").equals("null") ? "" : selectedList.get(i).getCreateTime() + "");
+			sheetRow.createCell(23).setCellValue((selectedList.get(i).getCreateBy() + "").equals("null") ? "" : selectedList.get(i).getCreateBy() + "");
+			sheetRow.createCell(24).setCellValue((selectedList.get(i).getCreateName() + "").equals("null") ? "" : selectedList.get(i).getCreateName() + "");
+			sheetRow.createCell(25).setCellValue((selectedList.get(i).getUpdateTime() + "").equals("null") ? "" : selectedList.get(i).getUpdateTime() + "");
+			sheetRow.createCell(26).setCellValue((selectedList.get(i).getUpdateBy() + "").equals("null") ? "" : selectedList.get(i).getUpdateBy() + "");
+			sheetRow.createCell(27).setCellValue((selectedList.get(i).getUpdateName() + "").equals("null") ? "" : selectedList.get(i).getUpdateName() + "");
+			sheetRow.createCell(28).setCellValue((selectedList.get(i).getDeleteStatus() + "").equals("null") ? "" : selectedList.get(i).getDeleteStatus() + "");
+			count += 1;
+		}
+		//建立输出流,输出文件
+		FileOutputStream fos = new FileOutputStream(filepath);
 
-        workbook.write(fos);
-        fos.flush();
-        //关闭输出流
-        fos.close();
-        workbook.close();
-        System.out.println("\n数据导出完成!共导出 " + count + " 条数据。");
-        return "数据导出完成!共导出 " + count + " 条数据。";
-    }
+		workbook.write(fos);
+		fos.flush();
+		//关闭输出流
+		fos.close();
+		workbook.close();
+		System.out.println("\n数据导出完成!共导出 " + count + " 条数据。");
+		return "数据导出完成!共导出 " + count + " 条数据。";
+	}
 
-    /**
-     * 远程调用方法
-     */
-    public boolean groupDto(GroupDto groupDto) {
-        TbTradeArea tbTradeArea = tbTradeAreaService.updateHandler(groupDto.getFieldCode(), "");
-        TbGroup tbGroup = new TbGroup();
-        BeanUtils.copyProperties(groupDto, tbGroup);
-        //根据编号进行事务处理
-        List<TbGroup> tbGroupList = tbGroupMapper.selectList(new LambdaQueryWrapper<TbGroup>().eq(TbGroup::getPlatSeqNo, groupDto.getPlatSeqNo()));
-        if (tbGroupList.size() == 0) {
-            //新增
-            tbGroup.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
-            tbGroup.setCreateTime(new Date()).setTradeAreaId(tbTradeArea.getId()).setTradeAreaName(tbTradeArea.getName());
-         this.save(tbGroup);
-        }
-        List<BorderDTO> borderDTOList = JSONUtil.toList(groupDto.getBorderList(), BorderDTO.class);
-        borderDTOList.forEach(borderDTO -> {
-            TbPeople tbPeople = tbPeopleService.findByIdCarNo(borderDTO.getCiphertextIdno());
-            if (tbPeople==null){
-                tbPeople=new TbPeople();
-            }
-            tbPeople.setGroupName(tbGroup.getOrgName()).setGroupId(tbGroup.getId()).setTradeAreaId(tbTradeArea.getId())
-                    .setTradeAreaName(tbTradeArea.getName()).setUpdateTime(new Date());
-            tbPeopleService.saveOrUpdate(tbPeople);
-            //todo 继续同步边民信息
-        });
-        //修改
-        BeanUtils.copyProperties(tbGroupList.get(0), tbGroup);
-        int i = tbGroupMapper.updateById(tbGroup);
-        return i == 1;
-    }
+	/** 远程调用方法 */
+	public boolean groupDto(GroupDto groupDto){
+		TbGroup tbGroup = new TbGroup();
+		BeanUtils.copyProperties(groupDto,tbGroup);
+		//根据编号进行事务处理
+		List<TbGroup> tbGroupList = tbGroupMapper.selectList(new LambdaQueryWrapper<TbGroup>().eq(TbGroup::getPlatSeqNo, groupDto.getPlatSeqNo()));
+		if(tbGroupList.size() == 0){
+			//新增
+			tbGroup.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode());
+			tbGroup.setCreateTime(new Date());
+			boolean save = this.save(tbGroup);
+			return save;
+		}
+		//修改
+		BeanUtils.copyProperties(tbGroupList.get(0),tbGroup);
+		int i = tbGroupMapper.updateById(tbGroup);
+		return i == 1;
+	}
 
-    /**
-     * 远程调用方法 获取边民组的基本信息
-     */
-    GroupDto getRpcById(String id) {
-        TbGroup byId = super.getById(id);
-        GroupDto groupDto = new GroupDto();
-        BeanUtils.copyProperties(byId, groupDto);
-        return groupDto;
-    }
+	/** 远程调用方法 获取边民组的基本信息*/
+	GroupDto getRpcById(String id) {
+		TbGroup byId = super.getById(id);
+		GroupDto groupDto = new GroupDto();
+		BeanUtils.copyProperties(byId,groupDto);
+		return groupDto;
+	}
 
 }
 

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

@@ -131,7 +131,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 			int updated = tbGoodsTransitMapper.updateById(tbGoodsTransit);
 			//给互助组下属所有人发送取消的message
 			PeopleDto peopleDto = levelOneServerInterface.getRpcById(appLoginInfo.getFk());
-			methodOrderService.sendGroupMessage(peopleDto.getGroupId(),peopleDto.getBorderName(),false);
+			methodOrderService.sendGroupMessage(peopleDto.getGroupId(),peopleDto.getName(),false);
 			return updated == 1;
 		}
 		return false;
@@ -268,7 +268,7 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
 			peopleConfirmVo.setOrderId(so.getLong("orderId"));
 			peopleConfirmVo.setGroupId(so.getLong("groupId"));
 			peopleConfirmVo.setPeopleId(people.getId());
-			peopleConfirmVo.setPeopleName(people.getBorderName());
+			peopleConfirmVo.setPeopleName(people.getName());
 
 			// 订单确认状态
 			if(peopleIds.contains(people.getId()) || 2 == people.getRole()) {

+ 4 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_people/MethodPeopleService.java

@@ -51,27 +51,27 @@ public class MethodPeopleService {
             TbPeople tbPeople = new TbPeople();
             //解析数据
             if(row.getCell(1) != null)
-                tbPeople.setBorderName(row.getCell(1).getStringCellValue());
+                tbPeople.setName(row.getCell(1).getStringCellValue());
 
             if(row.getCell(2) != null)
                 tbPeople.setCode(row.getCell(2).getStringCellValue());
 
             HSSFCell cell8 = row.getCell(3);
             if (cell8 != null && (cell8.getCellType() == CellType.NUMERIC || cell8.getCellType() == CellType.FORMULA))
-                tbPeople.setGencd((int) cell8.getNumericCellValue());
+                tbPeople.setSex((int) cell8.getNumericCellValue());
 
             HSSFCell cell4 = row.getCell(4);
             if (cell4 != null && (cell4.getCellType() == CellType.NUMERIC || cell4.getCellType() == CellType.FORMULA))
                 tbPeople.setAge((int) cell4.getNumericCellValue());
 
             if(row.getCell(5) != null)
-                tbPeople.setIdCardNo(row.getCell(3).getStringCellValue());
+                tbPeople.setIdCard(row.getCell(3).getStringCellValue());
 
             if(row.getCell(6) != null)
                 tbPeople.setIdCardImg(row.getCell(3).getStringCellValue());
 
             if(row.getCell(7) != null)
-                tbPeople.setBorderTel(row.getCell(3).getStringCellValue());
+                tbPeople.setPhone(row.getCell(3).getStringCellValue());
 
             if(row.getCell(8) != null)
                 tbPeople.setBankNo(row.getCell(3).getStringCellValue());

+ 4 - 4
sp-service/level-one-server/src/main/java/com/pj/tb_people/TbPeople.java

@@ -62,7 +62,7 @@ public class TbPeople extends Model<TbPeople> implements Serializable {
 	/**
 	 * 姓名 
 	 */
-	private String borderName;	
+	private String name;
 
 	/**
 	 * 边民号 
@@ -72,7 +72,7 @@ public class TbPeople extends Model<TbPeople> implements Serializable {
 	/**
 	 * 性别(1=男,2=女) 
 	 */
-	private Integer gencd;
+	private Integer sex;
 
 	/**
 	 * 年龄 
@@ -82,7 +82,7 @@ public class TbPeople extends Model<TbPeople> implements Serializable {
 	/**
 	 * 身份证 
 	 */
-	private String idCardNo;	
+	private String idCard;
 
 	/**
 	 * 身份证复印件 
@@ -92,7 +92,7 @@ public class TbPeople extends Model<TbPeople> implements Serializable {
 	/**
 	 * 手机号码 
 	 */
-	private String borderTel;	
+	private String phone;
 
 	/**
 	 * 银行编号 

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

@@ -5,6 +5,7 @@ import java.util.List;
 
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.pj.api.dto.AppUserDto;
+import com.pj.api.dto.HtPeopleDto;
 import com.pj.api.dto.PeopleDto;
 import com.pj.tb_people.dto.LeaveGroupDto;
 import com.pj.tb_people.dto.StartStopDto;
@@ -262,7 +263,7 @@ public class TbPeopleController {
      * 注册身份时对应的表添加数据
      */
     @RequestMapping("rpc/peopleDto")
-    public boolean peopleDto(@RequestBody PeopleDto peopleDto) throws Exception {
+    public boolean peopleDto(@RequestBody HtPeopleDto peopleDto) throws Exception {
         boolean dto = tbPeopleService.peopleDto(peopleDto);
         return dto;
     }

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

@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.pj.api.client.admin.AdminInterface;
 import com.pj.api.dto.AppUserDto;
+import com.pj.api.dto.HtPeopleDto;
 import com.pj.api.dto.PeopleDto;
 import com.pj.common.core.exception.ServiceException;
 import com.pj.current.dto.PCLoginUserInfo;
@@ -294,7 +295,7 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		tbOrderPeopleConfirm.setPeopleId(tbPeople.getId());
 		tbOrderPeopleConfirm.setGroupId(tbPeople.getGroupId());
 		tbOrderPeopleConfirm.setOrderId(orderId);
-		tbOrderPeopleConfirm.setPeopleName(tbPeople.getBorderName());
+		tbOrderPeopleConfirm.setPeopleName(tbPeople.getName());
 		tbOrderPeopleConfirm.setCreateTime(new Date());
 		int insert = tbOrderPeopleConfirmMapper.insert(tbOrderPeopleConfirm);
 		//执行查询订单完成情况
@@ -422,7 +423,7 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		}
 		filepath = filepath + "\\边民数据表_" + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + ".xlsx";
 		//根据需求查询数据
-		List<TbPeople> selectedList = tbPeopleMapper.selectList(new LambdaQueryWrapper<TbPeople>().eq(StringUtils.isNoneBlank(keyword), TbPeople::getBorderName, keyword));
+		List<TbPeople> selectedList = tbPeopleMapper.selectList(new LambdaQueryWrapper<TbPeople>().eq(StringUtils.isNoneBlank(keyword), TbPeople::getName, keyword));
 		if(selectedList.size() == 0)return "没有可导出的数据。";
 		//建立excel对象封装数据
 		HSSFWorkbook workbook = new HSSFWorkbook();
@@ -472,13 +473,13 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 		for (int i = 0; i < selectedList.size(); i++) {
 			HSSFRow sheetRow = sheet.createRow(sheet.getLastRowNum() + 1);
 			sheetRow.createCell(0).setCellValue(i + 1);
-			sheetRow.createCell(1).setCellValue((selectedList.get(i).getBorderName() + "").equals("null")? "": selectedList.get(i).getBorderName() + "");
+			sheetRow.createCell(1).setCellValue((selectedList.get(i).getName() + "").equals("null")? "": selectedList.get(i).getName() + "");
 			sheetRow.createCell(2).setCellValue((selectedList.get(i).getCode() + "").equals("null")? "": selectedList.get(i).getCode() + "");
-			sheetRow.createCell(3).setCellValue((selectedList.get(i).getGencd() + "").equals("null")? "": selectedList.get(i).getGencd() + "");
+			sheetRow.createCell(3).setCellValue((selectedList.get(i).getSex() + "").equals("null")? "": selectedList.get(i).getSex() + "");
 			sheetRow.createCell(4).setCellValue((selectedList.get(i).getAge() + "").equals("null")? "": selectedList.get(i).getAge() + "");
-			sheetRow.createCell(5).setCellValue((selectedList.get(i).getIdCardNo() + "").equals("null")? "": selectedList.get(i).getIdCardNo() + "");
+			sheetRow.createCell(5).setCellValue((selectedList.get(i).getIdCard() + "").equals("null")? "": selectedList.get(i).getIdCard() + "");
 			sheetRow.createCell(6).setCellValue((selectedList.get(i).getIdCardImg() + "").equals("null")? "": selectedList.get(i).getIdCardImg() + "");
-			sheetRow.createCell(7).setCellValue((selectedList.get(i).getBorderTel() + "").equals("null")? "": selectedList.get(i).getBorderTel() + "");
+			sheetRow.createCell(7).setCellValue((selectedList.get(i).getPhone() + "").equals("null")? "": selectedList.get(i).getPhone() + "");
 			sheetRow.createCell(8).setCellValue((selectedList.get(i).getBankNo() + "" ).equals("null")? "": selectedList.get(i).getBankNo() + "");
 			sheetRow.createCell(9).setCellValue((selectedList.get(i).getBankCode() + "").equals("null")? "": selectedList.get(i).getBankCode() + "");
 			sheetRow.createCell(10).setCellValue((selectedList.get(i).getBankName() + "").equals("null")? "": selectedList.get(i).getBankName() + "");
@@ -522,11 +523,15 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 	}
 
 	/** 远程调用方法 边民信息事务处理 */
-	public boolean peopleDto(PeopleDto peopleDto) throws Exception {
+	public boolean peopleDto(HtPeopleDto peopleDto) throws Exception {
 		//创建对象
 		TbPeople tbPeople = new TbPeople();
 		//数据拷贝
 		BeanUtils.copyProperties(peopleDto,tbPeople);
+		tbPeople.setSex(Integer.valueOf(peopleDto.getGencd()));
+		tbPeople.setPhone(peopleDto.getBorderTel());
+		tbPeople.setIdCard(peopleDto.getIdCardNo());
+		tbPeople.setName(peopleDto.getBorderName());
 		//设置基本信息
 		tbPeople.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode()); // 逻辑删除,默认可用
 		tbPeople.setCreateTime(new Date()); // 创建时间
@@ -544,11 +549,11 @@ public class TbPeopleService extends ServiceImpl<TbPeopleMapper, TbPeople> imple
 			boolean save = this.save(tbPeople);
 			if(save){
 				//给边民生成账号
-				List<TbPeople> tbPeopleList = tbPeopleMapper.selectList(new LambdaQueryWrapper<TbPeople>().eq(TbPeople::getBorderTel, tbPeople.getBorderTel()).eq(TbPeople::getDeleteStatus, DeleteStatus.DELETE_STATUS_ON.getCode()));
+				List<TbPeople> tbPeopleList = tbPeopleMapper.selectList(new LambdaQueryWrapper<TbPeople>().eq(TbPeople::getPhone, tbPeople.getPhone()).eq(TbPeople::getDeleteStatus, DeleteStatus.DELETE_STATUS_ON.getCode()));
 				peopleDto.setId(tbPeopleList.get(0).getId());
 				Boolean aBoolean = adminInterface.generatePeopleAccount(peopleDto);
 				if(!aBoolean)
-					throw new RuntimeException("\n"+ tbPeopleList.get(0).getBorderName() + "生成账号时错误。 id = " + tbPeopleList.get(0).getId() + "\n");
+					throw new RuntimeException("\n"+ tbPeopleList.get(0).getName() + "生成账号时错误。 id = " + tbPeopleList.get(0).getId() + "\n");
 				return aBoolean;
 			}
 		}

+ 2 - 5
sp-service/sp-admin/src/main/java/com/pj/project/app_user/AppUserController.java

@@ -2,11 +2,8 @@ package com.pj.project.app_user;
 
 import java.util.List;
 
-import com.pj.api.dto.AppUserDto;
+import com.pj.api.dto.*;
 
-import com.pj.api.dto.EnterpriseAuditDto;
-import com.pj.api.dto.EnterpriseDto;
-import com.pj.api.dto.PeopleDto;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -134,7 +131,7 @@ public class AppUserController {
 	 * 同步航通边民信息时,自动给边民注册app账号
 	 */
 	@RequestMapping("rpc/generatePeopleAccount")
-	public boolean generatePeopleAccount(@RequestBody PeopleDto peopleDto) throws Exception {
+	public boolean generatePeopleAccount(@RequestBody HtPeopleDto peopleDto) throws Exception {
 		boolean info = appUserService.generatePeopleAccount(peopleDto);
 		return info;
 	}

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

@@ -48,7 +48,6 @@ import org.springframework.transaction.annotation.Transactional;
 
 /**
  * Service: app_user -- 移动端账号
- *
  * @author qzy
  */
 @Service
@@ -384,15 +383,15 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
                 return AjaxJson.getSuccess("密码找回成功!");
             } else {
 
-                return AjaxJson.getError("两次密码校验不匹配,请重新尝试!");
+				return AjaxJson.getError("两次密码校验不匹配,请重新尝试!");
 
-            }
+			}
 
-        }
+		}
 
-        //验证码匹配错误
-        return AjaxJson.getError("验证码输入错误,请检查!");
-    }
+		//验证码匹配错误
+		return AjaxJson.getError("验证码输入错误,请检查!");
+	}
 
     /**
      * 获取验证码
@@ -489,38 +488,35 @@ public class AppUserService extends ServiceImpl<AppUserMapper, AppUser> implemen
         return update == 1;
     }
 
-    /**
-     * 远程调用: 当从航通导入数据时,自动给边民生成账号
-     */
-    public boolean generatePeopleAccount(PeopleDto peopleDto) throws Exception {
-        //检查是否重复注册
-        List<AppUser> appUsers = appUserMapper.selectList(new LambdaQueryWrapper<AppUser>().eq(AppUser::getPhone, peopleDto.getBorderTel()));
-        if (appUsers.size() != 0)
-            throw new ServiceException("\n该用户已注册! phone = " + peopleDto.getBorderTel() + "\n");
-        //创建保存对象
-        AppUser appUser = new AppUser();
-        //设置基本属性
-        appUser.setAuth(1 + ""); // 默认已认证
-        appUser.setUserType(1); // 用户类型 1
-        appUser.setCreateTime(new Date()); // 创建时间
-        appUser.setPhone(peopleDto.getBorderTel()); // 电话
-        appUser.setStatus("1"); // 可用状态
-        appUser.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode()); // 默认可用
-        appUser.setAuthTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); // 认证时间
-        appUser.setName(peopleDto.getBorderName()); // 昵称
-        appUser.setFkId(peopleDto.getId()); // 外键
-        appUser.setCreateUnit("航通");
-        //随机生成6位数密码
-        int password = (int) (Math.random() * (999999 - 100000 + 1) + 100000);
-        //密码加密
-        String encodePassword = passwordEncoder.encode(password + "");
-        //设置密码
-        appUser.setPassword(encodePassword);
-        //保存
-        int insert = appUserMapper.insert(appUser);
-        //发送短信
-        if (insert == 1) {
-            //todo: 届时放开注释
+	/** 远程调用: 当从航通导入数据时,自动给边民生成账号 */
+	public boolean generatePeopleAccount(PeopleDto peopleDto) throws Exception {
+		//检查是否重复注册
+		List<AppUser> appUsers = appUserMapper.selectList(new LambdaQueryWrapper<AppUser>().eq(AppUser::getPhone, peopleDto.getBorderTel()));
+		if(appUsers.size() != 0)throw new ServiceException("\n该用户已注册! phone = " + peopleDto.getBorderTel() + "\n");
+		//创建保存对象
+		AppUser appUser = new AppUser();
+		//设置基本属性
+		appUser.setAuth(1 + ""); // 默认已认证
+		appUser.setUserType(1); // 用户类型 1
+		appUser.setCreateTime(new Date()); // 创建时间
+		appUser.setPhone(peopleDto.getBorderTel()); // 电话
+		appUser.setStatus("1"); // 可用状态
+		appUser.setDeleteStatus(DeleteStatus.DELETE_STATUS_ON.getCode()); // 默认可用
+		appUser.setAuthTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); // 认证时间
+		appUser.setName(peopleDto.getBorderName()); // 昵称
+		appUser.setFkId(peopleDto.getId()); // 外键
+		appUser.setCreateUnit("航通");
+		//随机生成6位数密码
+		int password = (int) (Math.random() * (999999 - 100000 + 1) + 100000);
+		//密码加密
+		String encodePassword = passwordEncoder.encode(password + "");
+		//设置密码
+		appUser.setPassword(encodePassword);
+		//保存
+		int insert = appUserMapper.insert(appUser);
+		//发送短信
+		if(insert == 1){
+			//todo: 届时放开注释
 //			boolean msg = smsRetryService.sendSmsRegisteMsg(null, "您好,您已成功注册[边民互市]app账号。账号:" + peopleDto.getBorderTel() + ", 初始密码:" + password + "。可前往app进行修改");
 //			return msg;
             System.out.println("注册成功! 账户 = " + peopleDto.getBorderTel() + " password = " + password);