打印功能
This commit is contained in:
parent
6d17a81161
commit
740acc1773
|
|
@ -134,4 +134,12 @@ public class SalaryStatisticsEmployeeController {
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@POST
|
||||
@Path("/print")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String print(@Context HttpServletRequest request, @Context HttpServletResponse response, @RequestBody SalaryStatisticsEmployeeSalaryQueryParam queryParam) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<SalaryStatisticsEmployeeSalaryQueryParam, Map<String, Object>>(user).run(getSalaryStatisticsEmployeeWrapper(user)::print, queryParam);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -347,6 +347,16 @@ public class SalaryStatisticsEmployeeWrapper extends Service {
|
|||
return ExcelUtilPlus.genWorkbookV2WithPattern(rowList, "薪资明细", true);
|
||||
}
|
||||
|
||||
public Map<String, Object> print(SalaryStatisticsEmployeeSalaryQueryParam param) {
|
||||
param.setExport(true);
|
||||
Map<String, Object> resultMap = salaryList(param);
|
||||
List<WeaTableColumn> columns = (List<WeaTableColumn>) resultMap.get("columns");
|
||||
List<Map<String, Object>> resultList = ((PageInfo<Map<String, Object>>) resultMap.get("pageInfo")).getList();
|
||||
resultMap.put("columns", columns);
|
||||
resultMap.put("pageInfo", resultList);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
// public Map<String, Object> exportDetailList(SalaryStatisticsEmployeeDetailQueryParam queryParam) {
|
||||
// SalaryAssert.notNull(queryParam.getEmployeeId(), SalaryI18nUtil.getI18nLabel(currentTenantKey, currentEmployeeId, 163974, "人员id不能为空"));
|
||||
// // 构建异步导出参数
|
||||
|
|
|
|||
Loading…
Reference in New Issue