Commit e64c96dc authored by chenhao's avatar chenhao

Merge branch 'develop_ccs' of http://172.16.10.76/moa/amos-boot-biz into develop_ccs

parents 097ed1cd 243c4fb9
......@@ -361,6 +361,12 @@ public class WaterResourceDto extends BaseDto {
@ExcelProperty(value = "纬度", index = 41)
private Double latitude;
@ExcelProperty(value = "消火栓类型", index =42)
@ExplicitConstraint(type = "HSLX",indexNum = 42, sourceClass = CommonExplicitConstraint.class)
@ApiModelProperty(value = "消火栓类型")
@TableField(exist = false)
private String hydrantType;
@ExcelIgnore
@ApiModelProperty(value = "附件")
@TableField(exist = false)
......
......@@ -1234,10 +1234,10 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
public List<BuildingTreeVo> getBuildingTreeInOrgCode(String bizOrgCode) {
//如果传递的为部门bizOrgCode 取其上级单位下的建筑
ResponseModel<OrgUsrDto> companyByBizOrgCodeList = jcsFeign.getCompanyByBizOrgCodeList(bizOrgCode);
String resultCode = companyByBizOrgCodeList.getResult().getBizOrgCode();
// ResponseModel<OrgUsrDto> companyByBizOrgCodeList = jcsFeign.getCompanyByBizOrgCodeList(bizOrgCode);
// String resultCode = companyByBizOrgCodeList.getResult().getBizOrgCode();
List<BuildingTreeVo> buildingTreeVos = this.getBuildingTreeVos(true);
List<BuildingTreeVo> orgBuildingTreeVos = buildingTreeVos.stream().filter(b-> b.getBizOrgCode() != null && b.getBizOrgCode().contains(resultCode)).collect(Collectors.toList());
List<BuildingTreeVo> orgBuildingTreeVos = buildingTreeVos.stream().filter(b-> b.getBizOrgCode() != null && b.getBizOrgCode().contains(bizOrgCode)).collect(Collectors.toList());
return buildingTreeVos.stream().filter(b -> "-1".equals(b.getParentId())).peek(b -> {
b.setId(0L);
b.setChildren(this.getCompanyBuildingChildrenTree(b.getId().toString(), orgBuildingTreeVos));
......
......@@ -210,7 +210,7 @@ public class DataSourcesImpl implements DataSources {
PermissionInterceptorContext.setDataAuthRule("fire_water_info");
Map<String, Object> map = new HashMap<>();
map.put("bizOrgCode",reginParams.getPersonIdentity().getBizOrgCode());
map.put("OrgCode",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();
......@@ -227,7 +227,7 @@ public class DataSourcesImpl implements DataSources {
PermissionInterceptorContext.setDataAuthRule("fire_station_info");
Map<String, Object> map = new HashMap<>();
map.put("bizOrgCode",reginParams.getPersonIdentity().getBizOrgCode());
map.put("OrgCode",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();
......@@ -244,7 +244,7 @@ public class DataSourcesImpl implements DataSources {
PermissionInterceptorContext.setDataAuthRule("fire_team_info");
Map<String, Object> map = new HashMap<>();
map.put("bizOrgCode",reginParams.getPersonIdentity().getBizOrgCode());
map.put("OrgCode",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();
......@@ -391,11 +391,16 @@ public class DataSourcesImpl implements DataSources {
}
private String[] getBuildingList() {
List<MenuFrom> buildingList = equipmentService.getBuildingList();
List<String> buildingNames = buildingList.stream().map(item -> {
return item.getName() + "@" + item.getKey();
// 导出模板增加权限
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
String bizOrgCode = reginParams.getPersonIdentity().getBizOrgCode();
ResponseModel<Object> response = equipFeignClient.getBuildingTree();
List<Map<String, Object>> buildingMapList = (List<Map<String, Object>>) response.getResult();
List<Map<String, Object>> children = (List<Map<String, Object>>) buildingMapList.get(0).get("children");
List<String> collect = children.stream().filter(result -> result.get("bizOrgCode").toString().startsWith(bizOrgCode)).map(itme -> {
return itme.get("name") + "@" + itme.get("id");
}).collect(Collectors.toList());
String[] str = buildingNames.toArray(new String[buildingNames.size()]);
String[] str = collect.toArray(new String[collect.size()]);
return str;
}
......
......@@ -967,6 +967,9 @@ public class ExcelServiceImpl {
item.setResourceTypeName(resourceTypeName[0]);
item.setResourceType(resourceTypeName[1]);
}
if (item.getHydrantType() != null) {
item.setType(item.getHydrantType());
}
if (item.getSystemType() != null) {
String[] systemType = item.getSystemType().split("@");
item.setSystemType(systemType[0]);
......@@ -1043,7 +1046,11 @@ public class ExcelServiceImpl {
item.setEquipName(equipCategory[0]);
item.setEquipCategoryId(Long.parseLong(equipCategory[2]));
item.setEquipCategoryName(equipCategory[3]);
}
if (item.getContactUser() != null) {
String[] contactUser = item.getContactUser().split("@");
item.setContactUser(contactUser[0]);
item.setContactUserId(contactUser[1]);
}
item = Bean.toPo(getCurrentInfo(), item);
waterResourceServiceImpl.importByExcel(item);
......
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