Bläddra i källkod

汇总导出bug fix

hanwenjie 3 år sedan
förälder
incheckning
33c890903b

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

@@ -345,7 +345,7 @@ public class ApiController extends BaseController {
 		// 汇总
 		String hzFilePath = "/public/excel/userReport" + DateUtil.getTimeStamp() + ".xlsx";
 		List<Map<String, Object>> hzList = sapCheckReportService.selectReportDayList(dto.getStartDate(),
-				dto.getEndDate(), dto.getDepartId(), dto.getDepartIds(), dto.getName());
+				dto.getEndDate(), dto.getDepartId(), dto.getName());
 		ExcelExportUtil.exportExcelFile(getRootPath() + ysFilePath, hzList, getRootPath() + hzFilePath, 0, 0);
 		ysFilePath = hzFilePath;
 		// 明细

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

@@ -55,7 +55,7 @@ public class SapCheckReportService extends BaseService {
 		return (List<Map<String, Object>>) findList("SapCheckReportMapper.findUserReports", pd);
 	}
 
-	public List<Map<String, Object>> selectReportDayList(String startDate, String endDate, String departId,List<Long> departIds, String name)
+	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);
@@ -64,7 +64,7 @@ public class SapCheckReportService extends BaseService {
 		pd.put("startDate", startDate);
 		pd.put("endDate", endDate);
 //		pd.put("departId", departId);
-		pd.put("departIds",departIds);
+		pd.put("departIds",StringUtils.isNotBlank(departId)?departId.split(","):null);
 		pd.put("name", name);
 
 		List<String> days = DateUtil.getSubDateList(startDate, endDate);