Merge remote-tracking branch 'origin/test' into test
正在显示
7 个修改的文件
包含
165 行增加
和
47 行删除
@@ -9,16 +9,18 @@ type AssessInfoResp struct { | @@ -9,16 +9,18 @@ type AssessInfoResp struct { | ||
9 | CycleName string `json:"cycleName"` //周期名称 | 9 | CycleName string `json:"cycleName"` //周期名称 |
10 | EvaluationProjectId int `json:"evaluationProjectId"` //项目id | 10 | EvaluationProjectId int `json:"evaluationProjectId"` //项目id |
11 | EvaluationProjectName string `json:"evaluationProjectName"` //项目名称 | 11 | EvaluationProjectName string `json:"evaluationProjectName"` //项目名称 |
12 | - BeginTime string `json:"beginTime"` //开始时间 2006-01-02 15:04:05 | ||
13 | - EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 | ||
14 | - Status string `json:"status"` //完成状态 | ||
15 | - TargetUserId int `json:"targetUser"` //目标用户 | ||
16 | - TargetUserName string `json:"targetUserName"` //目标用户名称 | ||
17 | - CompanyId int `json:"companyId,string"` // | ||
18 | - CompanyName string `json:"companyName"` //公司名称 | ||
19 | - SupperUser string `json:"superUser"` //目标用户的上级 | ||
20 | - DutyTime string `json:"dutyTime"` //入职时间 // | ||
21 | - AssessContent []*domain.StaffAssessContent `json:"assessContent"` //评估内容 | 12 | + LinkNodeId int `json:"linkNodeId"` |
13 | + LinkNodeName string `json:"linkNodeName"` | ||
14 | + BeginTime string `json:"beginTime"` //开始时间 2006-01-02 15:04:05 | ||
15 | + EndTime string `json:"endTime"` //结束时间 2006-01-02 15:04:05 | ||
16 | + Status string `json:"status"` //完成状态 | ||
17 | + TargetUserId int `json:"targetUser"` //目标用户 | ||
18 | + TargetUserName string `json:"targetUserName"` //目标用户名称 | ||
19 | + CompanyId int `json:"companyId,string,"` // | ||
20 | + CompanyName string `json:"companyName"` //公司名称 | ||
21 | + SupperUser string `json:"superUser"` //目标用户的上级 | ||
22 | + DutyTime string `json:"dutyTime"` //入职时间 // | ||
23 | + AssessContent []*domain.StaffAssessContent `json:"assessContent"` //评估内容 | ||
22 | } | 24 | } |
23 | 25 | ||
24 | type AssessContent struct { | 26 | type AssessContent struct { |
1 | package adapter | 1 | package adapter |
2 | 2 | ||
3 | type ListInviteUserAssessResp struct { | 3 | type ListInviteUserAssessResp struct { |
4 | - TableHeader []ListTableHeader | ||
5 | - List []map[string]string | ||
6 | - Total int | 4 | + LinkNodeName string `json:"linkNodeName"` |
5 | + LinkNodeId int `json:"linkNodeId"` | ||
6 | + LintNodeDesc string `json:"lintNodeDesc"` | ||
7 | + TableHeader []ListTableHeader `json:"tableHeader"` | ||
8 | + List []map[string]string `json:"list"` | ||
9 | + Total int `json:"total"` | ||
7 | } | 10 | } |
8 | type ListTableHeader struct { | 11 | type ListTableHeader struct { |
9 | - Key string | ||
10 | - Name string | 12 | + Key string `json:"key"` |
13 | + Name string `json:"name"` | ||
11 | } | 14 | } |
@@ -6,7 +6,8 @@ type ListSupperAssessResp struct { | @@ -6,7 +6,8 @@ type ListSupperAssessResp struct { | ||
6 | EndTime string `json:"endTime"` //截止时间 | 6 | EndTime string `json:"endTime"` //截止时间 |
7 | InviteTotal int `json:"inviteTota"` //邀请总数 | 7 | InviteTotal int `json:"inviteTota"` //邀请总数 |
8 | InviteCompleted int `json:"inviteCompleted"` //邀请未完成 | 8 | InviteCompleted int `json:"inviteCompleted"` //邀请未完成 |
9 | - Department string `json:"department"` //部门 | ||
10 | - Position string `json:"position"` //职位 | ||
11 | - DutyTime string `json:"dutyTime"` //入职时间 | 9 | + Status string `json:"status"` |
10 | + Department string `json:"department"` //部门 | ||
11 | + Position string `json:"position"` //职位 | ||
12 | + DutyTime string `json:"dutyTime"` //入职时间 | ||
12 | } | 13 | } |
1 | package query | 1 | package query |
2 | 2 | ||
3 | type ListInviteUserAssessQuery struct { | 3 | type ListInviteUserAssessQuery struct { |
4 | - PageNumber int `json:"pageNumber"` | ||
5 | - PageSize int `json:"pageSize"` | ||
6 | - UserName string `json:"userName"` //查询条件 员工的名称 | ||
7 | - CompanyId int `json:"companyId"` // | ||
8 | - ExecutorId int `json:"executorId"` //评估的执行人,必填 | ||
9 | - AssessTaskkId int `json:"assessTaskId"` //评估任务id 必填 | 4 | + PageNumber int `json:"pageNumber"` |
5 | + PageSize int `json:"pageSize"` | ||
6 | + UserName string `json:"userName"` //查询条件 员工的名称 | ||
7 | + CompanyId int `json:"companyId"` // | ||
8 | + ExecutorId int `json:"executorId"` //评估的执行人,必填 | ||
9 | + AssessTaskId int `json:"assessTaskId"` //评估任务id 必填 | ||
10 | } | 10 | } |
@@ -887,6 +887,8 @@ func (srv StaffAssessServeice) GetAssessSelfInfo(param *query.AssessSelfInfoQuer | @@ -887,6 +887,8 @@ func (srv StaffAssessServeice) GetAssessSelfInfo(param *query.AssessSelfInfoQuer | ||
887 | AssessId: assessData.Id, | 887 | AssessId: assessData.Id, |
888 | CycleId: assessData.CycleId, | 888 | CycleId: assessData.CycleId, |
889 | CycleName: assessData.CycleName, | 889 | CycleName: assessData.CycleName, |
890 | + LinkNodeId: assessData.LinkNodeId, | ||
891 | + LinkNodeName: assessData.LinkNodeName, | ||
890 | EvaluationProjectId: assessData.EvaluationProjectId, | 892 | EvaluationProjectId: assessData.EvaluationProjectId, |
891 | EvaluationProjectName: assessData.EvaluationProjectName, | 893 | EvaluationProjectName: assessData.EvaluationProjectName, |
892 | BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"), | 894 | BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"), |
@@ -1089,45 +1091,135 @@ func (srv StaffAssessServeice) ListExecutorInviteAssess(param *query.ListInviteU | @@ -1089,45 +1091,135 @@ func (srv StaffAssessServeice) ListExecutorInviteAssess(param *query.ListInviteU | ||
1089 | assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{ | 1091 | assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{ |
1090 | "transactionContext": transactionContext, | 1092 | "transactionContext": transactionContext, |
1091 | }) | 1093 | }) |
1094 | + assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{ | ||
1095 | + "transactionContext": transactionContext, | ||
1096 | + }) | ||
1097 | + | ||
1092 | //获取 executorId 对应的360评估任务 用户 | 1098 | //获取 executorId 对应的360评估任务 用户 |
1093 | - cnt, assessList, err := assessRepo.Find(map[string]interface{}{ | ||
1094 | - "staffAssessTaskId": param.AssessTaskkId, | 1099 | + condition := map[string]interface{}{ |
1100 | + "staffAssessTaskId": param.AssessTaskId, | ||
1095 | "executorId": param.ExecutorId, | 1101 | "executorId": param.ExecutorId, |
1096 | "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)}, | 1102 | "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)}, |
1097 | - }) | 1103 | + "limit": 20, |
1104 | + } | ||
1105 | + if param.PageSize > 0 { | ||
1106 | + condition["limit"] = param.PageSize | ||
1107 | + } | ||
1108 | + offset := (param.PageNumber - 1) * param.PageSize | ||
1109 | + if offset > 0 { | ||
1110 | + condition["offset"] = offset | ||
1111 | + } | ||
1112 | + | ||
1113 | + cnt, assessList, err := assessRepo.Find(condition) | ||
1098 | if err != nil { | 1114 | if err != nil { |
1099 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1115 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1100 | } | 1116 | } |
1117 | + var assessContentList []*domain.StaffAssessContent | ||
1118 | + if len(assessList) > 0 { | ||
1119 | + //获取评估用的所有评估项 | ||
1120 | + assessContentList, err = srv.getAssessSelfInfoUncompleted(transactionContext, assessList[0]) | ||
1121 | + if err != nil { | ||
1122 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估任务"+err.Error()) | ||
1123 | + } | ||
1124 | + } | ||
1125 | + //可变的表格列 | ||
1126 | + changeableHeader := []adapter.ListTableHeader{} | ||
1127 | + //列名与字段对应 | ||
1128 | + keyMap := map[string]string{} | ||
1129 | + for i, v := range assessContentList { | ||
1130 | + name := fmt.Sprintf("%s-%s", v.Category, v.Name) | ||
1131 | + key := fmt.Sprintf("k%d", i) | ||
1132 | + keyMap[name] = key | ||
1133 | + changeableHeader = append(changeableHeader, adapter.ListTableHeader{ | ||
1134 | + Key: key, | ||
1135 | + Name: name, | ||
1136 | + }) | ||
1137 | + } | ||
1138 | + assessContentRepo := factory.CreateStaffAssessContentRepository(map[string]interface{}{ | ||
1139 | + "transactionContext": transactionContext, | ||
1140 | + }) | ||
1101 | // 获取已经填报的内容 | 1141 | // 获取已经填报的内容 |
1142 | + changeableRows := map[int]map[string]string{} | ||
1143 | + for _, v := range assessList { | ||
1144 | + _, contentList, err := assessContentRepo.Find(map[string]interface{}{ | ||
1145 | + "staffAssessId": v.Id, | ||
1146 | + }) | ||
1147 | + if err != nil { | ||
1148 | + return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取评估内容"+err.Error()) | ||
1149 | + } | ||
1150 | + row := map[string]string{} | ||
1151 | + for _, vv := range contentList { | ||
1152 | + name := fmt.Sprintf("%s-%s", vv.Category, vv.Name) | ||
1153 | + if kk, ok := keyMap[name]; ok { | ||
1154 | + row[kk] = vv.Value | ||
1155 | + } | ||
1156 | + } | ||
1157 | + changeableRows[v.TargetUser.UserId] = row | ||
1158 | + } | ||
1159 | + | ||
1160 | + //获取360邀请评估完成情况 | ||
1161 | + //我评估别人,被邀请评估 | ||
1162 | + cnnt, _, err := assessRepo.Find(map[string]interface{}{ | ||
1163 | + "staffAssessTaskId": param.AssessTaskId, | ||
1164 | + "executorId": param.ExecutorId, | ||
1165 | + "typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)}, | ||
1166 | + "status": domain.StaffAssessUncompleted, | ||
1167 | + }) | ||
1168 | + if err != nil { | ||
1169 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error()) | ||
1170 | + } | ||
1171 | + | ||
1172 | + assessTaskData, err := assessTaskRepo.FindOne(map[string]interface{}{ | ||
1173 | + "id": param.AssessTaskId, | ||
1174 | + }) | ||
1175 | + if err != nil { | ||
1176 | + return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error()) | ||
1177 | + } | ||
1102 | if err := transactionContext.CommitTransaction(); err != nil { | 1178 | if err := transactionContext.CommitTransaction(); err != nil { |
1103 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1179 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1104 | } | 1180 | } |
1105 | 1181 | ||
1106 | - //TODO 评估填写数据行转列 | 1182 | + //评估填写数据行转列 |
1107 | tableHeader := []adapter.ListTableHeader{ | 1183 | tableHeader := []adapter.ListTableHeader{ |
1108 | {Key: "userName", Name: "姓名"}, | 1184 | {Key: "userName", Name: "姓名"}, |
1109 | {Key: "status", Name: "状态"}, | 1185 | {Key: "status", Name: "状态"}, |
1110 | {Key: "types", Name: "360°评估关系"}, | 1186 | {Key: "types", Name: "360°评估关系"}, |
1111 | {Key: "endTime", Name: "360°评估截止日期"}, | 1187 | {Key: "endTime", Name: "360°评估截止日期"}, |
1112 | } | 1188 | } |
1189 | + tableHeader = append(tableHeader, changeableHeader...) | ||
1113 | listData := []map[string]string{} | 1190 | listData := []map[string]string{} |
1114 | for _, v := range assessList { | 1191 | for _, v := range assessList { |
1115 | m := map[string]string{ | 1192 | m := map[string]string{ |
1116 | "userName": v.TargetUser.UserName, | 1193 | "userName": v.TargetUser.UserName, |
1194 | + "userId": strconv.Itoa(v.TargetUser.UserId), | ||
1117 | "status": string(v.Status), | 1195 | "status": string(v.Status), |
1118 | "types": string(v.Types), | 1196 | "types": string(v.Types), |
1119 | "endTime": v.EndTime.Local().Format("2006-01-02 15:04:05"), | 1197 | "endTime": v.EndTime.Local().Format("2006-01-02 15:04:05"), |
1120 | "assessId": strconv.Itoa(v.Id), | 1198 | "assessId": strconv.Itoa(v.Id), |
1121 | } | 1199 | } |
1200 | + if row, ok := changeableRows[v.TargetUser.UserId]; ok { | ||
1201 | + for k, v := range row { | ||
1202 | + m[k] = v | ||
1203 | + } | ||
1204 | + } else { | ||
1205 | + for _, v := range changeableHeader { | ||
1206 | + m[v.Key] = "" | ||
1207 | + } | ||
1208 | + } | ||
1122 | listData = append(listData, m) | 1209 | listData = append(listData, m) |
1123 | } | 1210 | } |
1124 | - _ = tableHeader | ||
1125 | - | ||
1126 | result := adapter.ListInviteUserAssessResp{ | 1211 | result := adapter.ListInviteUserAssessResp{ |
1127 | TableHeader: tableHeader, | 1212 | TableHeader: tableHeader, |
1128 | List: listData, | 1213 | List: listData, |
1129 | Total: cnt, | 1214 | Total: cnt, |
1130 | } | 1215 | } |
1216 | + for _, v := range assessTaskData.StepList { | ||
1217 | + if v.LinkNodeType == domain.LinkNodeAllAssessment { | ||
1218 | + result.LinkNodeId = v.LinkNodeId | ||
1219 | + result.LinkNodeName = v.LinkNodeName | ||
1220 | + result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt) | ||
1221 | + } | ||
1222 | + } | ||
1131 | return &result, nil | 1223 | return &result, nil |
1132 | } | 1224 | } |
1133 | 1225 | ||
@@ -1222,6 +1314,7 @@ func (srv StaffAssessServeice) ListExecutorSupperAssess(param *query.ListSupperA | @@ -1222,6 +1314,7 @@ func (srv StaffAssessServeice) ListExecutorSupperAssess(param *query.ListSupperA | ||
1222 | UserName: v.TargetUser.UserName, | 1314 | UserName: v.TargetUser.UserName, |
1223 | EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"), | 1315 | EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"), |
1224 | InviteCompleted: 0, | 1316 | InviteCompleted: 0, |
1317 | + Status: string(v.Status), | ||
1225 | InviteTotal: 5, | 1318 | InviteTotal: 5, |
1226 | Department: "", | 1319 | Department: "", |
1227 | Position: "", | 1320 | Position: "", |
@@ -1315,6 +1408,8 @@ func (srv StaffAssessServeice) GetAssessInfo(param *query.AssessInfoQuery) (*ada | @@ -1315,6 +1408,8 @@ func (srv StaffAssessServeice) GetAssessInfo(param *query.AssessInfoQuery) (*ada | ||
1315 | AssessId: assessData.Id, | 1408 | AssessId: assessData.Id, |
1316 | CycleId: assessData.CycleId, | 1409 | CycleId: assessData.CycleId, |
1317 | CycleName: assessData.CycleName, | 1410 | CycleName: assessData.CycleName, |
1411 | + LinkNodeId: assessData.LinkNodeId, | ||
1412 | + LinkNodeName: assessData.LinkNodeName, | ||
1318 | EvaluationProjectId: assessData.EvaluationProjectId, | 1413 | EvaluationProjectId: assessData.EvaluationProjectId, |
1319 | EvaluationProjectName: assessData.EvaluationProjectName, | 1414 | EvaluationProjectName: assessData.EvaluationProjectName, |
1320 | BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"), | 1415 | BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"), |
@@ -1481,7 +1576,7 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma | @@ -1481,7 +1576,7 @@ func (srv StaffAssessServeice) SaveAssessInfo(param *command.SaveAssessInfoComma | ||
1481 | }, nil | 1576 | }, nil |
1482 | } | 1577 | } |
1483 | 1578 | ||
1484 | -// 获取员工被评估的列表 ,类型是360邀请的 | 1579 | +// 获取员工被评估的列表 |
1485 | func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserAssessQuery) (map[string]interface{}, error) { | 1580 | func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserAssessQuery) (map[string]interface{}, error) { |
1486 | transactionContext, err := factory.CreateTransactionContext(nil) | 1581 | transactionContext, err := factory.CreateTransactionContext(nil) |
1487 | if err != nil { | 1582 | if err != nil { |
@@ -1508,5 +1603,6 @@ func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserA | @@ -1508,5 +1603,6 @@ func (srv StaffAssessServeice) ListTargetUserAssess(param *query.ListTargetUserA | ||
1508 | if err := transactionContext.CommitTransaction(); err != nil { | 1603 | if err := transactionContext.CommitTransaction(); err != nil { |
1509 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 1604 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
1510 | } | 1605 | } |
1606 | + | ||
1511 | return tool_funs.SimpleWrapGridMap(int64(cnt), assessList), nil | 1607 | return tool_funs.SimpleWrapGridMap(int64(cnt), assessList), nil |
1512 | } | 1608 | } |
@@ -6,6 +6,7 @@ import ( | @@ -6,6 +6,7 @@ import ( | ||
6 | "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/command" | 6 | "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/command" |
7 | "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query" | 7 | "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query" |
8 | "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/service" | 8 | "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/service" |
9 | + "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain" | ||
9 | ) | 10 | ) |
10 | 11 | ||
11 | type StaffAssessController struct { | 12 | type StaffAssessController struct { |
@@ -95,10 +96,8 @@ func (c *StaffAssessController) GetAssessSelfMeInfo() { | @@ -95,10 +96,8 @@ func (c *StaffAssessController) GetAssessSelfMeInfo() { | ||
95 | c.Response(data, err) | 96 | c.Response(data, err) |
96 | } | 97 | } |
97 | 98 | ||
98 | -//保存员工自评填写内容 | ||
99 | - | ||
100 | -// 获取员工邀请的人 | ||
101 | -func (c *StaffAssessController) GetAssessInviteUser() { | 99 | +// 获取我邀请的人 |
100 | +func (c *StaffAssessController) GetAssessMeInviteUser() { | ||
102 | srv := service.NewStaffAssessServeice() | 101 | srv := service.NewStaffAssessServeice() |
103 | paramReq := &query.GetAssessInviteUserQuery{} | 102 | paramReq := &query.GetAssessInviteUserQuery{} |
104 | err := c.BindJSON(paramReq) | 103 | err := c.BindJSON(paramReq) |
@@ -115,7 +114,7 @@ func (c *StaffAssessController) GetAssessInviteUser() { | @@ -115,7 +114,7 @@ func (c *StaffAssessController) GetAssessInviteUser() { | ||
115 | } | 114 | } |
116 | 115 | ||
117 | // 保持员工邀请的人 | 116 | // 保持员工邀请的人 |
118 | -func (c *StaffAssessController) SaveAssessInviteUser() { | 117 | +func (c *StaffAssessController) SaveAssessMeInviteUser() { |
119 | srv := service.NewStaffAssessServeice() | 118 | srv := service.NewStaffAssessServeice() |
120 | paramReq := &command.SaveAssessInvite{} | 119 | paramReq := &command.SaveAssessInvite{} |
121 | err := c.BindJSON(paramReq) | 120 | err := c.BindJSON(paramReq) |
@@ -183,7 +182,7 @@ func (c *StaffAssessController) ListMeSupperAssess() { | @@ -183,7 +182,7 @@ func (c *StaffAssessController) ListMeSupperAssess() { | ||
183 | } | 182 | } |
184 | 183 | ||
185 | // 获取员工自评详情 | 184 | // 获取员工自评详情 |
186 | -func (c *StaffAssessController) GetAssessSelfInfo() { | 185 | +func (c *StaffAssessController) GetAssessTargetUserSelfInfo() { |
187 | srv := service.NewStaffAssessServeice() | 186 | srv := service.NewStaffAssessServeice() |
188 | paramReq := &query.AssessSelfInfoQuery{} | 187 | paramReq := &query.AssessSelfInfoQuery{} |
189 | err := c.BindJSON(paramReq) | 188 | err := c.BindJSON(paramReq) |
@@ -225,3 +224,19 @@ func (c *StaffAssessController) SaveAssessInfo() { | @@ -225,3 +224,19 @@ func (c *StaffAssessController) SaveAssessInfo() { | ||
225 | data, err := srv.SaveAssessInfo(paramReq) | 224 | data, err := srv.SaveAssessInfo(paramReq) |
226 | c.Response(data, err) | 225 | c.Response(data, err) |
227 | } | 226 | } |
227 | + | ||
228 | +// 被评估的员工的评估列表-360评估 | ||
229 | +func (c *StaffAssessController) ListTargetUserInviteAssess() { | ||
230 | + srv := service.NewStaffAssessServeice() | ||
231 | + paramReq := &query.ListTargetUserAssessQuery{} | ||
232 | + err := c.BindJSON(paramReq) | ||
233 | + if err != nil { | ||
234 | + e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error()) | ||
235 | + c.Response(nil, e) | ||
236 | + return | ||
237 | + } | ||
238 | + paramReq.CompanyId = 1 | ||
239 | + paramReq.Types = []string{string(domain.AssessInviteSameSuper), string(domain.AssessInviteDiffSuper)} | ||
240 | + data, err := srv.ListTargetUserAssess(paramReq) | ||
241 | + c.Response(data, err) | ||
242 | +} |
@@ -15,16 +15,17 @@ func init() { | @@ -15,16 +15,17 @@ func init() { | ||
15 | // /v1/staff-assess/self/me/list | 15 | // /v1/staff-assess/self/me/list |
16 | assessNS := web.NewNamespace("/v1/staff-assess", | 16 | assessNS := web.NewNamespace("/v1/staff-assess", |
17 | // web.NSBefore(filters.AllowCors(), middlewares.CheckToken()), | 17 | // web.NSBefore(filters.AllowCors(), middlewares.CheckToken()), |
18 | - web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList), //获取我的自评反馈列表 | ||
19 | - web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessController).GetAssessSelfMeInfo), //获取我的自评反馈详情 | ||
20 | - web.NSCtrlPost("/me/invite-user", (*controllers.StaffAssessController).GetAssessInviteUser), //获取邀请的员工 | ||
21 | - web.NSCtrlPost("/me/save-invite-user", (*controllers.StaffAssessController).SaveAssessInviteUser), //保存我邀请的员工 | ||
22 | - web.NSCtrlPost("/me/invite-user/select", (*controllers.StaffAssessController).SelectAssessInviteUser), //选择我邀请的员工 | ||
23 | - web.NSCtrlPost("/me/execute/invite/list", (*controllers.StaffAssessController).ListMeInviteUserAssess), //我要执行的360评估的用户列表 | ||
24 | - web.NSCtrlPost("/me/execute/supper/list", (*controllers.StaffAssessController).ListMeSupperAssess), //我要执行的360评估的用户列表 | ||
25 | - web.NSCtrlPost("/self/info", (*controllers.StaffAssessController).GetAssessSelfInfo), //获取员工的自评反馈详情 | ||
26 | - web.NSCtrlPost("/info", (*controllers.StaffAssessController).GetAssessInfo), //获取员工评估的详情 | ||
27 | - web.NSCtrlPut("/info", (*controllers.StaffAssessController).SaveAssessInfo), //保存员工评估的详情 | 18 | + web.NSCtrlPost("/self/me/list", (*controllers.StaffAssessController).AssessSelfMeList), //获取我的自评反馈列表 |
19 | + web.NSCtrlPost("/self/me/info", (*controllers.StaffAssessController).GetAssessSelfMeInfo), //获取我的自评反馈详情 | ||
20 | + web.NSCtrlPost("/me/invite-user", (*controllers.StaffAssessController).GetAssessMeInviteUser), //获取邀请的员工 | ||
21 | + web.NSCtrlPost("/me/save-invite-user", (*controllers.StaffAssessController).SaveAssessMeInviteUser), //保存我邀请的员工 | ||
22 | + web.NSCtrlPost("/me/invite-user/select", (*controllers.StaffAssessController).SelectAssessInviteUser), //选择我邀请的员工 | ||
23 | + web.NSCtrlPost("/me/execute/invite/list", (*controllers.StaffAssessController).ListMeInviteUserAssess), //我要执行的360评估的用户列表 | ||
24 | + web.NSCtrlPost("/me/execute/supper/list", (*controllers.StaffAssessController).ListMeSupperAssess), //我要执行的360评估的用户列表 | ||
25 | + web.NSCtrlPost("/info", (*controllers.StaffAssessController).GetAssessInfo), //通用获取员工评估的详情 | ||
26 | + web.NSCtrlPut("/info", (*controllers.StaffAssessController).SaveAssessInfo), //通用保存员工评估的详情 | ||
27 | + web.NSCtrlPost("/target-user/invite/list", (*controllers.StaffAssessController).ListTargetUserInviteAssess), //获取被评估员工评估的详情 | ||
28 | + web.NSCtrlPost("/target-user/self/info", (*controllers.StaffAssessController).GetAssessTargetUserSelfInfo), //获取被评估员工的自评反馈详情 | ||
28 | 29 | ||
29 | ) | 30 | ) |
30 | web.AddNamespace(assessTaskNS) | 31 | web.AddNamespace(assessTaskNS) |
-
请 注册 或 登录 后发表评论