|
|
@@ -601,14 +601,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
// @Success 200 {object} []supplier.OilSupplierView
|
|
|
// @router /getToDoSend [get]
|
|
|
func (this *TodoListController) GetToDoSend() {
|
|
|
- page := this.GetPageInfoForm()
|
|
|
-
|
|
|
- supplierTypeCode := this.GetString("SupplierTypeCode")
|
|
|
- supplierName := this.GetString("SupplierName")
|
|
|
- wfNames := ""
|
|
|
-
|
|
|
var pagingResult workflow.ActiMyPagingResultVM
|
|
|
- var myTasksRetWithTimes []workflow.ActiMyTasksRetWithTimeVM
|
|
|
actisvc := workflow.GetActivitiService(utils.DBE)
|
|
|
svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
|
|
|
@@ -620,7 +613,9 @@ func (this *TodoListController) GetToDoSend() {
|
|
|
tempstr := ""
|
|
|
for _,setting := range settingList {
|
|
|
ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
|
|
|
- tempstr += "," + strings.Join(ids, ",")
|
|
|
+ if len(ids) > 0 {
|
|
|
+ tempstr += "," + strings.Join(ids, ",")
|
|
|
+ }
|
|
|
}
|
|
|
uids := strings.Replace(tempstr, "uid_", "", -1)
|
|
|
uids = strings.Trim(uids, ",")
|
|
|
@@ -628,20 +623,37 @@ func (this *TodoListController) GetToDoSend() {
|
|
|
where := "Id in (" + uids + ")"
|
|
|
usvc.GetEntities(&userList, where)
|
|
|
}
|
|
|
- for _,user := range userList {
|
|
|
- pagingResult = actisvc.GetMyAllTypePagingTasksWithTime(strconv.Itoa(user.Id), page.CurrentPage, page.Size, wfNames, supplierTypeCode, supplierName)
|
|
|
- myTasksRetWithTimes = pagingResult.TaskList
|
|
|
- if len(myTasksRetWithTimes) > 0 {
|
|
|
+
|
|
|
+ userString := ""
|
|
|
+ i := 0
|
|
|
+ for index,user := range userList {
|
|
|
+ pagingResult = actisvc.GetMyAllTypePagingTasksWithTime(strconv.Itoa(user.Id), 0, 0, "", "", "")
|
|
|
+ if pagingResult.Total > 0 {
|
|
|
+ i++
|
|
|
+ userString += "|" + user.Username
|
|
|
+ }
|
|
|
+ if i == 1000 || index == len(userList)-1{
|
|
|
+ i = 0
|
|
|
+ fmt.Println("港信通发送人"+strings.TrimLeft(userString, "|"))
|
|
|
+ if strings.TrimLeft(userString, "|") == "" {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ userString = ""
|
|
|
var sendVM todolist.SendVM
|
|
|
- //wordTempVM.Datas = datas
|
|
|
- //wordTempVM.TemplateUrl = templateUrl
|
|
|
- //wordTempVM.FileName = fileName
|
|
|
+ sendVM.Title = "市场管理信息系统"
|
|
|
+ sendVM.ToUser = strings.TrimLeft(userString, "|")
|
|
|
+ sendVM.ToDept = "0"
|
|
|
+ sendVM.Content = "您有未处理的待办任务,请及时审批"
|
|
|
+ sendVM.Secret = "20dGytG*xt@21mSg"
|
|
|
+ sendVM.AppKey = "scgl"
|
|
|
+ sendVM.PopDuration = "6"
|
|
|
+ sendVM.MsgType = "sysMsg"
|
|
|
jsonParam, err := json.Marshal(sendVM)
|
|
|
if err != nil {
|
|
|
fmt.Println(err, "生成json字符串错误")
|
|
|
}
|
|
|
params := string(jsonParam)
|
|
|
- svcActiviti.PostOrigin("/v1.0/send-sys-msg", params, "")
|
|
|
+ svcActiviti.PostToDu("/jcfw/duanxin/v1.0/send-sys-msg", params, "")
|
|
|
}
|
|
|
}
|
|
|
|