正在显示
5 个修改的文件
包含
19 行增加
和
1 行删除
@@ -21,5 +21,5 @@ type AssessContent struct { | @@ -21,5 +21,5 @@ type AssessContent struct { | ||
21 | Name string `json:"name" comment:"名称"` | 21 | Name string `json:"name" comment:"名称"` |
22 | PromptTitle string `json:"promptTitle" comment:"提示项标题"` | 22 | PromptTitle string `json:"promptTitle" comment:"提示项标题"` |
23 | PromptText string `json:"promptText" comment:"提示项正文"` | 23 | PromptText string `json:"promptText" comment:"提示项正文"` |
24 | - EntryItems []domain.EntryItem `json:"entryItems" comment:"填写项"` | 24 | + EntryItems []*domain.EntryItem `json:"entryItems" comment:"填写项"` |
25 | } | 25 | } |
@@ -840,6 +840,7 @@ func (srv StaffAssessServeice) GetAssessSelfInfo(param *query.AssessInfoQuery) ( | @@ -840,6 +840,7 @@ func (srv StaffAssessServeice) GetAssessSelfInfo(param *query.AssessInfoQuery) ( | ||
840 | Name: v.Name, | 840 | Name: v.Name, |
841 | PromptTitle: v.PromptTitle, | 841 | PromptTitle: v.PromptTitle, |
842 | PromptText: v.PromptText, | 842 | PromptText: v.PromptText, |
843 | + EntryItems: v.EntryItems, | ||
843 | }) | 844 | }) |
844 | } | 845 | } |
845 | result.AssessContent = assessContent | 846 | result.AssessContent = assessContent |
@@ -2,6 +2,7 @@ package pg | @@ -2,6 +2,7 @@ package pg | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | + | ||
5 | "github.com/go-pg/pg/v10" | 6 | "github.com/go-pg/pg/v10" |
6 | "github.com/go-pg/pg/v10/orm" | 7 | "github.com/go-pg/pg/v10/orm" |
7 | "github.com/linmadan/egglib-go/persistent/pg/comment" | 8 | "github.com/linmadan/egglib-go/persistent/pg/comment" |
@@ -38,6 +39,8 @@ func init() { | @@ -38,6 +39,8 @@ func init() { | ||
38 | &models.EvaluationCycle{}, | 39 | &models.EvaluationCycle{}, |
39 | &models.EvaluationCycleTemplate{}, | 40 | &models.EvaluationCycleTemplate{}, |
40 | &models.EvaluationProject{}, | 41 | &models.EvaluationProject{}, |
42 | + &models.StaffAssess{}, | ||
43 | + &models.StaffAssessTask{}, | ||
41 | } | 44 | } |
42 | for _, model := range tables { | 45 | for _, model := range tables { |
43 | err := DB.Model(model).CreateTable(&orm.CreateTableOptions{ | 46 | err := DB.Model(model).CreateTable(&orm.CreateTableOptions{ |
@@ -12,12 +12,16 @@ type StaffAssess struct { | @@ -12,12 +12,16 @@ type StaffAssess struct { | ||
12 | Id int `pg:",pk"` //id | 12 | Id int `pg:",pk"` //id |
13 | CompanyId int `comment:"公司id"` //公司id | 13 | CompanyId int `comment:"公司id"` //公司id |
14 | EvaluationProjectId int `comment:"对应的项目id"` //对应的项目id | 14 | EvaluationProjectId int `comment:"对应的项目id"` //对应的项目id |
15 | + EvaluationProjectName string | ||
15 | CycleId int64 `comment:"对应的周期id"` //对应的周期id | 16 | CycleId int64 `comment:"对应的周期id"` //对应的周期id |
17 | + CycleName string | ||
18 | + StaffAssessTaskId int | ||
16 | TargetUser domain.StaffDesc `comment:"被评估的目标用户"` //被评估的目标用户 | 19 | TargetUser domain.StaffDesc `comment:"被评估的目标用户"` //被评估的目标用户 |
17 | TargetDepartment []domain.StaffDepartment `comment:"被评估的用户所在的部门"` //被评估的用户所在的部门 | 20 | TargetDepartment []domain.StaffDepartment `comment:"被评估的用户所在的部门"` //被评估的用户所在的部门 |
18 | Executor domain.StaffDesc `comment:"填写评估的用户"` //填写评估的用户 | 21 | Executor domain.StaffDesc `comment:"填写评估的用户"` //填写评估的用户 |
19 | Types string `comment:"填写评估对应的类型"` //填写评估对应的类型 | 22 | Types string `comment:"填写评估对应的类型"` //填写评估对应的类型 |
20 | LinkNodeId int `comment:"评估环节id"` | 23 | LinkNodeId int `comment:"评估环节id"` |
24 | + LinkNodeName string | ||
21 | Status string `comment:"评估的填写状态"` //评估的填写状态 | 25 | Status string `comment:"评估的填写状态"` //评估的填写状态 |
22 | BeginTime time.Time `comment:"开始时间"` //开始时间 | 26 | BeginTime time.Time `comment:"开始时间"` //开始时间 |
23 | EndTime time.Time `comment:"截止时间"` //截止时间 | 27 | EndTime time.Time `comment:"截止时间"` //截止时间 |
@@ -26,11 +26,16 @@ func (repo *StaffAssessRepository) TransformToDomain(d *models.StaffAssess) *dom | @@ -26,11 +26,16 @@ func (repo *StaffAssessRepository) TransformToDomain(d *models.StaffAssess) *dom | ||
26 | Id: d.Id, | 26 | Id: d.Id, |
27 | CompanyId: d.CompanyId, | 27 | CompanyId: d.CompanyId, |
28 | EvaluationProjectId: d.EvaluationProjectId, | 28 | EvaluationProjectId: d.EvaluationProjectId, |
29 | + EvaluationProjectName: d.EvaluationProjectName, | ||
29 | CycleId: d.CycleId, | 30 | CycleId: d.CycleId, |
31 | + CycleName: d.CycleName, | ||
32 | + StaffAssessTaskId: d.StaffAssessTaskId, | ||
30 | TargetUser: d.TargetUser, | 33 | TargetUser: d.TargetUser, |
31 | TargetDepartment: d.TargetDepartment, | 34 | TargetDepartment: d.TargetDepartment, |
32 | Executor: d.Executor, | 35 | Executor: d.Executor, |
33 | Types: domain.StaffAssessType(d.Types), | 36 | Types: domain.StaffAssessType(d.Types), |
37 | + LinkNodeId: d.LinkNodeId, | ||
38 | + LinkNodeName: d.LinkNodeName, | ||
34 | Status: domain.StaffAssessStatus(d.Status), | 39 | Status: domain.StaffAssessStatus(d.Status), |
35 | BeginTime: d.BeginTime, | 40 | BeginTime: d.BeginTime, |
36 | EndTime: d.EndTime, | 41 | EndTime: d.EndTime, |
@@ -45,11 +50,16 @@ func (repo *StaffAssessRepository) Save(d *domain.StaffAssess) (*domain.StaffAss | @@ -45,11 +50,16 @@ func (repo *StaffAssessRepository) Save(d *domain.StaffAssess) (*domain.StaffAss | ||
45 | Id: d.Id, | 50 | Id: d.Id, |
46 | CompanyId: d.CompanyId, | 51 | CompanyId: d.CompanyId, |
47 | EvaluationProjectId: d.EvaluationProjectId, | 52 | EvaluationProjectId: d.EvaluationProjectId, |
53 | + EvaluationProjectName: d.EvaluationProjectName, | ||
48 | CycleId: d.CycleId, | 54 | CycleId: d.CycleId, |
55 | + CycleName: d.CycleName, | ||
56 | + StaffAssessTaskId: d.StaffAssessTaskId, | ||
49 | TargetUser: d.TargetUser, | 57 | TargetUser: d.TargetUser, |
50 | TargetDepartment: d.TargetDepartment, | 58 | TargetDepartment: d.TargetDepartment, |
51 | Executor: d.Executor, | 59 | Executor: d.Executor, |
52 | Types: string(d.Types), | 60 | Types: string(d.Types), |
61 | + LinkNodeId: d.LinkNodeId, | ||
62 | + LinkNodeName: d.LinkNodeName, | ||
53 | Status: string(d.Status), | 63 | Status: string(d.Status), |
54 | BeginTime: d.BeginTime, | 64 | BeginTime: d.BeginTime, |
55 | EndTime: d.EndTime, | 65 | EndTime: d.EndTime, |
-
请 注册 或 登录 后发表评论