Browse Source

feature(督办): 督办可按照Id查询详情

likai 2 years ago
parent
commit
cf2fc8bbdb

+ 1 - 0
opms_parent/app/model/plat/plat_task.go

@@ -22,6 +22,7 @@ type PlatTaskEx struct {
 
 // 查询
 type SearchPlatTaskReq struct {
+	TaskId      string `json:"taskId"`      // 任务Id
 	TaskTitle   string `json:"taskTitle"`   // 任务标题
 	TaskType    string `son:"taskType"`     // 任务类型 数据字典
 	Source      string `json:"source"`      // 事项来源 数据字典

+ 3 - 0
opms_parent/app/service/plat/plat_task.go

@@ -45,6 +45,9 @@ func NewTaskService(ctx context.Context) (svc *taskService, err error) {
 // GetList 任务信息列表
 func (s *taskService) GetList(req *model.SearchPlatTaskReq) (total int, TaskList []*model.PlatTaskEx, err error) {
 	TaskModel := s.Dao.LeftJoin("plat_task_handle", "plat_task_handle.task_id=plat_task.id")
+	if req.TaskId != "" {
+		TaskModel = TaskModel.Where("plat_task.id", req.TaskId)
+	}
 	if req.TaskTitle != "" {
 		TaskModel = TaskModel.Where("plat_task.task_title LIKE ?", "%"+req.TaskTitle+"%")
 	}