|
@@ -210,11 +210,11 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
|
|
|
}*/
|
|
|
|
|
|
- djsjqs = djsjqs.replace(" ","%20");
|
|
|
- djsjjs = djsjjs.replace(" ","%20");
|
|
|
+ djsjqs = djsjqs.replace(" ", "%20");
|
|
|
+ djsjjs = djsjjs.replace(" ", "%20");
|
|
|
|
|
|
//查询前先获取tocken
|
|
|
- String access_token =null;
|
|
|
+ String access_token = null;
|
|
|
Map<String, String> paramMapT = new HashMap<>();
|
|
|
paramMapT.put("client_id", "acdf50bd13be4901b64c62b1fee862c0");
|
|
|
paramMapT.put("client_secret", "a3650d67fc034b2d8ea259182b3d99f3");
|
|
@@ -231,7 +231,7 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
Map<String, String> paramMap = new HashMap<>();
|
|
|
String http = null;
|
|
|
//当区划为空的时候根据姓名,身份证查询
|
|
|
- if(StringUtils.isNotEmpty(sfzhm)){
|
|
|
+ if (StringUtils.isNotEmpty(sfzhm)) {
|
|
|
//潜山来宜人员数据(姓名 身份证 时间段)
|
|
|
paramMap.put("client_id", "acdf50bd13be4901b64c62b1fee862c0");
|
|
|
paramMap.put("access_token", access_token);
|
|
@@ -241,11 +241,11 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
paramMap.put("djsjjs", djsjjs);
|
|
|
|
|
|
http = "http://60.171.171.235:9090/service/api/rkk/qslyrysjcx";
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//潜山来宜人员数据(区划 时间段)
|
|
|
paramMap.put("client_id", "acdf50bd13be4901b64c62b1fee862c0");
|
|
|
paramMap.put("access_token", access_token);
|
|
|
- if(StringUtils.isEmpty(rc)){
|
|
|
+ if (StringUtils.isEmpty(rc)) {
|
|
|
rc = "潜山市";
|
|
|
}
|
|
|
paramMap.put("rc", rc);
|
|
@@ -262,8 +262,7 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
String data = HttpClientUtils.doGet(http, paramMap);
|
|
|
|
|
|
//List list = new ArrayList();
|
|
|
- List<JSONObject> list= JSON.parseArray(data, JSONObject.class);
|
|
|
-
|
|
|
+ List<JSONObject> list = JSON.parseArray(data, JSONObject.class);
|
|
|
|
|
|
|
|
|
return AjaxResult.success("数据返回成功", list);
|
|
@@ -275,12 +274,13 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
|
|
|
/**
|
|
|
* 新增
|
|
|
+ *
|
|
|
* @param accountingDataList
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
- public int insertAccountingData(List<AccountingData> accountingDataList,AccountingDataVo accountingDatav) {
|
|
|
- SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH,false);
|
|
|
+ public int insertAccountingData(List<AccountingData> accountingDataList, AccountingDataVo accountingDatav) {
|
|
|
+ SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
|
|
AccountingDataMapper mapper = sqlSession.getMapper(AccountingDataMapper.class);
|
|
|
|
|
|
System.out.println("batchInsert 插入开始========");
|
|
@@ -288,15 +288,15 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
Czrk czrk = new Czrk();
|
|
|
|
|
|
Boolean bl = false;
|
|
|
- if(accountingDatav == null){
|
|
|
+ if (accountingDatav == null) {
|
|
|
bl = true;
|
|
|
}
|
|
|
|
|
|
for (int i = 0; i < accountingDataList.size(); i++) {
|
|
|
- if(bl){
|
|
|
+ if (bl) {
|
|
|
AccountingData accountingData = accountingDataList.get(i);
|
|
|
String zjhm = accountingData.getZjhm();
|
|
|
- if (StringUtils.isNotBlank(zjhm)){
|
|
|
+ if (StringUtils.isNotBlank(zjhm)) {
|
|
|
czrk.setIdCard(zjhm);
|
|
|
czrk.setNucleicAcidTime(accountingData.getCjsj());
|
|
|
//去更新常住人口表中数据
|
|
@@ -305,11 +305,11 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
String mainKey = accountingData.getMainKey();
|
|
|
accountingData.setId(mainKey);
|
|
|
int result = accountingDataMapper.selectById(mainKey);
|
|
|
- if (result == 0){
|
|
|
+ if (result == 0) {
|
|
|
accountingDataMapper.insertAccountingData(accountingData);
|
|
|
}
|
|
|
- }else{
|
|
|
- if(accountingDataList.get(i).getZjhm().equals(accountingDatav.getZjhm())){
|
|
|
+ } else {
|
|
|
+ if (accountingDataList.get(i).getZjhm().equals(accountingDatav.getZjhm())) {
|
|
|
bl = true;
|
|
|
}
|
|
|
}
|
|
@@ -332,12 +332,21 @@ public class AccountingDataServiceImpl implements IAccountingDataService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<TSampling514> getTSampling514AllData(String startTime,String endTime) {
|
|
|
- return TSampling514Mapper.getTSampling514AllData(startTime,endTime);
|
|
|
+ public List<TSampling514> getTSampling514AllData(String startTime, String endTime) {
|
|
|
+ return TSampling514Mapper.getTSampling514AllData(startTime, endTime);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<TSampling514> getTSampling514AllDataNoTime() {
|
|
|
return TSampling514Mapper.getTSampling514AllDataNoTime();
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 从第三方库获取核酸数据
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public void thirdNucleicAcid() {
|
|
|
+ List<AccountingData> accountingDataVos = accountingDataMapper.thirdNucleicAcid();
|
|
|
+ insertAccountingData(accountingDataVos, new AccountingDataVo());
|
|
|
+ }
|
|
|
}
|