作者 tangxvhui

调试

1 package query 1 package query
2 2
3 type AssessSelfListQuery struct { 3 type AssessSelfListQuery struct {
4 - UserId int `json:"userId"` //用户id  
5 - CompanyId int `json:"-"` //公司Id  
6 - PageSize int `json:"pageSize"` //每页的记录数  
7 - PageNumber int `json:"pageNumber"` //页码 4 + UserId int `json:"userId,string"` //用户id
  5 + CompanyId int `json:"-"` //公司Id
  6 + PageSize int `json:"pageSize"` //每页的记录数
  7 + PageNumber int `json:"pageNumber"` //页码
8 } 8 }
@@ -13,41 +13,6 @@ type StaffAssessController struct { @@ -13,41 +13,6 @@ type StaffAssessController struct {
13 beego.BaseController 13 beego.BaseController
14 } 14 }
15 15
16 -// 获取我的绩效任务列表  
17 -// func (c *StaffAssessController) SearchAssessTaskMe() {  
18 -// srv := service.NewStaffAssessServeice()  
19 -// paramReq := &query.SearchAssessMeQuery{}  
20 -// err := c.BindJSON(paramReq)  
21 -// if err != nil {  
22 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
23 -// c.Response(nil, e)  
24 -// return  
25 -// }  
26 -// userReq := middlewares.GetUser(c.Ctx)  
27 -// paramReq.CompanyId = int(userReq.CompanyId)  
28 -// paramReq.UserId = int(userReq.UserId)  
29 -  
30 -// data, err := srv.SearchAssessTaskMe(paramReq)  
31 -// c.Response(data, err)  
32 -// }  
33 -  
34 -// 获取我的绩效任务各环节完成情况  
35 -// func (c *StaffAssessController) AssessTaskMeDesc() {  
36 -// srv := service.NewStaffAssessServeice()  
37 -// paramReq := &query.AssessTaskDescQuery{}  
38 -// err := c.BindJSON(paramReq)  
39 -// if err != nil {  
40 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
41 -// c.Response(nil, e)  
42 -// return  
43 -// }  
44 -// userReq := middlewares.GetUser(c.Ctx)  
45 -// paramReq.CompanyId = int(userReq.CompanyId)  
46 -// paramReq.UserId = int(userReq.UserId)  
47 -// data, err := srv.AssessTaskDesc(paramReq)  
48 -// c.Response(data, err)  
49 -// }  
50 -  
51 // 获取个人的自评反馈历史记录列表 16 // 获取个人的自评反馈历史记录列表
52 func (c *StaffAssessController) AssessSelfMeList() { 17 func (c *StaffAssessController) AssessSelfMeList() {
53 srv := service.NewStaffAssessServeice() 18 srv := service.NewStaffAssessServeice()
@@ -79,40 +44,6 @@ func (c *StaffAssessController) CreateStaffAssessTask() { @@ -79,40 +44,6 @@ func (c *StaffAssessController) CreateStaffAssessTask() {
79 c.Response(data, err) 44 c.Response(data, err)
80 } 45 }
81 46
82 -// 获取当前登录员工自评详情  
83 -// func (c *StaffAssessController) GetAssessSelfMeInfo() {  
84 -// srv := service.NewStaffAssessServeice()  
85 -// paramReq := &query.AssessSelfInfoQuery{}  
86 -// err := c.BindJSON(paramReq)  
87 -// if err != nil {  
88 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
89 -// c.Response(nil, e)  
90 -// return  
91 -// }  
92 -// userReq := middlewares.GetUser(c.Ctx)  
93 -// paramReq.CompanyId = int(userReq.CompanyId)  
94 -// paramReq.TargetUserId = int(userReq.UserId)  
95 -// data, err := srv.GetAssessSelfInfo(paramReq)  
96 -// c.Response(data, err)  
97 -// }  
98 -  
99 -// 获取我邀请的人  
100 -// func (c *StaffAssessController) GetAssessMeInviteUser() {  
101 -// srv := service.NewStaffAssessServeice()  
102 -// paramReq := &query.GetAssessInviteUserQuery{}  
103 -// err := c.BindJSON(paramReq)  
104 -// if err != nil {  
105 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
106 -// c.Response(nil, e)  
107 -// return  
108 -// }  
109 -// userReq := middlewares.GetUser(c.Ctx)  
110 -// paramReq.CompanyId = int(userReq.CompanyId)  
111 -// paramReq.UserId = int(userReq.UserId)  
112 -// data, err := srv.GetAssessInviteUser(paramReq)  
113 -// c.Response(data, err)  
114 -// }  
115 -  
116 // 保存我邀请的员工 47 // 保存我邀请的员工
117 func (c *StaffAssessController) SaveAssessMeInviteUser() { 48 func (c *StaffAssessController) SaveAssessMeInviteUser() {
118 srv := service.NewStaffAssessServeice() 49 srv := service.NewStaffAssessServeice()
@@ -149,63 +80,6 @@ func (c *StaffAssessController) SelectAssessInviteUser() { @@ -149,63 +80,6 @@ func (c *StaffAssessController) SelectAssessInviteUser() {
149 c.Response(data, err) 80 c.Response(data, err)
150 } 81 }
151 82
152 -// 获取我要执行360评估,用户列表和评估填写的值  
153 -// func (c *StaffAssessController) ListMeInviteUserAssess() {  
154 -// srv := service.NewStaffAssessServeice()  
155 -// paramReq := &query.ListInviteUserAssessQuery{}  
156 -// err := c.BindJSON(paramReq)  
157 -// if err != nil {  
158 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
159 -// c.Response(nil, e)  
160 -// return  
161 -// }  
162 -// //获取当前用户信息  
163 -// // paramReq.CompanyId = 1  
164 -// // paramReq.ExecutorId = 1  
165 -// userReq := middlewares.GetUser(c.Ctx)  
166 -// paramReq.CompanyId = int(userReq.CompanyId)  
167 -// paramReq.ExecutorId = int(userReq.UserId)  
168 -// data, err := srv.ListExecutorInviteAssess(paramReq)  
169 -// c.Response(data, err)  
170 -// }  
171 -  
172 -// 获取我要执行的上级评估成员列表  
173 -// func (c *StaffAssessController) ListMeSupperAssess() {  
174 -// srv := service.NewStaffAssessServeice()  
175 -// paramReq := &query.ListSupperAssessQuery{}  
176 -// err := c.BindJSON(paramReq)  
177 -// if err != nil {  
178 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
179 -// c.Response(nil, e)  
180 -// return  
181 -// }  
182 -// //TODO 获取当前用户信息  
183 -// // paramReq.CompanyId = 1  
184 -// // paramReq.ExecutorId = 1  
185 -// userReq := middlewares.GetUser(c.Ctx)  
186 -// paramReq.CompanyId = int(userReq.CompanyId)  
187 -// paramReq.ExecutorId = int(userReq.UserId)  
188 -// data, err := srv.ListExecutorSupperAssess(paramReq)  
189 -// c.Response(data, err)  
190 -// }  
191 -  
192 -// 获取员工自评详情  
193 -// func (c *StaffAssessController) GetAssessTargetUserSelfInfo() {  
194 -// srv := service.NewStaffAssessServeice()  
195 -// paramReq := &query.AssessSelfInfoQuery{}  
196 -// err := c.BindJSON(paramReq)  
197 -// if err != nil {  
198 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
199 -// c.Response(nil, e)  
200 -// return  
201 -// }  
202 -// // paramReq.CompanyId = 1  
203 -// userReq := middlewares.GetUser(c.Ctx)  
204 -// paramReq.CompanyId = int(userReq.CompanyId)  
205 -// data, err := srv.GetAssessSelfInfo(paramReq)  
206 -// c.Response(data, err)  
207 -// }  
208 -  
209 // 获取评估内容详情 83 // 获取评估内容详情
210 func (c *StaffAssessController) GetAssessInfo() { 84 func (c *StaffAssessController) GetAssessInfo() {
211 srv := service.NewStaffAssessServeice() 85 srv := service.NewStaffAssessServeice()
@@ -240,42 +114,6 @@ func (c *StaffAssessController) SaveAssessInfo() { @@ -240,42 +114,6 @@ func (c *StaffAssessController) SaveAssessInfo() {
240 c.Response(data, err) 114 c.Response(data, err)
241 } 115 }
242 116
243 -// 被评估的员工的评估列表-360评估  
244 -// func (c *StaffAssessController) ListTargetUserInviteAssess() {  
245 -// srv := service.NewStaffAssessServeice()  
246 -// paramReq := &query.ListTargetUserAssessQuery{}  
247 -// err := c.BindJSON(paramReq)  
248 -// if err != nil {  
249 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
250 -// c.Response(nil, e)  
251 -// return  
252 -// }  
253 -// // paramReq.CompanyId = 1  
254 -// userReq := middlewares.GetUser(c.Ctx)  
255 -// paramReq.CompanyId = int(userReq.CompanyId)  
256 -// paramReq.Types = []string{string(domain.AssessInviteSameSuper), string(domain.AssessInviteDiffSuper)}  
257 -// data, err := srv.ListTargetUserAssess(paramReq)  
258 -// c.Response(data, err)  
259 -// }  
260 -  
261 -// func (c *StaffAssessController) ListTargetUserMeSupperAssess() {  
262 -// srv := service.NewStaffAssessServeice()  
263 -// paramReq := &query.ListTargetUserAssessQuery{}  
264 -// err := c.BindJSON(paramReq)  
265 -// if err != nil {  
266 -// e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())  
267 -// c.Response(nil, e)  
268 -// return  
269 -// }  
270 -// // paramReq.CompanyId = 1  
271 -// userReq := middlewares.GetUser(c.Ctx)  
272 -// paramReq.CompanyId = int(userReq.CompanyId)  
273 -// paramReq.Types = []string{string(domain.AssessSuper)}  
274 -// paramReq.TargetUserId = int(userReq.UserId)  
275 -// data, err := srv.ListTargetUserAssess(paramReq)  
276 -// c.Response(data, err)  
277 -// }  
278 -  
279 // 获取周期列表 117 // 获取周期列表
280 func (c *StaffAssessController) ListAssessCycle() { 118 func (c *StaffAssessController) ListAssessCycle() {
281 srv := service.NewStaffAssessServeice() 119 srv := service.NewStaffAssessServeice()
@@ -411,8 +249,6 @@ func (c *StaffAssessController) QueryMemberPerformanceIndicator() { @@ -411,8 +249,6 @@ func (c *StaffAssessController) QueryMemberPerformanceIndicator() {
411 in.CompanyId = int(user.CompanyId) 249 in.CompanyId = int(user.CompanyId)
412 in.OperatorId = int(user.UserId) 250 in.OperatorId = int(user.UserId)
413 251
414 - //in.CompanyId = int(8) // 杨欢测试数据 周期ID=1612638113870385152 公司ID=8 用户ID=3422174102828544  
415 - //in.OperatorId = int(3422174102828544)  
416 } 252 }
417 c.Response(srv.QueryMemberPerformanceIndicator(in)) 253 c.Response(srv.QueryMemberPerformanceIndicator(in))
418 } 254 }