TitleController.java 1.46 KB
package com.thinkgem.jeesite.modules.title.web;

import java.util.Map;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
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.title.po.Fwsx;
import com.thinkgem.jeesite.modules.title.service.FwsxService;
import com.thinkgem.jeesite.modules.title.service.ZdxxService;
import com.thinkgem.jeesite.modules.title.service.ZsxService;

@RestController
@RequestMapping(value = "${frontPath}/title")
public class TitleController {
	
    protected Logger logger = Logger.getLogger(getClass());
	
    @Autowired
    private ZdxxService zdxxService;
    @Autowired
    private ZsxService zsxService;
    @Autowired
    private FwsxService fwsxService;
    
	public Map synZdjbxx() {
		Map map = Maps.newHashMap();
		try {
			zdxxService.synZdjbxx();
			zsxService.synZxx();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}
	
	public Map synZxx() {
		Map map = Maps.newHashMap();
		try {
			zsxService.synZxx();
		} catch (Exception e) {
			e.printStackTrace();
		}
		return map;
	}
	
	@RequestMapping(value="/syn/fwxx")
	public Map synFwxx(Fwsx dto) {
		logger.debug("接收信息:"+JsonUtil.toJsonString(dto));
		Map map = Maps.newHashMap();
		fwsxService.synFwxx(dto);
		return map;
	}
}