配置统计修改为功能统计
This commit is contained in:
@@ -24,4 +24,6 @@ public interface SysMenuDao extends CrudDao<SysMenu>{
|
||||
|
||||
Integer getServiceId(@Param("functionId")Integer functionId, @Param("action")Integer action);
|
||||
|
||||
List<SysMenu> findAllCfgList(@Param("policiesMenuId")String policiesMenuId);
|
||||
|
||||
}
|
||||
@@ -27,6 +27,30 @@
|
||||
a.function_id
|
||||
|
||||
</sql>
|
||||
<sql id="menuCfgColumns">
|
||||
a.id,
|
||||
a.parent_id AS "parent.id",
|
||||
a.parent_ids,
|
||||
a.code,
|
||||
a.name,
|
||||
a.href,
|
||||
a.target,
|
||||
a.icon,
|
||||
a.sort,
|
||||
a.is_show,
|
||||
a.permission,
|
||||
a.remarks,
|
||||
a.create_by AS "createBy.id",
|
||||
a.create_date,
|
||||
a.update_by AS "updateBy.id",
|
||||
a.update_date,
|
||||
a.del_flag,
|
||||
a.quick_action,
|
||||
a.menu_bg,
|
||||
a.is_top,
|
||||
a.function_id
|
||||
|
||||
</sql>
|
||||
|
||||
<sql id="menuJoins">
|
||||
LEFT JOIN sys_menu p ON p.id = a.parent_id
|
||||
@@ -48,6 +72,18 @@
|
||||
WHERE a.del_flag = #{DEL_FLAG_NORMAL}
|
||||
ORDER BY a.sort
|
||||
</select>
|
||||
<!-- 查询所有业务配置菜单 -->
|
||||
<select id="findAllCfgList" resultType="sysMenu" parameterType="java.lang.String">
|
||||
SELECT
|
||||
<include refid="menuCfgColumns"/>
|
||||
FROM sys_menu a
|
||||
WHERE a.del_flag = 1
|
||||
and a.is_show=1
|
||||
and function_id is not null
|
||||
<![CDATA[ and function_id <> 0 ]]>
|
||||
<![CDATA[ and function_id <> '' ]]>
|
||||
and a.parent_Ids like CONCAT('%,', #{policiesMenuId}, ',%')
|
||||
</select>
|
||||
|
||||
<select id="findSysMenuByUserId" resultType="sysMenu">
|
||||
SELECT DISTINCT
|
||||
|
||||
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysMenu;
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.domain.configuration.RequestInfo;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
@@ -18,6 +19,7 @@ public interface ConfigureStatisticsDao {
|
||||
public List<Object[]> getConfigStateStatistics(@Param("statisticTime")String statisticTime);
|
||||
public Date getConfigStatisticTime();
|
||||
public Date getRequestStatisticTime();
|
||||
public List<Object[]> getRequestStateStatistics(@Param("requestList")List<RequestInfo> requestList,@Param("serviceList")List<FunctionServiceDict> serviceList,@Param("statisticTime")String statisticTime) ;
|
||||
public List<Object[]> getRequestStateStatistics(@Param("requestList")List<RequestInfo> requestList,@Param("menuList")List<SysMenu> menuList,@Param("statisticTime")String statisticTime) ;
|
||||
/*public List<Object[]> getRequestStateStatistics(@Param("requestList")List<RequestInfo> requestList,@Param("serviceList")List<FunctionServiceDict> serviceList,@Param("statisticTime")String statisticTime) ;*/
|
||||
public Integer getEffectiveCfgNum(@Param("serviceId")Integer serviceId);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.statistics.ConfigureStatisticsDao" >
|
||||
|
||||
<!-- -->
|
||||
<select id="getConfigStateStatistics" resultType="map">
|
||||
select c.function_id functionId,
|
||||
sum(case when c.cfg_state =1 then 1 else 0 end) as approved,
|
||||
sum(case when c.cfg_state =2 then 1 else 0 end) as unapproved,
|
||||
sum(case when c.cfg_state =3 then 1 else 0 end) as cancle_approved,
|
||||
sum(case when c.cfg_state =0 then 1 else 0 end) as created,
|
||||
sum(case when c.cfg_state =-1 then 1 else 0 end) as deleted
|
||||
from cfg_num_statistics c where c.statistic_time = #{statisticTime}
|
||||
group by c.function_id;
|
||||
</select>
|
||||
<!-- 业务配置数统计 20181126废弃
|
||||
<select id="getConfigStateStatistics" resultType="map">
|
||||
select service_id service,
|
||||
sum(case when c.cfg_state =1 then 1 else 0 end) as approved,
|
||||
@@ -14,9 +25,19 @@
|
||||
where statistic_time = #{statisticTime}
|
||||
) c
|
||||
group by service_id;
|
||||
</select>
|
||||
</select> -->
|
||||
|
||||
<select id="getRequestStateStatistics" resultType="java.util.LinkedHashMap">
|
||||
select request_id request,
|
||||
<foreach item="menu" collection="menuList" separator=",">
|
||||
sum(case when c.function_id =${menu.functionId} then 1 else 0 end) as '${menu.functionId}_${menu.functionId}'
|
||||
</foreach>
|
||||
from request_num_statistics c
|
||||
where statistic_time =#{statisticTime}
|
||||
group by request_id
|
||||
</select>
|
||||
<!-- 来函业务配置数统计 20181126废弃
|
||||
<select id="getRequestStateStatistics" resultType="java.util.LinkedHashMap">
|
||||
select request_id request,
|
||||
<foreach item="serivice" collection="serviceList" separator=",">
|
||||
sum(case when c.service_id =${serivice.serviceId} then 1 else 0 end) as ${serivice.serviceName}
|
||||
@@ -25,7 +46,7 @@
|
||||
where statistic_time =#{statisticTime}
|
||||
) c
|
||||
group by request_id
|
||||
</select>
|
||||
</select> -->
|
||||
<select id="getConfigStatisticTime" resultType="java.util.Date">
|
||||
select min(statistic_time) statistic_time
|
||||
from cfg_num_statistics c
|
||||
|
||||
Reference in New Issue
Block a user