作者 tangxvhui

更新

... ... @@ -1220,9 +1220,9 @@ func (srv *SummaryEvaluationService) GetTargetUserEvaluationSuper(param *command
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "没有找到符合条件的数据")
}
evaluationData := evaluationList[0]
if evaluationData.Types == domain.EvaluationSuper {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
// if evaluationData.Types == domain.EvaluationSuper {
// return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
// }
if evaluationData.CompanyId == param.CompanyId {
return nil, application.ThrowError(application.BUSINESS_ERROR, "没有操作权限")
}
... ...
... ... @@ -87,32 +87,32 @@ func (d *StaffAssessDao) CountTargetUserInviteAssess1(userIds []int, cycleId int
}
// 根据评估的人执行人id,搜索 executorId参与的评估任务
func (d *StaffAssessDao) SearchAssessTaskMe(executorId int, companyId int, limit int, offset int) ([]*domain.StaffAssessTask, error) {
if limit < 0 {
limit = 20
}
if offset < 0 {
offset = 0
}
sqlStr := `SELECT DISTINCT staff_assess_task.* FROM staff_assess_task
JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
WHERE staff_assess.company_id=?
and staff_assess_task.deleted_at isnull
and staff_assess.executor->>'userId'='?'
order by staff_assess_task.id desc
limit ? offset ?
`
tx := d.transactionContext.PgTx
condition := []interface{}{
companyId, executorId, limit, offset,
}
result := []*domain.StaffAssessTask{}
_, err := tx.Query(&result, sqlStr, condition...)
return result, err
}
// func (d *StaffAssessDao) SearchAssessTaskMe(executorId int, companyId int, limit int, offset int) ([]*domain.StaffAssessTask, error) {
// if limit < 0 {
// limit = 20
// }
// if offset < 0 {
// offset = 0
// }
// sqlStr := `SELECT DISTINCT staff_assess_task.* FROM staff_assess_task
// JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
// WHERE staff_assess.company_id=?
// and staff_assess_task.deleted_at isnull
// and staff_assess.executor->>'userId'='?'
// order by staff_assess_task.id desc
// limit ? offset ?
// `
// tx := d.transactionContext.PgTx
// condition := []interface{}{
// companyId, executorId, limit, offset,
// }
// result := []*domain.StaffAssessTask{}
// _, err := tx.Query(&result, sqlStr, condition...)
// return result, err
// }
// 搜索 executorId 参与的评估任务
func (d *StaffAssessDao) CountAssessTaskMe(executorId int, companyId int) (int, error) {
... ... @@ -1253,3 +1253,7 @@ func (d *StaffAssessDao) CountUncompletedSelfAssess(companyId int, projectIds []
_, err := tx.Query(&result, sqlStr, condition...)
return result, err
}
func (d *StaffAssessDao) SearchAssesBeforeNow() {}
func (d *StaffAssessDao) SearchAssessAfterNow() {}
... ...