package com.dgtly.web.controller.people;

import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.dgtly.common.annotation.Log;
import com.dgtly.common.enums.BusinessType;
import com.dgtly.system.domain.UserTemperature;
import com.dgtly.system.service.IUserTemperatureService;
import com.dgtly.common.core.controller.BaseController;
import com.dgtly.common.core.domain.AjaxResult;
import com.dgtly.common.utils.poi.ExcelUtil;
import com.dgtly.common.core.page.TableDataInfo;

/**
 * 用户体温Controller
 * 
 * @author dgtly
 * @date 2020-02-14
 */
@Controller
@RequestMapping("/people/temperature")
public class UserTemperatureController extends BaseController
{
    private String prefix = "system/people";

    @Autowired
    private IUserTemperatureService userTemperatureService;


    @GetMapping("{userId}")
    public String temperature(ModelMap mmap,@PathVariable Long userId)
    {
        mmap.put("userId",userId);
        return prefix + "/temperature";
    }

    /**
     * 查询体温申报列表
     */
    @PostMapping("/list/{userId}")
    @ResponseBody
    public TableDataInfo list(@PathVariable Long userId)
    {
        UserTemperature userTemperature = new UserTemperature();
        userTemperature.setUserId(userId);
        startPage();
        List<UserTemperature> list = userTemperatureService.selectUserTemperatureList(userTemperature);
        return getDataTable(list);
    }





}
