zjh
2024-06-27 bdd2b5c36983d461416eec89d2a9feb1176b71df
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjReportController.java
@@ -354,7 +354,7 @@
                    Date finishTime = tjOrder.getFinishTime();
                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    String ksrq = dateFormat.format(createTime);
                    String jsrq = dateFormat.format(finishTime);
                    String jsrq = dateFormat.format(new Date());
                    HashMap<String, Object> params = new HashMap<>();
                    params.put("his_registration_id", hisRegistrationId);
                    params.put("ksbm", "");
@@ -364,7 +364,17 @@
                    params.put("pagecount", 100);
                    params.put("page", 1);
                    HashMap<String, Object> map = new HashMap<>();
                    return hisPDFUtil.execHisRequest(map, params, tjOrder, reportTemplate);
                    LambdaQueryWrapper<TjCustomer> wq1 = new LambdaQueryWrapper<>();
                    wq1.eq(TjCustomer::getCusId, tjOrder.getUserId());
                    TjCustomer tjCustomer = tjCustomerService.getOne(wq1);
//                    return hisPDFUtil.execHisRequest(map, params, tjOrder, reportTemplate);
                    try {
                        return hisPDFUtil.hisPDF(tjOrder,tjCustomer,reportTemplate);
                    } catch (DocumentException e) {
                        logger.error("生成报告异常");
                        e.printStackTrace();
                        return AjaxResult.error("生成报告异常");
                    }
                } else {
                    return AjaxResult.error("请先总检");
                }
@@ -1334,7 +1344,7 @@
                    e.printStackTrace();
                    return AjaxResult.success("PDF导出失败");
                } finally {
                    transitionService.deletedTbTransitionListByCusIdAndTjNum(tjCustomer.getCusIdcard(), tjOrder.getCardId());
//                    transitionService.deletedTbTransitionListByCusIdAndTjNum(tjCustomer.getCusIdcard(), tjOrder.getCardId());
                }
            }
        }