shenyijian
2024-09-14 b1415ac2adf2f31f41ea655d1824235f4b0ba1d9
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml
@@ -66,7 +66,8 @@
    </select>
    <select id="queryById" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        select * from  SG_PROGRESS_REPORT report where id = #{id}
        select report.*,si.control_unit,si.self_unit,dria."county_cd" from  SG_PROGRESS_REPORT report  LEFT JOIN ywxt.SG_PROJECT_INFO si ON report.profram_id = si.id
                                                  LEFT JOIN SJZT_DW."dim_res_info_a" dria ON dria."res_cd" = si.sk_id where report.id = #{id}
    </select>
    <select id="queryList" resultType="cn.gistack.sm.sg.VO.SgProgressReportVO">
        SELECT distinct
@@ -99,7 +100,10 @@
            and  si.CONTROL_UNIT=#{dto.userUnit}
        </if>
        <if test="dto.roleUnit != null and dto.roleUnit != ''">
            and userR.role_id=#{dto.roleUnit} and report.audit_person = #{dto.roleUnit}
            and userR.role_id=#{dto.roleUnit}
            <if test="dto.approvalStatus == null" >
                and report.audit_person = #{dto.roleUnit}
            </if>
        </if>
       <!-- AND userR.is_his = 0 -->
        <if test="dto.projectName != null and dto.projectName != ''">
@@ -112,7 +116,7 @@
            and userR.user_id = #{dto.userId} and userR.approval_order != 0
        </if>
        <if test="dto.approvalStatus != null and dto.approvalStatus ==0">
            and userR.approval_status = 0 and report.audit_person = #{dto.auditPerson} and (report."STATUS" = 0 or report."STATUS" = 1)
            and userR.approval_status = 0 and report.audit_person = #{dto.roleUnit} and (report."STATUS" = 0 or report."STATUS" = 1)
        </if>
        <if test="dto.approvalStatus != null and dto.approvalStatus ==1">
           and userR.approval_status = 1