|
@@ -3,6 +3,7 @@ package com.bz.smart_city.service.impl;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.bz.smart_city.commom.model.Pagination;
|
|
|
+import com.bz.smart_city.commom.util.HttpClientUtils;
|
|
|
import com.bz.smart_city.commom.util.UserUtil;
|
|
|
import com.bz.smart_city.dao.MeterReadRecordMapper;
|
|
|
import com.bz.smart_city.dao.WarningRuleMapper;
|
|
@@ -66,7 +67,7 @@ public class WarningLogServiceImpl implements WarningLogService{
|
|
|
});
|
|
|
Map<String,Object>args=new HashMap<>();
|
|
|
args.put("metercodes", meterCodes);
|
|
|
- String result = sendApiReQuest(accountUserInfoUrl, JSONObject.toJSONString(args));
|
|
|
+ String result = "";//HttpClientUtils.sendApiReQuest(accountUserInfoUrl, JSONObject.toJSONString(args));
|
|
|
if(result!=null){
|
|
|
JSONArray array = JSONArray.parseArray(result);
|
|
|
list.forEach(warningLogDto -> {
|
|
@@ -83,21 +84,7 @@ public class WarningLogServiceImpl implements WarningLogService{
|
|
|
|
|
|
return new Pagination<>(list);
|
|
|
}
|
|
|
- private String sendApiReQuest(String path , String args){
|
|
|
- HttpHeaders headers = new HttpHeaders();
|
|
|
- headers.setContentType(MediaType.APPLICATION_JSON);
|
|
|
- HttpEntity<String> formEntity = new HttpEntity<>(args, headers);
|
|
|
|
|
|
- RestTemplate restTemplate=new RestTemplate();
|
|
|
- ResponseEntity<String> stringResponseEntity = restTemplate.postForEntity(path, formEntity,
|
|
|
- String.class);
|
|
|
- JSONObject info = JSONObject.parseObject(stringResponseEntity.getBody());
|
|
|
- String result=null;
|
|
|
- if(info.getInteger("status")==0){
|
|
|
- result=info.getString("data");
|
|
|
- }
|
|
|
- return result;
|
|
|
- }
|
|
|
|
|
|
@Override
|
|
|
public List<BuildingSelectDto> getAreaList(Integer channelId, String deviceNo, Integer warningType, String clientName, Integer feedbackStatus, LocalDateTime startDate, LocalDateTime endDate) {
|