|
@@ -103,7 +103,12 @@
|
|
|
,sub.name as "projectMasterName"
|
|
|
,sob.name as "projectMasterOffice"
|
|
|
,a.submit_money as "submitMoney"
|
|
|
- ,(case when a.submit_money = '1' then 'B级' when a.submit_money = '2' then 'A级' else '' end) as projectScale
|
|
|
+ ,(CASE
|
|
|
+ WHEN a.submit_money = '1' THEN
|
|
|
+ (CASE WHEN emergency_project ='1' THEN 'B级紧急' ELSE 'B级非紧急' END)
|
|
|
+ WHEN a.submit_money = '2' THEN
|
|
|
+ 'A级' ELSE ''
|
|
|
+END) as projectScale
|
|
|
,a.project_type as projectType,
|
|
|
wci.name AS "workContractInfo.name",
|
|
|
wct.id AS "workContractInfo.client.id",
|
|
@@ -658,10 +663,10 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and (timestampdiff(day,prd.audit_pass_date,now()) <#{endingCount} or prd.audit_pass_date is null)
|
|
|
+ and a.emergency_project = 1 and (timestampdiff(day,prd.audit_pass_date,now()) <#{endingCount} or prd.audit_pass_date is null)
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and (timestampdiff(day,prdt.audit_pass_date,now())<#{endingCount} or prdt.audit_pass_date is null)
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and (timestampdiff(day,prdt.audit_pass_date,now())<#{endingCount} or prdt.audit_pass_date is null)
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</where>
|
|
@@ -692,10 +697,10 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,prr.record_date) < #{endingCount}
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,prr.record_date) < #{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,prr.record_date) < #{endingCount}
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,prr.record_date) < #{endingCount}
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</where>
|
|
@@ -725,10 +730,10 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,now())>#{endingCount}
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,now())>=#{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,now())>#{endingCount}
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,now())>=#{endingCount}
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="beginDate !=null">
|
|
@@ -744,7 +749,7 @@
|
|
|
<select id="getExeedRecordList" resultType="DownloadProjectRecords" >
|
|
|
SELECT
|
|
|
<include refid="recordDownloadSql"/>
|
|
|
- ,ifnull(prr.status,0) as "projectReportRecordStatus"
|
|
|
+ ,"7" as "projectReportRecordStatus"
|
|
|
,prr.record_date as "recordStartAuditDate"
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
@@ -765,10 +770,10 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,prr.record_date)>#{endingCount}
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,prr.record_date)>=#{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,prr.record_date)>#{endingCount}
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,prr.record_date)>=#{endingCount}
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="beginDate !=null">
|
|
@@ -820,10 +825,10 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and (timestampdiff(day,prd.audit_pass_date,now()) <#{endingCount} or prd.audit_pass_date is null)
|
|
|
+ and a.emergency_project = 1 and (timestampdiff(day,prd.audit_pass_date,now()) <#{endingCount} or prd.audit_pass_date is null)
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and (timestampdiff(day,prdt.audit_pass_date,now())<#{endingCount} or prdt.audit_pass_date is null)
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and (timestampdiff(day,prdt.audit_pass_date,now())<#{endingCount} or prdt.audit_pass_date is null)
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
</where>
|
|
@@ -854,12 +859,12 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
limit 1))<#{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
limit 1))<#{endingCount}
|
|
|
</otherwise>
|
|
@@ -893,10 +898,10 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,now())>#{endingCount}
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,now())>=#{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,now())>#{endingCount}
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,now())>=#{endingCount}
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="beginDate !=null">
|
|
@@ -912,7 +917,7 @@
|
|
|
<select id="getExeedReportedList" resultType="DownloadProjectReporteds" >
|
|
|
SELECT
|
|
|
<include refid="recordDownloadSql"/>
|
|
|
- ,ifnull(rprr.report_status,0) as "projectReportRecordStatus"
|
|
|
+ ,"7" as "projectReportRecordStatus"
|
|
|
,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
limit 1) as "recordStartAuditDate"
|
|
@@ -939,14 +944,14 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
- limit 1))>#{endingCount}
|
|
|
+ limit 1))>=#{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
- limit 1))>#{endingCount}
|
|
|
+ limit 1))>=#{endingCount}
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="beginDate !=null">
|
|
@@ -990,14 +995,14 @@
|
|
|
<choose>
|
|
|
<when test="emergencyProject != null and emergencyProject != '' and emergencyProject == 1">
|
|
|
/*B类紧急*/
|
|
|
- and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
+ and a.emergency_project = 1 and timestampdiff(day,prd.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
- limit 1))>#{endingCount}
|
|
|
+ limit 1))>=#{endingCount}
|
|
|
</when>
|
|
|
<otherwise>
|
|
|
- and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
+ and prdt.status = 5 and prdt.audit_pass_date is not null and timestampdiff(day,prdt.audit_pass_date,(select create_date from work_activity_process wap where wap.process_instance_id = rprr.process_instance_id
|
|
|
order by create_date
|
|
|
- limit 1))>#{endingCount}
|
|
|
+ limit 1))>=#{endingCount}
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
<if test="beginDate !=null">
|