package com.bonus.boot.manager.anomaly.controller;

import com.bonus.boot.manager.anomaly.dao.AnomalyDao;
import com.bonus.boot.manager.anomaly.entity.AnomalyBean;
import com.bonus.boot.manager.anomaly.service.AnomalyService;
import com.bonus.boot.manager.basic.dao.HospitalDao;
import com.bonus.boot.manager.basic.entity.HospitalBean;
import com.bonus.boot.manager.basic.service.HospitalService;
import com.bonus.boot.manager.manager.annotation.LogAnnotation;
import com.bonus.boot.manager.manager.entity.R;
import com.bonus.boot.manager.manager.utils.AjaxRes;
import com.bonus.boot.manager.manager.utils.GlobalConst;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author tqzhang
 * @Data 2023/5/31 9:30
 */
@RestController
@RequestMapping("anomaly")
public class AnomalyController {
    /**
     * 服务对象
     */
    @Resource
    private AnomalyService service;

    @Resource
    private AnomalyDao dao;

    @LogAnnotation
    @PostMapping("getMsgContent")
    @ApiOperation(value = "异常情况统计-列表")
    public R getList(AnomalyBean o){
        List<AnomalyBean> list = service.getList(o);
        return list.size() > 0 ? R.okTable(list, list.size()):R.failTable("暂无数据");
    }


}

