1.国网上送代码调整

This commit is contained in:
wr
2023-12-25 10:17:58 +08:00
parent c83b89c318
commit f9ac0a5c45
10 changed files with 268 additions and 30 deletions

View File

@@ -1,5 +1,9 @@
package com.njcn.event.controller.majornetwork;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.njcn.common.pojo.annotation.OperateInfo;
import com.njcn.common.pojo.enums.common.LogEnum;
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
@@ -7,6 +11,7 @@ import com.njcn.common.pojo.response.HttpResult;
import com.njcn.common.utils.HttpResultUtil;
import com.njcn.common.utils.LogUtil;
import com.njcn.event.mapper.majornetwork.EventDetailMapper;
import com.njcn.event.pojo.param.EventCountParam;
import com.njcn.event.pojo.po.EventDetail;
import com.njcn.event.pojo.po.RmpEventDetailPO;
import com.njcn.event.pojo.vo.GeneralVO;
@@ -154,4 +159,21 @@ public class EventDetailController extends BaseController {
List<RmpEventDetailPO> eventDetailPOS = eventDetailService.listByIds(ids);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, eventDetailPOS, methodDescribe);
}
/**
* 根据监测点集合获取短时终端,电压暂升,电压暂降
* @return
*/
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
@PostMapping("/getEventDetailByLineCount")
@ApiOperation("根据暂态id集合获取暂降列表")
public HttpResult<Integer> getEventDetailByLineCount(@RequestBody EventCountParam param) {
String methodDescribe = getMethodDescribe("getEventDetailByLineCount");
int count = eventDetailService.count(new LambdaQueryWrapper<RmpEventDetailPO>()
.in(CollUtil.isNotEmpty(param.getIds()), RmpEventDetailPO::getLineId, param.getIds())
.ge(StrUtil.isNotBlank(param.getStartTime()), RmpEventDetailPO::getStartTime, DateUtil.beginOfDay(DateUtil.parse(param.getStartTime())))
.le(StrUtil.isNotBlank(param.getEndTime()), RmpEventDetailPO::getStartTime, DateUtil.endOfDay(DateUtil.parse(param.getEndTime())))
);
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, count, methodDescribe);
}
}