zhaowenxuan
7 天以前 0892d843cd394f383ff50f480f7f22f2ec3829bc
ltkj-admin/src/main/java/com/ltkj/web/controller/app/ReportController.java
@@ -21,6 +21,7 @@
import com.ltkj.hosp.sqlDomain.LtkjHysqd;
import com.ltkj.hosp.vodomain.ShenGaoTiZhongVo;
import com.ltkj.mall.mallOrderUtils.TjConstants;
import com.ltkj.system.service.ISysConfigService;
import com.ltkj.web.config.pdfutils.PDFBinaryUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -75,8 +76,8 @@
    private IDictCompService compService;
    @Resource
    private ITjReportTemplateService reportTemplateService;
    @Value("${path.filePath}")
    private String value;
//    @Value("${path.filePath}")
//    private String value;
    @Resource
    private LtkjHybgdService ltkjHybgdService;
    @Resource
@@ -85,6 +86,8 @@
    private LtkjExamJcbgdService jcbgdService;
    @Resource
    private LtkjExamJcsqdService jcsqdService;
    @Autowired
    private ISysConfigService configService;
    /**
@@ -282,9 +285,13 @@
                                if (jyjgval.compareTo(min) < 0) {
                                    // jyjg 小于范围最小值,添加下箭头
                                    jyjg = jyjg + "   ↓";
                                    hybgd.setYcbz("1");
                                } else if (jyjgval.compareTo(max) > 0) {
                                    // jyjg 大于范围最大值,添加上箭头
                                    jyjg = jyjg + "   ↑";
                                    hybgd.setYcbz("1");
                                }else {
                                    hybgd.setYcbz("0");
                                }
                                hybgd.setJyjg(jyjg);
                            } catch (Exception ignored) {}
@@ -421,7 +428,7 @@
        wq1.eq(TjOrder::getTjNumber, tjNumber);
        TjOrder tjOrder = orderService.getOne(wq1);
        String value = configService.selectConfigByKey("path_filePath");
        LambdaQueryWrapper<TjCustomer> wq2 = new LambdaQueryWrapper<>();
        wq2.eq(TjCustomer::getCusId, tjOrder.getUserId());
        TjCustomer tjCustomer = customerService.getOne(wq2);
@@ -438,9 +445,9 @@
        final String substring = uuid.toString().substring(0, 5);
//        String userId = SecurityUtils.getLoginUser().getUsername();
        PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + "\\" + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf");
        PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + File.separator + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf");
        //String filePath = one.getPath();
        String filePath = value + "\\" + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf";
        String filePath = value + File.separator + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf";
        File f = new File(filePath);
        if (filePath.isEmpty()) {
            System.out.println("文件不存在!");