Commit 4a17c814 authored by taabe's avatar taabe

添加查询队伍人员接口

parent 73dfe016
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import java.util.List;
......@@ -53,4 +54,12 @@ public interface FireTeamMapper extends BaseMapper<FireTeam> {
IPage<FireTeamCardDto> getFireTeamForPage(Page page, FireTeamListDto par);
List<FireTeamDto> listFireTeamDto(Boolean isDelete);
/**
* 根据队伍id查询队伍下人员列表
*
* @param teamId
* @return
*/
List<FirefightersDto> queryFighterByTeamId(Long teamId);
}
......@@ -41,4 +41,10 @@
left join cb_fire_team p on t.parent = p.sequence_nbr
where t.is_delete = #{isDelete}
</select>
<select id="queryFighterByTeamId" resultType="com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto">
select *
from cb_firefighters
where is_delete = 0
and fire_team_id = #{teamId}
</select>
</mapper>
......@@ -8,6 +8,7 @@ import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -219,4 +220,18 @@ public class FireTeamController extends BaseController {
List<MenuFrom> menus = iFireTeamService.getCompanyTeamTree();
return ResponseHelper.buildResponse(menus);
}
/**
* 查询消防队伍下的人员
*
* @return
* @throws Exception
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@RequestMapping(value = "/{teamId}/fighter", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "查询消防队伍下的人员", notes = "查询消防队伍下的人员")
public ResponseModel<List<FirefightersDto>> listFighterByTeamId(@PathVariable("teamId") Long teamId) {
List<FirefightersDto> fighters = iFireTeamService.getFighterByTeamId(teamId);
return ResponseHelper.buildResponse(fighters);
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.FireBrigadeResourceDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamCardDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamDto;
import com.yeejoin.amos.boot.module.common.api.dto.FireTeamListDto;
import com.yeejoin.amos.boot.module.common.api.dto.FirefightersDto;
import com.yeejoin.amos.boot.module.common.api.entity.FireTeam;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.common.api.mapper.FireTeamMapper;
......@@ -142,4 +143,14 @@ public class FireTeamServiceImpl extends BaseService<FireTeamDto, FireTeam, Fire
root.setChildren(menuList);
return Lists.newArrayList(root);
}
/**
* 根据队伍id查询队伍下人员列表
*
* @param teamId
* @return
*/
public List<FirefightersDto> getFighterByTeamId(Long teamId) {
return this.baseMapper.queryFighterByTeamId(teamId);
}
}
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