气象预警历史气象预警新增

master
徐杰盟 2024-05-24 15:12:16 +08:00
parent 5b0ce3dc41
commit cd5d242f3b
3 changed files with 11 additions and 7 deletions

View File

@ -75,7 +75,7 @@ public class WarningController {
apiDto.setFilter(filter);
// String str = HttpUtil.sendPost("http://223.75.53.141:8000/shzh/met/zyqxfw/api/warning/getGroupWarning", JSON.toJSONString(apiDto));
String str = HttpUtil.sendPost("http://64.97.146.240:9990/api/warning/getGroupWarning", JSON.toJSONString(apiDto));
String str = HttpUtil.sendPost("http://127.0.0.1:20000/shzh/met/zyqxfw/api/warning/getGroupWarning", JSON.toJSONString(apiDto));
JSONObject json = JSON.parseObject(str);
if (json != null && json.getInteger("code") == HttpStatus.SC_OK) {
List<WarningData> data = json.getJSONArray("data").toJavaList(WarningData.class);
@ -86,12 +86,12 @@ public class WarningController {
}
/**
*
*
*
* @param dto
* @return
*/
@ApiOperation(value = "历史气象预警")
@ApiOperation(value = "历史气象预警统计")
@PostMapping("/getHistoryGroupWarning")
public ResultJson<List<WarningListVo>> getHistoryGroupWarning(@RequestBody GroupWarningDto dto) {
@ -114,7 +114,7 @@ public class WarningController {
apiDto.setFilter(filter);
// String str = HttpUtil.sendPost("http://223.75.53.141:8000/shzh/met/zyqxfw/api/warning/getGroupWarning", JSON.toJSONString(apiDto));
String str = HttpUtil.sendPost("http://64.97.146.240:9990/api/warning/getGroupWarning", JSON.toJSONString(apiDto));
String str = HttpUtil.sendPost("http://127.0.0.1:20000/shzh/met/zyqxfw/api/warning/getGroupWarning", JSON.toJSONString(apiDto));
JSONObject json = JSON.parseObject(str);
if (json != null && json.getInteger("code") == HttpStatus.SC_OK) {
List<WarningData> data = json.getJSONArray("data").toJavaList(WarningData.class);

View File

@ -59,7 +59,7 @@ public class AddressBookServiceImpl extends ServiceImpl<AddressBookMapper, Addre
return baseMapper.find(dto);
}
@Cacheable(value=ADDRESS_BOOK_REDIS_KEY,key = "#root.methodname+':'+#adnm")
@Cacheable(value=ADDRESS_BOOK_REDIS_KEY,key = "#root.method.name+':'+#adnm")
@Override
public List<AddressBook> getListByAdnm(String adnm) {
return baseMapper.getListByAdnm(adnm);

View File

@ -11,6 +11,7 @@ import com.whdc.service.IAdinfoService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.*;
@ -82,7 +83,11 @@ public class AdinfoServiceImpl extends ServiceImpl<AdinfoMapper, Adinfo> impleme
if ("00000000000".equals(ad.substring(4))) { // 市
adcdTree.setAdlevel(1);
adcdTree.setAdcdChildren(county.get(cityStr));
List<AdcdTree> adcdChildren = county.get(cityStr);
AdcdTree adcdTree1 = new AdcdTree();
BeanUtils.copyProperties(adcdTree,adcdTree1);
adcdChildren.add(0,adcdTree1);
adcdTree.setAdcdChildren(adcdChildren);
addTree(city, provinceStr, adcdTree);
tree.add(adcdTree);
@ -98,7 +103,6 @@ public class AdinfoServiceImpl extends ServiceImpl<AdinfoMapper, Adinfo> impleme
return sorted(tree);
}
public List<Adinfo> treeList(String adcd, String adnm) {
if(StringUtils.isNotBlank(adcd) && adcd.endsWith("0000000000000")){