修改资质打印问题

dev
郑明梁 2 years ago
parent 1e839762b0
commit e1a160380e

@ -18,6 +18,7 @@ import com.glxp.api.service.system.SystemPDFTemplateService;
import com.glxp.api.util.JasperUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
@ -36,6 +37,8 @@ public class SysPdfTemplateController {
@Resource
private SystemPDFTemplateService systemPDFTemplateService;
@Value("${file_path}")
private String filePath;
@AuthRuleAnnotation("system/pdf/template/list")
@GetMapping("/system/pdf/template/list")
@ -84,7 +87,7 @@ public class SysPdfTemplateController {
"[{\"area\":\"福建省厦门市湖里区\",\"vaiDate\":\"2023-03-15\",\"code\":\"1113\",\"companyName\":\"盛夏科技\",\"classes\":\"经营企业\",\"mobile\":\"18575144832\",\"index\":\"1\",\"remark\":\"12\",\"detailAddr\":\"湖里\",\"name\":\"业务许可证\",\"creditNum\":\"6464684643\",\"auditStatus\":\"审核通过\",\"expireDate\":\"2023-03-16\",\"contacts\":\"东\",\"email\":\"46456@qq.com\",\"status\":\"有效\"}]";
}
JasperUtils.jasperReport(request, response, data, systemPDFTemplateEntity.getPath(), "pdf");
JasperUtils.jasperReport(request, response, data, filePath + "/pdf/template/"+systemPDFTemplateEntity.getPath(), "pdf");

@ -54,7 +54,7 @@ public class uploadController {
file.transferTo(file1);
Map<String, String> rMap = new HashMap<>();
rMap.put("msg", "上传成功");
rMap.put("path", savePath + "/" + newName);
rMap.put("path", newName);
return ResultVOUtils.success(rMap);
} catch (IOException e) {
e.printStackTrace();

Loading…
Cancel
Save