|
@@ -1,6 +1,7 @@
|
|
|
<?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.redxun.knowledge.analysis.mapper.AnalysisSearchMapper">
|
|
|
+
|
|
|
<select id="searchSystemDetailVisits" resultType="com.redxun.knowledge.analysis.entity.vo.SystemDetailVisitsVo">
|
|
|
select PLATFORM ,round(count(*) / sum(count(*)) over (),2) as percentage from KM_PV_LOG
|
|
|
<where>
|
|
@@ -11,4 +12,139 @@
|
|
|
</where>
|
|
|
group by PLATFORM
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="organizationSearchs" resultType="com.redxun.knowledge.analysis.entity.vo.SystemCompanyVo">
|
|
|
+ select
|
|
|
+ companyId as company, NVL(total.total, 0) as total,
|
|
|
+ NVL(pz.pz, 0) as pz,NVL(gz.gz, 0) as gz,NVL(eip.eip, 0) as eip,
|
|
|
+ NVL(wp.wp,0) as wp,NVL(zs.zs,0) as zs,NVL(dcc.dcc,0) as dcc
|
|
|
+ from (
|
|
|
+ (select COMPANY_ID as companyId, count(*) total
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) total
|
|
|
+ full join
|
|
|
+ (select COMPANY_ID as companyId, count(*) pz
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ PLATFORM = '平展系统'
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) pz
|
|
|
+ using (companyId)
|
|
|
+ full join
|
|
|
+ (select COMPANY_ID as companyId, count(*) gz
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ PLATFORM = '工作管理系统'
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) gz
|
|
|
+ using (companyId)
|
|
|
+ full join
|
|
|
+ (select COMPANY_ID as companyId, count(*) eip
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ PLATFORM = 'EIP系统'
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) eip
|
|
|
+ using (companyId)
|
|
|
+ full join
|
|
|
+ (select COMPANY_ID as companyId, count(*) wp
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ PLATFORM = '网盘系统'
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) wp
|
|
|
+ using (companyId)
|
|
|
+ full join
|
|
|
+ (select COMPANY_ID as companyId, count(*) zs
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ PLATFORM = '知识管理系统'
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) zs
|
|
|
+ using (companyId)
|
|
|
+ full join
|
|
|
+ (select COMPANY_ID as companyId, count(*) dcc
|
|
|
+ from KM_PV_LOG
|
|
|
+ <where>
|
|
|
+ PLATFORM = 'DCC管理系统'
|
|
|
+ <if test="firstDay != null and lastDay != null">
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') >= #{firstDay}
|
|
|
+ and TO_CHAR(CREATE_TIME_,'yyyy-mm-dd') <= #{lastDay}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ group by COMPANY_ID) dcc
|
|
|
+ using (companyId)
|
|
|
+ )
|
|
|
+ <if test="sort == null">
|
|
|
+ order by total desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'totalDesc'">
|
|
|
+ order by total desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'totalAsc'">
|
|
|
+ order by total
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'zsDesc'">
|
|
|
+ order by zs desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'zsAsc'">
|
|
|
+ order by zs
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'eipDesc'">
|
|
|
+ order by eip desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'eipAsc'">
|
|
|
+ order by eip
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'dccDesc'">
|
|
|
+ order by dcc desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'dccAsc'">
|
|
|
+ order by dcc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'gzDesc'">
|
|
|
+ order by gz desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'gzAsc'">
|
|
|
+ order by gz
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'pzDesc'">
|
|
|
+ order by pz desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'pzAsc'">
|
|
|
+ order by pz
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'wpDesc'">
|
|
|
+ order by wp desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'wpAsc'">
|
|
|
+ order by wp
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|