Kaynağa Gözat

多实例审核功能

yuedefeng 6 yıl önce
ebeveyn
işleme
7c678d7d5f

+ 46 - 10
src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplierService.go

@@ -1,11 +1,10 @@
 package supplier
 
 import (
-	"dashoo.cn/backend/api/business/workflow"
 	. "dashoo.cn/backend/api/mydb"
 	"dashoo.cn/utils"
-	"fmt"
 	"github.com/go-xorm/xorm"
+	"strconv"
 )
 
 type OilSupplierService struct {
@@ -18,12 +17,49 @@ func GetOilSupplierService(xormEngine *xorm.Engine) *OilSupplierService {
 	return s
 }
 
-//关联委托方信息获取任务详情
-func (s *OilSupplierService) StartAudit() {
-	//启动数据录入工作流
-	svcActiviti := workflow.GetActivitiService(utils.DBE)
-	processInstanceId := svcActiviti.StartProcess(workflow.OIL_SUPPLIER_APPLY, "4", "1")
-	fmt.Println(processInstanceId)
-	svcActiviti.TaskComplete(workflow.OIL_SUPPLIER_APPLY, "4", "org_1,org_2", "1", "1", "no")
-	return
+//
+func (s *OilSupplierService) GetMyPagingEntitiesWithOrderBytbl(supplierTableName, supplierCertTableName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where string) (total int64) {
+	var resultsSlice []map[string][]byte
+
+	//获取总记录数
+	sqlCount := `select count(*) from ` + supplierTableName + ` a `
+	sqlCount += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
+	sqlCount += ` where ` + where
+
+	var sql string
+	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, `
+	sql += ` b.WorkerTotal, `
+	sql += ` b.ContractNum, `
+	sql += ` b.UniversityNum, `
+	sql += ` b.TechnicalNum, `
+	sql += ` b.AboveProfNum, `
+	sql += ` b.MiddleProfNum, `
+	sql += ` b.NationalRegNum, `
+	sql += ` b.NationalCertTotal, `
+	sql += ` b.DesignerTotal, `
+	sql += ` b.SkillerTotal, `
+	sql += ` b.Status, `
+	sql += ` b.WorkflowId `
+	sql += ` from ` + supplierTableName + ` a `
+	sql += ` left join ` + supplierCertTableName + " b on b.SupplierId = a.Id"
+	sql += ` where ` + where
+	if asc {
+		sql += ` order by ` + orderby + ` ASC `
+	} else {
+		sql += ` order by ` + orderby + ` DESC `
+	}
+	sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
+	s.DBE.SQL(sql).Find(entitiesPtr)
+
+	resultsSlice, _ = s.DBE.Query(sqlCount)
+
+	if len(resultsSlice) > 0 {
+		results := resultsSlice[0]
+		for _, value := range results {
+			total, _ = strconv.ParseInt(string(value), 10, 64)
+			break
+		}
+	}
+
+	return total
 }

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercert.go

@@ -62,3 +62,4 @@ type OilSupplierVM struct {
 	SupplierTypeCode string
 	SupplierTypeName string
 }
+

+ 3 - 2
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercertService.go

@@ -17,13 +17,14 @@ func GetOilSupplierCertService(xormEngine *xorm.Engine) *OilSupplierCertService
 }
 
 //关联委托方信息获取任务详情
-func (s *OilSupplierCertService) StartAudit(certId string, userNames string, userId string, result string, remarks string) {
+func (s *OilSupplierCertService) StartAudit(certId string, userNames string, orgAudits []workflow.MultiOrgAuditVM, userId string, result string, remarks string) {
 	//启动数据录入工作流
 	svcActiviti := workflow.GetActivitiService(s.DBE)
 	processInstanceId := svcActiviti.StartProcess(workflow.OIL_SUPPLIER_APPLY, certId, userId)
 
 	//fmt.Println(processInstanceId)
-	svcActiviti.TaskComplete(workflow.OIL_SUPPLIER_APPLY, certId, userNames, userId, result, remarks)
+	//多实例提交给下一步
+	svcActiviti.MultiTaskComplete(workflow.OIL_SUPPLIER_APPLY, certId, userNames, orgAudits, userId, result, remarks)
 
 	//记下workflowID
 	var supplierCertEntity OilSupplierCert

+ 23 - 1
src/dashoo.cn/backend/api/business/workflow/ActivitiService.go

@@ -32,7 +32,7 @@ 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://192.168.0.165:8081/api/acti"
+	//s.BaseUrl = "http://localhost:8081/api/acti"
 	s.BaseUrl = "http://47.92.212.59:8080/acti-api/api/acti"
 	//s.BaseUrl = "http://192.168.0.171:8081/api/acti"
 	s.AposeUrl = "http://47.92.212.59:8080/acti-api/api/apose"
@@ -138,6 +138,28 @@ func (this *ActivitiService) TaskComplete(processKey string, formEntityId string
 	return string(p)
 }
 
+func (this *ActivitiService) MultiTaskComplete(processKey string, formEntityId string, userNames string, multiOrgAudits []MultiOrgAuditVM, userId string, result string, remarks 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
+	jsonParams, err := json.Marshal(ActiComplete)
+	if err != nil {
+		fmt.Println(err, "生成json字符串错误")
+	}
+	params := string(jsonParams)
+	fmt.Println(params)
+	//token = Authorization(this.Username, this.Password)
+	retVal := this.Post("/multi-task-complete", params, "")
+	p, _ := ioutil.ReadAll(retVal.Body)
+	return string(p)
+}
+
 func (this *ActivitiService) GetMyTasks(processKey string, userId string) string {
 	var ActiMyTasks ActiMyTasksVM
 	ActiMyTasks.ProcessKey = processKey

+ 16 - 0
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -46,6 +46,22 @@ type WordTemplateVM struct {
 	FileName    string                 `json:"fileName"`
 }
 
+type MultiActiCompleteVM struct {
+	ProcessKey  	string 				`json:"processKey"`
+	BusinessKey 	string 				`json:"businessKey"`
+	UserNames   	string 				`json:"userNames"`
+	UserId      	string 				`json:"userId"`
+	Result      	string 				`json:"result"`
+	Remarks     	string 				`json:"remarks"`
+	MultiOrgAudits 	[]MultiOrgAuditVM 	`json:"multiOrgAudits"`
+}
+
+type MultiOrgAuditVM struct {
+	OrgId     string    `json:"orgId"`
+	OrgName   string    `json:"orgName"`
+	UserIds   string   `json:"userIds"`
+}
+
 const (
 	//供方准入、增项业务流程图
 	OIL_SUPPLIER_APPLY string = "oil_supplier_apply"

+ 3 - 3
src/dashoo.cn/backend/api/controllers/base.go

@@ -268,7 +268,7 @@ func (this *BaseController) Prepare() {
 		"/api/webinterface/preparelist", "/api/webinterface/prepareinfo",
 		"/api/sampletest_v/sampletest", "/api/sampletest_v/getpass", "/api/sampletest_v/editpass/",
 		"/api/sampletest_v/donorsdetail", "/api/sampletest_v/testdetail", "/api/uploads/samplesinput", "/api/doctemplate_onlyoffice/callback", "/api/doctemplate_onlyoffice/viewcallback", "/api/limsupload/usersignimg",
-		"/api/uploads/samplestypeimg", "/api/limsdataentry/historyimg/", "/api/document/getdocumentnameandtime"}
+		"/api/uploads/samplestypeimg", "/api/workflow/historyimg/", "/api/document/getdocumentnameandtime"}
 	for _, v := range urls {
 		fmt.Println("**this.Ctx.Input.URL()**", this.Ctx.Input.URL())
 		if this.Ctx.Input.URL() == v {
@@ -280,9 +280,9 @@ func (this *BaseController) Prepare() {
 			fmt.Println("/api/sampletest_v/editpass/")
 			break
 		}
-		if strings.Contains(this.Ctx.Input.URL(), "/api/limsdataentry/historyimg/") {
+		if strings.Contains(this.Ctx.Input.URL(), "/api/workflow/historyimg/") {
 			find = true
-			fmt.Println("/api/limsdataentry/historyimg/")
+			fmt.Println("/api/workflow/historyimg/")
 			break
 		}
 	}

+ 300 - 33
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1,6 +1,7 @@
 package oilsupplier
 
 import (
+	"dashoo.cn/backend/api/business/workflow"
 	"encoding/json"
 	"strconv"
 	"strings"
@@ -629,38 +630,314 @@ func (this *OilSupplierController) GetJoinCertEntityList() {
 	svc := supplier.GetOilSupplierService(utils.DBE)
 	var list []supplier.OilSupplierView
 
-	var total int64
-	if where == "" {
-		where = " 1=1 "
+	total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []supplier.OilSupplierView
+// @router /mytasks [get]
+func (this *OilSupplierController) GetMyTaskEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	SupplierName := this.GetString("SupplierName")
+	OilCertificateNo := this.GetString("OilCertificateNo")
+	Grade := this.GetString("Grade")
+	MgrUnit := this.GetString("MgrUnit")
+	OperType := this.GetString("OperType")
+	Country := this.GetString("Country")
+	MaunAgent := this.GetString("MaunAgent")
+	ConstructTeam := this.GetString("ConstructTeam")
+	CommercialNo := this.GetString("CommercialNo")
+	OrganCode := this.GetString("OrganCode")
+	CountryTaxNo := this.GetString("CountryTaxNo")
+	LocalTaxNo := this.GetString("LocalTaxNo")
+	Address := this.GetString("Address")
+	Province := this.GetString("Province")
+	City := this.GetString("City")
+	Street := this.GetString("Street")
+	HouseNo := this.GetString("HouseNo")
+	ZipCode := this.GetString("ZipCode")
+	QualitySystemCert := this.GetString("QualitySystemCert")
+	ProductQualityCert := this.GetString("ProductQualityCert")
+	MaunLicense := this.GetString("MaunLicense")
+	QualifCert := this.GetString("QualifCert")
+	QualifCertLevel := this.GetString("QualifCertLevel")
+	SafetyLicense := this.GetString("SafetyLicense")
+	TechServiceLic := this.GetString("TechServiceLic")
+	TJInNotify := this.GetString("TJInNotify")
+	SpecIndustryCert := this.GetString("SpecIndustryCert")
+	LegalPerson := this.GetString("LegalPerson")
+	CategoryCode := this.GetString("CategoryCode")
+	CategoryName := this.GetString("CategoryName")
+	RegCapital := this.GetString("RegCapital")
+	Currency := this.GetString("Currency")
+	ContactName := this.GetString("ContactName")
+	CompanyType := this.GetString("CompanyType")
+	SetupTime := this.GetString("SetupTime")
+	DepositBank := this.GetString("DepositBank")
+	BankAccount := this.GetString("BankAccount")
+	EMail := this.GetString("EMail")
+	BankCreditRating := this.GetString("BankCreditRating")
+	Mobile := this.GetString("Mobile")
+	Telphone := this.GetString("Telphone")
+	Fax := this.GetString("Fax")
+	CompanyTel := this.GetString("CompanyTel")
+	QQ := this.GetString("QQ")
+	CompanyUrl := this.GetString("CompanyUrl")
+	SpecSupplier := this.GetString("SpecSupplier")
+	SpecTypeCode := this.GetString("SpecTypeCode")
+	SpecTypeName := this.GetString("SpecTypeName")
+	Remark := this.GetString("Remark")
+	CreateOn := this.GetString("CreateOn")
+	SupplierTypeCode := this.GetString("SupplierTypeCode")
+
+	if Id != "" {
+		where = where + " and a.Id like '%" + Id + "%'"
 	}
 
-	//获取总记录数
-	sqlCount := `select count(*) from ` + OilSupplierName + ` a `
-	sqlCount += ` left join ` + OilSupplierCertName + " b on b.SupplierId = a.Id"
-	sqlCount += ` where ` + where
+	if SupplierName != "" {
+		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
+	}
 
-	var sql string
-	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName from ` + OilSupplierName + ` a `
-	sql += ` left join ` + OilSupplierCertName + " b on b.SupplierId = a.Id"
-	sql += ` where ` + where
-	if asc {
-		sql += ` order by ` + orderby + ` ASC `
-	} else {
-		sql += ` order by ` + orderby + ` DESC `
+	if OilCertificateNo != "" {
+		where = where + " and a.OilCertificateNo like '%" + OilCertificateNo + "%'"
+	}
+
+	if Grade != "" {
+		where = where + " and a.Grade like '%" + Grade + "%'"
+	}
+
+	if MgrUnit != "" {
+		where = where + " and a.MgrUnit like '%" + MgrUnit + "%'"
+	}
+
+	if OperType != "" {
+		where = where + " and a.OperType like '%" + OperType + "%'"
+	}
+
+	if Country != "" {
+		where = where + " and a.Country like '%" + Country + "%'"
+	}
+
+	if MaunAgent != "" {
+		where = where + " and a.MaunAgent like '%" + MaunAgent + "%'"
+	}
+
+	if ConstructTeam != "" {
+		where = where + " and a.ConstructTeam like '%" + ConstructTeam + "%'"
+	}
+
+	if CommercialNo != "" {
+		where = where + " and a.CommercialNo like '%" + CommercialNo + "%'"
+	}
+
+	if OrganCode != "" {
+		where = where + " and a.OrganCode like '%" + OrganCode + "%'"
 	}
-	sql += ` limit ` + utils.ToStr((page.CurrentPage-1)*page.Size) + "," + utils.ToStr(page.Size)
-	utils.DBE.SQL(sql).Find(&list)
 
-	resultsSlice, _ := svc.DBE.Query(sqlCount)
+	if CountryTaxNo != "" {
+		where = where + " and a.CountryTaxNo like '%" + CountryTaxNo + "%'"
+	}
+
+	if LocalTaxNo != "" {
+		where = where + " and a.LocalTaxNo like '%" + LocalTaxNo + "%'"
+	}
+
+	if Address != "" {
+		where = where + " and a.Address like '%" + Address + "%'"
+	}
+
+	if Province != "" {
+		where = where + " and a.Province like '%" + Province + "%'"
+	}
+
+	if City != "" {
+		where = where + " and a.City like '%" + City + "%'"
+	}
+
+	if Street != "" {
+		where = where + " and a.Street like '%" + Street + "%'"
+	}
+
+	if HouseNo != "" {
+		where = where + " and a.HouseNo like '%" + HouseNo + "%'"
+	}
 
-	if len(resultsSlice) > 0 {
-		results := resultsSlice[0]
-		for _, value := range results {
-			total, _ = strconv.ParseInt(string(value), 10, 64)
-			break
+	if ZipCode != "" {
+		where = where + " and a.ZipCode like '%" + ZipCode + "%'"
+	}
+
+	if QualitySystemCert != "" {
+		where = where + " and a.QualitySystemCert like '%" + QualitySystemCert + "%'"
+	}
+
+	if ProductQualityCert != "" {
+		where = where + " and a.ProductQualityCert like '%" + ProductQualityCert + "%'"
+	}
+
+	if MaunLicense != "" {
+		where = where + " and a.MaunLicense like '%" + MaunLicense + "%'"
+	}
+
+	if QualifCert != "" {
+		where = where + " and a.QualifCert like '%" + QualifCert + "%'"
+	}
+
+	if QualifCertLevel != "" {
+		where = where + " and a.QualifCertLevel like '%" + QualifCertLevel + "%'"
+	}
+
+	if SafetyLicense != "" {
+		where = where + " and a.SafetyLicense like '%" + SafetyLicense + "%'"
+	}
+
+	if TechServiceLic != "" {
+		where = where + " and a.TechServiceLic like '%" + TechServiceLic + "%'"
+	}
+
+	if TJInNotify != "" {
+		where = where + " and a.TJInNotify like '%" + TJInNotify + "%'"
+	}
+
+	if SpecIndustryCert != "" {
+		where = where + " and a.SpecIndustryCert like '%" + SpecIndustryCert + "%'"
+	}
+
+	if LegalPerson != "" {
+		where = where + " and a.LegalPerson like '%" + LegalPerson + "%'"
+	}
+
+	if CategoryCode != "" {
+		where = where + " and a.CategoryCode like '%" + CategoryCode + "%'"
+	}
+
+	if CategoryName != "" {
+		where = where + " and a.CategoryName like '%" + CategoryName + "%'"
+	}
+
+	if RegCapital != "" {
+		where = where + " and a.RegCapital like '%" + RegCapital + "%'"
+	}
+
+	if Currency != "" {
+		where = where + " and a.Currency like '%" + Currency + "%'"
+	}
+
+	if ContactName != "" {
+		where = where + " and a.ContactName like '%" + ContactName + "%'"
+	}
+
+	if CompanyType != "" {
+		where = where + " and a.CompanyType like '%" + CompanyType + "%'"
+	}
+
+	if SetupTime != "" {
+		where = where + " and a.SetupTime like '%" + SetupTime + "%'"
+	}
+
+	if DepositBank != "" {
+		where = where + " and a.DepositBank like '%" + DepositBank + "%'"
+	}
+
+	if BankAccount != "" {
+		where = where + " and a.BankAccount like '%" + BankAccount + "%'"
+	}
+
+	if EMail != "" {
+		where = where + " and a.EMail like '%" + EMail + "%'"
+	}
+
+	if BankCreditRating != "" {
+		where = where + " and a.BankCreditRating like '%" + BankCreditRating + "%'"
+	}
+
+	if Mobile != "" {
+		where = where + " and a.Mobile like '%" + Mobile + "%'"
+	}
+
+	if Telphone != "" {
+		where = where + " and a.Telphone like '%" + Telphone + "%'"
+	}
+
+	if Fax != "" {
+		where = where + " and a.Fax like '%" + Fax + "%'"
+	}
+
+	if CompanyTel != "" {
+		where = where + " and a.CompanyTel like '%" + CompanyTel + "%'"
+	}
+
+	if QQ != "" {
+		where = where + " and a.QQ like '%" + QQ + "%'"
+	}
+
+	if CompanyUrl != "" {
+		where = where + " and a.CompanyUrl like '%" + CompanyUrl + "%'"
+	}
+
+	if SpecSupplier != "" {
+		where = where + " and a.SpecSupplier like '%" + SpecSupplier + "%'"
+	}
+
+	if SpecTypeCode != "" {
+		where = where + " and a.SpecTypeCode like '%" + SpecTypeCode + "%'"
+	}
+
+	if SpecTypeName != "" {
+		where = where + " and a.SpecTypeName like '%" + SpecTypeName + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and a.Remark like '%" + Remark + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
 		}
 	}
 
+	if SupplierTypeCode != "" {
+		where = where + " and b.SupplierTypeCode = '" + SupplierTypeCode + "'"
+	}
+
+	//找出待办任务
+	actisvc := workflow.GetActivitiService(utils.DBE)
+	certIdList := actisvc.GetMyTasks(workflow.OIL_SUPPLIER_APPLY, this.User.Id)
+	where += "b.Id in (" + certIdList + ")"
+	//根据部门查询待办任务
+
+
+	svc := supplier.GetOilSupplierService(utils.DBE)
+	var list []supplier.OilSupplierView
+
+	total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total
@@ -1052,13 +1329,3 @@ func (this *OilSupplierController) DeleteEntity() {
 	}
 }
 
-// @Title 启动工作流
-// @Description 启动工作流
-// @Param 	body body supplier.OilSupplier
-// @Success	200	{object} controllers.Request
-// @router /workflow/:id [post]
-func (this *OilSupplierController) StartAudit() {
-	//测试多实例工作流
-	svcFlow := supplier.GetOilSupplierService(utils.DBE)
-	svcFlow.StartAudit()
-}

+ 24 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -1,6 +1,7 @@
 package oilsupplier
 
 import (
+	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/classorgsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/workflow"
@@ -12,7 +13,7 @@ import (
 	"dashoo.cn/backend/api/business/baseUser"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
 	. "dashoo.cn/backend/api/controllers"
-	"dashoo.cn/business/userRole"
+	"dashoo.cn/business2/userRole"
 	"dashoo.cn/utils"
 )
 
@@ -504,14 +505,35 @@ func (this *OilSupplierCertController) AuditEntity() {
 	where += " and AuditStepCode = '" + workflow.FIRST_TRIAL + "'"
 	classorgSrv.GetEntitysByWhere(OilClassOrgSettingName, where, &list)
 
+	var orgAudits []workflow.MultiOrgAuditVM
+
+	userSvc := userRole.GetUserService(utils.DBE)
+	auditSrv := auditsetting.GetOilAuditSettingService(utils.DBE)
 	for _, certsetting := range list {
+		var auditSetting auditsetting.Base_OilAuditSetting
+		var orgAudit workflow.MultiOrgAuditVM
+		orgAudit.OrgId = strconv.Itoa(certsetting.OrganizeId)
+		orgAudit.OrgName = certsetting.OrganizeName
+
+		auditWhere := " 1=1 "
+		auditWhere += " and OrganizeId = '" + strconv.Itoa(certsetting.OrganizeId) + "'"
+		auditWhere += " and AuditStepCode = '" + workflow.FIRST_TRIAL + "'"
+		auditSrv.GetEntity(&auditSetting, auditWhere)
+		userIds := userSvc.GetUserIdsByRoleId(strconv.Itoa(auditSetting.RoleId))
+		tempstr := strings.Join(userIds, ",")
+		orgAudit.UserIds = strings.Replace(tempstr, "uid_", "", -1)
+		orgAudits = append(orgAudits, orgAudit)
+
 		orgListStr += "org_"+strconv.Itoa(certsetting.OrganizeId) + ","
 	}
 	orgListStr = strings.Trim(orgListStr, ",")
+
+	//多实例部门审批
+
     if len(orgListStr) > 0 {
 		//测试多实例工作流
 		svcFlow := suppliercert.GetOilSupplierCertService(utils.DBE)
-		svcFlow.StartAudit(Id, orgListStr, this.User.Id, "1", "提交给二级部门初审")
+		svcFlow.StartAudit(Id, orgListStr, orgAudits, this.User.Id, "1", "提交给二级部门初审")
 
 	}
 

+ 11 - 0
src/dashoo.cn/backend/api/controllers/workflow/workflow.go

@@ -55,3 +55,14 @@ func (this *WorkflowController) UserList() {
 	this.ServeJSON()
 }
 
+// @Title get
+// @Description get SampleType by token
+// @Success 200 {object} samplesubpackage.SampleSubpackage
+// @router /historyimg/:id [get]
+func (this *WorkflowController) GetHistoricImg() {
+	processInstanceId := this.Ctx.Input.Param(":id")
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	entity := svcActiviti.GetActivitiProccessImage(processInstanceId)
+	this.Ctx.Output.Body(entity)
+}
+

+ 1 - 1
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -144,7 +144,7 @@ module.exports = {
     imgserverhost: 'http://47.92.249.239:10092', // 图片上传地址
     upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
     limsimgserverhost:'http://47.92.249.239:10092',//图片上传
-    baseURL: '//47.92.249.239:10092/api/'
+    baseURL: '//localhost:10091/api/'
   },
   ignore: [
     /*'pages/setting/!**!/!*.*',*/

+ 1 - 2
src/dashoo.cn/frontend_web/src/components/workflow/wfhistory.vue

@@ -27,7 +27,7 @@
       </el-table-column>
     </el-table>
     <div style="margin-top:10px;">
-      <img :src="baseurl + 'limsdataentry/historyimg/' + entryinfo.instance " v-if="entryinfo.instance">
+      <img :src="baseurl + 'workflow/historyimg/' + entryinfo.instance " v-if="entryinfo.instance">
     </div>
   </div>
 </template>
@@ -114,7 +114,6 @@
           .then(res => {
             // response
             _this.userlist = res.data.items
-
             this.getHistoryTask()
           })
           .catch(err => {