|
|
@@ -5,6 +5,7 @@ import (
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/infochange"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/supplier"
|
|
|
"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
|
|
|
+ "dashoo.cn/backend/api/business/register"
|
|
|
"dashoo.cn/backend/api/business/todolist"
|
|
|
"dashoo.cn/backend/api/business/workflow"
|
|
|
. "dashoo.cn/backend/api/controllers"
|
|
|
@@ -31,13 +32,17 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
supplierName := this.GetString("SupplierName")
|
|
|
wfNames := ""
|
|
|
if stype == "1" {
|
|
|
- wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY
|
|
|
+ wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SUPPLIER_INSTORE
|
|
|
} else if stype == "2" {
|
|
|
wfNames = workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_FIRST_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_ENUSER_APPEND_APPLY
|
|
|
} else if stype == "3" {
|
|
|
wfNames = workflow.OIL_AUDIT_APPLY
|
|
|
} else if stype == "4" {
|
|
|
wfNames = workflow.OIL_INFO_CHANGE
|
|
|
+ } else if stype == "5" {
|
|
|
+ wfNames = workflow.OIL_REGISTER_APPLY
|
|
|
+ } else if stype == "6" {
|
|
|
+ wfNames = workflow.OIL_SUPPLIER_INSTORE
|
|
|
}
|
|
|
|
|
|
var todolists []todolist.TodoList
|
|
|
@@ -49,7 +54,6 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
pagingResult = actisvc.GetMyAllTypePagingTasksWithTime(this.User.Id, page.CurrentPage, page.Size, wfNames, supplierTypeCode, supplierName)
|
|
|
myTasksRetWithTimes = pagingResult.TaskList
|
|
|
|
|
|
- var todo todolist.TodoList
|
|
|
//取出各种类型的ID
|
|
|
for _,item := range myTasksRetWithTimes {
|
|
|
idx := strings.Index(item.BusinessKey, "-")
|
|
|
@@ -60,10 +64,11 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
//工作流名称
|
|
|
has := false
|
|
|
wfName := strings.Split(item.ProcessDefinitionId, ":")[0] //如:oil_enuser_supplier_apply:2:2543
|
|
|
- if wfName == workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY {
|
|
|
+ if wfName == workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SUPPLIER_INSTORE {
|
|
|
//准入
|
|
|
where := " 1=1 "
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
+ var todo todolist.TodoList
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
|
|
|
if has {
|
|
|
@@ -78,6 +83,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
//增项
|
|
|
where := " 1=1 "
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
+ var todo todolist.TodoList
|
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
has :=svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
|
|
|
if has {
|
|
|
@@ -89,6 +95,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
|
|
|
} else if wfName == workflow.OIL_AUDIT_APPLY {
|
|
|
//年审
|
|
|
+ var todo todolist.TodoList
|
|
|
var listannu annualaudit.OilAnnualAudit
|
|
|
svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
has = svc.GetEntityById(id, &listannu)
|
|
|
@@ -109,6 +116,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
|
|
|
} else if wfName == workflow.OIL_INFO_CHANGE {
|
|
|
//资质变更
|
|
|
+ var todo todolist.TodoList
|
|
|
var listInfo infochange.OilInfoChange
|
|
|
svc := infochange.GetInfoChangeService(utils.DBE)
|
|
|
has = svc.GetEntityById(id, &listInfo)
|
|
|
@@ -123,6 +131,22 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
todo.CreateTime = item.CreateTime
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
+ } else if wfName == workflow.OIL_REGISTER_APPLY {
|
|
|
+ //企业用户注册
|
|
|
+ var todo todolist.TodoList
|
|
|
+ regsvc := register.GetOilCorporateInfoService(utils.DBE)
|
|
|
+ var listinfo register.OilCorporateInfo
|
|
|
+ has = regsvc.GetEntityById(id, &listinfo)
|
|
|
+ if has {
|
|
|
+ todo.Id = listinfo.Id
|
|
|
+ todo.Type = todolist.REGISTER
|
|
|
+ todo.SupplierName = listinfo.SupplierName
|
|
|
+ todo.UserName = this.User.Realname
|
|
|
+ todo.TaskName = item.TaskName
|
|
|
+ todo.Status = strconv.Itoa(listinfo.CheckStatus)
|
|
|
+ todo.CreateTime = item.CreateTime
|
|
|
+ todolists = append(todolists, todo)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -136,31 +160,6 @@ func (this *TodoListController) GetMyTaskEntityList() {
|
|
|
datainfo.ItemsPerPage = page.Size
|
|
|
this.Data["json"] = &datainfo
|
|
|
this.ServeJSON()
|
|
|
-
|
|
|
-
|
|
|
- /*if stype == "6" || stype == "" {
|
|
|
- where := " CheckStatus=0 "
|
|
|
- if supplierName != "" {
|
|
|
- where = where + " and SupplierName like '%" + supplierName + "%' "
|
|
|
- }
|
|
|
-
|
|
|
- where = where + " and CheckUserId like '%" + this.User.Id + "%' "
|
|
|
-
|
|
|
- svc := register.GetOilCorporateInfoService(utils.DBE)
|
|
|
- var list []register.OilCorporateInfo
|
|
|
- _, list = svc.GetCompanyListByWhere(page.CurrentPage, page.Size, "Id desc", "OilCorporateInfo", where)
|
|
|
- var todo todolist.TodoList
|
|
|
- for _, item := range list {
|
|
|
- todo.Id = item.Id
|
|
|
- todo.Type = todolist.REGISTER
|
|
|
- todo.SupplierName = item.SupplierName
|
|
|
- todo.UserName = this.User.Realname
|
|
|
- todo.Status = strconv.Itoa(item.CheckStatus)
|
|
|
- todo.CreateTime = item.CreateOn.Unix() * 1000
|
|
|
- todolists = append(todolists, todo)
|
|
|
- }
|
|
|
- }*/
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// @Title 获取已办列表
|
|
|
@@ -176,13 +175,17 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
supplierName := this.GetString("SupplierName")
|
|
|
wfNames := ""
|
|
|
if stype == "1" {
|
|
|
- wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY
|
|
|
+ wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SUPPLIER_INSTORE
|
|
|
} else if stype == "2" {
|
|
|
wfNames = workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_FIRST_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_ENUSER_APPEND_APPLY
|
|
|
} else if stype == "3" {
|
|
|
wfNames = workflow.OIL_AUDIT_APPLY
|
|
|
} else if stype == "4" {
|
|
|
wfNames = workflow.OIL_INFO_CHANGE
|
|
|
+ } else if stype == "5" {
|
|
|
+ wfNames = workflow.OIL_REGISTER_APPLY
|
|
|
+ } else if stype == "6" {
|
|
|
+ wfNames = workflow.OIL_SUPPLIER_INSTORE
|
|
|
}
|
|
|
|
|
|
var todolists []todolist.TodoList
|
|
|
@@ -194,7 +197,6 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
pagingResult = actisvc.GetMyAllTypePagingFinishedTasksWithTime(this.User.Id, page.CurrentPage, page.Size, wfNames, supplierTypeCode, supplierName)
|
|
|
myTasksRetWithTimes = pagingResult.TaskList
|
|
|
|
|
|
- var todo todolist.TodoList
|
|
|
//取出各种类型的ID
|
|
|
for _,item := range myTasksRetWithTimes {
|
|
|
idx := strings.Index(item.BusinessKey, "-")
|
|
|
@@ -205,10 +207,11 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
//工作流名称
|
|
|
has := false
|
|
|
wfName := strings.Split(item.ProcessDefinitionId, ":")[0] //如:oil_enuser_supplier_apply:2:2543
|
|
|
- if wfName == workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY {
|
|
|
+ if wfName == workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY || wfName == workflow.OIL_SUPPLIER_INSTORE {
|
|
|
//准入
|
|
|
where := " 1=1 "
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
+ var todo todolist.TodoList
|
|
|
svc := supplier.GetOilSupplierService(utils.DBE)
|
|
|
has = svc.GetMyTodoEntitie(OilSupplierName, OilSupplierCertName, &todo, where)
|
|
|
if has {
|
|
|
@@ -223,6 +226,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
//增项
|
|
|
where := " 1=1 "
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
+ var todo todolist.TodoList
|
|
|
svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
|
|
|
has :=svcapp.GetTodoEntitie(OilSupplierName, OilSupplierCertAppendName, &todo, where)
|
|
|
if has {
|
|
|
@@ -236,6 +240,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
//年审
|
|
|
where := " 1=1 "
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
+ var todo todolist.TodoList
|
|
|
var listannu annualaudit.OilAnnualAudit
|
|
|
svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
|
|
|
has = svc.GetEntity(&listannu, where)
|
|
|
@@ -258,6 +263,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
//资质变更
|
|
|
where := " 1=1 "
|
|
|
where = where + " and b.Id = '" + id + "'"
|
|
|
+ var todo todolist.TodoList
|
|
|
var listInfo infochange.OilInfoChange
|
|
|
svc := infochange.GetInfoChangeService(utils.DBE)
|
|
|
has = svc.GetEntity(&listInfo, where)
|
|
|
@@ -272,6 +278,22 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
todo.CreateTime = item.CreateTime
|
|
|
todolists = append(todolists, todo)
|
|
|
}
|
|
|
+ } else if wfName == workflow.OIL_REGISTER_APPLY {
|
|
|
+ //企业用户注册
|
|
|
+ var todo todolist.TodoList
|
|
|
+ regsvc := register.GetOilCorporateInfoService(utils.DBE)
|
|
|
+ var listinfo register.OilCorporateInfo
|
|
|
+ has = regsvc.GetEntityById(id, &listinfo)
|
|
|
+ if has {
|
|
|
+ todo.Id = listinfo.Id
|
|
|
+ todo.Type = todolist.REGISTER
|
|
|
+ todo.SupplierName = listinfo.SupplierName
|
|
|
+ todo.UserName = this.User.Realname
|
|
|
+ todo.TaskName = item.TaskName
|
|
|
+ todo.Status = strconv.Itoa(listinfo.CheckStatus)
|
|
|
+ todo.CreateTime = item.CreateTime
|
|
|
+ todolists = append(todolists, todo)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|
|
|
@@ -286,29 +308,4 @@ func (this *TodoListController) GetMyTaskFinishedList() {
|
|
|
datainfo.ItemsPerPage = page.Size
|
|
|
this.Data["json"] = &datainfo
|
|
|
this.ServeJSON()
|
|
|
-
|
|
|
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
-
|
|
|
- /*if stype == "6" || stype == "" {
|
|
|
- where := " CheckStatus in (1,2) "
|
|
|
- if supplierName != "" {
|
|
|
- where = where + " and SupplierName like '%" + supplierName + "%' "
|
|
|
- }
|
|
|
-
|
|
|
- where = where + " and CheckUserId like '%" + this.User.Id + "%' "
|
|
|
-
|
|
|
- svc := register.GetOilCorporateInfoService(utils.DBE)
|
|
|
- var todo todolist.TodoList
|
|
|
- var list []register.OilCorporateInfo
|
|
|
- _, list = svc.GetCompanyListByWhere(page.CurrentPage, page.Size, "Id desc", "OilCorporateInfo", where)
|
|
|
- for _, item := range list {
|
|
|
- todo.Id = item.Id
|
|
|
- todo.Type = todolist.REGISTER
|
|
|
- todo.SupplierName = item.SupplierName
|
|
|
- todo.UserName = this.User.Realname
|
|
|
- todo.Status = strconv.Itoa(item.CheckStatus)
|
|
|
- todo.CreateTime = item.CreateOn.Unix() * 1000
|
|
|
- todolists = append(todolists, todo)
|
|
|
- }
|
|
|
- }*/
|
|
|
}
|