ソースを参照

web首页,人员统计,根据服务中心校验

LiRong 3 ヶ月 前
コミット
ba9edc7826

+ 2 - 2
leromro-core/src/main/java/com/leromro/core/service/impl/VolunteerInfoServiceImpl.java

@@ -315,8 +315,8 @@ public class VolunteerInfoServiceImpl extends ServiceImpl<VolunteerInfoMapper, V
     @Override
     public  List<BusinessManagementVO> searchBusinessTypeList(VolunteerListDTO volunteerInfo) {
         List<BusinessManagementVO> list = volunteerInfoMapper.searchBusinessTypeList(volunteerInfo);
-        List<BusinessManagementVO> treeList = iBusinessManagementService.getTreeList(0L).getData();
-        list = ForestNodeMerger.nbMerge(list,treeList);
+        List<BusinessManagementVO> data = iBusinessManagementService.getTreeList(0L).getData();
+        list = ForestNodeMerger.nbMerge(list,data);
         return list;
     }
 

+ 4 - 1
leromro-core/src/main/resources/mapper/core/VolunteerInfoMapper.xml

@@ -82,7 +82,10 @@
     </select>
     <select id="selectVolunteerGroupByUserId" resultType="com.leromro.core.domain.VolunteerInfo">
         select lvi.volunteer_id ,s.create_time  from sys_user s left join l_volunteer_info lvi on s.user_id = lvi.volunteer_id
-        where s.del_flag = 0 and s.user_platform = 0 and lvi.volunteer_id and s.service_centre_id = #{user.serviceCentreId}
+        <where>
+            s.del_flag = 0 and s.user_platform = 0 and lvi.volunteer_id
+            <if test="user.serviceCentreId != null ">s.service_centre_id = #{user.serviceCentreId}</if>
+        </where>
         group by lvi.volunteer_id
     </select>
     <select id="selectVolunteerPictureList" resultType="java.lang.String" parameterType="java.lang.Long">

+ 5 - 1
leromro-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -180,7 +180,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		where user_id = #{userId}
 	</select>
 	<select id="selectClientList" resultType="com.leromro.common.core.domain.entity.SysUser">
-		select * from sys_user where  user_open_id is not null and  user_platform = 0 and del_flag = 0 and service_centre_id =#{user.deptId}
+		select * from sys_user
+		<where>
+		    user_open_id is not null and  user_platform = 0 and del_flag = 0
+			<if test="user.deptId != null ">service_centre_id =#{user.deptId}</if>
+		</where>
 	</select>
 
 	<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">