吉安感知网项目-后端
linwei
8 days ago 8585b431e9257333413358eb37c30ae58f74db76
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/mapper/GdSupplyDemandMapper.xml
@@ -29,6 +29,8 @@
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>
    <resultMap id="gdSupplyDemandVOResultMap" type="org.sxkj.gd.orderdata.vo.GdSupplyDemandVO" extends="gdSupplyDemandResultMap"/>
    <sql id="gdSupplyDemandCondition">
        <if test="param.id != null">
            AND id = #{param.id}
@@ -113,21 +115,22 @@
            <include refid="gdSupplyDemandCondition"/>
            <if test="deptIdList != null and deptIdList.size > 0">
                AND (
                    create_dept IN
                    <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
                        #{deptId}
                    </foreach>
                    OR apply_target_dept_id IN
                    <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
                        #{deptId}
                    </foreach>
                create_dept::text IN
                <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
                    #{deptId}::text
                </foreach>
                OR
                apply_target_dept_id::text IN
                <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
                    #{deptId}::text
                </foreach>
                )
            </if>
        </where>
        limit 1
    </select>
    <select id="selectGdSupplyDemandPage" resultMap="gdSupplyDemandResultMap">
    <select id="selectGdSupplyDemandPage" resultMap="gdSupplyDemandVOResultMap">
        select * from ja_gd_supply_demand
        <where>
            is_deleted = 0
@@ -137,15 +140,15 @@
            <if test="param.demandStatus != null and param.demandStatus != ''">
                AND demand_status = #{param.demandStatus}
            </if>
            <if test="deptIdList != null and deptIdList.size > 0">
            <if test="param.deptList != null and param.deptList.size > 0">
                AND (
                    create_dept IN
                    <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
                        #{deptId}
                    create_dept::text IN
                    <foreach collection="param.deptList" item="deptId" open="(" separator="," close=")">
                        #{deptId}::text
                    </foreach>
                    OR apply_target_dept_id IN
                    <foreach collection="deptIdList" item="deptId" open="(" separator="," close=")">
                        #{deptId}
                    OR apply_target_dept_id::text IN
                    <foreach collection="param.deptList" item="deptId" open="(" separator="," close=")">
                        #{deptId}::text
                    </foreach>
                )
            </if>