正在显示
3 个修改的文件
包含
20 行增加
和
5 行删除
@@ -922,14 +922,13 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a | @@ -922,14 +922,13 @@ func (srv StaffAssessServeice) getAssessSelfInfoUncompleted(transactionContext a | ||
922 | ruleRepo := factory.CreateEvaluationRuleRepository(map[string]interface{}{ | 922 | ruleRepo := factory.CreateEvaluationRuleRepository(map[string]interface{}{ |
923 | "transactionContext": transactionContext, | 923 | "transactionContext": transactionContext, |
924 | }) | 924 | }) |
925 | - ruleMap := map[string]*domain.EvaluationRule{} | 925 | + ruleMap := map[int64]*domain.EvaluationRule{} |
926 | for _, v := range linkNode.NodeContents { | 926 | for _, v := range linkNode.NodeContents { |
927 | if _, ok := ruleMap[v.RuleId]; ok { | 927 | if _, ok := ruleMap[v.RuleId]; ok { |
928 | continue | 928 | continue |
929 | } | 929 | } |
930 | - rid, _ := strconv.Atoi(v.RuleId) | ||
931 | ruleData, err := ruleRepo.FindOne(map[string]interface{}{ | 930 | ruleData, err := ruleRepo.FindOne(map[string]interface{}{ |
932 | - "id": rid, | 931 | + "id": v.RuleId, |
933 | }) | 932 | }) |
934 | if err == nil { | 933 | if err == nil { |
935 | ruleMap[v.RuleId] = ruleData | 934 | ruleMap[v.RuleId] = ruleData |
@@ -114,4 +114,19 @@ func (c *StaffAssessController) GetAssessInviteUser() { | @@ -114,4 +114,19 @@ func (c *StaffAssessController) GetAssessInviteUser() { | ||
114 | c.Response(data, err) | 114 | c.Response(data, err) |
115 | } | 115 | } |
116 | 116 | ||
117 | -//保持员工邀请的人 | 117 | +// 保持员工邀请的人 |
118 | +func (c *StaffAssessController) SaveAssessInviteUser() { | ||
119 | + srv := service.NewStaffAssessServeice() | ||
120 | + paramReq := &command.SaveAssessInvite{} | ||
121 | + err := c.BindJSON(paramReq) | ||
122 | + if err != nil { | ||
123 | + e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error()) | ||
124 | + c.Response(nil, e) | ||
125 | + return | ||
126 | + } | ||
127 | + //TODO 获取当前用户信息 | ||
128 | + // paramReq.CompanyId = 1 | ||
129 | + // paramReq.UserId = 1 | ||
130 | + data, err := srv.SaveAssessInviteUser(paramReq) | ||
131 | + c.Response(data, err) | ||
132 | +} |
@@ -17,7 +17,8 @@ func init() { | @@ -17,7 +17,8 @@ func init() { | ||
17 | // web.NSBefore(filters.AllowCors(), middlewares.CheckToken()), | 17 | // web.NSBefore(filters.AllowCors(), middlewares.CheckToken()), |
18 | web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList), //获取我的自评反馈列表 | 18 | web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList), //获取我的自评反馈列表 |
19 | web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessController).GetAssessSelfInfo), //获取我的自评反馈详情 | 19 | web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessController).GetAssessSelfInfo), //获取我的自评反馈详情 |
20 | - web.NSCtrlPost("/me/invite-user", (*controllers.StaffAssessController).GetAssessInviteUser), | 20 | + web.NSCtrlPost("/me/invite-user", (*controllers.StaffAssessController).GetAssessInviteUser), //获取邀请的员工 |
21 | + web.NSCtrlPost("/me/save-invite-user", (*controllers.StaffAssessController).SaveAssessInviteUser), //保存邀请的员工 | ||
21 | ) | 22 | ) |
22 | web.AddNamespace(assessTaskNS) | 23 | web.AddNamespace(assessTaskNS) |
23 | web.AddNamespace(assessNS) | 24 | web.AddNamespace(assessNS) |
-
请 注册 或 登录 后发表评论