|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.glxp.udi.admin.controller.param;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
|
|
|
|
@ -10,6 +11,7 @@ import com.glxp.udi.admin.req.param.SystemPDFTemplateRequest;
|
|
|
|
|
import com.glxp.udi.admin.req.param.SystemPDFTemplateSaveRequest;
|
|
|
|
|
import com.glxp.udi.admin.res.PageSimpleResponse;
|
|
|
|
|
import com.glxp.udi.admin.res.param.SystemPDFTemplateResponse;
|
|
|
|
|
import com.glxp.udi.admin.service.basic.BussinessTypeService;
|
|
|
|
|
import com.glxp.udi.admin.service.param.SystemPDFTemplateService;
|
|
|
|
|
import com.glxp.udi.admin.util.JasperUtils;
|
|
|
|
|
import com.glxp.udi.admin.util.PageUtil;
|
|
|
|
@ -37,6 +39,8 @@ public class SystemPDFTemplateController {
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private SystemPDFTemplateService systemPDFTemplateService;
|
|
|
|
|
@Resource
|
|
|
|
|
private BussinessTypeService bussinessTypeService;
|
|
|
|
|
|
|
|
|
|
@AuthRuleAnnotation("system/pdf/template/list")
|
|
|
|
|
@GetMapping("/system/pdf/template/list")
|
|
|
|
@ -49,6 +53,9 @@ public class SystemPDFTemplateController {
|
|
|
|
|
List<SystemPDFTemplateResponse> systemPDFTemplateResponseList = page.getRecords().stream().map(item -> {
|
|
|
|
|
SystemPDFTemplateResponse systemPDFTemplateResponse = new SystemPDFTemplateResponse();
|
|
|
|
|
BeanUtils.copyProperties(item, systemPDFTemplateResponse);
|
|
|
|
|
if (StrUtil.isNotBlank(item.getAction())) {
|
|
|
|
|
systemPDFTemplateResponse.setBussinessTypeName(bussinessTypeService.findNameByAction(item.getAction()));
|
|
|
|
|
}
|
|
|
|
|
return systemPDFTemplateResponse;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|