Commit 5c6a3ac0 authored by chenhao's avatar chenhao

提交对于消防队伍和消防人的接口

parent fa7c814a
......@@ -165,5 +165,13 @@ public class FirefightersServiceImpl extends BaseService<FirefightersDto, Firefi
wrapper.select(Firefighters::getMobilePhone);
return this.baseMapper.selectMaps(wrapper);
}
public List<Map<String, Object>> getAllFirefightersPerson() {
LambdaQueryWrapper<Firefighters> wrapper = new LambdaQueryWrapper<Firefighters>();
wrapper.eq(Firefighters::getIsDelete, false);
wrapper.eq(Firefighters::getStateCode, "94");//在职
wrapper.select(Firefighters::getName,Firefighters::getEmployeeNumber);
return this.baseMapper.selectMaps(wrapper);
}
}
......@@ -7,8 +7,6 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -267,4 +265,17 @@ public class FireTeamController extends BaseController {
public Object getFirstAidForTypeCodeAndCompanyId(String code, String typeCode,Long companyId) {
return ResponseHelper.buildResponse(iFireTeamService.getFirstAidForTypeCodeAndCompanyId(code,typeCode,companyId));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/find/fireTeam/designated/department", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "消防队伍 中的 类型为【企(事)业单位专职消防救援队】队伍", notes = "消防队伍 中的 类型为【企(事)业单位专职消防救援队】队伍")
public ResponseModel<List<Menu>> getFirstTeamToDesignatedDepartment() throws Exception {
return ResponseHelper.buildResponse(iFireTeamService.getFirstTeamToDesignatedDepartment());
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/find/departmentTree", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = " 消防队伍中 消救部 下的 类型为【企(事)业单位专职消防救援队】的队伍", notes = " 消防队伍中 消救部下的 类型为【企(事)业单位专职消防救援队】的队伍")
public ResponseModel<List<Menu>> getFirstTeamToDesignatedDepartment(@RequestParam String dicCode,@RequestParam String typeCode) throws Exception {
return ResponseHelper.buildResponse(iFireTeamService.getFirstTeamToDesignatedDepartment(dicCode,typeCode));
}
}
\ No newline at end of file
......@@ -324,4 +324,17 @@ public class FirefightersController extends BaseController {
List<Menu> menus = iFirefightersService.getFirefightersJobTitleCount();
return ResponseHelper.buildResponse(menus);
}
/**
* 岗位树,带统计
*
* @param
* @return
* @throws Exception
*/
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/all/fire/person", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "所有的消防人员", notes = "所有的消防人员")
public ResponseModel<Object> getAllFirefightersPerson() throws Exception {
return ResponseHelper.buildResponse(iFirefightersService.getAllFirefightersPerson());
}
}
......@@ -442,5 +442,35 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
queryWrapper.eq(FireTeam::getCompany, companyId);
return this.baseMapper.selectList(queryWrapper);
}
public List<Menu> getFirstTeamToDesignatedDepartment() throws Exception {
LambdaQueryWrapper<FireTeam> queryWrapper = new LambdaQueryWrapper<FireTeam>();
queryWrapper.eq(FireTeam::getTypeCode, "116");
queryWrapper.eq(FireTeam::getIsDelete, false);
return TreeParser.getTree(null, this.baseMapper.selectList(queryWrapper), FireTeam.class.getName(), "getSequenceNbr", 2, "getName", "getParent",
null);
}
/**
*
* @param name
* @return
* @throws Exception
*/
public List<Menu> getFirstTeamToDesignatedDepartment(String dicCode, String typeCode) throws Exception {
DataDictionary dataDictionary = iDataDictionaryService.getByCode(dicCode,typeCode);
if (ObjectUtils.isEmpty(dataDictionary)) {
return null;
}
String code = dataDictionary.getCode();
LambdaQueryWrapper<FireTeam> queryWrapper = new LambdaQueryWrapper<FireTeam>();
queryWrapper.eq(FireTeam::getTypeCode, code);
queryWrapper.eq(FireTeam::getIsDelete, false);
queryWrapper.eq(FireTeam::getCompanyName, "消防救援保障部");
return TreeParser.getTree(null, this.baseMapper.selectList(queryWrapper), FireTeam.class.getName(), "getSequenceNbr", 2, "getName", "getParent",
null);
// TODO Auto-generated method stub
}
}
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