This commit is contained in:
wuweida 2022-08-03 14:12:00 +08:00
parent ef3c2b19b2
commit 09f78d6db9
2 changed files with 16 additions and 16 deletions

View File

@ -67,16 +67,16 @@ public class KeyAreaController {
} }
/** /**
* 查询所有事件 * 重点区域场景查询所有事件
* @return * @return
*/ */
@GetMapping("selectEvent") @GetMapping("selectAreaEvent")
@ApiOperation("查询所有事件") @ApiOperation("重点区域场景查询所有事件")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "page", value = "页码", required = false, dataType = "Integer"), @ApiImplicitParam(name = "page", value = "页码", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "页码大小", required = false, dataType = "Integer") @ApiImplicitParam(name = "pageSize", value = "页码大小", required = false, dataType = "Integer")
}) })
public Result selectEvent(Integer page,Integer pageSize){ public Result selectAreaEvent(Integer page,Integer pageSize){
List<EventDto> events = eventMapper.selectEvent(page,pageSize); List<EventDto> events = eventMapper.selectEvent(page,pageSize);
for (EventDto event: events) { for (EventDto event: events) {
if (event.getEventCnName().equals("街头伞篷") || event.getEventCnName().equals("水果和食品摊") if (event.getEventCnName().equals("街头伞篷") || event.getEventCnName().equals("水果和食品摊")
@ -104,12 +104,12 @@ public class KeyAreaController {
} }
/** /**
* 查询当天事件 * 重点区域场景查询当天事件
* @return * @return
*/ */
@GetMapping("selectByTime") @GetMapping("selectAreaByTime")
@ApiOperation("查询当天事件") @ApiOperation("重点区域场景查询当天事件")
public Result selectByTime(){ public Result selectAreaByTime(){
List<EventDto> events = eventMapper.selectByTime(); List<EventDto> events = eventMapper.selectByTime();
for (EventDto event: events) { for (EventDto event: events) {
if (event.getEventCnName().equals("街头伞篷") || event.getEventCnName().equals("水果和食品摊") if (event.getEventCnName().equals("街头伞篷") || event.getEventCnName().equals("水果和食品摊")
@ -138,14 +138,14 @@ public class KeyAreaController {
* @param eventNewName * @param eventNewName
* @return * @return
*/ */
@GetMapping("selectByName") @GetMapping("selectAreaByName")
@ApiOperation("重点区域场景根据事件名称查询事件") @ApiOperation("重点区域场景根据事件名称查询事件")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "eventNewName",value = "事件名称",required = true,dataType = "String"), @ApiImplicitParam(name = "eventNewName",value = "事件名称",required = true,dataType = "String"),
@ApiImplicitParam(name = "page", value = "页码", required = false, dataType = "Integer"), @ApiImplicitParam(name = "page", value = "页码", required = false, dataType = "Integer"),
@ApiImplicitParam(name = "pageSize", value = "页码大小", required = false, dataType = "Integer") @ApiImplicitParam(name = "pageSize", value = "页码大小", required = false, dataType = "Integer")
}) })
public Result selectAreaByEventName(String eventNewName,Integer page,Integer pageSize){ public Result selectAreaByName(String eventNewName,Integer page,Integer pageSize){
if (eventNewName.equals("环境卫生")){ if (eventNewName.equals("环境卫生")){
List<EventDto> lists = eventMapper.selectByName("'塑料篮子','纸箱','街头散落垃圾'",page,pageSize); List<EventDto> lists = eventMapper.selectByName("'塑料篮子','纸箱','街头散落垃圾'",page,pageSize);
for (EventDto list: lists) { for (EventDto list: lists) {

View File

@ -67,19 +67,19 @@ public class QidiService {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token); headers.add("Authorization", "Bearer " + token);
Map<String,Object> map = new HashMap<>(); /*Map<String,Object> map = new HashMap<>();
JSONObject search = new JSONObject(); JSONObject search = new JSONObject();
search.put("opt","LIKE"); search.put("opt","LIKE");
search.put("key","UPLOADTIME"); search.put("key","UPLOADTIME");
search.put("val",this.dateStr()); search.put("val",this.dateStr());
map.put("json",search); map.put("json",search);*/
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000022_2?search=[{json}]"; String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000022_2";
HttpEntity<Map> httpEntity = new HttpEntity<>(null, headers); HttpEntity<Map> httpEntity = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity; ResponseEntity<JSONObject> responseEntity;
try { try {
responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, JSONObject.class,map); responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, JSONObject.class);
JSONObject jsonObject = responseEntity.getBody(); JSONObject jsonObject = responseEntity.getBody();
JSONArray jsonArray = jsonObject.getJSONArray("list"); JSONArray jsonArray = jsonObject.getJSONArray("list");
@ -98,8 +98,8 @@ public class QidiService {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token); headers.add("Authorization", "Bearer " + token);
Map<String,Object> map = new HashMap<>(); /* Map<String,Object> map = new HashMap<>();
/*JSONObject search = new JSONObject(); JSONObject search = new JSONObject();
search.put("opt","LIKE"); search.put("opt","LIKE");
search.put("key","updatetime"); search.put("key","updatetime");
search.put("val",this.dateStr()); search.put("val",this.dateStr());