AdminTaskDetailController.java 1.82 KB
package com.huaheng.pc.task.taskDetail.controller;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.huaheng.framework.aspectj.lang.annotation.Log;
import com.huaheng.framework.aspectj.lang.constant.BusinessType;
import com.huaheng.framework.web.controller.BaseController;
import com.huaheng.framework.web.page.TableDataInfo;
import com.huaheng.pc.task.taskDetail.domain.TaskDetail;
import com.huaheng.pc.task.taskDetail.service.TaskDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 立库任务明细 信息操作处理
 * 
 * @author huaheng
 * @date 2018-08-19
 */
@Controller
@RequestMapping("/admin/taskDetail")
public class AdminTaskDetailController extends BaseController
{
    private String prefix = "admin/taskDetail";
	
	@Autowired
	private TaskDetailService taskDetailService;
	
//	@RequiresPermissions("admin:task:view")
	@GetMapping("/{taskId}")
	public String taskDetail(@PathVariable("taskId") String taskId, ModelMap mmap)
	{
		mmap.put("taskId", taskId);
		return prefix + "/taskDetail";
	}
	
	/**
	 * 查询立库任务明细列表
	 */
//	@RequiresPermissions("admin:task:list")
	@Log(title = "任务-任务管理", operating = "查看立库任务明细", action = BusinessType.GRANT)
	@PostMapping("/list")
	@ResponseBody
	public TableDataInfo list(TaskDetail taskDetail)
	{
		startPage();
		LambdaQueryWrapper<TaskDetail> lambdaQueryWrapper = Wrappers.lambdaQuery();
		lambdaQueryWrapper.eq(TaskDetail::getTaskId,taskDetail.getTaskId());
		List<TaskDetail> list = taskDetailService.list(lambdaQueryWrapper) ;
		return getDataTable(list);
	}

	
}