Quellcode durchsuchen

二级市场-新增查询交易凭证、电子协议

linbl vor 11 Monaten
Ursprung
Commit
56b4332fd5
15 geänderte Dateien mit 1071 neuen und 125 gelöschten Zeilen
  1. 4 0
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterface.java
  2. 7 0
      sp-core/sp-api/src/main/java/com/pj/api/client/level_one_server/LevelOneServerInterfaceFallback.java
  3. 5 0
      sp-core/sp-api/src/main/java/com/pj/api/client/payment_server/PaymentServerInterface.java
  4. 9 0
      sp-core/sp-api/src/main/java/com/pj/api/client/payment_server/PaymentServerInterfaceFallback.java
  5. 13 80
      sp-core/sp-api/src/main/java/com/pj/api/dto/BankInfoDto.java
  6. 155 0
      sp-core/sp-api/src/main/java/com/pj/api/dto/PeopleTaxAccountDto.java
  7. 1 1
      sp-service/level-one-server/src/main/java/com/pj/tb_import_order/TbImportOrderMapper.xml
  8. 14 7
      sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountController.java
  9. 1 1
      sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountMapper.xml
  10. 22 0
      sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersController.java
  11. 71 0
      sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersService.java
  12. 443 0
      sp-service/level-two-server/src/main/java/com/pj/tb_orders/vo/TbOrdersEmailVo.java
  13. 296 0
      sp-service/level-two-server/src/main/java/com/pj/tb_orders/vo/TbOrdersPrintVo.java
  14. 15 21
      sp-service/payment-server/src/main/java/com/pj/bank_info/BankInfoController.java
  15. 15 15
      sp-service/payment-server/src/main/java/com/pj/bank_info/BankInfoMapper.xml

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

@@ -74,6 +74,10 @@ public interface LevelOneServerInterface {
     @RequestMapping("/TbPeople/rpc/getRpcById")
     public PeopleDto getRpcById(@RequestParam("id")Long peopleId);
 
+    /** 根据边民ID获取边民开户信息 */
+    @PostMapping("/TbPeopleTaxAccount/rpc/getTaxAccountByPeopleId")
+    public PeopleTaxAccountDto getTaxAccountByPeopleId(@RequestParam("peopleId") Long peopleId);
+
     /** 根据ID获取边民组信息 */
     @RequestMapping("/TbGroup/rpc/getRpcById")
     public GroupDto getRpcById(@RequestParam("id") String id);

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

@@ -111,6 +111,13 @@ public class LevelOneServerInterfaceFallback implements FallbackFactory<LevelOne
             }
 
             @Override
+            public PeopleTaxAccountDto getTaxAccountByPeopleId(Long peopleId) {
+                System.out.println(throwable.getMessage());
+                log.error("根据边民ID获取边民开户信息错误:{},错误信息是:{}",peopleId,throwable.getMessage());
+                return null;
+            }
+
+            @Override
             public GroupDto getRpcById(String id) {
                 System.out.println(throwable.getMessage());
                 log.error("互市区组长错误:{},错误信息是:{}",id,throwable.getMessage());

+ 5 - 0
sp-core/sp-api/src/main/java/com/pj/api/client/payment_server/PaymentServerInterface.java

@@ -6,6 +6,8 @@ import com.pj.api.dto.*;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.List;
+
 @FeignClient(
         name = FeignConsts.PAYMENT_SERVER,                // 服务名称
         configuration = FeignInterceptor.class,        // 请求拦截器
@@ -48,4 +50,7 @@ public interface PaymentServerInterface {
      */
     @PostMapping("/payment/rpc/sendMKT006")
     void sendMKT006(@RequestBody PaymentTwoDto paymentTwoDto);
+
+    @PostMapping("/BankInfo/rpc/getListBySource")
+    public List<BankInfoDto> getListBySource(@RequestParam("source") String source);
 }

+ 9 - 0
sp-core/sp-api/src/main/java/com/pj/api/client/payment_server/PaymentServerInterfaceFallback.java

@@ -7,6 +7,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
 
+import java.util.List;
+
 
 @Component
 public class PaymentServerInterfaceFallback implements FallbackFactory<PaymentServerInterface> {
@@ -51,6 +53,13 @@ public class PaymentServerInterfaceFallback implements FallbackFactory<PaymentSe
                 System.out.println(throwable.getMessage());
                 log.error("调用订单扣款(+手续费)接口【MKT006】错误,当前对象:{},错误信息是:{}",paymentTwoDto,throwable.getMessage());
             }
+
+            @Override
+            public List<BankInfoDto> getListBySource(String source) {
+                System.out.println(throwable.getMessage());
+                log.error("根据订单号查询银行回执信息错误:{},错误信息是:{}",source,throwable.getMessage());
+                return null;
+            }
         };
     }
 }

+ 13 - 80
sp-core/sp-api/src/main/java/com/pj/api/dto/BankInfoDto.java

@@ -1,13 +1,25 @@
 package com.pj.api.dto;
 
-import java.util.Date;
+import lombok.Data;
 
 /**
  * Model: bank_info -- 银行回执信息表
  * @author lbl
  */
+@Data
 public class BankInfoDto {
 
+	private String sn;
+	private String date;
+	private String organization;
+	private String bankCode;
+	private String operation;
+	private String code;
+	private String source;
+	private String result;
+	private String note;
+	private String type;
+
 	private String name;
 	private String papersType;
 	private String papersNo;
@@ -20,83 +32,4 @@ public class BankInfoDto {
 	private String swiftCode;
 	private String abroad;
 
-	public String getName() {
-		return name;
-	}
-
-	public void setName(String name) {
-		this.name = name;
-	}
-
-	public String getPapersType() {
-		return papersType;
-	}
-
-	public void setPapersType(String papersType) {
-		this.papersType = papersType;
-	}
-
-	public String getPapersNo() {
-		return papersNo;
-	}
-
-	public void setPapersNo(String papersNo) {
-		this.papersNo = papersNo;
-	}
-
-	public String getNationality() {
-		return nationality;
-	}
-
-	public void setNationality(String nationality) {
-		this.nationality = nationality;
-	}
-
-	public String getAccount() {
-		return account;
-	}
-
-	public void setAccount(String account) {
-		this.account = account;
-	}
-
-	public String getPayBankCode() {
-		return payBankCode;
-	}
-
-	public void setPayBankCode(String payBankCode) {
-		this.payBankCode = payBankCode;
-	}
-
-	public String getTel() {
-		return tel;
-	}
-
-	public void setTel(String tel) {
-		this.tel = tel;
-	}
-
-	public String getTitle() {
-		return title;
-	}
-
-	public void setTitle(String title) {
-		this.title = title;
-	}
-
-	public String getSwiftCode() {
-		return swiftCode;
-	}
-
-	public void setSwiftCode(String swiftCode) {
-		this.swiftCode = swiftCode;
-	}
-
-	public String getAbroad() {
-		return abroad;
-	}
-
-	public void setAbroad(String abroad) {
-		this.abroad = abroad;
-	}
 }

+ 155 - 0
sp-core/sp-api/src/main/java/com/pj/api/dto/PeopleTaxAccountDto.java

@@ -0,0 +1,155 @@
+package com.pj.api.dto;
+
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Model: tb_people_tax_account -- 边民-税务开户信息
+ * @author lbl
+ */
+@Data
+@Accessors(chain = true)
+public class PeopleTaxAccountDto implements Serializable {
+
+
+	private String id;
+
+	/**
+	 * 边民表ID
+	 */
+	private Long peopleId;
+
+	/**
+	 * 个体户名称
+	 */
+	private String businessName;
+
+	/**
+	 * 社会统一信用代码
+	 */
+	private String dutyParagraph;
+
+	/**
+	 * 经营者(边民)
+	 */
+	private String name;
+
+	/**
+	 * 地址
+	 */
+	private String address;
+
+	/**
+	 * 组成形式
+	 */
+	private String form;
+
+	/**
+	 * 联系人
+	 */
+	private String contacts;
+
+	/**
+	 * 联系电话
+	 */
+	private String phone;
+
+	/**
+	 * 经营场所
+	 */
+	private String businessAddress;
+
+	/**
+	 * 经营范围
+	 */
+	private String businessScope;
+
+	/**
+	 * 经营状态
+	 */
+	private String businessStatus;
+
+	/**
+	 * 身份证
+	 */
+	private String idCard;
+
+	/**
+	 * 开户行
+	 */
+	private String bankName;
+
+	/**
+	 * 银行账号
+	 */
+	private String bankCode;
+
+	/**
+	 * 开票商
+	 */
+	private String invoiceBusiness;
+
+	/**
+	 * 开票人
+	 */
+	private String invoicePeople;
+
+	/**
+	 * 收款人
+	 */
+	private String payee;
+
+	/**
+	 * 复核人
+	 */
+	private String checker;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 创建人编号
+	 */
+	private String createBy;
+
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+	/**
+	 * 更新人编号
+	 */
+	private String updateBy;
+
+	/**
+	 * 更新人名称
+	 */
+	private String updateName;
+
+	/**
+	 * 互市区id
+	 */
+	private Long tradeAreaId;
+
+	/**
+	 * 互市区名称
+	 */
+	private String tradeAreaName;
+
+
+
+
+
+
+}

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

@@ -41,7 +41,7 @@
 			<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
 			<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
 		</where>
-		order by create_time desc
+		order by create_time desc,id desc
 	</select>
 
 </mapper>

+ 14 - 7
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountController.java

@@ -1,9 +1,10 @@
 package com.pj.tb_people_tax_account;
 
 import java.util.List;
+import com.pj.api.dto.PeopleTaxAccountDto;
 import com.pj.utils.so.SoMap;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.*;
 
 import com.pj.utils.sg.*;
@@ -78,11 +79,17 @@ public class TbPeopleTaxAccountController {
 	}
 
 
-
-
-
-
-
-
+	/**
+	 * 根据ID获取边民信息
+	 */
+	@PostMapping("rpc/getTaxAccountByPeopleId")
+	public PeopleTaxAccountDto getTaxAccountByPeopleId(@RequestParam("peopleId") Long peopleId) {
+		PeopleTaxAccountDto dto = new PeopleTaxAccountDto();
+		SoMap so = new SoMap();
+		so.put("peopleId",peopleId);
+		List<TbPeopleTaxAccount> list = tbPeopleTaxAccountService.getList(so);
+		if(list.size()>0) BeanUtils.copyProperties(list.get(0), dto);
+		return dto;
+	}
 
 }

+ 1 - 1
sp-service/level-one-server/src/main/java/com/pj/tb_people_tax_account/TbPeopleTaxAccountMapper.xml

@@ -77,7 +77,7 @@
 			<when test='sortType == 23'> update_time desc </when>
 			<when test='sortType == 24'> update_by desc </when>
 			<when test='sortType == 25'> update_name desc </when>
-			<otherwise> id desc </otherwise>
+			<otherwise> create_time desc </otherwise>
 		</choose>
 	</select>
 

+ 22 - 0
sp-service/level-two-server/src/main/java/com/pj/tb_orders/TbOrdersController.java

@@ -13,6 +13,8 @@ import com.pj.current.satoken.StpAPPUserUtil;
 import com.pj.current.satoken.StpUserUtil;
 import com.pj.enummj.DeleteStatus;
 import com.pj.enummj.OrderStatus;
+import com.pj.tb_orders.vo.TbOrdersEmailVo;
+import com.pj.tb_orders.vo.TbOrdersPrintVo;
 import com.pj.utils.so.SoMap;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -191,4 +193,24 @@ public class TbOrdersController {
         tbOrdersService.deduction(id);
         return AjaxJson.getSuccess();
     }
+
+    /**
+     * 查 - 交易凭证
+     */
+    @RequestMapping("getSubPrint")
+    @SaCheckPermission(TbOrders.PERMISSION_CODE)
+    public AjaxJson getSubPrint(Long id) {
+        TbOrdersPrintVo t = tbOrdersService.getSubPrint(id);
+        return AjaxJson.getSuccessData(t);
+    }
+
+    /**
+     * 查 - 电子协议
+     */
+    @RequestMapping("getSubEmail")
+    @SaCheckPermission(TbOrders.PERMISSION_CODE)
+    public AjaxJson getSubEmail(Long id) {
+        TbOrdersEmailVo t = tbOrdersService.getSubEmail(id);
+        return AjaxJson.getSuccessData(t);
+    }
 }

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

@@ -37,6 +37,8 @@ import com.pj.tb_item_rules.TbItemRulesService;
 import com.pj.tb_orders.vo.OrderFeeItemVO;
 import com.pj.tb_item_rules.TbItemRulesVo;
 import com.pj.tb_orders.vo.OrderStaticsDTO;
+import com.pj.tb_orders.vo.TbOrdersEmailVo;
+import com.pj.tb_orders.vo.TbOrdersPrintVo;
 import com.pj.tb_orders_cart.TbOrdersCart;
 import com.pj.tb_orders_cart.TbOrdersCartMapper;
 import com.pj.tb_purchaser.TbPurchaser;
@@ -685,4 +687,73 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
 
         return super.updateById(tbOrders);
     }
+
+    /**
+     * 查 - 交易凭证
+     */
+    public TbOrdersPrintVo getSubPrint(Long id) {
+        TbOrdersPrintVo vo = new TbOrdersPrintVo();
+
+        TbOrders tbOrders = super.getById(id);
+        BeanUtils.copyProperties(tbOrders, vo);
+
+        List<BankInfoDto> bankInfoList = paymentServerInterface.getListBySource(tbOrders.getOrderNo());
+        if(bankInfoList.size()>0) vo.setResult(bankInfoList.get(0).getResult());
+
+        PeopleDto people = levelOneServerInterface.getRpcById(tbOrders.getLeaderId());
+        if(people != null) {
+            vo.setIdCard(people.getIdCard());
+            vo.setGroupName(people.getGroupName());
+        }
+
+        return vo;
+    }
+
+    /**
+     * 查 - 电子协议
+     */
+    public TbOrdersEmailVo getSubEmail(Long id) {
+        TbOrdersEmailVo vo = new TbOrdersEmailVo();
+
+        TbOrders tbOrders = super.getById(id);
+        BeanUtils.copyProperties(tbOrders, vo);
+
+        OrderDto orderOne = levelOneServerInterface.getOrderDtoById(tbOrders.getLevelOneOrderId());
+        if(orderOne != null) {
+            vo.setSettleBillNo(orderOne.getSettleBillNo());
+        }
+
+        List<BankInfoDto> bankInfoList = paymentServerInterface.getListBySource(tbOrders.getOrderNo());
+        if(bankInfoList.size()>0) {
+            vo.setResult(bankInfoList.get(0).getResult());
+        }
+
+        PeopleDto people = levelOneServerInterface.getRpcById(tbOrders.getLeaderId());
+        if(people != null) {
+            vo.setIdCard(people.getIdCard());
+            vo.setGroupName(people.getGroupName());
+        }
+
+        PeopleTaxAccountDto peopleTaxAccount = levelOneServerInterface.getTaxAccountByPeopleId(tbOrders.getLeaderId());
+        if(peopleTaxAccount != null) {
+            vo.setBusinessName(peopleTaxAccount.getBusinessName());
+            vo.setContacts(peopleTaxAccount.getContacts());
+            vo.setPhone(peopleTaxAccount.getPhone());
+            vo.setPeopleBankName(peopleTaxAccount.getBankName());
+            vo.setPeopleBankCode(peopleTaxAccount.getBankCode());
+            vo.setPeopleDutyParagraph(peopleTaxAccount.getDutyParagraph());
+        }
+
+        TbPurchaser purchaser = tbPurchaserMapper.selectById(tbOrders.getPurchaserId());
+        if(purchaser != null) {
+            vo.setPurchaserBusinessName(purchaser.getBusinessName());
+            vo.setLegalPerson(purchaser.getLegalPerson());
+            vo.setPurchaserContact(purchaser.getContact());
+            vo.setPurchaserBankName(purchaser.getBankName());
+            vo.setPurchaserBankAccount(purchaser.getBankAccount());
+            vo.setPurchaserDutyParagraph(purchaser.getDutyParagraph());
+        }
+
+        return vo;
+    }
 }

+ 443 - 0
sp-service/level-two-server/src/main/java/com/pj/tb_orders/vo/TbOrdersEmailVo.java

@@ -0,0 +1,443 @@
+package com.pj.tb_orders.vo;
+
+import com.pj.common.core.annotation.Excel;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+@Data
+@Accessors(chain = true)
+public class TbOrdersEmailVo implements Serializable {
+
+	private Long id;
+
+	/**
+	 * 一级市场订单ID
+	 */
+	private Long levelOneOrderId;
+
+	/**
+	 * 订单编号
+	 */
+	private String orderNo;
+
+	/**
+	 * 商品id
+	 */
+	private Long goodsId;
+
+	/**
+	 * 商品名称
+	 */
+	private String goodsName;
+
+	/**
+	 * 商品来源(国家)
+	 */
+	private String goodsFrom;
+
+	/**
+	 * 发货商电话
+	 */
+	private String shipperPhone;
+
+	/**
+	 * 发货商名称
+	 */
+	private String shipperName;
+
+	/**
+	 * 司机ID
+	 */
+	private Long driverId;
+
+	/**
+	 * 司机名称
+	 */
+	private String driverName;
+
+	/**
+	 * 司机电话
+	 */
+	private String driverPhone;
+
+	/**
+	 * 车型ID
+	 */
+	private Long carId;
+
+	/**
+	 * 车牌号
+	 */
+	private String veNo;
+
+	/**
+	 * 收货人名称
+	 */
+	private String consigneeName;
+
+	/**
+	 * 收货人电话号码
+	 */
+	private String consigneePhone;
+
+	/**
+	 * (预留字段) 申报订单号
+	 */
+	private String declarationNumber;
+
+	/**
+	 * 订单完成状态 (0=未完成,1=已完成)
+	 */
+	private Integer orderFinish;
+
+	/**
+	 * 装货地址
+	 */
+	private String loadingAddress;
+
+	/**
+	 * 卸货地址
+	 */
+	private String unloadingAddress;
+
+	/**
+	 * 备注
+	 */
+	private String comment;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+
+	/**
+	 * 更新人编号
+	 */
+	private Long updateBy;
+	/**
+	 * 更新人名称
+	 */
+	private String updateName;
+
+	/**
+	 * 删除状态(0=禁用,1=启用)
+	 */
+	private Integer deleteStatus;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 创建人编号
+	 */
+	private Long createBy;
+
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+
+	/**
+	 * 贸易区域id
+	 */
+	private Long tradeAreaId;
+
+	/**
+	 * 贸易区域名称
+	 */
+	private String tradeAreaName;
+
+	/**
+	 * 买家ID
+	 */
+	private Long purchaserId;
+
+	/**
+	 * 买家名称
+	 */
+	private String purchaserName;
+
+	/**
+	 * 边民Id
+	 */
+	private Long leaderId;
+	/**
+	 * 边民姓名
+	 */
+	private String leaderName;
+	/**
+	 * 边民手机号
+	 */
+	private String leaderPhone;
+
+	/**
+	 * 二级收购商需求发布表的主键id
+	 */
+	private Long fkGoodsDemandId;
+
+	/**
+	 * 是否收货[0=未收货,1=已收货]
+	 */
+	private Integer isDelivery;
+
+	/**
+	 * 转售金额
+	 */
+	private Double resalePrice;
+
+	/**
+	 * 是否支付(0=未支付,1=支付成功,2=支付失败,3=支付中)
+	 */
+	private Integer isPay;
+
+	/**
+	 * 支付/回执时间
+	 */
+	private Date payTime;
+
+	/**
+	 * 是否缴税缴费(0=未缴费,1=缴费成功,2=缴费失败,3=缴费中)
+	 */
+	private Integer payTax;
+
+	/**
+	 * 缴税缴费/回执时间
+	 */
+	private Date payTaxTime;
+
+	private String bankName;
+	private String bankAccount;
+	private String goodsUnit;
+	private String netWet;
+	private String totalWeight;
+	private String singlePrice;
+
+	/**
+	 * (二级市场)采购商补扣款次数
+	 */
+	private Integer deductionCount;
+	/**
+	 * (二级市场)采购商最近一次补扣款时间
+	 */
+	private Date deductionTime;
+
+	/**
+	 * 申报数量
+	 */
+	private Double buyQty;
+
+	/**
+	 * 第一数量
+	 */
+	private Double buyQty1;
+
+	/**
+	 * 第二数量
+	 */
+	private Double buyQty2;
+
+
+	/**----------- 银行回执字段 begin----------**/
+	/**
+	 * 报文编号
+	 */
+	private String sn;
+	/**
+	 * 报文发送时间
+	 */
+	private String date;
+	/**
+	 * 互市点机构代码
+	 */
+	private String organization;
+	/**
+	 * 银行标识
+	 */
+	private String bankCode;
+	/**
+	 * 报文业务类型
+	 */
+	private String operation;
+	/**
+	 * 消息回执代码:200/202/401/402/403/404/405
+	 */
+	private String code;
+	/**
+	 * 订单号
+	 */
+	private String source;
+	/**
+	 * 扣款成功的流水单号
+	 */
+	private String result;
+	/**
+	 * 回执内容
+	 */
+	private String note;
+	/**
+	 * 订单回执类型	001:扣款订单    002:退款订单    003:打款订单(根据字典表ORDER_TYPE)
+	 */
+	private String type;
+	/**----------- 银行回执字段 end----------**/
+
+
+
+
+	/**----------- 边民表字段 begin----------**/
+	private String idCard;
+	private String groupName;
+	/**----------- 边民表字段 end----------**/
+
+
+
+
+	/**----------- 一级市场订单表字段 begin----------**/
+	/**
+	 * 结算单号
+	 */
+	private String settleBillNo;
+	/**----------- 一级市场订单表字段 end----------**/
+
+
+
+
+	/**----------- 边民-税务开户信息字段 begin----------**/
+	/**
+	 * 个体户名称
+	 */
+	private String businessName;
+
+	/**
+	 * 社会统一信用代码
+	 */
+	private String peopleDutyParagraph;
+
+	/**
+	 * 经营者(边民)
+	 */
+	private String name;
+
+	/**
+	 * 地址
+	 */
+	private String address;
+
+	/**
+	 * 组成形式
+	 */
+	private String form;
+
+	/**
+	 * 联系人
+	 */
+	private String contacts;
+
+	/**
+	 * 联系电话
+	 */
+	private String phone;
+
+	/**
+	 * 经营场所
+	 */
+	private String businessAddress;
+
+	/**
+	 * 经营范围
+	 */
+	private String businessScope;
+
+	/**
+	 * 经营状态
+	 */
+	private String businessStatus;
+
+	/**
+	 * 开户行
+	 */
+	private String peopleBankName;
+
+	/**
+	 * 银行账号
+	 */
+	private String peopleBankCode;
+
+	/**
+	 * 开票商
+	 */
+	private String invoiceBusiness;
+
+	/**
+	 * 开票人
+	 */
+	private String invoicePeople;
+
+	/**
+	 * 收款人
+	 */
+	private String payee;
+
+	/**
+	 * 复核人
+	 */
+	private String checker;
+	/**----------- 边民-税务开户信息字段 begin----------**/
+
+
+
+	/**----------- 收购商-税务开户信息字段 begin----------**/
+	/**
+	 * 姓名
+	 */
+	//private String name;
+
+	/**
+	 * 法人
+	 */
+	private String legalPerson;
+	/**
+	 * 身份证号
+	 */
+	private String purchaserIdCard;
+	/**
+	 * 手机号码
+	 */
+	private String purchaserContact;
+	/**
+	 * 营业执照
+	 */
+	private String businessLicense;
+	/**
+	 * 银行编号
+	 */
+	private String purchaserBankNo;
+	/**
+	 * 银行名称
+	 */
+	private String purchaserBankName;
+	/**
+	 * 银行账号
+	 */
+	private String purchaserBankAccount;
+	/**
+	 * 统一社会信用代码
+	 */
+	private String purchaserDutyParagraph;
+	/**
+	 * 企业名称
+	 */
+	private String purchaserBusinessName;
+	/**
+	 * 邮箱
+	 */
+	private String email;
+	/**----------- 收购商-税务开户信息字段 begin----------**/
+
+}

+ 296 - 0
sp-service/level-two-server/src/main/java/com/pj/tb_orders/vo/TbOrdersPrintVo.java

@@ -0,0 +1,296 @@
+package com.pj.tb_orders.vo;
+
+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 lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+@Data
+@Accessors(chain = true)
+public class TbOrdersPrintVo implements Serializable {
+
+	private Long id;
+
+	/**
+	 * 一级市场订单ID
+	 */
+	private Long levelOneOrderId;
+
+	/**
+	 * 订单编号
+	 */
+	private String orderNo;
+
+	/**
+	 * 商品id
+	 */
+	private Long goodsId;
+
+	/**
+	 * 商品名称
+	 */
+	private String goodsName;
+
+	/**
+	 * 商品来源(国家)
+	 */
+	private String goodsFrom;
+
+	/**
+	 * 发货商电话
+	 */
+	private String shipperPhone;
+
+	/**
+	 * 发货商名称
+	 */
+	private String shipperName;
+
+	/**
+	 * 司机ID
+	 */
+	private Long driverId;
+
+	/**
+	 * 司机名称
+	 */
+	private String driverName;
+
+	/**
+	 * 司机电话
+	 */
+	private String driverPhone;
+
+	/**
+	 * 车型ID
+	 */
+	private Long carId;
+
+	/**
+	 * 车牌号
+	 */
+	private String veNo;
+
+	/**
+	 * 收货人名称
+	 */
+	private String consigneeName;
+
+	/**
+	 * 收货人电话号码
+	 */
+	private String consigneePhone;
+
+	/**
+	 * (预留字段) 申报订单号
+	 */
+	private String declarationNumber;
+
+	/**
+	 * 订单完成状态 (0=未完成,1=已完成)
+	 */
+	private Integer orderFinish;
+
+	/**
+	 * 装货地址
+	 */
+	private String loadingAddress;
+
+	/**
+	 * 卸货地址
+	 */
+	private String unloadingAddress;
+
+	/**
+	 * 备注
+	 */
+	private String comment;
+
+	/**
+	 * 更新时间
+	 */
+	private Date updateTime;
+
+
+	/**
+	 * 更新人编号
+	 */
+	private Long updateBy;
+	/**
+	 * 更新人名称
+	 */
+	private String updateName;
+
+	/**
+	 * 删除状态(0=禁用,1=启用)
+	 */
+	private Integer deleteStatus;
+
+	/**
+	 * 创建时间
+	 */
+	private Date createTime;
+
+	/**
+	 * 创建人编号
+	 */
+	private Long createBy;
+
+	/**
+	 * 创建人名称
+	 */
+	private String createName;
+
+	/**
+	 * 贸易区域id
+	 */
+	private Long tradeAreaId;
+
+	/**
+	 * 贸易区域名称
+	 */
+	private String tradeAreaName;
+
+	/**
+	 * 买家ID
+	 */
+	private Long purchaserId;
+
+	/**
+	 * 买家名称
+	 */
+	private String purchaserName;
+
+	/**
+	 * 边民Id
+	 */
+	private Long leaderId;
+	/**
+	 * 边民姓名
+	 */
+	private String leaderName;
+	/**
+	 * 边民手机号
+	 */
+	private String leaderPhone;
+
+	/**
+	 * 二级收购商需求发布表的主键id
+	 */
+	private Long fkGoodsDemandId;
+
+	/**
+	 * 是否收货[0=未收货,1=已收货]
+	 */
+	private Integer isDelivery;
+
+	/**
+	 * 转售金额
+	 */
+	private Double resalePrice;
+
+	/**
+	 * 是否支付(0=未支付,1=支付成功,2=支付失败,3=支付中)
+	 */
+	private Integer isPay;
+
+	/**
+	 * 支付/回执时间
+	 */
+	private Date payTime;
+
+	/**
+	 * 是否缴税缴费(0=未缴费,1=缴费成功,2=缴费失败,3=缴费中)
+	 */
+	private Integer payTax;
+
+	/**
+	 * 缴税缴费/回执时间
+	 */
+	private Date payTaxTime;
+
+	private String bankName;
+	private String bankAccount;
+	private String goodsUnit;
+	private String netWet;
+	private String totalWeight;
+	private String singlePrice;
+
+	/**
+	 * (二级市场)采购商补扣款次数
+	 */
+	private Integer deductionCount;
+	/**
+	 * (二级市场)采购商最近一次补扣款时间
+	 */
+	private Date deductionTime;
+
+	/**
+	 * 申报数量
+	 */
+	private Double buyQty;
+
+	/**
+	 * 第一数量
+	 */
+	private Double buyQty1;
+
+	/**
+	 * 第二数量
+	 */
+	private Double buyQty2;
+
+
+	/**----------- 银行回执字段 ----------**/
+	/**
+	 * 报文编号
+	 */
+	private String sn;
+	/**
+	 * 报文发送时间
+	 */
+	private String date;
+	/**
+	 * 互市点机构代码
+	 */
+	private String organization;
+	/**
+	 * 银行标识
+	 */
+	private String bankCode;
+	/**
+	 * 报文业务类型
+	 */
+	private String operation;
+	/**
+	 * 消息回执代码:200/202/401/402/403/404/405
+	 */
+	private String code;
+	/**
+	 * 订单号
+	 */
+	private String source;
+	/**
+	 * 扣款成功的流水单号
+	 */
+	private String result;
+	/**
+	 * 回执内容
+	 */
+	private String note;
+	/**
+	 * 订单回执类型	001:扣款订单    002:退款订单    003:打款订单(根据字典表ORDER_TYPE)
+	 */
+	private String type;
+
+
+	private String idCard;
+	private String groupName;
+}

+ 15 - 21
sp-service/payment-server/src/main/java/com/pj/bank_info/BankInfoController.java

@@ -1,23 +1,19 @@
 package com.pj.bank_info;
 
+import java.util.ArrayList;
 import java.util.List;
 
-import cn.hutool.crypto.digest.HMac;
-import cn.hutool.crypto.digest.HmacAlgorithm;
-import cn.hutool.log.StaticLog;
-import com.pj.rabbitmq.MessageSender;
+import com.pj.api.dto.BankInfoDto;
 import com.pj.utils.so.SoMap;
+import org.springframework.beans.BeanUtils;
 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;
 
-import javax.annotation.Resource;
 
 
 /**
@@ -83,20 +79,18 @@ public class BankInfoController {
 		return AjaxJson.getPageData(so.getDataCount(), list);
 	}
 
-
-	@Resource
-	private MessageSender messageSender;
-	@PostMapping("test")
-	public String test(@RequestBody String str){
-		StaticLog.info("info:{}",str);
-		messageSender.sendToLevelOneMQ(str);
-		byte[] key = "90003".getBytes();
-		HMac mac = new HMac(HmacAlgorithm.HmacSHA256, key);
-		System.out.println(mac.digestBase64("sw10002",false));
-		return "hello";
+	@PostMapping("rpc/getListBySource")
+	public List<BankInfoDto> getListBySource(@RequestParam("source") String source) {
+		SoMap so = new SoMap();
+		so.put("source", source);
+		List<BankInfo> list = bankInfoService.getList(so);
+		List<BankInfoDto> dtoList = new ArrayList<>();
+		list.forEach(item -> {
+			BankInfoDto dto = new BankInfoDto();
+			BeanUtils.copyProperties(item, dto);
+			dtoList.add(dto);
+		});
+		return dtoList;
 	}
 
-
-
-
 }

+ 15 - 15
sp-service/payment-server/src/main/java/com/pj/bank_info/BankInfoMapper.xml

@@ -7,17 +7,17 @@
 
 	<!-- ================================== 查询相关 ================================== -->
 	<!-- select id, sn, date, organization, bankCode, operation, code, source, result, note, create_time from bank_info  -->
-	
+
 	<!-- 通用映射:自动模式 -->
 	<resultMap id="model" autoMapping="true" type="com.pj.bank_info.BankInfo"></resultMap>
-	
+
 	<!-- 公共查询sql片段 -->
 	<sql id="select_sql">
-		select * 
-		from bank_info 
+		select *
+		from bank_info
 	</sql>
 
-	
+
 	<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
 	<select id="getList" resultMap="model">
 		<include refid="select_sql"></include>
@@ -47,17 +47,17 @@
 			<when test='sortType == 9'> result desc </when>
 			<when test='sortType == 10'> note desc </when>
 			<when test='sortType == 11'> create_time desc </when>
-			<otherwise> id desc </otherwise>
+			<otherwise> create_time desc </otherwise>
 		</choose>
 	</select>
-	
-	
-	
-	
-	
-	
-	
-	
-	
+
+
+
+
+
+
+
+
+
 
 </mapper>