2
3
Переглянути джерело

企业用户注册待办任务

yuedefeng 6 роки тому
батько
коміт
0699d0b29b

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

@@ -23,6 +23,5 @@ const (
 	CERTAPPEND  string = "2" // 增项
 	ANNUALAUDIT string = "3" // 年审
 	INFOCHANGE  string = "4" // 信息变更
-	QUALCHANGE  string = "5" // 资质变更
-	REGISTER    string = "6" // 注册
+	REGISTER    string = "5" // 注册
 )

+ 53 - 56
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -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)
-		}
-	}*/
 }

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

@@ -13,7 +13,8 @@
               <el-option label="增项" value="2"></el-option>
               <el-option label="年审" value="3"></el-option>
               <el-option label="信息变更" value="4"></el-option>
-              <!--<el-option label="资质变更" value="5"></el-option>-->
+              <el-option label="注册审核" value="5"></el-option>
+              <el-option label="待入库" value="6"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="类别">
@@ -49,8 +50,7 @@
               <span v-if="scope.row.Type=='2'" style="color:#E6A23C">增项-{{scope.row.TaskName}}</span>
               <span v-if="scope.row.Type=='3'" style="color:#E6A23C">年审-{{scope.row.TaskName}}</span>
               <span v-if="scope.row.Type=='4'" style="color:#E6A23C">信息变更-{{scope.row.TaskName}}</span>
-              <!--<span v-if="scope.row.Type=='5'" style="color:#E6A23C">资质变更-{{scope.row.TaskName}}</span>-->
-              <span v-if="scope.row.Type=='6'" style="color:#E6A23C">企业注册-待审批</span>
+              <span v-if="scope.row.Type=='5'" style="color:#E6A23C">企业注册-待审批</span>
             </template>
           </el-table-column>
 
@@ -116,8 +116,7 @@
                 <span v-if="scope.row.Type=='2'" style="color:#E6A23C">增项-{{scope.row.TaskName}}</span>
                 <span v-if="scope.row.Type=='3'" style="color:#E6A23C">年审-{{scope.row.TaskName}}</span>
                 <span v-if="scope.row.Type=='4'" style="color:#E6A23C">信息变更-{{scope.row.TaskName}}</span>
-                <!--<span v-if="scope.row.Type=='5'" style="color:#E6A23C">资质变更-{{scope.row.TaskName}}</span>-->
-                <span v-if="scope.row.Type=='6'" style="color:#E6A23C">企业注册-{{scope.row.TaskName}}</span>
+                <span v-if="scope.row.Type=='5'" style="color:#E6A23C">企业注册-待审批</span>
               </template>
             </el-table-column>
             <el-table-column label="类别" prop="SupplierTypeCode">