Commit f59e5ceb by huluobin

# 费用系统 无需付款回调

parent 76ff50bc
...@@ -9,6 +9,7 @@ public class CostCashiercallbackDomain { ...@@ -9,6 +9,7 @@ public class CostCashiercallbackDomain {
private Integer id; private Integer id;
private String costNo; private String costNo;
private String message; private String message;
private Integer payid; private Integer payid;
private String payno; private String payno;
private BigDecimal payamount; private BigDecimal payamount;
......
...@@ -436,16 +436,21 @@ public abstract class AbstractCostService implements CostService { ...@@ -436,16 +436,21 @@ public abstract class AbstractCostService implements CostService {
} }
void cashierCallbackPass(CostCashiercallbackDomain costCashiercallbackDomain) { void cashierCallbackPass(CostCashiercallbackDomain costCashiercallbackDomain) {
CostDomain costDomain = this.getCostByCostNo(costCashiercallbackDomain.getCostNo());
// 获取xx货币-->CNY的汇率 // 获取xx货币-->CNY的汇率
BigDecimal toRmbRate = CurUtils.getCur(costCashiercallbackDomain.getCashierunitcode().toUpperCase(), "CNY"); if (costCashiercallbackDomain.getCashierunitcode() != null) {
costCashiercallbackDomain.setToRmbRate(toRmbRate); BigDecimal toRmbRate = CurUtils.getCur(costCashiercallbackDomain.getCashierunitcode().toUpperCase(), "CNY");
costCashiercallbackDomain.setToRmbRate(toRmbRate);
costDomain.setToRmbRate(toRmbRate);
}
// 保存出纳付款记录 // 保存出纳付款记录
Integer integer = costCashiercallbackService.saveCostCashiercallbackResponse(costCashiercallbackDomain); Integer integer = costCashiercallbackService.saveCostCashiercallbackResponse(costCashiercallbackDomain);
log.warn("保存出纳付款信息成功:" + integer + " " + costCashiercallbackDomain); log.warn("保存出纳付款信息成功:" + integer + " " + costCashiercallbackDomain);
// 付款成功,更改费用单信息,否则返回失败 // 付款成功,更改费用单信息,否则返回失败
CostDomain costDomain = this.getCostByCostNo(costCashiercallbackDomain.getCostNo());
costDomain.setCostStatus(4); costDomain.setCostStatus(4);
if (null != costDomain.getIsLend()) { if (null != costDomain.getIsLend()) {
...@@ -453,10 +458,10 @@ public abstract class AbstractCostService implements CostService { ...@@ -453,10 +458,10 @@ public abstract class AbstractCostService implements CostService {
costDomain.setLendStatus(1); costDomain.setLendStatus(1);
} }
} }
costDomain.setAmountRmb(costCashiercallbackDomain.getCashierpaymoneyrmb());
costDomain.setPayUserId(costCashiercallbackDomain.getPayuserid()); costDomain.setPayUserId(costCashiercallbackDomain.getPayuserid());
costDomain.setPayTime(new Date()); costDomain.setPayTime(new Date());
costDomain.setAmountRmb(costCashiercallbackDomain.getCashierpaymoneyrmb());
costDomain.setToRmbRate(toRmbRate);
this.updateCost(costDomain); this.updateCost(costDomain);
costLogService.save(costCashiercallbackDomain.getCostNo(), costCashiercallbackDomain.getPayuserid(), "出纳收/付款成功:" + costCashiercallbackDomain.getPaynote()); costLogService.save(costCashiercallbackDomain.getCostNo(), costCashiercallbackDomain.getPayuserid(), "出纳收/付款成功:" + costCashiercallbackDomain.getPaynote());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment