|
@@ -11,7 +11,8 @@
|
|
|
</insert>
|
|
|
|
|
|
<select id="getAuditList" resultType="com.kpt.admin.module.gm.audit.domain.vo.AuditVo">
|
|
|
- select a.*,e.swerk,e.tplnr,cu.actual_name as createUserName,
|
|
|
+ select a.*,concat(r.qmdat,' ',r.mzeit) dateRepair,
|
|
|
+ e.swerk,e.tplnr,cu.actual_name as createUserName,
|
|
|
(select id from bigpartapply where applyCode = a.code)bigPartapplyId,
|
|
|
bist.id biginspectionId,bist.plantime,up.actual_name upkeepPersonName,
|
|
|
bpemp.actual_name partapplyPersonName,(select sum(amount) from partapply where bigid = bp.id) amount,
|
|
@@ -160,7 +161,7 @@
|
|
|
|
|
|
<select id="getManHour" resultType="com.kpt.admin.module.gm.audit.domain.vo.ManHourVo">
|
|
|
SELECT
|
|
|
- p.name pastureName,
|
|
|
+ p.name pastureName,concat(r.qmdat,' ',r.mzeit) dateRepair,
|
|
|
a.code,
|
|
|
eq.eqCode,
|
|
|
eq.eqName,
|
|
@@ -175,6 +176,7 @@
|
|
|
(select sum(part.sumPrice) from bigpartapply bpa join partapply part on part.bigId = bpa.id where bpa.RUCode = a.code) cost
|
|
|
FROM
|
|
|
audit a
|
|
|
+ left join repair r on r.qmnum = a.code
|
|
|
JOIN equipment eq ON eq.eqCode = a.eqCode
|
|
|
JOIN pasture p ON p.id = eq.pastureId
|
|
|
join t_employee te on te.employee_id = a.personnelID
|
|
@@ -208,7 +210,7 @@
|
|
|
</select>
|
|
|
<select id="getManHourStatistics" resultType="com.kpt.admin.module.gm.audit.domain.vo.ManHourVo">
|
|
|
SELECT
|
|
|
- p.name pastureName,
|
|
|
+ p.name pastureName,concat(r.qmdat,' ',r.mzeit) dateRepair,
|
|
|
a.code,
|
|
|
eq.eqCode,
|
|
|
eq.eqName,
|
|
@@ -223,6 +225,7 @@
|
|
|
(select sum(part.sumPrice) from bigpartapply bpa join partapply part on part.bigId = bpa.id where bpa.RUCode = a.code) cost
|
|
|
FROM
|
|
|
audit a
|
|
|
+ left join repair r on r.qmnum = a.code
|
|
|
left JOIN equipment eq ON eq.eqCode = a.eqCode
|
|
|
left JOIN pasture p ON p.id = eq.pastureId
|
|
|
left join t_employee te on te.employee_id = a.personnelID
|
|
@@ -245,7 +248,7 @@
|
|
|
and ( (a.oneAuditTime between #{audit.startAudit} and DATE_SUB(#{audit.endAudit}, INTERVAL -1 DAY) ) or ( #{audit.startAudit} = '' and #{audit.endAudit} = '' ))
|
|
|
and (p.id = #{audit.pastureId} or #{audit.pastureId} = '') and (eq.eqName like concat('%',#{audit.eqName},'%') or #{audit.eqName} = '')
|
|
|
and (te.actual_name like concat('%',#{audit.repairPerson},'%') or #{audit.repairPerson} = '')
|
|
|
- order by a.completionTime desc
|
|
|
+ order by a.date desc,a.completionTime desc
|
|
|
</select>
|
|
|
<select id="getManHourStatisticsCount" resultType="java.lang.Integer">
|
|
|
SELECT
|