...
|
...
|
@@ -50,18 +50,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu |
|
|
positionRepo := factory.CreatePositionRepository(map[string]interface{}{
|
|
|
"transactionContext": transactionContext,
|
|
|
})
|
|
|
limit := param.PageSize
|
|
|
offset := (param.PageNumber - 1) * param.PageSize
|
|
|
// limit := param.PageSize
|
|
|
// offset := (param.PageNumber - 1) * param.PageSize
|
|
|
|
|
|
//获取评估列表信息
|
|
|
condition1 := map[string]interface{}{
|
|
|
"cycleId": param.CycleId,
|
|
|
"types": int(domain.EvaluationFinish),
|
|
|
"limit": limit,
|
|
|
}
|
|
|
if offset > 0 {
|
|
|
condition1["offset"] = offset
|
|
|
"limit": 5000,
|
|
|
}
|
|
|
// if offset > 0 {
|
|
|
// condition1["offset"] = offset
|
|
|
// }
|
|
|
if len(param.TargetUserName) > 0 {
|
|
|
condition1["targetUserName"] = "%" + param.TargetUserName + "%"
|
|
|
}
|
...
|
...
|
@@ -147,6 +147,8 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu |
|
|
firstSheetName := xlsxFile.GetSheetName(sheetIndex)
|
|
|
tableHead := []string{"姓名", "部门", "职位", "最终绩效得分"}
|
|
|
tableHead = append(tableHead, ratingHeader...)
|
|
|
// 最后一列
|
|
|
tableHead = append(tableHead, "备注")
|
|
|
if len(evaluationList) > 0 {
|
|
|
xlsxFile.SetSheetRow(firstSheetName, "A1", &[]string{evaluationList[0].CycleName + "最终成绩"})
|
|
|
if len(tableHead) > 1 {
|
...
|
...
|
@@ -171,7 +173,7 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
dataRaw := []string{
|
|
|
dataRow := []string{
|
|
|
v.TargetUser.UserName,
|
|
|
departmentName,
|
|
|
positinName,
|
...
|
...
|
@@ -179,12 +181,18 @@ func (srv *SummaryEvaluationService) ExportAllEvaluationFinish(param *command.Qu |
|
|
}
|
|
|
for _, v2 := range ratingHeader {
|
|
|
if num, ok := evaluationRatingMap[v.Id][v2]; ok {
|
|
|
dataRaw = append(dataRaw, fmt.Sprintf("%d", num))
|
|
|
dataRow = append(dataRow, fmt.Sprintf("%d", num))
|
|
|
} else {
|
|
|
dataRaw = append(dataRaw, "0")
|
|
|
dataRow = append(dataRow, "0")
|
|
|
}
|
|
|
}
|
|
|
xlsxFile.SetSheetRow(firstSheetName, fmt.Sprintf("A%d", i+firstDataRow), &dataRaw)
|
|
|
if v.CheckResult == domain.EvaluationCheckCompleted {
|
|
|
dataRow = append(dataRow, "已确认")
|
|
|
} else {
|
|
|
dataRow = append(dataRow, "未确认")
|
|
|
}
|
|
|
//最后一列
|
|
|
xlsxFile.SetSheetRow(firstSheetName, fmt.Sprintf("A%d", i+firstDataRow), &dataRow)
|
|
|
}
|
|
|
return xlsxFile, nil
|
|
|
} |
...
|
...
|
|