作者 tangxvhui

更新筛选列表输出

@@ -1063,6 +1063,10 @@ func (srv TaskService) ConditionForListTask2(param *command.GetSelcetCommand) (m @@ -1063,6 +1063,10 @@ func (srv TaskService) ConditionForListTask2(param *command.GetSelcetCommand) (m
1063 switch param.Cmd { 1063 switch param.Cmd {
1064 case "任务名称": 1064 case "任务名称":
1065 for _, val := range tasklistData { 1065 for _, val := range tasklistData {
  1066 + if _, ok := uniqueMap[val.Name]; ok {
  1067 + continue
  1068 + }
  1069 + uniqueMap[val.Name] = struct{}{}
1066 selectList = append(selectList, adapter.ConditionSelect{Name: val.Name}) 1070 selectList = append(selectList, adapter.ConditionSelect{Name: val.Name})
1067 } 1071 }
1068 case "负责人": 1072 case "负责人":
@@ -9,8 +9,8 @@ import ( @@ -9,8 +9,8 @@ import (
9 func TestGenerateToken(t *testing.T) { 9 func TestGenerateToken(t *testing.T) {
10 ut := UserAuth{ 10 ut := UserAuth{
11 CompanyId: 8, 11 CompanyId: 8,
12 - UserId: 3438641393081088,  
13 - Phone: "17711111111", 12 + UserId: 3422174102828544,
  13 + Phone: "17708397664",
14 PlatformId: 29, 14 PlatformId: 29,
15 AdminType: 1, 15 AdminType: 1,
16 } 16 }
@@ -540,7 +540,7 @@ func (d *TaskDao) ListTask2(userId int) ([]TaskData1, error) { @@ -540,7 +540,7 @@ func (d *TaskDao) ListTask2(userId int) ([]TaskData1, error) {
540 task1 := d.catchTaskIdByPermission(userId) 540 task1 := d.catchTaskIdByPermission(userId)
541 sqlStr := task1 + ` select task."name" ,task.alias , 541 sqlStr := task1 + ` select task."name" ,task.alias ,
542 task.leader ->>'id' as leader_id, 542 task.leader ->>'id' as leader_id,
543 - task.leader ->>'name' as leaer_name, 543 + task.leader ->>'name' as leader_name,
544 task.level_name 544 task.level_name
545 from task ` 545 from task `
546 result := []TaskData1{} 546 result := []TaskData1{}
@@ -556,7 +556,7 @@ func (d *TaskDao) ListTask2ForHrbp(userId int) ([]TaskData1, error) { @@ -556,7 +556,7 @@ func (d *TaskDao) ListTask2ForHrbp(userId int) ([]TaskData1, error) {
556 select task_ignore.task_id,task_ignore.id from task_ignore where task_ignore.user_id =? 556 select task_ignore.task_id,task_ignore.id from task_ignore where task_ignore.user_id =?
557 )select task."name" ,task.alias , 557 )select task."name" ,task.alias ,
558 task.leader ->>'id' as leader_id, 558 task.leader ->>'id' as leader_id,
559 - task.leader ->>'name' as leaer_name, 559 + task.leader ->>'name' as leader_name,
560 task.level_name 560 task.level_name
561 from task 561 from task
562 left join t_task_ignore on t_task_ignore.task_id=task.id 562 left join t_task_ignore on t_task_ignore.task_id=task.id