From b97caf1162fcecd52b25cc942864691bbd3ed066 Mon Sep 17 00:00:00 2001 From: zhanghua <314079846@qq.com> Date: 星期四, 17 十一月 2022 17:40:39 +0800 Subject: [PATCH] 文书管理 --- ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml b/ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml index 0def7c2..d2ce81b 100644 --- a/ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml +++ b/ycl-platform/src/main/resources/mapper/caseHandler/WritMapper.xml @@ -23,20 +23,33 @@ <result column="create_time" property="createTime"/> </resultMap> + <resultMap id="VoMap" type="com.ycl.vo.writ.WritVO" extends="BaseResultMap"> + <result column="writ_type_name" property="writTypeName" jdbcType="VARCHAR"/> + <result column="category_name" property="categoryName" jdbcType="VARCHAR"/> + <result column="event_code" property="eventCode" jdbcType="VARCHAR"/> + <result column="template_code" property="templateCode" jdbcType="VARCHAR"/> + + </resultMap> <!-- 閫氱敤鏌ヨ缁撴灉鍒� --> <sql id="Base_Column_List"> base_case_id , illegal_building_id, writ_type, writ_code, illegal_type, send_time, limit_time, send_content, rectify_time, rectify_situation, remark, writ_pic, original_pic, rectified_pic, othen_pic, create_user, create_time </sql> - <select id="selectWritPage" resultType="com.ycl.vo.writ.WritVO"> - SELECT t1.*, t2.`name` as writTemplateName - FROM ums_writ t1 - LEFT JOIN ums_writ_template t2 on t1.writ_type = t2.id + <select id="selectWritPage" resultMap="VoMap"> + SELECT w.*, wt.`name` as writ_type_name,bc.`code` event_code,dd.`name` category_name,wt.code template_code + FROM ums_writ w + LEFT JOIN ums_writ_template wt on w.writ_type = wt.id + LEFT JOIN ums_illegal_building ib on w.illegal_building_id = ib.base_case_id + LEFT JOIN ums_data_dictionary dd on ib.category_id = dd.id + LEFT JOIN ums_base_case bc on ib.base_case_id = bc.id <where> - <if test="writType != null"> - t1.writ_type=#{writType} + <if test="keyword != null"> + w.writ_code like CONCAT('%',#{keyword},'%') + or bc.`code` like CONCAT('%',#{keyword},'%') + or wt.name like CONCAT('%',#{keyword},'%') </if> </where> + order by w.create_time desc </select> </mapper> -- Gitblit v1.8.0