|
@@ -39,6 +39,8 @@
|
|
|
tbs.service_lead_id AS serviceUnitLeaderId,
|
|
|
tbc.lead_id AS regionManagerId,
|
|
|
tbc.region_coordinator_id AS coordinatorId,
|
|
|
+ tbs.update_time AS serviceUpdateTime,
|
|
|
+ tbc.update_time AS crmUpdateTime,
|
|
|
IF(tffa.status IN ('CANCEL','END','FINISH'),
|
|
|
TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), FROM_UNIXTIME(SUBSTRING(tffa.update_time, 1, 10), '%Y-%m-%d')),
|
|
|
TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), NOW()))
|
|
@@ -151,6 +153,7 @@
|
|
|
</choose>
|
|
|
</if>
|
|
|
</where>
|
|
|
+ ORDER BY main.serviceUpdateTime DESC,main.crmUpdateTime DESC
|
|
|
</select>
|
|
|
|
|
|
<select id="findDingSubmitList" resultType="com.qmth.sop.business.bean.result.DingSubmitResult">
|
|
@@ -190,6 +193,8 @@
|
|
|
tbs.service_lead_id AS serviceUnitLeaderId,
|
|
|
tbc.lead_id AS regionManagerId,
|
|
|
tbc.region_coordinator_id AS coordinatorId,
|
|
|
+ tbs.update_time AS serviceUpdateTime,
|
|
|
+ tbc.update_time AS crmUpdateTime,
|
|
|
IF(tffa.status IN ('CANCEL','END','FINISH'),
|
|
|
TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), FROM_UNIXTIME(SUBSTRING(tffa.update_time, 1, 10), '%Y-%m-%d')),
|
|
|
TIMESTAMPDIFF(DAY, FROM_UNIXTIME(SUBSTRING(tffa.create_time, 1, 10), '%Y-%m-%d'), NOW()))
|
|
@@ -305,5 +310,6 @@
|
|
|
</choose>
|
|
|
</if>
|
|
|
</where>
|
|
|
+ ORDER BY main.serviceUpdateTime DESC,main.crmUpdateTime DESC
|
|
|
</select>
|
|
|
</mapper>
|