| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpHeaders; |
| | |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | @Component |
| | | public class NoticeHandle { |
| | |
| | | |
| | | @Autowired |
| | | private RestTemplate restTemplate; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | String[] split = column.split(","); |
| | | String format = ""; |
| | | for (String s : split) { |
| | | format = format + jsonArray.getJSONObject(i).getString(s); |
| | | if (s.equals("over_z")) { |
| | | String is_danger_res = "is_danger_res"; |
| | | if (jsonArray.getJSONObject(i).getString(is_danger_res).equals("true")) { |
| | | format = format + "超过控制运用水位" + jsonArray.getJSONObject(i).getString(s); |
| | | }else if (jsonArray.getJSONObject(i).getString(is_danger_res).equals("false")){ |
| | | format = format + "超过汛限水位" + jsonArray.getJSONObject(i).getString(s); |
| | | }else { |
| | | format = format + jsonArray.getJSONObject(i).getString(s); |
| | | } |
| | | }else { |
| | | format = format + jsonArray.getJSONObject(i).getString(s); |
| | | } |
| | | } |
| | | list.add(format); |
| | | } |