|
|
@@ -1137,71 +1137,78 @@ func (this *OilSupplierCertController) AuditEntityFir() {
|
|
|
payinfo.CreateBy = supplierCertEntity.CreateBy
|
|
|
payinfo.CreateOn = time.Now()
|
|
|
|
|
|
- wheresup := " SupplierCertId=" + strconv.Itoa(supplierCertEntity.Id)
|
|
|
- var sup []suppliercertsub.OilSupplierCertSub
|
|
|
- total := paysvc.GetPagingEntitiesWithOrder(1, 10, "Id", true, &sup, wheresup)
|
|
|
-
|
|
|
- if supplierCertEntity.SupplierTypeCode == "01" && total <= 50 {
|
|
|
- status = suppliercert.STOREING_STATUS
|
|
|
-
|
|
|
- svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
- businessKey := strconv.Itoa(supplierCertEntity.Id)
|
|
|
- result := "1"
|
|
|
-
|
|
|
- userIds := ""
|
|
|
- var userlist []userRole.Base_User
|
|
|
- var setting auditsetting.Base_OilAuditSetting
|
|
|
- usvc := userRole.GetUserService(utils.DBE)
|
|
|
- where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
|
|
|
- paysvc.GetEntity(&setting, where)
|
|
|
- ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
|
|
|
- tempstr := strings.Join(ids, ",")
|
|
|
- uids := strings.Replace(tempstr, "uid_", "", -1)
|
|
|
- uids = strings.Trim(uids, ",")
|
|
|
- paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
- topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
|
|
|
- if uids != "" {
|
|
|
- where := "Id in (" + uids + ")" + " and UnitId=" + topid
|
|
|
- paramSvc.GetEntities(&userlist, where)
|
|
|
- }
|
|
|
-
|
|
|
- for _, tmpUser := range userlist {
|
|
|
- userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
|
|
|
- }
|
|
|
- userIds = strings.Trim(userIds, ",")
|
|
|
-
|
|
|
- processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
|
|
|
-
|
|
|
- //var ActiComplete workflow.ActiCompleteVM
|
|
|
- //ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
|
|
|
- //ActiComplete.BusinessKey = businessKey
|
|
|
- //ActiComplete.UserNames = userIds
|
|
|
- //ActiComplete.UserId = this.User.Id
|
|
|
- //ActiComplete.Result = "1"
|
|
|
- //ActiComplete.Remarks = ""
|
|
|
- //ActiComplete.CallbackUrl = ""
|
|
|
- //
|
|
|
- //res := svcActiviti.TaskComplete(ActiComplete)
|
|
|
- //fmt.Println(res)
|
|
|
-
|
|
|
- var activity oilactivity.OilActivity
|
|
|
- activity.EntityId = supplierCertEntity.Id
|
|
|
- activity.ActType = oilactivity.STORAGE
|
|
|
- activity.WorkflowId = processInstanceId
|
|
|
- activity.BusinessKey = businessKey
|
|
|
- activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
|
|
|
- activity.CreateOn = time.Now()
|
|
|
-
|
|
|
- paysvc.InsertEntityBytbl(OilActivityName, &activity)
|
|
|
-
|
|
|
- } else {
|
|
|
- paysvc.InsertEntity(&payinfo)
|
|
|
- //发短信
|
|
|
- toMobile := supplierEntity.Mobile
|
|
|
- msg := "您的" + supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认交费信息!"
|
|
|
- msgService := msg2.GetMsgService(utils.DBE)
|
|
|
- msgService.HandleMsg(toMobile, msg, "3-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
|
|
|
- }
|
|
|
+ //wheresup := " SupplierCertId=" + strconv.Itoa(supplierCertEntity.Id)
|
|
|
+ //var sup []suppliercertsub.OilSupplierCertSub
|
|
|
+ //total := paysvc.GetPagingEntitiesWithOrder(1, 10, "Id", true, &sup, wheresup)
|
|
|
+
|
|
|
+ //if supplierCertEntity.SupplierTypeCode == "01" && total <= 50 {
|
|
|
+ // status = suppliercert.STOREING_STATUS
|
|
|
+ //
|
|
|
+ // svcActiviti := workflow.GetActivitiService(utils.DBE)
|
|
|
+ // businessKey := strconv.Itoa(supplierCertEntity.Id)
|
|
|
+ // result := "1"
|
|
|
+ //
|
|
|
+ // userIds := ""
|
|
|
+ // var userlist []userRole.Base_User
|
|
|
+ // var setting auditsetting.Base_OilAuditSetting
|
|
|
+ // usvc := userRole.GetUserService(utils.DBE)
|
|
|
+ // where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
|
|
|
+ // paysvc.GetEntity(&setting, where)
|
|
|
+ // ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
|
|
|
+ // tempstr := strings.Join(ids, ",")
|
|
|
+ // uids := strings.Replace(tempstr, "uid_", "", -1)
|
|
|
+ // uids = strings.Trim(uids, ",")
|
|
|
+ // paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
|
|
|
+ // topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
|
|
|
+ // if uids != "" {
|
|
|
+ // where := "Id in (" + uids + ")" + " and UnitId=" + topid
|
|
|
+ // paramSvc.GetEntities(&userlist, where)
|
|
|
+ // }
|
|
|
+ //
|
|
|
+ // for _, tmpUser := range userlist {
|
|
|
+ // userIds += strconv.Itoa(tmpUser.Id) + "," //strconv.FormatInt(tmpUser.Id, 10) + ","
|
|
|
+ // }
|
|
|
+ // userIds = strings.Trim(userIds, ",")
|
|
|
+ //
|
|
|
+ // processInstanceId := svcActiviti.StartProcess2(workflow.OIL_SUPPLIER_INSTORE, businessKey, userIds, result, supplierCertEntity.SupplierTypeCode, supplierEntity.SupplierName)
|
|
|
+ //
|
|
|
+ // //var ActiComplete workflow.ActiCompleteVM
|
|
|
+ // //ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
|
|
|
+ // //ActiComplete.BusinessKey = businessKey
|
|
|
+ // //ActiComplete.UserNames = userIds
|
|
|
+ // //ActiComplete.UserId = this.User.Id
|
|
|
+ // //ActiComplete.Result = "1"
|
|
|
+ // //ActiComplete.Remarks = ""
|
|
|
+ // //ActiComplete.CallbackUrl = ""
|
|
|
+ // //
|
|
|
+ // //res := svcActiviti.TaskComplete(ActiComplete)
|
|
|
+ // //fmt.Println(res)
|
|
|
+ //
|
|
|
+ // var activity oilactivity.OilActivity
|
|
|
+ // activity.EntityId = supplierCertEntity.Id
|
|
|
+ // activity.ActType = oilactivity.STORAGE
|
|
|
+ // activity.WorkflowId = processInstanceId
|
|
|
+ // activity.BusinessKey = businessKey
|
|
|
+ // activity.ProcessKey = workflow.OIL_SUPPLIER_INSTORE
|
|
|
+ // activity.CreateOn = time.Now()
|
|
|
+ //
|
|
|
+ // paysvc.InsertEntityBytbl(OilActivityName, &activity)
|
|
|
+ //
|
|
|
+ //} else {
|
|
|
+ // paysvc.InsertEntity(&payinfo)
|
|
|
+ // //发短信
|
|
|
+ // toMobile := supplierEntity.Mobile
|
|
|
+ // msg := "您的" + supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认交费信息!"
|
|
|
+ // msgService := msg2.GetMsgService(utils.DBE)
|
|
|
+ // msgService.HandleMsg(toMobile, msg, "3-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
|
|
|
+ //}
|
|
|
+
|
|
|
+ paysvc.InsertEntity(&payinfo)
|
|
|
+ //发短信
|
|
|
+ toMobile := supplierEntity.Mobile
|
|
|
+ msg := "您的" + supplierCertEntity.SupplierTypeName + "准入审核通过,请及时确认交费信息!"
|
|
|
+ msgService := msg2.GetMsgService(utils.DBE)
|
|
|
+ msgService.HandleMsg(toMobile, msg, "3-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
|
|
|
|
|
|
//paysvc.AddPaymentinfo(supplierCertEntity.SupplierId, supplierCertEntity.Id, Amount, "1")
|
|
|
supplierCertEntity.Status = status
|