Commit 1739161d authored by zhuangxinwei's avatar zhuangxinwei

方舱导出

parent e9d2656c
...@@ -135,6 +135,18 @@ public class FcryController extends BaseController ...@@ -135,6 +135,18 @@ public class FcryController extends BaseController
} else { } else {
fcryExport.setStreet(""); fcryExport.setStreet("");
} }
if (StringUtils.isNotEmpty(fcryExport.getFcPlace())) {
List<SysDictData> communities = DictUtils.getDictCache("shelters");
List<String> labels = communities.stream().filter(i -> fcryExport.getFcPlace().equals(i.getDictValue()))
.map(SysDictData::getDictLabel).collect(Collectors.toList());
if (!labels.isEmpty()) {
fcryExport.setFcPlace(labels.get(0));
} else {
fcryExport.setFcPlace("");
}
} else {
fcryExport.setFcPlace("");
}
} }
util.exportExcel(response, list, "方舱人员数据"); util.exportExcel(response, list, "方舱人员数据");
} }
......
...@@ -149,6 +149,8 @@ public class FcryServiceImpl implements IFcryService ...@@ -149,6 +149,8 @@ public class FcryServiceImpl implements IFcryService
String communityValue = ""; String communityValue = "";
String committeeValue = ""; String committeeValue = "";
String streetValue = ""; String streetValue = "";
String areaValue = "";
String fcValue = "";
if (StringUtils.isNotEmpty(fcry.getCommunity())){ //如果小区不为空,去数据字典匹配value if (StringUtils.isNotEmpty(fcry.getCommunity())){ //如果小区不为空,去数据字典匹配value
List<SysDictData> community = DictUtils.getDictCache("community"); List<SysDictData> community = DictUtils.getDictCache("community");
List<String> values = community.stream().filter(l->fcry.getCommunity().equals(l.getDictLabel())) List<String> values = community.stream().filter(l->fcry.getCommunity().equals(l.getDictLabel()))
...@@ -187,7 +189,7 @@ public class FcryServiceImpl implements IFcryService ...@@ -187,7 +189,7 @@ public class FcryServiceImpl implements IFcryService
List<String> values = area.stream().filter(l->fcry.getArea().equals(l.getDictLabel())) List<String> values = area.stream().filter(l->fcry.getArea().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList()); .map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty()) if (!values.isEmpty())
fcry.setArea(values.get(0)); areaValue =values.get(0);
else { else {
failureList.add(fcry); failureList.add(fcry);
continue; continue;
...@@ -198,7 +200,7 @@ public class FcryServiceImpl implements IFcryService ...@@ -198,7 +200,7 @@ public class FcryServiceImpl implements IFcryService
List<String> values = fcPlace.stream().filter(l->fcry.getFcPlace().equals(l.getDictLabel())) List<String> values = fcPlace.stream().filter(l->fcry.getFcPlace().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList()); .map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty()) if (!values.isEmpty())
fcry.setFcPlace(values.get(0)); fcValue = values.get(0);
else { else {
failureList.add(fcry); failureList.add(fcry);
continue; continue;
...@@ -214,6 +216,8 @@ public class FcryServiceImpl implements IFcryService ...@@ -214,6 +216,8 @@ public class FcryServiceImpl implements IFcryService
fcry.setCommunity(communityValue); fcry.setCommunity(communityValue);
fcry.setCommittee(committeeValue); fcry.setCommittee(committeeValue);
fcry.setStreet(streetValue); fcry.setStreet(streetValue);
fcry.setArea(areaValue);
fcry.setFcPlace(fcValue);
updateList.add(fcry); updateList.add(fcry);
} }
else { else {
......
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