|
|
@@ -14,14 +14,13 @@
|
|
|
<result column="repair_end_time" jdbcType="TIMESTAMP" property="repairEndTime"/>
|
|
|
<result column="repair_status" jdbcType="VARCHAR" property="repairStatus"/>
|
|
|
<result column="status" jdbcType="VARCHAR" property="status"/>
|
|
|
- <result column="weight" jdbcType="BIGINT" property="weight"/>
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
|
<sql id="Base_Column_List">
|
|
|
id,create_time,create_user,update_time,update_user,
|
|
|
- productionresource_id,repair_start_time,repair_end_time, weight,repair_status,status,remark,code,productionresourceName,lineDesc,process,downTime
|
|
|
+ productionresource_id,repair_end_time,repair_status,status,remark,code,productionresourceName,lineDesc,process,downTime,operationName,expireFlag
|
|
|
</sql>
|
|
|
|
|
|
<!-- 分页 -->
|
|
|
@@ -30,7 +29,7 @@
|
|
|
<include refid="Base_Column_List"/>
|
|
|
from (
|
|
|
SELECT
|
|
|
- a.*,
|
|
|
+ a.id,a.repair_end_time,a.status,a.repair_status,a.create_time,a.create_user,a.update_user,a.update_time, (select d.name from c_auth_user d where d.id = a.update_user) as operationName,a.productionresource_id,a.remark,
|
|
|
case when timestampdiff( MINUTE, now(), a.repair_end_time ) > 0 then CONCAT(
|
|
|
TRUNCATE ( timestampdiff( MINUTE, now(), a.repair_end_time ) / 1440, 0 ),
|
|
|
'天',
|
|
|
@@ -41,20 +40,14 @@
|
|
|
) else '已到维保时间' end AS downTime,
|
|
|
IF
|
|
|
(
|
|
|
- ROUND(
|
|
|
- timestampdiff( MINUTE, now(), a.repair_end_time ) / timestampdiff( MINUTE, a.repair_start_time, a.repair_end_time ) * 100,
|
|
|
- 2
|
|
|
- )<![CDATA[ <= ]]>0,
|
|
|
- 0,
|
|
|
- ROUND(
|
|
|
- timestampdiff( MINUTE, now(), a.repair_end_time ) / timestampdiff( MINUTE, a.repair_start_time, a.repair_end_time ) * 100,
|
|
|
- 2
|
|
|
- )
|
|
|
+ timestampdiff( SECOND, now(), a.repair_end_time ) <![CDATA[ <= ]]> 0,
|
|
|
+ 100,
|
|
|
+ convert(
|
|
|
+ timestampdiff( SECOND, now(), a.repair_end_time ) / timestampdiff( SECOND, a.repair_start_time, a.repair_end_time ) ,decimal(30,28)
|
|
|
+ ) * 100
|
|
|
) AS process,
|
|
|
- if(ROUND(
|
|
|
- timestampdiff( MINUTE, now(), a.repair_end_time ) / timestampdiff( MINUTE, a.repair_start_time, a.repair_end_time ) * 100,
|
|
|
- 2
|
|
|
- ) <![CDATA[ <= ]]> 0,'0','1') as repair_status,
|
|
|
+ IF
|
|
|
+ (timestampdiff( SECOND, now(), a.repair_end_time ) <![CDATA[ <= ]]> 0,1,0) AS expireFlag,
|
|
|
b.CODE,
|
|
|
b.NAME AS productionresourceName,
|
|
|
c.NAME AS lineDesc
|