|
|
@@ -3,7 +3,6 @@ package oilsupplier
|
|
|
import (
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
|
- "dashoo.cn/backend/api/business/oilsupplier/qualchange"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplier"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
|
"dashoo.cn/backend/api/business/register"
|
|
|
@@ -134,7 +133,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.SupplierName = item.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
|
todo.Status = item.Status
|
|
|
- todo.BusinessKey = item.CertId + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
@@ -229,7 +228,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.AppendType
|
|
|
todo.Status = item.Status
|
|
|
- todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
@@ -273,7 +272,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.WorkflowId = item.WorkflowId
|
|
|
todo.Status = item.Status
|
|
|
todo.CertId = strconv.Itoa(item.CerId)
|
|
|
- todo.BusinessKey = strconv.Itoa(item.CerId) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
@@ -310,51 +309,51 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.SupplierTypeName
|
|
|
todo.Status = item.Status
|
|
|
- todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
- todolists = append(todolists, todo)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if stype == "5" || stype == "" {
|
|
|
- // 资质变更
|
|
|
- arr := actisvc.GetMyTasksWithTime(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
- for _,s := range arr {
|
|
|
- myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
- }
|
|
|
- var listqual []qualchange.OilQualChangeMain
|
|
|
- qualList := actisvc.GetMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
- qualIdarr := strings.Split(qualList, ",")
|
|
|
- for i, item := range qualIdarr {
|
|
|
- idx := strings.Index(item, "-")
|
|
|
- if idx >= 0 {
|
|
|
- qualIdarr[i] = strings.Split(item, "-")[0]
|
|
|
- }
|
|
|
- }
|
|
|
- qualList = strings.Join(qualIdarr, ",")
|
|
|
- wherequal := "1=1 "
|
|
|
-
|
|
|
- if supplierName != "" {
|
|
|
- wherequal = wherequal + " and SupplierName like '%" + supplierName + "%'"
|
|
|
- }
|
|
|
- if qualList != "" {
|
|
|
- wherequal += " and Id in (" + qualList + ")"
|
|
|
- wherequal += " and Status > 0 "
|
|
|
- svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listqual, wherequal)
|
|
|
- var todo todolist.TodoList
|
|
|
- for _, item := range listqual {
|
|
|
- todo.Id = item.Id
|
|
|
- todo.CertId = strconv.Itoa(item.SupplierCertId)
|
|
|
- todo.SupplierId = strconv.Itoa(item.SupplierId)
|
|
|
- todo.Type = todolist.QUALCHANGE
|
|
|
- todo.SupplierName = item.SupplierName
|
|
|
- todo.UserName = this.User.Realname
|
|
|
- todo.SupplierTypeCode = "0"
|
|
|
- todo.Status = item.Status
|
|
|
- todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey//strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //if stype == "5" || stype == "" {
|
|
|
+ // // 资质变更
|
|
|
+ // arr := actisvc.GetMyTasksWithTime(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
+ // for _,s := range arr {
|
|
|
+ // myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
+ // }
|
|
|
+ // var listqual []qualchange.OilQualChangeMain
|
|
|
+ // qualList := actisvc.GetMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
+ // qualIdarr := strings.Split(qualList, ",")
|
|
|
+ // for i, item := range qualIdarr {
|
|
|
+ // idx := strings.Index(item, "-")
|
|
|
+ // if idx >= 0 {
|
|
|
+ // qualIdarr[i] = strings.Split(item, "-")[0]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // qualList = strings.Join(qualIdarr, ",")
|
|
|
+ // wherequal := "1=1 "
|
|
|
+ //
|
|
|
+ // if supplierName != "" {
|
|
|
+ // wherequal = wherequal + " and SupplierName like '%" + supplierName + "%'"
|
|
|
+ // }
|
|
|
+ // if qualList != "" {
|
|
|
+ // wherequal += " and Id in (" + qualList + ")"
|
|
|
+ // wherequal += " and Status > 0 "
|
|
|
+ // svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listqual, wherequal)
|
|
|
+ // var todo todolist.TodoList
|
|
|
+ // for _, item := range listqual {
|
|
|
+ // todo.Id = item.Id
|
|
|
+ // todo.CertId = strconv.Itoa(item.SupplierCertId)
|
|
|
+ // todo.SupplierId = strconv.Itoa(item.SupplierId)
|
|
|
+ // todo.Type = todolist.QUALCHANGE
|
|
|
+ // todo.SupplierName = item.SupplierName
|
|
|
+ // todo.UserName = this.User.Realname
|
|
|
+ // todo.SupplierTypeCode = "0"
|
|
|
+ // todo.Status = item.Status
|
|
|
+ // todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ // todolists = append(todolists, todo)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
if stype == "6" || stype == "" {
|
|
|
where := " CheckStatus=0 "
|
|
|
if supplierName != "" {
|
|
|
@@ -519,7 +518,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.SupplierName = item.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
|
todo.Status = item.Status
|
|
|
- todo.BusinessKey = item.CertId + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
@@ -612,7 +611,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.AppendType
|
|
|
todo.Status = item.Status
|
|
|
- todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
@@ -654,7 +653,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.WorkflowId = item.WorkflowId
|
|
|
todo.Status = item.Status
|
|
|
todo.CertId = strconv.Itoa(item.CerId)
|
|
|
- todo.BusinessKey = strconv.Itoa(item.CerId) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
@@ -689,50 +688,50 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.SupplierTypeName
|
|
|
todo.Status = item.Status
|
|
|
- todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
- todolists = append(todolists, todo)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if stype == "5" || stype == "" {
|
|
|
- // 资质变更
|
|
|
- var listqual []qualchange.OilQualChangeMain
|
|
|
- arr := actisvc.GetMyTasksWithTime(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
- for _,s := range arr {
|
|
|
- myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
- }
|
|
|
- qualList := actisvc.GetHistoryMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
- qualIdarr := strings.Split(qualList, ",")
|
|
|
- for i, item := range qualIdarr {
|
|
|
- idx := strings.Index(item, "-")
|
|
|
- if idx >= 0 {
|
|
|
- qualIdarr[i] = strings.Split(item, "-")[0]
|
|
|
- }
|
|
|
- }
|
|
|
- qualList = strings.Join(qualIdarr, ",")
|
|
|
- wherequal := "1=1 "
|
|
|
-
|
|
|
- if supplierName != "" {
|
|
|
- wherequal = wherequal + " and SupplierName like '%" + supplierName + "%'"
|
|
|
- }
|
|
|
- if qualList != "" {
|
|
|
- wherequal += " and Id in (" + qualList + ")"
|
|
|
- wherequal += " and Status != -2 "
|
|
|
- svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listqual, wherequal)
|
|
|
- for _, item := range listqual {
|
|
|
- todo.Id = item.Id
|
|
|
- todo.CertId = strconv.Itoa(item.SupplierCertId)
|
|
|
- todo.SupplierId = strconv.Itoa(item.SupplierId)
|
|
|
- todo.Type = todolist.QUALCHANGE
|
|
|
- todo.SupplierName = item.SupplierName
|
|
|
- todo.UserName = this.User.Realname
|
|
|
- todo.SupplierTypeCode = "0"
|
|
|
- todo.Status = item.Status
|
|
|
- todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ todo.BusinessKey = item.BusinessKey
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //if stype == "5" || stype == "" {
|
|
|
+ // // 资质变更
|
|
|
+ // var listqual []qualchange.OilQualChangeMain
|
|
|
+ // arr := actisvc.GetMyTasksWithTime(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
+ // for _,s := range arr {
|
|
|
+ // myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
+ // }
|
|
|
+ // qualList := actisvc.GetHistoryMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
+ // qualIdarr := strings.Split(qualList, ",")
|
|
|
+ // for i, item := range qualIdarr {
|
|
|
+ // idx := strings.Index(item, "-")
|
|
|
+ // if idx >= 0 {
|
|
|
+ // qualIdarr[i] = strings.Split(item, "-")[0]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // qualList = strings.Join(qualIdarr, ",")
|
|
|
+ // wherequal := "1=1 "
|
|
|
+ //
|
|
|
+ // if supplierName != "" {
|
|
|
+ // wherequal = wherequal + " and SupplierName like '%" + supplierName + "%'"
|
|
|
+ // }
|
|
|
+ // if qualList != "" {
|
|
|
+ // wherequal += " and Id in (" + qualList + ")"
|
|
|
+ // wherequal += " and Status != -2 "
|
|
|
+ // svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listqual, wherequal)
|
|
|
+ // for _, item := range listqual {
|
|
|
+ // todo.Id = item.Id
|
|
|
+ // todo.CertId = strconv.Itoa(item.SupplierCertId)
|
|
|
+ // todo.SupplierId = strconv.Itoa(item.SupplierId)
|
|
|
+ // todo.Type = todolist.QUALCHANGE
|
|
|
+ // todo.SupplierName = item.SupplierName
|
|
|
+ // todo.UserName = this.User.Realname
|
|
|
+ // todo.SupplierTypeCode = "0"
|
|
|
+ // todo.Status = item.Status
|
|
|
+ // todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
+ // todolists = append(todolists, todo)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ //}
|
|
|
if stype == "6" || stype == "" {
|
|
|
where := " CheckStatus in (1,2) "
|
|
|
if supplierName != "" {
|