Commit bbb67f66 by 徐高华

朋友圈

parent a76035c7
......@@ -58,5 +58,10 @@ public interface QwMomentPlanAttendMapper {
CountBO getQwCount(@Param("planId")Long planId);
int getTotalTask(String enterpriseId, String clerkId, Date date);
int getTotalTask(@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 ) ;
}
......@@ -957,9 +957,13 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
int overdue = this.groupChatPlanOwnerLogMapper.getOverdueTask(enterpriseId,clerkId,date) ;
this.qywxGroupSendCanvasApiService.saveNoticeLog(enterpriseId,clerkId,total,overdue,invalid,"chat") ;
}
// 朋友圈
int momentTotal = this.qwMomentPlanAttendMapper.getTotalTask(enterpriseId,clerkId,date) ;
if(total > 0) {
int invalid = this.qwMomentPlanAttendMapper.getInvalidTask(enterpriseId,clerkId,date) ;
int overdue = this.qwMomentPlanAttendMapper.getOverdueTask(enterpriseId,clerkId,date) ;
this.qywxGroupSendCanvasApiService.saveNoticeLog(enterpriseId,clerkId,momentTotal,overdue,invalid,"moment") ;
}
}
}
}
......
......@@ -179,6 +179,20 @@
AND a.clerk_id = #{clerkId} AND a.task_status = 1 and a.delete_flag = 0
</select>
<!-- 查询逾期任务数-->
<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
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
</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>
<update id="delClerks">
update tab_haoban_qw_moment_plan_attend set delete_flag = 1 , update_time=now() where plan_id = #{planId}
......
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