/**
 * Copyright (C), 2015-2020
 * Author:   HJL
 * Date:     2020/1/15 15:37
 * Description:
 */
package com.emr.controller;

import com.emr.entity.V_Count2;
import com.emr.service.V_CountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

@Controller
@RequestMapping("vCount2")
public class VCount2Controller {

    @Autowired
    private V_CountService v_countService;

    @RequestMapping(value = "/vCounts")
    public String vCountDir(Model model) {
        return "vCountDir/vCountList2";

    }

    @ResponseBody
    @RequestMapping(value = "/selByDept")
    public List<V_Count2> selByDept(HttpServletResponse response, V_Count2 vCount2) throws Exception {
        //统计列表
        List<V_Count2> list= v_countService.selByDept(vCount2);
        return list;
    }


    @ResponseBody
    @RequestMapping(value = "/selByCharge")
    public List<V_Count2> selByCharge(HttpServletResponse response, V_Count2 vCount2) throws Exception {
        //统计列表
        return v_countService.selByCharge(vCount2);
    }

}
 

