瀏覽代碼

工作流合并替换1

yuedefeng 5 年之前
父節點
當前提交
bc8aa7a7c5

+ 20 - 2
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -98,8 +98,26 @@ type MultiOrgAuditVM struct {
 }
 }
 
 
 const (
 const (
+	//准入流程
+	OIL_ENUSER_SUPPLIER_APPLY string = "oil_enuser_supplier_apply"
+	//增项流程
+	OIL_ENUSER_APPEND_APPLY string = "oil_enuser_append_apply"
+	//信息变更流程
+	OIL_INFO_CHANGE string = "oil_info_change"
+	//年审流程
+	OIL_AUDIT_APPLY string = "oil_audit_apply"
 
 
-	//企业用户 2 一级物资准入流程图  4 战略合作准入 6外部市场准入
+	// 企业注册
+	OIL_REGISTER_APPLY string ="oil_register_apply"
+	// 企业入库
+	// OIL_SUPPLIER_INSTORE string = "oil_supplier_instore"
+	// 待开发票
+	OIL_SUPPLIER_VERIFY string = "oil_supplier_verify"
+	// 目录管理审批流程
+	OIL_Catalog string = "oil_catalog"
+
+
+	/*//企业用户 2 一级物资准入流程图  4 战略合作准入 6外部市场准入
 	OIL_FIRST_ENUSER_SUPPLIER_APPLY string = "oil_first_enuser_supplier_apply"
 	OIL_FIRST_ENUSER_SUPPLIER_APPLY string = "oil_first_enuser_supplier_apply"
 	//企业用户准入流程图 1评审准入 5内部多元准入
 	//企业用户准入流程图 1评审准入 5内部多元准入
 	OIL_ENUSER_SUPPLIER_APPLY string = "oil_enuser_supplier_apply"
 	OIL_ENUSER_SUPPLIER_APPLY string = "oil_enuser_supplier_apply"
@@ -130,7 +148,7 @@ const (
 	OIL_SUPPLIER_VERIFY string = "oil_supplier_verify"
 	OIL_SUPPLIER_VERIFY string = "oil_supplier_verify"
 	// 目录管理审批流程
 	// 目录管理审批流程
 	OIL_Catalog string = "oil_catalog"
 	OIL_Catalog string = "oil_catalog"
-
+*/
 	// 分办
 	// 分办
 	SUB_OFFICE_WZ string = "SUB_OFFICE_WZ"
 	SUB_OFFICE_WZ string = "SUB_OFFICE_WZ"
 	SUB_OFFICE_JF string = "SUB_OFFICE_JF"
 	SUB_OFFICE_JF string = "SUB_OFFICE_JF"

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

@@ -4,7 +4,6 @@ import (
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/invoiceinfo"
 	"dashoo.cn/backend/api/business/invoiceinfo"
 	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
 	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
-	"dashoo.cn/backend/api/business/oilsupplier/oilactivity"
 	"dashoo.cn/backend/api/business/oilsupplier/paymentbankinfo"
 	"dashoo.cn/backend/api/business/oilsupplier/paymentbankinfo"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
@@ -400,9 +399,9 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 			var cert suppliercert.OilSupplierCert
 			var cert suppliercert.OilSupplierCert
 			svc.GetEntityById(payItem.SupplierCertId,&cert)
 			svc.GetEntityById(payItem.SupplierCertId,&cert)
 
 
-			svcActiviti := workflow.GetActivitiService(utils.DBE)
+			/*svcActiviti := workflow.GetActivitiService(utils.DBE)
 			businessKey := strconv.Itoa(payItem.SupplierCertId)
 			businessKey := strconv.Itoa(payItem.SupplierCertId)
-			result := "1"
+			result := "1"*/
 
 
 			userIds := ""
 			userIds := ""
 			var userlist []userRole.Base_User
 			var userlist []userRole.Base_User
@@ -425,7 +424,9 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 				userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
 				userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
 			}
 			}
 			userIds = strings.Trim(userIds, ",")
 			userIds = strings.Trim(userIds, ",")
-			processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, cert.SupplierTypeCode, payItem.SupplierName)
+			// processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, cert.SupplierTypeCode, payItem.SupplierName)
+
+			//TODO: 改成交费步骤完成,到下一步
 			//var ActiComplete workflow.ActiCompleteVM
 			//var ActiComplete workflow.ActiCompleteVM
 			//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			//ActiComplete.BusinessKey = businessKey
 			//ActiComplete.BusinessKey = businessKey
@@ -438,7 +439,7 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 			//res := svcActiviti.TaskComplete(ActiComplete)
 			//res := svcActiviti.TaskComplete(ActiComplete)
 			//fmt.Println(res)
 			//fmt.Println(res)
 
 
-			var activity oilactivity.OilActivity
+			/* var activity oilactivity.OilActivity
 			activity.EntityId = payItem.SupplierCertId
 			activity.EntityId = payItem.SupplierCertId
 			activity.ActType = oilactivity.STORAGE
 			activity.ActType = oilactivity.STORAGE
 			activity.WorkflowId = processInstanceId
 			activity.WorkflowId = processInstanceId
@@ -446,7 +447,7 @@ func (this *PaymentInfoController) ReceiveMoneyBillList() {
 			activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			activity.CreateOn = time.Now()
 			activity.CreateOn = time.Now()
 
 
-			svc.InsertEntityBytbl(OilActivityName, &activity)
+			svc.InsertEntityBytbl(OilActivityName, &activity) */
 
 
 			var certentity suppliercert.OilSupplierCert
 			var certentity suppliercert.OilSupplierCert
 			certentity.Status = suppliercert.STOREING_STATUS
 			certentity.Status = suppliercert.STOREING_STATUS

+ 1 - 47
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -691,30 +691,6 @@ func (this *OilSupplierController) GetJZPSJoinCertEntityList() {
 			if len(strings.Trim(ids, ",")) > 0 {
 			if len(strings.Trim(ids, ",")) > 0 {
 				certIdList += strings.Trim(ids, ",") + ","
 				certIdList += strings.Trim(ids, ",") + ","
 			}
 			}
-			ids = actisvc.GetAllMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
-			if len(strings.Trim(ids, ",")) > 0 {
-				certIdList += strings.Trim(ids, ",") + ","
-			}
-
-			ids = actisvc.GetAllMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
-			if len(strings.Trim(ids, ",")) > 0 {
-				certIdList += strings.Trim(ids, ",") + ","
-			}
-
-			//ids = actisvc.GetAllMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id)
-			//if len(strings.Trim(ids, ",")) > 0 {
-			//	certIdList += strings.Trim(ids, ",")+ ","
-			//}
-			//
-			//ids = actisvc.GetAllMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
-			//if len(strings.Trim(ids, ",")) > 0 {
-			//	certIdList += strings.Trim(ids, ",")+ ","
-			//}
-			//
-			//ids = actisvc.GetAllMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
-			//if len(strings.Trim(ids, ",")) > 0 {
-			//	certIdList += strings.Trim(ids, ",")+ ","
-			//}
 
 
 			certIdList = strings.Trim(certIdList, ",")
 			certIdList = strings.Trim(certIdList, ",")
 			certIdarr := strings.Split(certIdList, ",")
 			certIdarr := strings.Split(certIdList, ",")
@@ -731,8 +707,6 @@ func (this *OilSupplierController) GetJZPSJoinCertEntityList() {
 			} else {
 			} else {
 				where = where + " and a.CreateUserId = '" + this.User.Id + "'"
 				where = where + " and a.CreateUserId = '" + this.User.Id + "'"
 			}
 			}
-		} else {
-			//where = where + " and a.CreateUserId = '" + this.User.Id + "'"
 		}
 		}
 	}
 	}
 
 
@@ -1210,27 +1184,7 @@ func (this *OilSupplierController) GetMyTaskEntityList() {
 		certIdList = str
 		certIdList = str
 		certIdList = certIdList + ","
 		certIdList = certIdList + ","
 	}
 	}
-	str = actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id)
-	if str != "" {
-		certIdList = fmt.Sprintf("%s %s", certIdList, str)
-		certIdList = certIdList + ","
-	}
-	str = actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id)
-	if str != "" {
-		certIdList = fmt.Sprintf("%s %s", certIdList, str)
-		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_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, ",")
 	certIdList = strings.Trim(certIdList, ",")
 	certIdarr := strings.Split(certIdList, ",")
 	certIdarr := strings.Split(certIdList, ",")
 	for i, item := range certIdarr {
 	for i, item := range certIdarr {

+ 22 - 76
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -508,6 +508,7 @@ func (this *OilSupplierCertController) UpdateStorage() {
 		err = svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
 		err = svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
 	} else {
 	} else {
 
 
+		//TODO: 入库改用大工作流
 		var activity oilactivity.OilActivity
 		var activity oilactivity.OilActivity
 		where := "EntityId=" + id + " and ActType='" + oilactivity.STORAGE + "'"
 		where := "EntityId=" + id + " and ActType='" + oilactivity.STORAGE + "'"
 		svc.GetEntity(&activity, where)
 		svc.GetEntity(&activity, where)
@@ -692,53 +693,13 @@ func (this *OilSupplierCertController) AuditEntity() {
 	if status <= 0 {
 	if status <= 0 {
 		//启动工作流
 		//启动工作流
 		businessKey = certId + "-" + strconv.Itoa(supplierCertEntity.AuditIndex)
 		businessKey = certId + "-" + strconv.Itoa(supplierCertEntity.AuditIndex)
-		// 1 评审准入  2 一级物资备案准入  3  二级物资备案准入  4 战略合作准入  5 内部多元准入  6 外部市场准入
-		if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
-		} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
-		} else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
-		} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
-			// 二级物资准入(除大港油田外的其他公司)
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
-		}
+		processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
 	} else {
 	} else {
 		processInstanceId = supplierCertEntity.WorkflowId
 		processInstanceId = supplierCertEntity.WorkflowId
 	}
 	}
 
 
-	//processInstanceId,_ := certSrv.SubmitOrgAudit(certId, workflow.OIL_SUPPLIER_APPLY, workflow.FIRST_TRIAL, this.User.Id, result, "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName, "", "")
-	//for _, tmpUser := range users {
-	//	userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
-	//}
-	//userIds = strings.Trim(userIds, ",")
 	var ActiComplete workflow.ActiCompleteVM
 	var ActiComplete workflow.ActiCompleteVM
-	if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
-		ActiComplete.ProcessKey = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY
-	} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
-		ActiComplete.ProcessKey = workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY
-	} else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
-		ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
-	} else if supplierCertEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
-		ActiComplete.ProcessKey = workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY
-	}
-	//if this.User.IsCompanyUser == 1 {
-	//	if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
-	//		ActiComplete.ProcessKey = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY
-	//	} else if supplierCertEntity.InStyle == "3" {
-	//		ActiComplete.ProcessKey = workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY
-	//	} else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
-	//		ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
-	//	}
-	//}else if this.User.IsCompanyUser == 0 {
-	//	if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
-	//		ActiComplete.ProcessKey = workflow.OIL_FIRST_SUPPLIER_APPLY
-	//	} else if supplierCertEntity.InStyle == "3" {
-	//		ActiComplete.ProcessKey = workflow.OIL_SECOND_SUPPLIER_APPLY
-	//	} else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
-	//		ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
-	//	}
-	//}
+	ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
 
 
 	ActiComplete.BusinessKey = businessKey
 	ActiComplete.BusinessKey = businessKey
 	ActiComplete.UserNames = firstAudit
 	ActiComplete.UserNames = firstAudit
@@ -806,20 +767,6 @@ func (this *OilSupplierCertController) AuditEntity() {
 		"CommitComId",
 		"CommitComId",
 	}
 	}
 	certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 	certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
-
-	//var model classorgsetting.OilClassOrgSetting
-	//var jsonBlob = this.Ctx.Input.RequestBody
-	//svc := suppliercert.GetOilSupplierCertService(utils.DBE)
-	//
-	//json.Unmarshal(jsonBlob, &model)
-	//model.CreateOn = time.Now()
-	//model.CreateBy = this.User.Realname
-	//model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-	////model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
-	//
-	//svc.InsertEntityBytbl(OilSupplierCertName, &model)
-	//fmt.Println(model)
-
 }
 }
 
 
 // @Title 专业审批
 // @Title 专业审批
@@ -987,11 +934,6 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 
 
 			userIds = strings.Trim(userIds, ",")
 			userIds = strings.Trim(userIds, ",")
 		} else if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
 		} else if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
-
-			svcActiviti := workflow.GetActivitiService(utils.DBE)
-			businessKey := strconv.Itoa(supplierCertEntity.Id)
-			result := "1"
-
 			userIds := ""
 			userIds := ""
 			var userlist []userRole.Base_User
 			var userlist []userRole.Base_User
 			var setting auditsetting.Base_OilAuditSetting
 			var setting auditsetting.Base_OilAuditSetting
@@ -1014,8 +956,9 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 			}
 			}
 			userIds = strings.Trim(userIds, ",")
 			userIds = strings.Trim(userIds, ",")
 
 
-			processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
+			// processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
 
 
+			//TODO: 改成交费步骤完成,到下一步
 			//var ActiComplete workflow.ActiCompleteVM
 			//var ActiComplete workflow.ActiCompleteVM
 			//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			//ActiComplete.BusinessKey = businessKey
 			//ActiComplete.BusinessKey = businessKey
@@ -1028,7 +971,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 			//res := svcActiviti.TaskComplete(ActiComplete)
 			//res := svcActiviti.TaskComplete(ActiComplete)
 			//fmt.Println(res)
 			//fmt.Println(res)
 
 
-			var activity oilactivity.OilActivity
+			/*var activity oilactivity.OilActivity
 			activity.EntityId = supplierCertEntity.Id
 			activity.EntityId = supplierCertEntity.Id
 			activity.ActType = oilactivity.STORAGE
 			activity.ActType = oilactivity.STORAGE
 			activity.WorkflowId = processInstanceId
 			activity.WorkflowId = processInstanceId
@@ -1036,7 +979,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 			activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 			activity.CreateOn = time.Now()
 			activity.CreateOn = time.Now()
 
 
-			certSrv.InsertEntityBytbl(OilActivityName, &activity)
+			certSrv.InsertEntityBytbl(OilActivityName, &activity)*/
 
 
 			status = suppliercert.STOREING_STATUS
 			status = suppliercert.STOREING_STATUS
 			step = 3
 			step = 3
@@ -1230,9 +1173,9 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 					certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 					certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 				} else {
 				} else {
 
 
-					svcActiviti := workflow.GetActivitiService(utils.DBE)
+					/*svcActiviti := workflow.GetActivitiService(utils.DBE)
 					businessKey := strconv.Itoa(supplierCertEntity.Id)
 					businessKey := strconv.Itoa(supplierCertEntity.Id)
-					result := "1"
+					result := "1"*/
 
 
 					userIds := ""
 					userIds := ""
 					var userlist []userRole.Base_User
 					var userlist []userRole.Base_User
@@ -1255,8 +1198,9 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 						userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
 						userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
 					}
 					}
 					userIds = strings.Trim(userIds, ",")
 					userIds = strings.Trim(userIds, ",")
-					processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
+					// processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
 
 
+					//TODO: 改成交费步骤完成,到下一步
 					//var ActiComplete workflow.ActiCompleteVM
 					//var ActiComplete workflow.ActiCompleteVM
 					//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 					//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 					//ActiComplete.BusinessKey = businessKey
 					//ActiComplete.BusinessKey = businessKey
@@ -1269,7 +1213,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 					//res := svcActiviti.TaskComplete(ActiComplete)
 					//res := svcActiviti.TaskComplete(ActiComplete)
 					//fmt.Println(res)
 					//fmt.Println(res)
 
 
-					var activity oilactivity.OilActivity
+					/* var activity oilactivity.OilActivity
 					activity.EntityId = supplierCertEntity.Id
 					activity.EntityId = supplierCertEntity.Id
 					activity.ActType = oilactivity.STORAGE
 					activity.ActType = oilactivity.STORAGE
 					activity.WorkflowId = processInstanceId
 					activity.WorkflowId = processInstanceId
@@ -1277,7 +1221,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 					activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 					activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 					activity.CreateOn = time.Now()
 					activity.CreateOn = time.Now()
 
 
-					certSrv.InsertEntityBytbl(OilActivityName, &activity)
+					certSrv.InsertEntityBytbl(OilActivityName, &activity)*/
 
 
 					supplierCertEntity.Status = suppliercert.STOREING_STATUS
 					supplierCertEntity.Status = suppliercert.STOREING_STATUS
 					supplierCertEntity.Step = step
 					supplierCertEntity.Step = step
@@ -1290,9 +1234,9 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 			} else if supplierCertEntity.Status == suppliercert.PROF_AUDIT_STATUS && supplierCertEntity.InStyle == "3" {
 			} else if supplierCertEntity.Status == suppliercert.PROF_AUDIT_STATUS && supplierCertEntity.InStyle == "3" {
 				//if supplierCertEntity.InStyle == "3" {
 				//if supplierCertEntity.InStyle == "3" {
 
 
-				svcActiviti := workflow.GetActivitiService(utils.DBE)
+				/*svcActiviti := workflow.GetActivitiService(utils.DBE)
 				businessKey := strconv.Itoa(supplierCertEntity.Id)
 				businessKey := strconv.Itoa(supplierCertEntity.Id)
-				result := "1"
+				result := "1"*/
 
 
 				userIds := ""
 				userIds := ""
 				var userlist []userRole.Base_User
 				var userlist []userRole.Base_User
@@ -1315,8 +1259,9 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 					userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
 					userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
 				}
 				}
 				userIds = strings.Trim(userIds, ",")
 				userIds = strings.Trim(userIds, ",")
-				processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
+				// processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
 
 
+				//TODO: 改成交费步骤完成,到下一步
 				//var ActiComplete workflow.ActiCompleteVM
 				//var ActiComplete workflow.ActiCompleteVM
 				//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 				//ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 				//ActiComplete.BusinessKey = businessKey
 				//ActiComplete.BusinessKey = businessKey
@@ -1329,7 +1274,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 				//res := svcActiviti.TaskComplete(ActiComplete)
 				//res := svcActiviti.TaskComplete(ActiComplete)
 				//fmt.Println(res)
 				//fmt.Println(res)
 
 
-				var activity oilactivity.OilActivity
+				/* var activity oilactivity.OilActivity
 				activity.EntityId = supplierCertEntity.Id
 				activity.EntityId = supplierCertEntity.Id
 				activity.ActType = oilactivity.STORAGE
 				activity.ActType = oilactivity.STORAGE
 				activity.WorkflowId = processInstanceId
 				activity.WorkflowId = processInstanceId
@@ -1337,7 +1282,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 				activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 				activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
 				activity.CreateOn = time.Now()
 				activity.CreateOn = time.Now()
 
 
-				certSrv.InsertEntityBytbl(OilActivityName, &activity)
+				certSrv.InsertEntityBytbl(OilActivityName, &activity) */
 
 
 				supplierCertEntity.Status = suppliercert.STOREING_STATUS
 				supplierCertEntity.Status = suppliercert.STOREING_STATUS
 				supplierCertEntity.Step = 3
 				supplierCertEntity.Step = 3
@@ -1621,6 +1566,7 @@ func (this *OilSupplierCertController) BackStatus() {
 
 
 	var errinfo ErrorDataInfo
 	var errinfo ErrorDataInfo
 	if err == nil {
 	if err == nil {
+		//TODO: 入库改用大工作流
 
 
 		var activity oilactivity.OilActivity
 		var activity oilactivity.OilActivity
 		where := "EntityId=" + id + " and ActType='" + oilactivity.STORAGE + "'"
 		where := "EntityId=" + id + " and ActType='" + oilactivity.STORAGE + "'"
@@ -1628,8 +1574,8 @@ func (this *OilSupplierCertController) BackStatus() {
 
 
 		svcActiviti := workflow.GetActivitiService(utils.DBE)
 		svcActiviti := workflow.GetActivitiService(utils.DBE)
 		var ActiComplete workflow.ActiCompleteVM
 		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = activity.ProcessKey
-		ActiComplete.BusinessKey = activity.BusinessKey
+		ActiComplete.ProcessKey = activity.ProcessKey //TODO: 获取工作流KEY
+		ActiComplete.BusinessKey = activity.BusinessKey  //TODO: 获取业务表ID
 		ActiComplete.UserId = this.User.Id
 		ActiComplete.UserId = this.User.Id
 		ActiComplete.Remarks = ""
 		ActiComplete.Remarks = ""
 		ActiComplete.Result = "1"
 		ActiComplete.Result = "1"

+ 2 - 30
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -468,16 +468,6 @@ func (this *OilSupplierCertAppendController) GetMyTaskEntityList() {
 		appendIdList = str
 		appendIdList = str
 		appendIdList = appendIdList + ","
 		appendIdList = appendIdList + ","
 	}
 	}
-	str = actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, this.User.Id)
-	if str != "" {
-		appendIdList = fmt.Sprintf("%s %s", appendIdList, str)
-		appendIdList = appendIdList + ","
-	}
-	str = actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, this.User.Id)
-	if str != "" {
-		appendIdList = fmt.Sprintf("%s %s", appendIdList, str)
-		appendIdList = appendIdList + ","
-	}
 	appendIdList = strings.Trim(appendIdList, ",")
 	appendIdList = strings.Trim(appendIdList, ",")
 	appendIdarr := strings.Split(appendIdList, ",")
 	appendIdarr := strings.Split(appendIdList, ",")
 	for i, item := range appendIdarr {
 	for i, item := range appendIdarr {
@@ -587,28 +577,10 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 	if supplierCertAppendEntity.WorkFlowId == "0" || len(supplierCertAppendEntity.WorkFlowId) <= 0 {
 	if supplierCertAppendEntity.WorkFlowId == "0" || len(supplierCertAppendEntity.WorkFlowId) <= 0 {
 		//启动工作流
 		//启动工作流
 		businessKey = certappendId + "-" +  strconv.Itoa(supplierCertAppendEntity.AuditIndex)
 		businessKey = certappendId + "-" +  strconv.Itoa(supplierCertAppendEntity.AuditIndex)
-		if supplierCertAppendEntity.InStyle == "2" || supplierCertAppendEntity.InStyle == "4" || supplierCertAppendEntity.InStyle == "6" {
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_FIRST_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
-		} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT  {
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
-		} else if supplierCertAppendEntity.InStyle == "1" || supplierCertAppendEntity.InStyle == "5" {
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
-		} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
-			// 二级物资准入(除大港油田外的其他公司)
-			processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_OTHER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
-		}
-
+		processInstanceId = svcActiviti.StartProcess2(workflow.OIL_ENUSER_APPEND_APPLY, businessKey, this.User.Id, result, supplierCertAppendEntity.AppendType, supplierCertAppendEntity.SupplierName)
 	}
 	}
 	var ActiComplete workflow.ActiCompleteVM
 	var ActiComplete workflow.ActiCompleteVM
-	if supplierCertAppendEntity.InStyle == "2" || supplierCertAppendEntity.InStyle == "4" || supplierCertAppendEntity.InStyle == "6" {
-		ActiComplete.ProcessKey = workflow.OIL_FIRST_ENUSER_APPEND_APPLY
-	} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit == supplier.MGRUNIT {
-		ActiComplete.ProcessKey = workflow.OIL_SECOND_ENUSER_APPEND_APPLY
-	} else if supplierCertAppendEntity.InStyle == "1" || supplierCertAppendEntity.InStyle == "5" {
-		ActiComplete.ProcessKey = workflow.OIL_ENUSER_APPEND_APPLY
-	} else if supplierCertAppendEntity.InStyle == "3" && supplierEntity.MgrUnit != supplier.MGRUNIT {
-		ActiComplete.ProcessKey = workflow.OIL_SECOND_OTHER_APPEND_APPLY
-	}
+	ActiComplete.ProcessKey = workflow.OIL_ENUSER_APPEND_APPLY
 
 
 	ActiComplete.BusinessKey = businessKey
 	ActiComplete.BusinessKey = businessKey
 	ActiComplete.UserNames = firstAudit
 	ActiComplete.UserNames = firstAudit

+ 15 - 34
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -32,27 +32,11 @@ func (this *TodoListController) GetMyTaskEntityList() {
 
 
 	page := this.GetPageInfoForm()
 	page := this.GetPageInfoForm()
 
 
-	stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 7 待入库 8 待开发票 9 目录审批
+	// stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 7 待入库 8 待开发票 9 目录审批
 	supplierTypeCode := this.GetString("SupplierTypeCode")
 	supplierTypeCode := this.GetString("SupplierTypeCode")
 	supplierName := this.GetString("SupplierName")
 	supplierName := this.GetString("SupplierName")
 	wfNames := ""
 	wfNames := ""
-	if stype == "1" {
-		wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SUPPLIER_INSTORE + "," + workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY
-	} else if stype == "2" {
-		wfNames = workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_FIRST_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_OTHER_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 == "7" {
-		wfNames = workflow.OIL_SUPPLIER_INSTORE
-	} else if stype == "8" {
-		wfNames = workflow.OIL_SUPPLIER_VERIFY
-	} else if stype == "9" {
-		wfNames = workflow.OIL_Catalog
-	}
+	wfNames = workflow.OIL_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_INFO_CHANGE + "," + workflow.OIL_AUDIT_APPLY
 
 
 	var todoliststemp []todolist.TodoList
 	var todoliststemp []todolist.TodoList
 
 
@@ -66,8 +50,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 	var jzpsCount int64 = 0 // 准入集中评审的数量
 	var jzpsCount int64 = 0 // 准入集中评审的数量
 	for _,item := range myTasksRetWithTimes {
 	for _,item := range myTasksRetWithTimes {
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0]
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0]
-		if (item.TaskName == "集中评审") && (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 || wfName ==  workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY) {
+		if (item.TaskName == "集中评审") && (wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY) {
 			jzpsCount ++
 			jzpsCount ++
 		}
 		}
 	}
 	}
@@ -82,8 +65,11 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		//工作流名称
 		//工作流名称
 		has := false
 		has := false
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0] //如:oil_enuser_supplier_apply:2:2543
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0] //如:oil_enuser_supplier_apply:2:2543
-		if (item.TaskName != "集中评审") && (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 || wfName ==  workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY) {
+		if wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY {
+			if item.TaskName == "集中评审" {
+				// 集中评审不显示在待办列表
+				continue
+			}
 			//准入
 			//准入
 			where := " 1=1 "
 			where := " 1=1 "
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"
@@ -95,14 +81,9 @@ func (this *TodoListController) GetMyTaskEntityList() {
 				todo.UserName = this.User.Realname
 				todo.UserName = this.User.Realname
 				todo.CreateTime = item.CreateTime
 				todo.CreateTime = item.CreateTime
 				todo.TaskName = item.TaskName
 				todo.TaskName = item.TaskName
-				if wfName == workflow.OIL_SUPPLIER_INSTORE {
-					todo.Type = todolist.STORAGE
-				}
 				todoliststemp = append(todoliststemp, todo)
 				todoliststemp = append(todoliststemp, todo)
 			}
 			}
-
-		} else if (wfName == workflow.OIL_ENUSER_APPEND_APPLY || wfName == workflow.OIL_FIRST_ENUSER_APPEND_APPLY ||
-			wfName == workflow.OIL_SECOND_ENUSER_APPEND_APPLY || wfName == workflow.OIL_SECOND_OTHER_APPEND_APPLY) {
+		} else if wfName == workflow.OIL_ENUSER_APPEND_APPLY {
 			//增项
 			//增项
 			where := " 1=1 "
 			where := " 1=1 "
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"
@@ -261,9 +242,9 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 	supplierName := this.GetString("SupplierName")
 	supplierName := this.GetString("SupplierName")
 	wfNames := ""
 	wfNames := ""
 	if stype == "1" {
 	if stype == "1" {
-		wfNames = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY  + "," + workflow.OIL_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY + "," + workflow.OIL_SUPPLIER_INSTORE
+		wfNames = workflow.OIL_ENUSER_SUPPLIER_APPLY
 	} else if stype == "2" {
 	} else if stype == "2" {
-		wfNames = workflow.OIL_ENUSER_APPEND_APPLY + "," + workflow.OIL_FIRST_ENUSER_APPEND_APPLY + "," + workflow.OIL_SECOND_ENUSER_APPEND_APPLY
+		wfNames = workflow.OIL_ENUSER_APPEND_APPLY
 	} else if stype == "3" {
 	} else if stype == "3" {
 		wfNames = workflow.OIL_AUDIT_APPLY
 		wfNames = workflow.OIL_AUDIT_APPLY
 	} else if stype == "4" {
 	} else if stype == "4" {
@@ -271,9 +252,9 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 	} else if stype == "5" {
 	} else if stype == "5" {
 		wfNames = workflow.OIL_REGISTER_APPLY
 		wfNames = workflow.OIL_REGISTER_APPLY
 	} else if stype == "7" {
 	} else if stype == "7" {
-		wfNames = workflow.OIL_SUPPLIER_INSTORE
+		// wfNames = workflow.OIL_SUPPLIER_INSTORE
 	} else if stype == "8" {
 	} else if stype == "8" {
-		wfNames = workflow.OIL_SUPPLIER_VERIFY
+		// wfNames = workflow.OIL_SUPPLIER_VERIFY
 	} else if stype == "9" {
 	} else if stype == "9" {
 		wfNames = workflow.OIL_Catalog
 		wfNames = workflow.OIL_Catalog
 	}
 	}
@@ -297,7 +278,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		//工作流名称
 		//工作流名称
 		has := false
 		has := false
 		wfName := strings.Split(item.ProcessDefinitionId, ":")[0] //如:oil_enuser_supplier_apply:2:2543
 		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 || wfName == workflow.OIL_SUPPLIER_INSTORE {
+		if wfName == workflow.OIL_ENUSER_SUPPLIER_APPLY {
 			//准入
 			//准入
 			where := " 1=1 "
 			where := " 1=1 "
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"
@@ -312,7 +293,7 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 				todoliststemp = append(todoliststemp, todo)
 				todoliststemp = append(todoliststemp, todo)
 			}
 			}
 
 
-		} else if wfName == workflow.OIL_ENUSER_APPEND_APPLY || wfName == workflow.OIL_FIRST_ENUSER_APPEND_APPLY || wfName == workflow.OIL_SECOND_ENUSER_APPEND_APPLY {
+		} else if wfName == workflow.OIL_ENUSER_APPEND_APPLY {
 			//增项
 			//增项
 			where := " 1=1 "
 			where := " 1=1 "
 			where = where + " and b.Id = '" + id + "'"
 			where = where + " and b.Id = '" + id + "'"