|
@@ -153,11 +153,12 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getPersonWorkHoursWagesDetail" resultType="java.util.Map">
|
|
|
- select r.*,DATE_FORMAT(r.create_date,'%Y%m%d') as createDate,pp.name as procedureName,(case when pp.check_type=0 then '自检' when pp.check_type=1 then '互检' else '专检' end) as checkType,
|
|
|
+ select r.cost,r.working_time,ppt.total_progress as progress,DATE_FORMAT(r.create_date,'%Y%m%d') as createDate,pp.name as procedureName,(case when pp.check_type=0 then '自检' when pp.check_type=1 then '互检' else '专检' end) as checkType,
|
|
|
p.name as productName,DATE_FORMAT(plan.start_date,'%Y%m%d') as planStartDate,DATE_FORMAT(plan.end_date,'%Y%m%d') as planEndDate ,
|
|
|
plan.task_change_notice_num as taskName,plan.plan_type as planType,u.name as checkerName,u2.name as creatorName
|
|
|
from report r
|
|
|
left join prod_procedure pp on r.prod_procedure_id=pp.id
|
|
|
+ left join plan_procedure_total ppt on ppt.prod_procedure_id=pp.id
|
|
|
left join product p on p.id=r.product_id
|
|
|
left join plan on plan.id=r.plan_id
|
|
|
left join user u on r.checker_id=u.id
|
|
@@ -183,12 +184,10 @@
|
|
|
|
|
|
<select id="getProcedureRealTimeProgressList" resultType="java.util.Map">
|
|
|
select a.id as pptId,b.id as planId,b.plan_type as planType,(Case when b.plan_type=0 then b.product_scheduling_num else b.task_change_notice_num end) as taskName,
|
|
|
- c.name as procedureName,u.name as userName,d.work_time as planWorkTime,(select SUM(working_time) from report where user_procedure_team_id = d.id) as nowWorkTime,d.progress
|
|
|
+ c.name as procedureName,a.total_working_hours as planWorkTime,a.total_fill_time as nowWorkTime,a.total_progress as progress
|
|
|
from plan_procedure_total a
|
|
|
left join plan b on a.plan_id=b.id
|
|
|
left join prod_procedure c on a.prod_procedure_id=c.id
|
|
|
- left join prod_procedure_team d on a.id=d.plan_procedure_id
|
|
|
- left join user u on u.id=d.user_id
|
|
|
where b.company_id=#{companyId}
|
|
|
<if test="userId!=null and userId!=''">
|
|
|
and d.user_id=#{userId}
|
|
@@ -211,12 +210,10 @@
|
|
|
<select id="getProcedureRealTimeProgressCount" resultType="java.lang.Integer">
|
|
|
select count(1) from (
|
|
|
select a.id as pptId,b.id as planId,b.plan_type as planType,(Case when b.plan_type=0 then b.product_scheduling_num else b.task_change_notice_num end) as taskName,
|
|
|
- c.name as procedureName,u.name as userName,d.work_time as planWorkTime,(select SUM(working_time) from report where user_procedure_team_id = d.id) as nowWorkTime,d.progress
|
|
|
+ c.name as procedureName,a.total_working_hours as planWorkTime,a.total_fill_time as nowWorkTime,a.total_progress as progress
|
|
|
from plan_procedure_total a
|
|
|
left join plan b on a.plan_id=b.id
|
|
|
left join prod_procedure c on a.prod_procedure_id=c.id
|
|
|
- left join prod_procedure_team d on a.id=d.plan_procedure_id
|
|
|
- left join user u on u.id=d.user_id
|
|
|
where b.company_id=#{companyId}
|
|
|
<if test="userId!=null and userId!=''">
|
|
|
and d.user_id=#{userId}
|