Commit d5c8ee55 authored by LiuLin's avatar LiuLin

fix(YMT):修改安装告知监管码和96333码生成条件判断

parent 903536b0
......@@ -782,6 +782,8 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ResponseModel<String> responseModel = tzsServiceFeignClient.deviceRegistrationCode(equCode);
String deviceRegistrationCode = responseModel.getResult();
Map<String, Object> map = new HashMap<>();
map.put("code96333",tzsJgOtherInfo.getCode96333());
map.put("superviseCode",tzsJgOtherInfo.getSupervisoryCode());
map.put("cityCode",jgInstallationNotice.getCity());
map.put("countyCode",jgInstallationNotice.getCounty());
map.put("equCategory",tzsJgRegistrationInfo.getEquCategory());
......
......@@ -47,6 +47,7 @@ import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -65,7 +66,6 @@ import org.typroject.tyboot.core.foundation.utils.DateUtil;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.IOException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
......@@ -243,7 +243,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/
@Override
public Map<String, String> createSupervisorCode(Map<String, Object> map, String record) {
String city, county, equipCategory;
String city, county, equipCategory, code96333 = null, superviseCode = null;
EquInfoDto equInfoDto = new EquInfoDto();
if (ObjectUtils.isEmpty(record)) {
//获取对应行政区划
......@@ -251,6 +251,8 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
city = map.get("regionCode").toString();
//获取对应设备分类
equipCategory = map.get("equCategory").toString();
code96333 = map.get("code96333").toString();
superviseCode = map.get("superviseCode").toString();
} else {
equInfoDto = categoryOtherInfoMapper.selectEquipInfo(record);
//判断这条数据认领状态是否为已认领,否则直接返回
......@@ -265,7 +267,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
//生成码
Map<String, String> codeMap;
synchronized (EquipmentCategoryServiceImpl.class) {
codeMap = creatCode(city, county, equipCategory, null, null);
codeMap = creatCode(city, county, equipCategory, code96333, superviseCode);
}
if (ObjectUtils.isEmpty(codeMap)) {
return new HashMap<>();
......@@ -1314,7 +1316,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
long totle = 0;
try {
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
for (SearchHit hit : response.getHits().getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
JSONObject dto2 = jsonObject.getJSONObject("sourceAsMap");
......
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