|
|
package service
|
|
|
|
|
|
import (
|
|
|
"github.com/linmadan/egglib-go/core/application"
|
|
|
"github.com/xuri/excelize/v2"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/factory"
|
|
|
"gitlab.fjmaimaimai.com/allied-creation/performance/pkg/application/staff_assess/query"
|
|
|
)
|
|
|
|
|
|
//数据导出
|
|
|
|
|
|
func (srv *StaffAssessServeice) ExportUserAssess2V2(param *query.ExportUserAssess2Commad) (*excelize.File, error) {
|
|
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
|
|
if err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.StartTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
|
|
|
}
|
|
|
defer func() {
|
|
|
_ = transactionContext.RollbackTransaction()
|
|
|
}()
|
|
|
// hrbp, err := srv.getHRBP(transactionContext, param.CompanyId, param.OperatorId)
|
|
|
// if err != nil {
|
|
|
// return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
// }
|
|
|
|
|
|
// 按照cycleId 获取项目
|
|
|
|
|
|
// 按照项目获取指标项
|
|
|
// 按照项目获取填写的内容
|
|
|
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
return nil, nil
|
|
|
} |
...
|
...
|
|