|
@@ -399,7 +399,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM centerdata_t_housingconstruction_inspect GROUP BY steelcylinder_id ) b
|
|
|
ON a.steelcylinder_id = b.steelcylinder_id AND a.next_inspect_time = b.max_time
|
|
|
WHERE
|
|
|
- a.next_inspect_time <= DATE_FORMAT(NOW(),'%Y-%m-%d %h:%m:%s')
|
|
|
+ a.next_inspect_time <= DATE_FORMAT(NOW(),'%Y-%m-%d %h:%i:%s')
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and a.dept_id = #{enterpriseId}</if>
|
|
|
</select>
|
|
|
|
|
@@ -479,7 +479,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
round( st_distance_sphere ( point ( #{longitude}, #{latitude}), point ( longitude, latitude ) ), 2 ) AS distance
|
|
|
FROM centerdata_t_housingconstruction_steelcylinder_log l
|
|
|
left join centerdata_t_housingconstruction_steelcylinder a on a.id = l.steelcylinder_id
|
|
|
- LEFT JOIN centerdata_t_housingconstruction_realnameuser u ON u.id = l.join_house_id
|
|
|
+ LEFT JOIN centerdata_t_housingconstruction_realnameuser u ON u.id = l.join_house_id and u.longitude is not null
|
|
|
LEFT JOIN (SELECT
|
|
|
a.steelcylinder_id,
|
|
|
GROUP_CONCAT( b.gas_address ORDER BY a.sign_time DESC SEPARATOR '@_@' ) address
|
|
@@ -493,7 +493,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
|
<if test="enterpriseId != null and enterpriseId != ''"> and u.enterprise_id = #{enterpriseId}</if>
|
|
|
<if test="name != null and name != ''"> and l.steelcylinder_name = #{name}</if>
|
|
|
- and u.longitude is not null
|
|
|
</where>
|
|
|
GROUP BY l.steelcylinder_id
|
|
|
<if test="radius != null">having distance < #{radius}</if>
|