Browse Source

日常巡护

hanfucheng 1 year ago
parent
commit
3a4123d3c0

+ 3 - 0
src/main/java/com/sooka/sponest/data/digitalwater/domain/CenterdataTHydraulicPatrolTask.java

@@ -107,4 +107,7 @@ public class CenterdataTHydraulicPatrolTask extends BaseBusinessEntity {
 
     //实际距离
     private String distance;
+
+    //时间差
+    private String diff;
 }

+ 3 - 0
src/main/resources/mapper/digitalresource/DigitalResourcesBigDataMapper.xml

@@ -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 ) &lt;= #{diff}
+           </if>
            ${params.dataScope}
        </where>
        GROUP BY a.id