|
@@ -14,12 +14,12 @@
|
|
|
</select>
|
|
|
<select id="getPage" resultType="org.springblade.control.vo.DepartmentMonthPlanVO">
|
|
|
SELECT dmp.*,
|
|
|
- (select COUNT(1) from c_project_cost_budget pcb WHERE pcb.dept_id = dmp.dept_id
|
|
|
+ (select COUNT(1) from c_project_cost_budget pcb WHERE pcb.dept_id = dmp.dept_id and pcb.parent_id != 0
|
|
|
and dmp.plan_date between DATE_FORMAT(pcb.plan_start_time ,'%Y-%m') and DATE_FORMAT(pcb.plan_end_time ,'%Y-%m')) as 'planTotal',
|
|
|
- (select COUNT(1) from c_project_cost_budget pcb WHERE pcb.dept_id = dmp.dept_id
|
|
|
+ (select COUNT(1) from c_project_cost_budget pcb WHERE pcb.dept_id = dmp.dept_id and pcb.parent_id != 0
|
|
|
and pcb.task_approve = 1
|
|
|
and dmp.plan_date between DATE_FORMAT(pcb.plan_start_time ,'%Y-%m') and DATE_FORMAT(pcb.plan_end_time ,'%Y-%m')) as 'finishPlanTotal',
|
|
|
- (select COUNT(1) from c_project_cost_budget pcb WHERE pcb.dept_id = dmp.dept_id
|
|
|
+ (select COUNT(1) from c_project_cost_budget pcb WHERE pcb.dept_id = dmp.dept_id and pcb.parent_id != 0
|
|
|
and pcb.task_approve = 0
|
|
|
and dmp.plan_date between DATE_FORMAT(pcb.plan_start_time ,'%Y-%m') and DATE_FORMAT(pcb.plan_end_time ,'%Y-%m')) as 'beginPlanTotal',
|
|
|
(select bu.name from blade_user bu WHERE bu.id = dmp.plan_designer) as 'planDesignerName'
|