Browse Source

事件分类分析饼22

master
yinzuomei 3 years ago
parent
commit
529f049057
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java
  2. 8
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  3. 7
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/IcEventDao.java
  4. 10
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java
  5. 24
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/IcEventDao.xml

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/SubOrgResDTO.java

@ -17,4 +17,6 @@ public class SubOrgResDTO implements Serializable {
*/
private String orgType;
private String orgName;
private String pid;
private String pids;
}

8
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -761,7 +761,9 @@
SELECT
ca.ID AS orgId,
ca.ORGANIZATION_NAME AS orgName,
'agency' AS orgType
'agency' AS orgType,
ca.PID,
ca.PIDS
FROM
customer_agency ca
WHERE
@ -771,7 +773,9 @@
SELECT
cg.ID AS orgId,
cg.GRID_NAME AS orgName,
'grid' AS orgType
'grid' AS orgType,
cg.PID,
cg.PIDS
FROM
customer_grid cg
WHERE

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

@ -112,15 +112,12 @@ public interface IcEventDao extends BaseDao<IcEventEntity> {
*/
void updateAutoEvaluation(@Param("ids")List<String> ids);
Integer selectGridTotal(String gridId);
/**
*
* @param orgId
* @param orgType
* @param formDTO
* @return
*/
Integer selectOrgTotal(@Param("orgId") String orgId, @Param("orgType") String orgType);
Integer selectOrgTotal(IcEventCategoryAnalysisFormDTO formDTO);
/**
* 居民端小程序我上报的事件-列表+详情

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

@ -1007,7 +1007,7 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
}
IcEventAnalysisOrgResDTO grid = ConvertUtils.sourceToTarget(formDTO,IcEventAnalysisOrgResDTO.class);
grid.setOrgName(gridInfoCache.getGridName());
grid.setTotal(baseDao.selectGridTotal(formDTO.getOrgId()));
grid.setTotal(baseDao.selectOrgTotal(formDTO));
list.add(grid);
return list;
}
@ -1017,7 +1017,13 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
}
for (SubOrgResDTO org : subOrgListRes.getData()) {
IcEventAnalysisOrgResDTO resultDto = ConvertUtils.sourceToTarget(org, IcEventAnalysisOrgResDTO.class);
resultDto.setTotal(baseDao.selectOrgTotal(org.getOrgId(), org.getOrgType()));
String purePids = org.getPids();
if ("0".equals(purePids) || StringUtils.isBlank(purePids)) {
formDTO.setGridPids(org.getOrgId());
} else {
formDTO.setGridPids(purePids.concat(":").concat(org.getOrgId()));
}
resultDto.setTotal(baseDao.selectOrgTotal(formDTO));
list.add(resultDto);
}
return list;

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

@ -256,28 +256,28 @@
AND UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(CLOSE_CASE_TIME) > 60*60*24*7
LIMIT #{no},#{size}
</select>
<select id="selectGridTotal" parameterType="java.lang.String" resultType="java.lang.Integer">
SELECT
count( ie.id ) as total
FROM
ic_event ie
WHERE
ie.DEL_FLAG = '0'
AND ie.GRID_ID =#{gridId}
</select>
<select id="selectOrgTotal" parameterType="map" resultType="java.lang.Integer">
<!-- 事件分类分析 饼图2:下一级组织+直属网格事件数量 -->
<select id="selectOrgTotal" parameterType="com.epmet.dto.form.IcEventCategoryAnalysisFormDTO" resultType="java.lang.Integer">
SELECT
count( ie.id ) as total
FROM
ic_event ie
inner join ic_event_category ic
on(ie.ID=ic.IC_EVENT_ID and ic.DEL_FLAG='0')
WHERE
ie.DEL_FLAG = '0'
AND ie.CUSTOMER_ID = #{customerId}
and ie.HAPPEN_TIME >= #{queryStartTime}
and ie.HAPPEN_TIME <![CDATA[<=]]> #{queryEndTime}
<if test="orgType == 'agency'">
and ie.GRID_PIDS like CONCAT('%',#{orgId},'%')
and e.GRID_PIDS like CONCAT(#{gridPids},'%')
</if>
<if test="orgType == 'grid'">
and ie.GRID_ID=#{orgId}
AND ie.GRID_ID = #{orgId}
</if>
<if test="categoryCode != null and categoryCode != '' ">
and ic.CATEGORY_CODE like concat(#{categoryCode},'%')
</if>
</select>

Loading…
Cancel
Save