|
@@ -315,7 +315,7 @@
|
|
b.foreman_name as userName,IFNULL(ROUND(SUM(a.total_working_hours),2),0) as planWorkTime,IFNULL(ROUND(SUM(a.total_wages),2),0) as planCost,
|
|
b.foreman_name as userName,IFNULL(ROUND(SUM(a.total_working_hours),2),0) as planWorkTime,IFNULL(ROUND(SUM(a.total_wages),2),0) as planCost,
|
|
IFNULL(ROUND(SUM(a.`total_fill_time`),2),0) AS nowWorkTime,
|
|
IFNULL(ROUND(SUM(a.`total_fill_time`),2),0) AS nowWorkTime,
|
|
IFNULL(ROUND(SUM(a.`total_wages`*a.`total_progress`/100),2),0) AS nowCost,
|
|
IFNULL(ROUND(SUM(a.`total_wages`*a.`total_progress`/100),2),0) AS nowCost,
|
|
- b.product_name as productName,b.num as planNum,DATE_FORMAT(b.start_date,'%Y-%m-%d') as startDate,DATE_FORMAT(b.end_date,'%Y-%m-%d') as endDate,b.station_name as statinoName
|
|
|
|
|
|
+ b.product_name as productName,b.num as planNum,DATE_FORMAT(b.start_date,'%Y%m%d') as startDate,DATE_FORMAT(b.end_date,'%Y%m%d') as endDate,DATE_FORMAT(b.real_end_date,'%Y%m%d') as realEndDate,b.station_name as statinoName
|
|
from plan b
|
|
from plan b
|
|
left join plan_procedure_total a on a.plan_id=b.id
|
|
left join plan_procedure_total a on a.plan_id=b.id
|
|
left join user u on u.id=b.station_id
|
|
left join user u on u.id=b.station_id
|
|
@@ -494,15 +494,16 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="getPlanDataWithUserId" resultType="java.util.Map">
|
|
<select id="getPlanDataWithUserId" resultType="java.util.Map">
|
|
- select DATE_FORMAT(r.create_date,'%Y%m%d') as createDate, IFNULL(SUM(r.working_time),0) as workingTime,
|
|
|
|
|
|
+ select DATE_FORMAT(p.start_date,'%Y%m%d') as createDate, IFNULL(SUM(r.working_time),0) as workingTime,
|
|
IFNULL(SUM(r.cost),0) as cost,pp.product_name as productName,pp.product_id as productId,pp.name as procedureName,pp.id as procedureId,r.finish_num as finishNum
|
|
IFNULL(SUM(r.cost),0) as cost,pp.product_name as productName,pp.product_id as productId,pp.name as procedureName,pp.id as procedureId,r.finish_num as finishNum
|
|
from
|
|
from
|
|
report r
|
|
report r
|
|
|
|
+ left join plan p on r.plan_id=p.id
|
|
left join prod_procedure pp on r.prod_procedure_id=pp.id
|
|
left join prod_procedure pp on r.prod_procedure_id=pp.id
|
|
<where>
|
|
<where>
|
|
r.company_id=#{companyId}
|
|
r.company_id=#{companyId}
|
|
<if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
|
|
<if test="startDate!=null and startDate!='' and endDate!=null and endDate!=''">
|
|
- and r.create_date between #{startDate} and #{endDate}
|
|
|
|
|
|
+ and p.start_date between #{startDate} and #{endDate}
|
|
</if>
|
|
</if>
|
|
<if test="userId!=null">
|
|
<if test="userId!=null">
|
|
and r.creator_id=#{userId}
|
|
and r.creator_id=#{userId}
|