TjController.java 4.69 KB
package com.thinkgem.jeesite.modules.interfaces.controller;
  
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; 
import org.springframework.ui.ModelMap; 
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.google.common.collect.Maps;
import com.thinkgem.jeesite.common.utils.JsonUtil;
import com.thinkgem.jeesite.modules.interfaces.service.TjService; 

@RestController
@RequestMapping(value = "${frontPath}/tj")
public class TjController {
	@Autowired
	private TjService service; 
	protected Logger logger = LoggerFactory.getLogger(getClass());
    /**
     * 不动产单元宗地信息合计查询
     * @param model
     * @param request
     * @param response
     * @return
     */
	
	@RequestMapping("/query/zdjbxxCount")
	public Map selectZdjbxxCount(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try { 
			map = service.selectZdjbxxCount();
			map.put("success", true);
			map.put("resultCode", "0");  
		}catch(Exception e){
			e.printStackTrace();
			map.put("success", false);
			map.put("resultCode", "1");
			map.put("resultMsg", e.getMessage());
		}
		logger.info("res ---> {}",JsonUtil.toJsonStringnotnull(map));
		return  map;
	}
	
    /**
     * 不动产单元房屋h信息合计查询
     * @param model
     * @param request
     * @param response
     * @return
     */
	
	@RequestMapping("/query/hxxCount")
	public Map selectHxxCount(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try { 
			map = service.selectHxxCount();
			map.put("success", true);
			map.put("resultCode", "0");  
		}catch(Exception e){
			e.printStackTrace();
			map.put("success", false);
			map.put("resultCode", "1");
			map.put("resultMsg", e.getMessage());
		}
		logger.info("res ---> {}",JsonUtil.toJsonStringnotnull(map));
		return  map;
	}
	
	 /**
     * 不动产单元房屋林地信息合计查询
     * @param model
     * @param request
     * @param response
     * @return
     */
	
	@RequestMapping("/query/ldxxCount")
	public Map selectLdxxCount(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try { 
			map = service.selectLdxxCount();
			map.put("success", true);
			map.put("resultCode", "0");  
		}catch(Exception e){
			e.printStackTrace();
			map.put("success", false);
			map.put("resultCode", "1");
			map.put("resultMsg", e.getMessage());
		}
		logger.info("res ---> {}",JsonUtil.toJsonStringnotnull(map));
		return  map;
	}
	 
	@RequestMapping("/query/bdcdy")
	public Map selectBdcdyLxGroup(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try { 
			Map map1 = service.selectLdxxCount();
			Map map2 = service.selectHxxCount();
			Map map3 = service.selectZdjbxxCount();
			
			map.put("zd", map3);
			map.put("h", map2);
			map.put("ld", map1);
			
			map.put("success", true);
			map.put("resultCode", "0");  
		}catch(Exception e){
			e.printStackTrace();
			map.put("success", false);
			map.put("resultCode", "1");
			map.put("resultMsg", e.getMessage());
		}
		logger.info("res ---> {}",JsonUtil.toJsonStringnotnull(map));
		return  map;
	}
	
	
	
	 /**
     * 不动产单元房屋林地信息合计查询
     * @param model
     * @param request
     * @param response
     * @return
     */
	
	@RequestMapping("/query/hFwytCountList")
	public Map selectHFwytCountList(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try { 
			List list = service.selectHFwytCountList();
			map.put("data", list);
			map.put("success", true);
			map.put("resultCode", "0");  
		}catch(Exception e){
			e.printStackTrace();
			map.put("success", false);
			map.put("resultCode", "1");
			map.put("resultMsg", e.getMessage());
		}
		return  map;
	}
	
	/**
     * 不动产单元房屋林地信息合计查询
     * @param model
     * @param request
     * @param response
     * @return
     */
	
	@RequestMapping("/query/djxxQllxList")
	public Map selectDjxxQllxList(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try { 
			List list = service.selectDjxxQllxList();
			map.put("data", list);
			map.put("success", true);
			map.put("resultCode", "0");  
		}catch(Exception e){
			e.printStackTrace();
			map.put("success", false);
			map.put("resultCode", "1");
			map.put("resultMsg", e.getMessage());
		}
		return  map;
	}
}