...
|
...
|
@@ -478,6 +478,14 @@ func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecu |
|
|
assessRepo := factory.CreateStaffAssessRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
//公司存储
|
|
|
companyRepo := factory.CreateCompanyRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
|
|
|
companyInfo, _ := companyRepo.FindOne(map[string]interface{}{
|
|
|
"id": param.CompanyId,
|
|
|
})
|
|
|
|
|
|
limit := 20
|
|
|
if param.PageSize > 0 {
|
...
|
...
|
@@ -502,6 +510,7 @@ func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecu |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
//获取目标用户
|
|
|
userIds := []int{}
|
|
|
for _, v := range assessList {
|
...
|
...
|
@@ -556,10 +565,20 @@ func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecu |
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, "获取个人的评估环节"+err.Error())
|
|
|
}
|
|
|
var allAssessId []int
|
|
|
for _, v := range assessList {
|
|
|
allAssessId = append(allAssessId, v.Id)
|
|
|
}
|
|
|
|
|
|
assessValueMap := d.SearchContentValueByAssessId(allAssessId)
|
|
|
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
|
|
|
companyName := ""
|
|
|
if companyInfo != nil {
|
|
|
companyName = companyInfo.Name
|
|
|
}
|
|
|
resultList := []adapter.ListSupperAssessResp{}
|
|
|
for _, v := range assessList {
|
|
|
item := adapter.ListSupperAssessResp{
|
...
|
...
|
@@ -575,7 +594,12 @@ func (srv StaffAssessServeice) ListExecutorSupperAssessV2(param *query.ListExecu |
|
|
InviteTotal: 5,
|
|
|
Department: "",
|
|
|
Position: "",
|
|
|
CompanyName: companyName,
|
|
|
DutyTime: "",
|
|
|
ContentValue: []string{},
|
|
|
}
|
|
|
if values, ok := assessValueMap[v.Id]; ok {
|
|
|
item.ContentValue = values
|
|
|
}
|
|
|
//填入部门
|
|
|
for _, vv := range v.TargetDepartment {
|
...
|
...
|
|