|
@@ -155,7 +155,7 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage |
|
@@ -155,7 +155,7 @@ func (d *TaskDao) ListTaskStageNotHrbp(param ListTaskCondition) ([]ListTaskStage |
155
|
if param.OnlyMy {
|
155
|
if param.OnlyMy {
|
156
|
condition = append(condition, param.UserId)
|
156
|
condition = append(condition, param.UserId)
|
157
|
whereSql += ` and t_task_tage_1.leader_id = '?' `
|
157
|
whereSql += ` and t_task_tage_1.leader_id = '?' `
|
158
|
- } else if param.LeaderId != "" {
|
158
|
+ } else if param.LeaderId != "" && param.LeaderId != "0" {
|
159
|
condition = append(condition, param.LeaderId)
|
159
|
condition = append(condition, param.LeaderId)
|
160
|
whereSql += ` and t_task_tage_1.leader_id = ? `
|
160
|
whereSql += ` and t_task_tage_1.leader_id = ? `
|
161
|
}
|
161
|
}
|
|
@@ -186,7 +186,7 @@ func (d *TaskDao) CountTaskStageNotHrbp(param ListTaskCondition) (int, error) { |
|
@@ -186,7 +186,7 @@ func (d *TaskDao) CountTaskStageNotHrbp(param ListTaskCondition) (int, error) { |
186
|
if param.OnlyMy {
|
186
|
if param.OnlyMy {
|
187
|
condition = append(condition, param.UserId)
|
187
|
condition = append(condition, param.UserId)
|
188
|
whereSql += ` and task.leader ->>'id' = '?' `
|
188
|
whereSql += ` and task.leader ->>'id' = '?' `
|
189
|
- } else if param.LeaderId != "" {
|
189
|
+ } else if param.LeaderId != "" && param.LeaderId != "0" {
|
190
|
condition = append(condition, param.LeaderId)
|
190
|
condition = append(condition, param.LeaderId)
|
191
|
whereSql += ` and task.leader ->>'id' = ? `
|
191
|
whereSql += ` and task.leader ->>'id' = ? `
|
192
|
}
|
192
|
}
|
|
@@ -274,18 +274,18 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage, |
|
@@ -274,18 +274,18 @@ func (d *TaskDao) ListTaskStageByHrbp(param ListTaskCondition) ([]ListTaskStage, |
274
|
whereSql := ``
|
274
|
whereSql := ``
|
275
|
if param.OnlyMy {
|
275
|
if param.OnlyMy {
|
276
|
condition = append(condition, param.UserId)
|
276
|
condition = append(condition, param.UserId)
|
277
|
- whereSql += ` and task.leader ->>'id' = '?' `
|
|
|
278
|
- } else if param.LeaderId != "" {
|
277
|
+ whereSql += ` and t_task_tage_1.leader_id = '?' `
|
|
|
278
|
+ } else if param.LeaderId != "" && param.LeaderId != "0" {
|
279
|
condition = append(condition, param.LeaderId)
|
279
|
condition = append(condition, param.LeaderId)
|
280
|
- whereSql += ` and task.leader ->>'id' = ? `
|
280
|
+ whereSql += ` and t_task_tage_1.leader_id = ? `
|
281
|
}
|
281
|
}
|
282
|
if len(param.TaskName) > 0 {
|
282
|
if len(param.TaskName) > 0 {
|
283
|
condition = append(condition, param.TaskName)
|
283
|
condition = append(condition, param.TaskName)
|
284
|
- whereSql += ` and task.name like ? `
|
284
|
+ whereSql += ` and t_task_tage_1.task_name like ? `
|
285
|
}
|
285
|
}
|
286
|
if len(param.LevelName) > 0 {
|
286
|
if len(param.LevelName) > 0 {
|
287
|
condition = append(condition, param.LevelName)
|
287
|
condition = append(condition, param.LevelName)
|
288
|
- whereSql += ` and task.level_name like ? `
|
288
|
+ whereSql += ` and t_task_tage_1.level_name like ? `
|
289
|
}
|
289
|
}
|
290
|
condition = append(condition, param.Limit, param.Offset)
|
290
|
condition = append(condition, param.Limit, param.Offset)
|
291
|
sqlStr := fmt.Sprintf(withSql, whereSql)
|
291
|
sqlStr := fmt.Sprintf(withSql, whereSql)
|
|
@@ -309,7 +309,7 @@ func (d *TaskDao) CountTaskStageByHrbp(param ListTaskCondition) (int, error) { |
|
@@ -309,7 +309,7 @@ func (d *TaskDao) CountTaskStageByHrbp(param ListTaskCondition) (int, error) { |
309
|
if param.OnlyMy {
|
309
|
if param.OnlyMy {
|
310
|
condition = append(condition, param.UserId)
|
310
|
condition = append(condition, param.UserId)
|
311
|
whereSql += ` and task.leader ->>'id' = '?' `
|
311
|
whereSql += ` and task.leader ->>'id' = '?' `
|
312
|
- } else if param.LeaderId != "" {
|
312
|
+ } else if param.LeaderId != "" && param.LeaderId != "0" {
|
313
|
condition = append(condition, param.LeaderId)
|
313
|
condition = append(condition, param.LeaderId)
|
314
|
whereSql += ` and task.leader ->>'id' = ? `
|
314
|
whereSql += ` and task.leader ->>'id' = ? `
|
315
|
}
|
315
|
}
|
|
@@ -346,7 +346,7 @@ func (d *TaskDao) CountTaskStageAnomalyNotHrbp(param ListTaskCondition) (int, er |
|
@@ -346,7 +346,7 @@ func (d *TaskDao) CountTaskStageAnomalyNotHrbp(param ListTaskCondition) (int, er |
346
|
if param.OnlyMy {
|
346
|
if param.OnlyMy {
|
347
|
condition = append(condition, param.UserId)
|
347
|
condition = append(condition, param.UserId)
|
348
|
whereSql += ` and task.leader ->>'id' = '?' `
|
348
|
whereSql += ` and task.leader ->>'id' = '?' `
|
349
|
- } else if param.LeaderId != "" {
|
349
|
+ } else if param.LeaderId != "" && param.LeaderId != "0" {
|
350
|
condition = append(condition, param.LeaderId)
|
350
|
condition = append(condition, param.LeaderId)
|
351
|
whereSql += ` and task.leader ->>'id' = ? `
|
351
|
whereSql += ` and task.leader ->>'id' = ? `
|
352
|
}
|
352
|
}
|
|
@@ -385,7 +385,7 @@ func (d *TaskDao) CountTaskStageAnomalyByHrbp(param ListTaskCondition) (int, err |
|
@@ -385,7 +385,7 @@ func (d *TaskDao) CountTaskStageAnomalyByHrbp(param ListTaskCondition) (int, err |
385
|
if param.OnlyMy {
|
385
|
if param.OnlyMy {
|
386
|
condition = append(condition, param.UserId)
|
386
|
condition = append(condition, param.UserId)
|
387
|
whereSql += ` and task.leader ->>'id' = '?' `
|
387
|
whereSql += ` and task.leader ->>'id' = '?' `
|
388
|
- } else if param.LeaderId != "" {
|
388
|
+ } else if param.LeaderId != "" && param.LeaderId != "0" {
|
389
|
condition = append(condition, param.LeaderId)
|
389
|
condition = append(condition, param.LeaderId)
|
390
|
whereSql += ` and task.leader ->>'id' = ? `
|
390
|
whereSql += ` and task.leader ->>'id' = ? `
|
391
|
}
|
391
|
}
|