Просмотр исходного кода

修复tlhhup组织功能 上级组织被回退的

wuxw лет назад: 6
Родитель
Сommit
761cbea1bc

+ 11 - 9
java110-db/src/main/resources/mapper/user/OrgServiceDaoImplMapper.xml

@@ -85,13 +85,14 @@
     <select id="getOrgInfo" parameterType="Map" resultType="Map">
         select t.org_name,t.org_name orgName,t.parent_org_id,t.parent_org_id
         parentOrgId,t.description,t.org_level,t.org_level orgLevel,td.name orgLevelName,t.status_cd,t.status_cd
-        statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.org_id,t.org_id orgId
-        from u_org t,t_dict td
+        statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id bId,t.org_id,t.org_id orgId,uo.org_name parentOrgName
+        from u_org t,t_dict td,u_org uo
         where 1 =1
         and t.org_level = td.status_cd
         and td.table_name='u_org'
         and td.table_columns = 'org_level'
-        and t.status_cd = '0'
+        and t.parent_org_id = uo.org_id
+        and uo.status_cd = '0'
         <if test="orgName !=null and orgName != ''">
             and t.org_name= #{orgName}
         </if>
@@ -157,12 +158,13 @@
     <!-- 查询组织数量 add by wuxw 2018-07-03 -->
     <select id="queryOrgsCount" parameterType="Map" resultType="Map">
         select count(1) count
-            from u_org t,t_dict td
+        from u_org t,t_dict td,u_org uo
         where 1 =1
-            and t.org_level = td.status_cd
-            and td.table_name='u_org'
-            and td.table_columns = 'org_level'
-            and t.status_cd = '0'
+        and t.org_level = td.status_cd
+        and td.table_name='u_org'
+        and td.table_columns = 'org_level'
+        and t.parent_org_id = uo.org_id
+        and uo.status_cd = '0'
         <if test="orgName !=null and orgName != ''">
             and t.org_name= #{orgName}
         </if>
@@ -205,4 +207,4 @@
         ]]>
     </select>
 
-</mapper>
+</mapper>