From f0a6fcfbc2fb7948e499e3513f19b63b375c8cfd Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Wed, 10 Mar 2021 10:21:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccsens/question/bean/dto/QuestionDto.java | 2 ++ .../question/bean/vo/PatientReportVo.java | 32 +++++++++---------- .../question/service/QuestionService.java | 10 +++++- .../com/ccsens/question/uitl/Constant.java | 10 ++++-- question/src/main/resources/application.yml | 4 +-- question/src/main/resources/druid-dev.yml | 6 ++-- .../mapper_dao/HtPatientReportDao.xml | 7 ++-- .../main/java/com/ccsens/util/PdfUtil.java | 2 +- 8 files changed, 45 insertions(+), 28 deletions(-) diff --git a/question/src/main/java/com/ccsens/question/bean/dto/QuestionDto.java b/question/src/main/java/com/ccsens/question/bean/dto/QuestionDto.java index 4e0a83da..16498849 100644 --- a/question/src/main/java/com/ccsens/question/bean/dto/QuestionDto.java +++ b/question/src/main/java/com/ccsens/question/bean/dto/QuestionDto.java @@ -115,6 +115,8 @@ public class QuestionDto { @NotBlank(message = "上级code不能为空") @ApiModelProperty("上级code") private String code; + @ApiModelProperty("是否显示报告单 0:否 1:是,默认为是") + private byte showReport = 1; } } diff --git a/question/src/main/java/com/ccsens/question/bean/vo/PatientReportVo.java b/question/src/main/java/com/ccsens/question/bean/vo/PatientReportVo.java index 118c4f9d..950a7a7a 100644 --- a/question/src/main/java/com/ccsens/question/bean/vo/PatientReportVo.java +++ b/question/src/main/java/com/ccsens/question/bean/vo/PatientReportVo.java @@ -142,23 +142,23 @@ public class PatientReportVo { //第一栏 rows.add( fillRow( - "姓名:" + this.patientName, - "性别:" + (this.sex == 0 ? "男" : "女"), - "年龄:" + this.patientAge + " 岁") + "姓名:" + (StrUtil.isEmpty(this.patientName) ? "" : this.patientName), + "性别:" + (this.sex == null ? "" : this.sex == 0 ? "男" : "女"), + "年龄:" + (this.patientAge != null && this.patientAge != 0 ? this.patientAge + " 岁" : "")) ); //第二栏 rows.add( fillRow( - "文化程度:" + this.educationalStatusUnit + "年", - "编号:" + this.serialNumber, - "职业:" + careerMap.get(this.career)) + "文化程度:" + (StrUtil.isEmpty(this.educationalStatusUnit) ? "" : this.educationalStatusUnit + "年"), + "编号:" + (StrUtil.isEmpty(this.serialNumber) ? "" : this.serialNumber), + "职业:" + (this.career != null ? careerMap.get(this.career) : "")) ); //第三栏 rows.add( fillRow( - "科别:" + this.department, - "床号:" + this.bedNumber, - "病案号:" + this.hospitalNumber) + "科别:" + (StrUtil.isEmpty(this.department) ? "" : this.department), + "床号:" + (StrUtil.isEmpty(this.bedNumber) ? "" : this.bedNumber), + "病案号:" + (StrUtil.isEmpty(this.hospitalNumber) ? "" : this.hospitalNumber)) ); //第四栏 // Date date = null; @@ -169,7 +169,7 @@ public class PatientReportVo { rows.add( fillRow( - "临床诊断:" + this.clinicalDiagnosis, + "临床诊断:" + (StrUtil.isEmpty(this.clinicalDiagnosis) ? "" : this.clinicalDiagnosis), "","") // "检查日期:" + (date == null ? "" : DateUtil.format(date, "yyyy-MM-dd"))) ); @@ -282,11 +282,11 @@ public class PatientReportVo { this.subReport.forEach(reportScore -> { String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); boolean isLast = npi.equalsIgnoreCase(this.code) && this.subReport.indexOf(reportScore) == this.subReport.size() - 1; - fillRow(row1,row2, reportScore.getName(), score, mmse.equalsIgnoreCase(this.code), isLast, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null); + fillRow(row1,row2, reportScore.getName(), score, isLast, npi.equalsIgnoreCase(this.code) ? new int[]{3,3} : null); }); // 总分 if (mmse.equalsIgnoreCase(this.code)) { - fillRow(row1,row2, "总分", (this.score == null ? "" : this.score) + (this.totalScore > 0 ? "/" + this.totalScore : ""), mmse.equalsIgnoreCase(this.code), true); + fillRow(row1,row2, "总分", (this.score == null ? "" : this.score) + (this.totalScore > 0 ? "/" + this.totalScore : ""), true); } rows.add(row1); rows.add(row2); @@ -305,10 +305,10 @@ public class PatientReportVo { ReportScore reportScore = this.subReport.get(i); String jy = "JY"; if (jy.equalsIgnoreCase(reportScore.getCode())) { - fillRow(row1, row2, reportScore.getName(), " ", false, false, i == 0 ? new int[]{2,2}: null); + fillRow(row1, row2, reportScore.getName(), " ", false, i == 0 ? new int[]{2,2}: null); } else { String score = (reportScore.score == null ? "" : reportScore.score) + (reportScore.getTotalScore() > 0 ? "/" + reportScore.getTotalScore() : ""); - fillRow(row1, row2, reportScore.getName(), score, false, false, i == 0 ? new int[]{2,2}: null); + fillRow(row1, row2, reportScore.getName(), score, false, i == 0 ? new int[]{2,2}: null); } } PdfUtil.Cell scoreNameCell = new PdfUtil.Cell(); @@ -392,11 +392,11 @@ public class PatientReportVo { // } // } - private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isTop, boolean isRight, int... colspan){ + private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isRight, int... colspan){ //名称 PdfUtil.Cell cell1 = new PdfUtil.Cell(); cell1.setContent(name); - cell1.setBorderTop(isTop? 1 : 0); +// cell1.setBorderTop(isTop? 1 : 0); cell1.setBorderRight(isRight? 1 : 0); cell1.setColSpan(colspan == null || colspan.length == 0 ? 1 : colspan[0]); row1.addCell(cell1); diff --git a/question/src/main/java/com/ccsens/question/service/QuestionService.java b/question/src/main/java/com/ccsens/question/service/QuestionService.java index 822be335..47ceb313 100644 --- a/question/src/main/java/com/ccsens/question/service/QuestionService.java +++ b/question/src/main/java/com/ccsens/question/service/QuestionService.java @@ -803,6 +803,14 @@ public class QuestionService implements IQuestionService { */ @Override public List queryReportCode(QuestionDto.QueryReportCode param, Long userId) { - return htReportDao.queryReportCode(param.getCode()); + List codes = htReportDao.queryReportCode(param.getCode()); + if (param.getShowReport() == Constant.STATUS_YES) { + log.info("添加生成报告单"); + QuestionVo.ReportCode code = new QuestionVo.ReportCode(); + code.setCode("BGDSC"); + code.setName("报告单编辑"); + codes.add(code); + } + return codes; } } diff --git a/question/src/main/java/com/ccsens/question/uitl/Constant.java b/question/src/main/java/com/ccsens/question/uitl/Constant.java index 2c976196..f6f86d96 100644 --- a/question/src/main/java/com/ccsens/question/uitl/Constant.java +++ b/question/src/main/java/com/ccsens/question/uitl/Constant.java @@ -20,6 +20,11 @@ public class Constant { public static final String VIDEO = ".flv,swf,mkv,avi,rm,rmvb,mpeg,mpg,.ogg,ogv,mov,wmv,mp4,webm,mp3,wav,mid,.wma"; /**上传图片访问路径*/ public static final String UPLOAD_URL = "uploads/"; + /**状态:是*/ + public static final byte STATUS_YES = 1; + /**状态:否*/ + public static final byte STATUS_NO = 0; + /**病友画图轨迹颜色*/ public static final class LineColour { @@ -55,10 +60,11 @@ public class Constant { public final static String DOCTOR_PARAM = "doctor"; public final static byte SEX_MAN = 0; public final static byte SEX_WOMAN = 1; - - /**删除*/ public final static byte IS_DEL = 1; + + + public final static class Rule { public static final byte SMALL = 0; public static final String SMALL_NUM = "small"; diff --git a/question/src/main/resources/application.yml b/question/src/main/resources/application.yml index 1d437161..5c2cd5c4 100644 --- a/question/src/main/resources/application.yml +++ b/question/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: green - include: common, util-green \ No newline at end of file + active: dev + include: common, util-dev \ No newline at end of file diff --git a/question/src/main/resources/druid-dev.yml b/question/src/main/resources/druid-dev.yml index 66d23a67..cfa8f91f 100644 --- a/question/src/main/resources/druid-dev.yml +++ b/question/src/main/resources/druid-dev.yml @@ -15,7 +15,7 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: b3fd300ad4694070007fdcca961c4018211dc53235dd806ad62abc0cc0abb8e5 + password: 1b01d55a27843cfc487ce8dd6915fc22 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +27,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://49.233.89.188:3306/question?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://49.232.6.143:3306/question?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL - env: CCSENS_HT \ No newline at end of file + env: CCSENS_ENTERPRISE \ No newline at end of file diff --git a/question/src/main/resources/mapper_dao/HtPatientReportDao.xml b/question/src/main/resources/mapper_dao/HtPatientReportDao.xml index 950e170c..a6287160 100644 --- a/question/src/main/resources/mapper_dao/HtPatientReportDao.xml +++ b/question/src/main/resources/mapper_dao/HtPatientReportDao.xml @@ -40,9 +40,10 @@