1053f395fe4d9a4456562f8b41053d4283c2ba1d.svn-base 3 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.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.modules.interfaces.service.WXService;
import com.thinkgem.jeesite.modules.interfaces.service.ZhjService;
import com.thinkgem.jeesite.modules.reg.web.httprest.utils.DatatypeUtil;
import com.thinkgem.jeesite.modules.wechat.service.WxFeedbackService;
import com.thinkgem.jeesite.modules.wechat.service.WxOrderService;

@RestController
@RequestMapping(value = "${frontPath}/zhj")
public class ZhjController {
	@Autowired
	private ZhjService zhjService; 
	
    /**
     * 进度查询
     * @param model
     * @param request
     * @param response
     * @return
     */
	
	@RequestMapping("/query/personBdcInfo")
	public Map query_personBdcInfo(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try {
			String cardCode =  request.getParameter("cardcode");
			String name = request.getParameter("personname");
			/**
			String cardCode =  "612301197408110933";
			String name = "张宇";
			*/
			List list = zhjService.query_personBdcInfo(cardCode,name);
			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("/send/bdcYwInfo")
	public Map send_bdcYwInfo(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap(); 
		try {
			String limit = request.getParameter("limit") == null?"100":request.getParameter("limit");
			zhjService.send_bdcYwInfo(limit); 
			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/BdcInfo")
	public Map query_BdcInfo(ModelMap model,HttpServletRequest request,HttpServletResponse response) {
		Map map = Maps.newHashMap();
		String jsonstr = "";
		try {
			jsonstr = DatatypeUtil.reqReceive(request);
			map = zhjService.queryBdcInfo(jsonstr);
			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;
	}
}