shenyijian
2024-06-17 cc873cace93a40068d6bb6130b601b6c3e845b42
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml
@@ -3,7 +3,7 @@
<mapper namespace="cn.gistack.sm.sg.mapper.SgProgressReportMapper">
    <select id="queryPageList" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        select report.* ,re.device_name,re.device_type from  SG_PROGRESS_REPORT report
        select report.* ,de.device_name,de.device_type from  SG_PROGRESS_REPORT report
        left join  ywxt.sg_device de on report.gx_device_id = de.id
        where 1=1
        <if test="dto.projectName != null and dto.projectName != ''">
@@ -13,4 +13,28 @@
    <select id="queryById" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        select * from  SG_PROGRESS_REPORT report where id = #{id}
    </select>
    <select id="queryList" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        select report.* ,de.device_name,de.device_type  from  ywxt.SG_PROGRESS_REPORT report
            left join  ywxt.sg_device de on report.gx_device_id = de.id
            left join ywxt.sg_report_user userR on  report.id = userR.report_id
        where 1=1 and userR.is_his = 0 and userR.approval_order != 0
        <if test="dto.userId != null and dto.userId != ''">
            and userR.user_id = #{dto.userId}
        </if>
        <if test="dto.approvalStatus != null and dto.approvalStatus != ''">
            and userR.approval_status = #{dto.approvalStatus}
        </if>
    </select>
    <select id="countList" resultType="java.lang.Long">
        select count(1) from  ywxt.SG_PROGRESS_REPORT report
        left join  ywxt.sg_device de on report.gx_device_id = de.id
        left join ywxt.sg_report_user userR on  report.id = userR.report_id
        where 1=1 and userR.is_his = 0 and userR.approval_order != 0
        <if test="dto.userId != null and dto.userId != ''">
            and userR.user_id = #{dto.userId}
        </if>
        <if test="dto.approvalStatus != null and dto.approvalStatus != ''">
            and userR.approval_status = #{dto.approvalStatus}
        </if>
    </select>
</mapper>