feat(cost): 添加单价字段和使用单价标识功能
- 在CostProdMetric实体类中添加usePrice字段,用于标识是否使用单价 - 更新CostProdMetricBo、CostProdMetricVo数据传输对象,增加单价相关属性 - 修改CostProdMetricMapper.xml映射文件,添加usePrice字段映射配置 - 扩展CostProdMetricServiceImpl查询逻辑,支持按是否使用单价进行筛选 - 更新前端metric.vue页面,添加单价输入框和是否使用单价下拉选择组件 - 实现表格中单价列的显示和编辑功能,并增加条件查询支持
This commit is contained in:
@@ -42,9 +42,13 @@ public class CostProdMetric extends BaseEntity {
|
||||
*/
|
||||
private String metricFormula;
|
||||
/**
|
||||
* 指标计算结果值
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal metricValue;
|
||||
/**
|
||||
* 是否使用单价 0=否 1=是
|
||||
*/
|
||||
private Integer usePrice;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -44,10 +44,15 @@ public class CostProdMetricBo extends BaseEntity {
|
||||
private String metricFormula;
|
||||
|
||||
/**
|
||||
* 指标计算结果值
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal metricValue;
|
||||
|
||||
/**
|
||||
* 是否使用单价 0=否 1=是
|
||||
*/
|
||||
private Integer usePrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -52,11 +52,17 @@ public class CostProdMetricVo {
|
||||
private String metricFormula;
|
||||
|
||||
/**
|
||||
* 指标计算结果值
|
||||
* 单价
|
||||
*/
|
||||
@ExcelProperty(value = "指标计算结果值")
|
||||
@ExcelProperty(value = "单价")
|
||||
private BigDecimal metricValue;
|
||||
|
||||
/**
|
||||
* 是否使用单价 0=否 1=是
|
||||
*/
|
||||
@ExcelProperty(value = "是否使用单价")
|
||||
private Integer usePrice;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@@ -66,6 +66,7 @@ public class CostProdMetricServiceImpl implements ICostProdMetricService {
|
||||
lqw.like(StringUtils.isNotBlank(bo.getMetricName()), CostProdMetric::getMetricName, bo.getMetricName());
|
||||
lqw.eq(StringUtils.isNotBlank(bo.getMetricFormula()), CostProdMetric::getMetricFormula, bo.getMetricFormula());
|
||||
lqw.eq(bo.getMetricValue() != null, CostProdMetric::getMetricValue, bo.getMetricValue());
|
||||
lqw.eq(bo.getUsePrice() != null, CostProdMetric::getUsePrice, bo.getUsePrice());
|
||||
return lqw;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user