|
@@ -56,19 +56,37 @@ public class JSMzInvoiceInfo implements Serializable {
|
|
|
jsMzInvoiceInfo.setRec_name(mzInvoiceInfo.getIssuer());
|
|
|
HisInfo hisInfo = new HisInfo();
|
|
|
hisInfo.setPayee(mzInvoiceInfo.getIssuer());
|
|
|
+// TradeInfo tradeInfo = new TradeInfo();
|
|
|
+// tradeInfo.setOtherfund_pay(mzInvoiceInfo.getSetlInfo().getOtherPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getOtherPayAmount());
|
|
|
+// if (mzInvoiceInfo.getSpecialAttrDTO().getInsureTypeCode() == null) {
|
|
|
+// tradeInfo.setOwn_pay(mzInvoiceInfo.getTotalAmount());
|
|
|
+// } else {
|
|
|
+// tradeInfo.setOwn_pay(mzInvoiceInfo.getSetlInfo().getPerSelfPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerSelfPayAmount());
|
|
|
+// }
|
|
|
+//
|
|
|
+// tradeInfo.setCash_pay(mzInvoiceInfo.getSetlInfo().getPerCashPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerCashPayAmount());
|
|
|
+// tradeInfo.setAccount_pay(mzInvoiceInfo.getSetlInfo().getPerAccoPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerAccoPayAmount());
|
|
|
+//// tradeInfo.setCash_pay(BigDecimal.valueOf(0));
|
|
|
+//// tradeInfo.setAccount_pay(BigDecimal.valueOf(0));
|
|
|
+// tradeInfo.setFund_pay(mzInvoiceInfo.getSetlInfo().getInsureFundPay() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getInsureFundPay());
|
|
|
+// hisInfo.setTrade_info(tradeInfo);
|
|
|
+
|
|
|
TradeInfo tradeInfo = new TradeInfo();
|
|
|
- tradeInfo.setOtherfund_pay(mzInvoiceInfo.getSetlInfo().getOtherPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getOtherPayAmount());
|
|
|
- if (mzInvoiceInfo.getSpecialAttrDTO().getInsureTypeCode() == null) {
|
|
|
+
|
|
|
+ if (mzInvoiceInfo.getSpecialAttrDTO().getInsureTypeCode() == null || mzInvoiceInfo.getSpecialAttrDTO().getInsureTypeCode() == "05") {
|
|
|
tradeInfo.setOwn_pay(mzInvoiceInfo.getTotalAmount());
|
|
|
+ tradeInfo.setOtherfund_pay(BigDecimal.valueOf(0));
|
|
|
+ tradeInfo.setCash_pay(BigDecimal.valueOf(0));
|
|
|
+ tradeInfo.setAccount_pay(BigDecimal.valueOf(0));
|
|
|
} else {
|
|
|
- tradeInfo.setOwn_pay(mzInvoiceInfo.getSetlInfo().getPerSelfPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerSelfPayAmount());
|
|
|
- }
|
|
|
|
|
|
-// tradeInfo.setCash_pay(mzInvoiceInfo.getSetlInfo().getPerCashPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerCashPayAmount());
|
|
|
-// tradeInfo.setAccount_pay(mzInvoiceInfo.getSetlInfo().getPerAccoPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerAccoPayAmount());
|
|
|
- tradeInfo.setCash_pay(BigDecimal.valueOf(0));
|
|
|
- tradeInfo.setAccount_pay(BigDecimal.valueOf(0));
|
|
|
- tradeInfo.setFund_pay(mzInvoiceInfo.getSetlInfo().getInsureFundPay() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getInsureFundPay());
|
|
|
+ tradeInfo.setOtherfund_pay(mzInvoiceInfo.getSetlInfo().getOtherPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getOtherPayAmount());
|
|
|
+
|
|
|
+ tradeInfo.setAccount_pay(mzInvoiceInfo.getSetlInfo().getPerAccoPayAmount() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getPerAccoPayAmount());
|
|
|
+ tradeInfo.setFund_pay(mzInvoiceInfo.getSetlInfo().getInsureFundPay() == null ? BigDecimal.valueOf(0):mzInvoiceInfo.getSetlInfo().getInsureFundPay());
|
|
|
+ BigDecimal ownPay = mzInvoiceInfo.getSetlInfo().getPerSelfPayAmount().subtract(tradeInfo.getAccount_pay()).subtract(tradeInfo.getOtherfund_pay());
|
|
|
+ tradeInfo.setOwn_pay(ownPay);
|
|
|
+ }
|
|
|
hisInfo.setTrade_info(tradeInfo);
|
|
|
|
|
|
List<InvoiceDetail> invoiceDetailList = mzInvoiceInfo.getInvoiceDetailList();
|