|
@@ -1182,15 +1182,6 @@ func (srv StaffAssessServeice) StaffAssessSuperBeforeEdit(param *query.AssessInf |
|
@@ -1182,15 +1182,6 @@ func (srv StaffAssessServeice) StaffAssessSuperBeforeEdit(param *query.AssessInf |
1182
|
return result, nil
|
1182
|
return result, nil
|
1183
|
}
|
1183
|
}
|
1184
|
|
1184
|
|
1185
|
-// 自评评估内容编辑前
|
|
|
1186
|
-// func (srv StaffAssessServeice) StaffAssessSelfBeforeEdit(param *query.AssessInfoQuery) (*adapter.AssessInfoResp, error) {
|
|
|
1187
|
-// result, err := srv.GetAssessInfo(param)
|
|
|
1188
|
-// if err != nil {
|
|
|
1189
|
-// return &adapter.AssessInfoResp{}, err
|
|
|
1190
|
-// }
|
|
|
1191
|
-// return result, nil
|
|
|
1192
|
-// }
|
|
|
1193
|
-
|
|
|
1194
|
func (srv StaffAssessServeice) getStaffAssessBeforeEdit(param *query.AssessInfoQuery) (*adapter.AssessInfoResp, error) {
|
1185
|
func (srv StaffAssessServeice) getStaffAssessBeforeEdit(param *query.AssessInfoQuery) (*adapter.AssessInfoResp, error) {
|
1195
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
1186
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
1196
|
if err != nil {
|
1187
|
if err != nil {
|
|
@@ -1289,6 +1280,35 @@ func (srv StaffAssessServeice) ListExcutorUncompleted(param *query.ListExecutorQ |
|
@@ -1289,6 +1280,35 @@ func (srv StaffAssessServeice) ListExcutorUncompleted(param *query.ListExecutorQ |
1289
|
defer func() {
|
1280
|
defer func() {
|
1290
|
_ = transactionContext.RollbackTransaction()
|
1281
|
_ = transactionContext.RollbackTransaction()
|
1291
|
}()
|
1282
|
}()
|
|
|
1283
|
+
|
|
|
1284
|
+ if param.Types == "invite" {
|
|
|
1285
|
+ staffAssessDao := dao.NewStaffAssessDao(map[string]interface{}{
|
|
|
1286
|
+ "transactionContext": transactionContext,
|
|
|
1287
|
+ })
|
|
|
1288
|
+ targetUserList, err := staffAssessDao.ListTargetUserNoInvite(param.CompanyId, param.CycleId, param.BeginDay)
|
|
|
1289
|
+ if err != nil {
|
|
|
1290
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工列表"+err.Error())
|
|
|
1291
|
+ }
|
|
|
1292
|
+ userList := []map[string]string{}
|
|
|
1293
|
+ userMap := map[string]struct{}{} //过滤重复的用户id
|
|
|
1294
|
+ for _, val := range targetUserList {
|
|
|
1295
|
+ if _, ok := userMap[val.UserId]; ok {
|
|
|
1296
|
+ continue
|
|
|
1297
|
+ } else {
|
|
|
1298
|
+ userMap[val.UserId] = struct{}{}
|
|
|
1299
|
+ }
|
|
|
1300
|
+ u := map[string]string{
|
|
|
1301
|
+ "userId": val.UserId,
|
|
|
1302
|
+ "userName": val.UserName,
|
|
|
1303
|
+ }
|
|
|
1304
|
+ userList = append(userList, u)
|
|
|
1305
|
+ }
|
|
|
1306
|
+ result := map[string]interface{}{
|
|
|
1307
|
+ "userList": userList,
|
|
|
1308
|
+ }
|
|
|
1309
|
+ return result, nil
|
|
|
1310
|
+ }
|
|
|
1311
|
+
|
1292
|
assessReps := factory.CreateStaffAssessRepository(map[string]interface{}{
|
1312
|
assessReps := factory.CreateStaffAssessRepository(map[string]interface{}{
|
1293
|
"transactionContext": transactionContext,
|
1313
|
"transactionContext": transactionContext,
|
1294
|
})
|
1314
|
})
|
|
@@ -1309,7 +1329,7 @@ func (srv StaffAssessServeice) ListExcutorUncompleted(param *query.ListExecutorQ |
|
@@ -1309,7 +1329,7 @@ func (srv StaffAssessServeice) ListExcutorUncompleted(param *query.ListExecutorQ |
1309
|
}
|
1329
|
}
|
1310
|
_, assessList, err := assessReps.Find(condition)
|
1330
|
_, assessList, err := assessReps.Find(condition)
|
1311
|
if err != nil {
|
1331
|
if err != nil {
|
1312
|
- return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工的评估"+err.Error())
|
1332
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工列表"+err.Error())
|
1313
|
}
|
1333
|
}
|
1314
|
if err := transactionContext.CommitTransaction(); err != nil {
|
1334
|
if err := transactionContext.CommitTransaction(); err != nil {
|
1315
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
1335
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|