Browse Source

增加按事件来源分类统计占比

master
luyan 2 years ago
parent
commit
44376159eb
  1. 26
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventAnalysisResultDTO.java
  2. 32
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java
  3. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java
  4. 4
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java
  5. 14
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  6. 30
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

26
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventAnalysisResultDTO.java

@ -25,29 +25,41 @@ public class EventAnalysisResultDTO implements Serializable {
* 网格化平台数量 * 网格化平台数量
*/ */
private Integer wangGeHua; private Integer wangGeHua;
/** /**
* 归档数量 * 待处理
*/ */
private Integer guiDang; private Integer daiChuLi;
/** /**
* 红灯占比 * 待处理占比
*/ */
private Double daiChuLiRate; private Double daiChuLiRate;
/** /**
* 黄灯占比 * 处理中
*/
private Integer chuLiZhong;
/**
* 处理中占比
*/ */
private Double chuLiZhongRate; private Double chuLiZhongRate;
/**
* 已结案数量
*/
private Integer yiJieAn;
/** /**
* 蓝灯占比 * 已结案占比
*/ */
private Double yiJieAnRate; private Double yiJieAnRate;
/**
* 归档数量
*/
private Integer guiDang;
/** /**
* 归档占比 * 归档占比
*/ */
private Double guiDangRate; private Double guiDangRate;
} }

32
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java

@ -62,6 +62,7 @@ public class IcEventController {
/** /**
* 事件管理-列表 * 事件管理-列表
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -72,6 +73,7 @@ public class IcEventController {
formDTO.setStaffId(tokenDto.getUserId()); formDTO.setStaffId(tokenDto.getUserId());
return new Result<PageData<IcEventListResultDTO>>().ok(icEventService.list(formDTO)); return new Result<PageData<IcEventListResultDTO>>().ok(icEventService.list(formDTO));
} }
/** /**
* @Author sun * @Author sun
* @Description 工作端小程序-事件管理-列表 * @Description 工作端小程序-事件管理-列表
@ -92,6 +94,7 @@ public class IcEventController {
/** /**
* 事件管理-新增 * 事件管理-新增
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -130,6 +133,7 @@ public class IcEventController {
/** /**
* 事件处理分析-处理状态比例查询 * 事件处理分析-处理状态比例查询
*
* @param formDTO * @param formDTO
* @return * @return
*/ */
@ -148,6 +152,7 @@ public class IcEventController {
/** /**
* 事件处理分析-事件列表 * 事件处理分析-事件列表
*
* @param input * @param input
* @return * @return
*/ */
@ -169,6 +174,7 @@ public class IcEventController {
/** /**
* 时间处理分析-阅读增量查询 * 时间处理分析-阅读增量查询
*
* @param input * @param input
* @return * @return
*/ */
@ -190,6 +196,7 @@ public class IcEventController {
/** /**
* 研判分析查询 * 研判分析查询
*
* @param eventId * @param eventId
* @return * @return
*/ */
@ -201,6 +208,7 @@ public class IcEventController {
/** /**
* 组织下分类下的事件列表 * 组织下分类下的事件列表
*
* @param input * @param input
* @return * @return
*/ */
@ -215,6 +223,7 @@ public class IcEventController {
PageData<IcEventResultDTO> page = icEventService.getSameCategoryEvents(orgId, orgType, categroyPid, pageNo, pageSize); PageData<IcEventResultDTO> page = icEventService.getSameCategoryEvents(orgId, orgType, categroyPid, pageNo, pageSize);
return new Result<PageData<IcEventResultDTO>>().ok(page); return new Result<PageData<IcEventResultDTO>>().ok(page);
} }
/** /**
* @Author sun * @Author sun
* @Description 事件管理-回复 * @Description 事件管理-回复
@ -260,6 +269,7 @@ public class IcEventController {
/** /**
* 事件转议题 * 事件转议题
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -313,6 +323,7 @@ public class IcEventController {
ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class); ValidatorUtils.validateEntity(formDTO, IcEventListFormDTO.Detail.class);
return new Result<IcEventListResultDTO>().ok(icEventService.detail(formDTO)); return new Result<IcEventListResultDTO>().ok(icEventService.detail(formDTO));
} }
/** /**
* @Author sun * @Author sun
* @Description 工作端小程序-事件管理-详情 * @Description 工作端小程序-事件管理-详情
@ -328,6 +339,7 @@ public class IcEventController {
/** /**
* 事件分类分析- 饼图2直属下级 事件数量 * 事件分类分析- 饼图2直属下级 事件数量
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -353,6 +365,7 @@ public class IcEventController {
/** /**
* Desc: 定时任务自动评价 * Desc: 定时任务自动评价
*
* @param formDTO * @param formDTO
* @author zxc * @author zxc
* @date 2022/5/18 16:35 * @date 2022/5/18 16:35
@ -376,6 +389,7 @@ public class IcEventController {
/** /**
* Desc: 新增随手拍 * Desc: 新增随手拍
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @author zxc * @author zxc
@ -394,6 +408,7 @@ public class IcEventController {
/** /**
* 居民端小程序我上报的事件-列表+详情 * 居民端小程序我上报的事件-列表+详情
* yapi: http://yapi.elinkservice.cn/project/102/interface/api/7781 * yapi: http://yapi.elinkservice.cn/project/102/interface/api/7781
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -408,6 +423,7 @@ public class IcEventController {
/** /**
* 居民端我上报的事件 消息列表跳转详情 * 居民端我上报的事件 消息列表跳转详情
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -423,6 +439,7 @@ public class IcEventController {
/** /**
* 居民端小程序我上报的事件详情页面-回复列表 * 居民端小程序我上报的事件详情页面-回复列表
* http://yapi.elinkservice.cn/project/102/interface/api/7783 * http://yapi.elinkservice.cn/project/102/interface/api/7783
*
* @param formDTO * @param formDTO
* @return * @return
*/ */
@ -437,6 +454,7 @@ public class IcEventController {
* 居民端小程序我上报的事件-处理中 * 居民端小程序我上报的事件-处理中
* 点击事件进入详情页时调用此接口消除红点 * 点击事件进入详情页时调用此接口消除红点
* yapihttp://yapi.elinkservice.cn/project/102/interface/api/7790 * yapihttp://yapi.elinkservice.cn/project/102/interface/api/7790
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -452,6 +470,7 @@ public class IcEventController {
/** /**
* 居民端我上报的事件-回复 * 居民端我上报的事件-回复
* http://yapi.elinkservice.cn/project/102/interface/api/7789 * http://yapi.elinkservice.cn/project/102/interface/api/7789
*
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO
* @return * @return
@ -537,6 +556,7 @@ public class IcEventController {
/** /**
* 数据分析-个人档案-上报事件列表,根据epmetUserIdList查询 * 数据分析-个人档案-上报事件列表,根据epmetUserIdList查询
* 模仿gov/project/resieventreply/pageuserreported接口重新查询新表接口 * 模仿gov/project/resieventreply/pageuserreported接口重新查询新表接口
*
* @author sun * @author sun
*/ */
@PostMapping("icevent-pageuserreported") @PostMapping("icevent-pageuserreported")
@ -560,23 +580,25 @@ public class IcEventController {
} }
/** /**
* @description 获取事件数量和分类数量
* @param * @param null * @param * @param null
* @return Result * @return Result
* @throws * @throws
* @description 获取事件数量和分类数量
* @author yan Lu * @author yan Lu
* @date 2023/5/17 14:49 * @date 2023/5/17 14:49
*/ */
@GetMapping("getEventRate") @GetMapping("getEventRate")
public Result<EventRateResultDTO> getEventRate(@RequestParam("orgId") String orgId, public Result<EventRateResultDTO> getEventRate(@RequestParam("orgId") String orgId,
@RequestParam("orgType") String orgType){ @RequestParam("orgType") String orgType,
return new Result<EventRateResultDTO>().ok(icEventService.getEventRate(orgId,orgType)); @RequestParam("eventType") String eventType) {
return new Result<EventRateResultDTO>().ok(icEventService.getEventRate(orgId, orgType, eventType));
} }
@GetMapping("getEventAnalysis") @GetMapping("getEventAnalysis")
public Result<EventAnalysisResultDTO> getEventAnalysis(@RequestParam("orgId") String orgId, public Result<EventAnalysisResultDTO> getEventAnalysis(@RequestParam("orgId") String orgId,
@RequestParam("orgType") String orgType){ @RequestParam("orgType") String orgType,
return new Result<EventAnalysisResultDTO>().ok(icEventService.getEventAnalysis(orgId,orgType)); @RequestParam("eventType") String eventType) {
return new Result<EventAnalysisResultDTO>().ok(icEventService.getEventAnalysis(orgId, orgType, eventType));
} }
} }

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java

@ -148,9 +148,9 @@ public interface IcEventDao extends BaseDao<IcEventEntity> {
List<PageUserReportEventResDTO> selectUserReported(PageUserReportEventFormDTO formDTO); List<PageUserReportEventResDTO> selectUserReported(PageUserReportEventFormDTO formDTO);
EventRateResultDTO getEventRate(@Param("orgIdPath") String orgIdPath); EventRateResultDTO getEventRate(@Param("orgIdPath") String orgIdPath, @Param("eventType") String eventType);
EventAnalysisResultDTO getEventAnalysis(@Param("orgIdPath") String orgPath); EventAnalysisResultDTO getEventAnalysis(@Param("orgIdPath") String orgPath, @Param("eventType") String eventType);
@MapKey("code") @MapKey("code")
List<Map<String, Integer>> getAnalysis(@Param("orgIdPath") String orgPath); List<Map<String, Integer>> getAnalysis(@Param("orgIdPath") String orgPath);

4
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java

@ -257,7 +257,7 @@ public interface IcEventService extends BaseService<IcEventEntity> {
* *
* @return * @return
*/ */
EventRateResultDTO getEventRate(String orgId, String orgType); EventRateResultDTO getEventRate(String orgId, String orgType, String eventType);
/** /**
* 事件分析数据获取 * 事件分析数据获取
@ -266,5 +266,5 @@ public interface IcEventService extends BaseService<IcEventEntity> {
* @param orgType * @param orgType
* @return * @return
*/ */
EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType); EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType, String eventType);
} }

14
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -1924,8 +1924,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
} }
@Override @Override
public EventRateResultDTO getEventRate(String orgId, String orgType) { public EventRateResultDTO getEventRate(String orgId, String orgType,String eventType) {
EventRateResultDTO erDto = baseDao.getEventRate(getOrgPath(orgId, orgType));//事件总量和灯数量,占比 EventRateResultDTO erDto = baseDao.getEventRate(getOrgPath(orgId, orgType), eventType);//事件总量和灯数量,占比
List<Map<String, Integer>> dataMap = baseDao.getAnalysis(getOrgPath(orgId, orgType));//按分类获取数量 List<Map<String, Integer>> dataMap = baseDao.getAnalysis(getOrgPath(orgId, orgType));//按分类获取数量
Map<String, Integer> temp = new HashMap<>(); Map<String, Integer> temp = new HashMap<>();
if (null != dataMap && dataMap.size() > 0) { if (null != dataMap && dataMap.size() > 0) {
@ -1956,10 +1956,14 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
} }
@Override @Override
public EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType) { public EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType, String eventType) {
String orgPath = getOrgPath(orgId, orgType); String orgPath = getOrgPath(orgId, orgType);
EventRateResultDTO erDto = baseDao.getEventRate(orgPath);//事件总量和灯数量,占比 EventRateResultDTO erDto = baseDao.getEventRate(orgPath, eventType);//事件总量和灯数量,占比
EventAnalysisResultDTO dto = baseDao.getEventAnalysis(orgPath); EventAnalysisResultDTO dto = baseDao.getEventAnalysis(orgPath, eventType);
dto.setDaiChuLi(erDto.getHongDeng());
dto.setChuLiZhong(erDto.getHuangDeng());
dto.setYiJieAn(erDto.getLanDeng());
dto.setGuiDang(erDto.getGuiDang());
dto.setDaiChuLiRate(erDto.getHongDengRate() == null ? 0 : erDto.getHongDengRate()); dto.setDaiChuLiRate(erDto.getHongDengRate() == null ? 0 : erDto.getHongDengRate());
dto.setChuLiZhongRate(erDto.getHuangDengRate() == null ? 0 : erDto.getHuangDengRate()); dto.setChuLiZhongRate(erDto.getHuangDengRate() == null ? 0 : erDto.getHuangDengRate());
dto.setYiJieAnRate(erDto.getLanDengRate() == null ? 0 : erDto.getLanDengRate()); dto.setYiJieAnRate(erDto.getLanDengRate() == null ? 0 : erDto.getLanDengRate());

30
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

@ -467,24 +467,36 @@
<if test="null != orgIdPath and orgIdPath != ''"> <if test="null != orgIdPath and orgIdPath != ''">
and b.GRID_PIDS like concat(#{orgIdPath},'%') and b.GRID_PIDS like concat(#{orgIdPath},'%')
</if> </if>
<if test="null != eventType and eventType !=''">
AND b.SOURCE_TYPE = #{eventType}
</if>
) eb, ) eb,
( SELECT SUM( CASE WHEN c.OPERATION_TYPE = 0 THEN 1 ELSE 0 END ) AS huang ( SELECT SUM( CASE WHEN c.OPERATION_TYPE = 0 THEN 1 ELSE 0 END ) AS huang
FROM ic_event c WHERE c.DEL_FLAG = 0 and c.STATUS = 'processing' FROM ic_event c WHERE c.DEL_FLAG = 0 and c.STATUS = 'processing'
<if test="null != orgIdPath and orgIdPath != ''"> <if test="null != orgIdPath and orgIdPath != ''">
and c.GRID_PIDS like concat(#{orgIdPath},'%') and c.GRID_PIDS like concat(#{orgIdPath},'%')
</if> </if>
<if test="null != eventType and eventType !=''">
AND c.SOURCE_TYPE = #{eventType}
</if>
) ec, ) ec,
( SELECT SUM( CASE WHEN d.OPERATION_TYPE = 0 THEN 1 ELSE 0 END ) as lan ( SELECT SUM( CASE WHEN d.OPERATION_TYPE = 0 THEN 1 ELSE 0 END ) as lan
FROM ic_event d WHERE d.DEL_FLAG = 0 and d.STATUS = 'closed_case' FROM ic_event d WHERE d.DEL_FLAG = 0 and d.STATUS = 'closed_case'
<if test="null != orgIdPath and orgIdPath != ''"> <if test="null != orgIdPath and orgIdPath != ''">
and d.GRID_PIDS like concat(#{orgIdPath},'%') and d.GRID_PIDS like concat(#{orgIdPath},'%')
</if> </if>
<if test="null != eventType and eventType !=''">
AND d.SOURCE_TYPE = #{eventType}
</if>
) ed, ) ed,
( SELECT SUM( CASE WHEN d.DIFFICULT_POINT = 1 and d.OPERATION_TYPE = 0 THEN 1 ELSE 0 END) as dang ( SELECT SUM( CASE WHEN d.DIFFICULT_POINT = 1 THEN 1 ELSE 0 END) as dang
FROM ic_event d WHERE d.DEL_FLAG = 0 FROM ic_event d WHERE d.DEL_FLAG = 0
<if test="null != orgIdPath and orgIdPath != ''"> <if test="null != orgIdPath and orgIdPath != ''">
and d.GRID_PIDS like concat(#{orgIdPath},'%') and d.GRID_PIDS like concat(#{orgIdPath},'%')
</if> </if>
<if test="null != eventType and eventType !=''">
AND d.SOURCE_TYPE = #{eventType}
</if>
) ee ) ee
</select> </select>
@ -492,10 +504,13 @@
SELECT SELECT
ea.total AS jiSuJiBan, ea.total AS jiSuJiBan,
eb.total AS zhiTongLianBan, eb.total AS zhiTongLianBan,
ec.total AS wangGeHua ec.total AS wangGeHua,
ed.total AS guiDang
FROM FROM
( (
SELECT COUNT( e.id ) AS total FROM ic_event e SELECT COUNT( e.id ) AS total
FROM ic_event e
WHERE e.DEL_FLAG = 0 AND e.SOURCE_TYPE = 0 AND ( e.OPERATION_TYPE = 0 OR e.OPERATION_TYPE IS NULL ) WHERE e.DEL_FLAG = 0 AND e.SOURCE_TYPE = 0 AND ( e.OPERATION_TYPE = 0 OR e.OPERATION_TYPE IS NULL )
<if test="null != orgIdPath and orgIdPath != ''"> <if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%') and e.GRID_PIDS like concat(#{orgIdPath},'%')
@ -514,7 +529,14 @@
<if test="null != orgIdPath and orgIdPath != ''"> <if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%') and e.GRID_PIDS like concat(#{orgIdPath},'%')
</if> </if>
) ec ) ec,
(
SELECT COUNT( e.id ) AS total FROM ic_event e
WHERE e.DEL_FLAG = 0 AND e.DIFFICULT_POINT = 1 AND ( e.OPERATION_TYPE = 0 OR e.OPERATION_TYPE IS NULL )
<if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
) ed
</select> </select>

Loading…
Cancel
Save