|
@@ -36,8 +36,13 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.google.common.collect.Maps;
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import me.chanjar.weixin.cp.bean.WxCpOauth2UserInfo;
|
|
|
|
|
|
+@Api(value = "API接口")
|
|
|
@Controller
|
|
|
@RequestMapping(value = "/API")
|
|
|
public class ApiController extends BaseController {
|
|
@@ -181,12 +186,9 @@ public class ApiController extends BaseController {
|
|
|
return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- /**
|
|
|
- * 查询待确认员工列表
|
|
|
- *
|
|
|
- * @return
|
|
|
- */
|
|
|
+
|
|
|
+ @ApiImplicitParams({ @ApiImplicitParam(name = "currentPage", value = "当前页", dataType = "Integer") })
|
|
|
+ @ApiOperation(value = "查询待确认员工列表")
|
|
|
@RequestMapping(value = "/getToBeConfirmedList", produces = "application/json;charset=utf-8")
|
|
|
@ResponseBody
|
|
|
public Object getToBeConfirmedList(HttpServletRequest request, GetToBeConfirmedListDTO dto) {
|
|
@@ -263,8 +265,8 @@ public class ApiController extends BaseController {
|
|
|
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());
|
|
|
+ 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);
|
|
@@ -285,14 +287,14 @@ public class ApiController extends BaseController {
|
|
|
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());
|
|
|
+ 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);
|
|
|
+ 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) {
|