2
3
lining 6 rokov pred
rodič
commit
a511b86419

+ 12 - 1
src/dashoo.cn/backend/api/business/todolist/todolist.go

@@ -6,8 +6,19 @@ type TodoList struct {
 	CertId           string `xorm:"VARCHAR(30)"`
 	QualId           string `xorm:"VARCHAR(30)"`
 	SupplierTypeCode string `xorm:"VARCHAR(30)"`
-	Type             string `xorm:"VARCHAR(10)"`
+	Type             string `xorm:"VARCHAR(10)"` // 1 准入 2 增项 3 年审 4 信息变更 5 资质变更
 	SupplierName     string `xorm:"VARCHAR(50)"`
 	UserName         string `xorm:"VARCHAR(50)"`
 	Status           string `xorm:"VARCHAR(50)"`
+	WorkflowId       string `xorm:"VARCHAR(50)"`
+	AnnualId         string `xorm:"VARCHAR(50)"`
+	Step             string `xorm:"VARCHAR(50)"`
 }
+
+const (
+	SUPPLIER    string = "1" // 准入
+	CERTAPPEND  string = "2" // 增项
+	ANNUALAUDIT string = "3" // 年审
+	INFOCHANGE  string = "4" // 信息变更
+	QUALCHANGE  string = "5" // 资质变更
+)

+ 8 - 5
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -180,12 +180,15 @@ func (this *AnnualAuditController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(annuIdarr, ",")
-	where += " and Id in (" + certIdList + ")"
-	//根据部门查询待办任务
-	where += " and Status != 2 "
-	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
-	//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var total int64 = 0
+	if (certIdList != "") {
+		where += " and Id in (" + certIdList + ")"
+		//根据部门查询待办任务
+		where += " and Status != 2 "
+		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+		//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
 
+	}
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total

+ 6 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -481,11 +481,14 @@ func (this *InfoChangeController) GetEntityList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
-	where += " and Id in (" + certIdList + ")"
-
 	svc := infochange.GetInfoChangeService(utils.DBE)
 	var list []infochange.OilInfoChange
-	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var total int64 = 0
+	if (certIdList != "") {
+		where += " and Id in (" + certIdList + ")"
+		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	}
+
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total

+ 5 - 4
src/dashoo.cn/backend/api/controllers/oilsupplier/qualchange.go

@@ -160,14 +160,15 @@ func (this *QualChangeController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
+	svc := qualchange.GetQualChangeService(utils.DBE)
+	var list []qualchange.OilQualChangeMain
+	var total int64 = 0
 	if certIdList != "" {
 		where += " and Id in (" + certIdList + ")"
+		where += " and Status != -2 "
+		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
 	}
-	where += " and Status != -2 "
 
-	svc := qualchange.GetQualChangeService(utils.DBE)
-	var list []qualchange.OilQualChangeMain
-	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total

+ 7 - 5
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1322,13 +1322,15 @@ func (this *OilSupplierController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(certIdarr, ",")
-	where += " and b.Id in (" + certIdList + ")"
-	//根据部门查询待办任务
-
-	svc := supplier.GetOilSupplierService(utils.DBE)
 	var list []supplier.OilSupplierView
+	svc := supplier.GetOilSupplierService(utils.DBE)
+	var total int64 = 0
+	if (certIdList != "") {
+		where += " and b.Id in (" + certIdList + ")"
+		total = svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
 
-	total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	}
+	//根据部门查询待办任务
 
 	var datainfo DataInfo
 	datainfo.Items = list

+ 7 - 6
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -405,13 +405,14 @@ func (this *OilSupplierCertAppendController) GetMyTaskEntityList() {
 		}
 	}
 	appendIdList = strings.Join(appendIdarr, ",")
-	where += " and Id in (" + appendIdList + ")"
-	//根据部门查询待办任务
-
-	svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
 	var list []suppliercertappend.OilSupplierCertAppend
-
-	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var total int64 = 0
+	if (appendIdList != "") {
+		where += " and Id in (" + appendIdList + ")"
+		svc := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
+		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	}
+	//根据部门查询待办任务
 
 	var datainfo DataInfo
 	datainfo.Items = list

+ 211 - 203
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -19,7 +19,6 @@ type TodoListController struct {
 	BaseController
 }
 
-
 // @Title 获取列表
 // @Description get user by token
 // @Success 200 {object} []supplier.OilSupplierView
@@ -58,19 +57,31 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		where = where + " and a.SupplierName like '%" + supplierName + "%'"
 	}
 
-	//找出待办任务
+	//找出待办任务===准入
 	actisvc := workflow.GetActivitiService(utils.DBE)
 	var certIdList string
-	if actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id) != ""{
+	if actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id) != "" {
 		certIdList = actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
 		certIdList = certIdList + ","
 	}
-	if actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id) != ""{
-		certIdList = fmt.Sprintf("%s %s",certIdList,actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id))
+	if actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id))
 		certIdList = certIdList + ","
 	}
-	if actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id) != ""{
-		certIdList = fmt.Sprintf("%s %s",certIdList,actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id))
+	if actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id))
 	}
 	certIdList = strings.Trim(certIdList, ",")
 	certIdarr := strings.Split(certIdList, ",")
@@ -81,25 +92,20 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(certIdarr, ",")
-	if certIdList != "" {
-		where += " and b.Id in (" + certIdList + ")"
-	}
-
-	//根据部门查询待办任务
-
 	svc := supplier.GetOilSupplierService(utils.DBE)
 	var list []supplier.OilSupplierView
-	//svc.GetEntities(&list, where)
-	svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
-
-	for _, item :=range list {
-		todo.Id = item.Id
-		todo.CertId = item.CertId
-		todo.SupplierTypeCode = item.SupplierTypeCode
-		todo.Type = "1"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todolists = append(todolists, todo)
+	if certIdList != "" {
+		where += " and b.Id in (" + certIdList + ")"
+		svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+		for _, item := range list {
+			todo.Id = item.Id
+			todo.CertId = item.CertId
+			todo.SupplierTypeCode = item.SupplierTypeCode
+			todo.Type = todolist.SUPPLIER
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todolists = append(todolists, todo)
+		}
 	}
 
 	//找出待办任务 -- 增项
@@ -108,111 +114,112 @@ func (this *TodoListController) GetMyTaskEntityList() {
 	appendIdList := actisvc.GetMyTasks(workflow.OIL_APPEND_APPLY, this.User.Id)
 	appendIdarr := strings.Split(appendIdList, ",")
 	for i, item := range appendIdarr {
-		idx := strings.Index(item,"-")
-		if (idx >= 0 ) {
+		idx := strings.Index(item, "-")
+		if (idx >= 0) {
 			appendIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
 	appendIdList = strings.Join(appendIdarr, ",")
-	if appendIdList != "" {
-		whereapp += " and b.Id in (" + appendIdList + ")"
-	}
-
-
 	var listapp []suppliercertappend.OilSupplierCertAppendTodo
 	svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-	svcapp.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &listapp, whereapp)
-
-	for _, item :=range listapp {
-		todo.Id = item.Id
-		todo.Type = "2"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = item.AppendType
-		todolists = append(todolists, todo)
+	if appendIdList != "" {
+		whereapp += " and b.Id in (" + appendIdList + ")"
+		svcapp.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &listapp, whereapp)
+		for _, item := range listapp {
+			todo.Id = item.Id
+			todo.Type = todolist.CERTAPPEND
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = item.AppendType
+			todolists = append(todolists, todo)
+		}
 	}
 
 	//  待办--年审
 	whereannu := "1=1"
 	var listannu []annualaudit.OilAnnualAudit
-	certIdList = actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
-	annuIdarr := strings.Split(certIdList, ",")
+	annuIdList := actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
+	annuIdarr := strings.Split(annuIdList, ",")
 	for i, item := range annuIdarr {
 		idx := strings.Index(item, "-")
 		if idx >= 0 {
 			annuIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
-	certIdList = strings.Join(annuIdarr, ",")
-	if certIdList != "" {
-		whereannu += " and Id in (" + certIdList + ")"
-	}
-	//根据部门查询待办任务
-	whereannu += " and Status != 2 "
-	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
-
-	for _, item :=range listannu {
-		todo.Id = item.Id
-		todo.Type = "3"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = item.SupplierTypeName
-		todolists = append(todolists, todo)
+	annuIdList = strings.Join(annuIdarr, ",")
+	if annuIdList != "" {
+		whereannu += " and Id in (" + annuIdList + ")"
+		//根据部门查询待办任务
+		whereannu += " and Status != 2 "
+		svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
+
+		for _, item := range listannu {
+			todo.Id = item.Id
+			todo.SupplierId = strconv.Itoa(item.SupplierId)
+			todo.Type = todolist.ANNUALAUDIT
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = item.SupplierTypeName
+			todo.Step = strconv.Itoa(item.Step)
+			todo.WorkflowId = item.WorkflowId
+			todo.Status = item.Status
+			todo.CertId = strconv.Itoa(item.CerId)
+			todolists = append(todolists, todo)
+		}
 	}
 
-	// 信息变更
+	// 待办 ----- 信息变更
+	var listInfo []infochange.OilInfoChange
 	whereInfo := "1=1"
-	certIdList = actisvc.GetMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
-	appendIdarr = strings.Split(certIdList, ",")
-	for i, item := range appendIdarr {
-		idx := strings.Index(item,"-")
-		if (idx >= 0 ) {
-			appendIdarr[i] = strings.Split(item, "-")[0]
+	infoList := actisvc.GetMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
+	infoIdarr := strings.Split(infoList, ",")
+	for i, item := range infoIdarr {
+		idx := strings.Index(item, "-")
+		if (idx >= 0) {
+			infoIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
-	certIdList = strings.Join(appendIdarr, ",")
-	if certIdList != "" {
-		whereInfo += " and Id in (" + certIdList + ")"
-	}
-	var listInfo []infochange.OilInfoChange
-	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
-	for _, item :=range listInfo {
-		todo.Id = item.Id
-		todo.Type = "4"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = item.SupplierTypeName
-		todo.Status = item.Status
-		todolists = append(todolists, todo)
+	infoList = strings.Join(infoIdarr, ",")
+	if infoList != "" {
+		whereInfo += " and Id in (" + infoList + ")"
+		svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
+		for _, item := range listInfo {
+			todo.Id = item.Id
+			todo.Type = todolist.INFOCHANGE
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = item.SupplierTypeName
+			todo.Status = item.Status
+			todolists = append(todolists, todo)
+		}
 	}
 
 	// 资质变更
-	certIdList = actisvc.GetMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
-	appendIdarr = strings.Split(certIdList, ",")
-	for i, item := range appendIdarr {
+	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 {
-			appendIdarr[i] = strings.Split(item, "-")[0]
+			qualIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
-	certIdList = strings.Join(appendIdarr, ",")
+	qualList = strings.Join(qualIdarr, ",")
 	wherequal := "1=1 "
-	if certIdList != "" {
-		wherequal += " and Id in (" + certIdList + ")"
-	}
-	wherequal += " and Status != -2 "
-
-	var listqual []qualchange.OilQualChangeMain
-	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 = "5"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = "0"
-		todolists = append(todolists, todo)
+	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"
+			todolists = append(todolists, todo)
+		}
 	}
 
 	var datainfo DataInfo
@@ -260,19 +267,31 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		where = where + " and a.SupplierName like '%" + supplierName + "%'"
 	}
 
-	//找出已办任务
+	//已办列表===准入
 	actisvc := workflow.GetActivitiService(utils.DBE)
 	var certIdList string
-	if actisvc.GetHistoryMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id) != ""{
+	if actisvc.GetHistoryMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id) != "" {
 		certIdList = actisvc.GetHistoryMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
 		certIdList = certIdList + ","
 	}
-	if actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id) != ""{
-		certIdList = fmt.Sprintf("%s %s",certIdList,actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id))
+	if actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_SUPPLIER_APPLY, this.User.Id))
 		certIdList = certIdList + ","
 	}
-	if actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id) != ""{
-		certIdList = fmt.Sprintf("%s %s",certIdList,actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id))
+	if actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetHistoryMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetHistoryMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetHistoryMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetHistoryMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id))
 	}
 	certIdList = strings.Trim(certIdList, ",")
 	certIdarr := strings.Split(certIdList, ",")
@@ -283,144 +302,133 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		}
 	}
 	certIdList = strings.Join(certIdarr, ",")
-	if certIdList != "" {
-		where += " and b.Id in (" + certIdList + ")"
-	}
-
-	//根据部门查询待办任务
-
 	svc := supplier.GetOilSupplierService(utils.DBE)
 	var list []supplier.OilSupplierView
-	//svc.GetEntities(&list, where)
-	svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
-
-	for _, item :=range list {
-		todo.Id = item.Id
-		todo.CertId = item.CertId
-		todo.SupplierTypeCode = item.SupplierTypeCode
-		todo.Type = "1"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todolists = append(todolists, todo)
+	if certIdList != "" {
+		where += " and b.Id in (" + certIdList + ")"
+		svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+		for _, item := range list {
+			todo.Id = item.Id
+			todo.CertId = item.CertId
+			todo.SupplierTypeCode = item.SupplierTypeCode
+			todo.Type = "1"
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todolists = append(todolists, todo)
+		}
 	}
 
-	//找出待办任务 -- 增项
+	//已办列表 -- 增项
 	whereapp := "1=1"
 	whereapp = whereapp + " and b.Status>0"
 	appendIdList := actisvc.GetHistoryMyTasks(workflow.OIL_APPEND_APPLY, this.User.Id)
 	appendIdarr := strings.Split(appendIdList, ",")
 	for i, item := range appendIdarr {
-		idx := strings.Index(item,"-")
-		if (idx >= 0 ) {
+		idx := strings.Index(item, "-")
+		if (idx >= 0) {
 			appendIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
 	appendIdList = strings.Join(appendIdarr, ",")
-	if appendIdList != "" {
-		whereapp += " and b.Id in (" + appendIdList + ")"
-	}
-
-
 	var listapp []suppliercertappend.OilSupplierCertAppendTodo
 	svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-	svcapp.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &listapp, whereapp)
-
-	for _, item :=range listapp {
-		todo.Id = item.Id
-		todo.Type = "2"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = item.AppendType
-		todolists = append(todolists, todo)
+	if appendIdList != "" {
+		whereapp += " and b.Id in (" + appendIdList + ")"
+		svcapp.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertAppendName, page.CurrentPage, page.Size, orderby, asc, &listapp, whereapp)
+		for _, item := range listapp {
+			todo.Id = item.Id
+			todo.Type = "2"
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = item.AppendType
+			todolists = append(todolists, todo)
+		}
 	}
 
-	//  待办--年审
+	// 已办列表--年审
 	whereannu := "1=1"
 	var listannu []annualaudit.OilAnnualAudit
-	certIdList = actisvc.GetHistoryMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
-	annuIdarr := strings.Split(certIdList, ",")
+	annuIdList := actisvc.GetHistoryMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
+	annuIdarr := strings.Split(annuIdList, ",")
 	for i, item := range annuIdarr {
 		idx := strings.Index(item, "-")
 		if idx >= 0 {
 			annuIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
-	certIdList = strings.Join(annuIdarr, ",")
-	if certIdList != "" {
-		whereannu += " and Id in (" + certIdList + ")"
-	}
-
-	//根据部门查询待办任务
-	whereannu += " and Status != 2 "
-	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
-
-	for _, item :=range listannu {
-		todo.Id = item.Id
-		todo.Type = "3"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = item.SupplierTypeName
-		todolists = append(todolists, todo)
+	annuIdList = strings.Join(annuIdarr, ",")
+	if annuIdList != "" {
+		whereannu += " and Id in (" + annuIdList + ")"
+		//根据部门查询待办任务
+		whereannu += " and Status != 2 "
+		svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
+
+		for _, item := range listannu {
+			todo.Id = item.Id
+			todo.Type = "3"
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = item.SupplierTypeName
+			todolists = append(todolists, todo)
+		}
 	}
 
-	// 信息变更
+	// 已办列表 -- 信息变更
+	var listInfo []infochange.OilInfoChange
 	whereInfo := "1=1"
-	certIdList = actisvc.GetHistoryMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
-	appendIdarr = strings.Split(certIdList, ",")
-	for i, item := range appendIdarr {
-		idx := strings.Index(item,"-")
-		if (idx >= 0 ) {
-			appendIdarr[i] = strings.Split(item, "-")[0]
+	infoList := actisvc.GetHistoryMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
+	infoIdarr := strings.Split(infoList, ",")
+	for i, item := range infoIdarr {
+		idx := strings.Index(item, "-")
+		if (idx >= 0) {
+			infoIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
-	certIdList = strings.Join(appendIdarr, ",")
-	if certIdList != "" {
-		whereInfo += " and Id in (" + certIdList + ")"
-	}
-
-	var listInfo []infochange.OilInfoChange
-	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
-	for _, item :=range listInfo {
-		todo.Id = item.Id
-		todo.Type = "4"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = item.SupplierTypeName
-		todo.Status = item.Status
-		todolists = append(todolists, todo)
+	infoList = strings.Join(infoIdarr, ",")
+	if infoList != "" {
+		whereInfo += " and Id in (" + infoList + ")"
+		svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
+		for _, item := range listInfo {
+			todo.Id = item.Id
+			todo.Type = "4"
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = item.SupplierTypeName
+			todo.Status = item.Status
+			todolists = append(todolists, todo)
+		}
 	}
 
-	// 资质变更
-	certIdList = actisvc.GetHistoryMyTasks(workflow.OIL_QUAL_CHANGE, this.User.Id)
-	appendIdarr = strings.Split(certIdList, ",")
-	for i, item := range appendIdarr {
+	// 已办列表 --资质变更
+	var listqual []qualchange.OilQualChangeMain
+	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 {
-			appendIdarr[i] = strings.Split(item, "-")[0]
+			qualIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
-	certIdList = strings.Join(appendIdarr, ",")
+	qualList = strings.Join(qualIdarr, ",")
 	wherequal := "1=1 "
-	if certIdList != "" {
-		wherequal += " and Id in (" + certIdList + ")"
-	}
-	wherequal += " and Status != -2 "
-
-	var listqual []qualchange.OilQualChangeMain
-	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 = "5"
-		todo.SupplierName = item.SupplierName
-		todo.UserName = this.User.Realname
-		todo.SupplierTypeCode = "0"
-		todolists = append(todolists, todo)
+	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 = "5"
+			todo.SupplierName = item.SupplierName
+			todo.UserName = this.User.Realname
+			todo.SupplierTypeCode = "0"
+			todolists = append(todolists, todo)
+		}
 	}
 
 	var datainfo DataInfo
 	datainfo.Items = todolists
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
-}
+}

+ 4 - 2
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -54,7 +54,7 @@
           </el-table-column>
           <el-table-column label="类别" prop="SupplierTypeCode">
             <template slot-scope="scope">
-              <span v-if="scope.row.SupplierTypeCode=='01'">物类</span>
+              <span v-if="scope.row.SupplierTypeCode=='01'">物类</span>
               <span v-if="scope.row.SupplierTypeCode=='02'">基建类</span>
               <span v-if="scope.row.SupplierTypeCode=='03'">技术服务类</span>
             </template>
@@ -92,7 +92,7 @@
             </el-table-column>
             <el-table-column label="类别" prop="SupplierTypeCode">
               <template slot-scope="scope">
-                <span v-if="scope.row.SupplierTypeCode=='01'">物类</span>
+                <span v-if="scope.row.SupplierTypeCode=='01'">物类</span>
                 <span v-if="scope.row.SupplierTypeCode=='02'">基建类</span>
                 <span v-if="scope.row.SupplierTypeCode=='03'">技术服务类</span>
               </template>
@@ -206,6 +206,8 @@
           }
           this.$router.push('oilsupplier/addtionaudit/' + val.Id + '/' + SupplierType)
         } else if (val.Type === '3') {
+          this.$router.push('oilsupplier/annualaudit/' + val.SupplierId + '/auditoperation?certid=' + val.CertId + '&WorkflowId=' + val.WorkflowId + '&AnnualStatus=' + val.Status + '&annualId=' + val.Id + '&Step=' + val.Step)
+          // /oilsupplier/annualaudit/' + scope.row.SupplierId + '/auditoperation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&AnnualStatus='+scope.row.Status+'&annualId='+scope.row.Id+'&Step='+scope.row.Step
         } else if (val.Type === '4') {
           this.$router.push('oilsupplier/infochange/' + val.Id + '/auditoperation?InfoStatus=' + val.Status)
         } else if (val.Type === '5') {

+ 4 - 4
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/index.vue

@@ -301,7 +301,7 @@
         },
         setForm: {
           SupplierTypeCode: '01',
-          SupplierTypeName: '物类',
+          SupplierTypeName: '物类',
           AuditStepCode: '',
           AuditStepName: ''
         },
@@ -420,15 +420,15 @@
       Object.assign(this.searchFormReset, this.searchForm)
        //初始化部分表头
       this.initTableHeader()
-      
+
       // 查询列表
       this.initDatas()
-       
+
       this.getDictOptions()
     },
     methods: {
       initTableHeader(){
-        
+
         setapi.initGoodTableHeader(this.$axios).then(res => {
           console.log(res)
           this.dynamicTableColumns=res.data.items