高级算法模块代码调整
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.advance.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.netflix.ribbon.proxy.annotation.Http;
|
||||
import com.njcn.advance.pojo.dto.BalanceInfo;
|
||||
@@ -7,8 +8,10 @@ import com.njcn.advance.pojo.param.AdvanceBaseParam;
|
||||
import com.njcn.advance.pojo.po.PqsRelevanceLog;
|
||||
import com.njcn.advance.service.EventRelevantAnalysisService;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.constant.OperateType;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.common.utils.PubUtils;
|
||||
@@ -30,6 +33,7 @@ import java.io.DataInputStream;
|
||||
import java.net.URLDecoder;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
@@ -102,6 +106,70 @@ public class EventRelevantAnalysisController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增关联事件主列表
|
||||
* @author cdf
|
||||
* @date 2023/8/11
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEventByTimeRange")
|
||||
@ApiOperation("新增关联事件主列表")
|
||||
public HttpResult<Page<AdvanceEventDetailVO>> queryEventByTimeRange(@RequestBody BaseParam baseParam){
|
||||
String methodDescribe = getMethodDescribe("queryEventDetailByAssId");
|
||||
Page<AdvanceEventDetailVO> page = eventRelevantAnalysisService.queryEventByTimeRange(baseParam);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 把暂降事件添加到指定事件中去
|
||||
* @author cdf
|
||||
* @date 2023/8/16
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||
@PostMapping("/updateEventToAss")
|
||||
@ApiOperation("把暂降事件添加到指定事件中去")
|
||||
public HttpResult<Page<AdvanceEventDetailVO>> updateEventToAss(@RequestBody Map<String,Object> map){
|
||||
if(!map.containsKey("eventId") || !map.containsKey("assId")){
|
||||
throw new BusinessException("参数异常");
|
||||
}
|
||||
String methodDescribe = getMethodDescribe("updateEventToAss");
|
||||
List<String> eventIds = (List<String>) map.get("eventId");
|
||||
if(CollectionUtil.isEmpty(eventIds)){
|
||||
throw new BusinessException("暂降事件不可为空");
|
||||
}
|
||||
eventRelevantAnalysisService.updateEventToAss(eventIds, (String) map.get("assId"));
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除指定关联事件中的暂降事件
|
||||
* @author cdf
|
||||
* @date 2023/8/16
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.UPLOAD)
|
||||
@PostMapping("/delEventToAss")
|
||||
@ApiOperation("删除指定关联事件中的暂降事件")
|
||||
public HttpResult<Page<AdvanceEventDetailVO>> delEventToAss(@RequestBody List<String> eventId){
|
||||
String methodDescribe = getMethodDescribe("delEventToAss");
|
||||
eventRelevantAnalysisService.delEventToAss(eventId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取指定事件中的暂降事件
|
||||
* @author cdf
|
||||
* @date 2023/8/16
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryEventList")
|
||||
@ApiOperation("查询关联事件中的暂降事件")
|
||||
public HttpResult<List<AdvanceEventDetailVO>> queryEventList(@RequestBody List<String> eventId){
|
||||
String methodDescribe = getMethodDescribe("queryEventList");
|
||||
List<AdvanceEventDetailVO> list = eventRelevantAnalysisService.queryEventList(eventId);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 操作记录查看
|
||||
* @author cdf
|
||||
|
||||
Reference in New Issue
Block a user