Commit d100eb2e authored by 王琮's avatar 王琮

修改核酸采集导入

parent cef87346
......@@ -138,7 +138,13 @@ public class HscjServiceImpl implements IHscjService {
List<HscjErrorDto> trueList = new ArrayList<>();
List<HscjErrorDto> failureList = new ArrayList<>();
List<String> error;
String q = "";
String jd = "";
String jwh = "";
for (HscjErrorDto hscj : list) {
q = "";
jd = "";
jwh = "";
error = new ArrayList<>();
hscj.setProvince("河北省");
hscj.setCity("石家庄市");
......@@ -165,13 +171,13 @@ public class HscjServiceImpl implements IHscjService {
if (StringUtils.isEmpty(hscj.getBblx()))
error.add("标本类型不能为空");
if (CollectionUtils.isEmpty(error)) {
if(hscj.getArea().equals("开发区"))
if (hscj.getArea().equals("开发区"))
hscj.setArea("高新区");
List<SysDictData> area = DictUtils.getDictCache("residential_area");
List<String> areas = area.stream().filter(l -> hscj.getArea().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!areas.isEmpty())
hscj.setArea(areas.get(0));
q = areas.get(0);
else {
hscj.setError("区不存在");
failureList.add(hscj);
......@@ -195,7 +201,7 @@ public class HscjServiceImpl implements IHscjService {
List<String> values = communitys.stream().filter(l -> hscj.getStreet().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
hscj.setStreet(values.get(0));
jd = values.get(0);
else {
hscj.setStreet(null);
hscj.setCommittee(null);
......@@ -208,7 +214,7 @@ public class HscjServiceImpl implements IHscjService {
List<String> values = communitys.stream().filter(l -> hscj.getCommittee().equals(l.getDictLabel()))
.map(SysDictData::getDictValue).collect(Collectors.toList());
if (!values.isEmpty())
hscj.setCommittee(values.get(0));
jwh = values.get(0);
else {
hscj.setCommittee(null);
hscj.setCommunity(null);
......@@ -226,6 +232,9 @@ public class HscjServiceImpl implements IHscjService {
}
}
if (CheckUtils.checkCard(hscj.getCardNo())) {
hscj.setArea(q);
hscj.setStreet(jd);
hscj.setCommittee(jwh);
hscj.setCheckCard("正确");
trueList.add(hscj);
} 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