...
|
...
|
@@ -99,5 +99,57 @@ func (d *StaffAssessDao) CountAssessTaskMe(executorId int, companyId int) (int, |
|
|
result := 0
|
|
|
_, err := tx.QueryOne(pg.Scan(&result), sqlStr, condition...)
|
|
|
return result, err
|
|
|
}
|
|
|
|
|
|
//获取所以已经执行的评估周期
|
|
|
type AssessCycle struct {
|
|
|
CycleId string `json:"cycleId"` //周期id
|
|
|
CompanyId string `json:"companyId"`
|
|
|
CycleName string `json:"cycleName"` //周期名称
|
|
|
}
|
|
|
|
|
|
//获取所以已经执行的评估周期
|
|
|
func (d *StaffAssessDao) AllAssessCycleList(companyId int) ([]AssessCycle, error) {
|
|
|
sqlStr := `select
|
|
|
distinct
|
|
|
staff_assess_task.cycle_id ,
|
|
|
staff_assess_task.company_id ,
|
|
|
staff_assess_task.cycle_name
|
|
|
from staff_assess_task
|
|
|
where staff_assess_task.company_id = ?`
|
|
|
|
|
|
tx := d.transactionContext.PgTx
|
|
|
condition := []interface{}{
|
|
|
companyId,
|
|
|
}
|
|
|
result := []AssessCycle{}
|
|
|
_, err := tx.QueryOne(&result, sqlStr, condition...)
|
|
|
return result, err
|
|
|
}
|
|
|
|
|
|
//获取评估周期中的绩效考核日期
|
|
|
type AssessCycleDay struct {
|
|
|
BeginDay string `json:"beginDay"`
|
|
|
CycleId string `json:"cycleId"`
|
|
|
CompanyId string `json:"companyId"`
|
|
|
}
|
|
|
|
|
|
//获取评估周期中的绩效考核日期
|
|
|
func (d *StaffAssessDao) AllAssessCycleDayList(companyId int, cycleId int) ([]AssessCycleDay, error) {
|
|
|
sqlStr := `select distinct staff_assess_task.begin_day ,
|
|
|
staff_assess_task.cycle_id ,
|
|
|
staff_assess_task.company_id
|
|
|
from staff_assess_task
|
|
|
where staff_assess_task.cycle_id = ?
|
|
|
and company_id =? `
|
|
|
|
|
|
tx := d.transactionContext.PgTx
|
|
|
condition := []interface{}{
|
|
|
cycleId, companyId,
|
|
|
}
|
|
|
result := []AssessCycleDay{}
|
|
|
_, err := tx.QueryOne(&result, sqlStr, condition...)
|
|
|
return result, err
|
|
|
}
|
|
|
|
|
|
//根据周期的id和日期获取员工填写的评估内容 |
...
|
...
|
|