Commit 02445729 authored by chenzhao's avatar chenzhao

修改bug 增加 消防水源 导出模板联系人数据

parent cb957595
...@@ -110,6 +110,7 @@ public class WaterResourceDto extends BaseDto { ...@@ -110,6 +110,7 @@ public class WaterResourceDto extends BaseDto {
@ApiModelProperty(value = "实景图") @ApiModelProperty(value = "实景图")
private String realityImg; private String realityImg;
@ExplicitConstraint(indexNum = 38, sourceClass = CommonExplicitConstraint.class, method = "getContactUser")
@ExcelProperty(value = "联系人姓名", index = 38) @ExcelProperty(value = "联系人姓名", index = 38)
@ApiModelProperty(value = "联系人姓名") @ApiModelProperty(value = "联系人姓名")
private String contactUser; private String contactUser;
......
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
...@@ -168,9 +169,12 @@ public class DataSourcesImpl implements DataSources { ...@@ -168,9 +169,12 @@ public class DataSourcesImpl implements DataSources {
case "getWaterCompanyList": case "getWaterCompanyList":
str = getWaterCompanyList(); str = getWaterCompanyList();
break; break;
case "getEquipFireTeam()": case "getEquipFireTeam":
str = getEquipFireTeam(); str = getEquipFireTeam();
break; break;
case "getContactUser":
str = getContactUser();
break;
} }
} }
return str; return str;
...@@ -187,6 +191,24 @@ public class DataSourcesImpl implements DataSources { ...@@ -187,6 +191,24 @@ public class DataSourcesImpl implements DataSources {
return str; return str;
} }
private String[] getContactUser() {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
// 权限处理
PermissionInterceptorContext.setDataAuthRule("fire_water_info");
Map<String, Object> map = new HashMap<>();
map.put("bizOrgCode",reginParams.getPersonIdentity().getBizOrgCode());
IPage<Map<String, Object>> mapIPage = iOrgUsrService.pagePerson(null, null, map);
List<Map<String, Object>> records = mapIPage.getRecords();
List<String> carNameList = Lists.newArrayList();
records.forEach(result -> {
carNameList.add(result.get("bizOrgName") + "@" + result.get("sequenceNbr"));
});
String[] str = carNameList.toArray(new String[carNameList.size()]);
return str;
}
private String[] getFireTeam() { private String[] getFireTeam() {
// Page<FireTeamCardDto> pageBean = new Page<>(0, Integer.MAX_VALUE); // Page<FireTeamCardDto> pageBean = new Page<>(0, Integer.MAX_VALUE);
// IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean, // IPage<FireTeamCardDto> fireTeamCardDtoIPage = fireTeamService.listFireTeamByPage(pageBean,
......
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