|
@@ -218,7 +218,7 @@ func (this *CalendarController) Add() {
|
|
|
|
|
|
//模板消息通知
|
|
|
{
|
|
|
- go func(researcherId,tmpRsCalendarId,tmpRsCalendarResearcherId int) {
|
|
|
+ go func(researcherId, tmpRsCalendarId, tmpRsCalendarResearcherId int) {
|
|
|
var wxAppPath string
|
|
|
sysAdmin, _ := admin.GetAdminWxById(researcherId)
|
|
|
if sysAdmin != nil {
|
|
@@ -227,14 +227,15 @@ func (this *CalendarController) Add() {
|
|
|
first := "您收到一个新的【" + req.ActivityType + "】申请,请及时处理"
|
|
|
keyword1 := sysUser.RealName
|
|
|
keyword2 := "--"
|
|
|
- keyword3 := time.Now().Format(utils.FormatDateTime)
|
|
|
+ //keyword3 := time.Now().Format(utils.FormatDateTime)
|
|
|
startDateSub := v.StartDate[5:]
|
|
|
startDateSub = strings.Replace(startDateSub, "-", ".", -1)
|
|
|
+ keyword3 := startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5]
|
|
|
var keyword4 string
|
|
|
if req.ActivityType == "路演" {
|
|
|
- keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.CompanyName + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
+ keyword4 = req.CompanyName + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
} else {
|
|
|
- keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
+ keyword4 = req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
}
|
|
|
remark := "请尽快完成审批"
|
|
|
//wxAppPath := "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(int(rsCalendarId)) + "&RsCalendarResearcherId=" + strconv.Itoa(int(rsCalendarResearcherId))
|
|
@@ -246,14 +247,14 @@ func (this *CalendarController) Add() {
|
|
|
first := sysUser.RealName + "为你添加了一场【" + req.ActivityType + "】"
|
|
|
startDate := researcher.StartDate[5:]
|
|
|
startDate = strings.Replace(startDate, "-", ".", -1)
|
|
|
- keyword1 := "会议时间:" + startDate + "(" + researcher.StartWeek + ")" + " " + researcher.StartTime[:5] + "-" + researcher.EndTime[:5]
|
|
|
- keyword2 := "--"
|
|
|
+ keyword1 := startDate + "(" + researcher.StartWeek + ")" + " " + researcher.StartTime[:5] + "-" + researcher.EndTime[:5]
|
|
|
+ keyword2 := sysUser.RealName + "为你添加了【" + req.ActivityType + "】"
|
|
|
if sysAdmin.OpenId != "" {
|
|
|
go services.SendWxMsgWithRoadshowDeleteNotice(first, keyword1, keyword2, "", wxAppPath, sysAdmin.Mobile)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }(v.ResearcherId,int(rsCalendarId),int(rsCalendarResearcherId))
|
|
|
+ }(v.ResearcherId, int(rsCalendarId), int(rsCalendarResearcherId))
|
|
|
}
|
|
|
}
|
|
|
this.OkDetailed(nil, "保存成功")
|
|
@@ -1399,20 +1400,21 @@ func (this *CalendarController) Edit() {
|
|
|
|
|
|
if req.EditType == 2 {
|
|
|
//模板消息通知
|
|
|
- go func(researcherId,tmpRsCalendarId,tmpRsCalendarResearcherId int) {
|
|
|
+ go func(researcherId, tmpRsCalendarId, tmpRsCalendarResearcherId int) {
|
|
|
sysAdmin, _ := admin.GetAdminById(researcherId)
|
|
|
if sysAdmin != nil && req.ActivityType != "内部会议" && req.ActivityType != "报告电话会" {
|
|
|
first := "您收到一个新的【" + req.ActivityType + "】申请,请及时处理"
|
|
|
keyword1 := sysUser.RealName
|
|
|
keyword2 := "--"
|
|
|
- keyword3 := time.Now().Format(utils.FormatDateTime)
|
|
|
+ //keyword3 := time.Now().Format(utils.FormatDateTime)
|
|
|
startDateSub := v.StartDate[5:]
|
|
|
startDateSub = strings.Replace(startDateSub, "-", ".", -1)
|
|
|
+ keyword3 := startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5]
|
|
|
var keyword4 string
|
|
|
if req.ActivityType == "路演" {
|
|
|
- keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.CompanyName + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
+ keyword4 = req.CompanyName + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
} else {
|
|
|
- keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
+ keyword4 = req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
}
|
|
|
remark := "请尽快完成审批"
|
|
|
wxAppPath := "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(req.RsCalendarId) + "&RsCalendarResearcherId=" + strconv.Itoa(tmpRsCalendarResearcherId)
|
|
@@ -1420,7 +1422,7 @@ func (this *CalendarController) Edit() {
|
|
|
services.SendWxMsgWithRoadshowPending(first, keyword1, keyword2, keyword3, keyword4, remark, wxAppPath, sysAdmin.Mobile)
|
|
|
}
|
|
|
}
|
|
|
- }(v.ResearcherId,req.RsCalendarId,rsCalendarResearcherItem.RsCalendarResearcherId)
|
|
|
+ }(v.ResearcherId, req.RsCalendarId, rsCalendarResearcherItem.RsCalendarResearcherId)
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -1477,7 +1479,7 @@ func (this *CalendarController) Edit() {
|
|
|
researcher.RsCalendarResearcherId = int(rsCalendarResearcherId)
|
|
|
go rs.CalendarToSH(calendar, *researcher)
|
|
|
|
|
|
- go func(researcherId,tmpRsCalendarId,tmpRsCalendarResearcherId int) {
|
|
|
+ go func(researcherId, tmpRsCalendarId, tmpRsCalendarResearcherId int) {
|
|
|
sysAdmin, _ := admin.GetAdminById(researcherId)
|
|
|
if sysAdmin != nil && req.ActivityType != "内部会议" && req.ActivityType != "报告电话会" {
|
|
|
first := "您收到一个新的【" + req.ActivityType + "】申请,请及时处理"
|
|
@@ -1486,11 +1488,12 @@ func (this *CalendarController) Edit() {
|
|
|
keyword3 := time.Now().Format(utils.FormatDateTime)
|
|
|
startDateSub := v.StartDate[5:]
|
|
|
startDateSub = strings.Replace(startDateSub, "-", ".", -1)
|
|
|
+ //keyword3 := startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5]
|
|
|
var keyword4 string
|
|
|
if req.ActivityType == "路演" {
|
|
|
- keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.CompanyName + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
+ keyword4 = req.CompanyName + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
} else {
|
|
|
- keyword4 = startDateSub + "(" + v.StartWeek + ")" + " " + v.StartTime[:5] + "~" + v.EndTime[:5] + " ," + req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
+ keyword4 = req.Theme + "(" + req.RoadshowType + req.ActivityType + ")"
|
|
|
}
|
|
|
remark := "请尽快完成审批"
|
|
|
wxAppPath := "pages-approve/activity/detail?RsCalendarId=" + strconv.Itoa(tmpRsCalendarId) + "&RsCalendarResearcherId=" + strconv.Itoa(tmpRsCalendarResearcherId)
|
|
@@ -1499,7 +1502,7 @@ func (this *CalendarController) Edit() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }(v.ResearcherId,req.RsCalendarId,int(rsCalendarResearcherId))
|
|
|
+ }(v.ResearcherId, req.RsCalendarId, int(rsCalendarResearcherId))
|
|
|
}
|
|
|
}
|
|
|
this.OkDetailed(nil, "保存成功")
|
|
@@ -1717,7 +1720,7 @@ func (this *CalendarController) Delete() {
|
|
|
//模板消息通知
|
|
|
{
|
|
|
if rsCalendarItem != nil && rsCalendarResearcherItem != nil {
|
|
|
- go func(tmpRsCalendarItem roadshow.RsCalendar,tmpRsCalendarResearcherItem roadshow.RsCalendarResearcher) {
|
|
|
+ go func(tmpRsCalendarItem roadshow.RsCalendar, tmpRsCalendarResearcherItem roadshow.RsCalendarResearcher) {
|
|
|
sysAdmin, _ := admin.GetAdminById(tmpRsCalendarResearcherItem.ResearcherId)
|
|
|
var first string
|
|
|
var wxAppPath string
|
|
@@ -1727,6 +1730,7 @@ func (this *CalendarController) Delete() {
|
|
|
|
|
|
first = "【" + sysUser.RealName + "】删除了你的【" + tmpRsCalendarItem.ActivityType + "】安排"
|
|
|
|
|
|
+ keyword2 := "【" + sysUser.RealName + "】已删除(" + req.DeleteReason + ")"
|
|
|
var keyword1 string
|
|
|
if tmpRsCalendarItem.ActivityType == "路演" {
|
|
|
keyword1 = tmpRsCalendarItem.CompanyName + "," + tmpRsCalendarItem.RoadshowType + tmpRsCalendarItem.ActivityType
|
|
@@ -1736,14 +1740,15 @@ func (this *CalendarController) Delete() {
|
|
|
startDate := tmpRsCalendarResearcherItem.StartDate[5:]
|
|
|
startDate = strings.Replace(startDate, "-", ".", -1)
|
|
|
keyword1 = "会议时间:" + startDate + "(" + tmpRsCalendarResearcherItem.StartWeek + ")" + " " + tmpRsCalendarResearcherItem.StartTime[:5] + "-" + tmpRsCalendarResearcherItem.EndTime[:5]
|
|
|
+ keyword2 = "【" + sysUser.RealName + "】已删除" + "【" + tmpRsCalendarItem.ActivityType + ")"
|
|
|
}
|
|
|
- keyword2 := "已删除"
|
|
|
+ //keyword2 := "已删除"
|
|
|
remark := req.DeleteReason
|
|
|
|
|
|
if sysAdmin.OpenId != "" {
|
|
|
go services.SendWxMsgWithRoadshowDeleteNotice(first, keyword1, keyword2, remark, wxAppPath, sysAdmin.Mobile)
|
|
|
}
|
|
|
- }(*rsCalendarItem,*rsCalendarResearcherItem)
|
|
|
+ }(*rsCalendarItem, *rsCalendarResearcherItem)
|
|
|
}
|
|
|
}
|
|
|
}
|