From 8ed667d2a5f7234d9daeb4a7d2ce253f3e2447c3 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Tue, 22 Sep 2020 18:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E5=91=8A=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ccsens/ht/bean/vo/PatientReportVo.java | 44 ++++++++++--------- .../ht/service/PatientReportService.java | 7 ++- .../com/ccsens/ht/service/PatientService.java | 11 ++--- 3 files changed, 30 insertions(+), 32 deletions(-) diff --git a/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java b/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java index 502a2b2f..6b48c5f1 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java +++ b/ht/src/main/java/com/ccsens/ht/bean/vo/PatientReportVo.java @@ -127,10 +127,12 @@ public class PatientReportVo { private String hospital; public List toPdfRow(){ - Map careerMap = new HashMap<>(); + Map careerMap = new HashMap<>(16); String careerMsg = "1:农林牧渔水利生产人员 2:教师 3:医务工作者 4:专业技术人员 5:生产、运输设备操作人员及有关人员 6:商业、服务业人员 7:国家机关、事业单位、企业负责人 8:国家机关、事业单位、企业办事人员和有关人员 9:军人 10:媒体、文体类工作人员 11:在校学生 12:未就业 13:家务 14:其他"; - for (String careerOne: careerMsg.split(" ")) { - careerMap.put(Byte.parseByte(careerOne.split(":")[0]), careerOne.split(":")[1]); + String splitStr = " "; + for (String careerOne: careerMsg.split(splitStr)) { + String splitStr2 = ":"; + careerMap.put(Byte.parseByte(careerOne.split(splitStr2)[0]), careerOne.split(splitStr2)[1]); } @@ -283,7 +285,7 @@ public class PatientReportVo { }); // 总分 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 : ""), mmse.equalsIgnoreCase(this.code), true); } rows.add(row1); rows.add(row2); @@ -378,16 +380,16 @@ public class PatientReportVo { } } - /** - * 添加一个空格 - * @param rows - */ - private void fillBlankCell(PdfUtil.Row... rows) { - for (PdfUtil.Row row: rows) { - PdfUtil.Cell cell = new PdfUtil.Cell(); - row.addCell(cell); - } - } +// /** +// * 添加一个空格 +// * @param rows 行 +// */ +// private void fillBlankCell(PdfUtil.Row... rows) { +// for (PdfUtil.Row row: rows) { +// PdfUtil.Cell cell = new PdfUtil.Cell(); +// row.addCell(cell); +// } +// } private void fillRow(PdfUtil.Row row1, PdfUtil.Row row2, String name, String score, boolean isTop, boolean isRight, int... colspan){ //名称 @@ -414,7 +416,7 @@ public class PatientReportVo { @ApiModelProperty("对报告单的操作权限 0:仅查看 1: 可修改 2:可审查") private int authority; - public static final int OLAY_READ = 0; + public static final int ONLY_READ = 0; public static final int READ_WRITE = 1; public static final int CHECK = 2; } @@ -444,12 +446,12 @@ public class PatientReportVo { private Byte sex; @ApiModelProperty("对应人数") private Integer count; - public AgeAndSex(){} - public AgeAndSex(Byte ageLevel, Byte sex, Integer count) { - this.ageLevel = ageLevel; - this.sex = sex; - this.count = count; - } +// public AgeAndSex(){} +// public AgeAndSex(Byte ageLevel, Byte sex, Integer count) { +// this.ageLevel = ageLevel; +// this.sex = sex; +// this.count = count; +// } } @ApiModel("年龄+性别统计") 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 7f59937b..f60c69ee 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java @@ -11,7 +11,6 @@ import com.ccsens.ht.bean.vo.PatientReportVo; import com.ccsens.ht.persist.dao.HtDoctorDao; import com.ccsens.ht.persist.dao.HtPatientReportDao; import com.ccsens.ht.persist.dao.HtPositionDao; -import com.ccsens.ht.persist.mapper.HtDoctorMapper; import com.ccsens.ht.persist.mapper.HtPatientFollowUpMapper; import com.ccsens.ht.persist.mapper.HtPatientMapper; import com.ccsens.ht.persist.mapper.HtPatientReportRecordMapper; @@ -286,7 +285,7 @@ public class PatientReportService implements IPatientReportService { doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT); List doctors = htDoctorDao.selectByExample(doctorExample); if (CollectionUtils.isEmpty(doctors)) { - authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ); + authorityVo.setAuthority(PatientReportVo.Authority.ONLY_READ); return authorityVo; } HtDoctor doctor = doctors.get(0); @@ -298,7 +297,7 @@ public class PatientReportService implements IPatientReportService { //查询下属职务 List lowerPositionIds = htPositionDao.queryAllLowerPosition(doctor.getPositionId()); if (CollectionUtils.isEmpty(lowerPositionIds)) { - authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ); + authorityVo.setAuthority(PatientReportVo.Authority.ONLY_READ); return authorityVo; } //查询报告单关联医生职位 @@ -306,7 +305,7 @@ public class PatientReportService implements IPatientReportService { if (lowerPositionIds.contains(doctor1.getPositionId())) { authorityVo.setAuthority(PatientReportVo.Authority.CHECK); } else { - authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ); + authorityVo.setAuthority(PatientReportVo.Authority.ONLY_READ); } return authorityVo; diff --git a/ht/src/main/java/com/ccsens/ht/service/PatientService.java b/ht/src/main/java/com/ccsens/ht/service/PatientService.java index c2cc002a..59fd651d 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientService.java @@ -19,7 +19,6 @@ import com.ccsens.util.exception.BaseException; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -31,25 +30,23 @@ import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; -import java.util.Map; /** - * @program: ptpro - * @description: - * @author: wu huijuan + * @description: 病人信息 + * @author: whj * @create: 2019/10/29 11:16 */ @Slf4j @Service @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class PatientService implements IPatientService { - @Autowired + @Resource private Snowflake snowflake; @Resource private HtPatientReportMapper htPatientReportMapper; @Resource private HtPatientMapper htPatientMapper; - @Autowired + @Resource private TallFeignClient tallFeignClient; @Override