作者 郑周

1. 文件导出指标优化- 增加选择周期里的具体日期

... ... @@ -24,6 +24,7 @@ type ExportPerformanceIndicatorCommand struct {
CycleId int `cname:"周期ID" json:"cycleId,string"`
Title string `cname:"标题" json:"title"`
Selected []ExportSelected `cname:"选中用户" json:"selected"`
BeginDays []string `cname:"选中日期" json:"beginDays"`
CompanyId int `cname:"公司ID" json:"companyId"`
OperatorId int `cname:"操作人ID" json:"operatorId"`
}
... ...
... ... @@ -356,6 +356,7 @@ func (srv StaffAssessServeice) ExportPerformanceIndicator(in *query.ExportPerfor
in.CompanyId,
in.OperatorId,
in.CycleId,
in.BeginDays,
hrbp,
string(domain.AssessSelf),
userIds)
... ...
... ... @@ -842,7 +842,14 @@ type ExportPerformanceIndicator struct {
Remark []domain.AssessContemtRemark `json:"remark"` // 评估内容填写反馈内容
}
func (d *StaffAssessDao) ExportPerformanceIndicator(companyId int, operatorId int, cycleId int, hrbp int, assessType string, userIds []string) ([]ExportPerformanceIndicator, error) {
func (d *StaffAssessDao) ExportPerformanceIndicator(
companyId int,
operatorId int,
cycleId int,
beginDays []string,
hrbp int,
assessType string,
userIds []string) ([]ExportPerformanceIndicator, error) {
sqlString := `
set time zone 'PRC';
with t_user_department as (
... ... @@ -947,6 +954,11 @@ func (d *StaffAssessDao) ExportPerformanceIndicator(companyId int, operatorId in
sqlString += ` and t_staff_assess_1.target_user_id in (?) `
condition = append(condition, pg.In(userIds))
}
if len(beginDays) > 0 {
sqlString += ` and t_staff_assess_1.begin_day in (?) `
condition = append(condition, pg.In(beginDays))
}
//sqlString += ` order by convert_to(t_staff_assess_1.target_user_name,'GBK'), staff_assess_content.sort_by`
sqlString += ` order by t_staff_assess_1.begin_day`
... ...