正在显示
2 个修改的文件
包含
8 行增加
和
3 行删除
@@ -34,7 +34,7 @@ func (rs *EvaluationTemplateService) Create(in *command.CreateTemplateCommand) ( | @@ -34,7 +34,7 @@ func (rs *EvaluationTemplateService) Create(in *command.CreateTemplateCommand) ( | ||
34 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 34 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
35 | } | 35 | } |
36 | if count > 0 { | 36 | if count > 0 { |
37 | - return nil, application.ThrowError(application.BUSINESS_ERROR, "名称已存在") | 37 | + return nil, application.ThrowError(application.BUSINESS_ERROR, "已存在相同名称的评估模板") |
38 | } | 38 | } |
39 | 39 | ||
40 | linkNodes := make([]*domain.LinkNode, 0) | 40 | linkNodes := make([]*domain.LinkNode, 0) |
@@ -44,30 +44,35 @@ func (rs *EvaluationTemplateService) Create(in *command.CreateTemplateCommand) ( | @@ -44,30 +44,35 @@ func (rs *EvaluationTemplateService) Create(in *command.CreateTemplateCommand) ( | ||
44 | Id: sid + 1, | 44 | Id: sid + 1, |
45 | Type: domain.LinkNodeSelfAssessment, | 45 | Type: domain.LinkNodeSelfAssessment, |
46 | Name: "填写自评反馈", | 46 | Name: "填写自评反馈", |
47 | + NodeContents: make([]*domain.NodeContent, 0), | ||
47 | KpiCycle: domain.KpiCycleDay, | 48 | KpiCycle: domain.KpiCycleDay, |
48 | }) | 49 | }) |
49 | linkNodes = append(linkNodes, &domain.LinkNode{ | 50 | linkNodes = append(linkNodes, &domain.LinkNode{ |
50 | Id: sid + 2, | 51 | Id: sid + 2, |
51 | Type: domain.LinkNodeAllInvite, | 52 | Type: domain.LinkNodeAllInvite, |
52 | Name: "360°邀请", | 53 | Name: "360°邀请", |
54 | + NodeContents: make([]*domain.NodeContent, 0), | ||
53 | KpiCycle: domain.KpiCycleDay, | 55 | KpiCycle: domain.KpiCycleDay, |
54 | }) | 56 | }) |
55 | linkNodes = append(linkNodes, &domain.LinkNode{ | 57 | linkNodes = append(linkNodes, &domain.LinkNode{ |
56 | Id: sid + 3, | 58 | Id: sid + 3, |
57 | Type: domain.LinkNodeAllAssessment, | 59 | Type: domain.LinkNodeAllAssessment, |
58 | Name: "360°评估", | 60 | Name: "360°评估", |
61 | + NodeContents: make([]*domain.NodeContent, 0), | ||
59 | KpiCycle: domain.KpiCycleDay, | 62 | KpiCycle: domain.KpiCycleDay, |
60 | }) | 63 | }) |
61 | linkNodes = append(linkNodes, &domain.LinkNode{ | 64 | linkNodes = append(linkNodes, &domain.LinkNode{ |
62 | Id: sid + 4, | 65 | Id: sid + 4, |
63 | Type: domain.LinkNodeSuperiorAssessment, | 66 | Type: domain.LinkNodeSuperiorAssessment, |
64 | Name: "上级评估", | 67 | Name: "上级评估", |
68 | + NodeContents: make([]*domain.NodeContent, 0), | ||
65 | KpiCycle: domain.KpiCycleDay, | 69 | KpiCycle: domain.KpiCycleDay, |
66 | }) | 70 | }) |
67 | linkNodes = append(linkNodes, &domain.LinkNode{ | 71 | linkNodes = append(linkNodes, &domain.LinkNode{ |
68 | Id: sid + 5, | 72 | Id: sid + 5, |
69 | Type: domain.LinkNodeViewResult, | 73 | Type: domain.LinkNodeViewResult, |
70 | Name: "绩效结果查看", | 74 | Name: "绩效结果查看", |
75 | + NodeContents: make([]*domain.NodeContent, 0), | ||
71 | KpiCycle: domain.KpiCycleDay, | 76 | KpiCycle: domain.KpiCycleDay, |
72 | }) | 77 | }) |
73 | 78 |
@@ -33,7 +33,7 @@ type EntryItem struct { | @@ -33,7 +33,7 @@ type EntryItem struct { | ||
33 | type NodeContent struct { | 33 | type NodeContent struct { |
34 | Category string `json:"category" comment:"类别"` | 34 | Category string `json:"category" comment:"类别"` |
35 | Name string `json:"name" comment:"名称"` | 35 | Name string `json:"name" comment:"名称"` |
36 | - RuleId int64 `json:"ruleId" comment:"评估规则ID"` | 36 | + RuleId int64 `json:"ruleId,string" comment:"评估规则ID"` |
37 | Rule *EvaluationRule `json:"rule" comment:"评估规则对象"` | 37 | Rule *EvaluationRule `json:"rule" comment:"评估规则对象"` |
38 | PromptTitle string `json:"promptTitle" comment:"提示项标题"` | 38 | PromptTitle string `json:"promptTitle" comment:"提示项标题"` |
39 | PromptText string `json:"promptText" comment:"提示项正文"` | 39 | PromptText string `json:"promptText" comment:"提示项正文"` |
@@ -59,7 +59,7 @@ type LinkNode struct { | @@ -59,7 +59,7 @@ type LinkNode struct { | ||
59 | NodeContents []*NodeContent `json:"nodeContents" comment:"环节-评估内容"` | 59 | NodeContents []*NodeContent `json:"nodeContents" comment:"环节-评估内容"` |
60 | TimeStart *time.Time `json:"timeStart" comment:"起始时间"` | 60 | TimeStart *time.Time `json:"timeStart" comment:"起始时间"` |
61 | TimeEnd *time.Time `json:"timeEnd" comment:"截至时间"` | 61 | TimeEnd *time.Time `json:"timeEnd" comment:"截至时间"` |
62 | - KpiCycle int `json:"state" comment:"考核周期(1日、2周、3月)"` | 62 | + KpiCycle int `json:"kpiCycle" comment:"考核周期(1日、2周、3月)"` |
63 | //NodeAllInvite *NodeAllInvite `json:"nodeAllInvite" comment:"360°邀请人员"` | 63 | //NodeAllInvite *NodeAllInvite `json:"nodeAllInvite" comment:"360°邀请人员"` |
64 | 64 | ||
65 | } | 65 | } |
-
请 注册 或 登录 后发表评论