Browse Source

Merge remote-tracking branch 'origin/lingshan_master' into dev

# Conflicts:
#	epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
master
yinzuomei 2 years ago
parent
commit
aa9b98ff9b
  1. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java
  2. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java
  3. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java
  5. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java
  6. 5
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml
  7. 11
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml
  8. 10
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java
  9. 5
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java
  10. 5
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventAnalysisResultDTO.java
  11. 24
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventRateResultDTO.java
  12. 4
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java
  13. 23
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java
  14. 54
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java
  15. 5
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java
  16. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/IcEventService.java
  17. 100
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  18. 92
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/IcBuildingDTO.java

@ -49,6 +49,10 @@ public class IcBuildingDTO implements Serializable {
* 小区id
*/
private String neighborHoodId;
/**
* 灵山项目添加
*/
private String neighborHoodName;
/**
* 片区idneighbor_hood_part.id,可为空

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcBuildingDao.java

@ -19,6 +19,8 @@ package com.epmet.dao;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcBuildingDTO;
import com.epmet.dto.IcNeighborHoodDTO;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.form.CheckHouseInfoFormDTO;
import com.epmet.dto.form.IcBuildingListFormDTO;
@ -285,7 +287,7 @@ public interface IcBuildingDao extends BaseDao<IcBuildingEntity> {
* @param neighborHoodId
* @return
*/
List<IcBuildingEntity> selectListByMap(@Param("customerId") String customerId,
List<IcBuildingDTO> selectListByMap(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("neighborHoodId") String neighborHoodId);
}

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java

@ -1,6 +1,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.ImportGeneralDTO;
import com.epmet.dto.form.*;
import com.epmet.dto.result.*;
@ -252,7 +253,7 @@ public interface IcHouseDao extends BaseDao<IcHouseEntity> {
* @param buildingId
* @return
*/
List<IcHouseEntity> selectListByMap(@Param("customerId") String customerId,
List<IcHouseDTO> selectListByMap(@Param("customerId") String customerId,
@Param("gridId") String gridId,
@Param("neighborHoodId") String neighborHoodId,
@Param("buildingId") String buildingId);

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/BuildingServiceImpl.java

@ -880,7 +880,7 @@ public class BuildingServiceImpl implements BuildingService {
*/
@Override
public List<IcBuildingDTO> buildingDistribution(String customerId, String gridId, String neighborHoodId) {
List<IcBuildingEntity> list=icBuildingDao.selectListByMap(customerId,gridId,neighborHoodId);
List<IcBuildingDTO> list=icBuildingDao.selectListByMap(customerId,gridId,neighborHoodId);
return ConvertUtils.sourceToTarget(list,IcBuildingDTO.class);
}

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java

@ -1568,7 +1568,7 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver {
*/
@Override
public List<IcHouseDTO> houseDistribution(String customerId,String gridId, String neighborHoodId, String buildingId) {
List<IcHouseEntity> list=icHouseDao.selectListByMap(customerId,gridId,neighborHoodId,buildingId);
List<IcHouseDTO> list=icHouseDao.selectListByMap(customerId,gridId,neighborHoodId,buildingId);
return ConvertUtils.sourceToTarget(list,IcHouseDTO.class);
}

5
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcBuildingDao.xml

@ -618,9 +618,10 @@
</select>
<!-- 楼栋列表 -->
<select id="selectListByMap" parameterType="map" resultType="com.epmet.entity.IcBuildingEntity">
<select id="selectListByMap" parameterType="map" resultType="com.epmet.dto.IcBuildingDTO">
SELECT
ib.*
ib.*,
h.NEIGHBOR_HOOD_NAME as neighborHoodName
FROM
ic_building ib
LEFT JOIN ic_neighbor_hood h ON ( ib.NEIGHBOR_HOOD_ID = h.ID )

11
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml

@ -993,11 +993,18 @@
</select>
<!-- 房屋列表 -->
<select id="selectListByMap" parameterType="map" resultType="com.epmet.entity.IcHouseEntity">
<select id="selectListByMap" parameterType="map" resultType="com.epmet.dto.IcHouseDTO">
SELECT
ih.*
ih.*,
h.NEIGHBOR_HOOD_NAME as neighborHoodName,
ib.BUILDING_NAME as buildingName,
u.UNIT_NAME as unitName
FROM
ic_house ih
left join ic_building ib
on(ih.BUILDING_ID=ib.id)
left join ic_building_unit u
on(ih.BUILDING_UNIT_ID=u.id)
LEFT JOIN ic_neighbor_hood h
ON ( ih.NEIGHBOR_HOOD_ID = h.ID )
WHERE

10
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/IcEventDTO.java

@ -159,11 +159,11 @@ public class IcEventDTO implements Serializable {
/**
* 事件审核状态[涉及附件审核需要加的状态]审核中auditing
auto_passed: 自动通过
review结果不确定需要人工审核
block: 结果违规
rejected人工审核驳回;
approved人工审核通过
* auto_passed: 自动通过
* review结果不确定需要人工审核
* block: 结果违规
* rejected人工审核驳回;
* approved人工审核通过
*/
private String auditStatus;

5
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventAddEditFormDTO.java

@ -51,6 +51,11 @@ public class IcEventAddEditFormDTO implements Serializable {
*/
@NotBlank(message = "反映渠道不能为空", groups = {AddGroup.class})
private String sourceType;
/**
* 事件类型1红灯事件 2黄灯事件 3蓝灯事件
*/
private String eventType;
/**
* 发生时间
*/

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

@ -25,6 +25,11 @@ public class EventAnalysisResultDTO implements Serializable {
* 网格化平台数量
*/
private Integer wangGeHua;
/**
* 0上报 1阅收 3完结 4审核 5事件评价 6结案归档
*/
/**
* 待处理
*/

24
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventRateResultDTO.java

@ -36,30 +36,6 @@ public class EventRateResultDTO implements Serializable {
*/
private Integer lanDeng;
/**
* 归档数量
*/
private Integer guiDang;
/**
* 未响应占比
*/
private Double hongDengRate;
/**
* 处理中占比
*/
private Double huangDengRate;
/**
* 已完成占比
*/
private Double lanDengRate;
/**
* 归档占比
*/
private Double guiDangRate;
/**
* 分类统计数量
*/

4
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/IcEventListResultDTO.java

@ -77,6 +77,10 @@ public class IcEventListResultDTO implements Serializable {
* 上报渠道[字典表]
*/
private String sourceType;
/**
* 事件类型 1红灯事件 2黄灯事件 3蓝灯事件
*/
private String eventType;
/**
* 发生时间
*/

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

@ -583,7 +583,7 @@ public class IcEventController {
* @param * @param null
* @return Result
* @throws
* @description 获取事件数量和分类数量
* @description 获取事件数量和占比
* @author yan Lu
* @date 2023/5/17 14:49
*/
@ -594,6 +594,14 @@ public class IcEventController {
return new Result<EventRateResultDTO>().ok(icEventService.getEventRate(orgId, orgType, eventType));
}
/**
* @param
* @return Result<EventAnalysisResultDTO>
* @throws
* @description 按事件分类统计
* @author yan Lu
* @date 2023/5/18 17:53
*/
@GetMapping("getEventAnalysis")
public Result<EventAnalysisResultDTO> getEventAnalysis(@RequestParam("orgId") String orgId,
@RequestParam("orgType") String orgType,
@ -601,4 +609,17 @@ public class IcEventController {
return new Result<EventAnalysisResultDTO>().ok(icEventService.getEventAnalysis(orgId, orgType, eventType));
}
/**
* @param * @param null null
* @return null
* @throws
* @description 根据组织ID获取事件办理统计情况
* @author yan Lu
* @date 2023/5/19 09:28
*/
@GetMapping("getEventRateByAgencyId")
public Result<List<GridOrVillageEventRateResultDTO>> getEventRateByAgencyId(@RequestParam("agencyId") String agencyId) {
return new Result<List<GridOrVillageEventRateResultDTO>>().ok(icEventService.getEventRateByAgencyId(agencyId));
}
}

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

@ -148,12 +148,66 @@ public interface IcEventDao extends BaseDao<IcEventEntity> {
List<PageUserReportEventResDTO> selectUserReported(PageUserReportEventFormDTO formDTO);
/**
* 按响应级别统计数量
*
* @param orgIdPath
* @return
*/
EventRateResultDTO getEventCount(@Param("orgIdPath") String orgIdPath);
/**
* 获取事件处理进度占比
*
* @param orgIdPath
* @param eventType
* @return
*/
EventRateResultDTO getEventRate(@Param("orgIdPath") String orgIdPath, @Param("eventType") String eventType);
/**
* 分类统计事件来源数量
*
* @param orgPath
* @param eventType
* @return
*/
EventAnalysisResultDTO getEventAnalysis(@Param("orgIdPath") String orgPath, @Param("eventType") String eventType);
/**
* 根据事件类型统计各类型的数量
*
* @param orgPath
* @return
*/
@MapKey("code")
List<Map<String, Integer>> getAnalysis(@Param("orgIdPath") String orgPath);
/**
* 根据ID查询事件
*
* @param icEventId
* @return
*/
IcEventEntity selectByEventId(String icEventId);
/**
* 根据事件来源获取数量
*
* @param orgPath 1即诉即办 2直通联办 3网格化平台
* @return
*/
EventAnalysisResultDTO getEventBySourceTypeCount(@Param("orgIdPath") String orgPath);
/**
* 根据 事件来源获取 完成进度占比
* 待响应 没有任何回复数据或者只有上报数据
* 处理中 只要包含一条阅收数据即为处理中
* 已结案 只要包含一条完结数据即为已结案
* 已归档 只要包含一条归档数据即为已归档
* manageType: 0上报 1阅收 3完结 4审核 5事件评价 6结案归档
*/
Integer getEventByReplyTypeCount(@Param("orgIdPath") String orgPath,
@Param("sourceType") String sourceType,
@Param("manageType") String manageType);
}

5
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/IcEventEntity.java

@ -71,6 +71,11 @@ public class IcEventEntity extends BaseEpmetEntity {
*/
private String sourceType;
/**
* 事件类型1红灯事件 2黄灯事件 3蓝灯事件
*/
private String eventType;
/**
* 发生时间
*/

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

@ -267,4 +267,11 @@ public interface IcEventService extends BaseService<IcEventEntity> {
* @return
*/
EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType, String eventType);
/**
* 根据组织ID获取下一级组织事件不完结率和完结数量
* @return
*/
List<GridOrVillageEventRateResultDTO> getEventRateByAgencyId(String agencyId);
}

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

@ -322,6 +322,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
entity.setAgencyId(gridInfo.getPid());
entity.setGridPids(gridInfo.getPids());
entity.setLatestOperatedTime(nowTime);
entity.setEventType(formDTO.getEventType());
entity.setAuditStatus(TopicConstant.AUTO_PASSED);
if ("closed_case".equals(formDTO.getStatus())) {
entity.setCloseCaseTime(new Date());
@ -1924,8 +1925,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
}
@Override
public EventRateResultDTO getEventRate(String orgId, String orgType,String eventType) {
EventRateResultDTO erDto = baseDao.getEventRate(getOrgPath(orgId, orgType), eventType);//事件总量和灯数量,占比
public EventRateResultDTO getEventRate(String orgId, String orgType, String eventType) {
EventRateResultDTO erDto = baseDao.getEventCount(getOrgPath(orgId, orgType));//事件总量和灯数量,占比
List<Map<String, Integer>> dataMap = baseDao.getAnalysis(getOrgPath(orgId, orgType));//按分类获取数量
Map<String, Integer> temp = new HashMap<>();
if (null != dataMap && dataMap.size() > 0) {
@ -1958,19 +1959,71 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
@Override
public EventAnalysisResultDTO getEventAnalysis(String orgId, String orgType, String eventType) {
String orgPath = getOrgPath(orgId, orgType);
EventRateResultDTO erDto = baseDao.getEventRate(orgPath, eventType);//事件总量和灯数量,占比
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.setChuLiZhongRate(erDto.getHuangDengRate() == null ? 0 : erDto.getHuangDengRate());
dto.setYiJieAnRate(erDto.getLanDengRate() == null ? 0 : erDto.getLanDengRate());
dto.setGuiDangRate(erDto.getGuiDangRate() == null ? 0 : erDto.getGuiDangRate());
EventAnalysisResultDTO dto = baseDao.getEventBySourceTypeCount(orgPath);//根据事件来源获取事件数量
Integer total;
if (StringUtils.isEmpty(eventType)) {
total = dto.getJiSuJiBan() + dto.getZhiTongLianBan() + dto.getWangGeHua();
} else {
total = eventType.equals("0") ? dto.getJiSuJiBan() : eventType.equals("1") ?
dto.getZhiTongLianBan() : dto.getWangGeHua();
}
return biuldData(dto, orgPath, eventType, total);
}
private EventAnalysisResultDTO biuldData(EventAnalysisResultDTO dto, String orgPath, String eventType, Integer total) {
/**
* eventType 0 即诉即办 1 直通联办 2 网格化平台
* 待响应 没有任何回复数据或者只有上报数据(可能包含多条)
* 处理中 只要包含一条阅收数据即为处理中(可能包含多条)
* 已结案 只要包含一条完结数据即为已结案(应该只有一条)
* 已归档 只要包含一条归档数据即为已归档(应该只有一条)
* 0上报 1阅收 3完结 6结案归档
*/
for (int i = 0; i < 5; i++) {
Integer temp;
if (i == 0) {
temp = baseDao.getEventByReplyTypeCount(orgPath, eventType, String.valueOf(i));
dto.setDaiChuLi(temp);
dto.setDaiChuLiRate(new BigDecimal((double) temp / total).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
if (i == 1) {
temp = baseDao.getEventByReplyTypeCount(orgPath, eventType, String.valueOf(i));
dto.setChuLiZhong(temp);
dto.setChuLiZhongRate(new BigDecimal((double) temp / total).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
if (i == 2) {
i = i + 1;
temp = baseDao.getEventByReplyTypeCount(orgPath, eventType, String.valueOf(i));
dto.setYiJieAn(temp);
dto.setYiJieAnRate(new BigDecimal((double) temp / total).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
if (i == 4) {
i = i + 2;
temp = baseDao.getEventByReplyTypeCount(orgPath, eventType, String.valueOf(i));
dto.setGuiDang(temp);
dto.setGuiDangRate(new BigDecimal((double) temp / total).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
}
return dto;
}
@Override
public List<GridOrVillageEventRateResultDTO> getEventRateByAgencyId(String agencyId) {
if (StringUtils.isNotEmpty(agencyId)) {
List<IcEventAnalysisOrgResDTO> orgs = getSubOrgs(agencyId);
if (null != orgs && orgs.size() > 0) {
}
}
return null;
}
/**
* @param orgId
* @param orgType
* @return
* @deprecationg 获取orgPath
*/
private String getOrgPath(String orgId, String orgType) {
if (OrgInfoConstant.AGENCY.equals(orgType)) { // 行政组织
AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(orgId);
@ -1981,4 +2034,27 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
}
}
/**
* @param agencyId
* @return
* @deprecation 获取当前组织的所有下级组织
*/
private List<IcEventAnalysisOrgResDTO> getSubOrgs(String agencyId) {
List<IcEventAnalysisOrgResDTO> orgList = new ArrayList<>();
Result<List<SubOrgResDTO>> orgs = govOrgOpenFeignClient.subOrgList(agencyId);
if (!orgs.success() || CollectionUtils.isEmpty(orgs.getData())) {
return orgList;
}
for (SubOrgResDTO org : orgs.getData()) {
IcEventAnalysisOrgResDTO resultDto = ConvertUtils.sourceToTarget(org, IcEventAnalysisOrgResDTO.class);
if ("agency".equals(org.getOrgType())) {
resultDto.setOrgName(org.getOrgName());
resultDto.setOrgType(org.getOrgType());
resultDto.setOrgId(org.getOrgId());
orgList.add(resultDto);
}
}
return orgList;
}
}

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

@ -440,13 +440,23 @@
ORDER BY re.created_time desc
</select>
<select id="getEventCount" resultType="com.epmet.dto.result.EventRateResultDTO">
SELECT
count(e.id) as total,
SUM(CASE WHEN e.EVENT_TYPE = 1 THEN 1 ELSE 0 END) as hongDeng,
SUM(CASE WHEN e.EVENT_TYPE = 2 THEN 1 ELSE 0 END) as huangDeng,
SUM(CASE WHEN e.EVENT_TYPE = 3 THEN 1 ELSE 0 END) as lanDeng
FROM ic_event e
<where>
e.DEL_FLAG = 0
<if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
</where>
</select>
<select id="getEventRate" resultType="com.epmet.dto.result.EventRateResultDTO">
SELECT
ea.countAll AS total,
eb.hong AS hongDeng,
ec.huang AS huangDeng,
ed.lan as lanDeng,
ee.dang as guiDang,
ROUND( eb.hong / ea.countAll, 2 ) AS hongDengRate,
ROUND( ec.huang / ea.countAll, 2 ) AS huangDengRate,
ROUND( ed.lan / ea.countAll, 2 ) as lanDengRate,
@ -467,36 +477,24 @@
<if test="null != orgIdPath and orgIdPath != ''">
and b.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
<if test="null != eventType and eventType !=''">
AND b.SOURCE_TYPE = #{eventType}
</if>
) eb,
( 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'
<if test="null != orgIdPath and orgIdPath != ''">
and c.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
<if test="null != eventType and eventType !=''">
AND c.SOURCE_TYPE = #{eventType}
</if>
) ec,
( 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'
<if test="null != orgIdPath and orgIdPath != ''">
and d.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
<if test="null != eventType and eventType !=''">
AND d.SOURCE_TYPE = #{eventType}
</if>
) ed,
( SELECT SUM( CASE WHEN d.DIFFICULT_POINT = 1 THEN 1 ELSE 0 END) as dang
( SELECT SUM( CASE WHEN d.DIFFICULT_POINT = 1 and d.OPERATION_TYPE = 0 THEN 1 ELSE 0 END) as dang
FROM ic_event d WHERE d.DEL_FLAG = 0
<if test="null != orgIdPath and orgIdPath != ''">
and d.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
<if test="null != eventType and eventType !=''">
AND d.SOURCE_TYPE = #{eventType}
</if>
) ee
</select>
@ -540,6 +538,64 @@
</select>
<select id="getEventByReplyTypeCount" resultType="java.lang.Integer">
SELECT
count( ra.eventId )
FROM
(
SELECT
r.IC_EVENT_ID AS eventId
FROM
ic_event_reply r
<where>
r.DEL_FLAG = 0
AND r.MANAGE_STATUS = #{manageType}
AND r.IC_EVENT_ID IN (
SELECT e.id FROM ic_event e
<where>
e.DEL_FLAG = 0
<if test="null != sourceType and sourceType != ''">
AND e.SOURCE_TYPE = #{sourceType}
</if>
<if test="null != orgIdPath and orgIdPath != ''">
AND e.GRID_PIDS LIKE concat(#{orgIdPath},'%')
</if>
</where>
)
</where>
GROUP BY r.IC_EVENT_ID
) ra
</select>
<select id="getEventBySourceTypeCount" resultType="com.epmet.dto.result.EventAnalysisResultDTO">
SELECT
ea.jisujiban as jiSuJiBan,
eb.zhitonglianban as zhiTongLianBan,
ec.wanggehua as wangGeHua
from
(
SELECT count(e.id) as jisujiban from ic_event e
WHERE e.DEL_FLAG = 0 and e.SOURCE_TYPE = 0
<if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
)ea,
(
SELECT count(e.id) as zhitonglianban from ic_event e
WHERE e.DEL_FLAG = 0 and e.SOURCE_TYPE = 1
<if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
)eb,
(
SELECT count(e.id) as wanggehua from ic_event e
WHERE e.DEL_FLAG = 0 and e.SOURCE_TYPE = 2
<if test="null != orgIdPath and orgIdPath != ''">
and e.GRID_PIDS like concat(#{orgIdPath},'%')
</if>
)ec
</select>
<select id="getAnalysis" resultType="java.util.Map">
SELECT
c.CATEGORY_ID as code,

Loading…
Cancel
Save