From b1415ac2adf2f31f41ea655d1824235f4b0ba1d9 Mon Sep 17 00:00:00 2001
From: shenyijian <1178253012@qq.com>
Date: Sat, 14 Sep 2024 19:16:09 +0800
Subject: [PATCH] 湖北水库:审批驳回修复

---
 skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml b/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml
index a161771..d639aae 100644
--- a/skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/sg/mapper/SgProgressReportMapper.xml
+++ b/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

--
Gitblit v1.9.3