3efdcd1ef93f2a6f58e5c2b578d426fd6ac9319e.svn-base 2.21 KB
package com.thinkgem.jeesite.modules.restQydm;

import java.util.Map;

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

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.RequestMethod;

import com.google.common.collect.Maps;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.reg.web.httprest.utils.DatatypeUtil;

@Controller
@RequestMapping(value = "${frontPath}/restQydm/restQydmInterface")
public class restQydmInterface extends BaseController {
	public static final int HASH_INTERATIONS = 1024;
	public static final int SALT_SIZE = 8;

	@Autowired
	private restQydmInterfaceService restQydmInterfaceService;
	
	/**
	 * 4.1 不动产权证/证明号验证
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/checkBdcqxxByZh", method = RequestMethod.POST)
	public void checkBdcqxxByZh(HttpServletRequest request,HttpServletResponse response) {
		String jsonstr = DatatypeUtil.reqReceive(request);
		logger.info("传入参数{}",jsonstr); 
		Map resmap = Maps.newHashMap();
		try {
			resmap = restQydmInterfaceService.checkBdcqxxByZh(jsonstr);
			
			resmap.put("data", true);	
			resmap.put("txStatus", "1");
		} catch (Exception e) {
			resmap.put("data", false);	
			resmap.put("rtnMessage", e.getMessage());
			resmap.put("txStatus", "0");
			e.printStackTrace();
		}
		renderString(response, resmap);
	}
	

	/**
	 * 4.8 申请系统分发申请数据至登记系统
	 * @param request
	 * @return
	 */
	@RequestMapping(value = "/saveApplicationInfo", method = RequestMethod.POST)
	public void saveApplicationInfo(HttpServletRequest request,HttpServletResponse response) {
		String jsonstr = DatatypeUtil.reqReceive(request);
		logger.info("传入参数{}",jsonstr); 
		Map resmap = Maps.newHashMap();
		 
		try {
			resmap = restQydmInterfaceService.saveApplicationInfo(jsonstr);
		} catch (Exception e) {
			resmap.put("data", false);	
			resmap.put("rtnMessage", e.getMessage());
			resmap.put("txStatus", "0");
			e.printStackTrace();
		}
		renderString(response, resmap);
	 
	}
}