Commit 08c1cc7133290dae3c7a4846d941126499fe893c

Authored by fengliang
1 parent f746a23b

update:交易单增加额外单据流向信息

etrade-order/src/main/java/com/diligrp/etrade/order/domain/collector/co/BusinessBillCo.java
... ... @@ -97,6 +97,15 @@ public class BusinessBillCo {
97 97 */
98 98 private String F_PZCW_Text;
99 99  
  100 + /**
  101 + * 订单号
  102 + */
  103 + private String F_ZDB_Text;
  104 + /**
  105 + * 流程类型
  106 + * @return
  107 + */
  108 + private String F_ZDB_Text667;
100 109  
101 110 @JsonProperty("FAR_Remark")
102 111 public String getFAR_Remark() {
... ... @@ -258,4 +267,12 @@ public class BusinessBillCo {
258 267 public void setF_PZCW_Text(String f_PZCW_Text) {
259 268 F_PZCW_Text = f_PZCW_Text;
260 269 }
  270 +
  271 + public String getF_ZDB_Text667() {
  272 + return F_ZDB_Text667;
  273 + }
  274 +
  275 + public void setF_ZDB_Text667(String f_ZDB_Text667) {
  276 + F_ZDB_Text667 = f_ZDB_Text667;
  277 + }
261 278 }
... ...
etrade-order/src/main/java/com/diligrp/etrade/order/domain/collector/model/ProcessType.java 0 → 100644
  1 +package com.diligrp.etrade.order.domain.collector.model;
  2 +
  3 +import com.diligrp.etrade.order.exception.OrderErrorCode;
  4 +import com.diligrp.etrade.order.exception.OrderException;
  5 +
  6 +public enum ProcessType {
  7 + POSITIVE("1", "正向流程"),
  8 + REVERSE("-1", "逆向流程");
  9 +
  10 + public final String code;
  11 + public final String name;
  12 +
  13 + ProcessType(String code, String name) {
  14 + this.code = code;
  15 + this.name = name;
  16 + }
  17 +
  18 + public static ProcessType fromCode(String code) {
  19 + for (ProcessType item : ProcessType.values()) {
  20 + if (item.code.equals(code)) {
  21 + return item;
  22 + }
  23 + }
  24 + throw new OrderException(OrderErrorCode.PARAM_ERROR,"业务流程不正确");
  25 + }
  26 +}
... ...
etrade-order/src/main/java/com/diligrp/etrade/order/service/impl/SendToCollectorImpl.java
... ... @@ -115,6 +115,7 @@ public class SendToCollectorImpl implements SendToCollector {
115 115 */
116 116 private BusinessBillCo buildSellerLedgerCo(LedgerPayDto ledgerPayDto) {
117 117 BusinessBillCo billCo = new BusinessBillCo();
  118 + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code);
118 119 billCo.setFDATE(ledgerPayDto.getLedgerLog().getPayableTime().toLocalDate().format(formatter));
119 120 billCo.setFBillTypeID(new FBillTypeID(BizNumberTypeEnum.HK.getCode()));
120 121 billCo.setF_PZCW_Text(BizNumberTypeEnum.HK.getCode());
... ... @@ -148,6 +149,7 @@ public class SendToCollectorImpl implements SendToCollector {
148 149 */
149 150 private BusinessBillCo buildBuyerLedgerCo(LedgerPayDto ledgerPayDto) {
150 151 BusinessBillCo billCo = new BusinessBillCo();
  152 + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code);
151 153 billCo.setFDATE(ledgerPayDto.getLedgerLog().getPayableTime().toLocalDate().format(formatter));
152 154 billCo.setFBillTypeID(new FBillTypeID(BizNumberTypeEnum.HK.getCode()));
153 155 billCo.setF_PZCW_Text(BizNumberTypeEnum.HK.getCode());
... ... @@ -191,8 +193,10 @@ public class SendToCollectorImpl implements SendToCollector {
191 193 fEntityDetail.setFPrice(price);
192 194 fEntityDetail.setFTaxPrice(price);
193 195 if(order.getOrderStatus()!=null&&order.getOrderStatus().equals(OrderStatus.INVALID.getCode())){
  196 + billCo.setF_ZDB_Text667(ProcessType.REVERSE.code);
194 197 fEntityDetail.setFPriceQty(NumberTransform.POSITIVE);
195 198 }else{
  199 + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code);
196 200 fEntityDetail.setFPriceQty(NumberTransform.NEGATIVE);
197 201 }
198 202 fEntityDetail.setFCOSTID(new FCOSTID(OrderConstant.ORDER_TRADE_CHARGE_ITEM_CODE));//费用项
... ... @@ -223,8 +227,10 @@ public class SendToCollectorImpl implements SendToCollector {
223 227 fEntityDetail.setFPrice(price);
224 228 fEntityDetail.setFTaxPrice(price);
225 229 if(order.getOrderStatus()!=null&&order.getOrderStatus().equals(OrderStatus.INVALID.getCode())){
  230 + billCo.setF_ZDB_Text667(ProcessType.REVERSE.code);
226 231 fEntityDetail.setFPriceQty(NumberTransform.NEGATIVE);
227 232 }else{
  233 + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code);
228 234 fEntityDetail.setFPriceQty(NumberTransform.POSITIVE);
229 235 }
230 236 fEntityDetail.setFCOSTID(new FCOSTID(OrderConstant.ORDER_TRADE_CHARGE_ITEM_CODE));//费用项
... ...