diff --git a/cloudutil/src/main/resources/application-util-test.yml b/cloudutil/src/main/resources/application-util-test.yml index 46e5e128..ab113363 100644 --- a/cloudutil/src/main/resources/application-util-test.yml +++ b/cloudutil/src/main/resources/application-util-test.yml @@ -20,7 +20,7 @@ eureka: service-url: # 指定eureka server通信地址,注意/eureka/小尾巴不能少 #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ - defaultZone: http://admin:admin@49.233.89.188:7010/eureka/ + defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ instance: # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server prefer-ip-address: true diff --git a/ct/src/main/resources/application-test.yml b/ct/src/main/resources/application-test.yml index 57d9ab85..dedf7e17 100644 --- a/ct/src/main/resources/application-test.yml +++ b/ct/src/main/resources/application-test.yml @@ -8,7 +8,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com + host: 127.0.0.1 password: 111111 port: 5672 username: admin @@ -28,4 +28,4 @@ swagger: enable: true eureka: instance: - ip-address: 49.233.89.188 \ No newline at end of file + ip-address: 192.168.0.99 \ No newline at end of file diff --git a/ct/src/main/resources/druid-test.yml b/ct/src/main/resources/druid-test.yml index e38249c2..d881a454 100644 --- a/ct/src/main/resources/druid-test.yml +++ b/ct/src/main/resources/druid-test.yml @@ -15,7 +15,7 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: + password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +27,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/ct?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://49.233.89.188/ct?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_GAME \ No newline at end of file diff --git a/game/src/main/resources/application-test.yml b/game/src/main/resources/application-test.yml index 780923c8..d4e9d239 100644 --- a/game/src/main/resources/application-test.yml +++ b/game/src/main/resources/application-test.yml @@ -8,7 +8,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com + host: 192.168.0.99 password: 111111 port: 5672 username: admin @@ -28,4 +28,4 @@ swagger: enable: true eureka: instance: - ip-address: 49.233.89.188 \ No newline at end of file + ip-address: 192.168.0.99 \ No newline at end of file diff --git a/game/src/main/resources/druid-test.yml b/game/src/main/resources/druid-test.yml index 579863aa..e7f7bb4e 100644 --- a/game/src/main/resources/druid-test.yml +++ b/game/src/main/resources/druid-test.yml @@ -15,7 +15,7 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: + password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +27,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/game?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://49.233.89.188/game?useUnicode=true&characterEncoding=UTF-8 rname: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_GAME \ No newline at end of file diff --git a/health/src/main/resources/application-test.yml b/health/src/main/resources/application-test.yml index 7c7fc658..2eb77462 100644 --- a/health/src/main/resources/application-test.yml +++ b/health/src/main/resources/application-test.yml @@ -11,7 +11,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com + host: 192.168.0.99 password: 111111 port: 5672 username: admin @@ -31,7 +31,7 @@ swagger: enable: true eureka: instance: - ip-address: 49.233.89.188 + ip-address: 192.168.0.99 file: path: /home/cloud/health/uploads/ domain: https://test.tall.wiki/gateway/health/ diff --git a/health/src/main/resources/druid-test.yml b/health/src/main/resources/druid-test.yml index 26b452e4..85bed221 100644 --- a/health/src/main/resources/druid-test.yml +++ b/health/src/main/resources/druid-test.yml @@ -15,7 +15,7 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: + password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +27,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/health?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://49.233.89.188/health?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_GAME \ No newline at end of file diff --git a/ht/src/main/java/com/ccsens/ht/api/DoctorController.java b/ht/src/main/java/com/ccsens/ht/api/DoctorController.java index 708b0fd6..c1715d01 100644 --- a/ht/src/main/java/com/ccsens/ht/api/DoctorController.java +++ b/ht/src/main/java/com/ccsens/ht/api/DoctorController.java @@ -4,7 +4,9 @@ package com.ccsens.ht.api; import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.ht.annotation.DoctorAudit; import com.ccsens.ht.bean.dto.DoctorDto; +import com.ccsens.ht.bean.po.HtDoctor; import com.ccsens.ht.bean.vo.PatientReportVo; +import com.ccsens.ht.uitl.Constant; import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.ht.bean.vo.DoctorVo; import com.ccsens.ht.service.IDoctorService; @@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; +import java.util.List; /** * @program: ptpro @@ -113,4 +116,19 @@ public class DoctorController { } + + @MustLogin + @DoctorAudit + @ApiOperation(value = "查询下属医生信息",notes = "查询下属医生信息") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "查询下属医生信息", required = true) + }) + @RequestMapping(value="/querySubordinate", method = RequestMethod.POST) + public JsonResponse> queryAllSubordinate(@RequestBody @ApiParam @Valid QueryDto params) { + log.info("查询下属信息请求参数:{}", params); + Long userId = params.getUserId(); + List subordinates = doctorService.queryAllSubordinate(userId); + log.info("{}查询下属返回结果:{}", userId, subordinates); + return JsonResponse.newInstance().ok(subordinates); + } } diff --git a/ht/src/main/java/com/ccsens/ht/api/ImportController.java b/ht/src/main/java/com/ccsens/ht/api/ImportController.java index 21dd6f31..4ea407a8 100644 --- a/ht/src/main/java/com/ccsens/ht/api/ImportController.java +++ b/ht/src/main/java/com/ccsens/ht/api/ImportController.java @@ -71,6 +71,57 @@ public class ImportController { } + /** + *@Description: + *@Param: + *@return: com.ccsens.ptpro.util.JsonResponse + *@Author: wuhuijuan + *@date: 2020/5/14 11:21 + */ + @ApiOperation(value = "导入importMoca",notes = "文件大小不能超过20M,支持后缀:.xls|.xlsx") + @ApiImplicitParams({ + @ApiImplicitParam(name = "file", value = "医疗项目表", required = true, paramType = "form",dataType = "__file") + }) + @RequestMapping(value = "/importMoca", method = RequestMethod.POST) + public JsonResponse importMoca(@RequestParam(required = true) Part file) throws Exception{ + + long time1 = System.currentTimeMillis(); + //1.上传文件 + String allowedExts = "xls,xlsx"; + String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator; + String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); + File execlFile = new File(dir+path); + long time2 = System.currentTimeMillis(); + importService.importQuestion(execlFile, Constant.Ht.Report.MOCA); + log.info("导入moca"); + return JsonResponse.newInstance().ok(); + } + + /** + *@Description: + *@Param: + *@return: com.ccsens.ptpro.util.JsonResponse + *@Author: wuhuijuan + *@date: 2020/5/14 11:21 + */ + @ApiOperation(value = "导入importMoca",notes = "文件大小不能超过20M,支持后缀:.xls|.xlsx") + @ApiImplicitParams({ + @ApiImplicitParam(name = "file", value = "医疗项目表", required = true, paramType = "form",dataType = "__file") + }) + @RequestMapping(value = "/importMMSE", method = RequestMethod.POST) + public JsonResponse importMMSE(@RequestParam(required = true) Part file) throws Exception{ + + long time1 = System.currentTimeMillis(); + //1.上传文件 + String allowedExts = "xls,xlsx"; + String dir = WebConstant.UPLOAD_PROJECT_WBS + File.separator; + String path = UploadFileUtil_Servlet3.uploadFile(file, allowedExts, dir); + File execlFile = new File(dir+path); + long time2 = System.currentTimeMillis(); + importService.importQuestion(execlFile, Constant.Ht.Report.MMSE); + log.info("导入mmse"); + return JsonResponse.newInstance().ok(); + } } diff --git a/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java b/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java index 72dcaefb..d0bb3635 100644 --- a/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java +++ b/ht/src/main/java/com/ccsens/ht/api/PatientReportController.java @@ -4,6 +4,8 @@ package com.ccsens.ht.api; import com.ccsens.ht.annotation.DoctorAudit; import com.ccsens.cloudutil.annotation.MustLogin; import com.ccsens.ht.bean.dto.PatientReportDto; +import com.ccsens.ht.bean.po.HtDoctor; +import com.ccsens.ht.uitl.Constant; import com.ccsens.util.bean.dto.QueryDto; import com.ccsens.ht.bean.vo.PatientReportVo; import com.ccsens.ht.service.IPatientReportService; @@ -20,6 +22,7 @@ import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; import java.io.IOException; +import java.util.List; /** * @program: ptpro @@ -169,4 +172,81 @@ public class PatientReportController { return JsonResponse.newInstance().ok(export); } + + @MustLogin + @DoctorAudit + @ApiOperation(value = "查询下属医生的报告单列表",notes = "根据医生ID查询报告单列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "查询下属医生的报告单列表", required = true) + }) + @RequestMapping(value="/querySubordinateReports", method = RequestMethod.POST) + public JsonResponse> querySubordinateReports(@RequestBody @ApiParam @Valid QueryDto param){ + + //编辑报告单信息 + log.info("查询某个医生的报告单列表:{}", param); + HtDoctor doctor = (HtDoctor) param.getOtherMsg().get(Constant.Ht.DOCTOR_PARAM); + PageInfo reportNamePageInfo = patientReportService.queryDoctorReports(param.getParam(), doctor, param.getUserId()); + log.info("查询某个医生的报告单结果:{}", reportNamePageInfo); + return JsonResponse.newInstance().ok(reportNamePageInfo); + } + + @MustLogin + @ApiOperation(value = "管理员查询报告单列表",notes = "管理员查询报告单列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "管理员查询报告单列表", required = true) + }) + @RequestMapping(value="/queryAllReports", method = RequestMethod.POST) + public JsonResponse> queryAllReports(@RequestBody @ApiParam @Valid QueryDto param){ + + //编辑报告单信息 + log.info("管理员查询报告单列表请求参数:{}", param); + HtDoctor doctor = (HtDoctor) param.getOtherMsg().get(Constant.Ht.DOCTOR_PARAM); + PageInfo reportNamePageInfo = patientReportService.queryAllReports(param.getParam(), param.getUserId()); + log.info("管理员查询报告单列表结果:{}", reportNamePageInfo); + return JsonResponse.newInstance().ok(reportNamePageInfo); + } + + + @MustLogin + @ApiOperation(value = "根据临床诊断统计",notes = "根据临床诊断统计") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "根据临床诊断统计", required = true) + }) + @RequestMapping(value="/countByClinicalDiagnosis", method = RequestMethod.POST) + public JsonResponse countByClinicalDiagnosis(@RequestBody @ApiParam @Valid QueryDto param){ + + //编辑报告单信息 + log.info("根据临床诊断统计请求参数:{}", param); + List list = patientReportService.countByClinicalDiagnosis(param.getParam(), param.getUserId()); + log.info("根据临床诊断统计结果:{}", list); + return JsonResponse.newInstance().ok(list); + } + + @MustLogin + @ApiOperation(value = "根据年龄+性别统计",notes = "根据年龄+性别统计") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "根据年龄+性别统计", required = true) + }) + @RequestMapping(value="/countBySexAndAge", method = RequestMethod.POST) + public JsonResponse countBySexAndAge(@RequestBody @ApiParam @Valid QueryDto param){ + log.info("根据临床诊断统计请求参数:{}", param); + List reportNamePageInfo = patientReportService.countBySexAndAge(param.getParam(), param.getUserId()); + log.info("根据临床诊断统计结果:{}", reportNamePageInfo); + return JsonResponse.newInstance().ok(reportNamePageInfo); + } + + @MustLogin + @ApiOperation(value = "根据日期统计",notes = "根据日期统计") + @ApiImplicitParams({ + @ApiImplicitParam(name = "json", value = "根据日期统计", required = true) + }) + @RequestMapping(value="/countByDay", method = RequestMethod.POST) + public JsonResponse countByDay(@RequestBody @ApiParam @Valid QueryDto param){ + log.info("根据临床诊断统计请求参数:{}", param); + List reportNamePageInfo = patientReportService.countByDay(param.getParam(), param.getUserId()); + log.info("根据临床诊断统计结果:{}", reportNamePageInfo); + return JsonResponse.newInstance().ok(reportNamePageInfo); + } + + } diff --git a/ht/src/main/java/com/ccsens/ht/aspect/DoctorAuditAspect.java b/ht/src/main/java/com/ccsens/ht/aspect/DoctorAuditAspect.java index 2516e003..d2316564 100644 --- a/ht/src/main/java/com/ccsens/ht/aspect/DoctorAuditAspect.java +++ b/ht/src/main/java/com/ccsens/ht/aspect/DoctorAuditAspect.java @@ -17,7 +17,9 @@ import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; +import javax.annotation.Resource; import java.util.List; +import java.util.Map; /** * 判断医生是否审核通过 @@ -30,7 +32,7 @@ import java.util.List; @Component public class DoctorAuditAspect { - @Autowired + @Resource private HtDoctorMapper htDoctorMapper; @Pointcut("@annotation(com.ccsens.ht.annotation.DoctorAudit)") @@ -49,6 +51,8 @@ public class DoctorAuditAspect { return JsonResponse.newInstance().ok(CodeEnum.AUDIT_NOT_PASS); } + Map map = dto.getOtherMsg(); + map.put(Constant.Ht.DOCTOR_PARAM, doctors.get(0)); Object result =pjp.proceed(); return result; diff --git a/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java b/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java index 4f0fc819..f81a7952 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java +++ b/ht/src/main/java/com/ccsens/ht/bean/dto/PatientReportDto.java @@ -94,4 +94,69 @@ public class PatientReportDto { @NotNull(message = "病人报告单ID不能为空") private Long id; } + + @ApiModel("医生ID") + @Data + public static class Doctor{ + @ApiModelProperty("医生ID") + @NotNull(message = "医生ID不能为空") + private Long id; + @ApiModelProperty("第几页") + @Min(value = 1) + private int pageNum = 1; + @ApiModelProperty("每页多少条") + @Min(value = 1) + @Max(value=100) + private int pageSize = 10; + } + + + @ApiModel("查询报告单") + @Data + public static class AdminQueryReport { + @ApiModelProperty("病人年龄-开始") + private Byte startAge; + @ApiModelProperty("病人年龄-结束") + private Byte endAge; + @ApiModelProperty("性别") + private Byte patientSex; + @ApiModelProperty("临床诊断") + private String clinicalDiagnosis; + @ApiModelProperty("严重程度") + private Byte pasi; + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + @ApiModelProperty("第几页") + @Min(value = 1) + private int pageNum = 1; + @ApiModelProperty("每页多少条") + @Min(value = 1) + @Max(value=100) + private int pageSize = 10; + } + + @ApiModel("临床诊断统计请求") + @Data + public static class ClinicalDiagnosis{ + + } + + @ApiModel("年龄性别统计请求") + @Data + public static class AgeAndSex{ + + } + + + @ApiModel("日期统计请求") + @Data + public static class Day { + @ApiModelProperty("开始时间") + private Long startTime; + @ApiModelProperty("结束时间") + private Long endTime; + } + } diff --git a/ht/src/main/java/com/ccsens/ht/bean/vo/DoctorVo.java b/ht/src/main/java/com/ccsens/ht/bean/vo/DoctorVo.java index 90e4f236..c2b225e2 100644 --- a/ht/src/main/java/com/ccsens/ht/bean/vo/DoctorVo.java +++ b/ht/src/main/java/com/ccsens/ht/bean/vo/DoctorVo.java @@ -45,6 +45,18 @@ public class DoctorVo { private String department; } + @Data + @ApiModel("下属信息") + public static class Subordinate{ + @ApiModelProperty("id") + private Long id; + @ApiModelProperty("姓名") + private String name; + @ApiModelProperty("职务名称") + private String positionName; + @ApiModelProperty("科室名称") + private String department; + } } 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 2d1fddb7..502a2b2f 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 @@ -61,6 +61,8 @@ public class PatientReportVo { private Byte authority; @ApiModelProperty("报告单文件路径") private String url; + @ApiModelProperty("医生ID") + private Long doctorId; } @ApiModel("PatientReportVoReprotDetail") @@ -423,4 +425,52 @@ public class PatientReportVo { @ApiModelProperty("路径") private String path; } + + @ApiModel("临床诊断统计") + @Data + public static class ClinicalDiagnosis{ + @ApiModelProperty("临床诊断类型") + private String diagnosis; + @ApiModelProperty("对应人数") + private Integer count; + } + + @ApiModel("年龄性别统计") + @Data + public static class AgeAndSex{ + @ApiModelProperty("年龄段") + private Byte ageLevel; + @ApiModelProperty("性别") + 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; + } + } + + @ApiModel("年龄+性别统计") + @Data + public static class AgeAndSexGroup { + @ApiModelProperty("年龄段") + private String ageLevel; + @ApiModelProperty("男") + private AgeAndSex man; + @ApiModelProperty("女") + private AgeAndSex woman; + + } + + @ApiModel("日期统计") + @Data + public static class Day { + @ApiModelProperty("日期") + private String dateDay; + @ApiModelProperty("统计") + private Integer count; + + } } diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtDoctorDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtDoctorDao.java new file mode 100644 index 00000000..747f04b5 --- /dev/null +++ b/ht/src/main/java/com/ccsens/ht/persist/dao/HtDoctorDao.java @@ -0,0 +1,21 @@ +package com.ccsens.ht.persist.dao; + +import com.ccsens.ht.bean.vo.DoctorVo; +import com.ccsens.ht.persist.mapper.HtDoctorMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 医生信息 + * @author whj + */ +public interface HtDoctorDao extends HtDoctorMapper { + + /** + * 查询所有的下属信息 + * @param positionId + * @return + */ + List queryAllSubordinate(@Param("positionId") Long positionId); +} diff --git a/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java b/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java index 0e3272ae..14a4557d 100644 --- a/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java +++ b/ht/src/main/java/com/ccsens/ht/persist/dao/HtPatientReportDao.java @@ -1,5 +1,6 @@ package com.ccsens.ht.persist.dao; +import com.ccsens.ht.bean.dto.PatientReportDto; import com.ccsens.ht.bean.vo.PatientReportVo; import com.ccsens.ht.persist.mapper.HtPatientReportMapper; import org.apache.ibatis.annotations.Param; @@ -50,4 +51,40 @@ public interface HtPatientReportDao extends HtPatientReportMapper { * @param userId */ void ignoreComplete(@Param("id") Long id, @Param("userId") Long userId); + + /** + * 查询报告单名字(ID,名字,导出路径) + * @param doctorId 医生ID + * @param patientId 病人ID + * @return + */ + List queryReportName(@Param("doctorId")Long doctorId, @Param("patientId") Long patientId); + + /** + * 管理员查询报告单 + * @param adminQueryReport + * @return + */ + List queryAllReports(PatientReportDto.AdminQueryReport adminQueryReport); + + /** + * 根据临床诊断统计 + * @param param + * @return + */ + List countByClinicalDiagnosis(PatientReportDto.ClinicalDiagnosis param); + + /** + * 根据年龄性别统计 + * @param param + * @return + */ + List countBySexAndAge(PatientReportDto.AgeAndSex param); + + /** + * 根据日期统计 + * @param param + * @return + */ + List countByDay(PatientReportDto.Day param); } diff --git a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java index e05e5c02..80bee686 100644 --- a/ht/src/main/java/com/ccsens/ht/service/DoctorService.java +++ b/ht/src/main/java/com/ccsens/ht/service/DoctorService.java @@ -10,23 +10,21 @@ import com.ccsens.ht.bean.dto.DoctorDto; import com.ccsens.ht.bean.po.*; import com.ccsens.ht.bean.vo.DoctorVo; import com.ccsens.ht.persist.dao.HtDoctorAuditDao; +import com.ccsens.ht.persist.dao.HtDoctorDao; import com.ccsens.ht.persist.dao.HtPositionDao; import com.ccsens.ht.persist.dao.HtTitleDao; -import com.ccsens.ht.persist.mapper.HtDoctorMapper; import com.ccsens.ht.uitl.Constant; import com.ccsens.util.*; 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.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; import java.util.ArrayList; @@ -47,7 +45,7 @@ public class DoctorService implements IDoctorService { @Autowired private Snowflake snowflake; @Resource - private HtDoctorMapper htDoctorMapper; + private HtDoctorDao htDoctorDao; @Resource private HtPositionDao htPositionDao; @Resource @@ -66,7 +64,7 @@ public class DoctorService implements IDoctorService { log.info("提交资格认证:{}", submit); HtDoctorExample example = new HtDoctorExample(); example.createCriteria().andUserIdEqualTo(userId); - List htDoctors = htDoctorMapper.selectByExample(example); + List htDoctors = htDoctorDao.selectByExample(example); HtDoctor oldDoctor = null; for (HtDoctor doctor: htDoctors) { // 已经审核通过,无需重复审核 @@ -98,14 +96,14 @@ public class DoctorService implements IDoctorService { htDoctor.setId(oldDoctor.getId()); htDoctor.setAuditorId((long)Constant.Ht.NUMBER_DEFAULT); htDoctor.setAuditState(Constant.Ht.Doctor.CHECK_WAIT); - htDoctorMapper.updateByPrimaryKeySelective(htDoctor); + htDoctorDao.updateByPrimaryKeySelective(htDoctor); } else { htDoctor.setId(snowflake.nextId()); htDoctor.setCreateTime(new Date()); htDoctor.setUserId(userId); htDoctor.setAuditorId((long)Constant.Ht.NUMBER_DEFAULT); htDoctor.setAuditState(Constant.Ht.Doctor.CHECK_WAIT); - htDoctorMapper.insertSelective(htDoctor); + htDoctorDao.insertSelective(htDoctor); } @@ -129,7 +127,7 @@ public class DoctorService implements IDoctorService { HtDoctorExample example = new HtDoctorExample(); example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); - List htDoctors = htDoctorMapper.selectByExample(example); + List htDoctors = htDoctorDao.selectByExample(example); if (CollectionUtils.isEmpty(htDoctors)) { log.info("用户:{}尚未审核通过", userId); return new PageInfo<>(); @@ -162,14 +160,14 @@ public class DoctorService implements IDoctorService { //审核用户 HtDoctorExample example = new HtDoctorExample(); example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); - List htDoctors = htDoctorMapper.selectByExample(example); + List htDoctors = htDoctorDao.selectByExample(example); if (CollectionUtils.isEmpty(htDoctors)) { log.info("用户:{}尚未审核通过", userId); return CodeEnum.AUDIT_NOT_PASS; } Long auditDoctorId = htDoctors.get(0).getId(); //待审核用户 - HtDoctor waitDoctor = htDoctorMapper.selectByPrimaryKey(audit.getDoctorId()); + HtDoctor waitDoctor = htDoctorDao.selectByPrimaryKey(audit.getDoctorId()); log.info("待审核医生信息:{}", waitDoctor); if (waitDoctor == null) { return CodeEnum.PARAM_ERROR; @@ -223,7 +221,7 @@ public class DoctorService implements IDoctorService { eidtDoctor.setAuditState(audit.getAuditState()); eidtDoctor.setAuditorId(auditDoctorId); eidtDoctor.setId(audit.getDoctorId()); - htDoctorMapper.updateByPrimaryKeySelective(eidtDoctor); + htDoctorDao.updateByPrimaryKeySelective(eidtDoctor); return CodeEnum.SUCCESS; } @@ -256,7 +254,7 @@ public class DoctorService implements IDoctorService { HtDoctorExample example1 = new HtDoctorExample(); example1.createCriteria().andPositionIdEqualTo(map.getLong("id")).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); //查找上级职务对应的医生 - List superiors = htDoctorMapper.selectByExample(example1); + List superiors = htDoctorDao.selectByExample(example1); if(CollectionUtils.isEmpty(superiors)) { return; } @@ -278,20 +276,13 @@ public class DoctorService implements IDoctorService { @Override public List selectByExample(HtDoctorExample doctorExample) { - return htDoctorMapper.selectByExample(doctorExample); + return htDoctorDao.selectByExample(doctorExample); } @Override public String getShareUrl(Long userId) throws Exception { - HtDoctorExample example = new HtDoctorExample(); - example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); - List htDoctors = htDoctorMapper.selectByExample(example); - if (CollectionUtil.isEmpty(htDoctors)) { - log.info("没有找到{}对应的医生信息", userId); - throw new BaseException(CodeEnum.PARAM_ERROR); - } - HtDoctor doctor = htDoctors.get(0); + HtDoctor doctor = getHtDoctor(userId); if (StrUtil.isNotBlank(doctor.getSharePatientEdit())) { return doctor.getSharePatientEdit(); } @@ -306,9 +297,27 @@ public class DoctorService implements IDoctorService { } + private HtDoctor getHtDoctor(Long userId) { + HtDoctorExample example = new HtDoctorExample(); + example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); + List htDoctors = htDoctorDao.selectByExample(example); + if (CollectionUtil.isEmpty(htDoctors)) { + log.info("没有找到{}对应的医生信息", userId); + throw new BaseException(CodeEnum.PARAM_ERROR); + } + return htDoctors.get(0); + } + @Override public DoctorVo.Query queryDoctorStatus(Long userId) { DoctorVo.Query query = htDoctorAuditDao.queryDoctorStatus(userId); return query; } + + + @Override + public List queryAllSubordinate(Long userId) { + HtDoctor doctor = getHtDoctor(userId); + return htDoctorDao.queryAllSubordinate(doctor.getPositionId()); + } } diff --git a/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java b/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java index 6faaf09c..e684e14a 100644 --- a/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java +++ b/ht/src/main/java/com/ccsens/ht/service/IDoctorService.java @@ -7,6 +7,7 @@ import com.ccsens.ht.bean.vo.DoctorVo; import com.ccsens.util.CodeEnum; import com.ccsens.util.JsonResponse; import com.github.pagehelper.PageInfo; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -65,4 +66,12 @@ public interface IDoctorService { * @return */ String getShareUrl(Long userId) throws Exception; + + + /** + * 查询所有的下属信息 + * @param userId + * @return + */ + List queryAllSubordinate(Long userId); } diff --git a/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java b/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java index 45ec9d11..6fc1d3b3 100644 --- a/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/IPatientReportService.java @@ -1,12 +1,14 @@ package com.ccsens.ht.service; import com.ccsens.ht.bean.dto.PatientReportDto; +import com.ccsens.ht.bean.po.HtDoctor; import com.ccsens.ht.bean.vo.PatientReportVo; import com.ccsens.util.CodeEnum; import com.ccsens.util.JsonResponse; import com.github.pagehelper.PageInfo; import java.io.IOException; +import java.util.List; public interface IPatientReportService { @@ -89,4 +91,45 @@ public interface IPatientReportService { * @return */ void ignoreComplete(PatientReportDto.Ignore ignore, Long userId); + + /** + * 查询某个医生的报告单列表 + * @param param + * @param doctor + * @param userId + * @return + */ + PageInfo queryDoctorReports(PatientReportDto.Doctor param, HtDoctor doctor, Long userId); + + /** + * 管理员查询报告单列表 + * @param param + * @param userId + * @return + */ + PageInfo queryAllReports(PatientReportDto.AdminQueryReport param, Long userId); + + /** + * 根据临床诊断统计 + * @param param + * @param userId + * @return + */ + List countByClinicalDiagnosis(PatientReportDto.ClinicalDiagnosis param, Long userId); + + /** + * 根据性别年龄统计 + * @param param + * @param userId + * @return + */ + List countBySexAndAge(PatientReportDto.AgeAndSex param, Long userId); + + /** + * 根据日期统计 + * @param param + * @param userId + * @return + */ + List countByDay(PatientReportDto.Day param, Long userId); } 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 d4d6005c..0643780c 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientReportService.java @@ -8,6 +8,7 @@ import cn.hutool.core.util.StrUtil; import com.ccsens.ht.bean.dto.PatientReportDto; import com.ccsens.ht.bean.po.*; 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; @@ -48,7 +49,7 @@ public class PatientReportService implements IPatientReportService { @Autowired private Snowflake snowflake; @Resource - private HtDoctorMapper htDoctorMapper; + private HtDoctorDao htDoctorDao; @Resource private HtPatientReportDao htPatientReportDao; @Resource @@ -66,7 +67,7 @@ public class PatientReportService implements IPatientReportService { //查询医生信息 HtDoctorExample doctorExample = new HtDoctorExample(); doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT); - List doctors = htDoctorMapper.selectByExample(doctorExample); + List doctors = htDoctorDao.selectByExample(doctorExample); if (CollectionUtils.isEmpty(doctors)) { log.info("根据userId未找到审核通过的医生信息:{}", userId); return JsonResponse.newInstance().ok(CodeEnum.PARAM_ERROR); @@ -109,7 +110,7 @@ public class PatientReportService implements IPatientReportService { //查询修改医生信息 HtDoctorExample example = new HtDoctorExample(); example.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS); - List doctors = htDoctorMapper.selectByExample(example); + List doctors = htDoctorDao.selectByExample(example); if (CollectionUtils.isEmpty(doctors)) { log.info("{}医生信息尚未审核通过"); return CodeEnum.AUDIT_NOT_PASS; @@ -117,7 +118,7 @@ public class PatientReportService implements IPatientReportService { HtDoctor doctor = doctors.get(0); //判断该报告单是否为该医生的 - HtDoctor reportDoctor = htDoctorMapper.selectByPrimaryKey(htPatientReport.getDoctorId()); + HtDoctor reportDoctor = htDoctorDao.selectByPrimaryKey(htPatientReport.getDoctorId()); // 上级医生和报告单医生允许修改 List lowerPositionIds = htPositionDao.queryAllLowerPosition(doctor.getPositionId()); if (!doctor.getId().equals(reportDoctor.getId()) && !lowerPositionIds.contains(reportDoctor.getPositionId())) { @@ -160,68 +161,53 @@ public class PatientReportService implements IPatientReportService { @Override public PageInfo queryReports(PatientReportDto.QueryReports query, Long userId) { - List reportVos = new ArrayList<>(); - //分页查询报告单列表 - PageHelper.startPage(query.getPageNum(), query.getPageSize()); - HtPatientReportExample reportExample = new HtPatientReportExample(); + //查询医生信息 HtDoctorExample doctorExample = new HtDoctorExample(); doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT); - List doctors = htDoctorMapper.selectByExample(doctorExample); + List doctors = htDoctorDao.selectByExample(doctorExample); log.info("当前用户是否为医生:{}", CollectionUtil.isNotEmpty(doctors)); + // 获取医生ID和病人ID + Long patientId = null; + Long doctorId = null; if (query.getPatientId() != null) { - reportExample.createCriteria().andPatientIdEqualTo(query.getPatientId()).andShowStatusEqualTo(Constant.Ht.Report.SHOW_HISTORY); - //.andInitialImpressionIsNotNull().andInitialImpressionNotEqualTo(""); + patientId = query.getPatientId(); } else if (CollectionUtil.isNotEmpty(doctors)) { - reportExample.createCriteria().andDoctorIdEqualTo(doctors.get(0).getId()).andShowStatusEqualTo(Constant.Ht.Report.SHOW_HISTORY); - //.andInitialImpressionIsNotNull().andInitialImpressionNotEqualTo(""); + doctorId = doctors.get(0).getId(); } else { log.info("既无病人信息,有无医生信息,不允许查询"); throw new BaseException(CodeEnum.PARAM_ERROR); } - - reportExample.setOrderByClause("create_time desc"); - List reports = htPatientReportDao.selectByExample(reportExample); - - if (CollectionUtils.isEmpty(reports)) { + //分页查询报告单列表 + PageHelper.startPage(query.getPageNum(), query.getPageSize()); + List reportVos = htPatientReportDao.queryReportName(doctorId, patientId); + if (CollectionUtils.isEmpty(reportVos)) { return new PageInfo<>(reportVos); } if (CollectionUtil.isEmpty(doctors)) { - reports.forEach(report -> { - PatientReportVo.ReportName name = new PatientReportVo.ReportName(); - name.setId(report.getId()); - name.setName(report.getName()); - name.setUrl(report.getUrl()); - name.setAuthority((byte)0); - reportVos.add(name); - }); return new PageInfo<>(reportVos); } HtDoctor doctor = doctors.get(0); //查询下属职务 List lowerPositionIds = htPositionDao.queryAllLowerPosition(doctor.getPositionId()); - reports.forEach(report -> { - PatientReportVo.ReportName name = new PatientReportVo.ReportName(); - name.setId(report.getId()); - name.setName(report.getName()); - name.setUrl(report.getUrl()); + reportVos.forEach(reportVo -> { + //自己的可见详情 - if (doctor.getId().equals(report.getDoctorId())) { - name.setAuthority((byte)1); + if (doctor.getId().equals(reportVo.getDoctorId())) { + reportVo.setAuthority((byte)1); } else if (CollectionUtils.isEmpty(lowerPositionIds)) { - name.setAuthority((byte)0); + reportVo.setAuthority((byte)0); } else { - HtDoctor reportDoctor = htDoctorMapper.selectByPrimaryKey(report.getDoctorId()); + HtDoctor reportDoctor = htDoctorDao.selectByPrimaryKey(reportVo.getDoctorId()); //自己下属的可见详情 if (lowerPositionIds.contains(reportDoctor.getPositionId())) { - name.setAuthority((byte)1); + reportVo.setAuthority((byte)1); } else { - name.setAuthority((byte)0); + reportVo.setAuthority((byte)0); } } - reportVos.add(name); }); return new PageInfo<>(reportVos); } @@ -298,7 +284,7 @@ public class PatientReportService implements IPatientReportService { //查询医生信息 HtDoctorExample doctorExample = new HtDoctorExample(); doctorExample.createCriteria().andUserIdEqualTo(userId).andAuditStateEqualTo(Constant.Ht.Doctor.CHECK_SUCCESS).andIsDelEqualTo(Constant.Ht.NUMBER_DEFAULT); - List doctors = htDoctorMapper.selectByExample(doctorExample); + List doctors = htDoctorDao.selectByExample(doctorExample); if (CollectionUtils.isEmpty(doctors)) { authorityVo.setAuthority(PatientReportVo.Authority.OLAY_READ); return authorityVo; @@ -316,7 +302,7 @@ public class PatientReportService implements IPatientReportService { return authorityVo; } //查询报告单关联医生职位 - HtDoctor doctor1 = htDoctorMapper.selectByPrimaryKey(htPatientReport.getDoctorId()); + HtDoctor doctor1 = htDoctorDao.selectByPrimaryKey(htPatientReport.getDoctorId()); if (lowerPositionIds.contains(doctor1.getPositionId())) { authorityVo.setAuthority(PatientReportVo.Authority.CHECK); } else { @@ -389,6 +375,7 @@ public class PatientReportService implements IPatientReportService { PdfUtil.Cell initImplCell = addCell(row, detail.getPatient().getInitialImpression(), 6, 2); initImplCell.setHeight(PdfUtil.Cell.defaultHeight * 2); initImplCell.setBorderRight(1); + initImplCell.setCenter(false); content.add(row); PdfUtil.Row row2 = new PdfUtil.Row(); PdfUtil.Cell doctorCell = addCell(row2, "测评员:", 4, 1, 0); @@ -454,4 +441,118 @@ public class PatientReportService implements IPatientReportService { log.info("修改报告单二维码路径"); return qrCodeUrl; } + + @Override + public PageInfo queryDoctorReports(PatientReportDto.Doctor param, HtDoctor doctor, Long userId) { + //判断被查询医生是否为下属 + //查询下属职务 + List lowerPositionIds = htPositionDao.queryAllLowerPosition(doctor.getPositionId()); + log.info("下属职务:{}", lowerPositionIds); + if (CollectionUtils.isEmpty(lowerPositionIds)) { + throw new BaseException(CodeEnum.AUTHORITY_ERROR); + } + HtDoctor queryDoctor = htDoctorDao.selectByPrimaryKey(param.getId()); + log.info("被查询医生信息:{}", queryDoctor); + if (queryDoctor == null){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + if (!lowerPositionIds.contains(queryDoctor.getPositionId())) { + log.info("被查询医生不是当前医生的下属"); + throw new BaseException(CodeEnum.AUTHORITY_ERROR); + } + // 查询该医生报告单 + PageHelper.startPage(param.getPageNum(), param.getPageSize()); + HtPatientReportExample reportExample = new HtPatientReportExample(); + reportExample.createCriteria().andDoctorIdEqualTo(param.getId()).andShowStatusEqualTo(Constant.Ht.Report.SHOW_HISTORY); + reportExample.setOrderByClause("create_time desc"); + List reports = htPatientReportDao.queryReportName(param.getId(), null); + if (CollectionUtils.isEmpty(reports)) { + log.info("未查询到报告单"); + return new PageInfo<>(reports); + } + reports.forEach(report -> { + report.setAuthority((byte)1); + }); + return new PageInfo<>(reports); + } + + @Override + public PageInfo queryAllReports(PatientReportDto.AdminQueryReport adminQueryReport, Long userId) { + PageHelper.startPage(adminQueryReport.getPageNum(), adminQueryReport.getPageSize()); + List reportNames = htPatientReportDao.queryAllReports(adminQueryReport); + return new PageInfo<>(reportNames); + } + + + @Override + public List countByClinicalDiagnosis(PatientReportDto.ClinicalDiagnosis param, Long userId) { + return htPatientReportDao.countByClinicalDiagnosis(param); + } + + @Override + public List countBySexAndAge(PatientReportDto.AgeAndSex param, Long userId) { + List list = htPatientReportDao.countBySexAndAge(param); + List groups = new ArrayList<>(); + List ages = new ArrayList<>(); + list.forEach(ageAndSex -> { + if (ages.isEmpty()) { + // 添加空白行 + byte ageLevel = ageAndSex.getAgeLevel(); + if (ageAndSex.getAgeLevel() > 0) { + fillBlankRow(groups, ageLevel, 0); + } + PatientReportVo.AgeAndSexGroup group = new PatientReportVo.AgeAndSexGroup(); + group.setAgeLevel(ageLevel + "-" + (ageLevel + 10)); + fillBySex(ageAndSex, group); + ages.add(ageAndSex.getAgeLevel()); + groups.add(group); + return; + } + byte prevAge = ages.get(ages.size() - 1); + PatientReportVo.AgeAndSexGroup prevGroup = groups.get(groups.size()-1); + byte nowAge = ageAndSex.getAgeLevel().byteValue(); + if (prevAge == nowAge) { + fillBySex(ageAndSex, prevGroup); + } else { + // 判断和上一个年龄相比,是否有空白段 + if (nowAge - prevAge > 10) { + fillBlankRow(groups, nowAge, prevAge + 10); + } + //添加新的 + PatientReportVo.AgeAndSexGroup group = new PatientReportVo.AgeAndSexGroup(); + group.setAgeLevel(nowAge + "-" + (nowAge + 10)); + fillBySex(ageAndSex, group); + + ages.add(ageAndSex.getAgeLevel()); + groups.add(group); + } + + }); + return groups; + } + + private void fillBlankRow(List groups, byte nowAge, int prevAge) { + int level = 10; + for (int i = prevAge; i < nowAge; i += level) { + PatientReportVo.AgeAndSexGroup group = new PatientReportVo.AgeAndSexGroup(); + group.setAgeLevel(i + "-" + (i + 10)); + groups.add(group); + } + } + + private void fillBySex(PatientReportVo.AgeAndSex ageAndSex, PatientReportVo.AgeAndSexGroup group) { + if (ageAndSex.getAgeLevel() == null) { + log.info("性别不确定"); + return; + } else if (ageAndSex.getAgeLevel().byteValue() == Constant.Ht.SEX_MAN) { + group.setMan(ageAndSex); + } else { + group.setWoman(ageAndSex); + } + } + + @Override + public List countByDay(PatientReportDto.Day param, Long userId) { + return htPatientReportDao.countByDay(param); + } } 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 1dd36425..c2cc002a 100644 --- a/ht/src/main/java/com/ccsens/ht/service/PatientService.java +++ b/ht/src/main/java/com/ccsens/ht/service/PatientService.java @@ -179,10 +179,12 @@ public class PatientService implements IPatientService { throw new BaseException(CodeEnum.RECORDER_NOT); } patient.setId(oldPatient.getId()); + patient.setIsDel(Constant.Ht.NUMBER_DEFAULT); htPatientMapper.updateByPrimaryKey(patient); } else { patient.setId(snowflake.nextId()); patient.setRecorder(userId); + patient.setIsDel(Constant.Ht.NUMBER_DEFAULT); htPatientMapper.insert(patient); } return patient.getId(); diff --git a/ht/src/main/java/com/ccsens/ht/uitl/Constant.java b/ht/src/main/java/com/ccsens/ht/uitl/Constant.java index 2d6e8267..664229b8 100644 --- a/ht/src/main/java/com/ccsens/ht/uitl/Constant.java +++ b/ht/src/main/java/com/ccsens/ht/uitl/Constant.java @@ -39,6 +39,11 @@ public class Constant { public final static byte NUMBER_DEFAULT = 0; /**字符串默认值*/ public final static String STRING_DEFAULT = ""; + 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 { diff --git a/ht/src/main/resources/application-test.yml b/ht/src/main/resources/application-test.yml index b97c2755..90f52e9c 100644 --- a/ht/src/main/resources/application-test.yml +++ b/ht/src/main/resources/application-test.yml @@ -8,7 +8,7 @@ spring: datasource: type: com.alibaba.druid.pool.DruidDataSource rabbitmq: - host: api.ccsens.com + host: 127.0.0.1 password: 111111 port: 5672 username: admin @@ -39,4 +39,4 @@ ht: name: 认知功能评测云平台系统 eureka: instance: - ip-address: 49.233.89.188 \ No newline at end of file + ip-address: 192.168.0.99 \ No newline at end of file diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index d082c0ea..5889ff7f 100644 --- a/ht/src/main/resources/application.yml +++ b/ht/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod \ No newline at end of file + active: test + include: common, util-test \ No newline at end of file diff --git a/ht/src/main/resources/druid-test.yml b/ht/src/main/resources/druid-test.yml index f3fe04c5..9c1f658d 100644 --- a/ht/src/main/resources/druid-test.yml +++ b/ht/src/main/resources/druid-test.yml @@ -15,7 +15,7 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 - password: + password: b3fd300ad4694070007fdcca961c4018211dc53235dd806ad62abc0cc0abb8e5 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -27,7 +27,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://127.0.0.1/ht?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://49.233.89.188/ht?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_HT \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtDoctorDao.xml b/ht/src/main/resources/mapper_dao/HtDoctorDao.xml new file mode 100644 index 00000000..3984c9fd --- /dev/null +++ b/ht/src/main/resources/mapper_dao/HtDoctorDao.xml @@ -0,0 +1,20 @@ + + + + + + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml b/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml index ae52767f..c330ea60 100644 --- a/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml +++ b/ht/src/main/resources/mapper_dao/HtPatientReportDao.xml @@ -78,6 +78,69 @@ where id = #{id, jdbcType=BIGINT} and complete_status = 0 and is_del = 0 and doctor_id in (select doctor_id from t_ht_doctor where user_id = #{userId, jdbcType=BIGINT} and audit_state = 1 and is_del = 0) + + + + + \ No newline at end of file diff --git a/ht/src/main/resources/mapper_dao/HtPositionDao.xml b/ht/src/main/resources/mapper_dao/HtPositionDao.xml index 101106ce..9423005f 100644 --- a/ht/src/main/resources/mapper_dao/HtPositionDao.xml +++ b/ht/src/main/resources/mapper_dao/HtPositionDao.xml @@ -53,7 +53,7 @@