feat(cost): 为成本项新增查询条件
- 在CostItem实体类、Bo业务对象和Vo视图对象中新增queryCondition字段,用于存储JSON格式的查询条件 - 更新CostItemMapper.xml映射文件以支持新字段的数据映射 - 在CostItemServiceImpl服务实现中添加新字段的查询条件支持,实现按查询条件过滤成本项的功能
This commit is contained in:
@@ -44,6 +44,10 @@ public class CostItem extends BaseEntity {
|
|||||||
* 备注
|
* 备注
|
||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 查询条件(JSON格式)
|
||||||
|
*/
|
||||||
|
private String queryCondition;
|
||||||
/**
|
/**
|
||||||
* 删除标识 0=正常 2=删除
|
* 删除标识 0=正常 2=删除
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -47,5 +47,10 @@ public class CostItemBo extends BaseEntity {
|
|||||||
*/
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件(JSON格式)
|
||||||
|
*/
|
||||||
|
private String queryCondition;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,5 +55,11 @@ public class CostItemVo {
|
|||||||
@ExcelProperty(value = "备注")
|
@ExcelProperty(value = "备注")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询条件(JSON格式)
|
||||||
|
*/
|
||||||
|
@ExcelProperty(value = "查询条件(JSON格式)")
|
||||||
|
private String queryCondition;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ public class CostItemServiceImpl implements ICostItemService {
|
|||||||
lqw.like(StringUtils.isNotBlank(bo.getItemName()), CostItem::getItemName, bo.getItemName());
|
lqw.like(StringUtils.isNotBlank(bo.getItemName()), CostItem::getItemName, bo.getItemName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getCategory()), CostItem::getCategory, bo.getCategory());
|
lqw.eq(StringUtils.isNotBlank(bo.getCategory()), CostItem::getCategory, bo.getCategory());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CostItem::getUnit, bo.getUnit());
|
lqw.eq(StringUtils.isNotBlank(bo.getUnit()), CostItem::getUnit, bo.getUnit());
|
||||||
|
lqw.eq(StringUtils.isNotBlank(bo.getQueryCondition()), CostItem::getQueryCondition, bo.getQueryCondition());
|
||||||
return lqw;
|
return lqw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="category" column="category"/>
|
<result property="category" column="category"/>
|
||||||
<result property="unit" column="unit"/>
|
<result property="unit" column="unit"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
|
<result property="queryCondition" column="query_condition"/>
|
||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="createBy" column="create_by"/>
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time"/>
|
<result property="createTime" column="create_time"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user