Commit a75c4b37 by 徐高华

朋友圈

parent 8bea371c
...@@ -74,7 +74,5 @@ public interface GroupChatPlanOwnerLogMapper { ...@@ -74,7 +74,5 @@ public interface GroupChatPlanOwnerLogMapper {
int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ; int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
int getOverdueTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
int getTaskNum(@Param("enterpriseId")String enterpriseId, @Param("clerkId")String clerkId, @Param("storeId")String storeId, @Param("staffId")String staffId); int getTaskNum(@Param("enterpriseId")String enterpriseId, @Param("clerkId")String clerkId, @Param("storeId")String storeId, @Param("staffId")String staffId);
} }
\ No newline at end of file
...@@ -64,6 +64,4 @@ public interface QwMomentPlanAttendMapper { ...@@ -64,6 +64,4 @@ public interface QwMomentPlanAttendMapper {
int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ; int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
int getOverdueTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
} }
...@@ -954,15 +954,13 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -954,15 +954,13 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
logger.info("clerkId={}",total); logger.info("clerkId={}",total);
if(total > 0) { if(total > 0) {
int invalid = this.groupChatPlanOwnerLogMapper.getInvalidTask(enterpriseId,clerkId,date) ; int invalid = this.groupChatPlanOwnerLogMapper.getInvalidTask(enterpriseId,clerkId,date) ;
int overdue = this.groupChatPlanOwnerLogMapper.getOverdueTask(enterpriseId,clerkId,date) ; this.qywxGroupSendCanvasApiService.saveNoticeLog(enterpriseId,clerkId,total,0,invalid,"chat") ;
this.qywxGroupSendCanvasApiService.saveNoticeLog(enterpriseId,clerkId,total,overdue,invalid,"chat") ;
} }
// 朋友圈 // 朋友圈
int momentTotal = this.qwMomentPlanAttendMapper.getTotalTask(enterpriseId,clerkId,date) ; int momentTotal = this.qwMomentPlanAttendMapper.getTotalTask(enterpriseId,clerkId,date) ;
if(total > 0) { if(total > 0) {
int invalid = this.qwMomentPlanAttendMapper.getInvalidTask(enterpriseId,clerkId,date) ; int invalid = this.qwMomentPlanAttendMapper.getInvalidTask(enterpriseId,clerkId,date) ;
int overdue = this.qwMomentPlanAttendMapper.getOverdueTask(enterpriseId,clerkId,date) ; this.qywxGroupSendCanvasApiService.saveNoticeLog(enterpriseId,clerkId,momentTotal,0,invalid,"moment") ;
this.qywxGroupSendCanvasApiService.saveNoticeLog(enterpriseId,clerkId,momentTotal,overdue,invalid,"moment") ;
} }
} }
} }
......
...@@ -309,19 +309,13 @@ ...@@ -309,19 +309,13 @@
</select> </select>
<!-- 查询逾期任务数--> <!-- 查询失效任务数-->
<select id="getInvalidTask" resultType="int"> <select id="getInvalidTask" resultType="int">
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_time = #{time} where a.enterprise_id = #{enterpriseId} and b.end_time = #{time}
AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0 AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0
</select> </select>
<!-- 查询失效任务数-->
<select id="getOverdueTask" resultType="int">
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_time = now()
AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0
</select>
<select id="getTaskNum" resultType="java.lang.Integer"> <select id="getTaskNum" resultType="java.lang.Integer">
select count(1) from ( select count(1) from (
select a.plan_id from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id select a.plan_id from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
......
...@@ -180,21 +180,14 @@ ...@@ -180,21 +180,14 @@
<select id="getTotalTask" resultType="int"> <select id="getTotalTask" resultType="int">
select count(1) from tab_haoban_qw_moment_plan_attend a LEFT JOIN tab_haoban_qw_moment_plan b ON a.plan_id = b.plan_id select count(1) from tab_haoban_qw_moment_plan_attend a LEFT JOIN tab_haoban_qw_moment_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_date <![CDATA[ > ]]> now() where a.enterprise_id = #{enterpriseId} and b.end_date <![CDATA[ > ]]> now()
AND a.clerk_id = #{clerkId} AND a.task_status = 1 and a.delete_flag = 0 AND a.clerk_id = #{clerkId} AND a.task_status = 1 and a.delete_flag = 0 and b.status_flag = 1
</select> </select>
<!-- 查询逾期任务数--> <!-- 查询失效任务数-->
<select id="getInvalidTask" resultType="int"> <select id="getInvalidTask" resultType="int">
select count(1) from tab_haoban_qw_moment_plan_attend a LEFT JOIN tab_haoban_qw_moment_plan b ON a.plan_id = b.plan_id select count(1) from tab_haoban_qw_moment_plan_attend a LEFT JOIN tab_haoban_qw_moment_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_date = #{time} where a.enterprise_id = #{enterpriseId} and b.end_date = #{time}
AND a.clerk_id = #{clerkId} AND a.task_status = 1 and a.delete_flag = 0 AND a.clerk_id = #{clerkId} AND a.task_status = 1 and a.delete_flag = 0 and b.status_flag = 1
</select>
<!-- 查询失效任务数-->
<select id="getOverdueTask" resultType="int">
select count(1) from tab_haoban_qw_moment_plan_attend a LEFT JOIN tab_haoban_qw_moment_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_date = now()
AND a.clerk_id = #{clerkId} AND a.task_status = 1 and a.delete_flag = 0
</select> </select>
<update id="delClerks"> <update id="delClerks">
......
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
select plan_id from tab_haoban_qw_moment_plan where status_flag = 1 and begin_date <![CDATA[ < ]]> now() and end_date > now() and delete_flag = 0 select plan_id from tab_haoban_qw_moment_plan where status_flag = 1 and begin_date <![CDATA[ < ]]> now() and end_date > now() and delete_flag = 0
</if> </if>
<if test="type==2"> <if test="type==2">
select plan_id from tab_haoban_qw_moment_plan where status_flag = 1 and begin_date <![CDATA[ < ]]> now() and DATE_ADD(end_date , INTERVAL 3 DAY) > now() and delete_flag = 0 and done_num > 0 select plan_id from tab_haoban_qw_moment_plan where status_flag = 1 and begin_date <![CDATA[ < ]]> now() and end_date > DATE_ADD(now(), INTERVAL -3 DAY) and delete_flag = 0 and done_num > 0
</if> </if>
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment