From 3c7937600d5dcb9b10d32b9a279c1521991e79ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=9F=B3=E5=AE=87?= <178508542@qq.com> Date: Tue, 18 Jan 2022 15:37:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=82=A3=E8=80=85=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E5=90=8E=EF=BC=8C=E6=89=8B=E6=9C=BA=E5=8F=B7=E7=A0=81?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=9B=E5=85=A8?= =?UTF-8?q?=E7=A7=91=E5=AF=BC=E8=AF=8A=E6=8E=A5=E5=8F=A3=E5=BC=80=E5=8F=91?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../stc/sict/cloud/common/security/util/SecurityUtils.java | 1 + .../hpgp/controller/mobile/HpGpIntelligentQAController.java | 2 +- .../controller/mobile/HpgpBusyIdlePredictionController.java | 4 +++- .../service/impl/HpgpBusyIdlePredictionServiceImpl.java | 2 ++ .../sict/theme/hphy/controller/mp/HpDeptInfoController.java | 2 ++ .../hphy/controller/mp/HpHyIntelligentQAController.java | 2 +- .../theme/hphy/controller/mp/HphyPatientBaseController.java | 3 --- .../sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java | 6 +++++- .../java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java | 2 ++ .../main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml | 2 +- 10 files changed, 18 insertions(+), 8 deletions(-) diff --git a/cloud-common/cloud-common-security/src/main/java/cn/sh/stc/sict/cloud/common/security/util/SecurityUtils.java b/cloud-common/cloud-common-security/src/main/java/cn/sh/stc/sict/cloud/common/security/util/SecurityUtils.java index 5339c2b..e1850c6 100644 --- a/cloud-common/cloud-common-security/src/main/java/cn/sh/stc/sict/cloud/common/security/util/SecurityUtils.java +++ b/cloud-common/cloud-common-security/src/main/java/cn/sh/stc/sict/cloud/common/security/util/SecurityUtils.java @@ -178,6 +178,7 @@ public class SecurityUtils { current.setName(StrUtil.isBlank(user.getName()) ? user.getUsername() : user.getName()); current.setOpenId(user.getOpenId()); current.setAppId(user.getAppId()); + current.setPhone(user.getPhone()); } current.setToken(token); return current; diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java index 5996d2f..26b475a 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpGpIntelligentQAController.java @@ -38,7 +38,7 @@ public class HpGpIntelligentQAController { String from = StrUtil.isNotBlank(current.getOpenId()) ? current.getOpenId() : current.getId().toString(); String xml = "\n" + - " \n" + + " \n" + " \n" + " " + DateUtil.now() + "\n" + " \n" + diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java index c968cb3..e331af2 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/controller/mobile/HpgpBusyIdlePredictionController.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.api.ApiController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -27,7 +28,8 @@ public class HpgpBusyIdlePredictionController extends ApiController { */ private final HpgpBusyIdlePredictionService hpgpBusyIdlePredictionService; - public R busyIdlePrediction(@ApiParam("标准") @RequestParam("deptName") String deptName){ + @GetMapping + public R busyIdlePrediction(@ApiParam("标准科室名称") @RequestParam("deptName") String deptName){ return new R<>().success(hpgpBusyIdlePredictionService.busyIdlePrediction(deptName)); } diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java index 5953ca0..d300115 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hpgp/service/impl/HpgpBusyIdlePredictionServiceImpl.java @@ -42,6 +42,8 @@ public class HpgpBusyIdlePredictionServiceImpl extends ServiceImpl() .in(HpgpBusyIdlePrediction::getHospitalCode, hospitalCodes) .in(HpgpBusyIdlePrediction::getDeptCode, deptCodes) + .gt(HpgpBusyIdlePrediction::getPredictionDate, "") + .le(HpgpBusyIdlePrediction::getPredictionDate, "") ); } } diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java index 96851c4..ee3f9e9 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpDeptInfoController.java @@ -8,6 +8,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.AllArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; @@ -29,6 +30,7 @@ public class HpDeptInfoController extends ApiController { private final HpDeptInfoService hpDeptInfoService; @ApiOperation("科室医生查询接口") + @GetMapping public R getDeptDoctors(@ApiParam("医院代码") @RequestParam("hospitalCode") String hospitalCode, @ApiParam("科室代码") @RequestParam("deptCode") String deptCode){ return new R<>(hpDeptInfoService.getDeptDoctors(hospitalCode, deptCode)); diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java index 5120252..d83fef0 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HpHyIntelligentQAController.java @@ -23,7 +23,7 @@ import java.util.Map; @RestController @AllArgsConstructor @Api(tags = "[C]黄浦高血压专病导医——智能问答") -@RequestMapping("/hphy/c/intelligent/qa") +@RequestMapping("/c/intelligent/qa") public class HpHyIntelligentQAController { private final static String CONTENT = "Content"; diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java index 645ab6c..450bd2c 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/controller/mp/HphyPatientBaseController.java @@ -48,9 +48,6 @@ public class HphyPatientBaseController { CurrentUser current = SecurityUtils.getCurrentUser(); HphyPatientBase base = hphyPatientBaseService.getByOpenId(current.getOpenId()); patient.setOpenId(current.getOpenId()); -// if(!ValidateCodeUtil.validateCode(redisTemplate, patient.getPhone(), patient.getRandomCode(), Constant.BYTE_YES)){ -// return new R().error("验证码错误!"); -// } if (base != null) { patient.setId(base.getId()); diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java index ac1c0f5..ca6b770 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/service/impl/HpDeptInfoServiceImpl.java @@ -3,8 +3,10 @@ package cn.sh.stc.sict.theme.hphy.service.impl; import cn.sh.stc.sict.theme.hphy.constant.DataConstant; import cn.sh.stc.sict.theme.hphy.dao.HpDeptInfoMapper; import cn.sh.stc.sict.theme.hphy.dao.HpDocInfoMapper; +import cn.sh.stc.sict.theme.hphy.dao.HpHosInfoMapper; import cn.sh.stc.sict.theme.hphy.model.HpDeptInfo; import cn.sh.stc.sict.theme.hphy.model.HpDocInfo; +import cn.sh.stc.sict.theme.hphy.model.HpHosInfo; import cn.sh.stc.sict.theme.hphy.service.HpDeptInfoService; import cn.sh.stc.sict.theme.hphy.vo.DeptDoctorsVO; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @@ -26,9 +28,11 @@ import java.util.List; @Service("hpDeptInfoService") public class HpDeptInfoServiceImpl extends ServiceImpl implements HpDeptInfoService { private final HpDocInfoMapper hpDocInfoMapper; + private final HpHosInfoMapper hpHosInfoMapper; @Override public DeptDoctorsVO getDeptDoctors(String hospitalCode, String deptCode) { + HpHosInfo hosInfo = hpHosInfoMapper.selectById(hospitalCode); // 查询科室信息 // 查询医生信息 HpDeptInfo deptInfo = this.getOne( @@ -53,6 +57,6 @@ public class HpDeptInfoServiceImpl extends ServiceImpl doctors = hpDocInfoMapper.selectList(docWrapper); - return new DeptDoctorsVO(deptInfo, doctors); + return new DeptDoctorsVO(hosInfo, deptInfo, doctors); } } diff --git a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java index 546ee09..8276fe5 100644 --- a/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java +++ b/smart-health-modules/theme-schema/src/main/java/cn/sh/stc/sict/theme/hphy/vo/DeptDoctorsVO.java @@ -2,6 +2,7 @@ package cn.sh.stc.sict.theme.hphy.vo; import cn.sh.stc.sict.theme.hphy.model.HpDeptInfo; import cn.sh.stc.sict.theme.hphy.model.HpDocInfo; +import cn.sh.stc.sict.theme.hphy.model.HpHosInfo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -17,6 +18,7 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor public class DeptDoctorsVO { + private HpHosInfo hosInfo; private HpDeptInfo deptInfo; private List doctors; } diff --git a/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml index 822165c..c821770 100644 --- a/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml +++ b/smart-health-modules/theme-schema/src/main/resources/mapper/hpgp/HpgpDepartmentRankMapper.xml @@ -13,7 +13,7 @@ standard_dept , hospital_code, hospital_name, dept_code, dept_name, rank_score - select from hpgp_department_rank where standard_dept = #{deptName} order by rank_score asc limit #{size} -- 2.22.0