shenyijian
2024-09-20 0aa9af7bc8e34d539c990c5d714e24092a2d53e7
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml
@@ -84,7 +84,7 @@
        DBMS_LOB.SUBSTR(report.video_urls) videoUrls,
        de.device_name,
        de.device_type,
        userR.approval_status,
        MAX(userR.approval_status) as approval_status,
        dict."DICT_VALUE" as typeName,
        si.control_unit,si.self_unit,dria."county_cd"
        FROM
@@ -100,7 +100,7 @@
            and  si.CONTROL_UNIT=#{dto.userUnit}
        </if>
        <if test="dto.countryUnit != null and dto.countryUnit != ''">
            and dria."county_cd"=#{dto.userUnit}
            and dria."county_cd"=#{dto.countryUnit}
        </if>
        <if test="dto.roleUnit != null and dto.roleUnit != ''">
            and userR.role_id=#{dto.roleUnit}
@@ -130,6 +130,24 @@
        <if test="dto.endTime != null and dto.endTime !='' ">
            and report.report_time &lt;= #{dto.endTime}
        </if>
        group by
        report.id,
        report.program_name,
        report.gx_step_name,
        report."STATUS",
        report.audit_person,
        report.report_time,
        report.create_time,
        report.gx_progress,
        report.remark,
        DBMS_LOB.SUBSTR( report.images_urls) ,
        DBMS_LOB.SUBSTR( report.video_urls ) ,
        de.device_name,
        de.device_type,
        dict."DICT_VALUE" ,
        si.control_unit,
        si.self_unit,
        dria."county_cd"
        order by report.report_time desc
        <!--<choose >
            <when test="dto.approvalStatus != null and dto.approvalStatus == 0">
@@ -213,4 +231,13 @@
        select  u.* from ywxt.sg_report_user u left join  ywxt.sg_progresss_report r on u.report_id = r.id
        where 1=1 and r.profram_id = #{programId}
    </select>
    <select id="getRoleByIds" resultType="java.util.Map">
        select id,role_name as roleName from "YWXT"."BLADE_ROLE" WHERE 1=1
        <if test="ids != null and ids.size>0">
            AND id in
            <foreach collection="ids" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
    </select>
</mapper>