吉安感知网项目-后端
linwei
2026-01-22 1510366fa12fafd5197ebcd8d7fbc45d2383218d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.sxkj.gd.orderdata.mapper.GdDataObjectionMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="gdDataObjectionResultMap" type="org.sxkj.gd.orderdata.vo.GdDataObjectionVO">
        <result column="id" property="id"/>
        <result column="title" property="title"/>
        <result column="objection_type" property="objectionType"/>
        <result column="objection_status" property="objectionStatus"/>
        <result column="catalog_resource_name" property="catalogResourceName"/>
        <result column="submitter" property="submitter"/>
        <result column="submitter_contact" property="submitterContact"/>
        <result column="handle_unit" property="handleUnit"/>
        <result column="objection_desc" property="objectionDesc"/>
        <result column="objection_basis" property="objectionBasis"/>
        <result column="other_objection_detail" property="otherObjectionDetail"/>
        <result column="review_opinion" property="reviewOpinion"/>
        <result column="area_code" property="areaCode"/>
        <result column="attach_names" property="attachNames"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
 
 
    <select id="selectGdDataObjectionPage" resultMap="gdDataObjectionResultMap">
        select do.*, GROUP_CONCAT(da.attach_name SEPARATOR ',') as attach_names
        from ja_gd_data_objection do
        left join ja_gd_data_objection_attachment da on do.id = da.objection_id
        <where>
            <if test="param2.title != null and param2.title != ''">
                and do.title like concat('%',#{param2.title},'%')
            </if>
            <if test="param2.objectionStatus != null and param2.objectionStatus != ''">
                and do.objection_status = #{param2.objectionStatus}
            </if>
        </where>
        group by do.id
    </select>
 
 
    <select id="exportGdDataObjection" resultType="org.sxkj.gd.orderdata.excel.GdDataObjectionExcel">
        SELECT * FROM ja_gd_data_objection ${ew.customSqlSegment}
    </select>
 
    <select id="getDetail" resultType="org.sxkj.gd.orderdata.vo.GdDataObjectionVO">
        select do.*, GROUP_CONCAT(da.attach_name SEPARATOR ',') as attach_names ,GROUP_CONCAT(da.attach_id SEPARATOR ',') as attach_ids
        from ja_gd_data_objection do
        left join ja_gd_data_objection_attachment da on do.id = da.objection_id
        <where>
            <if test="id != null ">
                and do.id = #{id}
            </if>
        </where>
        group by do.id
    </select>
 
</mapper>