@@ -107,4 +107,7 @@ public class CenterdataTHydraulicPatrolTask extends BaseBusinessEntity {
//实际距离
private String distance;
+
+ //时间差
+ private String diff;
}
@@ -295,6 +295,9 @@
LEFT JOIN centerdata_t_hydraulic_patrol_plan_record c ON c.task_id = a.id
<where>
<if test="type != null">and a.type = #{type}</if>
+ <if test="diff != null">
+ and DATEDIFF( now(), a.create_time ) <= #{diff}
+ </if>
${params.dataScope}
</where>
GROUP BY a.id