Commit 271aa6c9 authored by tangwei's avatar tangwei

修改树

parent 601734d0
package com.yeejoin.amos.boot.biz.common.utils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 消防队员树
*
* @author tb
* @date 2021-06-07
*/
@Data
@ApiModel(value="FirefightersTreeDto", description="消防队员树")
public class FirefightersTreeDto {
@ApiModelProperty(value = "岗位code")
private String jobTitleCode;
@ApiModelProperty(value = "数量")
private String num;
}
...@@ -16,27 +16,37 @@ public class Menu { ...@@ -16,27 +16,37 @@ public class Menu {
public Long parentId; public Long parentId;
public Boolean isRoot; public Boolean isRoot;
public List<Menu> children; public List<Menu> children;
public Menu(Long id, String name, Long parentId2) { public int num;
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public Menu(Long id, String name, Long parentId2,int num) {
super(); super();
this.id = id; this.id = id;
this.name = name; this.name = name;
this.parentId = parentId2; this.parentId = parentId2;
this.num = num;
} }
public Menu(Long id, String name, Long parentId, List<Menu> children) { public Menu(Long id, String name, Long parentId, List<Menu> children,int num) {
super(); super();
this.id = id; this.id = id;
this.name = name; this.name = name;
this.parentId = parentId; this.parentId = parentId;
this.children = children; this.children = children;
this.num = num;
} }
public Menu(Long id, String name, Long parentId, Boolean isRoot, List<Menu> children) { public Menu(Long id, String name, Long parentId, Boolean isRoot, List<Menu> children,int num) {
this.id = id; this.id = id;
this.name = name; this.name = name;
this.parentId = parentId; this.parentId = parentId;
this.isRoot = isRoot; this.isRoot = isRoot;
this.children = children; this.children = children;
this.num = num;
} }
public Long getId() { public Long getId() {
......
...@@ -4,6 +4,7 @@ import java.lang.reflect.Method; ...@@ -4,6 +4,7 @@ import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 生成树工具类 * 生成树工具类
* @return * @return
...@@ -21,6 +22,7 @@ public class TreeParser{ ...@@ -21,6 +22,7 @@ public class TreeParser{
* @param IDHierarchy 集合对象获取树id 来源于自己 还是父级( 1自己,2 父级 ,3 父级的父级) * @param IDHierarchy 集合对象获取树id 来源于自己 还是父级( 1自己,2 父级 ,3 父级的父级)
* @param NAMEMethodName 集合对象获取树name 方法名 * @param NAMEMethodName 集合对象获取树name 方法名
* @param PARENTIDMethodName 集合对象获取树父id 方法名 * @param PARENTIDMethodName 集合对象获取树父id 方法名
* @param List<FirefightersTreeDto>
* @return java.util.List<com.yeejoin.amos.boot.module.jcs.api.vo.Menu> * @return java.util.List<com.yeejoin.amos.boot.module.jcs.api.vo.Menu>
* <PRE> * <PRE>
* author tw * author tw
...@@ -28,7 +30,7 @@ public class TreeParser{ ...@@ -28,7 +30,7 @@ public class TreeParser{
* </PRE> * </PRE>
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static List<Menu> getTree(Long topId, @SuppressWarnings("rawtypes") Collection entityList,String packageURL,String IDMethodName,int IDHierarchy, String NAMEMethodName,String PARENTIDMethodName ) throws Exception{ public static List<Menu> getTree(Long topId, @SuppressWarnings("rawtypes") Collection entityList,String packageURL,String IDMethodName,int IDHierarchy, String NAMEMethodName,String PARENTIDMethodName,List<FirefightersTreeDto> list) throws Exception{
List<Menu> resultList=new ArrayList<>(); List<Menu> resultList=new ArrayList<>();
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
Class clazz= Class.forName(packageURL); Class clazz= Class.forName(packageURL);
...@@ -58,13 +60,24 @@ public class TreeParser{ ...@@ -58,13 +60,24 @@ public class TreeParser{
parentId=PARENTIDMethodNameme.invoke(entity)!=null? Long.valueOf(String.valueOf(PARENTIDMethodNameme.invoke(entity))):null; parentId=PARENTIDMethodNameme.invoke(entity)!=null? Long.valueOf(String.valueOf(PARENTIDMethodNameme.invoke(entity))):null;
if(parentId==null||topId==parentId){ if(parentId==null||topId==parentId){
Menu menu=new Menu(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId); String codeString= String.valueOf(IDMethodNameme.invoke(entity));
Integer num=0;
if(list!=null&&list.size()>0) {
for (FirefightersTreeDto map : list) {
if(map.getJobTitleCode().equals(codeString) ){
num=Integer.valueOf((String) map.getNum());
break;
}
};
}
Menu menu=new Menu(Long.valueOf(codeString), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,num);
resultList.add(menu); resultList.add(menu);
} }
} }
//获取每个顶层元素的子数据集合 //获取每个顶层元素的子数据集合
for (Menu entity : resultList) { for (Menu entity : resultList) {
entity.setChildren(getSub(entity.getId(), entityList, packageURL, IDMethodName,IDHierarchy, NAMEMethodName, PARENTIDMethodName)); entity.setChildren(getSub(entity.getId(), entityList, packageURL, IDMethodName,IDHierarchy, NAMEMethodName, PARENTIDMethodName,list));
} }
return resultList; return resultList;
...@@ -74,7 +87,7 @@ public class TreeParser{ ...@@ -74,7 +87,7 @@ public class TreeParser{
* 获取子数据集合 * 获取子数据集合
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
private static List<Menu> getSub(Long topId, @SuppressWarnings("rawtypes") Collection entityList,String packageURL,String IDMethodName,int IDHierarchy,String NAMEMethodName,String PARENTIDMethodName ) throws Exception{ private static List<Menu> getSub(Long topId, @SuppressWarnings("rawtypes") Collection entityList,String packageURL,String IDMethodName,int IDHierarchy,String NAMEMethodName,String PARENTIDMethodName ,List<FirefightersTreeDto> list) throws Exception{
List<Menu> childList=new ArrayList<>(); List<Menu> childList=new ArrayList<>();
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
Class clazz= Class.forName(packageURL); Class clazz= Class.forName(packageURL);
...@@ -104,12 +117,37 @@ public class TreeParser{ ...@@ -104,12 +117,37 @@ public class TreeParser{
if(parentId==null) { if(parentId==null) {
if(topId==parentId){ if(topId==parentId){
Menu menu=new Menu(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId);
String codeString= String.valueOf(IDMethodNameme.invoke(entity));
Integer num=0;
if(list!=null&&list.size()>0) {
for (FirefightersTreeDto map : list) {
if(map.getJobTitleCode().equals(codeString) ){
num=Integer.valueOf((String) map.getNum());
break;
}
};
}
Menu menu=new Menu(Long.valueOf(codeString), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,num);
childList.add(menu); childList.add(menu);
} }
}else { }else {
if(topId.longValue()==parentId.longValue()){ if(topId.longValue()==parentId.longValue()){
Menu menu=new Menu(Long.valueOf(String.valueOf(IDMethodNameme.invoke(entity))), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId);
String codeString= String.valueOf(IDMethodNameme.invoke(entity));
Integer num=0;
if(list!=null&&list.size()>0) {
for (FirefightersTreeDto map : list) {
if(map.getJobTitleCode().equals(codeString) ){
num=Integer.valueOf((String) map.getNum());
break;
}
};
}
Menu menu=new Menu(Long.valueOf(codeString), String.valueOf(NAMEMethodNameme.invoke(entity)), parentId,num);
childList.add(menu); childList.add(menu);
} }
} }
...@@ -118,7 +156,7 @@ public class TreeParser{ ...@@ -118,7 +156,7 @@ public class TreeParser{
//子集的间接子对象 //子集的间接子对象
for (Menu entity : childList) { for (Menu entity : childList) {
entity.setChildren(getSub(entity.getId(), entityList, packageURL, IDMethodName,IDHierarchy, NAMEMethodName, PARENTIDMethodName)); entity.setChildren(getSub(entity.getId(), entityList, packageURL, IDMethodName,IDHierarchy, NAMEMethodName, PARENTIDMethodName,list));
} }
//递归退出条件 //递归退出条件
......
...@@ -4,9 +4,9 @@ import java.util.List; ...@@ -4,9 +4,9 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.biz.common.utils.FirefightersTreeDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto; import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters; import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
...@@ -17,39 +17,16 @@ import com.yeejoin.amos.boot.module.common.api.entity.Firefighters; ...@@ -17,39 +17,16 @@ import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
* @date 2021-06-07 * @date 2021-06-07
*/ */
public interface FirefightersMapper extends BaseMapper<Firefighters> { public interface FirefightersMapper extends BaseMapper<Firefighters> {
/**
*
* 消防人员首页列表
*
***/
//@Select("<script>"
//+ "select a.* from cb_firefighters a LEFT JOIN cb_firefighters_post b on a.sequence_nbr=b.firefighters_id where a.is_delete=0 "
//+ "<if test='par.postQualification!=null'>" + "and b.post_qualification_code = #{par.postQualification}" + "</if>"
//+ "<if test='par.areasExpertise!=null'>" + "and b.areas_expertise_code= #{par.areasExpertise}" + "</if>"
//+ "<if test='par.name!=null'>" + "and a.name= #{par.name}" + "</if>"
//+ "<if test='par.state!=null'>" + "and a.state_code= #{par.state}" + "</if>"
//+ "<if test='par.fireTeamId!=null'>" + "and a.fire_team_id= #{par.fireTeamId}" + "</if>"
//+ "<if test='par.jobTitle!=null'>" + "and a.job_title_code =#{par.jobTitle}" + "</if>"
//+" limit #{pageNum},#{pageSize}"
//+ "</script>")
List<Firefighters>getFirefighters(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FirefightersDto par); List<Firefighters>getFirefighters(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FirefightersDto par);
//@Select("<script>"
//+ "select COUNT(a.sequence_nbr) num from cb_firefighters a LEFT JOIN cb_firefighters_post b on a.sequence_nbr=b.firefighters_id where a.is_delete=0 "
//+ "<if test='par.postQualification!=null'>" + "and b.post_qualification_code = #{par.postQualification}" + "</if>"
//+ "<if test='par.areasExpertise!=null'>" + "and b.areas_expertise_code= #{par.areasExpertise}" + "</if>"
//+ "<if test='par.name!=null'>" + "and a.name= #{par.name}" + "</if>"
//+ "<if test='par.state!=null'>" + "and a.state_code= #{par.state}" + "</if>"
//+ "<if test='par.fireTeamId!=null'>" + "and a.fire_team_id= #{par.fireTeamId}" + "</if>"
//+ "<if test='par.jobTitle!=null'>" + "and a.job_title_code= #{par.jobTitle}" + "</if>"
//+ "</script>")
Map<String, Long>getFirefightersCount(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FirefightersDto par); Map<String, Long>getFirefightersCount(@Param("pageNum")int pageNum,@Param("pageSize")int pageSize,@Param("par")FirefightersDto par);
//@Select("<script>"
//+ "SELECT IFNULL(a.personnel_photos,'') personnelPhotos, a.sequence_nbr sequenceNbr,IFNULL(a.`name`,'无')`name`, IFNULL(a.job_title,'无') jobTitle, IFNULL(b.administrative_position,'无') administrativePosition, IFNULL(c.`name`,'无') fireTeamName, IFNULL(a.state,'无') state, IFNULL(b.employee_hierarchy,'无') employeeHierarchy, IFNULL(b.areas_expertise,'无') areasExpertise, IFNULL(a.gender,'无') gender, IFNULL(b.post_qualification,'无') postQualification,year( from_days( datediff( now( ), a.birthday_time))) age "
//+ " FROM cb_firefighters a LEFT JOIN cb_firefighters_post b ON a.sequence_nbr = b.firefighters_id LEFT JOIN cb_fire_team c on c.sequence_nbr=a.fire_team_id WHERE a.is_delete =0"
//+" and a.sequence_nbr=#{id}"
//+ "</script>")
Map<String, Object> listToSelectById(@Param("id")Long id); Map<String, Object> listToSelectById(@Param("id")Long id);
List<FirefightersTreeDto> getFirefightersJobTitleCount();
} }
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.service; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.common.api.service;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto; import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters; import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
...@@ -18,4 +19,5 @@ public interface IFirefightersService { ...@@ -18,4 +19,5 @@ public interface IFirefightersService {
List<Firefighters>getFirefighters(int pageNum,int pageSize,FirefightersDto par); List<Firefighters>getFirefighters(int pageNum,int pageSize,FirefightersDto par);
Map<String, Long>getFirefightersCount(int pageNum,int pageSize,FirefightersDto par); Map<String, Long>getFirefightersCount(int pageNum,int pageSize,FirefightersDto par);
Map<String, Object> listToSelectById(Long id); Map<String, Object> listToSelectById(Long id);
List<Menu> getFirefightersJobTitleCount()throws Exception;
} }
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
and a.sequence_nbr=#{id} and a.sequence_nbr=#{id}
</select> </select>
<select id="getFirefightersJobTitleCount" resultType="com.yeejoin.amos.boot.biz.common.utils.FirefightersTreeDto">
select COUNT(a.sequence_nbr) num, a.job_title_code jobTitleCode from cb_firefighters a where a.is_delete=0 GROUP BY a.job_title_code
</select>
</mapper> </mapper>
...@@ -171,7 +171,7 @@ public class DataDictionaryController extends BaseController { ...@@ -171,7 +171,7 @@ public class DataDictionaryController extends BaseController {
return ResponseHelper.buildResponse(obj); return ResponseHelper.buildResponse(obj);
}else{ }else{
Collection<DataDictionary> list=iDataDictionaryService.list(queryWrapper); Collection<DataDictionary> list=iDataDictionaryService.list(queryWrapper);
List<Menu> menus =TreeParser.getTree(null, list, DataDictionary.class.getName(),"getCode",0, "getName", "getParent"); List<Menu> menus =TreeParser.getTree(null, list, DataDictionary.class.getName(),"getCode",0, "getName", "getParent",null);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE+type, JSON.toJSON(menus),time); redisUtils.set(RedisKey.DATA_DICTIONARY_CODE+type, JSON.toJSON(menus),time);
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
...@@ -191,7 +191,7 @@ public class DataDictionaryController extends BaseController { ...@@ -191,7 +191,7 @@ public class DataDictionaryController extends BaseController {
return ResponseHelper.buildResponse(obj); return ResponseHelper.buildResponse(obj);
} else { } else {
Collection<DataDictionary> list = iDataDictionaryService.list(queryWrapper); Collection<DataDictionary> list = iDataDictionaryService.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName", "getParent"); List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName", "getParent",null);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time); redisUtils.set(RedisKey.DATA_DICTIONARY_CODE + type, JSON.toJSON(menus), time);
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
......
...@@ -196,8 +196,8 @@ public class FireExpertsController extends BaseController { ...@@ -196,8 +196,8 @@ public class FireExpertsController extends BaseController {
Collection<DataDictionary> list = dataDictionaryService.list(queryWrapper); Collection<DataDictionary> list = dataDictionaryService.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName" List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName"
, "getParent"); , "getParent",null);
Menu menu = new Menu(-1L, "专家领域", -1L, menus); Menu menu = new Menu(-1L, "专家领域", -1L, menus,0);
List<Menu> menuList = new ArrayList<>(); List<Menu> menuList = new ArrayList<>();
menuList.add(menu); menuList.add(menu);
// 创建挂在主节点 // 创建挂在主节点
......
package com.yeejoin.amos.boot.module.common.biz.service.impl; package com.yeejoin.amos.boot.module.common.biz.service.impl;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.biz.common.utils.FirefightersTreeDto;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.TreeParser;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto; import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.entity.Firefighters; import com.yeejoin.amos.boot.module.common.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.common.api.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.module.common.api.mapper.FirefightersMapper; import com.yeejoin.amos.boot.module.common.api.mapper.FirefightersMapper;
import com.yeejoin.amos.boot.module.common.api.service.IFirefightersService; import com.yeejoin.amos.boot.module.common.api.service.IFirefightersService;
/** /**
* 消防队员 服务实现类 * 消防队员 服务实现类
* *
* @author tb * @author tb
* @date 2021-06-07 * @date 2021-06-07
*/ */
@Service @Service
public class FirefightersServiceImpl extends BaseService<FirefightersDto,Firefighters,FirefightersMapper> implements IFirefightersService { public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefighters, FirefightersMapper>
implements IFirefightersService {
@Autowired
FirefightersMapper firefightersMapper;
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
@Autowired
FirefightersMapper firefightersMapper;
@Override @Override
public List<Firefighters> getFirefighters(int pageNum, int pageSize, FirefightersDto par) { public List<Firefighters> getFirefighters(int pageNum, int pageSize, FirefightersDto par) {
return firefightersMapper.getFirefighters(pageNum, pageSize, par); return firefightersMapper.getFirefighters(pageNum, pageSize, par);
} }
@Override @Override
public Map<String, Long> getFirefightersCount(int pageNum, int pageSize, FirefightersDto par) { public Map<String, Long> getFirefightersCount(int pageNum, int pageSize, FirefightersDto par) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return firefightersMapper.getFirefightersCount(pageNum, pageSize, par); return firefightersMapper.getFirefightersCount(pageNum, pageSize, par);
} }
...@@ -41,4 +54,16 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto,Firefig ...@@ -41,4 +54,16 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto,Firefig
return firefightersMapper.listToSelectById(id); return firefightersMapper.listToSelectById(id);
} }
@Override
public List<Menu> getFirefightersJobTitleCount() throws Exception {
QueryWrapper<DataDictionary> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("type", "GWMC");
queryWrapper.orderByAsc("sort_num");
Collection<DataDictionary> list = iDataDictionaryService.list(queryWrapper);
List<Menu> menus = TreeParser.getTree(null, list, DataDictionary.class.getName(), "getCode", 0, "getName",
"getParent", firefightersMapper.getFirefightersJobTitleCount());
return menus;
}
} }
...@@ -132,7 +132,7 @@ public class FireTeamController extends BaseController { ...@@ -132,7 +132,7 @@ public class FireTeamController extends BaseController {
columnMap.put("is_delete", 0); columnMap.put("is_delete", 0);
Collection<FireTeam> list = iFireTeamService.listByMap(columnMap); Collection<FireTeam> list = iFireTeamService.listByMap(columnMap);
List<Menu> menus = TreeParser.getTree(null, list, FireTeam.class.getName(), "getSequenceNbr", 2, "getName", List<Menu> menus = TreeParser.getTree(null, list, FireTeam.class.getName(), "getSequenceNbr", 2, "getName",
"getParent"); "getParent",null);
return ResponseHelper.buildResponse(menus); return ResponseHelper.buildResponse(menus);
} }
......
...@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; ...@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.utils.Menu;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils; import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...@@ -272,5 +273,24 @@ public class FirefightersController extends BaseController { ...@@ -272,5 +273,24 @@ public class FirefightersController extends BaseController {
pageBean.setRecords(list); pageBean.setRecords(list);
return ResponseHelper.buildResponse(pageBean); return ResponseHelper.buildResponse(pageBean);
} }
/**
* 岗位树,带统计
* @param id
* @return
* @throws Exception
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/getFirefightersJobTitleCount", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "根据id查询", notes = "根据id查询")
public ResponseModel<Object> getFirefightersJobTitleCount() throws Exception{
List<Menu> menus = iFirefightersService.getFirefightersJobTitleCount();
return ResponseHelper.buildResponse(menus);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment