|
@@ -11,6 +11,7 @@ import ( |
|
@@ -11,6 +11,7 @@ import ( |
11
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
|
11
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
12
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/domain"
|
13
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao"
|
13
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/infrastructure/dao"
|
|
|
14
|
+ "gitlab.fjmaimaimai.com/allied-creation/performance/pkg/log"
|
14
|
)
|
15
|
)
|
15
|
|
16
|
|
16
|
//获取我的项目周期列表
|
17
|
//获取我的项目周期列表
|
|
@@ -51,10 +52,9 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ |
|
@@ -51,10 +52,9 @@ func (srv StaffAssessServeice) SearchAssessTaskMeV2(param *query.SearchAssessMeQ |
51
|
var temp adapter.AssessCycleDayResp
|
52
|
var temp adapter.AssessCycleDayResp
|
52
|
for _, v := range assessCycleList {
|
53
|
for _, v := range assessCycleList {
|
53
|
temp = adapter.AssessCycleDayResp{
|
54
|
temp = adapter.AssessCycleDayResp{
|
54
|
- CycleId: v.CycleId,
|
|
|
55
|
- CycleName: v.CycleName,
|
|
|
56
|
- BeginDay: v.BeginDay,
|
|
|
57
|
- AssessTaskId: v.AssessTaskId,
|
55
|
+ CycleId: v.CycleId,
|
|
|
56
|
+ CycleName: v.CycleName,
|
|
|
57
|
+ BeginDay: v.BeginDay,
|
58
|
}
|
58
|
}
|
59
|
listData = append(listData, temp)
|
59
|
listData = append(listData, temp)
|
60
|
}
|
60
|
}
|
|
@@ -217,7 +217,7 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que |
|
@@ -217,7 +217,7 @@ func (srv StaffAssessServeice) AssessTaskDescV2(param *query.AssessTaskDescV2Que |
217
|
}
|
217
|
}
|
218
|
|
218
|
|
219
|
//根据周期获取,我的自评任务添加的邀请人
|
219
|
//根据周期获取,我的自评任务添加的邀请人
|
220
|
-func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInviteUserQuery) (*adapter.AssessInviteUserResp, error) {
|
220
|
+func (srv StaffAssessServeice) ListAssessInviteUserV2(param *query.ListInviteUserQuery) (*adapter.AssessInviteUserResp, error) {
|
221
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
221
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
222
|
if err != nil {
|
222
|
if err != nil {
|
223
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
223
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -239,7 +239,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi |
|
@@ -239,7 +239,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi |
239
|
_, myAssessTask, err := assessTaskRepo.Find(map[string]interface{}{
|
239
|
_, myAssessTask, err := assessTaskRepo.Find(map[string]interface{}{
|
240
|
"cycleId": param.CycleId,
|
240
|
"cycleId": param.CycleId,
|
241
|
"beginDay": param.BeginDay,
|
241
|
"beginDay": param.BeginDay,
|
242
|
- "executorId": param.UserId,
|
242
|
+ "executorId": param.TargetUserId,
|
243
|
"limit": 1,
|
243
|
"limit": 1,
|
244
|
})
|
244
|
})
|
245
|
if err != nil {
|
245
|
if err != nil {
|
|
@@ -255,7 +255,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi |
|
@@ -255,7 +255,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi |
255
|
_, assessList, err := assessReps.Find(map[string]interface{}{
|
255
|
_, assessList, err := assessReps.Find(map[string]interface{}{
|
256
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
256
|
"typesList": []string{string(domain.AssessInviteDiffSuper), string(domain.AssessInviteSameSuper)},
|
257
|
"staffAssessTaskId": assessTaskData.Id,
|
257
|
"staffAssessTaskId": assessTaskData.Id,
|
258
|
- "targetUserId": param.UserId,
|
258
|
+ "targetUserId": param.TargetUserId,
|
259
|
})
|
259
|
})
|
260
|
if err != nil {
|
260
|
if err != nil {
|
261
|
return nil, application.ThrowError(application.ARG_ERROR, "获取个人邀请列表"+err.Error())
|
261
|
return nil, application.ThrowError(application.ARG_ERROR, "获取个人邀请列表"+err.Error())
|
|
@@ -291,7 +291,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi |
|
@@ -291,7 +291,7 @@ func (srv StaffAssessServeice) ListAssessInviteUserV2(param query.ListAssessInvi |
291
|
}
|
291
|
}
|
292
|
|
292
|
|
293
|
// 根据周期和日期获取我要执行的的360评估,用户列表和评估填写的值
|
293
|
// 根据周期和日期获取我要执行的的360评估,用户列表和评估填写的值
|
294
|
-func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExecutorAssessQuery) (
|
294
|
+func (srv StaffAssessServeice) ListExecutorInviteAssessV2(param *query.ListExecutorAssessQuery) (
|
295
|
*adapter.ListInviteUserAssessResp, error) {
|
295
|
*adapter.ListInviteUserAssessResp, error) {
|
296
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
296
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
297
|
if err != nil {
|
297
|
if err != nil {
|
|
@@ -307,9 +307,7 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
|
@@ -307,9 +307,7 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
307
|
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
|
307
|
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
|
308
|
"transactionContext": transactionContext,
|
308
|
"transactionContext": transactionContext,
|
309
|
})
|
309
|
})
|
310
|
- assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
|
|
|
311
|
- "transactionContext": transactionContext,
|
|
|
312
|
- })
|
310
|
+
|
313
|
//获取 executorId 对应的360评估任务 用户
|
311
|
//获取 executorId 对应的360评估任务 用户
|
314
|
condition := map[string]interface{}{
|
312
|
condition := map[string]interface{}{
|
315
|
"beginDay": param.BeginDay,
|
313
|
"beginDay": param.BeginDay,
|
|
@@ -399,15 +397,6 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
|
@@ -399,15 +397,6 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
399
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
397
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
400
|
}
|
398
|
}
|
401
|
|
399
|
|
402
|
- _, myAssessTaskData, err := assessTaskRepo.Find(map[string]interface{}{
|
|
|
403
|
- "beginDay": param.BeginDay,
|
|
|
404
|
- "cycleId": param.CycleId,
|
|
|
405
|
- "executorId": param.ExecutorId,
|
|
|
406
|
- "limit": 1,
|
|
|
407
|
- })
|
|
|
408
|
- if err != nil {
|
|
|
409
|
- return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
|
|
|
410
|
- }
|
|
|
411
|
if err := transactionContext.CommitTransaction(); err != nil {
|
400
|
if err := transactionContext.CommitTransaction(); err != nil {
|
412
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
401
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
413
|
}
|
402
|
}
|
|
@@ -426,6 +415,8 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
|
@@ -426,6 +415,8 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
426
|
"userName": v.TargetUser.UserName,
|
415
|
"userName": v.TargetUser.UserName,
|
427
|
"userId": strconv.Itoa(v.TargetUser.UserId),
|
416
|
"userId": strconv.Itoa(v.TargetUser.UserId),
|
428
|
"status": string(v.Status),
|
417
|
"status": string(v.Status),
|
|
|
418
|
+ "cycleId": strconv.FormatInt(v.CycleId, 10),
|
|
|
419
|
+ "beginDay": v.BeginTime.Local().Format("2006-01-02"),
|
429
|
"types": string(v.Types),
|
420
|
"types": string(v.Types),
|
430
|
"endTime": v.EndTime.Local().Format("2006-01-02 15:04:05"),
|
421
|
"endTime": v.EndTime.Local().Format("2006-01-02 15:04:05"),
|
431
|
"assessId": strconv.Itoa(v.Id),
|
422
|
"assessId": strconv.Itoa(v.Id),
|
|
@@ -458,20 +449,18 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
|
@@ -458,20 +449,18 @@ func (srv StaffAssessServeice) ListExecutorDayInviteAssess(param *query.ListExec |
458
|
List: listData,
|
449
|
List: listData,
|
459
|
Total: cnt,
|
450
|
Total: cnt,
|
460
|
}
|
451
|
}
|
461
|
- if len(myAssessTaskData) > 0 {
|
|
|
462
|
- for _, v := range myAssessTaskData[0].StepList {
|
|
|
463
|
- if v.LinkNodeType == domain.LinkNodeAllAssessment {
|
|
|
464
|
- result.LinkNodeId = v.LinkNodeId
|
|
|
465
|
- result.LinkNodeName = v.LinkNodeName
|
|
|
466
|
- result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
|
|
|
467
|
- }
|
|
|
468
|
- }
|
452
|
+
|
|
|
453
|
+ if len(assessList) > 0 {
|
|
|
454
|
+ result.BeginDay = assessList[0].BeginTime.Local().Format("2006-01-02")
|
|
|
455
|
+ result.CycleId = int(assessList[0].CycleId)
|
|
|
456
|
+ result.LintNodeDesc = fmt.Sprintf("截止时间 %s 待评估%d人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
|
469
|
}
|
457
|
}
|
|
|
458
|
+
|
470
|
return &result, nil
|
459
|
return &result, nil
|
471
|
}
|
460
|
}
|
472
|
|
461
|
|
473
|
//根据周期和日期获取我需要执行的上级评估成员列表
|
462
|
//根据周期和日期获取我需要执行的上级评估成员列表
|
474
|
-func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExecutorAssessQuery) (map[string]interface{}, error) {
|
463
|
+func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecutorAssessQuery) (map[string]interface{}, error) {
|
475
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
464
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
476
|
if err != nil {
|
465
|
if err != nil {
|
477
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
466
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
@@ -510,7 +499,7 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
@@ -510,7 +499,7 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
510
|
if err != nil {
|
499
|
if err != nil {
|
511
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
500
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
512
|
}
|
501
|
}
|
513
|
-
|
502
|
+ //获取目标用户
|
514
|
userIds := []int{}
|
503
|
userIds := []int{}
|
515
|
for _, v := range assessList {
|
504
|
for _, v := range assessList {
|
516
|
userIds = append(userIds, v.TargetUser.UserId)
|
505
|
userIds = append(userIds, v.TargetUser.UserId)
|
|
@@ -540,33 +529,26 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
@@ -540,33 +529,26 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
540
|
})
|
529
|
})
|
541
|
userPositionMap[v.Id] = positionList
|
530
|
userPositionMap[v.Id] = positionList
|
542
|
}
|
531
|
}
|
543
|
-
|
|
|
544
|
- //获取员工邀请的人完成360评估的数量
|
532
|
+ //获取目标员工邀请的人完成360评估的数量
|
545
|
var inviteCompletedCount []dao.CountData
|
533
|
var inviteCompletedCount []dao.CountData
|
546
|
- if len(userIds) > 0 {
|
|
|
547
|
- // d := dao.NewStaffAssessDao(map[string]interface{}{
|
|
|
548
|
- // "transactionContext": transactionContext,
|
|
|
549
|
- // })
|
|
|
550
|
- // inviteCompletedCount, err = d.CountInviteAssessByTargetUser(userIds, param.AssessTaskId)
|
|
|
551
|
- // if err != nil {
|
|
|
552
|
- // log.Logger.Error("获取员工邀请的人完成情况" + err.Error())
|
|
|
553
|
- // }
|
|
|
554
|
- }
|
|
|
555
|
- assessTaskRepo := factory.CreateStaffAssessTaskRepository(map[string]interface{}{
|
534
|
+ d := dao.NewStaffAssessDao(map[string]interface{}{
|
556
|
"transactionContext": transactionContext,
|
535
|
"transactionContext": transactionContext,
|
557
|
})
|
536
|
})
|
558
|
- assessTaskData, err := assessTaskRepo.FindOne(map[string]interface{}{
|
|
|
559
|
- // "id": param.AssessTaskId,
|
|
|
560
|
- })
|
|
|
561
|
- if err != nil {
|
|
|
562
|
- return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取评估任务"+err.Error())
|
537
|
+ if len(userIds) > 0 {
|
|
|
538
|
+ inviteCompletedCount, err = d.CountTargetUserInviteAssess1(userIds, param.CycleId, param.BeginDay)
|
|
|
539
|
+ if err != nil {
|
|
|
540
|
+ log.Logger.Error("获取员工邀请的人完成情况" + err.Error())
|
|
|
541
|
+ }
|
563
|
}
|
542
|
}
|
|
|
543
|
+
|
564
|
//我评估别人,被邀请评估
|
544
|
//我评估别人,被邀请评估
|
565
|
cnnt, _, err := assessRepo.Find(map[string]interface{}{
|
545
|
cnnt, _, err := assessRepo.Find(map[string]interface{}{
|
566
|
- // "staffAssessTaskId": param.AssessTaskId,
|
546
|
+ "beginDay": param.BeginDay,
|
|
|
547
|
+ "cycleId": param.CycleId,
|
567
|
"executorId": param.ExecutorId,
|
548
|
"executorId": param.ExecutorId,
|
568
|
"typesList": []string{string(domain.AssessSuper)},
|
549
|
"typesList": []string{string(domain.AssessSuper)},
|
569
|
"status": string(domain.StaffAssessUncompleted),
|
550
|
"status": string(domain.StaffAssessUncompleted),
|
|
|
551
|
+ "limit": 1,
|
570
|
})
|
552
|
})
|
571
|
if err != nil {
|
553
|
if err != nil {
|
572
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
554
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
|
@@ -579,7 +561,9 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
@@ -579,7 +561,9 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
579
|
for _, v := range assessList {
|
561
|
for _, v := range assessList {
|
580
|
item := adapter.ListSupperAssessResp{
|
562
|
item := adapter.ListSupperAssessResp{
|
581
|
AssessId: v.Id,
|
563
|
AssessId: v.Id,
|
582
|
- UsrId: v.TargetUser.UserId,
|
564
|
+ CycleId: int(v.CycleId),
|
|
|
565
|
+ BeginDay: v.BeginTime.Local().Format("2006-01-02"),
|
|
|
566
|
+ UserId: v.TargetUser.UserId,
|
583
|
UserName: v.TargetUser.UserName,
|
567
|
UserName: v.TargetUser.UserName,
|
584
|
EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
|
568
|
EndTime: v.EndTime.Local().Format("2006-01-02 15:04:05"),
|
585
|
InviteCompleted: 0,
|
569
|
InviteCompleted: 0,
|
|
@@ -616,15 +600,95 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
|
@@ -616,15 +600,95 @@ func (srv StaffAssessServeice) ListExecutorDaySupperAssess(param *query.ListExec |
616
|
resultList = append(resultList, item)
|
600
|
resultList = append(resultList, item)
|
617
|
}
|
601
|
}
|
618
|
result := tool_funs.SimpleWrapGridMap(int64(cnt), resultList)
|
602
|
result := tool_funs.SimpleWrapGridMap(int64(cnt), resultList)
|
619
|
- result["linkNodeName"] = ""
|
|
|
620
|
- result["linkNodeId"] = ""
|
|
|
621
|
result["lintNodeDesc"] = ""
|
603
|
result["lintNodeDesc"] = ""
|
622
|
- for _, v := range assessTaskData.StepList {
|
|
|
623
|
- if v.LinkNodeType == domain.LinkNodeSuperiorAssessment {
|
|
|
624
|
- result["linkNodeName"] = v.LinkNodeName
|
|
|
625
|
- result["linkNodeId"] = fmt.Sprintf("%d", v.LinkNodeId)
|
|
|
626
|
- result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", v.EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
|
|
|
627
|
- }
|
604
|
+ if len(assessList) > 0 {
|
|
|
605
|
+ result["cycleId"] = assessList[0].CycleId
|
|
|
606
|
+ result["beginDay"] = assessList[0].BeginTime.Local().Format("2006-01-02")
|
|
|
607
|
+ result["lintNodeDesc"] = fmt.Sprintf("截止时间 %s 待评估 %d 人", assessList[0].EndTime.Local().Format("2006-01-02 15:04:05"), cnnt)
|
628
|
}
|
608
|
}
|
629
|
return result, nil
|
609
|
return result, nil
|
630
|
}
|
610
|
}
|
|
|
611
|
+
|
|
|
612
|
+//根据周期和日期,获取员工的自评内容
|
|
|
613
|
+func (srv StaffAssessServeice) GetAssessSelfInfoV2(param *query.GetExecutorSelfAssessQuery) (*adapter.AssessInfoResp, error) {
|
|
|
614
|
+ transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
615
|
+ if err != nil {
|
|
|
616
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
617
|
+ }
|
|
|
618
|
+ if err := transactionContext.StartTransaction(); err != nil {
|
|
|
619
|
+ return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
620
|
+ }
|
|
|
621
|
+ defer func() {
|
|
|
622
|
+ _ = transactionContext.RollbackTransaction()
|
|
|
623
|
+ }()
|
|
|
624
|
+ assessReps := factory.CreateStaffAssessRepository(map[string]interface{}{
|
|
|
625
|
+ "transactionContext": transactionContext,
|
|
|
626
|
+ })
|
|
|
627
|
+ // 获取员工的评估
|
|
|
628
|
+ _, assessList, err := assessReps.Find(map[string]interface{}{
|
|
|
629
|
+ "companyId": param.CompanyId,
|
|
|
630
|
+ "executorId": param.TargetUserId,
|
|
|
631
|
+ "cycleId": param.CycleId,
|
|
|
632
|
+ "beginDay": param.BeginDay,
|
|
|
633
|
+ "typesList": []string{string(domain.AssessSelf)},
|
|
|
634
|
+ "limit": 1,
|
|
|
635
|
+ })
|
|
|
636
|
+ if err != nil {
|
|
|
637
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取员工的评估"+err.Error())
|
|
|
638
|
+ }
|
|
|
639
|
+ if len(assessList) == 0 {
|
|
|
640
|
+ return nil, application.ThrowError(application.BUSINESS_ERROR, "不存在员工的自评内容")
|
|
|
641
|
+ }
|
|
|
642
|
+ assessData := assessList[0]
|
|
|
643
|
+
|
|
|
644
|
+ assessContentList := []*domain.StaffAssessContent{}
|
|
|
645
|
+ if assessData.Status == domain.StaffAssessCompleted {
|
|
|
646
|
+ //已完成
|
|
|
647
|
+ assessContentRepo := factory.CreateStaffAssessContentRepository(map[string]interface{}{
|
|
|
648
|
+ "transactionContext": transactionContext,
|
|
|
649
|
+ })
|
|
|
650
|
+ _, assessContentList, err = assessContentRepo.Find(map[string]interface{}{
|
|
|
651
|
+ "staffAssessId": assessData.Id,
|
|
|
652
|
+ })
|
|
|
653
|
+ if err != nil {
|
|
|
654
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取项目填写内容"+err.Error())
|
|
|
655
|
+ }
|
|
|
656
|
+ } else if assessData.Status == domain.StaffAssessUncompleted {
|
|
|
657
|
+ //未完成
|
|
|
658
|
+ assessContentList, err = srv.getAssessSelfInfoUncompleted(transactionContext, assessData)
|
|
|
659
|
+ if err != nil {
|
|
|
660
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "获取项目填写内容"+err.Error())
|
|
|
661
|
+ }
|
|
|
662
|
+ }
|
|
|
663
|
+
|
|
|
664
|
+ //获取员工描述
|
|
|
665
|
+ staffDesc, _ := srv.getStaffDescrip(transactionContext, int64(param.TargetUserId))
|
|
|
666
|
+ if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
667
|
+ return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
668
|
+ }
|
|
|
669
|
+ result := adapter.AssessInfoResp{
|
|
|
670
|
+ AssessId: assessData.Id,
|
|
|
671
|
+ CycleId: assessData.CycleId,
|
|
|
672
|
+ CycleName: assessData.CycleName,
|
|
|
673
|
+ LinkNodeId: assessData.LinkNodeId,
|
|
|
674
|
+ LinkNodeName: assessData.LinkNodeName,
|
|
|
675
|
+ EvaluationProjectId: assessData.EvaluationProjectId,
|
|
|
676
|
+ EvaluationProjectName: assessData.EvaluationProjectName,
|
|
|
677
|
+ BeginTime: assessData.BeginTime.Local().Format("2006-01-02 15:04:05"),
|
|
|
678
|
+ EndTime: assessData.EndTime.Local().Format("2006-01-02 15:04:05"),
|
|
|
679
|
+ Status: string(assessData.Status),
|
|
|
680
|
+ TargetUserId: assessData.TargetUser.UserId,
|
|
|
681
|
+ TargetUserName: assessData.TargetUser.UserName,
|
|
|
682
|
+ CompanyId: assessData.CompanyId,
|
|
|
683
|
+ CompanyName: "",
|
|
|
684
|
+ SupperUser: "",
|
|
|
685
|
+ DutyTime: "",
|
|
|
686
|
+ AssessContent: assessContentList,
|
|
|
687
|
+ }
|
|
|
688
|
+ if staffDesc != nil {
|
|
|
689
|
+ result.CompanyName = staffDesc.CompanyName
|
|
|
690
|
+ result.SupperUser = staffDesc.SupperUserName
|
|
|
691
|
+ result.DutyTime = staffDesc.DutyTime
|
|
|
692
|
+ }
|
|
|
693
|
+ return &result, nil
|
|
|
694
|
+} |