Commit d100eb2e authored by 王琮's avatar 王琮

修改核酸采集导入

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