From 9192d778400f2b4626bc341997246f9c81aa28b8 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Mon, 24 Jan 2022 13:36:16 +0800 Subject: [PATCH] bug --- .../ht/service/PatientReportService.java | 29 +++++++++++-------- ht/src/main/resources/application.yml | 4 +-- .../mapper_dao/HtPatientReportDao.xml | 3 +- .../mapper_dao/HtPatientScoreDao.xml | 4 +-- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java index 78268f36..b6403e12 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java @@ -1189,7 +1189,7 @@ public class PatientReportService implements IPatientReportService { if (sortScoreMap.containsKey(mingming1) || sortScoreMap.containsKey(mingming2) || sortScoreMap.containsKey(mingming3) || sortScoreMap.containsKey(fushu1) || sortScoreMap.containsKey(fushu2) || sortScoreMap.containsKey(dongwu) ) { yuYan = sortScoreMap.getOrDefault(mingming1, zero).add(sortScoreMap.getOrDefault(mingming2, zero)).add(sortScoreMap.getOrDefault(mingming3, zero)) - .add(sortScoreMap.getOrDefault(fushu1, zero)).add(sortScoreMap.getOrDefault(fushu2, zero)).add(sortScoreMap.getOrDefault(dongwu, zero)); + .add(sortScoreMap.getOrDefault(chongfu1, zero)).add(sortScoreMap.getOrDefault(chongfu2, zero)).add(sortScoreMap.getOrDefault(dongwu, zero)); } // 注意指数:数字广度顺+数字广度逆+警觉性+连续减7+句子重复+即刻记忆2次  0-18分 if (sortScoreMap.containsKey(shunbei) || sortScoreMap.containsKey(daobei) || sortScoreMap.containsKey(jingjuexing) @@ -1205,7 +1205,7 @@ public class PatientReportService implements IPatientReportService { } PdfUtil.Row titleRow = new PdfUtil.Row(); - PdfUtil.Cell titleCell = new PdfUtil.Cell("MoCA认知域指数(CDIS)"); + PdfUtil.Cell titleCell = new PdfUtil.Cell("MoCA认知域指数(CDIS)"); titleCell.setRowSpan(3); titleRow.addCell(titleCell); PdfUtil.Cell jiYiCell = new PdfUtil.Cell("记忆指数"); @@ -1213,30 +1213,35 @@ public class PatientReportService implements IPatientReportService { titleRow.addCell(jiYiCell); titleRow.addCell(new PdfUtil.Cell("执行指数")); titleRow.addCell(new PdfUtil.Cell("空间指数")); - titleRow.addCell(new PdfUtil.Cell("注意力指数")); + titleRow.addCell(new PdfUtil.Cell("注意指数")); titleRow.addCell(new PdfUtil.Cell("语言指数")); - titleRow.addCell(new PdfUtil.Cell("定向指数")); + PdfUtil.Cell dingXiangCell = new PdfUtil.Cell("定向指数"); + dingXiangCell.setColSpan(2); + dingXiangCell.setBorderRight(1); + titleRow.addCell(dingXiangCell); rows.add(titleRow); PdfUtil.Row oneRow = new PdfUtil.Row(); - PdfUtil.Cell jiYiValueCell = new PdfUtil.Cell(jiYi == null ? " / 15" : jiYi.toString() + " / 15"); + PdfUtil.Cell jiYiValueCell = new PdfUtil.Cell(jiYi == null ? " / 15" : jiYi.intValue() + " / 15"); jiYiValueCell.setColSpan(2); jiYiValueCell.setRowSpan(2); oneRow.addCell(jiYiValueCell); - PdfUtil.Cell zhiXingValueCell = new PdfUtil.Cell(zhiXing == null ? " / 13" : zhiXing.toString() + " / 13"); + PdfUtil.Cell zhiXingValueCell = new PdfUtil.Cell(zhiXing == null ? " / 13" : zhiXing.intValue() + " / 13"); zhiXingValueCell.setRowSpan(2); oneRow.addCell(zhiXingValueCell); - PdfUtil.Cell kongJianValueCell = new PdfUtil.Cell(kongJian == null ? " / 7" : kongJian.toString() + " / 7"); + PdfUtil.Cell kongJianValueCell = new PdfUtil.Cell(kongJian == null ? " / 7" : kongJian.intValue() + " / 7"); kongJianValueCell.setRowSpan(2); oneRow.addCell(kongJianValueCell); - PdfUtil.Cell zhuYiValueCell = new PdfUtil.Cell(zhuYi == null ? " / 18" : zhuYi.toString() + " / 18"); + PdfUtil.Cell zhuYiValueCell = new PdfUtil.Cell(zhuYi == null ? " / 18" : zhuYi.intValue() + " / 18"); zhuYiValueCell.setRowSpan(2); oneRow.addCell(zhuYiValueCell); - PdfUtil.Cell yuYanValueCell = new PdfUtil.Cell(yuYan == null ? " / 6" : yuYan.toString() + " / 6"); + PdfUtil.Cell yuYanValueCell = new PdfUtil.Cell(yuYan == null ? " / 6" : yuYan.intValue() + " / 6"); yuYanValueCell.setRowSpan(2); oneRow.addCell(yuYanValueCell); - PdfUtil.Cell dingXiangValueCell = new PdfUtil.Cell(dingXiang == null ? " / 6" : dingXiang.toString() + " / 6"); - zhuYiValueCell.setRowSpan(2); - oneRow.addCell(zhuYiValueCell); + PdfUtil.Cell dingXiangValueCell = new PdfUtil.Cell(dingXiang == null ? " / 6" : dingXiang.intValue() + " / 6"); + dingXiangValueCell.setRowSpan(2); + dingXiangValueCell.setColSpan(2); + dingXiangValueCell.setBorderRight(1); + oneRow.addCell(dingXiangValueCell); rows.add(oneRow); rows.add(new PdfUtil.Row()); } diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index 4ecd13fd..b9b264a7 100644 --- a/ht/src/main/resources/application.yml +++ b/ht/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: dev - include: common, util-dev + active: prod + include: common, util-prod diff --git a/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml b/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml index 68856483..de3d845b 100644 --- a/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml +++ b/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml @@ -424,7 +424,7 @@ left join -- MOCA (select s.patient_report_id as mocaReportId, q.sort as mocaSort, sum(s.score) as mocaScore from - (select * from t_ht_question where evaluation_code = 'MOCA' AND is_del = 0) q + (select * from t_ht_question where evaluation_code in('MOCA', 'YCHY') AND is_del = 0) q left join t_ht_patient_score s on q.id = s.question_id and s.patient_report_id in #{id} @@ -440,6 +440,7 @@ #{id} + and s.type in (0, 2) group by q.evaluation_code, s.patient_report_id) score on report.id = score.scoreReportId diff --git a/ht/src/main/resources/mapper_dao/HtPatientScoreDao.xml b/ht/src/main/resources/mapper_dao/HtPatientScoreDao.xml index 0e89f02c..04923e0f 100644 --- a/ht/src/main/resources/mapper_dao/HtPatientScoreDao.xml +++ b/ht/src/main/resources/mapper_dao/HtPatientScoreDao.xml @@ -54,14 +54,14 @@ AND q.is_del = 0