92 lines
3.1 KiB
XML
92 lines
3.1 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="com.cm.bigdata.dao.kpi.IKpiDao">
|
||
|
|
||
|
<resultMap id="communityBossDayCountPO" type="com.cm.bigdata.pojo.pos.kpi.CommunityBossDayCountPO">
|
||
|
<id column="id" property="id"/>
|
||
|
<result column="user_id" property="userId"/>
|
||
|
<result column="day_date" property="dayDate"/>
|
||
|
<result column="is_signin" property="isSignin"/>
|
||
|
<result column="is_signin_late" property="isSigninLate"/>
|
||
|
<result column="is_signout" property="isSignout"/>
|
||
|
<result column="is_signout_early" property="isSignoutEarly"/>
|
||
|
<result column="work_distance" property="workDistance"/>
|
||
|
<result column="save_population_count" property="savePopulationCount"/>
|
||
|
<result column="update_population_count" property="updatePopulationCount"/>
|
||
|
</resultMap>
|
||
|
|
||
|
<!-- 保存网格员日统计 -->
|
||
|
<insert id="saveCommunityBossDayCount" parameterType="map">
|
||
|
INSERT INTO kpi_community_boss_${level}_day_count(
|
||
|
user_id,
|
||
|
day_date,
|
||
|
is_signin,
|
||
|
is_signin_late,
|
||
|
is_signout,
|
||
|
is_signout_early,
|
||
|
work_distance,
|
||
|
population_count,
|
||
|
save_population_count,
|
||
|
update_population_count
|
||
|
) VALUES (
|
||
|
#{userId},
|
||
|
#{dayDate},
|
||
|
#{isSignin},
|
||
|
#{isSigninLate},
|
||
|
#{isSignout},
|
||
|
#{isSignoutEarly},
|
||
|
#{workDistance},
|
||
|
#{populationCount},
|
||
|
#{savePopulationCount},
|
||
|
#{updatePopulationCount}
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
<!-- 删除网格员日统计 -->
|
||
|
<delete id="deleteCommunityBossDayCount" parameterType="map">
|
||
|
DELETE FROM
|
||
|
kpi_community_boss_${level}_day_count
|
||
|
WHERE
|
||
|
day_date = #{dayDate}
|
||
|
</delete>
|
||
|
|
||
|
<!-- 修改网格员日统计 -->
|
||
|
<update id="updateCommunityBossDayCount" parameterType="map">
|
||
|
UPDATE
|
||
|
kpi_community_boss_${level}_day_count
|
||
|
SET
|
||
|
is_signin = #{isSignin},
|
||
|
is_signin_late = #{isSigninLate},
|
||
|
is_signout = #{isSignout},
|
||
|
is_signout_early = #{isSignoutEarly},
|
||
|
work_distance = #{workDistance},
|
||
|
save_population_count = #{savePopulationCount},
|
||
|
update_population_count = #{updatePopulationCount}
|
||
|
WHERE
|
||
|
user_id = #{userId}
|
||
|
AND
|
||
|
day_date = #{dayDate}
|
||
|
</update>
|
||
|
|
||
|
<!-- 详情 -->
|
||
|
<select id="getCommunityBossDayCountPO" parameterType="map" resultMap="communityBossDayCountPO">
|
||
|
SELECT
|
||
|
id,
|
||
|
user_id,
|
||
|
day_date,
|
||
|
is_signin,
|
||
|
is_signin_late,
|
||
|
is_signout,
|
||
|
is_signout_early,
|
||
|
work_distance,
|
||
|
save_population_count,
|
||
|
update_population_count
|
||
|
FROM
|
||
|
kpi_community_boss_${level}_day_count
|
||
|
WHERE
|
||
|
user_id = #{userId}
|
||
|
AND
|
||
|
day_date = #{dayDate}
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|