package cn.im.che.action;

 import cn.im.che.service.ClxsjlService;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import cn.base.aspect.OperateType;
import cn.base.bean.BaseAction;
import cn.base.excel.ExcelCol;
import cn.base.excel.ExportEngine;
import cn.base.util.CommUtils;
import cn.base.util.Constants;
import cn.base.util.LogConstants;
import cn.base.util.StringUtil;
import cn.base.util.Struts2Utils;

@SuppressWarnings({"all"})
@Component("clxsjlAction")
public class ClxsjlAction extends BaseAction{
	private static final long serialVersionUID = 1L;
	private static Logger iLog = Logger.getLogger(ClxsjlAction.class);
	
	@Autowired
	private ClxsjlService service;
	
	/**
	 * ·ÖÒ³
	 */
	@OperateType(value = LogConstants.LOG_QUERY ,info ="listClxsjlByPage")
	public void listClxsjlByPage(){
		Map map = Struts2Utils.getRequestParameterMap();
		try {
			int page = Integer.parseInt(Struts2Utils.getParameter("page"));
			int rows = Integer.parseInt(Struts2Utils.getParameter("rows"));
			int start = ( (page == 0 ?  1 : page ) - 1) * rows ;
			map.put("start",start );
			map.put("limit",rows );
			Struts2Utils.renderJson(this.service.listClxsjlByPage(map));
		} catch (Exception e) {
			e.printStackTrace();
			iLog.error("ClxsjlAction-listClxsjlByPage-error:" +e);
			Struts2Utils.renderJson(null);
		}
	}
}
