|
@@ -2,7 +2,7 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.jeeplus.modules.sg.report.mapper.ReportMapper">
|
|
<mapper namespace="com.jeeplus.modules.sg.report.mapper.ReportMapper">
|
|
|
|
|
|
- <select id="findData" resultType="SgReport">
|
|
|
|
|
|
+ <select id="findData" resultType="SgReport" parameterType="SgReport">
|
|
SELECT a.department as name ,
|
|
SELECT a.department as name ,
|
|
sum(a.st1) as finishCount,
|
|
sum(a.st1) as finishCount,
|
|
SUM(a.st2) as unfinishCount
|
|
SUM(a.st2) as unfinishCount
|
|
@@ -10,7 +10,14 @@
|
|
(SELECT department,
|
|
(SELECT department,
|
|
if(firstFinish='否' or secondFinish = '否',0,1) as st1,
|
|
if(firstFinish='否' or secondFinish = '否',0,1) as st1,
|
|
if(firstFinish='否' or secondFinish = '否',1,0) as st2
|
|
if(firstFinish='否' or secondFinish = '否',1,0) as st2
|
|
- from sj_project_information) a
|
|
|
|
|
|
+ from sj_project_information t1
|
|
|
|
+ <where>
|
|
|
|
+ 1=1
|
|
|
|
+ <if test="dataScope != null and dataScope != ''">
|
|
|
|
+ ${dataScope}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ ) a
|
|
GROUP BY department
|
|
GROUP BY department
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -31,7 +38,14 @@
|
|
department,
|
|
department,
|
|
if(firstFinish='否' or secondFinish = '否',NOW(),if(secondFinish = '是',secondFinishDate,firstFinishDate) )as da ,
|
|
if(firstFinish='否' or secondFinish = '否',NOW(),if(secondFinish = '是',secondFinishDate,firstFinishDate) )as da ,
|
|
approvalDate ,if(firstFinish='否' or secondFinish = '否','0','1') as status
|
|
approvalDate ,if(firstFinish='否' or secondFinish = '否','0','1') as status
|
|
- from sj_project_information) a
|
|
|
|
|
|
+ from sj_project_information t1
|
|
|
|
+ <where>
|
|
|
|
+ 1=1
|
|
|
|
+ <if test="dataScope != null and dataScope != ''">
|
|
|
|
+ ${dataScope}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ ) a
|
|
<where>
|
|
<where>
|
|
<if test="status != null and status != ''">
|
|
<if test="status != null and status != ''">
|
|
a.status = #{status} and
|
|
a.status = #{status} and
|
|
@@ -43,7 +57,7 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
- <select id="findUnitData" resultType="SgReport">
|
|
|
|
|
|
+ <select id="findUnitData" resultType="SgReport" parameterType="SgReport">
|
|
SELECT a.underCentralized as name ,
|
|
SELECT a.underCentralized as name ,
|
|
sum(a.st1) as finishCount,
|
|
sum(a.st1) as finishCount,
|
|
SUM(a.st2) as unfinishCount
|
|
SUM(a.st2) as unfinishCount
|
|
@@ -51,7 +65,14 @@
|
|
(SELECT if(t2.underCentralized is null,'未知部门',t2.underCentralized) as underCentralized,
|
|
(SELECT if(t2.underCentralized is null,'未知部门',t2.underCentralized) as underCentralized,
|
|
if(t1.firstFinish='否' or t1.secondFinish = '否',0,1) as st1,
|
|
if(t1.firstFinish='否' or t1.secondFinish = '否',0,1) as st1,
|
|
if(t1.firstFinish='否' or t1.secondFinish = '否',1,0) as st2
|
|
if(t1.firstFinish='否' or t1.secondFinish = '否',1,0) as st2
|
|
- from sj_project_information t1 left join sj_project_append t2 on t1.project_id = t2.project_id) a
|
|
|
|
|
|
+ from sj_project_information t1 left join sj_project_append t2 on t1.project_id = t2.project_id
|
|
|
|
+ <where>
|
|
|
|
+ 1=1
|
|
|
|
+ <if test="dataScope != null and dataScope != ''">
|
|
|
|
+ ${dataScope}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ ) a
|
|
GROUP BY a.underCentralized
|
|
GROUP BY a.underCentralized
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -72,7 +93,14 @@
|
|
if(t2.underCentralized is null,'未知部门',t2.underCentralized) as underCentralized,
|
|
if(t2.underCentralized is null,'未知部门',t2.underCentralized) as underCentralized,
|
|
if(t1.firstFinish='否' or t1.secondFinish = '否',NOW(),if(t1.secondFinish = '是',t1.secondFinishDate,t1.firstFinishDate) )as da ,
|
|
if(t1.firstFinish='否' or t1.secondFinish = '否',NOW(),if(t1.secondFinish = '是',t1.secondFinishDate,t1.firstFinishDate) )as da ,
|
|
t1.approvalDate ,if(t1.firstFinish='否' or t1.secondFinish = '否','0','1') as status
|
|
t1.approvalDate ,if(t1.firstFinish='否' or t1.secondFinish = '否','0','1') as status
|
|
- from sj_project_information t1 left join sj_project_append t2 on t1.project_id = t2.project_id) a
|
|
|
|
|
|
+ from sj_project_information t1 left join sj_project_append t2 on t1.project_id = t2.project_id
|
|
|
|
+ <where>
|
|
|
|
+ 1=1
|
|
|
|
+ <if test="dataScope != null and dataScope != ''">
|
|
|
|
+ ${dataScope}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ ) a
|
|
<where>
|
|
<where>
|
|
<if test="status != null and status != ''">
|
|
<if test="status != null and status != ''">
|
|
a.status = #{status} and
|
|
a.status = #{status} and
|