作者 tangxvhui

更新筛选列表输出

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