feat(BdAreaCurrency): 消费配置列表-扣款顺序比例列,数字改为展示两位小数
This commit is contained in:
parent
7dbfb05585
commit
a5fd926fc7
|
@ -24,6 +24,8 @@ import com.hzs.config.pub.controller.ConfigBaseController;
|
||||||
import com.hzs.system.config.service.IBdAccountService;
|
import com.hzs.system.config.service.IBdAccountService;
|
||||||
import com.hzs.system.config.service.IBdAreaCurrencyDetailService;
|
import com.hzs.system.config.service.IBdAreaCurrencyDetailService;
|
||||||
import com.hzs.system.config.service.IBdAreaCurrencyService;
|
import com.hzs.system.config.service.IBdAreaCurrencyService;
|
||||||
|
import com.hzs.system.config.vo.BdAreaCurrencyDetailVO;
|
||||||
|
import com.hzs.system.config.vo.BdAreaCurrencyListsVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -74,13 +76,14 @@ public class BdAreaCurrencyController extends ConfigBaseController {
|
||||||
queryWrapper.orderByAsc("SPECIAL_AREA");
|
queryWrapper.orderByAsc("SPECIAL_AREA");
|
||||||
queryWrapper.orderByDesc("EFFECTIVE_DATE");
|
queryWrapper.orderByDesc("EFFECTIVE_DATE");
|
||||||
List<BdAreaCurrency> list = areaCurrencyParamService.list(queryWrapper);
|
List<BdAreaCurrency> list = areaCurrencyParamService.list(queryWrapper);
|
||||||
List<BdAreaCurrencyExt> listExt = new ArrayList<>();
|
List<BdAreaCurrencyListsVO> listExt = new ArrayList<>();
|
||||||
for (BdAreaCurrency bac : list) {
|
for (BdAreaCurrency bac : list) {
|
||||||
BdAreaCurrencyExt bacExt = BeanUtil.copyProperties(bac, BdAreaCurrencyExt.class);
|
BdAreaCurrencyListsVO bacExt = BeanUtil.copyProperties(bac, BdAreaCurrencyListsVO.class);
|
||||||
BdAreaCurrencyDetailExt areaCurrencyDetailExt = new BdAreaCurrencyDetailExt();
|
BdAreaCurrencyDetailExt areaCurrencyDetailExt = new BdAreaCurrencyDetailExt();
|
||||||
areaCurrencyDetailExt.setPkAreaCurrency(bac.getPkId().intValue());
|
areaCurrencyDetailExt.setPkAreaCurrency(bac.getPkId().intValue());
|
||||||
List<BdAreaCurrencyDetailExt> detailsList = areaCurrencyDetailService.getAreaCurrencyDetailList(areaCurrencyDetailExt);
|
List<BdAreaCurrencyDetailExt> detailsList = areaCurrencyDetailService.getAreaCurrencyDetailList(areaCurrencyDetailExt);
|
||||||
bacExt.setDetailsList(detailsList);
|
List<BdAreaCurrencyDetailVO> listVO = BeanUtil.copyToList(detailsList, BdAreaCurrencyDetailVO.class);
|
||||||
|
bacExt.setDetailsList(listVO);
|
||||||
listExt.add(bacExt);
|
listExt.add(bacExt);
|
||||||
}
|
}
|
||||||
return getDataTable(listExt);
|
return getDataTable(listExt);
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
package com.hzs.system.config.vo;
|
||||||
|
|
||||||
|
import com.hzs.common.core.annotation.BigDecimalFormat;
|
||||||
|
import com.hzs.common.core.annotation.Transaction;
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BdAreaCurrencyDetailVO {
|
||||||
|
/**
|
||||||
|
* 账户名称
|
||||||
|
*/
|
||||||
|
private String accountName;
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long pkId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 消费配置主键
|
||||||
|
*/
|
||||||
|
private Integer pkAreaCurrency;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账户类型
|
||||||
|
*/
|
||||||
|
|
||||||
|
private Integer pkAccount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除顺序
|
||||||
|
*/
|
||||||
|
private Integer deductSort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除比例
|
||||||
|
*/
|
||||||
|
@BigDecimalFormat
|
||||||
|
private BigDecimal deductRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣款最大比例
|
||||||
|
*/
|
||||||
|
@BigDecimalFormat
|
||||||
|
private BigDecimal deductMaxRatio;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否抵扣账户 (0=是,1=否)
|
||||||
|
*/
|
||||||
|
@Transaction(transactionKey = EnumsPrefixConstants.YES_NO)
|
||||||
|
private Integer isDeduction;
|
||||||
|
/**
|
||||||
|
* 是否抵扣账户 (0=是,1=否)
|
||||||
|
*/
|
||||||
|
private String isDeductionVal;
|
||||||
|
}
|
|
@ -0,0 +1,47 @@
|
||||||
|
package com.hzs.system.config.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.hzs.common.core.annotation.Excel;
|
||||||
|
import com.hzs.common.core.annotation.Transaction;
|
||||||
|
import com.hzs.common.core.constant.EnumsPrefixConstants;
|
||||||
|
import com.hzs.common.core.web.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class BdAreaCurrencyListsVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属专区
|
||||||
|
*/
|
||||||
|
@Transaction(transactionKey = EnumsPrefixConstants.SPECIAL_AREA)
|
||||||
|
private Integer specialArea;
|
||||||
|
/**
|
||||||
|
* 所属专区名称
|
||||||
|
*/
|
||||||
|
private String specialAreaVal;
|
||||||
|
/**
|
||||||
|
* 扣除顺序
|
||||||
|
*/
|
||||||
|
private String deductSortName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生效日期
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date effectiveDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date creationTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扣除顺序集合
|
||||||
|
**/
|
||||||
|
List<BdAreaCurrencyDetailVO> detailsList;
|
||||||
|
}
|
Loading…
Reference in New Issue