bug修复
This commit is contained in:
parent
dbabe955ef
commit
363dca9e95
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bai.create_by as createBy,
|
bai.create_by as createBy,
|
||||||
bai.create_time as createTime,
|
bai.create_time as createTime,
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_id) as typeId,
|
GROUP_CONCAT(DISTINCT mt2.type_id) as typeId,
|
||||||
GROUP_CONCAT(mt2.type_name) AS typeName,
|
GROUP_CONCAT(DISTINCT mt2.type_name) AS typeName,
|
||||||
bai.`status` AS status,
|
bai.`status` AS status,
|
||||||
bai.print_status as printStatus
|
bai.print_status as printStatus
|
||||||
FROM
|
FROM
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@
|
||||||
<update id="batchQualified">
|
<update id="batchQualified">
|
||||||
update repair_apply_details
|
update repair_apply_details
|
||||||
set status = '1',
|
set status = '1',
|
||||||
repaired_num = repair_num,
|
repaired_num = repair_num - scrap_num,
|
||||||
update_by = #{userId},
|
update_by = #{userId},
|
||||||
update_time = now()
|
update_time = now()
|
||||||
where id in
|
where id in
|
||||||
|
|
@ -300,15 +300,14 @@
|
||||||
rad.type_id as typeId,
|
rad.type_id as typeId,
|
||||||
rad.back_id as backId,
|
rad.back_id as backId,
|
||||||
rad.create_time,
|
rad.create_time,
|
||||||
count(rc.id) AS totalCostRecords,
|
( SELECT COUNT(*) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCostRecords,
|
||||||
sum(ifnull(rc.costs,0)) AS totalCost
|
( SELECT SUM( IFNULL( rc.costs, 0 )) FROM repair_cost rc WHERE rc.repair_id = rad.id ) AS totalCost
|
||||||
from
|
from
|
||||||
repair_apply_details rad
|
repair_apply_details rad
|
||||||
left join ma_type mt on rad.type_id = mt.type_id
|
left join ma_type mt on rad.type_id = mt.type_id
|
||||||
left join ma_machine mm on mm.ma_id = rad.ma_id
|
left join ma_machine mm on mm.ma_id = rad.ma_id
|
||||||
left join sys_user su on rad.repairer = su.user_id
|
left join sys_user su on rad.repairer = su.user_id
|
||||||
left join ma_type mt2 on mt.parent_id = mt2.type_id
|
left join ma_type mt2 on mt.parent_id = mt2.type_id
|
||||||
left join repair_cost rc ON rad.id = rc.repair_id
|
|
||||||
where
|
where
|
||||||
rad.task_id = #{taskId}
|
rad.task_id = #{taskId}
|
||||||
<if test="companyId != null and companyId != ''">
|
<if test="companyId != null and companyId != ''">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue