Commit 4274ade0 authored by zhangsen's avatar zhangsen

消防力量接口拓展

parent 540c0de4
......@@ -10,6 +10,7 @@ import com.yeejoin.amos.boot.module.common.api.service.IFirefightersService;
import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -21,6 +22,10 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@RestController
@Api(tags = "一张图大屏Api")
@RequestMapping(value = "/bigScreen")
......@@ -43,7 +48,7 @@ public class BigScreenController extends BaseController {
@GetMapping(value = "/getUserInfo")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "应急预案页面消防力量人员信息", notes = "应急预案页面消防力量人员信息")
public ResponseModel getUserInfoByYJYA() {
public ResponseModel getUserInfoByYJYA(@ApiParam(value = "3小概览用-- 0-运行人员 1-驻站消防队 【为空时为应急预案页面使用】") @RequestParam(required = false) Integer fireTeamType) {
ReginParams reginParam = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String bizOrgCode = null;
if(null != reginParam) {
......@@ -54,6 +59,10 @@ public class BigScreenController extends BaseController {
} else {
return CommonResponseUtil.success(null);
}
return CommonResponseUtil.success(iFirefightersService.getUserInfoByYJYA(bizOrgCode));
List<Map<String, Object>> userInfoByYJYA = iFirefightersService.getUserInfoByYJYA(bizOrgCode);
if (!Objects.isNull(fireTeamType)) {
return CommonResponseUtil.success(userInfoByYJYA.get(fireTeamType));
}
return CommonResponseUtil.success(userInfoByYJYA);
}
}
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