Просмотр исходного кода

feat: 审批接口增加账号分组字段

lanjianrong 4 лет назад
Родитель
Сommit
20d4c8156d
3 измененных файлов с 8 добавлено и 6 удалено
  1. 1 1
      dao/safe_audit_dao.go
  2. 1 0
      services/safe_service.go
  3. 6 5
      web/viewmodels/safe.go

+ 1 - 1
dao/safe_audit_dao.go

@@ -70,7 +70,7 @@ func (d *SafeAuditDao) GetAuditorsWithOwner(id int, times int, cur_uid int) []vi
 		fmt.Println(err)
 	}
 	auditors = append(auditors, auditor)
-	d.engine.Sql("select pa.`name`, pa.`position`,ca.`audit_id`, ca.`audit_order`, ca.`progress` from `cm_project_account` as pa, `cm_safe_audit` as ca where ca.`safe_id` = ? and ca.`times` = ? and ca.audit_id = pa.id order by `audit_order`", id, times).Find(&auditors)
+	d.engine.Sql("select pa.`name`, pa.`account_gourp`, pa.`position`,ca.`audit_id`, ca.`audit_order`, ca.`progress` from `cm_project_account` as pa, `cm_safe_audit` as ca where ca.`safe_id` = ? and ca.`times` = ? and ca.audit_id = pa.id order by `audit_order`", id, times).Find(&auditors)
 
 	return auditors
 }

+ 1 - 0
services/safe_service.go

@@ -132,6 +132,7 @@ func (s *safeService) GetDetail(id int, pid int) viewmodels.SafeDetail {
 		auditorVM.Name = item.Name
 		auditorVM.Position = item.Position
 		auditorVM.AuditOrder = item.AuditOrder
+		auditorVM.AccountGroup = item.AccountGroup
 		auditorVM.Progress = item.Progress
 
 		encryptAuditors = append(encryptAuditors, auditorVM)

+ 6 - 5
web/viewmodels/safe.go

@@ -73,11 +73,12 @@ type SafeFile struct {
 	CreateTime  time.Time `from:"create_time" json:"createTime"`
 }
 type Auditors struct {
-	Name       string `from:"name" json:"name"`
-	Progress   string `from:"progress" json:"progress"`
-	AuditId    string `from:"audit_id" json:"audit_id"`
-	Position   string `from:"position" json:"position"`
-	AuditOrder int    `from:"audit_order" json:"audit_order"`
+	Name         string `from:"name" json:"name"`
+	Progress     string `from:"progress" json:"progress"`
+	AuditId      string `from:"audit_id" json:"audit_id"`
+	Position     string `from:"position" json:"position"`
+	AuditOrder   int    `from:"audit_order" json:"audit_order"`
+	AccountGroup int    `from:"account_group" json:"account_group"`
 }
 
 type SafeListAuditRecord struct {