Commit 9346e468 authored by lisong's avatar lisong

日常值班统计添加登录人过滤

parent b02f60cf
......@@ -44,8 +44,9 @@ public interface AlertCalledMapper extends BaseMapper<AlertCalled> {
* @return
*/
Map<String, Long> queryAlertStatusCount(@Param("beginDate") String beginDate,
@Param("endDate") String endDate,
@Param("groupCode") String groupCode);
@Param("endDate") String endDate,
@Param("groupCode") String groupCode,
@Param("userId") String userId);
/**
* 根据查询条件返回警情记录
......
......@@ -11,6 +11,7 @@
tz_alert_called
WHERE
skill_group LIKE CONCAT ( #{groupCode}, '%' )
and rec_user_id = #{userId}
<if test="beginDate != null and beginDate != ''">
and call_time >= #{beginDate}
</if>
......
......@@ -869,20 +869,22 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
QueryWrapper<AlertCalled> todoNumQueryWrapper = new QueryWrapper<>();
todoNumQueryWrapper.eq("alert_status", false);
todoNumQueryWrapper.eq("skill_group", groupCode);
todoNumQueryWrapper.eq("rec_user_id", reginParams.getUserModel().getUserId());
alarmStatisticsDto.setTodoNum(this.count(todoNumQueryWrapper));
Map<String, Long> map = alertCalledMapper.queryAlertStatusCount(
DateUtils.stampToDate(System.currentTimeMillis(), DateUtils.DATE_PATTERN),
DateUtils.stampToDate(DateUtils.dateAddDays(new Date(), 1).getTime(), DateUtils.DATE_PATTERN),
groupCode);
groupCode,
reginParams.getUserModel().getUserId());
// 当天接警
// alarmStatisticsDto.setTodayAlarmNum(
// map.get("calledCount") == null ? 0 : map.get("calledCount"));
// // 当天提交
// alarmStatisticsDto.setSubmitNum(
// map.get("majorAlertCount") == null ? 0 : map.get("majorAlertCount"));
// alarmStatisticsDto.setAllNum(this.count(allNumQueryWrapper));
alarmStatisticsDto.setTodayAlarmNum(
map.get("calledCount") == null ? 0 : map.get("calledCount"));
// 当天提交
alarmStatisticsDto.setSubmitNum(
map.get("majorAlertCount") == null ? 0 : map.get("majorAlertCount"));
alarmStatisticsDto.setAllNum(this.count(allNumQueryWrapper));
LinkedHashMap<String, Long> recordMap = new LinkedHashMap<>();
......
......@@ -174,7 +174,8 @@
af.check_results AS checkResult
FROM
( SELECT * FROM tz_cylinder_filling_record WHERE is_not_es IS NULL AND filling_before_id IS NOT NULL
AND filling_check_id IS NOT NULL and LENGTH(filling_startTime) >= 10 LIMIT 5000 ) r
AND filling_check_id IS NOT NULL and LENGTH(filling_startTime) >= 10
and app_id in (SELECT app_id from tz_cylinder_unit) LIMIT 5000 ) r
LEFT JOIN tz_cylinder_filling b ON b.filling_before_id = r.filling_before_id
AND r.filling_before_id IS NOT NULL and b.inspection_date NOT LIKE'16%'
AND date_format ( b.inspection_date, '%Y-%m-%d' ) = date_format ( r.filling_startTime, '%Y-%m-%d' ) and b.sequence_code is not null AND b.app_id is not null
......
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