package com.zcloud.controller.hiddenDangerCheckStandard;

import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.PageData;
import com.zcloud.service.hiddenDangerCheckStandard.StandardDictionaryService;
import com.zcloud.util.Jurisdiction;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 说明：隐患排查数据字典
 * 作者：luoxiaobao
 * 官网：www.qdkjchina.com
 */
@Controller
@RequestMapping("/hiddenstandardDictionary")
public class StandardDictionaryController extends BaseController {

    @Autowired
    private StandardDictionaryService dictionaryService;


    /**
     * 列表
     *
     * @param
     * @throws Exception
     */
    @RequestMapping(value = "/list")
    @ResponseBody
    public Object list() throws Exception {
        Map<String, Object> map = new HashMap<String, Object>();
        String errInfo = "success";
        PageData pd = new PageData();
        pd = this.getPageData();
        pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
        List<PageData> varList = dictionaryService.list(pd);
        map.put("varList", varList);
        map.put("result", errInfo);
        return map;
    }
}
