|
@@ -17,10 +17,8 @@ import com.ruoyi.common.core.page.TableSupport;
|
|
|
import com.ruoyi.common.core.redis.RedisCache;
|
|
|
import com.ruoyi.common.enums.AggsType;
|
|
|
import com.ruoyi.framework.config.ElasticSearchClient;
|
|
|
-import com.ruoyi.system.domain.GuapAlert;
|
|
|
import com.ruoyi.system.domain.GuapMonitorPoint;
|
|
|
import com.ruoyi.system.domain.IllegalShip;
|
|
|
-import com.ruoyi.system.domain.XiuTanIllegalShip;
|
|
|
import com.ruoyi.system.domain.XiuTanSemInstrument;
|
|
|
import com.ruoyi.system.service.IAisDatabase;
|
|
|
import com.ruoyi.system.service.IHeiYanService;
|
|
@@ -65,84 +63,6 @@ public class So2Controller extends BaseController {
|
|
|
@Autowired
|
|
|
private ISysDictTypeService dictTypeService;
|
|
|
|
|
|
- @GetMapping("/guangpu/list")
|
|
|
- @ApiOperation("光谱-硫嫌疑船舶列表数据")
|
|
|
- public TableDataInfo GpList(GuapAlert guapAlert) {
|
|
|
- // 传来的参数
|
|
|
- Map<String, Object> params = guapAlert.getParams();
|
|
|
- Map<String, Object> equalsCondition = new HashMap<>();
|
|
|
- // 组装查询条件
|
|
|
- equalsCondition.put("mmsi", ObjectUtil.isEmpty(guapAlert.getMmsi()) ? null : StrUtil.concat(true, "*", Convert.toStr(guapAlert.getMmsi()), "*"));
|
|
|
- equalsCondition.put("shipName", StrUtil.isBlank(guapAlert.getShipName()) ? null : StrUtil.concat(true, "*", guapAlert.getShipName(), "*"));
|
|
|
- equalsCondition.put("shipRegionType", guapAlert.getShipRegionType());
|
|
|
- equalsCondition.put("destination", StrUtil.isBlank(guapAlert.getDestination()) ? null : StrUtil.concat(true, "*", guapAlert.getDestination(), "*"));
|
|
|
- equalsCondition.put("orgName", guapAlert.getOrgName());
|
|
|
- equalsCondition.put("illegalStatus", guapAlert.getIllegalStatus());
|
|
|
- equalsCondition.put("dealResult", guapAlert.getDealResult());
|
|
|
- equalsCondition.put("fastResult", guapAlert.getFastResult());
|
|
|
- equalsCondition.put("uploadResult", guapAlert.getUploadResult());
|
|
|
- equalsCondition.put("monitorPointName", guapAlert.getMonitorPointName());
|
|
|
- // 组装范围查询条件
|
|
|
- Map<String, Object> rangeCondition = new HashMap<>();
|
|
|
- if (ObjectUtil.isNotEmpty(params.get("beginTime"))) {
|
|
|
- params.put("beginTime", params.get("beginTime") + " 00:00:00");
|
|
|
- }
|
|
|
- if (ObjectUtil.isNotEmpty(params.get("endTime"))) {
|
|
|
- params.put("endTime", params.get("endTime") + " 23:59:59");
|
|
|
- }
|
|
|
- rangeCondition.put("createTime", StrUtil.concat(true, "[", Convert.toStr(params.get("beginTime")), ",", Convert.toStr(params.get("endTime")), "]"));
|
|
|
- List<String> orderBy = new ArrayList<>();
|
|
|
- orderBy.add("-createTime");
|
|
|
- PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- Map<String, Object> maps = client.searchDocument(equalsCondition, rangeCondition, orderBy, pageDomain.getPageNum(), pageDomain.getPageSize(), ElasticConstants.SO2_ALERT);
|
|
|
-
|
|
|
- TableDataInfo rspData = new TableDataInfo();
|
|
|
- rspData.setCode(HttpStatus.SUCCESS);
|
|
|
- rspData.setMsg("查询成功");
|
|
|
- rspData.setRows(Convert.toList(GuapAlert.class, maps.get("pageList")));
|
|
|
- rspData.setTotal(Convert.toLong(maps.get("totalNum")));
|
|
|
- return rspData;
|
|
|
- }
|
|
|
-
|
|
|
- @GetMapping("/xiutan/list")
|
|
|
- @ApiOperation("嗅探-硫嫌疑船舶列表数据")
|
|
|
- public TableDataInfo XtList(XiuTanIllegalShip illegalShip) {
|
|
|
- // 传来的参数
|
|
|
- Map<String, Object> params = illegalShip.getParams();
|
|
|
- Map<String, Object> equalsCondition = new HashMap<>();
|
|
|
- // 组装查询条件
|
|
|
- equalsCondition.put("mmsi", ObjectUtil.isEmpty(illegalShip.getMmsi()) ? null : StrUtil.concat(true, "*", Convert.toStr(illegalShip.getMmsi()), "*"));
|
|
|
- equalsCondition.put("shipName", StrUtil.isBlank(illegalShip.getShipName()) ? null : StrUtil.concat(true, "*", illegalShip.getShipName(), "*"));
|
|
|
- equalsCondition.put("shipRegionType", illegalShip.getShipRegionType());
|
|
|
- equalsCondition.put("destination", StrUtil.isBlank(illegalShip.getDestination()) ? null : StrUtil.concat(true, "*", illegalShip.getDestination(), "*"));
|
|
|
- equalsCondition.put("orgName", illegalShip.getOrgName());
|
|
|
- equalsCondition.put("illegalStatus", illegalShip.getIllegalStatus());
|
|
|
- equalsCondition.put("dealResult", illegalShip.getDealResult());
|
|
|
- equalsCondition.put("fastResult", illegalShip.getFastResult());
|
|
|
- equalsCondition.put("uploadResult", illegalShip.getUploadResult());
|
|
|
- equalsCondition.put("monitorPointName", illegalShip.getMonitorPointName());
|
|
|
- // 组装范围查询条件
|
|
|
- Map<String, Object> rangeCondition = new HashMap<>();
|
|
|
- if (ObjectUtil.isNotEmpty(params.get("beginTime"))) {
|
|
|
- params.put("beginTime", params.get("beginTime") + " 00:00:00");
|
|
|
- }
|
|
|
- if (ObjectUtil.isNotEmpty(params.get("endTime"))) {
|
|
|
- params.put("endTime", params.get("endTime") + " 23:59:59");
|
|
|
- }
|
|
|
- rangeCondition.put("peakTime", StrUtil.concat(true, "[", Convert.toStr(params.get("beginTime")), ",", Convert.toStr(params.get("endTime")), "]"));
|
|
|
- List<String> orderBy = new ArrayList<>();
|
|
|
- orderBy.add("-peakTime");
|
|
|
- PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- Map<String, Object> maps = client.searchDocument(equalsCondition, rangeCondition, orderBy, pageDomain.getPageNum(), pageDomain.getPageSize(), ElasticConstants.AIS_ILLEGAL_SHIP);
|
|
|
-
|
|
|
- TableDataInfo rspData = new TableDataInfo();
|
|
|
- rspData.setCode(HttpStatus.SUCCESS);
|
|
|
- rspData.setMsg("查询成功");
|
|
|
- rspData.setRows(Convert.toList(GuapAlert.class, maps.get("pageList")));
|
|
|
- rspData.setTotal(Convert.toLong(maps.get("totalNum")));
|
|
|
- return rspData;
|
|
|
- }
|
|
|
-
|
|
|
@GetMapping("/list")
|
|
|
@ApiOperation("硫嫌疑船舶列表数据")
|
|
|
public TableDataInfo list(IllegalShip illegalShip) {
|
|
@@ -304,21 +224,4 @@ public class So2Controller extends BaseController {
|
|
|
return AjaxResult.success(result);
|
|
|
}
|
|
|
|
|
|
- /*@DeleteMapping("/del")
|
|
|
- @ApiOperation("删除数据")
|
|
|
- public AjaxResult del() {
|
|
|
- if (StrUtil.isBlank(interval)) {
|
|
|
- // 默认值为1个月
|
|
|
- interval = "1M";
|
|
|
- }
|
|
|
- Map<Object, Object> aisAggs = client.dateHistogramAggs(ElasticConstants.AIS_ILLEGAL_SHIP, AggsType.count, "peakTime", "id", null, null, new DateHistogramInterval(interval));
|
|
|
- Map<Object, Object> so2Aggs = client.dateHistogramAggs(ElasticConstants.SO2_ALERT, AggsType.count, "createTime", "id", null, null, new DateHistogramInterval(interval));
|
|
|
- Map<Object, Object> heiyanAggs = client.dateHistogramAggs(ElasticConstants.HEIYAN_SHIP_RECOGNITION, AggsType.count, "snapTimeFmt", "id", null, null, new DateHistogramInterval(interval));
|
|
|
- Map<String, Map<Object, Object>> result = new HashMap<>();
|
|
|
- result.put("ais", aisAggs);
|
|
|
- result.put("so2", so2Aggs);
|
|
|
- result.put("black", heiyanAggs);
|
|
|
- return AjaxResult.success(result);
|
|
|
- }*/
|
|
|
-
|
|
|
}
|