补充市级、区级 部门数量
This commit is contained in:
parent
11f38631c1
commit
51becaaae9
|
@ -813,6 +813,7 @@ public class CensusController {
|
||||||
add(new LinkedHashMap<String, Object>() {{
|
add(new LinkedHashMap<String, Object>() {{
|
||||||
put("tip", "区市部门");
|
put("tip", "区市部门");
|
||||||
put("level", "county");
|
put("level", "county");
|
||||||
|
put("dept_count", sysDeptService.countByType(3));
|
||||||
put("apply_sum", county_apply_sum);
|
put("apply_sum", county_apply_sum);
|
||||||
put("resource_sum", county_resource_sum);
|
put("resource_sum", county_resource_sum);
|
||||||
put("resource_weekly_change", finalCounty_resource_weekly_change);
|
put("resource_weekly_change", finalCounty_resource_weekly_change);
|
||||||
|
@ -823,6 +824,7 @@ public class CensusController {
|
||||||
add(new LinkedHashMap<String, Object>() {{
|
add(new LinkedHashMap<String, Object>() {{
|
||||||
put("tip", "市级部门");
|
put("tip", "市级部门");
|
||||||
put("level", "municipal");
|
put("level", "municipal");
|
||||||
|
put("dept_count", sysDeptService.countByType(2));
|
||||||
put("apply_sum", municipal_apply_sum);
|
put("apply_sum", municipal_apply_sum);
|
||||||
put("resource_sum", municipal_resource_sum);
|
put("resource_sum", municipal_resource_sum);
|
||||||
put("resource_weekly_change", finalMunicipal_resource_weekly_change);
|
put("resource_weekly_change", finalMunicipal_resource_weekly_change);
|
||||||
|
|
|
@ -46,4 +46,13 @@ public interface SysDeptDao extends BaseDao<SysDeptEntity> {
|
||||||
|
|
||||||
List<Long> getIdFromDistrict(@Param("district") Long district);
|
List<Long> getIdFromDistrict(@Param("district") Long district);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计部门类型数量
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Long countByType(@Param("type") Integer type);
|
||||||
|
|
||||||
}
|
}
|
|
@ -42,4 +42,6 @@ public interface SysDeptService extends BaseService<SysDeptEntity> {
|
||||||
*/
|
*/
|
||||||
List<Long> getIdFromDistrict(Long district);
|
List<Long> getIdFromDistrict(Long district);
|
||||||
|
|
||||||
|
Long countByType(Integer type);
|
||||||
|
|
||||||
}
|
}
|
|
@ -158,6 +158,11 @@ public class SysDeptServiceImpl extends BaseServiceImpl<SysDeptDao, SysDeptEntit
|
||||||
return baseDao.getIdFromDistrict(district);
|
return baseDao.getIdFromDistrict(district);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long countByType(Integer type) {
|
||||||
|
return baseDao.countByType(type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有上级部门ID
|
* 获取所有上级部门ID
|
||||||
|
|
|
@ -51,5 +51,13 @@
|
||||||
<select id="getIdFromDistrict" resultType="java.lang.Long">
|
<select id="getIdFromDistrict" resultType="java.lang.Long">
|
||||||
SELECT id from sys_dept WHERE district = #{district};
|
SELECT id from sys_dept WHERE district = #{district};
|
||||||
</select>
|
</select>
|
||||||
|
<select id="countByType" resultType="java.lang.Long">
|
||||||
|
SELECT
|
||||||
|
COUNT( id )
|
||||||
|
FROM
|
||||||
|
sys_dept
|
||||||
|
WHERE
|
||||||
|
type = #{type};
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue