Browse Source

Merge branch 'master' of https://git.jiinfo.cn/cmc-project/cmc_weixin_sap

liupeng 4 years ago
parent
commit
d65b096fa1

+ 23 - 12
code/sapparent/sapcms/src/main/java/org/fouram/controller/ApiController.java

@@ -23,7 +23,7 @@ import org.fouram.core.util.ResultUtil;
 import org.fouram.entity.SapOrg;
 import org.fouram.entity.SapUser;
 import org.fouram.input.FindUsersDTO;
-import org.fouram.service.SapCheckService;
+import org.fouram.service.SapCheckReportService;
 import org.fouram.service.SapOrgService;
 import org.fouram.service.SapUserService;
 import org.fouram.service.WxDepartService;
@@ -48,7 +48,7 @@ public class ApiController extends BaseController {
 	@Autowired
 	private WxDepartService wxDepartService;
 	@Autowired
-	private SapCheckService sapCheckService;
+	private SapCheckReportService sapCheckReportService;
 	@Autowired
 	private static final String TOKEN = "UserId";
 
@@ -243,8 +243,8 @@ public class ApiController extends BaseController {
 			if (dto.getPageNumber() == null) {
 				return ResultUtil.error("参数pageNumber为空");
 			}
-			Object result = sapCheckService.findUserReportPage(dto.getStartDate(), dto.getEndDate(), dto.getDepartId(),
-					dto.getName(), dto.getState(), dto.getPageSize(), dto.getPageNumber());
+			Object result = sapCheckReportService.findUserReportPage(dto.getStartDate(), dto.getEndDate(), dto.getDepartId(),
+					dto.getName(), dto.getStatus(), dto.getPageSize(), dto.getPageNumber());
 			return ResultUtil.success(result, "操作成功");
 		} catch (Exception e) {
 			LoggerUtil.error(e);
@@ -252,18 +252,29 @@ public class ApiController extends BaseController {
 		}
 	}
 
-	@SuppressWarnings("unchecked")
 	@RequestMapping(value = "/exportUserReportExcel")
 	@ResponseBody
 	public Object exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto) {
 		try {
-			Object object = sapCheckService.findUserReports(dto.getStartDate(), dto.getEndDate(), dto.getDepartId(),
-					dto.getName(), dto.getState(), null, null);
-			List<Map<String, Object>> dataList = (List<Map<String, Object>>) object;
-			String haveFilePath = "/public/excel/userReport.xlsx";
-			String filePath = "/public/excel/userReport" + DateUtil.getTimeStamp() + ".xlsx";
-			ExcelExportUtil.exportExcelFile(getRootPath() + haveFilePath, dataList, getRootPath() + filePath, 1);
-			return ResultUtil.success(filePath, "操作成功");
+			if (StringUtils.isBlank(dto.getStartDate())) {
+				return ResultUtil.error("开始日期不可以为空");
+			}
+			if (StringUtils.isBlank(dto.getEndDate())) {
+				return ResultUtil.error("结束日期不可以为空");
+			}
+			String ysFilePath = "/public/excel/userReport.xlsx";
+			// 汇总
+			String hzFilePath = "/public/excel/userReport" + DateUtil.getTimeStamp() + ".xlsx";
+			List<Map<String, Object>> hzList = sapCheckReportService.selectReportDayList(dto.getStartDate(), dto.getEndDate(),
+					dto.getDepartId(), dto.getName());
+			ExcelExportUtil.exportExcelFile(getRootPath() + ysFilePath, hzList, getRootPath() + hzFilePath, 0, 0);
+			ysFilePath = hzFilePath;
+			// 明细
+			String resultFilePath = "/public/excel/userReport" + DateUtil.getTimeStamp() + ".xlsx";
+			List<Map<String, Object>> mxList = sapCheckReportService.findUserReports(dto.getStartDate(), dto.getEndDate(),
+					dto.getDepartId(), dto.getName(), dto.getStatus(), null, null);
+			ExcelExportUtil.exportExcelFile(getRootPath() + ysFilePath, mxList, getRootPath() + resultFilePath, 1, 1);
+			return ResultUtil.success(resultFilePath, "操作成功");
 		} catch (Exception e) {
 			LoggerUtil.error(e);
 			return ResultUtil.error(ResultConstant.WEB_ERR_MSG);

BIN
code/sapparent/sapcms/src/main/webapp/public/excel/userReport.xlsx


+ 29 - 9
code/sapparent/sapservice/src/main/java/org/fouram/core/util/DateUtil.java

@@ -3,11 +3,14 @@ package org.fouram.core.util;
 import java.text.DateFormat;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Date;
 import java.util.GregorianCalendar;
+import java.util.List;
 
 import org.apache.commons.lang.time.DurationFormatUtils;
+import org.apache.commons.lang3.StringUtils;
 
 public class DateUtil {
 
@@ -308,8 +311,8 @@ public class DateUtil {
 		return day < dayArr[month - 1] ? constellationArr[month - 1] : constellationArr[month];
 	}
 
-	public static void main(String[] args) throws ParseException {
-		System.out.println(getLastDay("2020-05"));
+	public static void main(String[] args) throws Exception {
+		System.out.println(getSubDateList("2020-06-01", "2020-06-11"));
 	}
 
 	// 根据开始日期 增加 月份后 算出 日期(yyyy-mm)
@@ -442,22 +445,39 @@ public class DateUtil {
 	}
 
 	public static String getLastDay(String yearMonth) {
-		int year = Integer.parseInt(yearMonth.split("-")[0]);  //年
-		int month = Integer.parseInt(yearMonth.split("-")[1]); //月
+		int year = Integer.parseInt(yearMonth.split("-")[0]); // 
+		int month = Integer.parseInt(yearMonth.split("-")[1]); // 
 		Calendar cal = Calendar.getInstance();
 		// 设置年份
 		cal.set(Calendar.YEAR, year);
 		// 设置月份
 		// cal.set(Calendar.MONTH, month - 1);
-		cal.set(Calendar.MONTH, month); //设置当前月的上一个月
+		cal.set(Calendar.MONTH, month); // 设置当前月的上一个月
 		// 获取某月最大天数
-		//int lastDay = cal.getActualMaximum(Calendar.DATE);
-		int lastDay = cal.getMinimum(Calendar.DATE); //获取月份中的最小值,即第一天
+		// int lastDay = cal.getActualMaximum(Calendar.DATE);
+		int lastDay = cal.getMinimum(Calendar.DATE); // 获取月份中的最小值,即第一天
 		// 设置日历中月份的最大天数
-		//cal.set(Calendar.DAY_OF_MONTH, lastDay);
-		cal.set(Calendar.DAY_OF_MONTH, lastDay - 1); //上月的第一天减去1就是当月的最后一天
+		// cal.set(Calendar.DAY_OF_MONTH, lastDay);
+		cal.set(Calendar.DAY_OF_MONTH, lastDay - 1); // 上月的第一天减去1就是当月的最后一天
 		// 格式化日期
 		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
 		return sdf.format(cal.getTime());
 	}
+
+	public static List<String> getSubDateList(String startDate, String endDate) throws Exception {
+		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+		List<String> list = new ArrayList<>(); // 保存日期的集合
+		Date date_start = sdf.parse(startDate);
+		Date date_end = sdf.parse(endDate);
+		Date date = date_start;
+		Calendar cd = Calendar.getInstance();// 用Calendar 进行日期比较判断
+		while (date.getTime() <= date_end.getTime()) {
+			list.add(sdf.format(date));
+			cd.setTime(date);
+			cd.add(Calendar.DATE, 1);// 增加一天 放入集合
+			date = cd.getTime();
+		}
+		StringUtils.strip(list.toString(), "[]");// 去掉符号[]
+		return list;
+	}
 }

+ 7 - 2
code/sapparent/sapservice/src/main/java/org/fouram/core/util/ExcelExportUtil.java

@@ -35,7 +35,7 @@ public class ExcelExportUtil {
 		// 设置表格标题栏的样式
 		XSSFCellStyle titleStyle = workbook.createCellStyle();
 //		titleStyle.setFillBackgroundColor(color);
-		 titleStyle.setFillForegroundColor(HSSFColor.BRIGHT_GREEN.index);
+		titleStyle.setFillForegroundColor(HSSFColor.BRIGHT_GREEN.index);
 		titleStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
 		titleStyle.setBorderBottom(BorderStyle.THIN);
 		titleStyle.setBorderLeft(BorderStyle.THIN);
@@ -138,6 +138,11 @@ public class ExcelExportUtil {
 
 	public static void exportExcelFile(String haveFilePath, List<Map<String, Object>> dataList, String filePath,
 			int index) {
+		exportExcelFile(haveFilePath, dataList, filePath, index, 0);
+	}
+
+	public static void exportExcelFile(String haveFilePath, List<Map<String, Object>> dataList, String filePath,
+			int index, int sheetIndex) {
 		// 声明一个工作薄
 		File f = new File(haveFilePath);
 		XSSFWorkbook workbook = null;
@@ -148,7 +153,7 @@ public class ExcelExportUtil {
 			e.printStackTrace();
 		}
 		// 生成一个表格
-		XSSFSheet sheet = workbook.getSheetAt(0);
+		XSSFSheet sheet = workbook.getSheetAt(sheetIndex);
 		// 设置表格默认列宽度为15个字节
 		sheet.setDefaultColumnWidth(15);
 

+ 1 - 1
code/sapparent/sapservice/src/main/java/org/fouram/input/FindUsersDTO.java

@@ -18,7 +18,7 @@ public class FindUsersDTO implements Serializable {
 	private String endDate;
 	private String departId;
 	private String name;
-	private String state;
+	private String status;
 	private Integer pageNumber;
 	private Integer pageSize;
 }

+ 0 - 59
code/sapparent/sapservice/src/main/java/org/fouram/mapper/SapCheckMapper.xml

@@ -75,17 +75,6 @@
 		where EXISTS (SELECT 1 from sap_checkin_option o where a.userId = o.userId)
 		order by a.userId ASC, b.checkinDay asc;
 	</insert>
-	<select id="selectReportDayList" resultType="Map">
-		SELECT a.userId, a.name, 
-		replace(group_concat(case when a.checkinDay = '2020-05-11' then a.result else '' end ),',','') as '2020-05-11',
-		replace(group_concat(case when a.checkinDay = '2020-05-12' then a.result else '' end ),',','') as '2020-05-12',
-		replace(group_concat(case when a.checkinDay = '2020-05-13' then a.result else '' end ),',','') as '2020-05-13',
-		replace(group_concat(case when a.checkinDay = '2020-05-14' then a.result else '' end ),',','') as '2020-05-14',
-		replace(group_concat(case when a.checkinDay = '2020-05-15' then a.result else '' end ),',','') as '2020-05-15'
-		from sap_check_report a, sap_checkdate b 
-		where a.checkinDay=b.checkinDay and a.checkinDay >= #{startDay} and a.checkinDay &lt;= #{endDay}
-		group by a.userId, a.name;
-	</select>
 	
 	<update id="updateHrsdWorkTime">
 		update sap_check_report set workTime = '10:00' where groupName like '%华人时代%' 
@@ -148,54 +137,6 @@
 		delete from sap_checkout_end where id = #{id}
 	</update>
 	
-	<select id="findUserReports" resultType="java.util.LinkedHashMap">
-		SELECT c.firstDepartName,c.secondDepartName,a.userId,groupName,workTime,offWorkTime,a.name,a.checkinDay,
-			checkinDate,checkinException,checkoffDate,checkoffException,checkoutDate1,checkoutDate2,leaveCreatedTime,
-			leaveStartDate,leaveEndDate,leaveDay,leaveComment,bukaDay,result
-		from sap_check_report a, sap_checkdate b, wx_user c 
-		where a.checkinDay=b.checkinDay and a.userId = c.userId
-		<if test="departId != null and departId != ''">
-			and (a.firstDepartId=#{departId} or a.secondDepartId=#{departId})
-		</if>
-		<if test="startDate != null and startDate != ''">
-			and a.checkinDay >= #{startDate} 
-		</if>
-		<if test="endDate != null and endDate != ''">
-			and a.checkinDay &lt;= #{endDate} 
-		</if>
-		<if test="name != null and name != ''">
-			and a.name like CONCAT(CONCAT('%', #{name}),'%')
-		</if>
-		<if test="state != null and state != ''">
-			and a.result = #{state} 
-		</if>
-		order by a.userId, a.checkinDay 
-		<if test="pageCurrent != null and pageCurrent != ''">
-			limit ${pageCurrent},${pageSize}
-		</if>
-	</select>
-	
-	<select id="findUserReportTotal" resultType="Long">
-		SELECT count(1) 
-		from sap_check_report a, sap_checkdate b, wx_user c 
-		where a.checkinDay=b.checkinDay and a.userId = c.userId
-		<if test="departId != null and departId != ''">
-			and (a.firstDepartId=#{departId} or a.secondDepartId=#{departId})
-		</if>
-		<if test="startDate != null and startDate != ''">
-			and a.checkinDay >= #{startDate} 
-		</if>
-		<if test="endDate != null and endDate != ''">
-			and a.checkinDay &lt;= #{endDate} 
-		</if>
-		<if test="name != null and name != ''">
-			and a.name like CONCAT(CONCAT('%', #{name}),'%')
-		</if>
-		<if test="state != null and state != ''">
-			and a.result = #{state} 
-		</if>
-	</select>
-	
 	<select id="queryCheckInTotal" resultType="Long">
 		SELECT count(1) from sap_checkin
 	</select>

+ 65 - 0
code/sapparent/sapservice/src/main/java/org/fouram/mapper/SapCheckReportMapper.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="SapCheckReportMapper">
+	<select id="selectReportDayList" resultType="java.util.LinkedHashMap">
+		SELECT c.firstDepartName,c.secondDepartName, a.userId, a.name, ${reportDaySql}
+		from sap_check_report a, wx_user c
+		where a.userId = c.userId and a.checkinDay >= #{startDate} and a.checkinDay &lt;= #{endDate}
+		<if test="name != null and name != ''">
+			and a.name like CONCAT(CONCAT('%', #{name}),'%')
+		</if>
+		<if test="departId != null and departId != ''">
+			and (c.firstDepartId=#{departId} or c.secondDepartId=#{departId})
+		</if>
+		group by c.firstDepartName,c.secondDepartName, a.userId, a.name
+		order by a.userId
+	</select>
+	
+	<select id="findUserReports" resultType="java.util.LinkedHashMap">
+		SELECT c.firstDepartName,c.secondDepartName,a.userId,groupName,workTime,offWorkTime,a.name,a.checkinDay,
+			checkinDate,checkinException,checkoffDate,checkoffException,checkoutDate1,checkoutDate2,leaveCreatedTime,
+			leaveStartDate,leaveEndDate,leaveDay,leaveComment,bukaDay,result
+		from sap_check_report a, sap_checkdate b, wx_user c 
+		where a.checkinDay=b.checkinDay and a.userId = c.userId
+		<if test="departId != null and departId != ''">
+			and (c.firstDepartId=#{departId} or c.secondDepartId=#{departId})
+		</if>
+		<if test="startDate != null and startDate != ''">
+			and a.checkinDay >= #{startDate} 
+		</if>
+		<if test="endDate != null and endDate != ''">
+			and a.checkinDay &lt;= #{endDate} 
+		</if>
+		<if test="name != null and name != ''">
+			and a.name like CONCAT(CONCAT('%', #{name}),'%')
+		</if>
+		<if test="state != null and state != ''">
+			and a.result = #{state} 
+		</if>
+		order by a.userId, a.checkinDay 
+		<if test="pageCurrent != null and pageCurrent != ''">
+			limit ${pageCurrent},${pageSize}
+		</if>
+	</select>
+	
+	<select id="findUserReportTotal" resultType="Long">
+		SELECT count(1) 
+		from sap_check_report a, sap_checkdate b, wx_user c 
+		where a.checkinDay=b.checkinDay and a.userId = c.userId
+		<if test="departId != null and departId != ''">
+			and (c.firstDepartId=#{departId} or c.secondDepartId=#{departId})
+		</if>
+		<if test="startDate != null and startDate != ''">
+			and a.checkinDay >= #{startDate} 
+		</if>
+		<if test="endDate != null and endDate != ''">
+			and a.checkinDay &lt;= #{endDate} 
+		</if>
+		<if test="name != null and name != ''">
+			and a.name like CONCAT(CONCAT('%', #{name}),'%')
+		</if>
+		<if test="state != null and state != ''">
+			and a.result = #{state} 
+		</if>
+	</select>
+</mapper>

+ 119 - 0
code/sapparent/sapservice/src/main/java/org/fouram/service/SapCheckReportService.java

@@ -0,0 +1,119 @@
+package org.fouram.service;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+import org.fouram.core.base.service.BaseService;
+import org.fouram.core.util.DateUtil;
+import org.springframework.stereotype.Service;
+
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+@Service
+public class SapCheckReportService extends BaseService {
+
+	public JSONObject findUserReportPage(String startDate, String endDate, String departId, String name, String state,
+			Integer pageSize, Integer pageNumber) throws Exception {
+		List<Map<String, Object>> list = findUserReports(startDate, endDate, departId, name, state, pageSize,
+				pageNumber);
+		Long total = findUserReportTotal(startDate, endDate, departId, name, state);
+		return getPageResult(list, total);
+	}
+	
+	public static JSONObject getPageResult(List<? extends Object> list, Object total) {
+		JSONObject object = new JSONObject();
+		object.put("total", total);
+		object.put("data", list);
+		return object;
+	}
+
+	@SuppressWarnings("unchecked")
+	public List<Map<String, Object>> findUserReports(String startDate, String endDate, String departId, String name,
+			String state, Integer pageSize, Integer pageNumber) throws Exception {
+		if (StringUtils.isNotBlank(departId) && departId.endsWith(",")) {
+			departId = departId.substring(0, departId.length() - 1);
+		}
+		if (StringUtils.isNotBlank(state)) {
+			if ("1".equals(state)) {
+				state = "正常";
+			} else {
+				state = "异常";
+			}
+		}
+		Map<String, String> pd = Maps.newHashMap();
+		pd.put("startDate", startDate);
+		pd.put("endDate", endDate);
+		pd.put("departId", departId);
+		pd.put("name", name);
+		pd.put("state", state);
+		if (pageSize != null) {
+			pd.put("pageCurrent", String.valueOf(pageSize * (pageNumber - 1)));
+			pd.put("pageSize", String.valueOf(pageSize));
+		}
+		return (List<Map<String, Object>>) findList("SapCheckReportMapper.findUserReports", pd);
+	}
+
+	@SuppressWarnings("unchecked")
+	public List<Map<String, Object>> selectReportDayList(String startDate, String endDate, String departId, String name)
+			throws Exception {
+		if (StringUtils.isNotBlank(departId) && departId.endsWith(",")) {
+			departId = departId.substring(0, departId.length() - 1);
+		}
+		Map<String, String> pd = Maps.newHashMap();
+		pd.put("startDate", startDate);
+		pd.put("endDate", endDate);
+		pd.put("departId", departId);
+		pd.put("name", name);
+		pd.put("reportDaySql", getReportDaySql(startDate, endDate));
+
+//		公司 部门 工号	姓名5月25日	5月26日	5月27日	5月28日	5月29日
+		List<String> days = DateUtil.getSubDateList(startDate, endDate);
+		Map<String, Object> headerMap = Maps.newLinkedHashMap();
+		headerMap.put("firstDepartName", "公司");
+		headerMap.put("secondDepartName", "部门");
+		headerMap.put("userId", "工号");
+		headerMap.put("name", "姓名");
+		for (String day : days) {
+			headerMap.put(day, day);
+		}
+		List<Map<String, Object>> result = Lists.newArrayList(headerMap);
+		List<Map<String, Object>> list = (List<Map<String, Object>>) findList("SapCheckReportMapper.selectReportDayList", pd);
+		list.stream().forEach(check -> result.add(check));
+		return result;
+	}
+
+	private String getReportDaySql(String startDate, String endDate) throws Exception {
+		String baseSql = "replace(group_concat(case when a.checkinDay = '%s' then a.result else '' end ),',','') as '%s',";
+		List<String> days = DateUtil.getSubDateList(startDate, endDate);
+		String reportDaySql = "";
+		for (String day : days) {
+			reportDaySql += String.format(baseSql, day, day);
+		}
+		reportDaySql = reportDaySql.substring(0, reportDaySql.length() - 1);
+		return reportDaySql;
+	}
+
+	public Long findUserReportTotal(String startDate, String endDate, String departId, String name, String state)
+			throws Exception {
+		if (StringUtils.isNotBlank(departId) && departId.endsWith(",")) {
+			departId = departId.substring(0, departId.length() - 1);
+		}
+		if (StringUtils.isNotBlank(state)) {
+			if ("1".equals(state)) {
+				state = "正常";
+			} else {
+				state = "异常";
+			}
+		}
+		Map<String, String> pd = Maps.newHashMap();
+		pd.put("startDate", startDate);
+		pd.put("endDate", endDate);
+		pd.put("departId", departId);
+		pd.put("name", name);
+		pd.put("state", state);
+		return (Long) findObject("SapCheckReportMapper.findUserReportTotal", pd);
+	}
+}

+ 1 - 64
code/sapparent/sapservice/src/main/java/org/fouram/service/SapCheckService.java

@@ -16,7 +16,6 @@ import org.fouram.entity.SapCheckReport;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 
@@ -64,7 +63,7 @@ public class SapCheckService extends BaseService {
 		update("SapCheckMapper.saveCheckoutStart1", null);
 		update("SapCheckMapper.saveCheckoutStart2", null);
 		update("SapCheckMapper.saveCheckoutEnd", null);
-		
+
 		// 删除重复数据
 		updateRepeatCheckDelete();
 	}
@@ -206,66 +205,4 @@ public class SapCheckService extends BaseService {
 		}
 		return false;
 	}
-
-	public JSONObject findUserReportPage(String startDate, String endDate, String departId, String name, String state,
-			Integer pageSize, Integer pageNumber) throws Exception {
-		List<Map<String, String>> list = findUserReports(startDate, endDate, departId, name, state, pageSize,
-				pageNumber);
-		Long total = findUserReportTotal(startDate, endDate, departId, name, state);
-		return getPageResult(list, total);
-	}
-
-	@SuppressWarnings("unchecked")
-	public List<Map<String, String>> findUserReports(String startDate, String endDate, String departId, String name,
-			String state, Integer pageSize, Integer pageNumber) throws Exception {
-		if (StringUtils.isNotBlank(departId) && departId.endsWith(",")) {
-			departId = departId.substring(0, departId.length() - 1);
-		}
-		if (StringUtils.isNotBlank(state)) {
-			if ("1".equals(state)) {
-				state = "正常";
-			} else {
-				state = "异常";
-			}
-		}
-		Map<String, String> pd = Maps.newHashMap();
-		pd.put("startDate", startDate);
-		pd.put("endDate", endDate);
-		pd.put("departId", departId);
-		pd.put("name", name);
-		pd.put("state", state);
-		if (pageSize != null) {
-			pd.put("pageCurrent", String.valueOf(pageSize * (pageNumber - 1)));
-			pd.put("pageSize", String.valueOf(pageSize));
-		}
-		return (List<Map<String, String>>) findList("SapCheckMapper.findUserReports", pd);
-	}
-	
-	public Long findUserReportTotal(String startDate, String endDate, String departId, String name,
-			String state) throws Exception {
-		if (StringUtils.isNotBlank(departId) && departId.endsWith(",")) {
-			departId = departId.substring(0, departId.length() - 1);
-		}
-		if (StringUtils.isNotBlank(state)) {
-			if ("1".equals(state)) {
-				state = "正常";
-			} else {
-				state = "异常";
-			}
-		}
-		Map<String, String> pd = Maps.newHashMap();
-		pd.put("startDate", startDate);
-		pd.put("endDate", endDate);
-		pd.put("departId", departId);
-		pd.put("name", name);
-		pd.put("state", state);
-		return (Long) findObject("SapCheckMapper.findUserReportTotal", pd);
-	}
-	
-	public static JSONObject getPageResult(List<? extends Object> list, Object total){
-		JSONObject object = new JSONObject();
-		object.put("total", total);
-		object.put("data", list);
-		return object;
-	}
 }