hanfucheng 9 kuukautta sitten
vanhempi
commit
6d97530bbf

+ 5 - 5
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionAttachMapper.xml

@@ -119,17 +119,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT
             a.id,
             a.inspector_name inspectorName,
-            a.inspector_time inspectorTime,
-            a.filling_time fillingTime,
+            DATE_FORMAT(a.inspector_time, '%Y-%m-%d %H:%i:%s') inspectorTime,
+            DATE_FORMAT(a.filling_time, '%Y-%m-%d %H:%i:%s') fillingTime,
             a.operator_name operatorName,
             a.filling_medium fillingMedium,
-            a.delivery_time deliveryTime,
+            DATE_FORMAT(a.delivery_time, '%Y-%m-%d %H:%i:%s') deliveryTime,
             a.delivery_name deliveryName,
             a.car_number carNumber,
-            a.sign_time signTime,
+            DATE_FORMAT(a.sign_time, '%Y-%m-%d %H:%i:%s') signTime,
             a.join_house_name joinHouseName,
             a.recycling_name recyclingName,
-            a.recycling_time recyclingTime,
+            DATE_FORMAT(a.recycling_time, '%Y-%m-%d %H:%i:%s') recyclingTime,
             b.gas_address gasAddress
         FROM
             centerdata_t_housingconstruction_steelcylinder_log a

+ 2 - 3
src/main/resources/mapper/housingconstruction/CenterdataTHousingconstructionViewMapper.xml

@@ -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 &lt; #{radius}</if>