diff --git a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/AccountsDealRecord.java b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/AccountsDealRecord.java index 114db14..0d01b72 100644 --- a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/AccountsDealRecord.java +++ b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/AccountsDealRecord.java @@ -69,6 +69,11 @@ public class AccountsDealRecord extends BaseEntity @Excel(name = "当前余额") private Double currentBalance; + /** 交易类别 */ + @ApiModelProperty(value="交易子类别)") + @Excel(name = "交易子类别") + private String childCategory; + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) @@ -87,6 +92,7 @@ public class AccountsDealRecord extends BaseEntity .append("dealCategory", getDealCategory()) .append("transferRecordId", getTransferRecordId()) .append("currentBalance", getCurrentBalance()) + .append("childCategory", getChildCategory()) .toString(); } } diff --git a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/dto/AccountsDealRecordDto.java b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/dto/AccountsDealRecordDto.java index 424936b..128da17 100644 --- a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/dto/AccountsDealRecordDto.java +++ b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/dto/AccountsDealRecordDto.java @@ -61,4 +61,8 @@ public class AccountsDealRecordDto extends BaseEntity implements Serializable @ApiModelProperty(value="信用卡账单") private String creditBill; + /** 交易子类别 */ + @ApiModelProperty(value="交易子类别") + private String childCategory; + } diff --git a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/AccountsDealRecordVo.java b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/AccountsDealRecordVo.java index a6d1c2d..b4d5244 100644 --- a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/AccountsDealRecordVo.java +++ b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/domain/vo/AccountsDealRecordVo.java @@ -24,4 +24,6 @@ public class AccountsDealRecordVo extends AccountsDealRecord private String dealCategoryName; + private String childCategoryName; + } diff --git a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsDealRecordServiceImpl.java b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsDealRecordServiceImpl.java index 3671637..f950162 100644 --- a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsDealRecordServiceImpl.java +++ b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsDealRecordServiceImpl.java @@ -3,6 +3,7 @@ package com.ruoyi.invest.service.impl; import com.ruoyi.common.core.utils.DateUtils; import com.ruoyi.common.core.utils.IdWorker; import com.ruoyi.common.core.utils.StringUtils; +import com.ruoyi.common.security.utils.DictUtils; import com.ruoyi.common.security.utils.SecurityUtils; import com.ruoyi.invest.domain.AccountsDealRecord; import com.ruoyi.invest.domain.dto.AccountsDealRecordDto; @@ -55,6 +56,18 @@ public class AccountsDealRecordServiceImpl implements IAccountsDealRecordService public List selectAccountsDealRecordList(AccountsDealRecordDto accountsDealRecordDto) { List list=accountsDealRecordMapper.selectAccountsDealRecordList(accountsDealRecordDto); + //修改子类别 + for (AccountsDealRecordVo accountDeal : list) { + if(accountDeal.getDealCategory().equals("1")){ + String childCategoryName = DictUtils.getDictLabel("daily_expenses", accountDeal.getChildCategory()); + accountDeal.setChildCategoryName(childCategoryName); + } + else { + String childCategoryName = DictUtils.getDictLabel("deal_category", accountDeal.getChildCategory()); + accountDeal.setChildCategoryName(childCategoryName); + } + + } return list; } diff --git a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsTransferRecordServiceImpl.java b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsTransferRecordServiceImpl.java index 83bd65c..79cbd22 100644 --- a/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsTransferRecordServiceImpl.java +++ b/ruoyi-modules/intc-invest/src/main/java/com/ruoyi/invest/service/impl/AccountsTransferRecordServiceImpl.java @@ -195,6 +195,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("2"); //POS机刷卡 creditDeal.setDealCategory("5"); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //POS机名称+商户名称 creditDeal.setName(pos.getName()+"-"+pos.getMerchantName()); creditDeal.setRemark("交易商户:"+pos.getName()+"-"+pos.getMerchantName()); @@ -222,6 +223,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("1"); //POS机刷卡 creditDeal.setDealCategory("5"); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //POS机名称+信用卡+商户名称 creditDeal.setName(pos.getName()+"-"+creditAccount.getName()+"("+ StringUtils.getLastNumberChars(3,creditAccount.getCode())+")"+"-"+pos.getMerchantName()); creditDeal.setRemark("刷卡金额"); @@ -244,6 +246,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("2"); //POS机刷卡手续费 creditDeal.setDealCategory("13"); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //POS机名称+信用卡+商户名称 creditDeal.setName(pos.getName()+"-"+creditAccount.getName()+"("+ StringUtils.getLastNumberChars(3,creditAccount.getCode())+")"+"-"+pos.getMerchantName()); creditDeal.setRemark("刷卡手续费"); @@ -294,6 +297,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("1"); //信用卡还款6,0账单还款12 creditDeal.setDealCategory(accountsTransferRecord.getDealType()); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //储蓄卡还款至信用卡 creditDeal.setName(debitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")还款至"+creditVo.getName()+"("+StringUtils.getLastNumberChars(3,creditVo.getCode())+")"); creditDeal.setRemark("信用卡还款"); @@ -325,6 +329,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("2"); //信用卡还款 creditDeal.setDealCategory("6"); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //储蓄卡还款至信用卡 creditDeal.setName(debitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")还款至"+creditVo.getName()+"("+StringUtils.getLastNumberChars(3,creditVo.getCode())+")"); creditDeal.setRemark("信用卡还款"); @@ -394,6 +399,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor } //投资账户转账 dealRecord.setDealCategory("7"); + dealRecord.setChildCategory(dealRecord.getDealCategory()); dealRecord.setRemark("投资账户转账"); dealRecord.setCreateBy(SecurityUtils.getUsername()); dealRecord.setCreateTime(accountsTransferRecord.getCreateTime()); @@ -434,6 +440,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor } //投资账户转账 dealRecord.setDealCategory("7"); + dealRecord.setChildCategory(dealRecord.getDealCategory()); dealRecord.setRemark("投资账户转账"); dealRecord.setCreateBy(SecurityUtils.getUsername()); dealRecord.setCreateTime(accountsTransferRecord.getCreateTime()); @@ -479,6 +486,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("2"); //储蓄卡转账 creditDeal.setDealCategory("8"); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //储蓄卡转账 creditDeal.setName(outDebitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,outDebitCardVo.getCode())+")转账至"+inDebitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,inDebitCardVo.getCode())+")"); creditDeal.setRemark("储蓄卡转账"); @@ -508,6 +516,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor creditDeal.setDealType("1"); //储蓄卡转账 creditDeal.setDealCategory("8"); + creditDeal.setChildCategory(creditDeal.getDealCategory()); //储蓄卡转账 creditDeal.setName(outDebitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,outDebitCardVo.getCode())+")转账至"+inDebitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,inDebitCardVo.getCode())+")"); creditDeal.setRemark("储蓄卡转账"); @@ -578,6 +587,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor } //借贷 dealRecord.setDealCategory("9"); + dealRecord.setChildCategory(dealRecord.getDealCategory()); dealRecord.setRemark("借贷记账"); dealRecord.setCreateBy(SecurityUtils.getUsername()); dealRecord.setCreateTime(accountsTransferRecord.getCreateTime()); @@ -616,6 +626,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor dealRecord.setName(lendVo.getName()+"("+StringUtils.getLastNumberChars(3,lendVo.getCode())+")借款至"+debitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")"); //借贷账户转账 dealRecord.setDealCategory("9"); + dealRecord.setChildCategory(dealRecord.getDealCategory()); dealRecord.setCreateBy(SecurityUtils.getUsername()); dealRecord.setCreateTime(accountsTransferRecord.getCreateTime()); //重新计算余额 @@ -632,6 +643,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor //借贷账户转账 dealRecord.setDealCategory("9"); + dealRecord.setChildCategory(dealRecord.getDealCategory()); dealRecord.setCreateBy(SecurityUtils.getUsername()); dealRecord.setCreateTime(accountsTransferRecord.getCreateTime()); //重新计算余额 @@ -655,6 +667,7 @@ public class AccountsTransferRecordServiceImpl implements IAccountsTransferRecor dealInterest.setName(debitCardVo.getName()+"("+StringUtils.getLastNumberChars(3,debitCardVo.getCode())+")还款至"+lendVo.getName()+"("+StringUtils.getLastNumberChars(3,lendVo.getCode())+")"); //借贷账户转账利息 dealInterest.setDealCategory("15"); + dealInterest.setChildCategory(dealInterest.getDealCategory()); dealInterest.setCreateBy(SecurityUtils.getUsername()); Date currentDate = accountsTransferRecord.getCreateTime(); long millis = currentDate.getTime(); // 获取当前时间的毫秒数 diff --git a/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/AccountsDealRecordMapper.xml b/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/AccountsDealRecordMapper.xml index 29e5e64..344716c 100644 --- a/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/AccountsDealRecordMapper.xml +++ b/ruoyi-modules/intc-invest/src/main/resources/mapper/invest/AccountsDealRecordMapper.xml @@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" a.remark, a.deal_category, a.current_balance, + a.child_category, CONCAT(a2."name", '(', right(a2.code, 4), ')') as account_name from accounts_deal_record a @@ -56,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.account_id = #{accountId} and a.deal_type = #{dealType} and a.deal_category = #{dealCategory} - + and a.child_category = #{childCategory} and #{endTime}>=to_char(a.create_time, 'yyyy-MM-dd') @@ -102,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deal_category, transfer_record_id, current_balance, + child_category, #{id}, @@ -119,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{dealCategory}, #{transferRecordId}, #{currentBalance}, + #{childCategory}, @@ -139,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" deal_category = #{dealCategory}, transfer_record_id = #{transferRecordId}, current_balance = #{currentBalance}, + child_category = #{childCategory}, where id = #{id}