Browse Source

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

qzy 2 weeks ago
parent
commit
79804c32d4

+ 11 - 439
sp-core/sp-api/src/main/java/com/pj/api/dto/PaymentDto.java

@@ -1,6 +1,8 @@
 package com.pj.api.dto;
 
 
+import lombok.Data;
+
 import java.io.Serializable;
 import java.math.BigDecimal;
 
@@ -8,8 +10,16 @@ import java.math.BigDecimal;
  * 银行报文数据(一级市场)
  * @author lbl
  */
+@Data
 public class PaymentDto implements Serializable {
-
+	/**
+	 * 通道代码
+	 */
+	private String channelNo;
+	/**
+	 * 申报编号
+	 */
+	private String trans;
 
 	private Long id;
 
@@ -222,443 +232,5 @@ public class PaymentDto implements Serializable {
 
 	private String tradeNos;
 
-	public String getTradeNos() {
-		return tradeNos;
-	}
-
-	public void setTradeNos(String tradeNos) {
-		this.tradeNos = tradeNos;
-	}
-
-	public String getOwnerName() {
-		return ownerName;
-	}
-
-	public void setOwnerName(String ownerName) {
-		this.ownerName = ownerName;
-	}
-
-	public String getOwnerIdtype() {
-		return ownerIdtype;
-	}
-
-	public void setOwnerIdtype(String ownerIdtype) {
-		this.ownerIdtype = ownerIdtype;
-	}
-
-	public String getBankAccount() {
-		return bankAccount;
-	}
-
-	public void setBankAccount(String bankAccount) {
-		this.bankAccount = bankAccount;
-	}
-
-	public String getBank() {
-		return bank;
-	}
-
-	public void setBank(String bank) {
-		this.bank = bank;
-	}
-
-	public String getOwnerTel() {
-		return ownerTel;
-	}
-
-	public void setOwnerTel(String ownerTel) {
-		this.ownerTel = ownerTel;
-	}
-
-	public String getCodeTs() {
-		return codeTs;
-	}
-
-	public void setCodeTs(String codeTs) {
-		this.codeTs = codeTs;
-	}
-
-	public String getGoodsName() {
-		return goodsName;
-	}
-
-	public void setGoodsName(String goodsName) {
-		this.goodsName = goodsName;
-	}
-
-	public String getGoodsUnit() {
-		return goodsUnit;
-	}
-
-	public void setGoodsUnit(String goodsUnit) {
-		this.goodsUnit = goodsUnit;
-	}
-
-	public Double getDeclPrice() {
-		return declPrice;
-	}
-
-	public void setDeclPrice(Double declPrice) {
-		this.declPrice = declPrice;
-	}
-
-	public Double getBuyQty() {
-		return buyQty;
-	}
-
-	public void setBuyQty(Double buyQty) {
-		this.buyQty = buyQty;
-	}
-
-	public Double getGrossWt() {
-		return grossWt;
-	}
-
-	public void setGrossWt(Double grossWt) {
-		this.grossWt = grossWt;
-	}
-
-	public Double getNetWt() {
-		return netWt;
-	}
-
-	public void setNetWt(Double netWt) {
-		this.netWt = netWt;
-	}
-
-	public String getBorderName() {
-		return borderName;
-	}
-
-	public void setBorderName(String borderName) {
-		this.borderName = borderName;
-	}
-
-	public String getBorderidno() {
-		return borderidno;
-	}
-
-	public void setBorderidno(String borderidno) {
-		this.borderidno = borderidno;
-	}
-
-	public String getPapersType() {
-		return papersType;
-	}
-
-	public void setPapersType(String papersType) {
-		this.papersType = papersType;
-	}
-
-	public String getBorderNationality() {
-		return borderNationality;
-	}
-
-	public void setBorderNationality(String borderNationality) {
-		this.borderNationality = borderNationality;
-	}
-
-	public String getBankCode() {
-		return bankCode;
-	}
-
-	public void setBankCode(String bankCode) {
-		this.bankCode = bankCode;
-	}
-
-	public String getBankName() {
-		return bankName;
-	}
-
-	public void setBankName(String bankName) {
-		this.bankName = bankName;
-	}
-
-	public String getBankNo() {
-		return bankNo;
-	}
-
-	public void setBankNo(String bankNo) {
-		this.bankNo = bankNo;
-	}
-
-	public String getBorderTel() {
-		return borderTel;
-	}
-
-	public void setBorderTel(String borderTel) {
-		this.borderTel = borderTel;
-	}
-
-	public BigDecimal getResalePrice() {
-		return resalePrice;
-	}
-
-	public void setResalePrice(BigDecimal resalePrice) {
-		this.resalePrice = resalePrice;
-	}
-
-	public String getTradeNo() {
-		return tradeNo;
-	}
-
-	public void setTradeNo(String tradeNo) {
-		this.tradeNo = tradeNo;
-	}
-
-	public Long getId() {
-		return id;
-	}
-
-	public void setId(Long id) {
-		this.id = id;
-	}
-
-	public String getPlatSeqNo() {
-		return platSeqNo;
-	}
-
-	public void setPlatSeqNo(String platSeqNo) {
-		this.platSeqNo = platSeqNo;
-	}
-
-	public String getDeclareId() {
-		return declareId;
-	}
-
-	public void setDeclareId(String declareId) {
-		this.declareId = declareId;
-	}
-
-	public String getDeclareType() {
-		return declareType;
-	}
-
-	public void setDeclareType(String declareType) {
-		this.declareType = declareType;
-	}
-
-	public String getDeclareName() {
-		return declareName;
-	}
-
-	public void setDeclareName(String declareName) {
-		this.declareName = declareName;
-	}
-
-	public String getIdno() {
-		return idno;
-	}
-
-	public void setIdno(String idno) {
-		this.idno = idno;
-	}
-
-	public String getShopNo() {
-		return shopNo;
-	}
-
-	public void setShopNo(String shopNo) {
-		this.shopNo = shopNo;
-	}
-
-	public String getShopName() {
-		return shopName;
-	}
-
-	public void setShopName(String shopName) {
-		this.shopName = shopName;
-	}
-
-	public String getOrgPutrecNo() {
-		return orgPutrecNo;
-	}
-
-	public void setOrgPutrecNo(String orgPutrecNo) {
-		this.orgPutrecNo = orgPutrecNo;
-	}
-
-	public String getOrgName() {
-		return orgName;
-	}
-
-	public void setOrgName(String orgName) {
-		this.orgName = orgName;
-	}
-
-	public String getOrgScc() {
-		return orgScc;
-	}
-
-	public void setOrgScc(String orgScc) {
-		this.orgScc = orgScc;
-	}
-
-	public String getVeNo() {
-		return veNo;
-	}
-
-	public void setVeNo(String veNo) {
-		this.veNo = veNo;
-	}
-
-	public String getBtrnbBizModecd() {
-		return btrnbBizModecd;
-	}
-
-	public void setBtrnbBizModecd(String btrnbBizModecd) {
-		this.btrnbBizModecd = btrnbBizModecd;
-	}
-
-	public String getgFlow() {
-		return gFlow;
-	}
-
-	public void setgFlow(String gFlow) {
-		this.gFlow = gFlow;
-	}
-
-	public String getiEFlag() {
-		return iEFlag;
-	}
-
-	public void setiEFlag(String iEFlag) {
-		this.iEFlag = iEFlag;
-	}
-
-	public String getFieldCode() {
-		return fieldCode;
-	}
-
-	public void setFieldCode(String fieldCode) {
-		this.fieldCode = fieldCode;
-	}
-
-	public String getFieldName() {
-		return fieldName;
-	}
-
-	public void setFieldName(String fieldName) {
-		this.fieldName = fieldName;
-	}
-
-	public String getCustomsCode() {
-		return customsCode;
-	}
-
-	public void setCustomsCode(String customsCode) {
-		this.customsCode = customsCode;
-	}
-
-	public String getCarPool() {
-		return carPool;
-	}
-
-	public void setCarPool(String carPool) {
-		this.carPool = carPool;
-	}
-
-	public Double getSumAmt() {
-		return sumAmt;
-	}
-
-	public void setSumAmt(Double sumAmt) {
-		this.sumAmt = sumAmt;
-	}
-
-	public Double getSumGrossWt() {
-		return sumGrossWt;
-	}
-
-	public void setSumGrossWt(Double sumGrossWt) {
-		this.sumGrossWt = sumGrossWt;
-	}
-
-	public Double getSumNetWt() {
-		return sumNetWt;
-	}
-
-	public void setSumNetWt(Double sumNetWt) {
-		this.sumNetWt = sumNetWt;
-	}
-
-	public String getTrafMode() {
-		return trafMode;
-	}
-
-	public void setTrafMode(String trafMode) {
-		this.trafMode = trafMode;
-	}
-
-	public String getCurrCode() {
-		return currCode;
-	}
-
-	public void setCurrCode(String currCode) {
-		this.currCode = currCode;
-	}
-
-	public Long getPackNo() {
-		return packNo;
-	}
-
-	public void setPackNo(Long packNo) {
-		this.packNo = packNo;
-	}
-
-	public String getDeclTime() {
-		return declTime;
-	}
-
-	public void setDeclTime(String declTime) {
-		this.declTime = declTime;
-	}
-
-	public String getBillNo() {
-		return billNo;
-	}
-
-	public void setBillNo(String billNo) {
-		this.billNo = billNo;
-	}
-
-	public String getVoyageNo() {
-		return voyageNo;
-	}
-
-	public void setVoyageNo(String voyageNo) {
-		this.voyageNo = voyageNo;
-	}
-
-	public String getGoodsNames() {
-		return goodsNames;
-	}
-
-	public void setGoodsNames(String goodsNames) {
-		this.goodsNames = goodsNames;
-	}
-
-	public BigDecimal getTotalPrice() {
-		return totalPrice;
-	}
-
-	public void setTotalPrice(BigDecimal totalPrice) {
-		this.totalPrice = totalPrice;
-	}
-
-	public String getShopSccd() {
-		return shopSccd;
-	}
-
-	public void setShopSccd(String shopSccd) {
-		this.shopSccd = shopSccd;
-	}
-
-	public String getNationality() {
-		return nationality;
-	}
 
-	public void setNationality(String nationality) {
-		this.nationality = nationality;
-	}
 }

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

@@ -1018,6 +1018,9 @@ public class TbOrderService extends ServiceImpl<TbOrderMapper, TbOrder> implemen
                 //todo: 收到航通007报文即收到海关结关信息,转发结关信息给到银行
                 paymentDto.setTradeNo(tbOrder.getTradeNo());
                 paymentDto.setDeclTime(htPassCardDTO.getCheckTime());
+                paymentDto.setFieldCode(htPassCardDTO.getAreaNo());
+                paymentDto.setChannelNo(htPassCardDTO.getChannelNo());
+                paymentDto.setTrans(tbOrder.getPlatSeqNo());
                 StaticLog.info("\nsendCXB001——PaymentDto——:{}", JSONUtil.toJsonStr(paymentDto));
                 paymentServerInterface.sendCXB001(paymentDto);
             }

+ 5 - 3
sp-service/payment-server/src/main/java/com/pj/xml/MessageXML.java

@@ -22,14 +22,16 @@ public class MessageXML {
      * 结关报文:海关数据中心--->银行
      */
     public static String CXB001(PaymentDto paymentDto) {
-        paymentDto.setFieldCode("861501");
         String date = sdf.format(new Date());
         String payload =
                 "<payload xsi:type=\"responseDTO\">\n" +
                         "<code>200</code>\n" +                                 //回执代码
                         "<source>" + paymentDto.getTradeNo() + "</source>\n" + //订单编号
                         "<note>结关成功</note>\n" +                             //回执内容
-                        "<date>" + paymentDto.getDeclTime() + "</date>\n" +    //结关时间	YYYY-MM—DD HH:MM:DD SSS
+                        "<date>" + paymentDto.getDeclTime() + "</date>\n" +    //结关时间(过卡时间)	YYYY-MM—DD HH:MM:DD SSS
+                        "<trans>" + paymentDto.getTrans() + "</trans>\n" +       //申报编号
+                        "<station>" + paymentDto.getFieldCode() + "</station>\n" +   //监管场所代码
+                        "<channel>" + paymentDto.getChannelNo() + "</channel>\n" +   //卡口通道号
                 "</payload>";
         String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
                 "<message title=\"一级市场\" xsi:schemaLocation=\"\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n" +
@@ -44,7 +46,7 @@ public class MessageXML {
                 "       </item>\n" +
                 "        <item>\n" +
                 "               <key>organization</key>\n" +
-                "              <value>" + paymentDto.getFieldCode() + "</value>\n" +//互市点机构代码
+                "              <value>861501</value>\n" +//互市点机构代码
                 "       </item>\n" +
                 "        <item>\n" +
                 "            <key>bankCode</key>\n" +