|
@@ -26,7 +26,7 @@ type TodoListController struct {
|
|
|
// @router /gettodolist [get]
|
|
// @router /gettodolist [get]
|
|
|
func (this *TodoListController) GetMyTaskEntityList() {
|
|
func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
var todolists []todolist.TodoList
|
|
var todolists []todolist.TodoList
|
|
|
- var todo todolist.TodoList
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
page := this.GetPageInfoForm()
|
|
page := this.GetPageInfoForm()
|
|
|
where := " 1=1 "
|
|
where := " 1=1 "
|
|
@@ -55,36 +55,54 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
}
|
|
}
|
|
|
actisvc := workflow.GetActivitiService(utils.DBE)
|
|
actisvc := workflow.GetActivitiService(utils.DBE)
|
|
|
|
|
|
|
|
- //myTasksRetWithTimes := actisvc.GetMyTasksWithTime(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
- //fmt.Println(myTasksRetWithTimes)
|
|
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
|
|
+ var myTasksRetWithTimes []workflow.ActiMyTasksRetWithTimeVM
|
|
|
if stype == "1" || stype == "" {
|
|
if stype == "1" || stype == "" {
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
//找出待办任务===准入
|
|
//找出待办任务===准入
|
|
|
var certIdList string
|
|
var certIdList string
|
|
|
ids := actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
|
|
ids := actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
|
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ myTasksRetWithTimes = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
|
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
|
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
if len(strings.Trim(ids, ",")) > 0 {
|
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
certIdList += strings.Trim(ids, ",")+ ","
|
|
@@ -98,6 +116,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
certIdarr[i] = strings.Split(item, "-")[0]
|
|
certIdarr[i] = strings.Split(item, "-")[0]
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ fmt.Println(myTasksRetWithTimes)
|
|
|
certIdList = strings.Join(certIdarr, ",")
|
|
certIdList = strings.Join(certIdarr, ",")
|
|
|
var list []supplier.OilSupplierView
|
|
var list []supplier.OilSupplierView
|
|
|
if certIdList != "" {
|
|
if certIdList != "" {
|
|
@@ -111,9 +130,11 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.SupplierName = item.SupplierName
|
|
todo.SupplierName = item.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = item.CertId + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
if stype == "2" || stype == "" {
|
|
if stype == "2" || stype == "" {
|
|
|
//找出待办任务 -- 增项
|
|
//找出待办任务 -- 增项
|
|
@@ -121,31 +142,61 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
whereapp = whereapp + " and b.Status>0"
|
|
whereapp = whereapp + " and b.Status>0"
|
|
|
|
|
|
|
|
var appendIdList string
|
|
var appendIdList string
|
|
|
|
|
+
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids := actisvc.GetMyTasks(workflow.OIL_APPEND_APPLY, this.User.Id)
|
|
ids := actisvc.GetMyTasks(workflow.OIL_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = ids
|
|
appendIdList = ids
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_ENUSER_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
@@ -163,6 +214,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
appendIdList = strings.Trim(appendIdList, ",")
|
|
appendIdList = strings.Trim(appendIdList, ",")
|
|
|
var listapp []suppliercertappend.OilSupplierCertAppendTodo
|
|
var listapp []suppliercertappend.OilSupplierCertAppendTodo
|
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
if appendIdList != "" {
|
|
if appendIdList != "" {
|
|
|
whereapp += " and b.Id in (" + appendIdList + ")"
|
|
whereapp += " and b.Id in (" + appendIdList + ")"
|
|
|
svcapp.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &listapp, whereapp)
|
|
svcapp.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &listapp, whereapp)
|
|
@@ -173,6 +225,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.AppendType
|
|
todo.SupplierTypeCode = item.AppendType
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -183,6 +236,11 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
if supplierName != "" {
|
|
if supplierName != "" {
|
|
|
whereannu = whereannu + " and SupplierName like '%" + supplierName + "%'"
|
|
whereannu = whereannu + " and SupplierName like '%" + supplierName + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_AUDIT_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
var listannu []annualaudit.OilAnnualAudit
|
|
var listannu []annualaudit.OilAnnualAudit
|
|
|
annuIdList := actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
|
|
annuIdList := actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
|
|
|
annuIdarr := strings.Split(annuIdList, ",")
|
|
annuIdarr := strings.Split(annuIdList, ",")
|
|
@@ -199,6 +257,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
whereannu += " and Status > 0 "
|
|
whereannu += " and Status > 0 "
|
|
|
svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
|
|
svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
|
|
|
|
|
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
for _, item := range listannu {
|
|
for _, item := range listannu {
|
|
|
todo.Id = item.Id
|
|
todo.Id = item.Id
|
|
|
todo.SupplierId = strconv.Itoa(item.SupplierId)
|
|
todo.SupplierId = strconv.Itoa(item.SupplierId)
|
|
@@ -210,6 +269,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.WorkflowId = item.WorkflowId
|
|
todo.WorkflowId = item.WorkflowId
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
todo.CertId = strconv.Itoa(item.CerId)
|
|
todo.CertId = strconv.Itoa(item.CerId)
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.CerId) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -221,6 +281,10 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
if supplierName != "" {
|
|
if supplierName != "" {
|
|
|
whereInfo = where + " and SupplierName like '%" + supplierName + "%'"
|
|
whereInfo = where + " and SupplierName like '%" + supplierName + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_INFO_CHANGE, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
infoList := actisvc.GetMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
|
|
infoList := actisvc.GetMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
|
|
|
infoIdarr := strings.Split(infoList, ",")
|
|
infoIdarr := strings.Split(infoList, ",")
|
|
|
for i, item := range infoIdarr {
|
|
for i, item := range infoIdarr {
|
|
@@ -230,6 +294,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
infoList = strings.Join(infoIdarr, ",")
|
|
infoList = strings.Join(infoIdarr, ",")
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
if infoList != "" {
|
|
if infoList != "" {
|
|
|
whereInfo += " and Id in (" + infoList + ")"
|
|
whereInfo += " and Id in (" + infoList + ")"
|
|
|
svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
|
|
svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
|
|
@@ -241,12 +306,17 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.SupplierTypeName
|
|
todo.SupplierTypeCode = item.SupplierTypeName
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if stype == "5" || stype == "" {
|
|
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
|
|
var listqual []qualchange.OilQualChangeMain
|
|
|
qualList := actisvc.GetMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
qualList := actisvc.GetMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
qualIdarr := strings.Split(qualList, ",")
|
|
qualIdarr := strings.Split(qualList, ",")
|
|
@@ -266,6 +336,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
wherequal += " and Id in (" + qualList + ")"
|
|
wherequal += " and Id in (" + qualList + ")"
|
|
|
wherequal += " and Status > 0 "
|
|
wherequal += " and Status > 0 "
|
|
|
svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listqual, wherequal)
|
|
svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listqual, wherequal)
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
for _, item := range listqual {
|
|
for _, item := range listqual {
|
|
|
todo.Id = item.Id
|
|
todo.Id = item.Id
|
|
|
todo.CertId = strconv.Itoa(item.SupplierCertId)
|
|
todo.CertId = strconv.Itoa(item.SupplierCertId)
|
|
@@ -275,6 +346,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = "0"
|
|
todo.SupplierTypeCode = "0"
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -290,15 +362,35 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
svc := register.GetOilCorporateInfoService(utils.DBE)
|
|
svc := register.GetOilCorporateInfoService(utils.DBE)
|
|
|
var list []register.OilCorporateInfo
|
|
var list []register.OilCorporateInfo
|
|
|
_, list = svc.GetCompanyListByWhere(page.CurrentPage, page.Size, "Id desc", "OilCorporateInfo", where)
|
|
_, list = svc.GetCompanyListByWhere(page.CurrentPage, page.Size, "Id desc", "OilCorporateInfo", where)
|
|
|
|
|
+ var todo todolist.TodoList
|
|
|
for _, item := range list {
|
|
for _, item := range list {
|
|
|
todo.Id = item.Id
|
|
todo.Id = item.Id
|
|
|
todo.Type = todolist.REGISTER
|
|
todo.Type = todolist.REGISTER
|
|
|
todo.SupplierName = item.SupplierName
|
|
todo.SupplierName = item.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.Status = strconv.Itoa(item.CheckStatus)
|
|
todo.Status = strconv.Itoa(item.CheckStatus)
|
|
|
|
|
+ todo.CreateTime = item.CreateOn.Unix() * 1000
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ for i,todo := range todolists {
|
|
|
|
|
+ for _,myTasksRetWithTime := range myTasksRetWithTimes {
|
|
|
|
|
+ if todo.BusinessKey == myTasksRetWithTime.BusinessKey {
|
|
|
|
|
+ todolists[i].CreateTime = myTasksRetWithTime.CreateTime
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ num := len(todolists)
|
|
|
|
|
+ for i := 0; i < num; i++ {
|
|
|
|
|
+ for j := i + 1; j < num; j++ {
|
|
|
|
|
+ if todolists[i].CreateTime < todolists[j].CreateTime {
|
|
|
|
|
+ tmp := todolists[i]
|
|
|
|
|
+ todolists[i] = todolists[j]
|
|
|
|
|
+ todolists[j] = tmp
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
var datainfo DataInfo
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = todolists
|
|
datainfo.Items = todolists
|
|
|
this.Data["json"] = &datainfo
|
|
this.Data["json"] = &datainfo
|
|
@@ -342,34 +434,61 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
|
|
|
|
|
actisvc := workflow.GetActivitiService(utils.DBE)
|
|
actisvc := workflow.GetActivitiService(utils.DBE)
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
|
|
+ var myTasksRetWithTimes []workflow.ActiMyTasksRetWithTimeVM
|
|
|
if stype == "1" || stype == "" {
|
|
if stype == "1" || stype == "" {
|
|
|
//已办任务===准入
|
|
//已办任务===准入
|
|
|
var certIdList string
|
|
var certIdList string
|
|
|
|
|
+ myTasksRetWithTimes = actisvc.GetMyTasksWithTime(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
|
|
|
ids := actisvc.GetHistoryMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
|
|
ids := actisvc.GetHistoryMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
certIdList = ids
|
|
certIdList = ids
|
|
|
certIdList = certIdList + ","
|
|
certIdList = certIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
|
certIdList = certIdList + ","
|
|
certIdList = certIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
|
certIdList = certIdList + ","
|
|
certIdList = certIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
- certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetHistoryMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id))
|
|
|
|
|
|
|
+ certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
|
certIdList = certIdList + ","
|
|
certIdList = certIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
|
certIdList = certIdList + ","
|
|
certIdList = certIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
certIdList = fmt.Sprintf("%s %s", certIdList, ids)
|
|
@@ -396,6 +515,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.SupplierName = item.SupplierName
|
|
todo.SupplierName = item.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = item.CertId + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -406,22 +526,67 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
whereapp = whereapp + " and b.Status>0"
|
|
whereapp = whereapp + " and b.Status>0"
|
|
|
|
|
|
|
|
var appendIdList string
|
|
var appendIdList string
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids := actisvc.GetHistoryMyTasks(workflow.OIL_APPEND_APPLY, this.User.Id)
|
|
ids := actisvc.GetHistoryMyTasks(workflow.OIL_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = ids
|
|
appendIdList = ids
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_APPEND_APPLY, this.User.Id)
|
|
ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_APPEND_APPLY, this.User.Id)
|
|
|
if ids != "" {
|
|
if ids != "" {
|
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
appendIdList = appendIdList + ","
|
|
appendIdList = appendIdList + ","
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
|
|
+ ids = actisvc.GetHistoryMyTasks(workflow.OIL_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ if ids != "" {
|
|
|
|
|
+ appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
|
|
+ appendIdList = appendIdList + ","
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
|
|
+ ids = actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ if ids != "" {
|
|
|
|
|
+ appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
|
|
+ appendIdList = appendIdList + ","
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ arr = actisvc.GetMyTasksWithTime(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
|
|
+ ids = actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, this.User.Id)
|
|
|
|
|
+ if ids != "" {
|
|
|
|
|
+ appendIdList = fmt.Sprintf("%s %s", appendIdList, ids)
|
|
|
|
|
+ appendIdList = appendIdList + ","
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
appendIdarr := strings.Split(appendIdList, ",")
|
|
appendIdarr := strings.Split(appendIdList, ",")
|
|
|
for i, item := range appendIdarr {
|
|
for i, item := range appendIdarr {
|
|
|
idx := strings.Index(item, "-")
|
|
idx := strings.Index(item, "-")
|
|
@@ -442,6 +607,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.AppendType
|
|
todo.SupplierTypeCode = item.AppendType
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -453,6 +619,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
whereannu = whereannu + " and SupplierName like '%" + supplierName + "%'"
|
|
whereannu = whereannu + " and SupplierName like '%" + supplierName + "%'"
|
|
|
}
|
|
}
|
|
|
var listannu []annualaudit.OilAnnualAudit
|
|
var listannu []annualaudit.OilAnnualAudit
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_AUDIT_APPLY, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
annuIdList := actisvc.GetHistoryMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
|
|
annuIdList := actisvc.GetHistoryMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
|
|
|
annuIdarr := strings.Split(annuIdList, ",")
|
|
annuIdarr := strings.Split(annuIdList, ",")
|
|
|
for i, item := range annuIdarr {
|
|
for i, item := range annuIdarr {
|
|
@@ -479,6 +649,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.WorkflowId = item.WorkflowId
|
|
todo.WorkflowId = item.WorkflowId
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
todo.CertId = strconv.Itoa(item.CerId)
|
|
todo.CertId = strconv.Itoa(item.CerId)
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.CerId) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -490,6 +661,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
if supplierName != "" {
|
|
if supplierName != "" {
|
|
|
whereInfo = where + " and SupplierName like '%" + supplierName + "%'"
|
|
whereInfo = where + " and SupplierName like '%" + supplierName + "%'"
|
|
|
}
|
|
}
|
|
|
|
|
+ arr := actisvc.GetMyTasksWithTime(workflow.OIL_INFO_CHANGE, this.User.Id)
|
|
|
|
|
+ for _,s := range arr {
|
|
|
|
|
+ myTasksRetWithTimes = append(myTasksRetWithTimes, s)
|
|
|
|
|
+ }
|
|
|
infoList := actisvc.GetHistoryMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
|
|
infoList := actisvc.GetHistoryMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
|
|
|
infoIdarr := strings.Split(infoList, ",")
|
|
infoIdarr := strings.Split(infoList, ",")
|
|
|
for i, item := range infoIdarr {
|
|
for i, item := range infoIdarr {
|
|
@@ -509,6 +684,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = item.SupplierTypeName
|
|
todo.SupplierTypeCode = item.SupplierTypeName
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -516,6 +692,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
if stype == "5" || stype == "" {
|
|
if stype == "5" || stype == "" {
|
|
|
// 资质变更
|
|
// 资质变更
|
|
|
var listqual []qualchange.OilQualChangeMain
|
|
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)
|
|
qualList := actisvc.GetHistoryMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
|
|
|
qualIdarr := strings.Split(qualList, ",")
|
|
qualIdarr := strings.Split(qualList, ",")
|
|
|
for i, item := range qualIdarr {
|
|
for i, item := range qualIdarr {
|
|
@@ -543,6 +723,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.SupplierTypeCode = "0"
|
|
todo.SupplierTypeCode = "0"
|
|
|
todo.Status = item.Status
|
|
todo.Status = item.Status
|
|
|
|
|
+ todo.BusinessKey = strconv.Itoa(item.Id) + "-"+ strconv.Itoa(item.AuditIndex)
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -564,9 +745,27 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.SupplierName = item.SupplierName
|
|
todo.SupplierName = item.SupplierName
|
|
|
todo.UserName = this.User.Realname
|
|
todo.UserName = this.User.Realname
|
|
|
todo.Status = strconv.Itoa(item.CheckStatus)
|
|
todo.Status = strconv.Itoa(item.CheckStatus)
|
|
|
|
|
+ todo.CreateTime = item.CreateOn.Unix() * 1000
|
|
|
todolists = append(todolists, todo)
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ for i,todo := range todolists {
|
|
|
|
|
+ for _,myTasksRetWithTime := range myTasksRetWithTimes {
|
|
|
|
|
+ if todo.BusinessKey == myTasksRetWithTime.BusinessKey {
|
|
|
|
|
+ todolists[i].CreateTime = myTasksRetWithTime.CreateTime
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ num := len(todolists)
|
|
|
|
|
+ for i := 0; i < num; i++ {
|
|
|
|
|
+ for j := i + 1; j < num; j++ {
|
|
|
|
|
+ if todolists[i].CreateTime < todolists[j].CreateTime {
|
|
|
|
|
+ tmp := todolists[i]
|
|
|
|
|
+ todolists[i] = todolists[j]
|
|
|
|
|
+ todolists[j] = tmp
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
var datainfo DataInfo
|
|
var datainfo DataInfo
|
|
|
datainfo.Items = todolists
|
|
datainfo.Items = todolists
|
|
|
this.Data["json"] = &datainfo
|
|
this.Data["json"] = &datainfo
|