|
@@ -3,7 +3,7 @@
|
|
<mapper namespace="com.jeeplus.modules.bzshbExamine.dao.StandardOpinionDao">
|
|
<mapper namespace="com.jeeplus.modules.bzshbExamine.dao.StandardOpinionDao">
|
|
|
|
|
|
<select id="findList" resultType="com.jeeplus.modules.bzshbExamine.entity.StandardOpinion" >
|
|
<select id="findList" resultType="com.jeeplus.modules.bzshbExamine.entity.StandardOpinion" >
|
|
- select wpu.user_id as "userId", su.name as "userName",count(a.create_by) as "projectAllNumber"
|
|
|
|
|
|
+ select wpu.user_id as "userId", su.name as "userName"
|
|
from project_report_data a
|
|
from project_report_data a
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
left join sys_user su on su.id = wpu.user_id
|
|
left join sys_user su on su.id = wpu.user_id
|
|
@@ -29,6 +29,30 @@
|
|
group by wpu.user_id
|
|
group by wpu.user_id
|
|
order by a.audit_pass_date desc
|
|
order by a.audit_pass_date desc
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getProjectAllNumber" resultType="java.lang.Integer" >
|
|
|
|
+ select count(a.create_by) as "projectAllNumber"
|
|
|
|
+ from project_report_data a
|
|
|
|
+ left join work_project_user wpu on wpu.project_id = a.project_id
|
|
|
|
+ left join sys_user su on su.id = wpu.user_id
|
|
|
|
+ left join rural_project_records rpr on rpr.id = a.project_id
|
|
|
|
+ <where>
|
|
|
|
+ and a.del_flag = 0
|
|
|
|
+ and rpr.project_id is not null
|
|
|
|
+ and a.status = 5
|
|
|
|
+ and wpu.is_master = 1
|
|
|
|
+ <if test="auditUserIdList.size>0">
|
|
|
|
+ and a.bzshb_user_id in
|
|
|
|
+ <foreach collection="auditUserIdList" item="auditUserId" separator="," open="(" close=")">
|
|
|
|
+ #{auditUserId}
|
|
|
|
+ </foreach>
|
|
|
|
+ </if>
|
|
|
|
+ <if test="(userId != null and userId != '') or (userName != null and userName != '')">
|
|
|
|
+ AND (wpu.user_id = #{userId} or su.name like concat('%',#{userName},'%'))
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ group by wpu.user_id
|
|
|
|
+ order by a.audit_pass_date desc
|
|
|
|
+ </select>
|
|
<select id="getBjiProject" resultType="java.lang.Integer" >
|
|
<select id="getBjiProject" resultType="java.lang.Integer" >
|
|
select count(a.create_by)
|
|
select count(a.create_by)
|
|
from project_report_data a
|
|
from project_report_data a
|
|
@@ -73,45 +97,47 @@
|
|
group by wpu.user_id) z
|
|
group by wpu.user_id) z
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getStandardNumber" resultType="java.lang.Integer">
|
|
|
|
|
|
+ <select id="getProjectAllCount" resultType="java.lang.Integer">
|
|
|
|
+
|
|
select count(1) from project_report_data a
|
|
select count(1) from project_report_data a
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
- LEFT JOIN rural_project_records rpr ON rpr.id = a.project_id
|
|
|
|
|
|
+ left join rural_project_records rpr on rpr.id = a.project_id
|
|
<where>
|
|
<where>
|
|
- and wpu.user_id = #{userId} and wpu.is_master = 1
|
|
|
|
- and a.status = 5
|
|
|
|
- and a.del_flag = 0
|
|
|
|
- and rpr.id IS NOT NULL
|
|
|
|
|
|
+ and wpu.user_id = #{userId}
|
|
|
|
+ and rpr.project_id is not null
|
|
|
|
+ and a.del_flag = 0 and wpu.is_master = 1 and a.status = 5
|
|
<if test="auditUserIdList.size>0">
|
|
<if test="auditUserIdList.size>0">
|
|
and a.bzshb_user_id in
|
|
and a.bzshb_user_id in
|
|
<foreach collection="auditUserIdList" item="auditUserId" separator="," open="(" close=")">
|
|
<foreach collection="auditUserIdList" item="auditUserId" separator="," open="(" close=")">
|
|
#{auditUserId}
|
|
#{auditUserId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="startDate != null and endDate != null and startDate != '' and endDate != ''">
|
|
|
|
+ AND a.audit_pass_date BETWEEN #{startDate} AND DATE_ADD(#{endDate},INTERVAL 1 DAY)
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
- <select id="getProjectAllCount" resultType="java.lang.Integer">
|
|
|
|
-
|
|
|
|
|
|
+ <select id="getStandardNumber" resultType="java.lang.Integer">
|
|
select count(1) from project_report_data a
|
|
select count(1) from project_report_data a
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
- left join rural_project_records rpr on rpr.id = a.project_id
|
|
|
|
|
|
+ LEFT JOIN work_review_audit wa on wa.report_id =a.id
|
|
<where>
|
|
<where>
|
|
and wpu.user_id = #{userId}
|
|
and wpu.user_id = #{userId}
|
|
- and rpr.project_id is not null
|
|
|
|
and a.del_flag = 0 and wpu.is_master = 1 and a.status = 5
|
|
and a.del_flag = 0 and wpu.is_master = 1 and a.status = 5
|
|
|
|
+ and wa.type=4
|
|
|
|
+ and (wa.deductOption IS NOT NULL and wa.deductOption !='' )
|
|
<if test="auditUserIdList.size>0">
|
|
<if test="auditUserIdList.size>0">
|
|
and a.bzshb_user_id in
|
|
and a.bzshb_user_id in
|
|
<foreach collection="auditUserIdList" item="auditUserId" separator="," open="(" close=")">
|
|
<foreach collection="auditUserIdList" item="auditUserId" separator="," open="(" close=")">
|
|
#{auditUserId}
|
|
#{auditUserId}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
- <if test="startDate != null and endDate != null and startDate != '' and endDate != ''">
|
|
|
|
- AND a.audit_pass_date BETWEEN #{startDate} AND DATE_ADD(#{endDate},INTERVAL 1 DAY)
|
|
|
|
- </if>
|
|
|
|
|
|
+<!-- <if test="startDate != null and endDate != null and startDate != '' and endDate != ''">-->
|
|
|
|
+<!-- AND a.audit_pass_date BETWEEN #{startDate} AND DATE_ADD(#{endDate},INTERVAL 1 DAY)-->
|
|
|
|
+<!-- </if>-->
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
-
|
|
|
|
<select id="getStandardCount" resultType="java.lang.Integer">
|
|
<select id="getStandardCount" resultType="java.lang.Integer">
|
|
select count(1) from project_report_data a
|
|
select count(1) from project_report_data a
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
left join work_project_user wpu on wpu.project_id = a.project_id
|
|
@@ -159,16 +185,11 @@
|
|
aa.projectName,
|
|
aa.projectName,
|
|
aa.createDate,
|
|
aa.createDate,
|
|
ws.standard_detail AS "standardDetail",
|
|
ws.standard_detail AS "standardDetail",
|
|
- wa.deductOption AS "deductOption",
|
|
|
|
- wa.standard_detail AS "standardDetailTwo"
|
|
|
|
|
|
+ wa.deductOption AS "deductOption"
|
|
FROM (
|
|
FROM (
|
|
select a.id as "projectId" ,a.project_name as "projectName",a.create_date AS "createDate",prd.id as "reportId",wpu.user_id as "user_id",prd.bzshb_user_id as "bzshb_user_id" FROM rural_project_records a
|
|
select a.id as "projectId" ,a.project_name as "projectName",a.create_date AS "createDate",prd.id as "reportId",wpu.user_id as "user_id",prd.bzshb_user_id as "bzshb_user_id" FROM rural_project_records a
|
|
LEFT JOIN work_project_user wpu ON wpu.project_id = a.id
|
|
LEFT JOIN work_project_user wpu ON wpu.project_id = a.id
|
|
LEFT JOIN project_report_data prd ON prd.project_id = a.id
|
|
LEFT JOIN project_report_data prd ON prd.project_id = a.id
|
|
- union all
|
|
|
|
- select a.id as "projectId" ,a.project_name as "projectName",a.create_date AS "createDate",prd.id as "reportId",wpu.user_id as "user_id",prd.bzshb_user_id as "bzshb_user_id" FROM rural_project_records a
|
|
|
|
- LEFT JOIN work_project_user wpu ON wpu.project_id = a.id
|
|
|
|
- LEFT JOIN project_report_data_two prd ON prd.project_id = a.id
|
|
|
|
) aa
|
|
) aa
|
|
LEFT JOIN work_review_audit wa ON wa.report_id = aa.reportId
|
|
LEFT JOIN work_review_audit wa ON wa.report_id = aa.reportId
|
|
LEFT JOIN work_review_standard ws ON ws.id = wa.standard_id
|
|
LEFT JOIN work_review_standard ws ON ws.id = wa.standard_id
|