|
@@ -34,41 +34,46 @@ func (rs *EvaluationTemplateService) Create(in *command.CreateTemplateCommand) ( |
|
@@ -34,41 +34,46 @@ 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)
|
41
|
|
41
|
|
42
|
sid, _ := utils.NewSnowflakeId()
|
42
|
sid, _ := utils.NewSnowflakeId()
|
43
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
43
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
44
|
- Id: sid + 1,
|
|
|
45
|
- Type: domain.LinkNodeSelfAssessment,
|
|
|
46
|
- Name: "填写自评反馈",
|
|
|
47
|
- KpiCycle: domain.KpiCycleDay,
|
44
|
+ Id: sid + 1,
|
|
|
45
|
+ Type: domain.LinkNodeSelfAssessment,
|
|
|
46
|
+ Name: "填写自评反馈",
|
|
|
47
|
+ NodeContents: make([]*domain.NodeContent, 0),
|
|
|
48
|
+ KpiCycle: domain.KpiCycleDay,
|
48
|
})
|
49
|
})
|
49
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
50
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
50
|
- Id: sid + 2,
|
|
|
51
|
- Type: domain.LinkNodeAllInvite,
|
|
|
52
|
- Name: "360°邀请",
|
|
|
53
|
- KpiCycle: domain.KpiCycleDay,
|
51
|
+ Id: sid + 2,
|
|
|
52
|
+ Type: domain.LinkNodeAllInvite,
|
|
|
53
|
+ Name: "360°邀请",
|
|
|
54
|
+ NodeContents: make([]*domain.NodeContent, 0),
|
|
|
55
|
+ KpiCycle: domain.KpiCycleDay,
|
54
|
})
|
56
|
})
|
55
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
57
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
56
|
- Id: sid + 3,
|
|
|
57
|
- Type: domain.LinkNodeAllAssessment,
|
|
|
58
|
- Name: "360°评估",
|
|
|
59
|
- KpiCycle: domain.KpiCycleDay,
|
58
|
+ Id: sid + 3,
|
|
|
59
|
+ Type: domain.LinkNodeAllAssessment,
|
|
|
60
|
+ Name: "360°评估",
|
|
|
61
|
+ NodeContents: make([]*domain.NodeContent, 0),
|
|
|
62
|
+ KpiCycle: domain.KpiCycleDay,
|
60
|
})
|
63
|
})
|
61
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
64
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
62
|
- Id: sid + 4,
|
|
|
63
|
- Type: domain.LinkNodeSuperiorAssessment,
|
|
|
64
|
- Name: "上级评估",
|
|
|
65
|
- KpiCycle: domain.KpiCycleDay,
|
65
|
+ Id: sid + 4,
|
|
|
66
|
+ Type: domain.LinkNodeSuperiorAssessment,
|
|
|
67
|
+ Name: "上级评估",
|
|
|
68
|
+ NodeContents: make([]*domain.NodeContent, 0),
|
|
|
69
|
+ KpiCycle: domain.KpiCycleDay,
|
66
|
})
|
70
|
})
|
67
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
71
|
linkNodes = append(linkNodes, &domain.LinkNode{
|
68
|
- Id: sid + 5,
|
|
|
69
|
- Type: domain.LinkNodeViewResult,
|
|
|
70
|
- Name: "绩效结果查看",
|
|
|
71
|
- KpiCycle: domain.KpiCycleDay,
|
72
|
+ Id: sid + 5,
|
|
|
73
|
+ Type: domain.LinkNodeViewResult,
|
|
|
74
|
+ Name: "绩效结果查看",
|
|
|
75
|
+ NodeContents: make([]*domain.NodeContent, 0),
|
|
|
76
|
+ KpiCycle: domain.KpiCycleDay,
|
72
|
})
|
77
|
})
|
73
|
|
78
|
|
74
|
newTemplate := &domain.EvaluationTemplate{
|
79
|
newTemplate := &domain.EvaluationTemplate{
|