Commit b5a0e298 authored by wujiang's avatar wujiang

添加跑马灯筛选接口

parent af56b939
...@@ -14,96 +14,94 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -14,96 +14,94 @@ import org.springframework.web.bind.annotation.RequestParam;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
//@FeignClient(name = "${mcb.warning.name:MCB-SERVER}", path = "warning", configuration = {FeignConfiguration.class}) //@FeignClient(name = "${mcb.warning.name:MCB-SERVER}", path = "warning", configuration = {FeignConfiguration.class})
@FeignClient(name = "mcb",url = "http://10.20.1.160:10005", path = "warning", configuration = {FeignConfiguration.class}) @FeignClient(name = "mcb", url = "http://10.20.1.160:10005", path = "warning", configuration = {
FeignConfiguration.class })
public interface McbWarningFeign { public interface McbWarningFeign {
/** /**
* 根据风险来源查询人员红黄绿吗信息 * 根据风险来源查询人员红黄绿吗信息
*/ */
@GetMapping("/task/getQrCodeCount") @GetMapping("/task/getQrCodeCount")
FeignClientResult<Map<String, Object>> getQrCodeCount(@RequestParam(required = false, value = "parentCode") String parentCode, FeignClientResult<Map<String, Object>> getQrCodeCount(
@RequestParam(value = "warningObjectType") String warningObjectType); @RequestParam(required = false, value = "parentCode") String parentCode,
@RequestParam(value = "warningObjectType") String warningObjectType);
/**
* 根据风险来源查询人员红黄绿吗信息 /**
*/ * 根据风险来源查询人员红黄绿吗信息
@GetMapping("/task/getWarningInfoCountByObjectId") */
FeignClientResult<Integer> getWarningInfoCountByObjectId(@RequestParam(value = "code") String code); @GetMapping("/task/getWarningInfoCountByObjectId")
FeignClientResult<Integer> getWarningInfoCountByObjectId(@RequestParam(value = "code") String code);
/**
* 根据风险来源查询人员红黄绿吗信息 /**
*/ * 根据风险来源查询人员红黄绿吗信息
@GetMapping("/task/getWarningInfoByTraceId") */
FeignClientResult<String> getWarningInfoByTraceId(@RequestParam(value = "traceId") String traceId); @GetMapping("/task/getWarningInfoByTraceId")
FeignClientResult<String> getWarningInfoByTraceId(@RequestParam(value = "traceId") String traceId);
/**
* 根据风险来源查询人员红黄绿吗信息 /**
*/ * 根据风险来源查询人员红黄绿吗信息
@PostMapping("/task/updateRawDataByTraceId") */
FeignClientResult<Boolean> updateRawDataByTraceId(@RequestParam(value = "traceId") String traceId, @RequestParam(value = "rawData") String rawData); @PostMapping("/task/updateRawDataByTraceId")
FeignClientResult<Boolean> updateRawDataByTraceId(@RequestParam(value = "traceId") String traceId,
@RequestParam(value = "rawData") String rawData);
/**
* 任务详情分页列表 /**
*/ * 任务详情分页列表
@GetMapping("/warning-warning-info/page") */
FeignClientResult<Page<Map<String, Object>>> getTaskDetailPage(@RequestParam Map<String, Object> map); @GetMapping("/warning-warning-info/page")
FeignClientResult<Page<Map<String, Object>>> getTaskDetailPage(@RequestParam Map<String, Object> map);
/**
* 问题记录分页列表 /**
*/ * 问题记录分页列表
@GetMapping("/warning-question-info/questionPage") */
FeignClientResult<Page<Map<String, Object>>> getQuestionRecordPage(@RequestParam Map<String, Object> map); @GetMapping("/warning-question-info/questionPage")
FeignClientResult<Page<Map<String, Object>>> getQuestionRecordPage(@RequestParam Map<String, Object> map);
/**
* 任务详情、问题记录左侧树 /**
*/ * 任务详情、问题记录左侧树
@GetMapping("/warning-warning-info/tree") */
FeignClientResult<List<RectificationUnitClassifyTreeDto>> getWarnTree(); @GetMapping("/warning-warning-info/tree")
FeignClientResult<List<RectificationUnitClassifyTreeDto>> getWarnTree();
/**
* 任务详情列表统计 /**
*/ * 任务详情列表统计
@GetMapping("/warning-warning-info/statistics") */
FeignClientResult getTaskDetailStatistic(@RequestParam Map<String, Object> map); @GetMapping("/warning-warning-info/statistics")
FeignClientResult getTaskDetailStatistic(@RequestParam Map<String, Object> map);
/**
* 问题记录列表统计 /**
*/ * 问题记录列表统计
@GetMapping("/warning-question-info/questionPageTopStatistics") */
FeignClientResult getQuestionRecordStatistic(@RequestParam Map<String, Object> map); @GetMapping("/warning-question-info/questionPageTopStatistics")
FeignClientResult getQuestionRecordStatistic(@RequestParam Map<String, Object> map);
/**
* 任务总览地图信息数据 /**
*/ * 任务总览地图信息数据
@GetMapping("/monitor/overview/getMapRouteInfoByCodes") */
FeignClientResult getMapRouteInfoByCodes(@RequestParam String province, @GetMapping("/monitor/overview/getMapRouteInfoByCodes")
@RequestParam("codes") List<String> codes, FeignClientResult getMapRouteInfoByCodes(@RequestParam String province, @RequestParam("codes") List<String> codes,
@RequestParam(value = "operator", defaultValue = "=") String operator); @RequestParam(value = "operator", defaultValue = "=") String operator);
/**
/** * 跑马灯列表数据分页查询
* 跑马灯列表数据分页查询 */
*/ @GetMapping(value = "/monitor/overview/getLampListPage")
@GetMapping(value = "/monitor/overview/getLampListPage") FeignClientResult getLampListPage(@RequestParam String questionRectificationStatus,
FeignClientResult getLampListPage(@RequestParam String questionRectificationStatus, @RequestParam(value = "warningSourceType", required = false) String warningSourceType,
@RequestParam("codes") List<String> codes, @RequestParam(value = "objectName", required = false) String objectName,
@RequestParam(value = "operator", defaultValue = "=") String operator, @RequestParam("codes") List<String> codes,
@RequestParam("current") Long current, @RequestParam(value = "operator", defaultValue = "=") String operator,
@RequestParam("size") Long size @RequestParam("current") Long current, @RequestParam("size") Long size);
);
/**
* 跑马灯列表数据查询
*/
/** @GetMapping("/monitor/overview/getLampList")
* 跑马灯列表数据查询 FeignClientResult getLampList(@RequestParam String questionRectificationStatus,
*/ @RequestParam(value = "warningSourceType", required = false) String warningSourceType,
@GetMapping("/monitor/overview/getLampList") @RequestParam(value = "objectName", required = false) String objectName,
FeignClientResult getLampList(@RequestParam String questionRectificationStatus, @RequestParam("codes") List<String> codes,
@RequestParam("codes") List<String> codes, @RequestParam(value = "operator", defaultValue = "=") String operator);
@RequestParam(value = "operator", defaultValue = "=") String operator);
} }
...@@ -7,89 +7,91 @@ import java.util.Map; ...@@ -7,89 +7,91 @@ import java.util.Map;
public interface IMcbWarningService { public interface IMcbWarningService {
/** /**
* 今日预警-预警总数 * 今日预警-预警总数
* *
* @param processingStatus 处理状态 * @param processingStatus 处理状态
* @return 预警总数 * @return 预警总数
*/ */
Map<String, Object> queryTodayCount(Integer processingStatus); Map<String, Object> queryTodayCount(Integer processingStatus);
/**
/** * 近七日预警统计
* 近七日预警统计 *
* * @return 预警统计
* @return 预警统计 */
*/ List<Map<String, Object>> queryWeekCount();
List<Map<String, Object>> queryWeekCount();
/**
/** * 预警信息列表
* 预警信息列表 *
* * @return 预警信息列表
* @return 预警信息列表 */
*/ Page<Map<String, Object>> queryWarningPage(Page<Map<String, Object>> page, Integer processingStatus,
Page<Map<String, Object>> queryWarningPage(Page<Map<String, Object>> page, Integer processingStatus, String eventLevel, String createDate, String warningSourceType); String eventLevel, String createDate, String warningSourceType);
/** /**
* 预警信息总数 * 预警信息总数
* *
* @return 预警信息总数 * @return 预警信息总数
*/ */
Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate, String warningSourceType); Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate, String warningSourceType);
/** /**
* 问题信息列表 * 问题信息列表
* *
* @return 问题信息列表 * @return 问题信息列表
*/ */
Page<Map<String, Object>> queryQuestionPage(Page<Map<String, Object>> page, Integer completionStatus); Page<Map<String, Object>> queryQuestionPage(Page<Map<String, Object>> page, Integer completionStatus);
/** /**
* 问题信息列表 * 问题信息列表
* *
* @return 问题信息列表 * @return 问题信息列表
*/ */
Long queryQuestionCount(Integer completionStatus); Long queryQuestionCount(Integer completionStatus);
/** /**
* 获取地图点位/路线 * 获取地图点位/路线
* *
* @return 地图点位/路线 * @return 地图点位/路线
*/ */
Object queryMapRoutes(String province); Object queryMapRoutes(String province);
/** /**
* 任务详情分页列表 * 任务详情分页列表
* *
* @return 任务详情分页列表 * @return 任务详情分页列表
*/ */
Page<Map<String, Object>> getTaskDetailPage(Map<String, Object> map); Page<Map<String, Object>> getTaskDetailPage(Map<String, Object> map);
/** /**
* 问题记录分页列表 * 问题记录分页列表
* *
* @return 任务详情分页列表 * @return 任务详情分页列表
*/ */
Page<Map<String, Object>> getQuestionRecordPage(Map<String, Object> map); Page<Map<String, Object>> getQuestionRecordPage(Map<String, Object> map);
/** /**
* 任务详情、问题记录左侧树 * 任务详情、问题记录左侧树
*/ */
Object getWarnTree(); Object getWarnTree();
/** /**
* 任务详情列表统计 * 任务详情列表统计
*/ */
Object getTaskDetailStatistic(Map<String, Object> map); Object getTaskDetailStatistic(Map<String, Object> map);
/** /**
* 问题记录列表统计 * 问题记录列表统计
*/ */
Object getQuestionRecordStatistic(Map<String, Object> map); Object getQuestionRecordStatistic(Map<String, Object> map);
Object getMapRouteInfoByCodes(String province); Object getMapRouteInfoByCodes(String province);
Object getLampListPageByCodes(String questionRectificationStatus,Page page); Object getLampListPageByCodes(String questionRectificationStatus, String warningSourceType, String objectName,
Object getLampListByCodes(String questionRectificationStatus); Page page);
Object getLampListByCodes(String questionRectificationStatus, String warningSourceType, String objectName);
} }
...@@ -42,8 +42,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -42,8 +42,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public Map<String, Object> queryTodayCount(Integer processingStatus) { public Map<String, Object> queryTodayCount(Integer processingStatus) {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
return mcbWarningMapper.queryTodayCount(projectOrgCodes, processingStatus); return mcbWarningMapper.queryTodayCount(projectOrgCodes, processingStatus);
...@@ -57,8 +56,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -57,8 +56,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public List<Map<String, Object>> queryWeekCount() { public List<Map<String, Object>> queryWeekCount() {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
return mcbWarningMapper.queryWeekCount(projectOrgCodes); return mcbWarningMapper.queryWeekCount(projectOrgCodes);
...@@ -77,8 +75,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -77,8 +75,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
long start = page.getCurrent() - 1; long start = page.getCurrent() - 1;
long offset = page.getSize() * page.getCurrent(); long offset = page.getSize() * page.getCurrent();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
List<Map<String, Object>> records = mcbWarningMapper.queryWarningList(start, offset, projectOrgCodes, List<Map<String, Object>> records = mcbWarningMapper.queryWarningList(start, offset, projectOrgCodes,
...@@ -100,8 +97,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -100,8 +97,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
public Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate, public Long queryWarningCount(Integer processingStatus, String eventLevel, String createDate,
String warningSourceType) { String warningSourceType) {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
return mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate, return mcbWarningMapper.queryWarningCount(projectOrgCodes, processingStatus, eventLevel, createDate,
...@@ -120,8 +116,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -120,8 +116,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
long start = page.getCurrent() - 1; long start = page.getCurrent() - 1;
long offset = page.getSize() * page.getCurrent(); long offset = page.getSize() * page.getCurrent();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
List<Map<String, Object>> records = mcbWarningMapper.queryQuestionList(start, offset, projectOrgCodes, List<Map<String, Object>> records = mcbWarningMapper.queryQuestionList(start, offset, projectOrgCodes,
...@@ -141,8 +136,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -141,8 +136,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public Long queryQuestionCount(Integer completionStatus) { public Long queryQuestionCount(Integer completionStatus) {
List<String> projectOrgCodes = this.getProjectOrgCodes(); List<String> projectOrgCodes = this.getProjectOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
return mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus); return mcbWarningMapper.queryQuestionCount(projectOrgCodes, completionStatus);
...@@ -272,8 +266,7 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -272,8 +266,7 @@ public class McbWarningServiceImpl implements IMcbWarningService {
@Override @Override
public Object getMapRouteInfoByCodes(String province) { public Object getMapRouteInfoByCodes(String province) {
List<String> projectOrgCodes = permissionService.getCurrentUserAmosOrgCodes(); List<String> projectOrgCodes = permissionService.getCurrentUserAmosOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
FeignClientResult<Object> result = mcbWarningFeign.getMapRouteInfoByCodes(province, projectOrgCodes, "like"); FeignClientResult<Object> result = mcbWarningFeign.getMapRouteInfoByCodes(province, projectOrgCodes, "like");
...@@ -281,24 +274,25 @@ public class McbWarningServiceImpl implements IMcbWarningService { ...@@ -281,24 +274,25 @@ public class McbWarningServiceImpl implements IMcbWarningService {
} }
@Override @Override
public Object getLampListPageByCodes(String questionRectificationStatus, Page page) { public Object getLampListPageByCodes(String questionRectificationStatus, String warningSourceType,
String objectName, Page page) {
List<String> projectOrgCodes = permissionService.getCurrentUserAmosOrgCodes(); List<String> projectOrgCodes = permissionService.getCurrentUserAmosOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
FeignClientResult<Object> result = mcbWarningFeign.getLampListPage(questionRectificationStatus,projectOrgCodes,"like",page.getCurrent(),page.getSize()); FeignClientResult<Object> result = mcbWarningFeign.getLampListPage(questionRectificationStatus,
warningSourceType, objectName, projectOrgCodes, "like", page.getCurrent(), page.getSize());
return result.getResult(); return result.getResult();
} }
@Override @Override
public Object getLampListByCodes(String questionRectificationStatus) { public Object getLampListByCodes(String questionRectificationStatus, String warningSourceType, String objectName) {
List<String> projectOrgCodes = permissionService.getCurrentUserAmosOrgCodes(); List<String> projectOrgCodes = permissionService.getCurrentUserAmosOrgCodes();
if(projectOrgCodes.isEmpty()) if (projectOrgCodes.isEmpty()) {
{
projectOrgCodes.add("NULL"); projectOrgCodes.add("NULL");
} }
FeignClientResult<Object> result = mcbWarningFeign.getLampList(questionRectificationStatus,projectOrgCodes,"like"); FeignClientResult<Object> result = mcbWarningFeign.getLampList(questionRectificationStatus, warningSourceType,
objectName, projectOrgCodes, "like");
return result.getResult(); return result.getResult();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment