anderx 4 years ago
parent
commit
6f3af2e9f4

+ 3 - 1
src/main/java/com/goafanti/admin/service/impl/AdminServiceImpl.java

@@ -28,7 +28,6 @@ import com.goafanti.common.dao.UserBusinessMapper;
 import com.goafanti.common.dao.UserLockReleaseMapper;
 import com.goafanti.common.dao.UserRoleMapper;
 import com.goafanti.common.model.Admin;
-import com.goafanti.common.model.OrganizationManagement;
 import com.goafanti.common.model.UserBusiness;
 import com.goafanti.common.utils.LoggerUtils;
 import com.goafanti.common.utils.PasswordUtil;
@@ -373,6 +372,9 @@ public class AdminServiceImpl extends BaseMybatisDao<AdminMapper> implements Adm
 			OrganizationListOut oo=organizationManagementMapper.selectAllById(depId);
 			acb.setName(oo.getName());
 			deps=organizationManagementMapper.selectBysuperName(acb.getName());
+		}else {
+			acb.setName("总计");
+			deps=organizationManagementMapper.selectAll();
 		}
 		acb.setCompleteCount(0);
 		acb.setInputCount(0);

+ 2 - 0
src/main/java/com/goafanti/common/dao/OrganizationManagementMapper.java

@@ -125,6 +125,7 @@ public interface OrganizationManagementMapper {
 	List<OrganizationManagement> selectSubDeps(@Param("superIds")String superIds);
 	
 	List<depCountBo> selectBysuperName(@Param("superName")String superName);
+	List<depCountBo> selectAll();
 	/**
 	 * 查询当前集合
 	 * @param adminId
@@ -146,5 +147,6 @@ public interface OrganizationManagementMapper {
 	
 	List<AdminCustomerBo> getDepAll(@Param("depName")String depName,@Param("depId")String depId,
 			@Param("adminName")String adminName,@Param("startTime")String startTime, @Param("endTime")String endTime);
+
 	
 }

+ 8 - 3
src/main/java/com/goafanti/common/mapper/OrganizationManagementMapper.xml

@@ -623,9 +623,14 @@
 		select id,name,dep_no from department where super_id in (#{superIds,jdbcType=VARCHAR})
 	</select>
 	
-		<select id="selectBysuperName"  resultType="com.goafanti.admin.bo.depCountBo">
-		select a.id ,#{superName} ,0 userCount,0 inputCount,0 receiveCount, 0 completeCount, 0 interviewCount
-		from department a left join department b on a.super_id=b.id 
+	<select id="selectBysuperName"  resultType="com.goafanti.admin.bo.depCountBo">
+		select a.id ,a.name ,0 userCount,0 inputCount,0 receiveCount, 0 completeCount, 0 interviewCount
+		from department a left join department b on a.super_id=b.id where b.name= #{superName,jdbcType=VARCHAR}
+	</select>
+	
+	<select id="selectAll" resultType="com.goafanti.admin.bo.depCountBo">
+		select a.id ,a.name ,0 userCount,0 inputCount,0 receiveCount, 0 completeCount, 0 interviewCount
+		from department a left join department b on a.super_id=b.id
 	</select>
 	
 	<!-- 查询所有 -->