|
@@ -17,7 +17,6 @@ import org.fouram.core.util.AppUtil.ResultConstant;
|
|
|
import org.fouram.core.util.ConfConfig;
|
|
|
import org.fouram.core.util.DateUtil;
|
|
|
import org.fouram.core.util.ExcelExportUtil;
|
|
|
-import org.fouram.core.util.LoggerUtil;
|
|
|
import org.fouram.core.util.ResultUtil;
|
|
|
import org.fouram.dto.input.FindUsersDTO;
|
|
|
import org.fouram.dto.input.GetIngoreListDTO;
|
|
@@ -76,15 +75,10 @@ public class ApiController extends BaseController {
|
|
|
@PostMapping(value = "/getAuthUrl", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
public Object getAuthUrl(String url) {
|
|
|
- try {
|
|
|
- String redirectUri = ConfConfig.getConfigString("wxCp.redirectUri") + "/API/wxCpLogin";
|
|
|
- String authUri = WXCpMailList.oauth2Service.buildAuthorizationUrl(redirectUri, url);
|
|
|
- System.out.println(authUri);
|
|
|
- return AppUtil.success(authUri, null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ String redirectUri = ConfConfig.getConfigString("wxCp.redirectUri") + "/API/wxCpLogin";
|
|
|
+ String authUri = WXCpMailList.oauth2Service.buildAuthorizationUrl(redirectUri, url);
|
|
|
+ System.out.println(authUri);
|
|
|
+ return AppUtil.success(authUri, null);
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/wxCpLogin", produces = "application/json;charset=utf-8")
|
|
@@ -107,229 +101,180 @@ public class ApiController extends BaseController {
|
|
|
* 根据部门id查询下级部门和用户
|
|
|
*
|
|
|
* @return
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
@PostMapping(value = "/getChildDepartAndUserListByDepartId", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object getChildDepartAndUserListByDepartId(HttpServletRequest request) {
|
|
|
+ public Object getChildDepartAndUserListByDepartId(HttpServletRequest request) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- String departId = getPageData().getString("departId");
|
|
|
- SapOrg sapOrg = null;
|
|
|
- if (StringUtils.isBlank(departId) || WebConstants.TOP_DEPART.toString().equals(departId)) {
|
|
|
- departId = WebConstants.TOP_DEPART.toString();
|
|
|
- sapOrg = SapOrg.builder().id(WebConstants.TOP_DEPART.toString()).sapName(WebConstants.TOP_DEPART_NAME)
|
|
|
- .level("1").build();
|
|
|
- } else {
|
|
|
- sapOrg = sapOrgService.selectById(departId);
|
|
|
- }
|
|
|
- Map<String, Object> result = Maps.newHashMap();
|
|
|
- result.put("departInfo", sapOrg);
|
|
|
- result.put("departList", sapOrgService.selectListByParentId(departId));
|
|
|
- result.put("userList", sapUserService.selectPrimaryListByDepartIdAndLevel(departId));
|
|
|
- return AppUtil.success(result, null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
+ String departId = getPageData().getString("departId");
|
|
|
+ SapOrg sapOrg = null;
|
|
|
+ if (StringUtils.isBlank(departId) || WebConstants.TOP_DEPART.toString().equals(departId)) {
|
|
|
+ departId = WebConstants.TOP_DEPART.toString();
|
|
|
+ sapOrg = SapOrg.builder().id(WebConstants.TOP_DEPART.toString()).sapName(WebConstants.TOP_DEPART_NAME)
|
|
|
+ .level("1").build();
|
|
|
+ } else {
|
|
|
+ sapOrg = sapOrgService.selectById(departId);
|
|
|
}
|
|
|
+ Map<String, Object> result = Maps.newHashMap();
|
|
|
+ result.put("departInfo", sapOrg);
|
|
|
+ result.put("departList", sapOrgService.selectListByParentId(departId));
|
|
|
+ result.put("userList", sapUserService.selectPrimaryListByDepartIdAndLevel(departId));
|
|
|
+ return AppUtil.success(result, null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据输入查询内容查询对应部门和用户
|
|
|
*
|
|
|
* @return
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
@PostMapping(value = "/getDepartAndUserListByName", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object getDepartAndUserListByName(HttpServletRequest request) {
|
|
|
+ public Object getDepartAndUserListByName(HttpServletRequest request) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- String name = getPageData().getString("name");
|
|
|
- Map<String, Object> result = Maps.newHashMap();
|
|
|
- result.put("departList", sapOrgService.selectListByName(name));
|
|
|
- result.put("userList", sapUserService.selectPrimaryListByName(name));
|
|
|
- return AppUtil.success(result, null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ String name = getPageData().getString("name");
|
|
|
+ Map<String, Object> result = Maps.newHashMap();
|
|
|
+ result.put("departList", sapOrgService.selectListByName(name));
|
|
|
+ result.put("userList", sapUserService.selectPrimaryListByName(name));
|
|
|
+ return AppUtil.success(result, null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 根据id查询用户信息
|
|
|
*
|
|
|
* @return
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
@PostMapping(value = "/getUserInfoByUserId", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object getUserInfoById(HttpServletRequest request) {
|
|
|
+ public Object getUserInfoById(HttpServletRequest request) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- String userId = getPageData().getString("userId");
|
|
|
- return AppUtil.success(sapUserService.getDetailById(userId), null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ String userId = getPageData().getString("userId");
|
|
|
+ return AppUtil.success(sapUserService.getDetailById(userId), null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询离职员工列表
|
|
|
*
|
|
|
* @return
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
@PostMapping(value = "/getQuitUserList", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object getQuitUserList(HttpServletRequest request) {
|
|
|
+ public Object getQuitUserList(HttpServletRequest request) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- return AppUtil.success(sapUserService.selectPrimaryListByDelFlag(DelFlagEnum.UNABLE.getCode()), null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ return AppUtil.success(sapUserService.selectPrimaryListByDelFlag(DelFlagEnum.UNABLE.getCode()), null);
|
|
|
}
|
|
|
|
|
|
@ApiResponses(@ApiResponse(response = GetToBeConfirmedListOutput.class, code = 200, message = "success"))
|
|
|
@ApiOperation(value = "查询待确认员工列表")
|
|
|
@PostMapping(value = "/getToBeConfirmedList", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object getToBeConfirmedList(HttpServletRequest request, @RequestBody GetToBeConfirmedListDTO dto) {
|
|
|
+ public Object getToBeConfirmedList(HttpServletRequest request, @RequestBody GetToBeConfirmedListDTO dto)
|
|
|
+ throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return ResultUtil.error(ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- if (WebConstants.CACHE.containsKey(WebConstants.CACHE_SYNC_SAP)) {
|
|
|
- return ResultUtil.error("数据正在同步,请稍等");
|
|
|
- }
|
|
|
- return ResultUtil.success(sapUserService.selectToBeConfirmedPrimaryList(dto), null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
+ if (WebConstants.CACHE.containsKey(WebConstants.CACHE_SYNC_SAP)) {
|
|
|
+ return ResultUtil.error("数据正在同步,请稍等");
|
|
|
}
|
|
|
+ return ResultUtil.success(sapUserService.selectToBeConfirmedPrimaryList(dto), null);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "更新忽略")
|
|
|
@PostMapping(value = "/updateIngore", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object updateIngore(HttpServletRequest request, @RequestBody UpdateResultDTO dto) {
|
|
|
+ public Object updateIngore(HttpServletRequest request, @RequestBody UpdateResultDTO dto) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return ResultUtil.error(ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- List<String> userIds = dto.getUserIds();
|
|
|
- if (StringUtils.isNotBlank(dto.getUserId())) {
|
|
|
- userIds = Lists.newArrayList(dto.getUserId());
|
|
|
- }
|
|
|
- sapUserService.updateIngore(userIds);
|
|
|
- return ResultUtil.success(null, "操作成功");
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
+ List<String> userIds = dto.getUserIds();
|
|
|
+ if (StringUtils.isNotBlank(dto.getUserId())) {
|
|
|
+ userIds = Lists.newArrayList(dto.getUserId());
|
|
|
}
|
|
|
+ sapUserService.updateIngore(userIds);
|
|
|
+ return ResultUtil.success(null, "操作成功");
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "更新同步")
|
|
|
@PostMapping(value = "/updateSync", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object updateSync(HttpServletRequest request, @RequestBody UpdateResultDTO dto) {
|
|
|
+ public Object updateSync(HttpServletRequest request, @RequestBody UpdateResultDTO dto) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return ResultUtil.error(ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- List<String> userIds = dto.getUserIds();
|
|
|
- if (StringUtils.isNotBlank(dto.getUserId())) {
|
|
|
- userIds = Lists.newArrayList(dto.getUserId());
|
|
|
- }
|
|
|
- sapUserService.updateSync(userIds);
|
|
|
- return ResultUtil.success(null, "操作成功");
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
+ List<String> userIds = dto.getUserIds();
|
|
|
+ if (StringUtils.isNotBlank(dto.getUserId())) {
|
|
|
+ userIds = Lists.newArrayList(dto.getUserId());
|
|
|
}
|
|
|
+ sapUserService.updateSync(userIds);
|
|
|
+ return ResultUtil.success(null, "操作成功");
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "手动同步SAP用户数据")
|
|
|
@ApiResponses(@ApiResponse(response = SyncWeixinUserOutput.class, code = 200, message = "success"))
|
|
|
@PostMapping(value = "/syncWeixinUser", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object syncWeixinUser() {
|
|
|
- try {
|
|
|
- SyncWeixinUserOutput output = syncSapUserToWxService.syncWeixinUser();
|
|
|
- return ResultUtil.success(output, "操作成功");
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ public Object syncWeixinUser() throws Exception {
|
|
|
+ SyncWeixinUserOutput output = syncSapUserToWxService.syncWeixinUser();
|
|
|
+ return ResultUtil.success(output, "操作成功");
|
|
|
}
|
|
|
|
|
|
@ApiResponses(@ApiResponse(response = GetIngoreListOutput.class, code = 200, message = "success"))
|
|
|
@ApiOperation(value = "查询忽略列表")
|
|
|
@PostMapping(value = "/getIngoreList", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object getCancelIngoreList(HttpServletRequest request, @RequestBody GetIngoreListDTO dto) {
|
|
|
+ public Object getCancelIngoreList(HttpServletRequest request, @RequestBody GetIngoreListDTO dto) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- return ResultUtil.success(sapUserService.selectIngorePrimaryList(dto), null);
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ return ResultUtil.success(sapUserService.selectIngorePrimaryList(dto), null);
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "取消忽略")
|
|
|
@PostMapping(value = "/cancelIngore", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object cancelIngore(HttpServletRequest request, @RequestBody UpdateResultDTO dto) {
|
|
|
+ public Object cancelIngore(HttpServletRequest request, @RequestBody UpdateResultDTO dto) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- sapUserService.updateCancelIngore(dto.getUserId());
|
|
|
- return ResultUtil.success(null, "操作成功");
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ sapUserService.updateCancelIngore(dto.getUserId());
|
|
|
+ return ResultUtil.success(null, "操作成功");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 删除离职员工
|
|
|
*
|
|
|
* @return
|
|
|
+ * @throws Exception
|
|
|
*/
|
|
|
@PostMapping(value = "/deleteQuitUserByUserId", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object deleteQuitUserByUserId(HttpServletRequest request) {
|
|
|
+ public Object deleteQuitUserByUserId(HttpServletRequest request) throws Exception {
|
|
|
if (!isLogin(request)) {
|
|
|
return AppUtil.error(ResultConstant.NO_TOKEN, ResultConstant.TOKEN_ERR_MSG);
|
|
|
}
|
|
|
- try {
|
|
|
- String userId = getPageData().getString("userId");
|
|
|
- if (StringUtils.isBlank(userId)) {
|
|
|
- return AppUtil.error("参数用户ID不可以为空");
|
|
|
- }
|
|
|
- SapUser sapUser = sapUserService.selectByUserId(userId);
|
|
|
- if (!DelFlagEnum.UNABLE.getCode().equals(sapUser.getDelFlag())) {
|
|
|
- return AppUtil.error("该用户ID不是离职数据");
|
|
|
- }
|
|
|
- // 操作用户ID
|
|
|
- String oprUserId = request.getSession().getAttribute(TOKEN).toString();
|
|
|
- sapUserService.deleteQuitUserByUserId(userId, oprUserId);
|
|
|
- return AppUtil.success();
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
+ String userId = getPageData().getString("userId");
|
|
|
+ if (StringUtils.isBlank(userId)) {
|
|
|
+ return AppUtil.error("参数用户ID不可以为空");
|
|
|
}
|
|
|
+ SapUser sapUser = sapUserService.selectByUserId(userId);
|
|
|
+ if (!DelFlagEnum.UNABLE.getCode().equals(sapUser.getDelFlag())) {
|
|
|
+ return AppUtil.error("该用户ID不是离职数据");
|
|
|
+ }
|
|
|
+ // 操作用户ID
|
|
|
+ String oprUserId = request.getSession().getAttribute(TOKEN).toString();
|
|
|
+ sapUserService.deleteQuitUserByUserId(userId, oprUserId);
|
|
|
+ return AppUtil.success();
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -348,57 +293,42 @@ public class ApiController extends BaseController {
|
|
|
|
|
|
@PostMapping(value = "/findDepartJSON", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object findDepartJSON(HttpServletRequest request) {
|
|
|
- try {
|
|
|
- return ResultUtil.success(wxDepartService.findDepartJSON(), "操作成功");
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
+ public Object findDepartJSON(HttpServletRequest request) throws Exception {
|
|
|
+ return ResultUtil.success(wxDepartService.findDepartJSON(), "操作成功");
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/findUserReports", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
- public Object findUsers(HttpServletRequest request, @RequestBody FindUsersDTO dto) {
|
|
|
- try {
|
|
|
- if (dto.getPageNumber() == null) {
|
|
|
- return ResultUtil.error("参数pageNumber为空");
|
|
|
- }
|
|
|
- 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);
|
|
|
- return ResultUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
+ public Object findUsers(HttpServletRequest request, @RequestBody FindUsersDTO dto) throws Exception {
|
|
|
+ if (dto.getPageNumber() == null) {
|
|
|
+ return ResultUtil.error("参数pageNumber为空");
|
|
|
}
|
|
|
+ Object result = sapCheckReportService.findUserReportPage(dto.getStartDate(), dto.getEndDate(),
|
|
|
+ dto.getDepartId(), dto.getName(), dto.getStatus(), dto.getPageSize(), dto.getPageNumber());
|
|
|
+ return ResultUtil.success(result, "操作成功");
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "/exportUserReportExcel")
|
|
|
@ResponseBody
|
|
|
- public Object exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto) {
|
|
|
- try {
|
|
|
- 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);
|
|
|
+ public Object exportUserReportExcel(HttpServletResponse response, @RequestBody FindUsersDTO dto) throws Exception {
|
|
|
+ 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, "操作成功");
|
|
|
}
|
|
|
}
|