Commit f43e555f authored by 韩桐桐's avatar 韩桐桐

fix(96333 & 统计):1,各地市业务办理情况接口

parent f6df1702
package com.yeejoin.amos.boot.module.elevator.api.vo;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDateDto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 大屏筛选过滤对象
*
* @author Administrator
*/
@Data
public class DPAlertRecordFilterVo {
/**
* 区域
*/
@NotBlank(message = "区域编码不能为空!")
private String cityCode;
/**
* 警情来源
*/
private String alertSource;
/**
* 警情来源code
*/
private String alertSourceCode;
/**
* 警情类型
*/
private String alertType;
/**
* 警情类型code
*/
private String alertTypeCode;
/**
* 报警类型
*/
private String type;
/**
* 报警类型code
*/
private String typeCode;
/**
* 警情起止时间
*/
private DPFilterParamForDateDto alertStartAndEndTime;
/**
* 当前页
*/
private int current;
/**
* 每页大小
*/
private int size;
}
......@@ -14,10 +14,10 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
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;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.common.biz.service.impl.MaintenanceCompanyServiceImpl;
import com.yeejoin.amos.boot.module.elevator.api.enums.SourcesInfoEnum;
import com.yeejoin.amos.boot.module.elevator.api.vo.DPAlertRecordFilterVo;
import com.yeejoin.amos.boot.module.elevator.biz.service.impl.*;
import com.yeejoin.amos.boot.module.elevator.api.dto.*;
import com.yeejoin.amos.boot.module.elevator.api.entity.*;
......@@ -877,7 +877,7 @@ public class AlertCalledController extends BaseController {
@ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格",
notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-底部表格")
@PostMapping("/alertRecordTable/dp")
public ResponseModel<IPage<AlertCalledDto>> alertRecordTableForDP(DPAlertRecordFilterVo recordFilterVo) {
public ResponseModel<IPage<AlertCalledDto>> alertRecordTableForDP(DPFilterParamForDetailDto recordFilterVo) {
return iAlertCalledService.alertRecordTableForDP(recordFilterVo);
}
......
......@@ -18,6 +18,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
import com.yeejoin.amos.boot.module.common.api.service.ISourceFileService;
import com.yeejoin.amos.boot.module.elevator.api.dto.*;
......@@ -37,7 +38,6 @@ import com.yeejoin.amos.boot.module.elevator.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.elevator.api.service.IAlertCalledService;
import com.yeejoin.amos.boot.module.elevator.api.service.IRescueStationService;
import com.yeejoin.amos.boot.module.elevator.api.service.TzsAuthService;
import com.yeejoin.amos.boot.module.elevator.api.vo.DPAlertRecordFilterVo;
import com.yeejoin.amos.boot.module.elevator.biz.utils.AlertBeanDtoVoUtils;
import com.yeejoin.amos.boot.module.elevator.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
......@@ -1340,7 +1340,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
return jsonObject;
}
public ResponseModel<IPage<AlertCalledDto>> alertRecordTableForDP(DPAlertRecordFilterVo recordFilterVo) {
public ResponseModel<IPage<AlertCalledDto>> alertRecordTableForDP(DPFilterParamForDetailDto recordFilterVo) {
String orgCode = getAndSetOrgCode(recordFilterVo.getCityCode());
QueryWrapper<AlertCalled> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_delete", 0);
......@@ -1358,8 +1358,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
// 警情类型
if (!ValidationUtil.isEmpty(recordFilterVo.getAlertTypeCode()) && !"yjsj".equals(recordFilterVo.getAlertTypeCode())) {
queryWrapper.eq("alarm_type_code", recordFilterVo.getAlertTypeCode());
if (!ValidationUtil.isEmpty(recordFilterVo.getTreeValue()) && !"yjsj".equals(recordFilterVo.getTreeValue())) {
queryWrapper.eq("alarm_type_code", recordFilterVo.getTreeValue());
}
// 报警类型
......@@ -1373,9 +1373,9 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
// 警情起止时间
if (!ValidationUtil.isEmpty(recordFilterVo.getAlertStartAndEndTime())){
if (!ValidationUtil.isEmpty(recordFilterVo.getAlertStartAndEndTime().getBeginDate()) && !ValidationUtil.isEmpty(recordFilterVo.getAlertStartAndEndTime().getEndDate())) {
queryWrapper.between("call_time", recordFilterVo.getAlertStartAndEndTime().getBeginDate(), recordFilterVo.getAlertStartAndEndTime().getEndDate());
if (!ValidationUtil.isEmpty(recordFilterVo.getTimeSearchOne())){
if (!ValidationUtil.isEmpty(recordFilterVo.getTimeSearchOne().getBeginDate()) && !ValidationUtil.isEmpty(recordFilterVo.getTimeSearchOne().getEndDate())) {
queryWrapper.between("call_time", recordFilterVo.getTimeSearchOne().getBeginDate(), recordFilterVo.getTimeSearchOne().getEndDate());
}
}
......
......@@ -58,4 +58,19 @@ public class DPFilterParamForDetailDto {
*/
private String companyName;
/**
* 报警类型code
*/
private String typeCode;
/**
* 警情来源code
*/
private String alertSourceCode;
/**
* 警情类型code
*/
private String alertTypeCode;
}
......@@ -3,8 +3,8 @@ package com.yeejoin.amos.boot.module.statistics.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertStatistics;
import com.yeejoin.amos.boot.module.statistics.api.vo.DPAlertRecordFilterVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -31,7 +31,7 @@ public interface AlertStatisticsMapper extends BaseMapper<AlertStatistics> {
List<CountDto>countEmergencyEventsByOrgCodeAndDate2(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto filterParamDto);
Long countAlertRecordByOrgCodeAndDate(@Param("orgCode") String orgCode, @Param("dto") DPAlertRecordFilterVo filterParamDto);
Long countAlertRecordByOrgCodeAndDate(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamForDetailDto filterParamDto);
/**
* 统计被困人数
......
package com.yeejoin.amos.boot.module.statistics.api.vo;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDateDto;
import lombok.Data;
import javax.validation.constraints.NotBlank;
/**
* 大屏筛选过滤对象
*
* @author Administrator
*/
@Data
public class DPAlertRecordFilterVo {
/**
* 区域
*/
@NotBlank(message = "区域编码不能为空!")
private String cityCode;
/**
* 警情来源
*/
private String alertSource;
/**
* 警情来源code
*/
private String alertSourceCode;
/**
* 警情类型
*/
private String alertType;
/**
* 警情类型code
*/
private String alertTypeCode;
/**
* 报警类型
*/
private String type;
/**
* 报警类型code
*/
private String typeCode;
/**
* 警情起止时间
*/
private DPFilterParamForDateDto alertStartAndEndTime;
/**
* 当前页
*/
private int current;
/**
* 每页大小
*/
private int size;
}
......@@ -179,11 +179,11 @@
is_delete = 0
and (father_alert IS NULL or father_alert = '')
and biz_org_code like concat(#{orgCode}, '%')
<if test="dto != null and dto.alertStartAndEndTime != null and dto.alertStartAndEndTime.beginDate != null and dto.alertStartAndEndTime.beginDate != ''">
and date_ge(CAST(call_time as date), #{dto.alertStartAndEndTime.beginDate})
<if test="dto != null and dto.timeSearchOne != null and dto.timeSearchOne.beginDate != null and dto.timeSearchOne.beginDate != ''">
and date_ge(CAST(call_time as date), #{dto.timeSearchOne.beginDate})
</if>
<if test="dto != null and dto.alertStartAndEndTime != null and dto.alertStartAndEndTime.endDate != null and dto.alertStartAndEndTime.endDate != ''">
and date_le(CAST(call_time as date), #{dto.alertStartAndEndTime.endDate})
<if test="dto != null and dto.timeSearchOne != null and dto.timeSearchOne.endDate != null and dto.timeSearchOne.endDate != ''">
and date_le(CAST(call_time as date), #{dto.timeSearchOne.endDate})
</if>
<if test="dto.alertTypeCode !=null and dto.alertTypeCode !=''">
and alarm_type_code = #{dto.alertTypeCode}
......
......@@ -5,7 +5,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.YJDPStatisticsServiceImpl;
import com.yeejoin.amos.boot.module.statistics.api.dto.AlertUseUnitStatisticsDto;
import com.yeejoin.amos.boot.module.statistics.api.vo.DPAlertRecordFilterVo;
import com.yeejoin.amos.boot.module.ymt.api.dto.AlertPaperInfoDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -164,7 +163,7 @@ public class YJDPStatisticsController {
@ApiOperation(value = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-地市应急事件总数柱状图",
notes = "应急大屏使用-办理量 (近7天)-右上角更多-各地市业务办理情况-地市应急事件总数柱状图")
@PostMapping("/alertRecordBarChart/dp")
public ResponseModel<Object> alertRecordBarChartForDP(@RequestBody DPAlertRecordFilterVo recordFilterVo) {
public ResponseModel<Object> alertRecordBarChartForDP(@RequestBody DPFilterParamForDetailDto recordFilterVo) {
return ResponseHelper.buildResponse(statisticsService.alertRecordBarChartForDP(recordFilterVo));
}
}
......@@ -16,7 +16,6 @@ import com.yeejoin.amos.boot.module.statistics.api.dto.AlertUseUnitStatisticsDto
import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertRescueStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertUseUnitStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.vo.DPAlertRecordFilterVo;
import com.yeejoin.amos.boot.module.ymt.api.dto.AlertPaperInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
......@@ -465,7 +464,7 @@ public class YJDPStatisticsServiceImpl {
return countMap;
}
public JSONObject alertRecordBarChartForDP(DPAlertRecordFilterVo recordFilterVo) {
public JSONObject alertRecordBarChartForDP(DPFilterParamForDetailDto recordFilterVo) {
JSONObject res = new JSONObject();
JSONArray legendData = new JSONArray();
......@@ -485,8 +484,11 @@ public class YJDPStatisticsServiceImpl {
if (ValidationUtil.isEmpty(orgCode)) {
return 0L;
}
if (recordFilterVo.getAlertStartAndEndTime() == null) {
recordFilterVo.setAlertStartAndEndTime(new DPFilterParamForDateDto());
if (recordFilterVo.getTimeSearchOne() == null) {
recordFilterVo.setTimeSearchOne(new DPFilterParamForDateDto());
}
if (!ValidationUtil.isEmpty(recordFilterVo.getTreeValue())){
recordFilterVo.setAlertTypeCode(recordFilterVo.getTreeValue());
}
return alertStatisticsMapper.countAlertRecordByOrgCodeAndDate(orgCode, recordFilterVo);
}).collect(Collectors.toList());
......
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