コード例 #1
0
    def notifyDayAction(self, data):
        teamname = data['value']['team']['name']
        team_day_detail_summary_time = data['value']['team']['day_detail_summary_time']
        subject = teamname +  "小组-日报提交提醒 " + get_year_month_day_str(s="/")

        users = data['users']

        for u in users:
            username = u[0]
            emaillist = [u[1]]
            lnk =  host_url +  "/edit/daydetail/" +  u[2]
            content = self.generate("day_notify.html", [teamname, team_day_detail_summary_time, username, lnk])
            self.emailQueue.put({"emails":emaillist, "msg":content, "subject":subject})
コード例 #2
0
 def summaryWeekAction(self, data):
     teamname = data['team']
     week_flag = data['now_flag'].split("-")
     tem_value = {
         "teamname":teamname,
         "week_flag": week_flag,
         "summary":data['value']
     }
     subject = teamname +  "小组-周报汇总 " + get_year_month_day_str(s="/")
     content = self.generate("week_summary.html", tem_value)
     emaillist = [u[1] for u in data['users']]
     _q = {"emails":emaillist, "msg":content, "subject":subject}
     self.emailQueue.put(_q)
コード例 #3
0
    def createWeekAction(self, data):
        teamname = data['value']['team']['name']
        team_week_detail_summary_time = data['value']['team']['week_detail_summary_time']
        team_week_detail_summary_time = [get_week_str_by_num(team_week_detail_summary_time.split('-')[0]), team_week_detail_summary_time.split('-')[1]]
        subject = teamname +  "小组-周报创建提醒 " + get_year_month_day_str(s="/")

        users = data['users']

        for u in users:
            username = u[0]
            emaillist = [u[1]]
            lnk =  host_url +  "/edit/weekdetail/" +  u[2]
            content = self.generate("week_create.html", [teamname, team_week_detail_summary_time, username, lnk])
            self.emailQueue.put({"emails":emaillist, "msg":content, "subject":subject})
コード例 #4
0
    def summaryDayAction(self, data):
        teamname = data['team']
        day_flag = [data['now_flag'].split('-')[0], data['now_flag'].split('-')[1], get_week_str_by_num(data['now_flag'].split('-')[2])]

        tem_value = {
            "teamname":teamname,
            "day_flag": day_flag,
            "summary":data['value']
        }
        subject = teamname +  "小组-日报汇总 " + get_year_month_day_str(s="/")
        content = self.generate("day_summary.html", tem_value)
        emaillist = [u[1] for u in data['users']]
        _q = {"emails":emaillist, "msg":content, "subject":subject}
        self.emailQueue.put(_q)
コード例 #5
0
    def taskTeamSummaryAction(self, data):
        subject = data['teamname'] + "小组-小组任务汇总通知" + get_year_month_day_str(s="/")
        html = self.generate("task_summary_team.html", data)

        _db_dict = {
            "teamID": data['teamID'],
            "teamname": data['teamname'],
            "html": html
        }
        idstr = connection.TaskTeamSummary.newHtml(_db_dict)

        lnk =  host_url +  "/show/task/teamsummary/" +  idstr

        data['url'] = lnk

        content = self.generate("task_summary_team_email.html", data)

        _q = {"emails":data['emails'], "msg":content, "subject":subject}
        self.emailQueue.put(_q)
コード例 #6
0
 def pubTaskAction(self, data): 
     subject = data['teamname'] + "小组-" + data['pubusername'] + "转派任务: " + data['name'] + " " + get_year_month_day_str(s="/")
     content = self.generate("task_pub.html", data)
     _q = {"emails":[data['email']], "msg":content, "subject":subject}
     self.emailQueue.put(_q)