Commit 08c1cc7133290dae3c7a4846d941126499fe893c
1 parent
f746a23b
update:交易单增加额外单据流向信息
Showing
3 changed files
with
49 additions
and
0 deletions
etrade-order/src/main/java/com/diligrp/etrade/order/domain/collector/co/BusinessBillCo.java
@@ -97,6 +97,15 @@ public class BusinessBillCo { | @@ -97,6 +97,15 @@ public class BusinessBillCo { | ||
97 | */ | 97 | */ |
98 | private String F_PZCW_Text; | 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 | @JsonProperty("FAR_Remark") | 110 | @JsonProperty("FAR_Remark") |
102 | public String getFAR_Remark() { | 111 | public String getFAR_Remark() { |
@@ -258,4 +267,12 @@ public class BusinessBillCo { | @@ -258,4 +267,12 @@ public class BusinessBillCo { | ||
258 | public void setF_PZCW_Text(String f_PZCW_Text) { | 267 | public void setF_PZCW_Text(String f_PZCW_Text) { |
259 | F_PZCW_Text = f_PZCW_Text; | 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,6 +115,7 @@ public class SendToCollectorImpl implements SendToCollector { | ||
115 | */ | 115 | */ |
116 | private BusinessBillCo buildSellerLedgerCo(LedgerPayDto ledgerPayDto) { | 116 | private BusinessBillCo buildSellerLedgerCo(LedgerPayDto ledgerPayDto) { |
117 | BusinessBillCo billCo = new BusinessBillCo(); | 117 | BusinessBillCo billCo = new BusinessBillCo(); |
118 | + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code); | ||
118 | billCo.setFDATE(ledgerPayDto.getLedgerLog().getPayableTime().toLocalDate().format(formatter)); | 119 | billCo.setFDATE(ledgerPayDto.getLedgerLog().getPayableTime().toLocalDate().format(formatter)); |
119 | billCo.setFBillTypeID(new FBillTypeID(BizNumberTypeEnum.HK.getCode())); | 120 | billCo.setFBillTypeID(new FBillTypeID(BizNumberTypeEnum.HK.getCode())); |
120 | billCo.setF_PZCW_Text(BizNumberTypeEnum.HK.getCode()); | 121 | billCo.setF_PZCW_Text(BizNumberTypeEnum.HK.getCode()); |
@@ -148,6 +149,7 @@ public class SendToCollectorImpl implements SendToCollector { | @@ -148,6 +149,7 @@ public class SendToCollectorImpl implements SendToCollector { | ||
148 | */ | 149 | */ |
149 | private BusinessBillCo buildBuyerLedgerCo(LedgerPayDto ledgerPayDto) { | 150 | private BusinessBillCo buildBuyerLedgerCo(LedgerPayDto ledgerPayDto) { |
150 | BusinessBillCo billCo = new BusinessBillCo(); | 151 | BusinessBillCo billCo = new BusinessBillCo(); |
152 | + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code); | ||
151 | billCo.setFDATE(ledgerPayDto.getLedgerLog().getPayableTime().toLocalDate().format(formatter)); | 153 | billCo.setFDATE(ledgerPayDto.getLedgerLog().getPayableTime().toLocalDate().format(formatter)); |
152 | billCo.setFBillTypeID(new FBillTypeID(BizNumberTypeEnum.HK.getCode())); | 154 | billCo.setFBillTypeID(new FBillTypeID(BizNumberTypeEnum.HK.getCode())); |
153 | billCo.setF_PZCW_Text(BizNumberTypeEnum.HK.getCode()); | 155 | billCo.setF_PZCW_Text(BizNumberTypeEnum.HK.getCode()); |
@@ -191,8 +193,10 @@ public class SendToCollectorImpl implements SendToCollector { | @@ -191,8 +193,10 @@ public class SendToCollectorImpl implements SendToCollector { | ||
191 | fEntityDetail.setFPrice(price); | 193 | fEntityDetail.setFPrice(price); |
192 | fEntityDetail.setFTaxPrice(price); | 194 | fEntityDetail.setFTaxPrice(price); |
193 | if(order.getOrderStatus()!=null&&order.getOrderStatus().equals(OrderStatus.INVALID.getCode())){ | 195 | if(order.getOrderStatus()!=null&&order.getOrderStatus().equals(OrderStatus.INVALID.getCode())){ |
196 | + billCo.setF_ZDB_Text667(ProcessType.REVERSE.code); | ||
194 | fEntityDetail.setFPriceQty(NumberTransform.POSITIVE); | 197 | fEntityDetail.setFPriceQty(NumberTransform.POSITIVE); |
195 | }else{ | 198 | }else{ |
199 | + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code); | ||
196 | fEntityDetail.setFPriceQty(NumberTransform.NEGATIVE); | 200 | fEntityDetail.setFPriceQty(NumberTransform.NEGATIVE); |
197 | } | 201 | } |
198 | fEntityDetail.setFCOSTID(new FCOSTID(OrderConstant.ORDER_TRADE_CHARGE_ITEM_CODE));//费用项 | 202 | fEntityDetail.setFCOSTID(new FCOSTID(OrderConstant.ORDER_TRADE_CHARGE_ITEM_CODE));//费用项 |
@@ -223,8 +227,10 @@ public class SendToCollectorImpl implements SendToCollector { | @@ -223,8 +227,10 @@ public class SendToCollectorImpl implements SendToCollector { | ||
223 | fEntityDetail.setFPrice(price); | 227 | fEntityDetail.setFPrice(price); |
224 | fEntityDetail.setFTaxPrice(price); | 228 | fEntityDetail.setFTaxPrice(price); |
225 | if(order.getOrderStatus()!=null&&order.getOrderStatus().equals(OrderStatus.INVALID.getCode())){ | 229 | if(order.getOrderStatus()!=null&&order.getOrderStatus().equals(OrderStatus.INVALID.getCode())){ |
230 | + billCo.setF_ZDB_Text667(ProcessType.REVERSE.code); | ||
226 | fEntityDetail.setFPriceQty(NumberTransform.NEGATIVE); | 231 | fEntityDetail.setFPriceQty(NumberTransform.NEGATIVE); |
227 | }else{ | 232 | }else{ |
233 | + billCo.setF_ZDB_Text667(ProcessType.POSITIVE.code); | ||
228 | fEntityDetail.setFPriceQty(NumberTransform.POSITIVE); | 234 | fEntityDetail.setFPriceQty(NumberTransform.POSITIVE); |
229 | } | 235 | } |
230 | fEntityDetail.setFCOSTID(new FCOSTID(OrderConstant.ORDER_TRADE_CHARGE_ITEM_CODE));//费用项 | 236 | fEntityDetail.setFCOSTID(new FCOSTID(OrderConstant.ORDER_TRADE_CHARGE_ITEM_CODE));//费用项 |