add:增加搜索条件

This commit is contained in:
2025-02-12 22:37:01 +08:00
parent 3eb688cdf1
commit c2eb2288ac
4 changed files with 9 additions and 8 deletions

View File

@@ -13,7 +13,10 @@
<where>
1=1
<if test="query.search != null and query.search != ''">
and def.model_key LIKE '%${query.search}%'
and (def.name LIKE '%${query.search}%' or CAST(form_data AS CHAR) LIKE '%${query.search}%')
</if>
<if test="query.status != null and query.status != ''">
and exe.status = '${query.status}'
</if>
<if test="query.proc_inst_id != null and query.proc_inst_id != ''">
and exe.parent_id is null

View File

@@ -16,7 +16,7 @@ public class ExecutionQuery extends BaseQuery<ActRuExecution> {
private String search;
private String status;
private String proc_inst_id;
private String child_id;

View File

@@ -56,6 +56,7 @@ public class ActRuExecutionServiceImpl extends ServiceImpl<ActRuExecutionMapper,
query.setChild_id(StringUtils.isNotBlank(query.getChild_id())?query.getChild_id().trim():query.getChild_id());
query.setProc_inst_id(StringUtils.isNotBlank(query.getProc_inst_id())?query.getProc_inst_id().trim():query.getProc_inst_id());
query.setSearch(StringUtils.isNotBlank(query.getSearch())?query.getSearch().trim():query.getSearch());
query.setStatus(StringUtils.isNotBlank(query.getStatus())?query.getStatus().trim():query.getStatus());
List<Map> list = actRuExecutionMapper.pageGetAll(query, pageQuery);
TableDataInfo<Map> build = TableDataInfo.build(list);
build.setTotalElements(page.getTotal());

View File

@@ -114,6 +114,9 @@
pm_form_data
left join md_me_materialbase on pm_form_data.material_id = md_me_materialbase.material_id
<where>
<if test="query.search != null and query.search != ''">
and form_data LIKE '%${query.search}%'
</if>
<if test="query.form_type != null and query.form_type != ''">
and form_type = #{query.form_type}
</if>
@@ -129,12 +132,6 @@
<if test="query.end_time != null and query.end_time != ''">
and #{query.end_time} >= pm_form_data.create_time
</if>
<if test="query.code != null and query.code != ''">
and code = #{query.code}
</if>
<if test="query.search != null and query.search != ''">
and code = #{query.search}
</if>
<if test="query.status != null and query.status != ''">
and pm_form_data.status IN
<foreach collection="query.status" item="status" separator="," open="(" close=")">