Commit e5f60853 authored by chenhao's avatar chenhao

提交重大事件和今日事件的统计

parent 26ea6622
......@@ -62,4 +62,10 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
String alertStage,
String alertStatus,
String address);
Map<String, Integer> getTodayEmergencyCount();
Map<String, Integer> getImportantEventCount();
Map<String, Integer> getImportantEventDetail();
}
......@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Maps;
import com.itextpdf.text.pdf.PdfStructTreeController.returnType;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
......@@ -36,6 +37,7 @@ import org.typroject.tyboot.core.rdbms.annotation.Operator;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -393,4 +395,27 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
return result;
}
public Object getTodayEmergencyCount() {
return alertCalledMapper.getTodayEmergencyCount();
}
public Object getImportantEventCount() {
return alertCalledMapper.getImportantEventCount();
}
public Object getImportantEventOrTodayEmergencyCount(String type) {
List<Map<String, Object>> map=null;
LambdaQueryWrapper<AlertCalled> queryWrapper=new LambdaQueryWrapper<AlertCalled>();
queryWrapper.eq(AlertCalled::getIsDelete, 0);
queryWrapper.eq(AlertCalled::getAlarmTypeCode, "960");
if("rescueTotal".equals(type)) {
queryWrapper.in(AlertCalled::getAlertStageCode,Arrays.asList("861","862"));
}else if("rescueComplete".equals(type)) {
queryWrapper.in(AlertCalled::getAlertStageCode,Arrays.asList("864","865","866"));
}
if("importantEventCount".equals(type)) {
return alertCalledMapper.getImportantEventDetail();
}
return this.baseMapper.selectMaps(queryWrapper);
}
}
\ No newline at end of file
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