|
|
@@ -3,6 +3,7 @@ package oilsupplier
|
|
|
import (
|
|
|
"dashoo.cn/backend/api/business/baseUser"
|
|
|
"dashoo.cn/backend/api/business/organize"
|
|
|
+ "dashoo.cn/backend/api/business/paymentinfo"
|
|
|
"dashoo.cn/business2/areajson"
|
|
|
"dashoo.cn/business2/items"
|
|
|
|
|
|
@@ -278,7 +279,7 @@ func (this *AnnualAuditController) AddEntity() {
|
|
|
var suppliermodel supplier.OilSupplierView
|
|
|
suppliermodel = list[0]
|
|
|
model.RecUnitId = suppliermodel.RecUnitId
|
|
|
- model.CerId = suppliermodel.CertId
|
|
|
+ model.CerId, _ = strconv.Atoi(suppliermodel.CertId)
|
|
|
model.Status = 0
|
|
|
model.BackReason = suppliermodel.BackReason
|
|
|
model.CreateOn = time.Now()
|
|
|
@@ -291,20 +292,20 @@ func (this *AnnualAuditController) AddEntity() {
|
|
|
//启动工作流
|
|
|
processInstanceId := svcActiviti.StartProcess(workflow.OIL_AUDIT_APPLY, utils.ToStr(annualId), this.User.Id)
|
|
|
//获得有审核权限的人员
|
|
|
- var users []userRole.Base_RoleList
|
|
|
- var userIds string
|
|
|
- var auditWorkflow auditsetting.Base_OilAuditSetting
|
|
|
- rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
- rsvc.GetAuditStepRoleEntity(OilAuditSettingName, firstAudit, workflow.FIRST_TRIAL, &auditWorkflow)
|
|
|
- users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
|
|
|
- for _, tmpUser := range users {
|
|
|
- userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
|
|
|
- }
|
|
|
- userIds = strings.Trim(userIds, ",")
|
|
|
+ //var users []userRole.Base_RoleList
|
|
|
+ //var userIds string
|
|
|
+ //var auditWorkflow auditsetting.Base_OilAuditSetting
|
|
|
+ //rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
|
|
|
+ //rsvc.GetAuditStepRoleEntity(OilAuditSettingName, firstAudit, workflow.FIRST_TRIAL, &auditWorkflow)
|
|
|
+ //users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
|
|
|
+ //for _, tmpUser := range users {
|
|
|
+ // userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
|
|
|
+ //}
|
|
|
+ //userIds = strings.Trim(userIds, ",")
|
|
|
var ActiComplete workflow.ActiCompleteVM
|
|
|
ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
|
|
|
ActiComplete.BusinessKey = strconv.Itoa(annualId)
|
|
|
- ActiComplete.UserNames = userIds
|
|
|
+ ActiComplete.UserNames = firstAudit
|
|
|
ActiComplete.UserId = this.User.Id
|
|
|
ActiComplete.Result = "1"
|
|
|
ActiComplete.Remarks = "提交给二级单位初审"
|
|
|
@@ -549,6 +550,16 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
}
|
|
|
if receiveVal == "true" {
|
|
|
_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
|
|
|
+ paysvc := paymentinfo.GetPaymentService(utils.DBE)
|
|
|
+ var Amount float64
|
|
|
+ if list.SupplierTypeName == "01" {
|
|
|
+ Amount = 6000
|
|
|
+ }else if list.SupplierTypeName == "02"{
|
|
|
+ Amount = 7000
|
|
|
+ }else if list.SupplierTypeName == "03" {
|
|
|
+ Amount = 8000
|
|
|
+ }
|
|
|
+ err = paysvc.AddPaymentinfo(list.SupplierId, list.CerId, Amount,"2")
|
|
|
if err == nil {
|
|
|
errinfo.Message = "审核通过!"
|
|
|
errinfo.Code = 0
|
|
|
@@ -604,3 +615,4 @@ func (this *AnnualAuditController) AnnualAudit() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|