|
@@ -20,4 +20,36 @@
|
|
|
</if>
|
|
|
order by l.Time
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="selectNewAllList" resultType="com.hz.employmentsite.vo.taskAndLog.PcLongitudeLatitudeVo">
|
|
|
+ SELECT llt.UserId,
|
|
|
+ MAX(llt.Time) AS Time,
|
|
|
+ llt.Longitude,
|
|
|
+ llt.Latitude,
|
|
|
+ site_user.SiteUserName as userName,
|
|
|
+ site_user.SiteID,
|
|
|
+ site.RegionCode,
|
|
|
+ site.SiteName
|
|
|
+ FROM
|
|
|
+ `pc_longitude_latitude` llt
|
|
|
+ LEFT JOIN pc_site_user site_user
|
|
|
+ ON llt.UserId = site_user.UserID
|
|
|
+ LEFT JOIN pc_site site ON site_user.SiteID = site.SiteID
|
|
|
+ WHERE
|
|
|
+ 1=1
|
|
|
+ <if test="userName!='' and userName!=null">
|
|
|
+ and site_user.SiteUserName like Concat('%',#{userName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and llt.Time <![CDATA[ >= ]]> #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="regionCode!='' and regionCode!=null">
|
|
|
+ and site.RegionCode = #{regionCode}
|
|
|
+ </if>
|
|
|
+ <if test="siteID!='' and siteID!=null">
|
|
|
+ and site_user.SiteID = #{siteId}
|
|
|
+ </if>
|
|
|
+ GROUP BY
|
|
|
+ llt.UserId
|
|
|
+ </select>
|
|
|
</mapper>
|