zm
2020-05-18 a18bfacbf56b401f6e0fdae8710fbca4df8cff77
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
package com.changhong.epc.form.service.budget.tool.impl;
 
import com.changhong.epc.bean.form.FormType;
import com.changhong.epc.bean.form.budget.PersionBackMoney;
import com.changhong.epc.bean.tenant.cost.CostFromMapping;
import com.changhong.epc.bean.tenant.system.SystemForm;
import com.changhong.epc.constter.base.BaseConst;
import com.changhong.epc.form.mapper.tenant.FormDataMapper;
import com.changhong.epc.form.mapper.tenant.log.PersionBackMoneyMapper;
import com.changhong.epc.form.service.budget.impl.GetConstant;
import com.changhong.epc.form.service.budget.tool.UpdateBudgetFactory;
import com.changhong.epc.form.service.budget.tool.entity.UpdateBudgetEntity;
import com.changhong.epc.form.service.field.FormFieldService;
import com.codingapi.tx.annotation.TxTransaction;
import com.iemsoft.framework.cloud.core.thread.Keys;
import com.iemsoft.framework.cloud.core.thread.ThreadData;
import com.iemsoft.framework.cloud.core.tools.Assert;
import com.iemsoft.framework.cloud.core.tools.JSONTool;
import com.iemsoft.framework.cloud.core.tools.ObjectUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
 
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.Objects;
 
/**
 * 报销扣减预算
 */
@Service(UpdateBudgetFactory.BX_TYPE)
@Slf4j
@Scope("prototype")
public class ExpendBudgetUpdate extends AbstractUpdateBudget implements BaseConst {
 
    private UpdateBudgetEntity applyEntity;
 
    private Map<String, Object> applyInfo;
    // 主表数据集合
    private Map<String, Object> expendInfo;
 
    private Map<String, Object> budgetChildInfo;
 
    private double budgetMoney;
 
    @Resource
    private PersionBackMoneyMapper persionBackMoneyMapper;
 
    @Resource
    private FormDataMapper formDataMapper;
 
    @Resource(name = "formFieldService")
    private FormFieldService formFieldService;
 
    // 子表单后缀
    private static String PAYINFO = "_payinfo";
 
    // 本次报销数据集合
    private List<Map<String, Object>> list;
 
    // 对应报销人的借款记录
    private List<Map<String, Object>> borrowList;
 
    //判断是否有子表单
    private Integer count;
 
 
    @Override
    public void checkBudget(UpdateBudgetEntity updateBudgetEntity) {
        this.expendInfo = getFormInfo(updateBudgetEntity);
        this.applyEntity = getApplyInfo(
                NumberUtils.createInteger(Objects.toString(this.expendInfo.get(EXPEND_COST_TYPE), "0")));
        if (this.applyEntity == null) {
            // 报销-预算
            Integer budgetId = getParentId(this.expendInfo);
            if (budgetId == null) {
                log.warn("{}, 关联预算单id为空!", updateBudgetEntity);
                return;
            }
            addLock(budgetId);
            this.budgetChildInfo = getFormInfo(getFormId(SystemForm.BUDGET_FORM_ID), BUDGET_SUB_FROM, budgetId);
            Assert.condition(budgetChildInfo == null, BUDGET_INVALID);
            if (this.expendInfo.get(EXPEND_USE_MONEY) == null
                    || this.budgetChildInfo.get(BUDGET_ITEM_BALANCE) == null) {
                log.warn("{}, 报销金额:{}, 预算余额:{}"
                        , updateBudgetEntity
                        , this.expendInfo.get(EXPEND_USE_MONEY)
                        , this.budgetChildInfo.get(BUDGET_ITEM_BALANCE));
                return;
            }
            this.budgetMoney = toDouble(this.budgetChildInfo.get(BUDGET_ITEM_BALANCE))
                    - toDouble(this.expendInfo.get(EXPEND_USE_MONEY));
            Assert.condition(this.budgetMoney < 0, BUDGET_MONEY_NOT_ENOUGH);
        } else {
            // 报销-申请-预算
            Integer applyId = getParentId(this.expendInfo);
            if (applyId == null) {
                log.warn("{}, 关联申请单id为空!", updateBudgetEntity);
                return;
            }
            this.applyEntity.setDataRowNum(applyId);
            this.applyInfo = getFormInfo(this.applyEntity);
            Assert.condition(applyInfo == null, APPLY_INVALID);
            Integer budgetId = getParentId(this.applyInfo);
            if (budgetId == null) {
                log.warn("{}, 关联预算单id为空!", updateBudgetEntity);
                return;
            }
            addLock(budgetId);
            this.budgetChildInfo = getFormInfo(getFormId(SystemForm.BUDGET_FORM_ID), BUDGET_SUB_FROM, budgetId);
            Assert.condition(budgetChildInfo == null, BUDGET_INVALID);
            if (this.expendInfo.get(EXPEND_USE_MONEY) == null
                    || this.budgetChildInfo.get(BUDGET_ITEM_BALANCE) == null
                    || this.applyInfo.get(APPLY_USE_MONEY) == null) {
                log.warn("{}, 报销金额:{}, 预算余额:{}, 申请金额:{}"
                        , updateBudgetEntity
                        , this.expendInfo.get(EXPEND_USE_MONEY)
                        , this.budgetChildInfo.get(BUDGET_ITEM_BALANCE)
                        , this.applyInfo.get(APPLY_USE_MONEY));
                return;
            }
            Assert.condition((this.budgetMoney = (toDouble(this.budgetChildInfo.get(BUDGET_ITEM_BALANCE))
                    + toDouble(this.applyInfo.get(APPLY_USE_MONEY))
                    - toDouble(this.expendInfo.get(EXPEND_USE_MONEY)))) < 0, BUDGET_MONEY_NOT_ENOUGH);
            //申请状态回写,只能被占用一次
            updateData(this.applyEntity.getFormId(), null
                    , this.applyEntity.getDataRowNum()
                    , new ModelMap(PROCESS_FLAG, 1));
        }
        String childForm = updateBudgetEntity.getFormId() + PAYINFO;
        count = formDataMapper.selectTableExist(childForm);
        //如果有子表单
        if (count > 0) {
            // 判断金额是否合适
            // 冲抵金额
            Double money = this.persionMoney(updateBudgetEntity);
            // 借款金额
            Double borowMoney = this.allBorrowMoney();
            //如果冲抵金额大于0,并且借款金额等于0或者冲抵金额大于了借款金额报错
            if (money > 0) {
                log.debug("本次冲抵金额为:" + money.toString());
                Assert.condition(BigDecimal.valueOf(borowMoney).compareTo(BigDecimal.valueOf(0)) == 0 || money > borowMoney, PERSION_COST_OUT);
            }
        }
    }
 
    @Override
    @TxTransaction
    @Transactional
    public void updateBudget(UpdateBudgetEntity updateBudgetEntity) {
        super.updateBudget(updateBudgetEntity);
        checkBudget(updateBudgetEntity);
        if (ObjectUtil.empty(this.budgetChildInfo) || this.expendInfo.get(EXPEND_USE_MONEY) == null
                || this.budgetChildInfo.get(BUDGET_ITEM_BALANCE) == null
                || (this.applyInfo != null && this.applyInfo.get(APPLY_USE_MONEY) == null)) {
//            account(updateBudgetEntity.getFormId(), ThreadData.get(Keys.TENANT_ID), Objects.toString(updateBudgetEntity.getDataRowNum(), ""));
            return;
        }
        checkMoney(this.budgetMoney);
 
        if (ObjectUtil.empty(applyInfo)) {
            addBudgetLogMoney(this.budgetChildInfo, budgetMoney, updateBudgetEntity.getFormId(), this.expendInfo,
                    toDouble(expendInfo.get(EXPEND_USE_MONEY)));
        } else {
            addBudgetLogMoney(this.budgetChildInfo, budgetMoney
 
                    , updateBudgetEntity.getFormId(), this.expendInfo, toDouble(expendInfo.get(EXPEND_USE_MONEY))
 
                    , applyEntity.getFormId(), this.applyInfo, toDouble(this.applyInfo.get(APPLY_USE_MONEY)));
            //回写借款金额
            Object amountMoney = this.expendInfo.get(AMOUNTREPAYMENTS);
            log.debug("当前报销单:" + JSONTool.toJson(this.expendInfo));
            log.debug("还款金额为:" + amountMoney);
            if (amountMoney != null && !Objects.equals("", amountMoney)) {
                log.debug("报销还款金额回写-------->");
                updateData(applyEntity.getFormId(), null, applyEntity.getDataRowNum()
                        , new ModelMap(ALREADYREPAID, amountMoney));
            }
        }
        //formatDouble(formBaseEntity);
        updateData(getFormId(SystemForm.BUDGET_FORM_ID), BUDGET_SUB_FROM, getDataRowNum(this.budgetChildInfo),
                new ModelMap(BUDGET_ITEM_BALANCE, format(this.budgetMoney, getFormBase(getFormId(SystemForm.BUDGET_FORM_ID)), BUDGET_ITEM_BALANCE)));
 
    }
 
 
    @Override
    public void flowAfterCall(UpdateBudgetEntity updateBudgetEntity) {
        this.expendInfo = getFormInfo(updateBudgetEntity);
        this.applyEntity = getApplyInfo(
                NumberUtils.createInteger(Objects.toString(this.expendInfo.get(EXPEND_COST_TYPE), "0")));
        if (this.applyEntity == null) {
            // 报销-预算
            Integer budgetId = getParentId(this.expendInfo);
            if (budgetId == null) {
                return;
            }
            delLock(budgetId);
        } else {
            // 报销-申请-预算
            Integer applyId = getParentId(this.expendInfo);
            if (applyId == null) {
                return;
            }
            this.applyEntity.setDataRowNum(applyId);
            this.applyInfo = getFormInfo(this.applyEntity);
            Integer budgetId = getParentId(this.applyInfo);
            if (budgetId == null) {
                return;
            }
            delLock(budgetId);
        }
        account(updateBudgetEntity.getFormId(), ThreadData.get(Keys.TENANT_ID), Objects.toString(updateBudgetEntity.getDataRowNum(), ""));
        // 调用报销单个人冲抵的方法判断
        this.getPersionCostById(updateBudgetEntity);
    }
 
    @Override
    public void rollback(UpdateBudgetEntity updateBudgetEntity) {
        super.rollback(updateBudgetEntity);
        this.expendInfo = getFormInfo(updateBudgetEntity);
        this.applyEntity = getApplyInfo(
                NumberUtils.createInteger(Objects.toString(this.expendInfo.get(EXPEND_COST_TYPE), "0")));
        if (this.applyEntity == null) {
            // 报销-预算
            Integer budgetId = getParentId(this.expendInfo);
            if (budgetId == null) {
                log.warn("{}, 关联预算单id为空!", updateBudgetEntity);
                return;
            }
            addLock(budgetId);
            this.budgetChildInfo = getFormInfo(getFormId(SystemForm.BUDGET_FORM_ID), BUDGET_SUB_FROM, budgetId);
            Assert.condition(budgetChildInfo == null, BUDGET_INVALID);
            if (this.expendInfo.get(EXPEND_USE_MONEY) == null
                    || this.budgetChildInfo.get(BUDGET_ITEM_BALANCE) == null) {
                log.warn("{}, 报销金额:{}, 预算余额:{}"
                        , updateBudgetEntity
                        , this.expendInfo.get(EXPEND_USE_MONEY)
                        , this.budgetChildInfo.get(BUDGET_ITEM_BALANCE));
                return;
            }
            this.budgetMoney = toDouble(this.budgetChildInfo.get(BUDGET_ITEM_BALANCE))
                    + toDouble(this.expendInfo.get(EXPEND_USE_MONEY));
 
            addBudgetLogMoney(this.budgetChildInfo, budgetMoney, updateBudgetEntity.getFormId(), this.expendInfo,
                    toDouble(expendInfo.get(EXPEND_USE_MONEY)));
        } else {
            // 报销-申请-预算
            Integer applyId = getParentId(this.expendInfo);
            if (applyId == null) {
                log.warn("{}, 关联申请单id为空!", updateBudgetEntity);
                return;
            }
            this.applyEntity.setDataRowNum(applyId);
            this.applyInfo = getFormInfo(this.applyEntity);
            Assert.condition(applyInfo == null, APPLY_INVALID);
            Integer budgetId = getParentId(this.applyInfo);
            if (budgetId == null) {
                log.warn("{}, 关联预算单id为空!", updateBudgetEntity);
                return;
            }
            addLock(budgetId);
            this.budgetChildInfo = getFormInfo(getFormId(SystemForm.BUDGET_FORM_ID), BUDGET_SUB_FROM, budgetId);
            Assert.condition(budgetChildInfo == null, BUDGET_INVALID);
            if (this.expendInfo.get(EXPEND_USE_MONEY) == null
                    || this.budgetChildInfo.get(BUDGET_ITEM_BALANCE) == null
                    || this.applyInfo.get(APPLY_USE_MONEY) == null) {
                log.warn("{}, 报销金额:{}, 预算余额:{}, 申请金额:{}"
                        , updateBudgetEntity
                        , this.expendInfo.get(EXPEND_USE_MONEY)
                        , this.budgetChildInfo.get(BUDGET_ITEM_BALANCE)
                        , this.applyInfo.get(APPLY_USE_MONEY));
                return;
            }
            this.budgetMoney = (toDouble(this.budgetChildInfo.get(BUDGET_ITEM_BALANCE))
                    - toDouble(this.expendInfo.get(EXPEND_USE_MONEY))
                    + toDouble(this.applyInfo.get(APPLY_USE_MONEY)));
 
            addBudgetLogMoney(this.budgetChildInfo, budgetMoney
 
                    , updateBudgetEntity.getFormId(), this.expendInfo, toDouble(expendInfo.get(EXPEND_USE_MONEY))
 
                    , applyEntity.getFormId(), this.applyInfo, toDouble(this.applyInfo.get(APPLY_USE_MONEY)));
 
            //回写借款金额
            Object amountMoney = this.expendInfo.get(AMOUNTREPAYMENTS);
//            log.debug("当前报销单:"+ JSONTool.toJson(this.expendInfo));
//            log.debug("还款金额为:"+amountMoney);
            if (amountMoney != null && !Objects.equals("", amountMoney)) {
//                log.debug("报销还款金额回写-------->");
                updateData(applyEntity.getFormId(), null, applyEntity.getDataRowNum()
                        , new ModelMap(ALREADYREPAID, 0));
//                        ,new ModelMap(ALREADYREPAID,amountMoney));
            }
        }
 
        updateData(getFormId(SystemForm.BUDGET_FORM_ID), BUDGET_SUB_FROM, getDataRowNum(this.budgetChildInfo),
                new ModelMap(BUDGET_ITEM_BALANCE, format(this.budgetMoney, getFormBase(getFormId(SystemForm.BUDGET_FORM_ID)), BUDGET_ITEM_BALANCE)));
    }
 
    @Override
    public FormType getFormType() {
        return FormType.BX;
    }
 
    public UpdateBudgetEntity getApplyInfo(Integer cType) {
        String formId = null;
        for (CostFromMapping costFromMapping : this.costFromMappings) {
            if (Objects.equals(costFromMapping.getType(), FormType.SQ.toString())
                    && Objects.equals(costFromMapping.getCtId(), cType)) {
                formId = costFromMapping.getFId();
                break;
            }
        }
        if (formId == null) {
            return null;
        }
        UpdateBudgetEntity updateBudgetEntity = new UpdateBudgetEntity();
        updateBudgetEntity.setFormId(formId);
        return updateBudgetEntity;
    }
 
    /**
     * 如果为个人抵扣报销进入此方法
     */
    public void getPersionCostById(UpdateBudgetEntity updateBudgetEntity) {
        // 本次冲抵的所有的金额
        Double money = this.persionMoney(updateBudgetEntity);
        if (count > 0 && money > 0) {
            // 借款单Id
            String formId = getFormId(SystemForm.LOAN_FORM_ID);
            if (ObjectUtil.empty(formId)) {
                return;
            }
            // 不为空说明此人有借款
            if (Objects.nonNull(borrowList) && borrowList.size() > 0) {
                Double price = 0.0;
                for (Map<String, Object> pb : borrowList) {
                    // 未还金额- 个人冲抵金额=判断借款单是否还完
                    price = Double.parseDouble(Objects.toString(pb.get(OUTSTANDING_AMOUNT), "0")) - money;
                    // 情况1 .本次抵扣正好还清借款
                    if (price >= 0) {
                        // 已还款金额=冲抵金额+已还金额
                        Double price2 = Double.parseDouble(Objects.toString(pb.get(ALREADY_REPAID), "0")) + money;
                        this.crudBorrowAndPersion(formId, money, price2, pb);
                        break;
                    }
                    // 冲抵还死第一条记录
                    if (price < 0) {
                        // 本条记录的冲抵金额
                        money = Double.parseDouble(Objects.toString(pb.get(OUTSTANDING_AMOUNT), "0"));
                        // 已还款金额=借款总金额
                        Double price2 = Double.parseDouble(Objects.toString(pb.get(APPLICATION_AMOUNT), "0"));
                        this.crudBorrowAndPersion(formId, money, price2, pb);
                        money = -price;
                    }
                }
 
            }
 
        }
    }
 
    /**
     * @param money 当前冲抵金额
     * @param price 已还款金额
     * @param pb    借款单数据 更新借款表
     */
    public void crudBorrowAndPersion(String formId, Double money, Double price, Map<String, Object> pb) {
        // 借款数据行号
        Integer dataNum = Integer.parseInt(Objects.toString(pb.get(DATAROWNUMBER), "0"));
        PersionBackMoney persionBackMoney = new PersionBackMoney();
        persionBackMoney.initParam();
        // 当前还款金额
        persionBackMoney.setPayMoney(money);
        persionBackMoney.setDataRowNum(dataNum);
        persionBackMoney.setFormId(formId);
        // 借款单没有币种
        // persionBackMoney.setMoneyType();
        persionBackMoney.setTendantId(Objects.toString(ThreadData.get(TENANT_ID)));
        persionBackMoney.setDepartment(Objects.toString(pb.get(DEPARTMENT)));
        String borrowTime = pb.get(CREATEDATETIME).toString();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        try {
            persionBackMoney.setBorrowDate(formatter.parse(borrowTime));
        } catch (ParseException e) {
            // System.err.println(e.getMessage());
        }
        String openId = Objects.toString(pb.get(LOANPEOPLE));
        persionBackMoney.setStaffId(openId);
        persionBackMoney.setPosition(Objects.toString(pb.get(EMPLOYEE_POSITION)));
        persionBackMoney.setPayDate(new Date());
        // 未还总金额
        persionBackMoney.setPayAllmoney(Double.parseDouble(Objects.toString(pb.get(APPLICATION_AMOUNT), "0")) - price);
        persionBackMoney.setBorrowMoney(Double.parseDouble(Objects.toString(pb.get(APPLICATION_AMOUNT), "0")));
        // 支付方式(1000000.个人抵扣2.其他的方式)
        persionBackMoney.setPaymentMethod(GetConstant.getConstant(PERSION_COST_RETURN));
        persionBackMoney.setOpenId(openId);
        // 更新操作
        persionBackMoneyMapper.insert(persionBackMoney);
        /**
         * 冲抵的日志
         * 日志对象还款单
         * 原始内容:未还款总金额
         * 变更来源内容:冲抵金额 money
         * */
        if (ObjectUtil.empty(applyInfo)) {
            addBudgetLogMoney(this.budgetChildInfo, budgetMoney, formId, this.expendInfo,
                    toDouble(expendInfo.get(EXPEND_USE_MONEY)));
        } else {
            addBudgetLogMoney(this.budgetChildInfo, budgetMoney
 
                    , formId, this.expendInfo, money
 
                    , applyEntity.getFormId(), this.applyInfo, toDouble(this.applyInfo.get(APPLY_USE_MONEY)));
        }
 
 
        // 更新借款单
        updateData(formId, null, dataNum,
                // 已还金额
                new ModelMap(ALREADY_REPAID, format(price, getFormBase(formId), ALREADY_REPAID)).addAttribute(OUTSTANDING_AMOUNT,
                        // 未还金额
                        format((Double.parseDouble(Objects.toString(pb.get(APPLICATION_AMOUNT), "0")) - price), getFormBase(formId), OUTSTANDING_AMOUNT)));
    }
 
    /**
     * 返回个人冲抵的金额
     */
    public Double persionMoney(UpdateBudgetEntity updateBudgetEntity) {
        // 个人冲抵金额
        Double money = 0.0;
        // 个人冲抵判断值
        String keys = GetConstant.getConstant(PERSION_COST_RETURN);
        // 报销子表单表名
        String formName2 = updateBudgetEntity.getFormId() + PAYINFO;
        // 主表表名
        String formName = updateBudgetEntity.getFormId();
        // 查询对应的报销单数据
        list = formDataMapper.getPersionCostReturn(updateBudgetEntity.getDataRowNum(), formName, formName2);
        for (Map<String, Object> m : list) {
            // 个人冲抵暂定为“10000000”(页面显示现金)
            if (Objects.equals(m.get(PAYWAY), keys) && StringUtils.isNotBlank(m.get(NETMONEY).toString())) {
                // NETMONEY,支付金额key值
                money += Double.parseDouble(Objects.toString(m.get(NETMONEY), "0"));
            }
        }
        return money;
    }
 
    /**
     * 全部借款金额
     */
    public Double allBorrowMoney() {
        String formId = getFormId(SystemForm.LOAN_FORM_ID);
        Double borrowMoney = 0.0;
        if (ObjectUtil.empty(formId)) {
            return borrowMoney;
        }
        String openId = list.get(0).get(REIMBURSE_MAN).toString();
        // 借款数据
        borrowList = formDataMapper.getBorrowMoney(openId, formId);
        for (Map<String, Object> m : borrowList) {
            borrowMoney += Double.parseDouble(Objects.toString(m.get(OUTSTANDING_AMOUNT), "0"));
        }
        log.debug("当前借款金额为:" + borrowMoney.toString());
        return borrowMoney;
    }
 
}