Commit c3db3770 authored by zhuangxinwei's avatar zhuangxinwei

小区风控导出

parent 377985cb
...@@ -86,6 +86,42 @@ public class FkqkController extends BaseController ...@@ -86,6 +86,42 @@ public class FkqkController extends BaseController
} else { } else {
fkqkExport.setCommunity(""); fkqkExport.setCommunity("");
} }
if (StringUtils.isNotEmpty(fkqkExport.getArea())) {
List<SysDictData> communities = DictUtils.getDictCache("residential_area");
List<String> labels = communities.stream().filter(i -> fkqkExport.getArea().equals(i.getDictValue()))
.map(SysDictData::getDictLabel).collect(Collectors.toList());
if (!labels.isEmpty()) {
fkqkExport.setArea(labels.get(0));
} else {
fkqkExport.setArea("");
}
} else {
fkqkExport.setArea("");
}
if (StringUtils.isNotEmpty(fkqkExport.getStreet())) {
List<SysDictData> communities = DictUtils.getDictCache("street_town");
List<String> labels = communities.stream().filter(i -> fkqkExport.getStreet().equals(i.getDictValue()))
.map(SysDictData::getDictLabel).collect(Collectors.toList());
if (!labels.isEmpty()) {
fkqkExport.setStreet(labels.get(0));
} else {
fkqkExport.setStreet("");
}
} else {
fkqkExport.setStreet("");
}
if (StringUtils.isNotEmpty(fkqkExport.getCommittee())) {
List<SysDictData> communities = DictUtils.getDictCache("committee");
List<String> labels = communities.stream().filter(i -> fkqkExport.getCommittee().equals(i.getDictValue()))
.map(SysDictData::getDictLabel).collect(Collectors.toList());
if (!labels.isEmpty()) {
fkqkExport.setCommittee(labels.get(0));
} else {
fkqkExport.setCommittee("");
}
} else {
fkqkExport.setCommittee("");
}
} }
util.exportExcel(response, list, "小区封控情况数据"); util.exportExcel(response, list, "小区封控情况数据");
} }
......
...@@ -25,14 +25,14 @@ public class Fkqk extends BaseEntity ...@@ -25,14 +25,14 @@ public class Fkqk extends BaseEntity
private String community; private String community;
/** 所在区 */ /** 所在区 */
@Excel(name = "所在区", dictType = "residential_area") @Excel(name = "所在区")
private String area; private String area;
/** 街道/镇名称 */ /** 街道/镇名称 */
@Excel(name = "街道/镇名称", dictType = "street_town") @Excel(name = "街道/镇名称")
private String street; private String street;
@Excel(name = "居委会", dictType = "committee") @Excel(name = "居委会")
private String committee; private String committee;
/** 楼号 */ /** 楼号 */
......
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