|
|
@@ -20,11 +20,11 @@ import (
|
|
|
)
|
|
|
|
|
|
type ActivitiService struct {
|
|
|
- BaseUrl string
|
|
|
- AposeUrl string
|
|
|
- OriginUrl string
|
|
|
- Username string
|
|
|
- Password string
|
|
|
+ BaseUrl string
|
|
|
+ AposeUrl string
|
|
|
+ OriginUrl string
|
|
|
+ Username string
|
|
|
+ Password string
|
|
|
ServiceBase
|
|
|
}
|
|
|
|
|
|
@@ -32,8 +32,8 @@ func GetActivitiService(xormEngine *xorm.Engine) *ActivitiService {
|
|
|
s := new(ActivitiService)
|
|
|
s.DBE = xormEngine
|
|
|
//s.BaseUrl = "http://123.56.168.26:8080/activiti-rest/service"
|
|
|
- //s.BaseUrl = "http://localhost:8081/api/acti"
|
|
|
- s.BaseUrl = "http://47.92.212.59:8080/acti-api/api/acti"
|
|
|
+ s.BaseUrl = "http://localhost:8081/api/acti"
|
|
|
+ //s.BaseUrl = "http://47.92.212.59:8080/acti-api/api/acti"
|
|
|
//s.BaseUrl = "http://localhost:8081/api/acti"
|
|
|
s.AposeUrl = "http://47.92.212.59:8080/acti-api/api/apose"
|
|
|
//s.OriginUrl = "http://localhost:8081/api"
|
|
|
@@ -118,13 +118,13 @@ func (this *ActivitiService) StartProcess(processKey string, formEntityId string
|
|
|
}
|
|
|
|
|
|
//func (this *ActivitiService) TaskComplete(processKey string, formEntityId string, userNames string, userId string, result string, remarks string) string {
|
|
|
- /*var ActiComplete ActiCompleteVM
|
|
|
- ActiComplete.ProcessKey = processKey
|
|
|
- ActiComplete.BusinessKey = formEntityId
|
|
|
- ActiComplete.UserNames = userNames
|
|
|
- ActiComplete.UserId = userId
|
|
|
- ActiComplete.Result = result
|
|
|
- ActiComplete.Remarks = remarks*/
|
|
|
+/*var ActiComplete ActiCompleteVM
|
|
|
+ActiComplete.ProcessKey = processKey
|
|
|
+ActiComplete.BusinessKey = formEntityId
|
|
|
+ActiComplete.UserNames = userNames
|
|
|
+ActiComplete.UserId = userId
|
|
|
+ActiComplete.Result = result
|
|
|
+ActiComplete.Remarks = remarks*/
|
|
|
|
|
|
func (this *ActivitiService) TaskComplete(ActiComplete ActiCompleteVM) string {
|
|
|
|
|
|
@@ -142,15 +142,15 @@ func (this *ActivitiService) TaskComplete(ActiComplete ActiCompleteVM) string {
|
|
|
|
|
|
/*func (this *ActivitiService) MultiTaskComplete(processKey string, formEntityId string, userNames string, multiOrgAudits []MultiOrgAuditVM, userId string, result string, remarks string, callbackUrl string) string {
|
|
|
|
|
|
- var ActiComplete MultiActiCompleteVM
|
|
|
- ActiComplete.ProcessKey = processKey
|
|
|
- ActiComplete.BusinessKey = formEntityId
|
|
|
- ActiComplete.UserNames = userNames
|
|
|
- ActiComplete.MultiOrgAudits = multiOrgAudits
|
|
|
- ActiComplete.UserId = userId
|
|
|
- ActiComplete.Result = result
|
|
|
- ActiComplete.Remarks = remarks
|
|
|
- ActiComplete.CallbackUrl = callbackUrl*/
|
|
|
+var ActiComplete MultiActiCompleteVM
|
|
|
+ActiComplete.ProcessKey = processKey
|
|
|
+ActiComplete.BusinessKey = formEntityId
|
|
|
+ActiComplete.UserNames = userNames
|
|
|
+ActiComplete.MultiOrgAudits = multiOrgAudits
|
|
|
+ActiComplete.UserId = userId
|
|
|
+ActiComplete.Result = result
|
|
|
+ActiComplete.Remarks = remarks
|
|
|
+ActiComplete.CallbackUrl = callbackUrl*/
|
|
|
|
|
|
func (this *ActivitiService) MultiTaskComplete(ActiComplete MultiActiCompleteVM) string {
|
|
|
|
|
|
@@ -203,6 +203,26 @@ func (this *ActivitiService) GetHistoricTasks(processKey string, businessKey str
|
|
|
return historicTasks
|
|
|
}
|
|
|
|
|
|
+func (this *ActivitiService) GetHistoricMultiTasks(processKey string, businessKey string, processInstanceId string) []ActiHistoricTask {
|
|
|
+ var ActiProcess ActiProcessVM
|
|
|
+ ActiProcess.ProcessKey = processKey
|
|
|
+ ActiProcess.BusinessKey = businessKey
|
|
|
+ ActiProcess.ProcessInstanceId = processInstanceId
|
|
|
+ jsonParam, err := json.Marshal(ActiProcess)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err, "生成json字符串错误")
|
|
|
+ }
|
|
|
+ params := string(jsonParam)
|
|
|
+ fmt.Println(params)
|
|
|
+ //token = Authorization(this.Username, this.Password)
|
|
|
+ retVal := this.Post("/historic-multi-tasks", params, "")
|
|
|
+ jsonblob, _ := ioutil.ReadAll(retVal.Body)
|
|
|
+ // var historicTasks []ActiHistoricTask
|
|
|
+ historicTasks := make([]ActiHistoricTask, 0)
|
|
|
+ json.Unmarshal(jsonblob, &historicTasks)
|
|
|
+ return historicTasks
|
|
|
+}
|
|
|
+
|
|
|
func (this *ActivitiService) GetActivitiProccessImage(processInstanceId string) []byte {
|
|
|
var ActiProcess ActiProcessVM
|
|
|
ActiProcess.ProcessInstanceId = processInstanceId
|
|
|
@@ -281,7 +301,6 @@ func (this *ActivitiService) ExcelToPdf(addressUrl string) string {
|
|
|
return retDocUrl
|
|
|
}
|
|
|
|
|
|
-
|
|
|
func (this *ActivitiService) FillWordTemplate(datas map[string]interface{}, templateUrl string, fileName string) string {
|
|
|
var wordTempVM WordTemplateVM
|
|
|
wordTempVM.Datas = datas
|