|
@@ -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"
|