|
|
@@ -542,8 +542,8 @@ func (this *OilSupplierCertController) UpdateStorage() {
|
|
|
err = svc.UpdateEntityBytbl(OilSupplierCertName, id, &model, cols)
|
|
|
var model2 suppliercertsub.OilSupplierCertSub
|
|
|
model2.CertSubStatus = "1"
|
|
|
- whereid := " SupplierCertId = "+id
|
|
|
- svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &model2, []string{"CertSubStatus"},whereid)
|
|
|
+ whereid := " SupplierCertId = " + id
|
|
|
+ svc.UpdateEntityBywheretbl(OilSupplierCertSubName, &model2, []string{"CertSubStatus"}, whereid)
|
|
|
}
|
|
|
|
|
|
if err == nil {
|
|
|
@@ -678,7 +678,8 @@ func (this *OilSupplierCertController) AuditEntity() {
|
|
|
processInstanceId := ""
|
|
|
businessKey := ""
|
|
|
result := strconv.Itoa(this.User.IsCompanyUser)
|
|
|
- if supplierCertEntity.WorkflowId == "0" || len(supplierCertEntity.WorkflowId) <= 0 {
|
|
|
+ status, _ := strconv.Atoi(supplierCertEntity.Status)
|
|
|
+ if status <= 0 {
|
|
|
//启动工作流
|
|
|
businessKey = certId + "-" + strconv.Itoa(supplierCertEntity.AuditIndex)
|
|
|
// 1 评审准入 2 一级物资备案准入 3 二级物资备案准入 4 战略合作准入 5 内部多元准入 6 外部市场准入
|
|
|
@@ -692,34 +693,6 @@ func (this *OilSupplierCertController) AuditEntity() {
|
|
|
// 二级物资准入(除大港油田外的其他公司)
|
|
|
processInstanceId = svcActiviti.StartProcess2(workflow.OIL_SECOND_OTHER_SUPPLIER_APPLY, businessKey, this.User.Id, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
|
|
|
}
|
|
|
- //if this.User.IsCompanyUser == 1 { // 企业用户
|
|
|
- // // 1 评审准入 2 一级物资备案准入 3 二级物资备案准入 4 战略合作准入 5 内部多元准入 6 外部市场准入
|
|
|
- // if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
|
|
|
- // processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // } else if supplierCertEntity.InStyle == "3" {
|
|
|
- // processInstanceId = svcActiviti.StartProcess(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // } else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
|
|
|
- // processInstanceId = svcActiviti.StartProcess(workflow.OIL_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // }
|
|
|
- //}else if this.User.IsCompanyUser == 0 {
|
|
|
- // //if supplierCertEntity.InStyle == "2" {
|
|
|
- // // processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // //} else if supplierCertEntity.InStyle == "3" {
|
|
|
- // // processInstanceId = svcActiviti.StartProcess(workflow.OIL_SECOND_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // //} else if supplierCertEntity.InStyle == "6" {
|
|
|
- // // processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // //} else {
|
|
|
- // // processInstanceId = svcActiviti.StartProcess(workflow.OIL_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // //}
|
|
|
- // if supplierCertEntity.InStyle == "2" || supplierCertEntity.InStyle == "4" || supplierCertEntity.InStyle == "6" {
|
|
|
- // processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // } else if supplierCertEntity.InStyle == "3" {
|
|
|
- // processInstanceId = svcActiviti.StartProcess(workflow.OIL_SECOND_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // } else if supplierCertEntity.InStyle == "1" || supplierCertEntity.InStyle == "5" {
|
|
|
- // processInstanceId = svcActiviti.StartProcess(workflow.OIL_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
|
|
|
- // }
|
|
|
- //}
|
|
|
-
|
|
|
} else {
|
|
|
processInstanceId = supplierCertEntity.WorkflowId
|
|
|
}
|
|
|
@@ -1927,7 +1900,6 @@ func (this *OilSupplierCertController) ReInput() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
} else {
|
|
|
isdelsupplier = false
|
|
|
}
|
|
|
@@ -2145,5 +2117,4 @@ func (this *OilSupplierCertController) GetApplyTimeList() {
|
|
|
this.Data["json"] = &model
|
|
|
this.ServeJSON()
|
|
|
|
|
|
-
|
|
|
-}
|
|
|
+}
|