From cdbf4e20345cd968c045f373ff1613b6ee730cc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com>
Date: Fri, 13 Oct 2023 16:49:14 +0800
Subject: [PATCH 01/14] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=A4=B4?=
=?UTF-8?q?=E5=83=8F=E4=B8=8A=E4=BC=A0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../uploadfile/UploadFileController.java | 69 ++++++++++++++++++
.../uploadfile/IUploadFileService.java | 32 +++++++++
.../Impl/UploadFileServiceImpl.java | 70 +++++++++++++++++++
3 files changed, 171 insertions(+)
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/uploadfile/UploadFileController.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/IUploadFileService.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/Impl/UploadFileServiceImpl.java
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/uploadfile/UploadFileController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/uploadfile/UploadFileController.java
new file mode 100644
index 0000000..365f9d6
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/uploadfile/UploadFileController.java
@@ -0,0 +1,69 @@
+package com.xinelu.applet.controller.uploadfile;
+
+import com.xinelu.applet.service.uploadfile.IUploadFileService;
+import com.xinelu.common.constant.Constants;
+import com.xinelu.common.core.domain.AjaxResult;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+import java.util.Objects;
+
+/**
+ * @author ljh
+ * @version 1.0
+ * Create by 2022/11/2 10:38
+ */
+@RestController
+@RequestMapping("/nurseApplet/uploadFile")
+public class UploadFileController {
+
+ @Resource
+ private IUploadFileService uploadFileService;
+
+ /**
+ * 会员App头像图片上传
+ *
+ * @param patientId 会员主键id
+ * @param multipartFile 文件
+ * @return 结果
+ */
+ @PostMapping("/uploadHeadPictureUrl")
+ public AjaxResult uploadHeadPictureUrl(@RequestParam("file") MultipartFile multipartFile, @RequestParam(value = "patientId") Long patientId) throws Exception {
+ if (Objects.isNull(patientId)) {
+ return AjaxResult.error("会员头像信息不能为空!");
+ }
+ if (Objects.isNull(multipartFile) || StringUtils.isBlank(multipartFile.getOriginalFilename())) {
+ return AjaxResult.error("当前文件视频不存在,无法上传!");
+ }
+ if (multipartFile.getOriginalFilename().contains(Constants.EMPTY)) {
+ return AjaxResult.error("当前视频文件名含有空格,请先去除空格在上传!");
+ }
+ return uploadFileService.uploadHeadPictureUrl(multipartFile, patientId);
+ }
+
+ /**
+ * 护理员App确认任务完成图片上传
+ *
+ * @param orderNo 编号
+ * @param multipartFile 文件
+ * @return 结果
+ */
+ @PostMapping("/uploadPictureUrl")
+ public AjaxResult uploadPictureUrl(@RequestParam("file") MultipartFile multipartFile, @RequestParam(value = "orderNo") String orderNo) throws Exception {
+ if (StringUtils.isBlank(orderNo)) {
+ return AjaxResult.error("订单信息不能为空!");
+ }
+ if (Objects.isNull(multipartFile) || StringUtils.isBlank(multipartFile.getOriginalFilename())) {
+ return AjaxResult.error("当前文件不存在,无法上传!");
+ }
+ if (multipartFile.getOriginalFilename().contains(Constants.EMPTY)) {
+ return AjaxResult.error("当前文件名含有空格,请先去除空格在上传!");
+ }
+ return uploadFileService.uploadPictureUrl(multipartFile, orderNo);
+ }
+}
\ No newline at end of file
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/IUploadFileService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/IUploadFileService.java
new file mode 100644
index 0000000..17e8c34
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/IUploadFileService.java
@@ -0,0 +1,32 @@
+package com.xinelu.applet.service.uploadfile;
+
+import com.xinelu.common.core.domain.AjaxResult;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @Description APP和小程序头像图片上传方法
+ * @Author zh
+ * @Date 2022-11-2
+ */
+public interface IUploadFileService {
+
+ /**
+ * 会员App头像图片上传
+ *
+ * @param patientId 会员主键id
+ * @param multipartFile 文件
+ * @return 结果
+ * @throws Exception 异常信息
+ */
+ AjaxResult uploadHeadPictureUrl(MultipartFile multipartFile, Long patientId) throws Exception;
+
+ /**
+ * 护理员App确认任务完成图片上传
+ *
+ * @param orderNo 订单编号
+ * @param multipartFile 文件
+ * @return 结果
+ * @throws Exception 异常信息
+ **/
+ AjaxResult uploadPictureUrl(MultipartFile multipartFile, String orderNo) throws Exception;
+}
\ No newline at end of file
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/Impl/UploadFileServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/Impl/UploadFileServiceImpl.java
new file mode 100644
index 0000000..54e48a5
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/uploadfile/Impl/UploadFileServiceImpl.java
@@ -0,0 +1,70 @@
+package com.xinelu.applet.service.uploadfile.Impl;
+
+import com.xinelu.applet.service.uploadfile.IUploadFileService;
+import com.xinelu.common.config.XinELuConfig;
+import com.xinelu.common.core.domain.AjaxResult;
+import com.xinelu.common.exception.ServiceException;
+import com.xinelu.common.utils.file.FileUploadUtils;
+import com.xinelu.common.utils.file.MimeTypeUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.annotation.Resource;
+
+/**
+ * @Description 头像上传
+ * @Author ZH
+ * @Date 2022-10-28
+ */
+@Service
+public class UploadFileServiceImpl implements IUploadFileService {
+
+ @Resource
+ private XinELuConfig xinELuConfig;
+
+ /**
+ * 会员App头像图片上传
+ *
+ * @param patientId 会员主键id
+ * @param multipartFile 文件
+ * @return 结果
+ */
+ @Override
+ public AjaxResult uploadHeadPictureUrl(MultipartFile multipartFile, Long patientId) throws Exception {
+ //获取路径名称
+ String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getHeadPictureUrl() + "/" + patientId;
+ //上传图片
+ String pictureName = FileUploadUtils.uploadPictureUrlPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION);
+ if (StringUtils.isBlank(pictureName)) {
+ throw new ServiceException("头像上传失败,请联系管理员!");
+ }
+ //获取返回值
+ AjaxResult ajax = AjaxResult.success("上传成功!");
+ ajax.put("imgUrl", pictureName);
+ return ajax;
+ }
+
+ /**
+ * 护理员App确认任务完成图片上传
+ *
+ * @param orderNo 订单编号
+ * @param multipartFile 文件
+ * @return 结果
+ * @throws Exception 异常信息
+ **/
+ @Override
+ public AjaxResult uploadPictureUrl(MultipartFile multipartFile, String orderNo) throws Exception {
+ //获取路径名称
+ String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getAppointmentOrderDetailsUrl() + "/" + orderNo;
+ //上传图片
+ String pictureName = FileUploadUtils.uploadPictureUrlPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION);
+ if (StringUtils.isBlank(pictureName)) {
+ throw new ServiceException("图片上传失败,请联系管理员!");
+ }
+ //获取返回值
+ AjaxResult ajax = AjaxResult.success("上传成功!");
+ ajax.put("imgUrl", pictureName);
+ return ajax;
+ }
+}
\ No newline at end of file
From c99a392189fb21f3a77e771a567ec9fe88117a2f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com>
Date: Fri, 13 Oct 2023 17:21:32 +0800
Subject: [PATCH 02/14] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E4=B8=AD=E5=BF=83=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../nurseapplogin/impl/NurseAppLoginServiceImpl.java | 3 +++
.../xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java | 6 ++++++
.../mapper/applet/nurseapplogin/NurseAppLoginMapper.xml | 2 ++
.../com/xinelu/manage/domain/patientinfo/PatientInfo.java | 5 +++++
4 files changed, 16 insertions(+)
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java
index 55276f9..ba9bce0 100644
--- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java
@@ -176,6 +176,9 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
if (Objects.nonNull(patientDisease) && Objects.nonNull(patientDisease.getBirthDate())) {
patientDisease.setAge(AgeUtil.getAgeMonth(String.valueOf(patientDisease.getBirthDate())));
}
+ if (Objects.nonNull(patientDisease) && StringUtils.isNotBlank(patientDisease.getDisease())) {
+ patientDisease.setDiseaseList(patientDisease.getDisease().split(""));
+ }
if (Objects.nonNull(patientDisease) && StringUtils.isNotBlank(patientDisease.getAreaCode())) {
SysAreaVO codeName = sysAreaMapper.getSubordinateRegionsFindSuperiorRegions(patientDisease.getAreaCode());
String provinceName = StringUtils.isBlank(codeName.getProvinceName()) ? "" : codeName.getProvinceName();
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java
index d7f757e..97ee956 100644
--- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java
@@ -158,4 +158,10 @@ public class PatientAndDiseaseVO implements Serializable {
*/
private String patientCode;
+
+ private String disease;
+ /**
+ * 基础疾病信息
+ */
+ private String[] diseaseList;
}
diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml
index c4d7e1e..ea7b893 100644
--- a/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml
+++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml
@@ -24,6 +24,7 @@
+
@@ -81,6 +82,7 @@
pi.disabling_condition,
pi.disabling_reason,
pi.patient_code,
+ pi.disease,
pdi.id patientDiseaseId,
pdi.disease_id,
pdi.disease_name,
diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java
index cdd787c..860ef8c 100644
--- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java
+++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java
@@ -242,6 +242,11 @@ public class PatientInfo extends BaseDomain implements Serializable {
*/
private String disablingReason;
+ /**
+ * 基础疾病
+ */
+ private String disease;
+
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
From 049e6ac0a7b0bf5483f3b959bd9aba86d020bb31 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E6=97=AD?= <17615834396@163.com>
Date: Mon, 16 Oct 2023 10:40:01 +0800
Subject: [PATCH 03/14] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=AA=E4=BA=BA?=
=?UTF-8?q?=E4=B8=AD=E5=BF=83=E5=9F=BA=E7=A1=80=E7=96=BE=E7=97=85=E8=BF=94?=
=?UTF-8?q?=E5=9B=9E=E5=80=BC=E7=B1=BB=E5=9E=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/nurseapplogin/impl/NurseAppLoginServiceImpl.java | 4 +++-
.../xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java
index ba9bce0..414e087 100644
--- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java
@@ -177,7 +177,9 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
patientDisease.setAge(AgeUtil.getAgeMonth(String.valueOf(patientDisease.getBirthDate())));
}
if (Objects.nonNull(patientDisease) && StringUtils.isNotBlank(patientDisease.getDisease())) {
- patientDisease.setDiseaseList(patientDisease.getDisease().split(""));
+ patientDisease.setDiseaseList(Arrays.stream(patientDisease.getDisease().split(","))
+ .map(Integer::valueOf)
+ .toArray(Integer[]::new));
}
if (Objects.nonNull(patientDisease) && StringUtils.isNotBlank(patientDisease.getAreaCode())) {
SysAreaVO codeName = sysAreaMapper.getSubordinateRegionsFindSuperiorRegions(patientDisease.getAreaCode());
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java
index 97ee956..faa5201 100644
--- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java
@@ -163,5 +163,5 @@ public class PatientAndDiseaseVO implements Serializable {
/**
* 基础疾病信息
*/
- private String[] diseaseList;
+ private Integer[] diseaseList;
}
From f4d3bf9a3bb1bbb2b93d9f5899ce77268b98da3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=8E=E7=94=B2=E8=BE=89?=
Date: Mon, 16 Oct 2023 13:08:49 +0800
Subject: [PATCH 04/14] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E5=9B=BE?=
=?UTF-8?q?=E7=89=87=E5=9B=9E=E6=98=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
xinelu-admin/src/main/resources/application.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xinelu-admin/src/main/resources/application.yml b/xinelu-admin/src/main/resources/application.yml
index 6617333..dadcde7 100644
--- a/xinelu-admin/src/main/resources/application.yml
+++ b/xinelu-admin/src/main/resources/application.yml
@@ -241,7 +241,7 @@ xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
- excludes: /system/notice
+ excludes: /system/notice,/system/station/add,/system/station/edit,/system/stationItem/add,/system/stationItem/edit,/system/operateGoodInfo/add,/system/operateGoodInfo/edit,/system/goodsInfo/add,/system/goodsInfo/edit,/system/hospital/add,/system/hospital/edit,/system/informationInfo/add,/system/informationInfo/edit,/system/trainingItem/edit,/system/trainingItem/add
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
From 11432e39d8d031572d5d0281cb7a6f5464a806ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=81=92?=
Date: Mon, 16 Oct 2023 13:31:45 +0800
Subject: [PATCH 05/14] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../xinelu/manage/service/information/IInformationService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/information/IInformationService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/information/IInformationService.java
index 3cb9498..c7ee467 100644
--- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/information/IInformationService.java
+++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/information/IInformationService.java
@@ -61,4 +61,4 @@ public interface IInformationService {
* @return 结果
*/
int deleteInformationById(Long id);
-}
+}
\ No newline at end of file
From 14055eaf2f332981d553b6de336b725370fbc354 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=81=92?=
Date: Mon, 16 Oct 2023 13:47:32 +0800
Subject: [PATCH 06/14] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../impl/ResidentPatientInfoServiceImpl.java | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
index de51f3c..715033c 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
@@ -153,13 +153,15 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
// 修改
if(!StringUtils.isBlank(body.getPatientCode())) {
PatientInfo patientInfo = residentPatientInfoMapper.getByCardNo(body.getCardNo());
- BeanUtils.copyBeanProp(patientInfo, body);
- if(body.getDiseaseList() != null) {
- patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
+ if (ObjectUtils.isNotEmpty(patientInfo)) {
+ BeanUtils.copyBeanProp(patientInfo, body);
+ if (body.getDiseaseList() != null) {
+ patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
+ }
+ patientInfo.setLoginFlag(Long.valueOf(1));
+ updatePatientInfo(patientInfo);
+ // 注册
}
- patientInfo.setLoginFlag(Long.valueOf(1));
- updatePatientInfo(patientInfo);
- // 注册
} else {
// 获取当前微信绑定的居民
List list = residentPatientInfoMapper.getList(body.getOpenid(), body.getCityCode());
From c8228e64d2a2aeb945afb68f982cb31514651b20 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=BA=AA=E5=AF=92?= <2533659732@qq.com>
Date: Mon, 16 Oct 2023 13:52:10 +0800
Subject: [PATCH 07/14] =?UTF-8?q?=E5=AE=9E=E4=BD=93=E7=B1=BB=E5=92=8CMappe?=
=?UTF-8?q?r=E6=96=87=E4=BB=B6=E6=B7=BB=E5=8A=A0=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=BA=93=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../xinelu/common/enums/OrderSourceEnum.java | 29 ++++++++++++++
.../manage/domain/goodsOrder/GoodsOrder.java | 5 +++
.../orderevaluateinfo/OrderEvaluateInfo.java | 4 ++
.../domain/patientinfo/PatientInfo.java | 21 ++++++++++
.../manage/goodsOrder/GoodsOrderMapper.xml | 11 +++++-
.../HospitalPersonInfoMapper.xml | 24 ++++++++++++
.../OrderEvaluateInfoMapper.xml | 9 +++++
.../manage/patientinfo/PatientInfoMapper.xml | 38 ++++++++++++++++++-
8 files changed, 139 insertions(+), 2 deletions(-)
create mode 100644 xinelu-common/src/main/java/com/xinelu/common/enums/OrderSourceEnum.java
diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/OrderSourceEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/OrderSourceEnum.java
new file mode 100644
index 0000000..ea7ae23
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/enums/OrderSourceEnum.java
@@ -0,0 +1,29 @@
+package com.xinelu.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @Description 订单来源枚举
+ * @Author 纪寒
+ * @Date 2023-10-16
+ */
+@Getter
+public enum OrderSourceEnum {
+
+ /**
+ * 泉医模块
+ */
+ SPRING_DOCTOR("SPRING_DOCTOR"),
+
+ /**
+ * 家医模块
+ */
+ FAMILY_DOCTOR("FAMILY_DOCTOR"),
+ ;
+
+ final private String info;
+
+ OrderSourceEnum(String info) {
+ this.info = info;
+ }
+}
diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/goodsOrder/GoodsOrder.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/goodsOrder/GoodsOrder.java
index f6568e8..3d06ecc 100644
--- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/goodsOrder/GoodsOrder.java
+++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/goodsOrder/GoodsOrder.java
@@ -179,6 +179,11 @@ public class GoodsOrder extends BaseDomain implements Serializable {
*/
private String hospitalPersonName;
+ /**
+ * 专家咨询信息表id
+ */
+ private Long consultationInfoId;
+
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java
index 988f1ff..f50aeaa 100644
--- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java
+++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java
@@ -96,6 +96,10 @@ public class OrderEvaluateInfo extends BaseDomain implements Serializable {
@NotNull(message = "请选择评分", groups = {Update.class})
private Integer compositeScore;
+ /**
+ * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR
+ */
+ private String orderSource;
@Override
public String toString() {
diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java
index 860ef8c..7999fe7 100644
--- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java
+++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/patientinfo/PatientInfo.java
@@ -19,6 +19,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
+import java.time.LocalDateTime;
/**
* 被护理人基本信息对象 patient_info
@@ -247,6 +248,23 @@ public class PatientInfo extends BaseDomain implements Serializable {
*/
private String disease;
+ /**
+ * 绑定城市(1:德州 2:东营)
+ */
+ private String cityCode;
+
+ /**
+ * 小程序绑定时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime bindingTime;
+
+ /**
+ * 当前是否选中(0: 否 1:是)
+ */
+ private String isChecked;
+
+
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -275,6 +293,9 @@ public class PatientInfo extends BaseDomain implements Serializable {
.append("loginFlag", getLoginFlag())
.append("primaryAccountFlag", getPrimaryAccountFlag())
.append("delFlag", getDelFlag())
+ .append("cityCode", getCityCode())
+ .append("bindingTime", getBindingTime())
+ .append("isChecked", getIsChecked())
.toString();
}
}
diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml
index 75cfa51..1e4821c 100644
--- a/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml
+++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/goodsOrder/GoodsOrderMapper.xml
@@ -34,6 +34,7 @@
+
@@ -117,7 +118,8 @@
original_total_price,
health_consultation_content,
health_appoint_date,
- hospital_person_name
+ hospital_person_name,
+ consultation_info_id
from goods_order
@@ -273,6 +275,8 @@
hospital_person_name,
+ consultation_info_id,
+
#{nurseStationId},
@@ -331,6 +335,8 @@
#{hospitalPersonName},
+ #{consultationInfoId},
+
@@ -421,6 +427,9 @@
hospital_person_name =
#{hospitalPersonName},
+ consultation_info_id =
+ #{consultationInfoId},
+
where id = #{id}
diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml
index 1932e78..6ff9497 100644
--- a/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml
+++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml
@@ -22,6 +22,8 @@
+
+
@@ -71,6 +73,8 @@
person_introduce,
person_sort,
person_picture_url,
+ person_account,
+ person_password,
create_by,
create_time,
update_by,
@@ -238,6 +242,10 @@
person_picture_url,
+ person_account,
+
+ person_password,
+
create_by,
create_time,
@@ -270,6 +278,10 @@
#{personPictureUrl},
+ #{personAccount},
+
+ #{personPassword},
+
#{createBy},
#{createTime},
@@ -316,6 +328,12 @@
person_picture_url =
#{personPictureUrl},
+ person_account =
+ #{personAccount},
+
+ person_password =
+ #{personPassword},
+
create_by =
#{createBy},
@@ -367,6 +385,12 @@
person_picture_url =
#{personPictureUrl},
+ person_account =
+ #{personAccount},
+
+ person_password =
+ #{personPassword},
+
create_by =
#{createBy},
diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml
index 2f53988..430b20e 100644
--- a/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml
+++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml
@@ -14,6 +14,7 @@
+
@@ -30,6 +31,7 @@
evaluate_channel,
evaluate_satisfaction,
composite_score,
+ order_source,
create_by,
create_time,
update_by,
@@ -100,6 +102,8 @@
composite_score,
+ order_source,
+
create_by,
create_time,
@@ -128,6 +132,8 @@
#{compositeScore},
+ #{orderSource},
+
#{createBy},
#{createTime},
@@ -166,6 +172,9 @@
composite_score =
#{compositeScore},
+ order_source =
+ #{orderSource},
+
create_by =
#{createBy},
diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml
index dbc2589..dc50793 100644
--- a/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml
+++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml
@@ -42,6 +42,10 @@
+
+
+
+
@@ -77,7 +81,11 @@
del_flag,
personal_wechat_code_url,
disabling_condition,
- disabling_reason
+ disabling_reason,
+ disease,
+ city_code,
+ binding_time,
+ is_checked
from patient_info
@@ -289,6 +297,14 @@
disabling_reason,
+ disease,
+
+ city_code,
+
+ binding_time,
+
+ is_checked,
+
#{communityCode},
@@ -361,6 +377,14 @@
#{disablingReason},
+ #{disease},
+
+ #{cityCode},
+
+ #{bindingTime},
+
+ #{isChecked},
+
@@ -472,6 +496,18 @@
disabling_reason =
#{disablingReason},
+ disease =
+ #{disease},
+
+ city_code =
+ #{cityCode},
+
+ binding_time =
+ #{bindingTime},
+
+ is_checked =
+ #{isChecked},
+
where id = #{id}
From 7460db18d6894e2dd57b696d3bc37195092f8eca Mon Sep 17 00:00:00 2001
From: HaoWang <1477026787@qq.com>
Date: Mon, 16 Oct 2023 14:15:34 +0800
Subject: [PATCH 08/14] =?UTF-8?q?APP=E5=8F=8A=E5=B0=8F=E7=A8=8B=E5=BA=8F?=
=?UTF-8?q?=E5=81=A5=E5=BA=B7=E5=92=A8=E8=AF=A2=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../HealthConsultationController.java | 84 +++++++++
.../HealthConsultationMapper.java | 30 +++
.../HealthConsultationService.java | 50 +++++
.../impl/HealthConsultationServiceImpl.java | 172 ++++++++++++++++++
.../HealthConsultationOrderDTO.java | 131 +++++++++++++
.../HealthConsultationVO.java | 30 +++
.../healthconsultation/PatientAndTimeVO.java | 30 +++
.../HealthConsultationMapper.xml | 21 +++
8 files changed, 548 insertions(+)
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/healthconsultation/HealthConsultationController.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/healthconsultation/HealthConsultationMapper.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/HealthConsultationService.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/impl/HealthConsultationServiceImpl.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationOrderDTO.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationVO.java
create mode 100644 xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/PatientAndTimeVO.java
create mode 100644 xinelu-nurse-applet/src/main/resources/mapper/applet/healthconsultation/HealthConsultationMapper.xml
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/healthconsultation/HealthConsultationController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/healthconsultation/HealthConsultationController.java
new file mode 100644
index 0000000..e9c8b39
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/healthconsultation/HealthConsultationController.java
@@ -0,0 +1,84 @@
+package com.xinelu.applet.controller.healthconsultation;
+
+import com.xinelu.applet.service.healthconsultation.HealthConsultationService;
+import com.xinelu.applet.vo.healthconsultation.HealthConsultationOrderDTO;
+import com.xinelu.common.annotation.MobileRequestAuthorization;
+import com.xinelu.common.annotation.RepeatSubmit;
+import com.xinelu.common.core.controller.BaseController;
+import com.xinelu.common.core.domain.AjaxResult;
+import com.xinelu.common.core.page.TableDataInfo;
+import com.xinelu.common.custominterface.Insert;
+import com.xinelu.common.exception.ServiceException;
+import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
+import org.springframework.validation.BindingResult;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @Description APP及小程序健康咨询接口
+ * @Author zh
+ * @Date 2023-03-07
+ */
+@RestController
+@RequestMapping("/nurseApp/healthConsultation")
+public class HealthConsultationController extends BaseController {
+ @Resource
+ private HealthConsultationService healthConsultationService;
+
+ /**
+ * 健康咨询-预约医生
+ */
+ @MobileRequestAuthorization
+ @GetMapping("/selectDepartment")
+ public TableDataInfo selectDepartment() {
+ return healthConsultationService.selectDepartment();
+ }
+
+ /**
+ * 健康咨询-预约医生-单查科室人员
+ */
+ @MobileRequestAuthorization
+ @GetMapping("/selectHospitalPerson")
+ public TableDataInfo selectHospitalPerson(Long departmentId) {
+ startPage();
+ List list = healthConsultationService.selectHospitalPerson(departmentId);
+ return getDataTable(list);
+ }
+
+ /**
+ * 健康咨询-信息确认
+ */
+ @MobileRequestAuthorization
+ @GetMapping("/informationConfirmation")
+ public AjaxResult informationConfirmation(Long patientId) {
+ if (Objects.isNull(patientId)) {
+ return AjaxResult.error("用户信息为空!");
+ }
+ return healthConsultationService.informationConfirmation(patientId);
+ }
+
+
+ /**
+ * 手机App和微信小程序健康咨询确认订单方法
+ *
+ * @param healthConsultationOrderDTO 健康咨询订单
+ * @return 结果
+ */
+ @MobileRequestAuthorization
+ @RepeatSubmit
+ @PostMapping("/addHealthConsultationOrder")
+ public AjaxResult addHealthConsultationOrder(@Validated(Insert.class) @RequestBody HealthConsultationOrderDTO healthConsultationOrderDTO, BindingResult bindingResult) {
+ if (bindingResult.hasErrors()) {
+ throw new ServiceException(bindingResult.getAllErrors().get(0).getDefaultMessage());
+ }
+ if (Objects.nonNull(healthConsultationOrderDTO.getTotalPrice()) && healthConsultationOrderDTO.getTotalPrice().compareTo(BigDecimal.ZERO) <= 0) {
+ return AjaxResult.error("预约金额不正确,无法下单,请输入正确的预约金额!");
+ }
+ return healthConsultationService.insertHealthConsultationOrder(healthConsultationOrderDTO);
+ }
+}
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/healthconsultation/HealthConsultationMapper.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/healthconsultation/HealthConsultationMapper.java
new file mode 100644
index 0000000..27769d8
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/healthconsultation/HealthConsultationMapper.java
@@ -0,0 +1,30 @@
+package com.xinelu.applet.mapper.healthconsultation;
+
+import com.xinelu.applet.vo.healthconsultation.HealthConsultationVO;
+import com.xinelu.manage.domain.patientinfo.PatientInfo;
+
+import java.util.List;
+
+/**
+ * 健康咨询Mapper接口
+ *
+ * @author 张恒
+ * @date 2023-03-07
+ */
+public interface HealthConsultationMapper {
+
+ /**
+ * 健康咨询-信息确认
+ *
+ * @param patientId 用户信息
+ * @return PatientInfo
+ */
+ PatientInfo selectPatientById(Long patientId);
+
+ /**
+ * 查询科室信息管理列表
+ *
+ * @return 科室信息管理集合
+ */
+ List selectHospitalDepartmentList();
+}
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/HealthConsultationService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/HealthConsultationService.java
new file mode 100644
index 0000000..469223f
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/HealthConsultationService.java
@@ -0,0 +1,50 @@
+package com.xinelu.applet.service.healthconsultation;
+
+
+
+import com.xinelu.applet.vo.healthconsultation.HealthConsultationOrderDTO;
+import com.xinelu.common.core.domain.AjaxResult;
+import com.xinelu.common.core.page.TableDataInfo;
+import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
+
+import java.util.List;
+
+/**
+ * @Description 健康咨询接口业务层
+ * @Author zh
+ * @Date 2023-03-07
+ */
+public interface HealthConsultationService {
+
+ /**
+ * 健康咨询-预约医生
+ *
+ * @return AjaxResult
+ */
+ TableDataInfo selectDepartment();
+
+ /**
+ * 单查科室人员
+ *
+ * @param departmentId 科室id
+ * @return AjaxResult
+ */
+ List selectHospitalPerson(Long departmentId);
+
+ /**
+ * 健康咨询-信息确认
+ *
+ * @param patientId 用户信息
+ * @return AjaxResult
+ */
+ AjaxResult informationConfirmation(Long patientId);
+
+
+ /**
+ * 手机App和微信小程序健康咨询确认订单方法
+ *
+ * @param healthConsultationOrderDTO 健康咨询订单
+ * @return 结果
+ */
+ AjaxResult insertHealthConsultationOrder(HealthConsultationOrderDTO healthConsultationOrderDTO);
+}
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/impl/HealthConsultationServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/impl/HealthConsultationServiceImpl.java
new file mode 100644
index 0000000..be435a7
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/healthconsultation/impl/HealthConsultationServiceImpl.java
@@ -0,0 +1,172 @@
+package com.xinelu.applet.service.healthconsultation.impl;
+
+import com.xinelu.applet.service.healthconsultation.HealthConsultationService;
+import com.xinelu.applet.utils.AppointmentTimeUtil;
+import com.xinelu.applet.vo.healthconsultation.HealthConsultationOrderDTO;
+import com.xinelu.applet.vo.healthconsultation.HealthConsultationVO;
+import com.xinelu.applet.vo.healthconsultation.PatientAndTimeVO;
+import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
+import com.xinelu.common.core.domain.AjaxResult;
+import com.xinelu.common.core.page.TableDataInfo;
+import com.xinelu.common.enums.BuySourceEnum;
+import com.xinelu.common.enums.GooodsOrderStatusEnum;
+import com.xinelu.common.enums.OrderTypeEnum;
+import com.xinelu.common.enums.PoserModuleTypeEnum;
+import com.xinelu.common.exception.ServiceException;
+import com.xinelu.common.utils.PageServiceUtil;
+import com.xinelu.common.utils.StringUtils;
+import com.xinelu.common.utils.bean.BeanUtils;
+import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
+import com.xinelu.manage.domain.goodsOrderDetails.GoodsOrderDetails;
+import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
+import com.xinelu.manage.domain.patientinfo.PatientInfo;
+import com.xinelu.manage.domain.poserInfo.PoserInfo;
+import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper;
+import com.xinelu.manage.mapper.goodsOrderDetails.GoodsOrderDetailsMapper;
+import com.xinelu.applet.mapper.healthconsultation.HealthConsultationMapper;
+import com.xinelu.manage.mapper.hospitalpersoninfo.HospitalPersonInfoMapper;
+import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
+import com.xinelu.manage.mapper.poserInfo.PoserInfoMapper;
+import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.collections4.CollectionUtils;
+import org.apache.commons.compress.utils.Lists;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @Description 健康咨询接口业务层实现类
+ * @Author zh
+ * @Date 2023-03-07
+ */
+@Slf4j
+@Service
+public class HealthConsultationServiceImpl implements HealthConsultationService {
+
+ @Resource
+ private PatientInfoMapper patientInfoMapper;
+ @Resource
+ private GoodsOrderMapper goodsOrderMapper;
+ @Resource
+ private GoodsOrderDetailsMapper goodsOrderDetailsMapper;
+ @Resource
+ private HealthConsultationMapper healthConsultationMapper;
+ @Resource
+ private PoserInfoMapper poserInfoMapper;
+ @Resource
+ private HospitalPersonInfoMapper hospitalPersonInfoMapper;
+ @Resource
+ private AppointmentTimeUtil appointmentTimeUtil;
+ @Resource
+ private PageServiceUtil pageServiceUtil;
+
+ /**
+ * 健康咨询-预约医生
+ *
+ * @return AjaxResult
+ */
+ @Override
+ public TableDataInfo selectDepartment() {
+ //查询海报及科室
+ List poserList = poserInfoMapper.selectPoserListByModuleTyp(PoserModuleTypeEnum.HEALTH_CONSUTION_MODULE.getInfo());
+ pageServiceUtil.startPage();
+ List healthConsultation = healthConsultationMapper.selectHospitalDepartmentList();
+ if (CollectionUtils.isNotEmpty(healthConsultation)) {
+ healthConsultation.get(0).setPoserInfoList(poserList);
+ }
+ return pageServiceUtil.getDataTable(healthConsultation);
+ }
+
+ /**
+ * 单查科室人员
+ *
+ * @param departmentId 科室id
+ * @return AjaxResult
+ */
+ @Override
+ public List selectHospitalPerson(Long departmentId) {
+ if (Objects.isNull(departmentId)) {
+ return new ArrayList<>();
+ }
+ return hospitalPersonInfoMapper.selectHospitalPerson(departmentId);
+ }
+
+ /**
+ * 健康咨询-信息确认
+ *
+ * @param patientId 用户信息
+ * @return AjaxResult
+ */
+ @Override
+ public AjaxResult informationConfirmation(Long patientId) {
+ PatientAndTimeVO patientAndTime = new PatientAndTimeVO();
+ PatientInfo patientInfo = healthConsultationMapper.selectPatientById(patientId);
+ if (Objects.isNull(patientInfo)) {
+ return AjaxResult.error("用户信息不存在!");
+ }
+ LocalDate nowTime = LocalDate.now();
+ //近七天的预约时间点数据集合
+ List weekDaysList = Lists.newArrayList();
+ appointmentTimeUtil.setWeekDayAndWeekDate(nowTime, weekDaysList);
+ patientAndTime.setAppointmentTimeList(weekDaysList);
+ patientAndTime.setPatientName(patientInfo.getPatientName());
+ patientAndTime.setPhone(patientInfo.getPhone());
+ return AjaxResult.success(patientAndTime);
+ }
+
+ /**
+ * 手机App和微信小程序健康咨询确认订单方法
+ *
+ * @param healthConsultationOrderDTO 健康咨询订单
+ * @return 结果
+ */
+ @Transactional(rollbackFor = Exception.class)
+ @Override
+ public AjaxResult insertHealthConsultationOrder(HealthConsultationOrderDTO healthConsultationOrderDTO) {
+ //判断当前会员信息是否存在
+ PatientInfoVO patientInfo = patientInfoMapper.getPatientInfoById(healthConsultationOrderDTO.getPatientId());
+ if (Objects.isNull(patientInfo)) {
+ return AjaxResult.error("用户信息不存在,无法预约专家!");
+ }
+ //根据id查询当前专家是否存在
+ HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(healthConsultationOrderDTO.getHospitalPersonId());
+ if (Objects.isNull(hospitalPersonInfo)) {
+ return AjaxResult.error("当前专家信息不存在,请重新预约!");
+ }
+ //生成订单信息
+ GoodsOrder goodsOrder = new GoodsOrder();
+ BeanUtils.copyProperties(healthConsultationOrderDTO, goodsOrder);
+ String goodOrderNo = StringUtils.fillZeroByPatientId(healthConsultationOrderDTO.getPatientId(), 5) + System.nanoTime();
+ goodsOrder.setOrderNo(goodOrderNo);
+ goodsOrder.setOrderStatus(GooodsOrderStatusEnum.WAIT_PAY.getInfo());
+ goodsOrder.setDelFlag(0);
+ goodsOrder.setOrderType(OrderTypeEnum.HEALTH_CONSULTATION.getInfo());
+ goodsOrder.setBuySource(BuySourceEnum.HEALTH_CONSULTATION.getInfo());
+ goodsOrder.setCreateTime(LocalDateTime.now());
+ goodsOrder.setOrderTime(LocalDateTime.now());
+ goodsOrder.setOriginalTotalPrice(healthConsultationOrderDTO.getTotalPrice());
+ int insertGoodsOrder = goodsOrderMapper.insertGoodsOrder(goodsOrder);
+ if (insertGoodsOrder <= 0) {
+ throw new ServiceException("预约订单新增信息失败,请联系管理员!");
+ }
+ GoodsOrderDetails goodsOrderDetails = new GoodsOrderDetails();
+ goodsOrderDetails.setGoodsOrderId(goodsOrder.getId());
+ goodsOrderDetails.setOrderNo(goodOrderNo);
+ goodsOrderDetails.setGoodsName("健康咨询");
+ goodsOrderDetails.setTotalPrice(healthConsultationOrderDTO.getTotalPrice());
+ goodsOrderDetails.setDelFlag(0);
+ goodsOrderDetails.setCreateTime(LocalDateTime.now());
+ int insertGoodsOrderDetails = goodsOrderDetailsMapper.insertGoodsOrderDetails(goodsOrderDetails);
+ if (insertGoodsOrderDetails <= 0) {
+ throw new ServiceException("预约订单明细新增信息失败,请联系管理员!");
+ }
+ return AjaxResult.success(goodsOrderMapper.getGoodsOrderByOrderNo(goodOrderNo));
+ }
+}
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationOrderDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationOrderDTO.java
new file mode 100644
index 0000000..dc05cfa
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationOrderDTO.java
@@ -0,0 +1,131 @@
+package com.xinelu.applet.vo.healthconsultation;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.xinelu.common.custominterface.Insert;
+import com.xinelu.common.custominterface.Update;
+import lombok.Data;
+import org.hibernate.validator.constraints.Length;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * @author ljh
+ * @version 1.0
+ * Create by 2023/3/8 13:59
+ */
+@Data
+public class HealthConsultationOrderDTO implements Serializable {
+ private static final long serialVersionUID = 8664995394794180987L;
+
+ /**
+ * 主键id
+ */
+ private Long id;
+
+ /**
+ * 商品订单表id
+ */
+ private Long goodsOrderId;
+
+ /**
+ * 订单编号
+ */
+ private String orderNo;
+
+ /**
+ * 0:否,1:是
+ */
+ private Integer delFlag;
+
+ /**
+ * 会员id
+ */
+ @NotNull(message = "咨询人员信息不能为空!", groups = {Insert.class, Update.class})
+ private Long patientId;
+
+ /**
+ * 订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED
+ */
+ private String orderStatus;
+
+ /**
+ * 订单总金额
+ */
+ @NotNull(message = "金额不能为空", groups = {Insert.class, Update.class})
+ private BigDecimal totalPrice;
+
+ /**
+ * 收货人
+ */
+ @NotBlank(message = "姓名不能为空", groups = {Insert.class, Update.class})
+ @Length(max = 20, message = "姓名不能超过20位", groups = {Insert.class, Update.class})
+ private String receiver;
+
+ /**
+ * 联系电话
+ */
+ @NotBlank(message = "联系电话不能为空", groups = {Insert.class, Update.class})
+ @Length(max = 11, message = "联系电话不能超过11位", groups = {Insert.class, Update.class})
+ private String phone;
+
+ /**
+ * 下单时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime orderTime;
+ /**
+ * 下单方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET
+ */
+ @NotNull(message = "下单方式不能为空", groups = {Insert.class, Update.class})
+ private String orderChannel;
+
+ /**
+ * 护理站:NURSE_STATION,商城:SHOPPING_MALL,健康咨询:HEALTH_CONSULTATION
+ */
+ private String buySource;
+
+ /**
+ * 订单类型,积分兑换:INTEGRAL_EXCHANGE,直接购买:DIRECT_BUY,健康咨询:HEALTH_CONSULTATION
+ */
+ private String orderType;
+
+ /**
+ * 健康咨询人员表id,记录咨询订单中选择的医生,健康咨询订单使用
+ */
+ @NotNull(message = "请选择咨询的专家!", groups = {Insert.class, Update.class})
+ private Long hospitalPersonId;
+
+ /**
+ * 商品原始金额,即:商品数量 * 商品单价
+ */
+ private BigDecimal originalTotalPrice;
+
+ /**
+ * 创建时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ private LocalDateTime createTime;
+
+ /**
+ * 健康咨询预约时间,健康咨询订单使用
+ **/
+ @JsonFormat(pattern = "yyyy-MM-dd")
+ @NotNull(message = "服务日期不能为空", groups = {Insert.class, Update.class})
+ private Date healthAppointDate;
+
+ /**
+ * 健康咨询内容,健康咨询类型的订单使用
+ */
+ private String healthConsultationContent;
+
+ /**
+ * 健康咨询专家,记录咨询订单中选择的医生姓名,健康咨询订单使用
+ */
+ @NotBlank(message = "请选择咨询的专家!", groups = {Insert.class, Update.class})
+ private String hospitalPersonName;
+}
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationVO.java
new file mode 100644
index 0000000..73f412b
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/HealthConsultationVO.java
@@ -0,0 +1,30 @@
+package com.xinelu.applet.vo.healthconsultation;
+
+import com.xinelu.manage.domain.poserInfo.PoserInfo;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Description 健康咨询返回值实体类
+ * @Author zh
+ * @Date 2023-03-07
+ */
+@Data
+public class HealthConsultationVO {
+
+ /**
+ * 科室id
+ */
+ private Long departmentId;
+
+ /**
+ * 科室名称
+ */
+ private String departmentName;
+
+ /**
+ * 海报集合
+ */
+ List poserInfoList;
+}
diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/PatientAndTimeVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/PatientAndTimeVO.java
new file mode 100644
index 0000000..f42770e
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/healthconsultation/PatientAndTimeVO.java
@@ -0,0 +1,30 @@
+package com.xinelu.applet.vo.healthconsultation;
+
+import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Description 信息确认返回值实体类
+ * @Author zh
+ * @Date 2023-03-07
+ */
+@Data
+public class PatientAndTimeVO {
+
+ /**
+ * 用户姓名
+ */
+ private String patientName;
+
+ /**
+ * 手机号码
+ */
+ private String phone;
+
+ /**
+ * 近七天的预约时间点集合
+ */
+ List appointmentTimeList;
+}
diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/healthconsultation/HealthConsultationMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/healthconsultation/HealthConsultationMapper.xml
new file mode 100644
index 0000000..f96089d
--- /dev/null
+++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/healthconsultation/HealthConsultationMapper.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
From 138f6f1dfb45745680b9287eca2458bd8a25872e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E6=81=92?=
Date: Mon, 16 Oct 2023 14:24:58 +0800
Subject: [PATCH 09/14] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../applet/mapper/ResidentPatientInfoMapper.java | 8 ++++++++
.../service/impl/ResidentPatientInfoServiceImpl.java | 2 +-
.../mapper/register/ResidentPatientInfoMapper.xml | 5 +++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
index 8eb0e0c..b94b27f 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
@@ -96,4 +96,12 @@ public interface ResidentPatientInfoMapper {
PatientInfo getByCardNo(String cardNo);
int selectPatientInfoByPhone(String phone);
+
+ /**
+ *根据用户编号查询
+ *
+ *@param patientCode 用户编号
+ *@return PatientInfo
+ **/
+ PatientInfo getPatientInfoByPatientCode(String patientCode);
}
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
index 715033c..2ebb886 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
@@ -152,7 +152,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
if (ObjectUtils.isNotEmpty(body.getCardNo())) {
// 修改
if(!StringUtils.isBlank(body.getPatientCode())) {
- PatientInfo patientInfo = residentPatientInfoMapper.getByCardNo(body.getCardNo());
+ PatientInfo patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(body.getPatientCode());
if (ObjectUtils.isNotEmpty(patientInfo)) {
BeanUtils.copyBeanProp(patientInfo, body);
if (body.getDiseaseList() != null) {
diff --git a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
index 5574d49..947b7b6 100644
--- a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
+++ b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
@@ -459,4 +459,9 @@
and login_flag = '1'
+
From 3bf848721f7aa4a857ba56602e364d90004cb9e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=B5=B5=E6=97=AD?= <17615834396@163.com>
Date: Mon, 16 Oct 2023 14:28:01 +0800
Subject: [PATCH 10/14] =?UTF-8?q?=E6=B3=A8=E5=86=8C=E8=BF=94=E5=9B=9E?=
=?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=9F=8E=E5=B8=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../applet/mapper/ResidentPatientInfoMapper.java | 2 +-
.../impl/ResidentPatientInfoServiceImpl.java | 16 ++++++++++++++--
.../register/ResidentPatientInfoMapper.xml | 4 ++--
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
index 8eb0e0c..3a6c863 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
@@ -95,5 +95,5 @@ public interface ResidentPatientInfoMapper {
**/
PatientInfo getByCardNo(String cardNo);
- int selectPatientInfoByPhone(String phone);
+ List selectPatientInfoByPhone(String phone);
}
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
index de51f3c..fee897e 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
@@ -154,7 +154,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
if(!StringUtils.isBlank(body.getPatientCode())) {
PatientInfo patientInfo = residentPatientInfoMapper.getByCardNo(body.getCardNo());
BeanUtils.copyBeanProp(patientInfo, body);
- if(body.getDiseaseList() != null) {
+ if (body.getDiseaseList() != null) {
patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(",")));
}
patientInfo.setLoginFlag(Long.valueOf(1));
@@ -318,6 +318,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
@Override
public HashMap login(String loginCode,String phoneCode) throws Exception {
HashMap HashMap = new HashMap<>();
+ //获取openId
try {
SslUtils.ignoreSsl();
String params = "appid=" + appletChatConfig.getAppletId() + "&secret=" + appletChatConfig.getSecret() + "&js_code=" + loginCode + "&grant_type=" + appletChatConfig.getGrantType();
@@ -334,12 +335,23 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
+ //获取手机号
String code;
+ String cityCode = "";
AppletPhoneVO phone = getPhone(phoneCode);
String phoneNumber = phone.getPhoneInfo().getPhoneNumber();
HashMap.put("phone",phoneNumber);
- code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1";
+ //code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1";
+ List infoList = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber);
+ code = infoList.size()== 0 ? "0" : "1";
+ //返回绑定城市
+ if ("1".equals(code)){
+ for (PatientInfo patientInfo : infoList) {
+ cityCode = patientInfo.getCityCode();
+ }
+ }
HashMap.put("code",code);
+ HashMap.put("cityCode",cityCode);
return HashMap;
}
}
diff --git a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
index 5574d49..4b74569 100644
--- a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
+++ b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
@@ -453,8 +453,8 @@
-