|
@@ -658,10 +658,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 +692,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 +725,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">
|
|
@@ -765,10 +765,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 +820,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 +854,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 +893,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">
|
|
@@ -939,14 +939,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 +990,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">
|