|
@@ -87,32 +87,32 @@ func (d *StaffAssessDao) CountTargetUserInviteAssess1(userIds []int, cycleId int |
|
@@ -87,32 +87,32 @@ func (d *StaffAssessDao) CountTargetUserInviteAssess1(userIds []int, cycleId int |
87
|
}
|
87
|
}
|
88
|
|
88
|
|
89
|
// 根据评估的人执行人id,搜索 executorId参与的评估任务
|
89
|
// 根据评估的人执行人id,搜索 executorId参与的评估任务
|
90
|
-func (d *StaffAssessDao) SearchAssessTaskMe(executorId int, companyId int, limit int, offset int) ([]*domain.StaffAssessTask, error) {
|
|
|
91
|
-
|
|
|
92
|
- if limit < 0 {
|
|
|
93
|
- limit = 20
|
|
|
94
|
- }
|
|
|
95
|
- if offset < 0 {
|
|
|
96
|
- offset = 0
|
|
|
97
|
- }
|
|
|
98
|
-
|
|
|
99
|
- sqlStr := `SELECT DISTINCT staff_assess_task.* FROM staff_assess_task
|
|
|
100
|
- JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
|
|
|
101
|
- WHERE staff_assess.company_id=?
|
|
|
102
|
- and staff_assess_task.deleted_at isnull
|
|
|
103
|
- and staff_assess.executor->>'userId'='?'
|
|
|
104
|
- order by staff_assess_task.id desc
|
|
|
105
|
- limit ? offset ?
|
|
|
106
|
- `
|
|
|
107
|
- tx := d.transactionContext.PgTx
|
|
|
108
|
- condition := []interface{}{
|
|
|
109
|
- companyId, executorId, limit, offset,
|
|
|
110
|
- }
|
|
|
111
|
- result := []*domain.StaffAssessTask{}
|
|
|
112
|
- _, err := tx.Query(&result, sqlStr, condition...)
|
|
|
113
|
- return result, err
|
|
|
114
|
-
|
|
|
115
|
-}
|
90
|
+// func (d *StaffAssessDao) SearchAssessTaskMe(executorId int, companyId int, limit int, offset int) ([]*domain.StaffAssessTask, error) {
|
|
|
91
|
+
|
|
|
92
|
+// if limit < 0 {
|
|
|
93
|
+// limit = 20
|
|
|
94
|
+// }
|
|
|
95
|
+// if offset < 0 {
|
|
|
96
|
+// offset = 0
|
|
|
97
|
+// }
|
|
|
98
|
+
|
|
|
99
|
+// sqlStr := `SELECT DISTINCT staff_assess_task.* FROM staff_assess_task
|
|
|
100
|
+// JOIN staff_assess ON staff_assess_task."id" = staff_assess."staff_assess_task_id"
|
|
|
101
|
+// WHERE staff_assess.company_id=?
|
|
|
102
|
+// and staff_assess_task.deleted_at isnull
|
|
|
103
|
+// and staff_assess.executor->>'userId'='?'
|
|
|
104
|
+// order by staff_assess_task.id desc
|
|
|
105
|
+// limit ? offset ?
|
|
|
106
|
+// `
|
|
|
107
|
+// tx := d.transactionContext.PgTx
|
|
|
108
|
+// condition := []interface{}{
|
|
|
109
|
+// companyId, executorId, limit, offset,
|
|
|
110
|
+// }
|
|
|
111
|
+// result := []*domain.StaffAssessTask{}
|
|
|
112
|
+// _, err := tx.Query(&result, sqlStr, condition...)
|
|
|
113
|
+// return result, err
|
|
|
114
|
+
|
|
|
115
|
+// }
|
116
|
|
116
|
|
117
|
// 搜索 executorId 参与的评估任务
|
117
|
// 搜索 executorId 参与的评估任务
|
118
|
func (d *StaffAssessDao) CountAssessTaskMe(executorId int, companyId int) (int, error) {
|
118
|
func (d *StaffAssessDao) CountAssessTaskMe(executorId int, companyId int) (int, error) {
|
|
@@ -1253,3 +1253,7 @@ func (d *StaffAssessDao) CountUncompletedSelfAssess(companyId int, projectIds [] |
|
@@ -1253,3 +1253,7 @@ func (d *StaffAssessDao) CountUncompletedSelfAssess(companyId int, projectIds [] |
1253
|
_, err := tx.Query(&result, sqlStr, condition...)
|
1253
|
_, err := tx.Query(&result, sqlStr, condition...)
|
1254
|
return result, err
|
1254
|
return result, err
|
1255
|
}
|
1255
|
}
|
|
|
1256
|
+
|
|
|
1257
|
+func (d *StaffAssessDao) SearchAssesBeforeNow() {}
|
|
|
1258
|
+
|
|
|
1259
|
+func (d *StaffAssessDao) SearchAssessAfterNow() {} |