预警统计添加按年和按月
This commit is contained in:
parent
eebc4f3ca1
commit
f12332f282
|
@ -50,8 +50,8 @@ public class StatisticController extends BaseController {
|
||||||
* 获取预警情况统计-整体
|
* 获取预警情况统计-整体
|
||||||
*/
|
*/
|
||||||
@GetMapping("/warn/all")
|
@GetMapping("/warn/all")
|
||||||
public R<StatisticWarnVo> getWarn4All() {
|
public R<StatisticWarnVo> getWarn4All(String select) {
|
||||||
return R.ok(statisticService.getWarn4All());
|
return R.ok(statisticService.getWarn4All(select));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,8 +106,8 @@ public class StatisticController extends BaseController {
|
||||||
* 获取总预警数
|
* 获取总预警数
|
||||||
*/
|
*/
|
||||||
@GetMapping("/warn/num")
|
@GetMapping("/warn/num")
|
||||||
public R<Integer> getWarnNum(String select) {
|
public R<Integer> getWarnNum() {
|
||||||
return R.ok(statisticService.getWarnNum(select));
|
return R.ok(statisticService.getWarnNum());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -25,11 +25,11 @@ public interface StatisticMapper {
|
||||||
|
|
||||||
List<StatisticFactorVo> selectStatisticFactor(@Param("batchNo") Long batchNo, @Param("scaleId") Long scaleId);
|
List<StatisticFactorVo> selectStatisticFactor(@Param("batchNo") Long batchNo, @Param("scaleId") Long scaleId);
|
||||||
|
|
||||||
StatisticWarnVo selectStatisticWarn4All();
|
StatisticWarnVo selectStatisticWarn4All(@Param("startTime") String startTime);
|
||||||
|
|
||||||
int selectUserNum();
|
int selectUserNum();
|
||||||
int selectEvaluationNum();
|
int selectEvaluationNum();
|
||||||
int selectWarnNum(@Param("startTime") String startTime);
|
int selectWarnNum();
|
||||||
int selectInterveneNum();
|
int selectInterveneNum();
|
||||||
|
|
||||||
List<StatisticNumVo> selectScalePublishNum();
|
List<StatisticNumVo> selectScalePublishNum();
|
||||||
|
|
|
@ -24,11 +24,11 @@ public interface IStatisticService {
|
||||||
|
|
||||||
List<StatisticFactorVo> getFactor4Class(BaseQueryBo query);
|
List<StatisticFactorVo> getFactor4Class(BaseQueryBo query);
|
||||||
|
|
||||||
StatisticWarnVo getWarn4All();
|
StatisticWarnVo getWarn4All(String select);
|
||||||
|
|
||||||
int getUserNum();
|
int getUserNum();
|
||||||
int getEvaluationNum();
|
int getEvaluationNum();
|
||||||
int getWarnNum(String select);
|
int getWarnNum();
|
||||||
int getInterveneNum();
|
int getInterveneNum();
|
||||||
List<StatisticNumVo> getScalePublishNum();
|
List<StatisticNumVo> getScalePublishNum();
|
||||||
List<StatisticNumVo> getPublishAndEvaluationNumByGrade(String select);
|
List<StatisticNumVo> getPublishAndEvaluationNumByGrade(String select);
|
||||||
|
|
|
@ -163,8 +163,9 @@ public class StatisticServiceImpl implements IStatisticService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StatisticWarnVo getWarn4All() {
|
public StatisticWarnVo getWarn4All(String select) {
|
||||||
return statisticMapper.selectStatisticWarn4All();
|
String startTime = getStartTimeBySelect(select);
|
||||||
|
return statisticMapper.selectStatisticWarn4All(startTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -178,9 +179,9 @@ public class StatisticServiceImpl implements IStatisticService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getWarnNum(String select) {
|
public int getWarnNum() {
|
||||||
String startTime = getStartTimeBySelect(select);
|
//String startTime = getStartTimeBySelect(select);
|
||||||
return statisticMapper.selectWarnNum(startTime);
|
return statisticMapper.selectWarnNum();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -57,7 +57,8 @@
|
||||||
count(if(sfr.situation = 5, 1, null)) as `majorNum`
|
count(if(sfr.situation = 5, 1, null)) as `majorNum`
|
||||||
from sys_evaluation_conclusion ec
|
from sys_evaluation_conclusion ec
|
||||||
left join sys_scale_factor_range sfr on sfr.range_id = ec.factor_range_id
|
left join sys_scale_factor_range sfr on sfr.range_id = ec.factor_range_id
|
||||||
where ec.status = 1
|
left join sys_evaluation_record er on er.record_id = ec.record_id
|
||||||
|
where ec.status = 1 and er.create_time >= #{startTime}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectUserNum" resultType="int">
|
<select id="selectUserNum" resultType="int">
|
||||||
|
@ -75,7 +76,6 @@
|
||||||
<select id="selectWarnNum" resultType="int">
|
<select id="selectWarnNum" resultType="int">
|
||||||
select count(*)
|
select count(*)
|
||||||
from sys_warn_record
|
from sys_warn_record
|
||||||
where warn_time >= #{startTime}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectInterveneNum" resultType="int">
|
<select id="selectInterveneNum" resultType="int">
|
||||||
|
|
Loading…
Reference in New Issue