shenyijian
2024-06-27 b1e84b26d0b0f254d5e000092ce9f0ef56a1304c
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml
@@ -26,6 +26,35 @@
            and report.report_user = #{dto.reportPerson}
        </if>
    </select>
    <select id="queryPageListAll" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        SELECT
        report.*,
        de.device_name,
        de.device_type,
        dict."DICT_VALUE" as typeName
        FROM
        ywxt.SG_PROGRESS_REPORT report
        LEFT JOIN ywxt.sg_device de ON report.gx_device_id = de.id
        left join YWXT."BLADE_DICT_BIZ" as dict  on de.device_type=dict.DICT_KEY  and dict.CODE='SG_DEVICE_TYPE'
        where 1=1 and report."STATUS" != 4
        <if test="dto.projectName != null and dto.projectName != ''">
            and report.PROGRAM_NAME like CONCAT(CONCAT('%',#{dto.projectName}),'%')
        </if>
        <if test="dto.deviceName != null and dto.deviceName != ''">
            and de.device_name like CONCAT(CONCAT('%', #{dto.deviceName}), '%')
        </if>
        <if test="dto.status != null ">
            and report.status = #{dto.status}
        </if>
        <if test="dto.startTime != null and dto.startTime != ''">
            and report.create_time &gt;= #{dto.startTime}
        </if>
        <if test="dto.endTime != null and dto.endTime != ''">
            and report.create_time &lt;= #{dto.endTime}
        </if>
    </select>
    <select id="queryById" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        select * from  SG_PROGRESS_REPORT report where id = #{id}
    </select>
@@ -49,7 +78,7 @@
        left join YWXT."BLADE_DICT_BIZ" as dict  on de.device_type=dict.DICT_KEY  and dict.CODE='SG_DEVICE_TYPE'
        LEFT JOIN ywxt.sg_report_user userR ON report.id = userR.report_id
        WHERE
        1 = 1
        1 = 1 and report."STATUS" != 4
       <!-- AND userR.is_his = 0 -->
        <if test="dto.projectName != null and dto.projectName != ''">
            and report.PROGRAM_NAME like CONCAT(CONCAT('%',#{dto.projectName}),'%')