From 1890df67972e9b3de15537665b3922d5efc13c56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com> Date: Wed, 20 Sep 2023 15:10:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BB=A3=E7=A0=81=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/config/AppletPageConfig.java | 46 + .../xinelu/common/config/XinELuConfig.java | 423 ++++++++- .../com/xinelu/common/constant/Constants.java | 114 +++ .../xinelu/common/core/domain/BaseDomain.java | 65 ++ .../xinelu/common/custominterface/Insert.java | 9 + .../xinelu/common/custominterface/Query.java | 10 + .../common/custominterface/TaskInsert.java | 8 + .../xinelu/common/custominterface/Update.java | 9 + .../common/enums/NurseClassifyInfoEnum.java | 31 + .../com/xinelu/common/utils/DateUtils.java | 250 +++++- .../utils/codes/GenerateSystemCodeUtil.java | 83 ++ .../common/utils/file/FileUploadUtils.java | 205 ++++- .../xinelu/common/utils/file/FileUtils.java | 150 +++- .../common/utils/file/MimeTypeUtils.java | 8 +- .../xinelu/common/utils/regex/RegexUtil.java | 63 ++ .../nursestation/NurseStationController.java | 208 +++++ .../dto/nursestation/NurseStationDTO.java | 61 ++ .../nursestation/NurseStationImportDTO.java | 86 ++ .../nurseclassifyinfo/NurseClassifyInfo.java | 110 +++ .../domain/nursestation/NurseStation.java | 237 +++++ .../NurseStationClassifyRelation.java | 62 ++ .../nursestationitem/NurseStationItem.java | 168 ++++ .../nursestationlabel/NurseStationLabel.java | 91 ++ .../applet/domain/nursetype/NurseType.java | 75 ++ .../xinelu/applet/domain/sysarea/SysArea.java | 106 +++ .../nursestation/NurseStationAndAreaVO.java | 82 ++ .../vo/nursestation/NurseStationByUserVO.java | 30 + .../vo/nursestation/NurseStationLabelVO.java | 66 ++ .../nursestation/NurseStationSysUserVO.java | 50 ++ .../vo/nursestation/NurseStationVO.java | 54 ++ .../applet/domain/vo/sysarea/AreaInfoVO.java | 51 ++ .../domain/vo/sysarea/ParentAreaVO.java | 23 + .../applet/domain/vo/sysarea/SysAreaVO.java | 62 ++ .../nursestation/NurseStationMapper.java | 257 ++++++ .../NurseStationClassifyRelationMapper.java | 103 +++ .../NurseStationClassifyRelationMapper.xml | 159 ++++ .../NurseStationLabelMapper.java | 87 ++ .../NurseStationLabelMapper.xml | 189 ++++ .../applet/mapper/sysarea/SysAreaMapper.java | 123 +++ .../nursestation/INurseStationService.java | 152 ++++ .../impl/NurseStationServiceImpl.java | 786 +++++++++++++++++ .../nursestation/NurseStationMapper.xml | 818 ++++++++++++++++++ .../mapper/manage/sysarea/SysAreaMapper.xml | 357 ++++++++ 43 files changed, 6080 insertions(+), 47 deletions(-) create mode 100644 xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/core/domain/BaseDomain.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/custominterface/Insert.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/custominterface/Query.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/custominterface/TaskInsert.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/custominterface/Update.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/enums/NurseClassifyInfoEnum.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/utils/codes/GenerateSystemCodeUtil.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/utils/regex/RegexUtil.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.xml create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java create mode 100644 xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java create mode 100644 xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml create mode 100644 xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java new file mode 100644 index 0000000..9308321 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/config/AppletPageConfig.java @@ -0,0 +1,46 @@ +package com.xinelu.common.config; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * @Description 小程序页面配置类 + * @Author 纪寒 + * @Date 2023-02-27 17:26:51 + * @Version 1.0 + */ +@Data +@Component +@ConfigurationProperties(prefix = "applet-page-config") +public class AppletPageConfig { + /** + * 首页路径 + */ + private String pageUrl; + + /** + * 个人中心-优惠券页面跳转路径 + */ + private String couponPageUrl; + + /** + * 商品订单页面跳转路径 + */ + private String goodsOrderPageUrl; + + /** + * 预约订单页面跳转路径 + */ + private String appointOrderPageUrl; + + /** + * 积分跳转路径 + */ + private String integralPageUrl; + + /** + * 护理结构详情页面跳转路径 + */ + private String nurseStationDetailsPageUrl; +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java index 26dfc44..22f8af9 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java +++ b/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java @@ -11,6 +11,7 @@ import org.springframework.stereotype.Component; @Component @ConfigurationProperties(prefix = "xinelu") public class XinELuConfig { + /** * 项目名称 */ @@ -46,6 +47,198 @@ public class XinELuConfig { */ private static String captchaType; + /** + * 全医通小程序图片存放路径 + */ + private String nurserAppletPicture; + + /** + * 护理站图片上传存放路径 + */ + private String nurserStationPictureUrl; + + /** + * 护理站图片上传存放路径 + */ + private String nurserStationIntroducePictureUrl; + + /** + * 护理站项目图片上传存放路径 + */ + private String nurserStationItemPictureUrl; + + /** + * 商品图片路径上传存放路径 + */ + private String goodsPictureUrl; + + /** + * 商品属性图片地址 + */ + private String attributePitureUrl; + + /** + * 修改会员App用户头像上传 + */ + private String headPictureUrl; + + /** + * 评价信息图片上传路径 + */ + private String evaluatePictureUrl; + + /** + * 任务完成上传图片 + */ + private String appointmentOrderDetailsUrl; + + /** + * 护理机构上传图片 + */ + private String nurseStationClassifyUrl; + + /** + * 海报图片存放路径 + */ + private String posterPictureUrl; + + /** + * 海报视频存放路径 + */ + private String posterVideoUrl; + + /** + * 资讯主缩略图地址 + */ + private String leadThumbnailUrl; + + /** + * 商品分类图片地址 + */ + private String goodsCategoryPicture; + + /** + * 护理员App人员头像的上传路径图片上传路径 + */ + private String nurseStationAppPersonUrl; + + /** + * 获取管理端富文本的上传路径 + */ + private String richTextPictureUrl; + + /** + * 护理项目分类图标存放地址存放路径 + */ + private String nurseItemClassifyUrl; + + /** + * 在线客服群二维码存放路径 + */ + private String groupQrCodeUrl; + + /** + * 科室人员证书图片存放路径 + */ + private String certificateUrl; + + /** + * 健康咨询 科室人员头像地址 + */ + private String personPictureUrl; + + /** + * 护理人员证书地址 + */ + private String personCertificateUrl; + + /** + * 审核护理人员证书地址 + */ + private String personCertificateCheckUrl; + + /** + * 医路 + */ + private String yiLuYouPinStoreName; + + /** + * 护理员App上传路径 + */ + private String appFileName; + + /** + * 泉医到家App文件存放路径 + */ + private String appFilePath; + + /** + * 培训分类图片路径 + */ + private String trainingCategoryPictureUrl; + + /** + * 培训项目logo图片路径 + */ + private String trainingItemCoverUrl; + + /** + * 培训项目海报图片路径 + */ + private String trainingItemPosterUrl; + + /** + * 培训项目海报图片路径 + */ + private String trainingItemContentUrl; + + /** + * 培训项目章节视频存放地址 + */ + private String itemDirectoryUrl; + + /** + * 微信好有邀请二维码存放路径 + */ + private String personalWeChatCodeUrl; + + /** + * 护理站二维码存放路径 + */ + private String stationWechatCodeUrl; + + public String getStationWechatCodeUrl() { + return stationWechatCodeUrl; + } + + public void setStationWechatCodeUrl(String stationWechatCodeUrl) { + this.stationWechatCodeUrl = stationWechatCodeUrl; + } + + public String getPersonalWeChatCodeUrl() { + return personalWeChatCodeUrl; + } + + public void setPersonalWeChatCodeUrl(String personalWeChatCodeUrl) { + this.personalWeChatCodeUrl = personalWeChatCodeUrl; + } + + public String getAppFilePath() { + return appFilePath; + } + + public void setAppFilePath(String appFilePath) { + this.appFilePath = appFilePath; + } + + public String getYiLuYouPinStoreName() { + return yiLuYouPinStoreName; + } + + public void setYiLuYouPinStoreName(String yiLuYouPinStoreName) { + this.yiLuYouPinStoreName = yiLuYouPinStoreName; + } + public String getName() { return name; } @@ -129,4 +322,232 @@ public class XinELuConfig { public static String getUploadPath() { return getProfile() + "/upload"; } -} + + public String getNurserAppletPicture() { + return nurserAppletPicture; + } + + public void setNurserAppletPicture(String nurserAppletPicture) { + this.nurserAppletPicture = nurserAppletPicture; + } + + public String getNurserStationPictureUrl() { + return nurserStationPictureUrl; + } + + public void setNurserStationPictureUrl(String nurserStationPictureUrl) { + this.nurserStationPictureUrl = nurserStationPictureUrl; + } + + public String getNurserStationIntroducePictureUrl() { + return nurserStationIntroducePictureUrl; + } + + public void setNurserStationIntroducePictureUrl(String nurserStationIntroducePictureUrl) { + this.nurserStationIntroducePictureUrl = nurserStationIntroducePictureUrl; + } + + public String getNurserStationItemPictureUrl() { + return nurserStationItemPictureUrl; + } + + public void setNurserStationItemPictureUrl(String nurserStationItemPictureUrl) { + this.nurserStationItemPictureUrl = nurserStationItemPictureUrl; + } + + public String getGoodsPictureUrl() { + return goodsPictureUrl; + } + + public void setGoodsPictureUrl(String goodsPictureUrl) { + this.goodsPictureUrl = goodsPictureUrl; + } + + public String getHeadPictureUrl() { + return headPictureUrl; + } + + public void setHeadPictureUrl(String headPictureUrl) { + this.headPictureUrl = headPictureUrl; + } + + public String getAppointmentOrderDetailsUrl() { + return appointmentOrderDetailsUrl; + } + + public void setAppointmentOrderDetailsUrl(String appointmentOrderDetailsUrl) { + this.appointmentOrderDetailsUrl = appointmentOrderDetailsUrl; + } + + public String getAttributePitureUrl() { + return attributePitureUrl; + } + + public void setAttributePitureUrl(String attributePitureUrl) { + this.attributePitureUrl = attributePitureUrl; + } + + + public String getAppFileName() { + return appFileName; + } + + public void setAppFileName(String appFileName) { + this.appFileName = appFileName; + } + + public String getNurseStationAppPersonUrl() { + return nurseStationAppPersonUrl; + } + + public void setNurseStationAppPersonUrl(String nurseStationAppPersonUrl) { + this.nurseStationAppPersonUrl = nurseStationAppPersonUrl; + } + + public String getEvaluatePictureUrl() { + return evaluatePictureUrl; + } + + public void setEvaluatePictureUrl(String evaluatePictureUrl) { + this.evaluatePictureUrl = evaluatePictureUrl; + } + + public String getRichTextPictureUrl() { + return richTextPictureUrl; + } + + public void setRichTextPictureUrl(String richTextPictureUrl) { + this.richTextPictureUrl = richTextPictureUrl; + } + + public String getGoodsCategoryPicture() { + return goodsCategoryPicture; + } + + public void setGoodsCategoryPicture(String goodsCategoryPicture) { + this.goodsCategoryPicture = goodsCategoryPicture; + } + + public String getNurseStationClassifyUrl() { + return nurseStationClassifyUrl; + } + + public void setNurseStationClassifyUrl(String nurseStationClassifyUrl) { + this.nurseStationClassifyUrl = nurseStationClassifyUrl; + } + + public String getNurseItemClassifyUrl() { + return nurseItemClassifyUrl; + } + + public void setNurseItemClassifyUrl(String nurseItemClassifyUrl) { + this.nurseItemClassifyUrl = nurseItemClassifyUrl; + } + + public String getPosterPictureUrl() { + return posterPictureUrl; + } + + public void setPosterPictureUrl(String posterPictureUrl) { + this.posterPictureUrl = posterPictureUrl; + } + + public String getLeadThumbnailUrl() { + return leadThumbnailUrl; + } + + public void setLeadThumbnailUrl(String leadThumbnailUrl) { + this.leadThumbnailUrl = leadThumbnailUrl; + } + + + public String getPosterVideoUrl() { + return posterVideoUrl; + } + + public void setPosterVideoUrl(String posterVideoUrl) { + this.posterVideoUrl = posterVideoUrl; + } + + + public String getGroupQrCodeUrl() { + return groupQrCodeUrl; + } + + public void setGroupQrCodeUrl(String groupQrCodeUrl) { + this.groupQrCodeUrl = groupQrCodeUrl; + } + + + public String getCertificateUrl() { + return certificateUrl; + } + + public void setCertificateUrl(String certificateUrl) { + this.certificateUrl = certificateUrl; + } + + public String getPersonPictureUrl() { + return personPictureUrl; + } + + public void setPersonPictureUrl(String personPictureUrl) { + this.personPictureUrl = personPictureUrl; + } + + public String getPersonCertificateUrl() { + return personCertificateUrl; + } + + public void setPersonCertificateUrl(String personCertificateUrl) { + this.personCertificateUrl = personCertificateUrl; + } + + public String getPersonCertificateCheckUrl() { + return personCertificateCheckUrl; + } + + public void setPersonCertificateCheckUrl(String personCertificateCheckUrl) { + this.personCertificateCheckUrl = personCertificateCheckUrl; + } + + public String getTrainingCategoryPictureUrl() { + return trainingCategoryPictureUrl; + } + + public void setTrainingCategoryPictureUrl(String trainingCategoryPictureUrl) { + this.trainingCategoryPictureUrl = trainingCategoryPictureUrl; + } + + public String getTrainingItemCoverUrl() { + return trainingItemCoverUrl; + } + + public void setTrainingItemCoverUrl(String trainingItemCoverUrl) { + this.trainingItemCoverUrl = trainingItemCoverUrl; + } + + public String getTrainingItemPosterUrl() { + return trainingItemPosterUrl; + } + + public void setTrainingItemPosterUrl(String trainingItemPosterUrl) { + this.trainingItemPosterUrl = trainingItemPosterUrl; + } + + public String getTrainingItemContentUrl() { + return trainingItemContentUrl; + } + + public void setTrainingItemContentUrl(String trainingItemContentUrl) { + this.trainingItemContentUrl = trainingItemContentUrl; + } + + public String getItemDirectoryUrl() { + return itemDirectoryUrl; + } + + public void setItemDirectoryUrl(String itemDirectoryUrl) { + this.itemDirectoryUrl = itemDirectoryUrl; + } +} \ No newline at end of file diff --git a/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java b/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java index 0be737c..6b7423f 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java +++ b/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java @@ -133,4 +133,118 @@ public class Constants { */ public static final String[] JOB_ERROR_STR = {"java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", "org.springframework", "org.apache", "com.xinelu.common.utils.file"}; + + /** + * Excel文件格式后缀 + */ + public static final String XLSX = "xlsx"; + + /** + * Excel文件格式后缀 + */ + public static final String XLS = "xls"; + + /** + * 护理站模板信息下载 + */ + public static final String NURSE_STATION = "nurseStation"; + + /** + * 护理站人员模板信息下载 + */ + public static final String NURSE_STATION_PERSON = "nurseStationPerson"; + + /** + * 字符串空格标识 + */ + public static final String EMPTY = " "; + + /** + * 图片上传文件带.的 + */ + public static final String FILE_NAME_SPOT = "."; + + /** + * 护理编码前缀 + */ + public static final String PATIENT_PREFIX = "HL"; + + /** + * 护理站标签编码前缀 + */ + public static final String LABEL_CODE = "BQ"; + + /** + * 护理站图片路径上传 + */ + public static final String NURSE_STATION_TYPE = "stationPictureUrl"; + + /** + * 护理站简介附近图片路径上传 + */ + public static final String NURSE_STATION_INTRODUCE_TYPE = "stationIntroducePictureUrl"; + + /** + * 护理站项目图片路径上传 + */ + public static final String NURSE_STATION_ITEM_TYPE = "itemPictureUrl"; + + /** + * 商品图片路径上传 + */ + public static final String GOODS_PICTURE_URL = "goodsPictureUrl"; + + /** + * 用户头像修改上传 + */ + public static final String HEAD_PICTURE_URL = "headPictureUrl"; + + /** + * 商品分类图片地址 + */ + public static final String GOODS_CATEGORY_PICTURE = "goodsCategoryPicture"; + + /** + * 商品属性图片地址 + */ + public static final String ATTRIBUTE_PICTURE_URL = "attributePictureUrl"; + + /** + * 护理项目分类图标存放地址 + */ + public static final String NURSE_ITEM_CLASSIFY_URL = "nurseItemClassifyUrl"; + /** + * 护理机构分类图片识别标识 + */ + public static final String NURSE_STATION_CLASSIFY_URL = "nurseStationClassifyUrl"; + + /** + * 海报图片存放路径 + */ + public static final String POSTER_PICTURE_URL = "posterPictureUrl"; + + /** + * 资讯主缩略图地址 + */ + public static final String LEAD_THUMBNAIL_URL = "leadThumbnailUrl"; + + /** + * 护理人员证书地址 + */ + public static final String PERSON_CERTIFICATE_URL = "personCertificateUrl"; + + /** + * 健康咨询科室人员头像地址 + */ + public static final String PERSON_PICTURE_URL = "personPictureUrl"; + + /** + * 健康咨询-科室人员资质证书证书编号前缀 + */ + public static final String CERTIFICATE_URL = "certificateUrl"; + + /** + * 客服图片路径上传 + */ + public static final String GROUP_QR_CODE_URL = "groupQrCodeUrl"; } diff --git a/xinelu-common/src/main/java/com/xinelu/common/core/domain/BaseDomain.java b/xinelu-common/src/main/java/com/xinelu/common/core/domain/BaseDomain.java new file mode 100644 index 0000000..10e6354 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/core/domain/BaseDomain.java @@ -0,0 +1,65 @@ +package com.xinelu.common.core.domain; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.HashMap; +import java.util.Map; + +/** + * @Description 基础实体类 + * @Author 纪寒 + * @Date 2022-09-02 10:02:07 + * @Version 1.0 + */ +@Data +public class BaseDomain { + /** + * 搜索值 + */ + private String searchValue; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 请求参数 + */ + private Map params; + + public Map getParams() { + if (params == null) { + params = new HashMap<>(); + } + return params; + } + + public void setParams(Map params) { + this.params = params; + } +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/custominterface/Insert.java b/xinelu-common/src/main/java/com/xinelu/common/custominterface/Insert.java new file mode 100644 index 0000000..317ec01 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/custominterface/Insert.java @@ -0,0 +1,9 @@ +package com.xinelu.common.custominterface; + +/** + * @description 全局新增接口 + * @author jihan + * @date 2022-07-28 11:52:00 + */ +public interface Insert { +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/custominterface/Query.java b/xinelu-common/src/main/java/com/xinelu/common/custominterface/Query.java new file mode 100644 index 0000000..9ef1567 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/custominterface/Query.java @@ -0,0 +1,10 @@ +package com.xinelu.common.custominterface; + +/** + * @Description 全局查询接口 + * @Author 纪寒 + * @Date 2022-09-06 10:58:16 + * @Version 1.0 + */ +public interface Query { +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/custominterface/TaskInsert.java b/xinelu-common/src/main/java/com/xinelu/common/custominterface/TaskInsert.java new file mode 100644 index 0000000..a83edc1 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/custominterface/TaskInsert.java @@ -0,0 +1,8 @@ +package com.xinelu.common.custominterface; + +/** + * @author ljh + * @description 任务确认完成新增接口 + */ +public interface TaskInsert { +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/custominterface/Update.java b/xinelu-common/src/main/java/com/xinelu/common/custominterface/Update.java new file mode 100644 index 0000000..3c6d9df --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/custominterface/Update.java @@ -0,0 +1,9 @@ +package com.xinelu.common.custominterface; + +/** + * @author jihan + * @description 全局修改接口 + * @date 2022-07-28 11:52:00 + */ +public interface Update { +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/NurseClassifyInfoEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/NurseClassifyInfoEnum.java new file mode 100644 index 0000000..b601cbe --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/enums/NurseClassifyInfoEnum.java @@ -0,0 +1,31 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + + +/** + * 护理机构和护理项目分类信息类型 + * + * @author ljh + */ +@Getter +public enum NurseClassifyInfoEnum { + + + /** + * 护理机构分类 + */ + NURSE_AGENCY("NURSE_AGENCY"), + + /** + * 护理项目分类 + */ + NURSE_ITEM("NURSE_ITEM"), + ; + + final private String info; + + NurseClassifyInfoEnum(String info) { + this.info = info; + } +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/DateUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/DateUtils.java index 9c7af8d..61422da 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/utils/DateUtils.java +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/DateUtils.java @@ -1,18 +1,23 @@ package com.xinelu.common.utils; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.time.DateFormatUtils; import java.lang.management.ManagementFactory; +import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.*; -import java.util.Date; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.*; /** * 时间工具类 * - * @author xinelu + * @author xinyilu */ +@Slf4j public class DateUtils extends org.apache.commons.lang3.time.DateUtils { public static String YYYY = "yyyy"; @@ -24,7 +29,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss"; - private static String[] parsePatterns = { + private static final String[] parsePatterns = { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM", "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM", "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"}; @@ -47,27 +52,27 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { return dateTimeNow(YYYY_MM_DD); } - public static final String getTime() { + public static String getTime() { return dateTimeNow(YYYY_MM_DD_HH_MM_SS); } - public static final String dateTimeNow() { + public static String dateTimeNow() { return dateTimeNow(YYYYMMDDHHMMSS); } - public static final String dateTimeNow(final String format) { + public static String dateTimeNow(final String format) { return parseDateToStr(format, new Date()); } - public static final String dateTime(final Date date) { + public static String dateTime(final Date date) { return parseDateToStr(YYYY_MM_DD, date); } - public static final String parseDateToStr(final String format, final Date date) { + public static String parseDateToStr(final String format, final Date date) { return new SimpleDateFormat(format).format(date); } - public static final Date dateTime(final String format, final String ts) { + public static Date dateTime(final String format, final String ts) { try { return new SimpleDateFormat(format).parse(ts); } catch (ParseException e) { @@ -78,7 +83,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { /** * 日期路径 即年/月/日 如2018/08/08 */ - public static final String datePath() { + public static String datePath() { Date now = new Date(); return DateFormatUtils.format(now, "yyyy/MM/dd"); } @@ -86,7 +91,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { /** * 日期路径 即年/月/日 如20180808 */ - public static final String dateTime() { + public static String dateTime() { Date now = new Date(); return DateFormatUtils.format(now, "yyyyMMdd"); } @@ -157,4 +162,227 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { ZonedDateTime zdt = localDateTime.atZone(ZoneId.systemDefault()); return Date.from(zdt.toInstant()); } + + /** + * 转换日期到字符串 + * + * @param date LocalDate + * @param pattern 解析格式 + * @return 日期字符串 + * @Author jihan + */ + public static String formatDateToString(LocalDate date, String pattern) { + if (Objects.isNull(date)) { + throw new IllegalArgumentException("date time is null."); + } + return date.format(StringUtils.isNotBlank(pattern) ? DateTimeFormatter.ofPattern(pattern) : DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + + /** + * 获取指定日期的结束时间 + * + * @param date 指定日期,如果为null,默认为当天 + * @return 结束日期 + * @author jihan + */ + public static LocalDateTime end(LocalDate date) { + return LocalDateTime.of(null == date ? LocalDate.now() : date, LocalTime.MAX); + } + + /** + * 计算两个时间的分钟差 + * + * @param beginTime 开始时间 + * @param endTime 结束时间可以为null, 如果为null则表示now + * @return 分钟差值 + * @author jihan + */ + public static long differenceMinutes(LocalDateTime beginTime, LocalDateTime endTime) { + if (null == beginTime) { + throw new IllegalArgumentException("开始时间不能为空"); + } + return ChronoUnit.MINUTES.between(beginTime, null == endTime ? LocalDateTime.now() : endTime); + } + + /** + * 获取过去第几天的日期 + * + * @param intervals 几天 + * @return java.util.ArrayList + **/ + public static List getPastDateList(int intervals) { + List pastDaysList = new ArrayList<>(); + for (int i = 0; i < intervals; i++) { + pastDaysList.add(getPastDate(i)); + } + return pastDaysList; + } + + /** + * 获取过去第几天的日期 + * + * @param past 几天 + */ + public static LocalDate getPastDate(int past) { + Calendar calendar = Calendar.getInstance(); + calendar.set(Calendar.DAY_OF_YEAR, calendar.get(Calendar.DAY_OF_YEAR) - past); + return calendar.getTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + } + + /** + * LocalDateTime转Date + * + * @param localDateTime 日期时间 + * @return : java.util.Date + */ + public static Date localDateTimeToDate(LocalDateTime localDateTime) { + return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant()); + } + + + /** + * Date 转 LocalDateTime + * + * @param date 时间 + * @return java.time.LocalDateTime + **/ + public static LocalDateTime dateToLocalDate(Date date) { + return date.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); + } + + + /** + * String 转 LocalDateTime + * + * @param date 时间 + * @return java.time.LocalDateTime + **/ + public static LocalDateTime strToLocalDate(String date) { + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + return LocalDateTime.parse(date, df); + } + + /** + * LocalDateTime 转 String + * + * @param localDateTime 时间 + * @return java.lang.String + **/ + public static String localDateToStr(LocalDateTime localDateTime) { + DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + return df.format(localDateTime); + } + + /** + * long 转 date + * + * @param date 时间 + * @return java.util.Date + **/ + public static Date longToDate(Long date) { + return new Date(date); + } + + + /** + * 时间加分钟 + * + * @param now 时间 + * @param addDate 时间 + * @return java.util.Date + **/ + public static Date dateAdd(Date now, long addDate) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA); + return new Date(now.getTime() + addDate); + } + + + /** + * 天转分钟 + * + * @param date 时间 + * @return java.lang.Long + **/ + public static Long dateToTime(String date) { + return Long.parseLong(date) * 60 * 24; + } + + + /** + * date转long + * + * @param date 时间 + * @return long + **/ + public static long dateToLong(Date date) { + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA); + return date.getTime(); + } + + + /** + * 字符串转日期 + * + * @param str 时间 + * @return java.util.Date + **/ + public static Date strToDate(String str) { + DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA); + try { + return df.parse(str); + } catch (ParseException pe) { + log.error(pe.getMessage()); + } + return null; + } + + + /** + * 日期转字符串 + * + * @param date 时间 + * @return java.lang.String + **/ + public static String dateToStr(Date date) { + DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA); + return df.format(date); + } + + + /** + * 添加小时 + * + * @param day 时间 + * @param hour 时间 + * @return java.lang.String + **/ + public static String addDateHour(String day, int hour) { + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = null; + try { + date = format.parse(day); + } catch (Exception ex) { + ex.printStackTrace(); + } + if (date == null) { + return ""; + } + Calendar cal = Calendar.getInstance(); + cal.setTime(date); + // 24小时制 + cal.add(Calendar.HOUR, hour); + date = cal.getTime(); + cal = null; + return format.format(date); + } + + /** + * 时间戳转LocalDateTime + * + * @param timestamp 时间戳 + * @return java.time.LocalDateTime + */ + public static LocalDateTime timestampToLocalDateTime(long timestamp) { + return LocalDateTime.ofEpochSecond(timestamp / 1000, 0, ZoneOffset.ofHours(8)); + } } diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/codes/GenerateSystemCodeUtil.java b/xinelu-common/src/main/java/com/xinelu/common/utils/codes/GenerateSystemCodeUtil.java new file mode 100644 index 0000000..87131f0 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/codes/GenerateSystemCodeUtil.java @@ -0,0 +1,83 @@ +package com.xinelu.common.utils.codes; + + +import com.xinelu.common.utils.DateUtils; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.text.DecimalFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.temporal.TemporalAdjusters; +import java.util.concurrent.TimeUnit; + +/** + * @Description 编号工具类 + * @Author 纪寒 + * @Date 2022-08-02 18:13:55 + * @Version 1.0 + */ +@Component +public class GenerateSystemCodeUtil { + + @Resource + private RedisTemplate redisTemplate; + + /** + * 使用Redis生成唯一不重复的编码 + * + * @param prefixCode 编号前缀 + * @return 编号信息 MMdd + */ + public String generatePatientCode(String prefixCode) { + DecimalFormat df = new DecimalFormat("0000"); + String dateFmt = DateUtils.formatDateToString(LocalDate.now(), "MMdd"); + Long maxVal = redisTemplate.opsForValue().increment(prefixCode, 1); + //redis有效期开始时间 + LocalDateTime now = LocalDateTime.now(); + //redis有效期结束时间 + LocalDateTime end = DateUtils.end(LocalDate.now()); + redisTemplate.expire(prefixCode, DateUtils.differenceMinutes(now, end), TimeUnit.MINUTES); + return dateFmt + df.format(maxVal); + } + + + /** + * 使用Redis生成唯一不重复的编码 + * + * @param prefixCode 编号前缀 + * @return 编号信息 yyyyMMdd + */ + public String generateSystemCode(String prefixCode) { + DecimalFormat df = new DecimalFormat("0000"); + String dateFmt = DateUtils.formatDateToString(LocalDate.now(), "yyyyMMdd"); + Long maxVal = redisTemplate.opsForValue().increment(prefixCode, 1); + //redis有效期开始时间 + LocalDateTime now = LocalDateTime.now(); + //redis有效期结束时间 + LocalDateTime end = DateUtils.end(LocalDate.now()); + redisTemplate.expire(prefixCode, DateUtils.differenceMinutes(now, end), TimeUnit.MINUTES); + return dateFmt + df.format(maxVal); + + + } + + /** + * 生成科室编码 + * + * @param prefixCode 科室名称前缀 + * @return 科室编码 + */ + public String generateDepartCode(String prefixCode) { + DecimalFormat df = new DecimalFormat("00000"); + String dateFmt = DateUtils.formatDateToString(LocalDate.now(), "yyyy"); + Long maxVal = redisTemplate.opsForValue().increment(prefixCode, 1); + //redis有效期开始时间 + LocalDateTime now = LocalDateTime.now(); + //redis有效期结束时间 + LocalDateTime end = DateUtils.end(LocalDate.now().plusYears(0).with(TemporalAdjusters.lastDayOfYear())); + redisTemplate.expire(prefixCode, DateUtils.differenceMinutes(now, end), TimeUnit.MINUTES); + return dateFmt + df.format(maxVal); + } +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java index ca7b401..b432747 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java @@ -2,12 +2,14 @@ package com.xinelu.common.utils.file; import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.constant.Constants; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.file.FileNameLengthLimitExceededException; import com.xinelu.common.exception.file.FileSizeLimitExceededException; import com.xinelu.common.exception.file.InvalidExtensionException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.uuid.Seq; +import com.xinelu.common.utils.uuid.UUID; import org.apache.commons.io.FilenameUtils; import org.springframework.web.multipart.MultipartFile; @@ -22,10 +24,11 @@ import java.util.Objects; * @author xinelu */ public class FileUploadUtils { + /** * 默认大小 50M */ - public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024; + public static final long DEFAULT_MAX_SIZE = 500 * 1024 * 1024; /** * 默认的文件名最大长度 100 @@ -50,9 +53,9 @@ public class FileUploadUtils { * * @param file 上传的文件 * @return 文件名称 - * @throws Exception + * @throws IOException 异常信息 */ - public static final String upload(MultipartFile file) throws IOException { + public static String upload(MultipartFile file) throws IOException { try { return upload(getDefaultBaseDir(), file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); } catch (Exception e) { @@ -66,9 +69,9 @@ public class FileUploadUtils { * @param baseDir 相对应用的基目录 * @param file 上传的文件 * @return 文件名称 - * @throws IOException + * @throws IOException 异常信息 */ - public static final String upload(String baseDir, MultipartFile file) throws IOException { + public static String upload(String baseDir, MultipartFile file) throws IOException { try { return upload(baseDir, file, MimeTypeUtils.DEFAULT_ALLOWED_EXTENSION); } catch (Exception e) { @@ -88,18 +91,17 @@ public class FileUploadUtils { * @throws IOException 比如读写文件出错时 * @throws InvalidExtensionException 文件校验异常 */ - public static final String upload(String baseDir, MultipartFile file, String[] allowedExtension) + public static String upload(String baseDir, MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, InvalidExtensionException { - int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length(); - if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { + int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length(); + if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); } - + //校验文件大小 assertAllowed(file, allowedExtension); - + //编码文件名 String fileName = extractFilename(file); - String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath(); file.transferTo(Paths.get(absPath)); return getPathFileName(baseDir, fileName); @@ -108,14 +110,20 @@ public class FileUploadUtils { /** * 编码文件名 */ - public static final String extractFilename(MultipartFile file) { + public static String extractFilename(MultipartFile file) { return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(), FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file)); } - public static final File getAbsoluteFile(String uploadDir, String fileName) throws IOException { + /** + * 创建文件路径 + * + * @param uploadDir 路径名称 + * @param fileName 文件名称 + * @return File 文件目录 + */ + public static File getAbsoluteFile(String uploadDir, String fileName) { File desc = new File(uploadDir + File.separator + fileName); - if (!desc.exists()) { if (!desc.getParentFile().exists()) { desc.getParentFile().mkdirs(); @@ -124,7 +132,14 @@ public class FileUploadUtils { return desc; } - public static final String getPathFileName(String uploadDir, String fileName) throws IOException { + /** + * 获取文件路径 + * + * @param uploadDir 上传路径 + * @param fileName 文件名称 + * @return 文件路径 + */ + public static String getPathFileName(String uploadDir, String fileName) { int dirLastIndex = XinELuConfig.getProfile().length() + 1; String currentDir = StringUtils.substring(uploadDir, dirLastIndex); return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; @@ -134,17 +149,15 @@ public class FileUploadUtils { * 文件大小校验 * * @param file 上传的文件 - * @return * @throws FileSizeLimitExceededException 如果超出最大大小 - * @throws InvalidExtensionException + * @throws InvalidExtensionException 异常信息 */ - public static final void assertAllowed(MultipartFile file, String[] allowedExtension) + public static void assertAllowed(MultipartFile file, String[] allowedExtension) throws FileSizeLimitExceededException, InvalidExtensionException { long size = file.getSize(); if (size > DEFAULT_MAX_SIZE) { throw new FileSizeLimitExceededException(DEFAULT_MAX_SIZE / 1024 / 1024); } - String fileName = file.getOriginalFilename(); String extension = getExtension(file); if (allowedExtension != null && !isAllowedExtension(extension, allowedExtension)) { @@ -160,6 +173,9 @@ public class FileUploadUtils { } else if (allowedExtension == MimeTypeUtils.VIDEO_EXTENSION) { throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension, fileName); + } else if (allowedExtension == MimeTypeUtils.IMAGE_APK) { + throw new InvalidExtensionException.InvalidVideoExtensionException(allowedExtension, extension, + fileName); } else { throw new InvalidExtensionException(allowedExtension, extension, fileName); } @@ -169,11 +185,11 @@ public class FileUploadUtils { /** * 判断MIME类型是否是允许的MIME类型 * - * @param extension - * @param allowedExtension - * @return + * @param extension 文件类型 + * @param allowedExtension 文件类型集合 + * @return 是否正确 */ - public static final boolean isAllowedExtension(String extension, String[] allowedExtension) { + public static boolean isAllowedExtension(String extension, String[] allowedExtension) { for (String str : allowedExtension) { if (str.equalsIgnoreCase(extension)) { return true; @@ -188,11 +204,152 @@ public class FileUploadUtils { * @param file 表单文件 * @return 后缀名 */ - public static final String getExtension(MultipartFile file) { + public static String getExtension(MultipartFile file) { String extension = FilenameUtils.getExtension(file.getOriginalFilename()); if (StringUtils.isEmpty(extension)) { extension = MimeTypeUtils.getExtension(Objects.requireNonNull(file.getContentType())); } return extension; } + + + /** + * 文件上传 + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @param allowedExtension 上传文件类型 + * @return 返回上传成功的文件名 + * @throws FileSizeLimitExceededException 如果超出最大大小 + * @throws FileNameLengthLimitExceededException 文件名太长 + * @throws IOException 比如读写文件出错时 + * @throws InvalidExtensionException 文件校验异常 + */ + public static String uploadNurseStationPath(String baseDir, MultipartFile file, String[] allowedExtension) + throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, + InvalidExtensionException { + int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length(); + if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { + throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); + } + //校验文件大小 + assertAllowed(file, allowedExtension); + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String substring = uuid.substring(uuid.length() - 10); + //编码文件名 + String fileName = extractFilenames(file); + if (StringUtils.isBlank(fileName)) { + throw new ServiceException("文件名称不能为空!"); + } + //获取文件路径 + String newFileName = ""; + if (fileName.contains(Constants.FILE_NAME_SPOT)) { + String firstFileName = fileName.substring(0, fileName.indexOf(".")) + substring; + String lastFileName = fileName.substring(fileName.indexOf(".")); + newFileName = firstFileName + lastFileName; + } + if (StringUtils.isBlank(newFileName)) { + throw new ServiceException("文件名称不能为空!"); + } + String absPath = getAbsoluteFile(baseDir, newFileName).getAbsolutePath(); + file.transferTo(Paths.get(absPath)); + return getNurseStationPathFileName(baseDir, newFileName); + } + + /** + * 编码文件名 + */ + public static String extractFilenames(MultipartFile file) { + String uuid = UUID.randomUUID().toString().replaceAll("-", ""); + String substring = uuid.substring(uuid.length() - 10); + return StringUtils.format("{}/{}_{}.{}", DateUtils.datePath(), + FilenameUtils.getBaseName(substring), Seq.getId(Seq.uploadSeqType), getExtension(file)); + } + + /** + * 获取文件名称 + * + * @param uploadDir 上传路径 + * @param fileName 文件名称 + * @return 文件路径 + */ + public static String getNurseStationPathFileName(String uploadDir, String fileName) { + int dirLastIndex = XinELuConfig.getProfile().length() + 1; + String currentDir = StringUtils.substring(uploadDir, dirLastIndex); + return Constants.RESOURCE_PREFIX + "/" + currentDir + "/" + fileName; + } + + /** + * APP头像文件上传 + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @param allowedExtension 上传文件类型 + * @return 返回上传成功的文件名 + * @throws FileSizeLimitExceededException 如果超出最大大小 + * @throws FileNameLengthLimitExceededException 文件名太长 + * @throws IOException 比如读写文件出错时 + * @throws InvalidExtensionException 文件校验异常 + */ + public static String uploadPictureUrlPath(String baseDir, MultipartFile file, String[] allowedExtension) + throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, + InvalidExtensionException { + int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length(); + if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { + throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); + } + //校验文件大小 + assertAllowed(file, allowedExtension); + //编码文件名 + String fileName = extractFilenamesHear(file); + //获取文件路径 + String absPath = getAbsoluteFile(baseDir, fileName).getAbsolutePath(); + file.transferTo(Paths.get(absPath)); + return getPathFileName(baseDir, fileName); + } + + /** + * 编码文件名 + */ + public static String extractFilenamesHear(MultipartFile file) { + return StringUtils.format("{}_{}.{}", + FilenameUtils.getBaseName(file.getOriginalFilename()), Seq.getId(Seq.uploadSeqType), getExtension(file)); + } + + /** + * 护理员App上传APK + * + * @param baseDir 相对应用的基目录 + * @param file 上传的文件 + * @param allowedExtension 上传文件类型 + * @return 返回上传成功的文件名 + * @throws FileSizeLimitExceededException 如果超出最大大小 + * @throws FileNameLengthLimitExceededException 文件名太长 + * @throws IOException 比如读写文件出错时 + * @throws InvalidExtensionException 文件校验异常 + */ + public static String uploadPersonAppApkPath(String baseDir, MultipartFile file, String[] allowedExtension) + throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException, + InvalidExtensionException { + int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length(); + if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH) { + throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH); + } + //校验文件大小 + assertAllowed(file, allowedExtension); + //编码文件名 + String fileName = extractAppFilenamesHear(file); + //获取文件路径 + String absPath = getAbsoluteFile(baseDir, fileName).getPath(); + file.transferTo(Paths.get(absPath)); + return baseDir + "/" + fileName; + } + + /** + * 新增泉医到家App文件信息获取编码文件名 + */ + public static String extractAppFilenamesHear(MultipartFile file) { + return StringUtils.format("{}.{}", + FilenameUtils.getBaseName(file.getOriginalFilename()), getExtension(file)); + } } diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUtils.java index 971476b..e9f5dc9 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUtils.java +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUtils.java @@ -1,18 +1,29 @@ package com.xinelu.common.utils.file; import com.xinelu.common.config.XinELuConfig; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.uuid.IdUtils; -import org.apache.commons.io.FilenameUtils; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.compress.utils.Lists; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.*; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * 文件处理工具类 @@ -22,6 +33,16 @@ import java.nio.charset.StandardCharsets; public class FileUtils { public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+"; + /** + * 匹配content中的标签 + **/ + private static final String PATTEN_IMG = "<(img|IMG)(.*?)(/>|>|>)"; + + /** + * 匹配标签中的src + **/ + private static final String PATTEN_SRC = "(src|SRC)=(\"|\')(.*?)(\"|\')"; + /** * 输出指定文件的byte数组 * @@ -214,7 +235,7 @@ public class FileUtils { } /** - * 获取文件名称 /profile/upload/2022/04/16/xinelu.png -- xinelu.png + * 获取文件名称 /profile/upload/2022/04/16/xinyilu.png -- xinyilu.png * * @param fileName 路径名称 * @return 没有文件路径的名称 @@ -229,18 +250,127 @@ public class FileUtils { return fileName.substring(index + 1); } + /** - * 获取不带后缀文件名称 /profile/upload/2022/04/16/xinelu.png -- xinelu + * 获取img标签中的src值 * - * @param fileName 路径名称 - * @return 没有文件路径和后缀的名称 + * @param content img的内容 + * @return List */ - public static String getNameNotSuffix(String fileName) { - if (fileName == null) { - return null; + public static List getImgSrc(String content) { + if (StringUtils.isBlank(content)) { + return Lists.newArrayList(); } - String baseName = FilenameUtils.getBaseName(fileName); - return baseName; + List list = new ArrayList<>(); + //开始匹配content中的标签 + Pattern pImg = Pattern.compile(PATTEN_IMG); + Matcher mImg = pImg.matcher(content); + boolean resultImg = mImg.find(); + if (resultImg) { + while (resultImg) { + //获取到匹配的标签中的内容 + String strImg = mImg.group(2); + //开始匹配标签中的src + Pattern pSrc = Pattern.compile(PATTEN_SRC); + Matcher mSrc = pSrc.matcher(strImg); + if (mSrc.find()) { + String strSrc = mSrc.group(3); + if (StringUtils.isNotBlank(strSrc)) { + list.add(strSrc); + } + } + //匹配content中是否存在下一个标签,有则继续以上步骤匹配标签中的src + resultImg = mImg.find(); + } + } + return list; } + /** + * 删除系统富文本图片方法 + * + * @param databaseUrl 原有图片路径 + * @param afferentUrl 传值图片路径 + */ + public static void deleteTextUrl(String databaseUrl, String afferentUrl) { + //数据库中的 + List databaseImgSrc = Lists.newArrayList(); + if (StringUtils.isNotBlank(databaseUrl)) { + databaseImgSrc = FileUtils.getImgSrc(databaseUrl); + } + //前端传的 + List afferentImgSrc = Lists.newArrayList(); + if (org.apache.commons.lang3.StringUtils.isNotBlank(afferentUrl)) { + afferentImgSrc = FileUtils.getImgSrc(afferentUrl); + } + //差集不同的 + List subtractImgSrc = new ArrayList<>(CollectionUtils.subtract(databaseImgSrc, afferentImgSrc)); + if (CollectionUtils.isEmpty(subtractImgSrc)) { + return; + } + for (String pictureUrl : subtractImgSrc) { + if (org.apache.commons.lang3.StringUtils.isBlank(pictureUrl)) { + continue; + } + //修改路径 + String substring = pictureUrl.substring(pictureUrl.indexOf("/profile")); + //删除商品富文本图片 + deleteSystemFile(substring); + } + } + + /** + * 根据文件路径删除系统本地文件 + * + * @param filePath 文件路径 + */ + public static void deleteSystemFile(String filePath) { + if (StringUtils.isBlank(filePath)) { + return; + } + String picture = XinELuConfig.getProfile() + filePath.replaceAll("/profile", ""); + File checkReportNameFile = new File(picture); + if (checkReportNameFile.exists()) { + boolean delete = checkReportNameFile.delete(); + if (BooleanUtils.isFalse(delete)) { + throw new ServiceException("删除系统文件失败!"); + } + } + } + + /** + * 图片上传接口 + * + * @param uploadPathUrl 路径 + * @param multipartFile 文件 + * @return AjaxResult + * @throws Exception 异常信息 + **/ + public static AjaxResult uploadImages(String uploadPathUrl, MultipartFile multipartFile) throws Exception { + String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION); + if (org.apache.commons.lang3.StringUtils.isBlank(pictureName)) { + throw new ServiceException("图片上传失败,请联系管理员!"); + } + AjaxResult ajax = AjaxResult.success("上传成功!"); + ajax.put("imgUrl", pictureName); + return ajax; + } + + /** + * 视频上传接口 + * + * @param uploadPathUrl 路径 + * @param multipartFile 文件 + * @return AjaxResult + * @throws Exception 异常信息 + **/ + public static AjaxResult uploadVideo(String uploadPathUrl, MultipartFile multipartFile) throws Exception { + String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.VIDEO_EXTENSION); + if (org.apache.commons.lang3.StringUtils.isBlank(pictureName)) { + throw new ServiceException("视频上传失败,请联系管理员!"); + } + AjaxResult ajax = AjaxResult.success("上传成功!"); + ajax.put("imgUrl", pictureName); + return ajax; + } } diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java index 0ef3ba2..24e6ba6 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java @@ -16,12 +16,16 @@ public class MimeTypeUtils { public static final String IMAGE_GIF = "image/gif"; + public static final String MEDIA_MP4 = "video/mp4"; + + public static final String[] IMAGE_APK = {"apk"}; + public static final String[] IMAGE_EXTENSION = {"bmp", "gif", "jpg", "jpeg", "png"}; public static final String[] FLASH_EXTENSION = {"swf", "flv"}; public static final String[] MEDIA_EXTENSION = {"swf", "flv", "mp3", "wav", "wma", "wmv", "mid", "avi", "mpg", - "asf", "rm", "rmvb"}; + "asf", "rm", "rmvb", "mp4"}; public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"}; @@ -49,6 +53,8 @@ public class MimeTypeUtils { return "bmp"; case IMAGE_GIF: return "gif"; + case MEDIA_MP4: + return "mp4"; default: return ""; } diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/regex/RegexUtil.java b/xinelu-common/src/main/java/com/xinelu/common/utils/regex/RegexUtil.java new file mode 100644 index 0000000..3307e29 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/regex/RegexUtil.java @@ -0,0 +1,63 @@ +package com.xinelu.common.utils.regex; + +import com.xinelu.common.exception.ServiceException; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import java.util.regex.Pattern; + +/** + * @Description 正则表达式工具类 + * @Author 纪寒 + * @Date 2022-08-24 13:58:48 + * @Version 1.0 + */ +@Component +public class RegexUtil { + + /** + * 校验手机号码 + * + * @param phone 手机号码 + * @return 校验结果 + */ + public boolean regexPhone(String phone) { + if (StringUtils.isBlank(phone)) { + throw new ServiceException("手机号码不能为空!"); + } + //校验手机号 + String regex = "^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[2567]{1})|(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\\d{8})$"; + return Pattern.matches(regex, phone); + } + + /** + * 校验身份证号码 + * + * @param cardNo 身份证号码 + * @return 校验结果 + */ + public boolean regexCardNo(String cardNo) { + if (StringUtils.isBlank(cardNo)) { + throw new ServiceException("身份证号不能为空!"); + } + //校验身份证号码 + String regex = "(^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|" + + "(^[1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)"; + return Pattern.matches(regex, cardNo); + } + + /** + * 校验座机手机号码 + * + * @param seatNumber 座机手机号码 + * @return 校验结果 + */ + public boolean regexSeatNumber(String seatNumber) { + if (StringUtils.isBlank(seatNumber)) { + throw new ServiceException("手机号码不能为空!"); + } + //校验座机手机号 + String regex = "^(([0-9]{4,13}))"; + return Pattern.matches(regex, seatNumber); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java new file mode 100644 index 0000000..f19b99c --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java @@ -0,0 +1,208 @@ +package com.xinelu.applet.controller.nursestation; + + +import com.xinelu.applet.domain.dto.nursestation.NurseStationDTO; +import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationSysUserVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationVO; +import com.xinelu.applet.service.nursestation.INurseStationService; +import com.xinelu.common.annotation.Log; +import com.xinelu.common.constant.Constants; +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.custominterface.Update; +import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.poi.ExcelUtil; +import org.apache.commons.io.FileUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.util.ResourceUtils; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.Objects; + +/** + * 护理站信息Controller + * + * @author ljh + * @date 2022-09-02 + */ +@RestController +@RequestMapping("/system/station") +public class NurseStationController extends BaseController { + @Resource + private INurseStationService nurseStationService; + + /** + * 查询护理站信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:station:list')") + @GetMapping("/list") + public TableDataInfo list(NurseStationVO nurseStation) { + startPage(); + List list = nurseStationService.selectNurseStationList(nurseStation); + return getDataTable(list); + } + + /** + * 导出护理站信息列表 + */ + @PreAuthorize("@ss.hasPermi('system:station:export')") + @Log(title = "护理站信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, NurseStationVO nurseStation) { + List list = nurseStationService.selectNurseStationList(nurseStation); + ExcelUtil util = new ExcelUtil<>(NurseStationVO.class); + util.exportExcel(response, list, "护理站信息数据"); + } + + /** + * 获取护理站信息详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:station:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) { + return AjaxResult.success(nurseStationService.selectNurseStationById(id)); + } + + /** + * 新增护理站信息 + */ + @PreAuthorize("@ss.hasPermi('system:station:add')") + @Log(title = "护理站信息", businessType = BusinessType.INSERT) + @PostMapping("/add") + public AjaxResult add(@Validated(Insert.class) @RequestBody NurseStationDTO nurseStation) { + return nurseStationService.insertNurseStation(nurseStation); + } + + /** + * 修改护理站信息 + */ + @PreAuthorize("@ss.hasPermi('system:station:edit')") + @Log(title = "护理站信息", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + public AjaxResult edit(@Validated(Update.class) @RequestBody NurseStationDTO nurseStation) { + return nurseStationService.updateNurseStation(nurseStation); + } + + /** + * 删除护理站信息 + */ + @PreAuthorize("@ss.hasPermi('system:station:remove')") + @Log(title = "护理站信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { + return nurseStationService.deleteNurseStationByIds(ids); + } + + + /** + * 头像图片上传 + */ + @PostMapping("/updateNurseStationHeads") + public AjaxResult updateNurseStationHeads(@RequestParam("file") MultipartFile multipartFile, @RequestParam(value = "type") String type) throws Exception { + if (Objects.isNull(multipartFile) || StringUtils.isBlank(multipartFile.getOriginalFilename())) { + return AjaxResult.error("当前文件不存在,无法上传!"); + } + if (multipartFile.getOriginalFilename().contains(Constants.EMPTY)) { + return AjaxResult.error("当前文件名含有空格,请先去除空格在上传!"); + } + if (StringUtils.isBlank(type)) { + return AjaxResult.error("请选择所要上传的路径类型!"); + } + return nurseStationService.updateNurseStationHeads(multipartFile, type); + } + + + /** + * 导入护理站信息 + * + * @param file 模板文件 + * @return 导入结果 + * @throws Exception 异常信息 + */ + @PreAuthorize("@ss.hasPermi('system:station:importStationInfo')") + @Log(title = "导入护理站信息", businessType = BusinessType.IMPORT) + @PostMapping("/insertNurseStationImportList") + public AjaxResult insertNurseStationImportList(MultipartFile file) throws Exception { + //判断excel里面是否有数据/文件格式 + if (Objects.isNull(file) || StringUtils.isBlank(file.getOriginalFilename())) { + return AjaxResult.error("请选择需要导入的文件!"); + } + // 获取文件名 + String orgName = file.getOriginalFilename(); + if (!orgName.endsWith(Constants.XLSX) && !orgName.endsWith(Constants.XLS)) { + return AjaxResult.error("导入文件格式不正确,请导入xlsx或xls格式的文件!"); + } + ExcelUtil util = new ExcelUtil<>(NurseStationImportDTO.class); + List list = util.importExcel(file.getInputStream()); + return nurseStationService.insertNurseStationImportList(list); + } + + /** + * 查询护理站信息列表 + */ + @GetMapping("/getSysDictNurseTypeCode") + public List getSysDictNurseTypeCode(NurseStationVO nurseStation) { + return nurseStationService.getSysDictNurseTypeCode(nurseStation); + } + + /** + * 护理站基本信息模板 护理人员基本信息导入模板 + * + * @param fileType 文件类型 + * @param res http请求 + **/ + @RequestMapping("downloadTemplate") + public void download(@RequestParam(value = "fileType") String fileType, HttpServletResponse res) throws IOException { + if (StringUtils.isBlank(fileType)) { + throw new ServiceException("请选择文件类型!"); + } + File file = null; + if (fileType.equals(Constants.NURSE_STATION)) { + file = ResourceUtils.getFile("classpath:template/护理站基本信息模板.xlsx"); + } + if (fileType.equals(Constants.NURSE_STATION_PERSON)) { + file = ResourceUtils.getFile("classpath:template/护理站人员基本信息导入模板.xlsx"); + } + if (Objects.isNull(file)) { + throw new ServiceException("下载导入模板文件失败,请联系管理员!"); + } + res.setCharacterEncoding("UTF-8"); + res.setHeader("Content-Disposition", "inline;filename=" + fileType + ".txt"); + res.setContentType("text/plain;UTF-8"); + ServletOutputStream os = res.getOutputStream(); + byte[] bytes = FileUtils.readFileToByteArray(file); + os.write(bytes); + os.flush(); + os.close(); + } + + + /** + * 查询护理站信息列表 + */ + @GetMapping("/getNurseStationType") + public AjaxResult getNurseStationType(String nurseTypeCode) { + return nurseStationService.getNurseStationType(nurseTypeCode); + } + + /** + * 查询护理站信息列表 + */ + @GetMapping("/nurseStationByUserId") + public AjaxResult nurseStationByUserId(NurseStationSysUserVO sysUser) { + return nurseStationService.getNurseStationByUserId(sysUser); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java new file mode 100644 index 0000000..3ac2ad3 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java @@ -0,0 +1,61 @@ +package com.xinelu.applet.domain.dto.nursestation; + +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.vo.nursestation.NurseStationLabelVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import javax.validation.Valid; +import java.io.Serializable; +import java.util.List; + +/** + * @author ljh + * @version 1.0 + * Create by 2022/9/8 12:01 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class NurseStationDTO extends NurseStation implements Serializable { + private static final long serialVersionUID = 1311159088689376468L; + + /** + * 护理站的id + **/ + private Long nurseStationId; + /** + * 护理站标签信息表id集合 + **/ + List nurseStationLabelIdList; + + /** + * 护理站标签信息表集合 + **/ + @Valid + List nurseStationLabelList; + + /** + * 护理站所属护理机构分类id数组 + */ + Long[] nurseStationClassifyIds; + + /** + * 上午营业开始时间,前端传值 + */ + private String morningOpenStartTimeStr; + + /** + * 上午营业结束时间,前端传值 + */ + private String morningOpenEndTimeStr; + + /** + * 下午营业开始时间,前端传值 + */ + private String afternoonOpenStartTimeStr; + + /** + * 下午营业结束时间,前端传值 + */ + private String afternoonOpenEndTimeStr; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java new file mode 100644 index 0000000..3d3733c --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java @@ -0,0 +1,86 @@ +package com.xinelu.applet.domain.dto.nursestation; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import lombok.Data; + +import java.io.Serializable; +import java.util.Objects; + + +/** + * @author ljh + * @version 1.0 + * Create by 2022/9/16 15:08 + */ +@Data +public class NurseStationImportDTO extends BaseDomain implements Serializable { + private static final long serialVersionUID = -820358405795833252L; + /** + * 护理站名称 + */ + @Excel(name = "护理站名称") + private String nurseStationName; + + /** + * 联系电话 + */ + @Excel(name = "护理站电话") + private String phone; + + /** + * 护理站地址 + */ + @Excel(name = "护理站地址") + private String address; + + /** + * 负责人 + */ + @Excel(name = "负责人") + private String dutyPerson; + + /** + * 负责人联系电话 + */ + @Excel(name = "负责人电话") + private String dutyPhone; + + /** + * 护理站简介 + */ + @Excel(name = "护理站简介") + private String agencyIntroduce; + + /** + * 创建人Id + */ + private Long userId; + + /** + * 护理站编号 + */ + private String nurseStationCode; + + /** + * 所属区域编码 + */ + private Long areaCode; + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NurseStationImportDTO that = (NurseStationImportDTO) o; + return Objects.equals(nurseStationName, that.nurseStationName); + } + + @Override + public int hashCode() { + return Objects.hash(nurseStationName); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java new file mode 100644 index 0000000..3b0ca1c --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java @@ -0,0 +1,110 @@ +package com.xinelu.applet.domain.nurseclassifyinfo; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * 护理机构和护理项目分类信息对象 nurse_classify_info + * + * @author xinyilu + * @date 2023-02-08 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "护理机构和护理项目分类信息对象", description = "nurse_classify_info") +public class NurseClassifyInfo extends BaseDomain implements Serializable { + private static final long serialVersionUID = -5375302736623261278L; + /** + * 主键id + */ + private Long id; + + /** + * 父级分类id + */ + @ApiModelProperty(value = "父级分类id") + @Excel(name = "父级分类id") + private Long parentId; + + /** + * 分类编码 + */ + @ApiModelProperty(value = "分类编码") + @Excel(name = "分类编码") + private String classifyCode; + + /** + * 分类名称 + */ + @ApiModelProperty(value = "分类名称") + @Excel(name = "分类名称") + @Length(max = 30, message = "分类名称不能超过30个字符", groups = {Insert.class, Update.class}) + @NotBlank(message = "分类名称不能为空", groups = {Insert.class, Update.class}) + private String classifyName; + + /** + * 分类级别 + */ + @ApiModelProperty(value = "分类级别") + @Excel(name = "分类级别") + private Integer classifyLevel; + + /** + * 分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类 + */ + @ApiModelProperty(value = "分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类") + @Excel(name = "分类所属类型,NURSE_AGENCY:护理机构分类,NURSE_ITEM:护理项目分类") + private String classifyType; + + /** + * 分类图标存放地址 + */ + @ApiModelProperty(value = "分类图标存放地址") + @Excel(name = "分类图标存放地址") + @NotBlank(message = "分类图标不能为空", groups = {Insert.class, Update.class}) + private String classifyPictureUrl; + + /** + * 分类排序 + */ + @ApiModelProperty(value = "分类排序") + @Excel(name = "分类排序") + @Size(min = 0, max = 5, message = "分类排序不能超过5个字符") + private Integer classifySort; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("parentId", getParentId()) + .append("classifyCode", getClassifyCode()) + .append("classifyName", getClassifyName()) + .append("classifyLevel", getClassifyLevel()) + .append("classifyType", getClassifyType()) + .append("classifyPictureUrl", getClassifyPictureUrl()) + .append("classifySort", getClassifySort()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java new file mode 100644 index 0000000..790595d --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java @@ -0,0 +1,237 @@ +package com.xinelu.applet.domain.nursestation; + + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; +import java.time.LocalTime; + + +/** + * 护理站信息对象 nurse_station + * + * @author ljh + * @date 2022-09-02 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "护理站信息对象", description = "nurse_station") +public class NurseStation extends BaseDomain implements Serializable { + private static final long serialVersionUID = -6786694820814666195L; + /** + * 主键id + */ + private Long id; + + /** + * 所属区域编码 + */ + @ApiModelProperty(value = "所属区域编码") + @Excel(name = "所属区域编码") + @NotBlank(message = "所属区域编码不能为空", groups = {Insert.class, Update.class}) + private String areaCode; + + /** + * 创建人id + */ + @ApiModelProperty(value = "创建人id") + @Excel(name = "创建人id") + private Long userId; + + /** + * 护理站编号 + */ + @ApiModelProperty(value = "护理站编号") + @Excel(name = "护理站编号") + private String nurseStationCode; + + /** + * 护理站名称 + */ + @ApiModelProperty(value = "护理站名称") + @Excel(name = "护理站名称") + @Length(max = 100, message = "护理站名称不能超过100个字符", groups = {Insert.class, Update.class}) + @NotBlank(message = "护理站名称不能为空", groups = {Insert.class, Update.class}) + private String nurseStationName; + + /** + * 护理类型,多个用逗号隔开 + */ + @ApiModelProperty(value = "护理类型,多个用逗号隔开") + @Excel(name = "护理类型,多个用逗号隔开") + @Length(max = 200, message = "护理类型不能超过200个字符", groups = {Insert.class, Update.class}) + private String nurseStationType; + + /** + * 护理站简介 + */ + @ApiModelProperty(value = "护理站简介") + @Excel(name = "护理站简介") + @NotBlank(message = "护理站简介不能为空", groups = {Insert.class, Update.class}) + private String agencyIntroduce; + + /** + * 护理站信息总概述 + */ + @ApiModelProperty(value = "护理站信息总概述") + @Excel(name = "护理站信息总概述") + @Length(max = 200, message = "护理站信息总概述不能超过200个字符", groups = {Insert.class, Update.class}) + @NotBlank(message = "护理站信息总概述不能为空", groups = {Insert.class, Update.class}) + private String nurseStationDescription; + + /** + * 护理站经纬(横坐标) + */ + @ApiModelProperty(value = "护理站经纬") + @Excel(name = "护理站经纬", readConverterExp = "横=坐标") + @NotBlank(message = "护理站经度不能为空", groups = {Insert.class, Update.class}) + private String longitude; + + /** + * 护理站纬度(纵坐标) + */ + @ApiModelProperty(value = "护理站纬度") + @Excel(name = "护理站纬度", readConverterExp = "纵=坐标") + @NotBlank(message = "护理站纬度不能为空", groups = {Insert.class, Update.class}) + private String latitude; + + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话") + @Excel(name = "联系电话") + @Length(max = 11, message = "联系电话不能超过11个字符", groups = {Insert.class, Update.class}) + @NotBlank(message = "联系电话不能为空", groups = {Insert.class, Update.class}) + private String phone; + + /** + * 护理站地址 + */ + @ApiModelProperty(value = "护理站地址") + @Excel(name = "护理站地址") + @Length(max = 100, message = "护理站地址不能超过100个字符", groups = {Insert.class, Update.class}) + @NotBlank(message = "护理站地址不能为空", groups = {Insert.class, Update.class}) + private String address; + + /** + * 负责人 + */ + @ApiModelProperty(value = "负责人") + @Excel(name = "负责人") + @Length(max = 20, message = "负责人名称不能超过20个字符", groups = {Insert.class, Update.class}) + private String dutyPerson; + + /** + * 负责人联系电话 + */ + @ApiModelProperty(value = "负责人联系电话") + @Excel(name = "负责人联系电话") + @Length(max = 11, message = "负责人联系电话不能超过11个字符", groups = {Insert.class, Update.class}) + private String dutyPhone; + + /** + * 护理站图片路径 + */ + @ApiModelProperty(value = "护理站图片路径") + @Excel(name = "护理站图片路径") + private String stationPictureUrl; + + /** + * 护理站简介图片路径 + */ + @ApiModelProperty(value = "护理站简介图片路径") + @Excel(name = "护理站简介图片路径") + private String stationIntroducePcitureUrl; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + @NotNull(message = "排序不能为空", groups = {Insert.class, Update.class}) + @Size(min = 0, max = 5, message = "排序不能超过5个字符") + private Integer sort; + + /** + * 护理站等级,数字代表几个星 + */ + @ApiModelProperty(value = "护理站等级,数字代表几个星") + @Excel(name = "护理站等级,数字代表几个星") + private Integer nurseGrade; + + /** + * 营业概述 + */ + @ApiModelProperty(value = "营业概述") + @Excel(name = "营业概述") + private String openingHoursDescribe; + + /** + * 上午营业开始时间,格式:HH:mm:ss + */ + private LocalTime morningOpenStartTime; + + /** + * 上午营业结束时间,格式:HH:mm:ss + */ + private LocalTime morningOpenEndTime; + + /** + * 下午营业开始时间,格式:MM:dd + */ + private LocalTime afternoonOpenStartTime; + + /** + * 下午营业结束时间,格式:MM:dd + */ + private LocalTime afternoonOpenEndTime; + + /** + * 护理机构微信二维码图片存放地址 + */ + private String stationWechatCodeUrl; + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("areaCode", getAreaCode()) + .append("userId", getUserId()) + .append("nurseStationCode", getNurseStationCode()) + .append("nurseStationName", getNurseStationName()) + .append("nurseStationType", getNurseStationType()) + .append("agencyIntroduce", getAgencyIntroduce()) + .append("nurseStationDescription", getNurseStationDescription()) + .append("longitude", getLongitude()) + .append("latitude", getLatitude()) + .append("phone", getPhone()) + .append("address", getAddress()) + .append("dutyPerson", getDutyPerson()) + .append("dutyPhone", getDutyPhone()) + .append("stationPictureUrl", getStationPictureUrl()) + .append("stationIntroducePcitureUrl", getStationIntroducePcitureUrl()) + .append("sort", getSort()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java new file mode 100644 index 0000000..a180402 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java @@ -0,0 +1,62 @@ +package com.xinelu.applet.domain.nursestationclassifyrelation; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.io.Serializable; + +/** + * 护理机构所属分类关系对象 nurse_station_classify_relation + * + * @author zh + * @date 2023-02-09 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "护理机构所属分类关系对象", description = "nurse_station_classify_relation") +public class NurseStationClassifyRelation extends BaseDomain implements Serializable { + private static final long serialVersionUID = 4051724936970962134L; + /** + * 主键id + */ + private Long id; + + /** + * 护理站id + */ + @ApiModelProperty(value = "护理站id") + @Excel(name = "护理站id") + private Long nurseStationId; + + /** + * 护理站所属分类id + */ + @ApiModelProperty(value = "护理站所属分类id") + @Excel(name = "护理站所属分类id") + private Long nurseClassifyId; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("nurseStationId", getNurseStationId()) + .append("nurseClassifyId", getNurseClassifyId()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} + diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java new file mode 100644 index 0000000..50d19ff --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java @@ -0,0 +1,168 @@ +package com.xinelu.applet.domain.nursestationitem; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * 护理站护理项目对象 nurse_station_item + * + * @author ljh + * @date 2022-09-02 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "护理站护理项目对象", description = "nurse_station_item") +public class NurseStationItem extends BaseDomain implements Serializable { + private static final long serialVersionUID = -50387461159185746L; + /** + * 主键id + */ + @NotNull(message = "请选择护理站护理项目对象", groups = {Update.class}) + private Long id; + + /** + * 护理站信息表id + */ + @ApiModelProperty(value = "护理站信息表id") + @Excel(name = "护理站信息表id") + @NotNull(message = "所属护理站不能为空", groups = {Insert.class, Update.class}) + private Long nurseStationId; + + /** + * 护理类型表id + */ + @ApiModelProperty(value = "护理类型表id") + @Excel(name = "护理类型表id") + private Long nurseTypeId; + + /** + * 创建人id + */ + @ApiModelProperty(value = "创建人id") + @Excel(name = "创建人id") + private Long userId; + + /** + * 护理项目编号 + */ + @ApiModelProperty(value = "护理项目编号") + @Excel(name = "护理项目编号") + private String nurseItemCode; + + /** + * 护理项目名称 + */ + @ApiModelProperty(value = "护理项目名称") + @Excel(name = "护理项目名称") + @NotNull(message = "护理项目名称不能为空", groups = {Insert.class, Update.class}) + @Length(max = 50, message = "护理项目名称不能超过50个字符", groups = {Insert.class, Update.class}) + private String nurseItemName; + + /** + * 护理项目内容简介 + */ + @ApiModelProperty(value = "护理项目内容简介") + @Excel(name = "护理项目内容简介") + @NotNull(message = "护理项目内容简介不能为空", groups = {Insert.class, Update.class}) + private String nurseItemContent; + + /** + * 提前预约时长,单位小时 + */ + @ApiModelProperty(value = "提前预约时长,单位小时") + @Excel(name = "提前预约时长,单位小时") + private String advanceAppointDuration; + + /** + * 护理项目图片地址 + */ + @ApiModelProperty(value = "护理项目图片地址") + @Excel(name = "护理项目图片地址") + @NotNull(message = "护理项目图片地址不能为空", groups = {Insert.class, Update.class}) + @Length(max = 300, message = "护理项目图片地址不能超过300个字符", groups = {Insert.class, Update.class}) + private String itemPictureUrl; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Integer sort; + + /** + * 护理项目所属分类id` + */ + @ApiModelProperty(value = "护理项目所属分类id") + @Excel(name = "护理项目所属分类id") + private Long nurseClassifyId; + + /** + * 护理项目每个时间点的预约人数上限 + */ + @ApiModelProperty(value = "护理项目每个时间点的预约人数上限") + @Excel(name = "护理项目每个时间点的预约人数上限") + @Size(min = 0, max = 8, message = "护理项目每个时间点的预约人数上限长度不能超过8个字符") + private Integer appointmentLimitCount; + + /** + * 护理项目预约时间点间隔 半小时:HALF_HOUR,一小时:ONE_HOUR,九十分钟:NINETY_MINUTES,两小时:TWO_HOUR + */ + @ApiModelProperty(value = "护理项目预约时间点间隔") + @Excel(name = "护理项目预约时间点间隔") + @NotBlank(message = "护理项目预约时间点间隔不能为空", groups = {Insert.class, Update.class}) + private String appointmentTimeInterval; + + /** + * 护理项目所属分类名称 + */ + @ApiModelProperty(value = "护理项目所属分类名称") + @Excel(name = "护理项目所属分类名称") + private String nurseClassifyName; + + /** + * 上架状态,NOT_SHELF:未上架,SHELF:已上架 + */ + private String shelfStatus; + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("nurseStationId", getNurseStationId()) + .append("nurseTypeId", getNurseTypeId()) + .append("userId", getUserId()) + .append("nurseItemCode", getNurseItemCode()) + .append("nurseItemName", getNurseItemName()) + .append("nurseItemContent", getNurseItemContent()) + .append("advanceAppointDuration", getAdvanceAppointDuration()) + .append("itemPictureUrl", getItemPictureUrl()) + .append("sort", getSort()) + .append("nurseClassifyId", getNurseClassifyId()) + .append("appointmentLimitCount", getAppointmentLimitCount()) + .append("appointmentTimeInterval", getAppointmentTimeInterval()) + .append("nurseClassifyName", getNurseClassifyName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java new file mode 100644 index 0000000..74dbe63 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java @@ -0,0 +1,91 @@ +package com.xinelu.applet.domain.nursestationlabel; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 护理站标签信息对象 nurse_station_label + * + * @author 纪寒 + * @date 2022-09-05 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "护理站标签信息对象", description = "nurse_station_label") +public class NurseStationLabel extends BaseDomain implements Serializable { + private static final long serialVersionUID = 385185619581249467L; + /** + * 主键id + */ + private Long id; + + /** + * 护理站主表id + */ + @ApiModelProperty(value = "护理站主表id") + @Excel(name = "护理站主表id") + private Long nurseStationId; + + /** + * 创建人id + */ + @ApiModelProperty(value = "创建人id") + @Excel(name = "创建人id") + private Long userId; + + /** + * 标签编码 + */ + @ApiModelProperty(value = "标签编码") + @Excel(name = "标签编码") + private String labelCode; + + /** + * 护理站标签描述 + */ + @ApiModelProperty(value = "护理站标签描述") + @Excel(name = "护理站标签描述") + @NotBlank(message = "护理站标签描述不能为空", groups = {Insert.class, Update.class}) + private String labelDescription; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + @NotNull(message = "护理站标签排序不能为空", groups = {Insert.class, Update.class}) + private Integer sort; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("nurseStationId", getNurseStationId()) + .append("userId", getUserId()) + .append("labelCode", getLabelCode()) + .append("labelDescription", getLabelDescription()) + .append("sort", getSort()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java new file mode 100644 index 0000000..0617273 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java @@ -0,0 +1,75 @@ +package com.xinelu.applet.domain.nursetype; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * 护理类型信息对象 nurse_type + * + * @author 纪寒 + * @date 2022-09-02 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "护理类型信息对象", description = "nurse_type") +public class NurseType extends BaseDomain implements Serializable { + private static final long serialVersionUID = -9129758108652051712L; + /** + * 主键id + */ + private Long id; + + /** + * 创建人id + */ + @ApiModelProperty(value = "创建人id") + @Excel(name = "创建人id") + private Long userId; + + /** + * 护理类型编码 + */ + @ApiModelProperty(value = "护理类型编码") + @Excel(name = "护理类型编码") + private String nurseTypeCode; + + /** + * 护理类型名称 + */ + @ApiModelProperty(value = "护理类型名称") + @Excel(name = "护理类型名称") + @Length(max = 50, message = "护理类型名称不能超过50个字符", groups = {Insert.class, Update.class}) + @NotBlank(message = "护理类型名称不能为空", groups = {Insert.class, Update.class}) + private String nurseTypeName; + + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userId", getUserId()) + .append("nurseTypeCode", getNurseTypeCode()) + .append("nurseTypeName", getNurseTypeName()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java new file mode 100644 index 0000000..1a47591 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java @@ -0,0 +1,106 @@ +package com.xinelu.applet.domain.sysarea; + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 区域对象 sys_area + * + * @author jihan + * @date 2022-09-02 + */ +@EqualsAndHashCode(callSuper = true) +@Data +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "区域对象", description = "sys_area") +public class SysArea extends BaseDomain implements Serializable { + private static final long serialVersionUID = -7082314399349945860L; + /** + * 主键id + */ + @NotNull(message = "主键id不能为空", groups = {Update.class}) + private Long id; + + /** + * 父级id + */ + @ApiModelProperty(value = "父级id") + @Excel(name = "父级id") + private Long parentId; + + /** + * 区域编码 + */ + @ApiModelProperty(value = "区域编码") + @Excel(name = "区域编码") + @NotBlank(message = "区域编码不能为空", groups = {Insert.class, Update.class}) + private String areaCode; + + /** + * 区域名称 + */ + @ApiModelProperty(value = "区域名称") + @Excel(name = "区域名称") + @NotBlank(message = "区域名称不能为空", groups = {Insert.class, Update.class}) + private String areaName; + + /** + * 区域级别 + */ + @ApiModelProperty(value = "区域级别") + @Excel(name = "区域级别") + private Integer areaLevel; + + /** + * 当前区域所属上级区域编码,即:父级区域编码 + */ + @ApiModelProperty(value = "当前区域所属上级区域编码") + @Excel(name = "当前区域所属上级区域编码") + private String parentCode; + + /** + * 偏远地区标识,0:否,1:是 + */ + @ApiModelProperty(value = "偏远地区标识") + @Excel(name = "偏远地区标识") + @NotNull(message = "偏远地区标识不能为空", groups = {Insert.class, Update.class}) + private Integer remoteSigns; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + private Long sort; + + @Override + public String toString() { + return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("parentId", getParentId()) + .append("areaCode", getAreaCode()) + .append("areaName", getAreaName()) + .append("areaLevel", getAreaLevel()) + .append("sort", getSort()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java new file mode 100644 index 0000000..afdfb82 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java @@ -0,0 +1,82 @@ +package com.xinelu.applet.domain.vo.nursestation; + + +import com.xinelu.applet.domain.nurseclassifyinfo.NurseClassifyInfo; +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.util.List; + +/** + * 护理站以及起所在区域 + * + * @author ZH + * @date 2022-09-02 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class NurseStationAndAreaVO extends NurseStation implements Serializable { + private static final long serialVersionUID = -6292739444042098764L; + + /** + * 主键id + */ + private String provinceName; + + /** + * 父级id + */ + private String provinceCode; + + /** + * 主键id + */ + private String cityName; + + /** + * 父级id + */ + private String cityCode; + + /** + * 主键id + */ + private String regionName; + + /** + * 父级id + */ + private String regionCode; + + /** + * 主键id + */ + private String streetName; + + /** + * 父级id + */ + private String streetCode; + /** + * 护理站所在地区 + */ + private SysAreaVO sysAreaVOList; + + /** + * 护理站标签信息 + */ + private List nurseStationLabel; + + /** + * 护理机构分类信息 + */ + private List nurseClassifyInfoList; + + /** + * 护理站所属护理机构名称集合的字符串 + */ + private String classifyNameList; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java new file mode 100644 index 0000000..970aa5c --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java @@ -0,0 +1,30 @@ +package com.xinelu.applet.domain.vo.nursestation; + +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.util.List; + +/** + * @author wanghao + * @create 2022/9/21 0021 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class NurseStationByUserVO extends NurseStation implements Serializable { + private static final long serialVersionUID = 5831823552404704142L; + private String isAdmin; + + /** + * 护理站区域集合 + */ + List sysAreaVOList; + + /** + * 区域名称 + */ + private String areaName; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java new file mode 100644 index 0000000..e257482 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java @@ -0,0 +1,66 @@ +package com.xinelu.applet.domain.vo.nursestation; + + +import com.xinelu.common.annotation.Excel; +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.common.custominterface.Insert; +import com.xinelu.common.custominterface.Update; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @author ljh + * @version 1.0 + * Create by 2022/11/7 10:34 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class NurseStationLabelVO extends BaseDomain implements Serializable { + private static final long serialVersionUID = -6783958798607978604L; + /** + * 主键id + */ + private Long id; + + /** + * 护理站主表id + */ + @ApiModelProperty(value = "护理站主表id") + @Excel(name = "护理站主表id") + private Long nurseStationId; + + /** + * 创建人id + */ + @ApiModelProperty(value = "创建人id") + @Excel(name = "创建人id") + private Long userId; + + /** + * 标签编码 + */ + @ApiModelProperty(value = "标签编码") + @Excel(name = "标签编码") + private String labelCode; + + /** + * 护理站标签描述 + */ + @ApiModelProperty(value = "护理站标签描述") + @Excel(name = "护理站标签描述") + @NotBlank(message = "护理站标签描述不能为空", groups = {Insert.class, Update.class}) + private String labelDescription; + + /** + * 排序 + */ + @ApiModelProperty(value = "排序") + @Excel(name = "排序") + @NotNull(message = "护理站标签排序不能为空", groups = {Insert.class, Update.class}) + private Integer labelSort; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java new file mode 100644 index 0000000..3b12a00 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java @@ -0,0 +1,50 @@ +package com.xinelu.applet.domain.vo.nursestation; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author ljh + * @version 1.0 + * Create by 2022/10/26 15:03 + */ +@Data +public class NurseStationSysUserVO implements Serializable { + private static final long serialVersionUID = 882956979178904302L; + + /** + * 用户ID + */ + private Long userId; + + /** + * 用户所属护理站id集合,多个用逗号隔开 + */ + private String nurseStationIds; + + /** + * 护理站ID + */ + private Long nurseStationId; + + /** + * 护理站名称 + */ + private String nurseStationName; + + /** + * 护理站图片路径 + */ + private String stationPictureUrl; + + /** + * 护理站简介图片路径 + */ + private String stationIntroducePcitureUrl; + + /** + * 护理站简介 + */ + private String agencyIntroduce; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java new file mode 100644 index 0000000..a596580 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java @@ -0,0 +1,54 @@ +package com.xinelu.applet.domain.vo.nursestation; + + +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.nursetype.NurseType; +import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; +import java.util.List; + + +/** + * @author ljh + * @version 1.0 + * Create by 2022/9/20 14:27 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class NurseStationVO extends NurseStation implements Serializable { + + private static final long serialVersionUID = -5498280873851943793L; + + /** + * 字典表的护理类型 + **/ + private String dictName; + + /** + * 字典表的护理类型名称 + **/ + private String nurseTypeName; + + /** + * 字典表的护理类型编码 + **/ + private String nurseTypeCode; + + /** + * 护理站类型集合 + */ + List nurseTypeList; + + /** + * 护理站区域集合 + */ + List sysAreaVOList; + + /** + * 区域名称 + */ + private String areaName; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java new file mode 100644 index 0000000..7e1d718 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java @@ -0,0 +1,51 @@ +package com.xinelu.applet.domain.vo.sysarea; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description 区域信息返回值实体类 + * @Author 纪寒 + * @Date 2022-09-07 13:40:09 + * @Version 1.0 + */ +@Data +public class AreaInfoVO implements Serializable { + private static final long serialVersionUID = 1291062789068003643L; + /** + * 主键id + */ + private Long id; + + /** + * 父级id + */ + private Long parentId; + + /** + * 区域编码 + */ + private String areaCode; + + /** + * 区域名称 + */ + private String areaName; + + /** + * 区域级别 + */ + private Integer areaLevel; + + /** + * 排序 + */ + private Long sort; + + /** + * 下级区域集合 + */ + private List children; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java new file mode 100644 index 0000000..0a10ff4 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java @@ -0,0 +1,23 @@ +package com.xinelu.applet.domain.vo.sysarea; + +import com.xinelu.applet.domain.sysarea.SysArea; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.io.Serializable; + +/** + * @Description 查询区域信息及上级区域信息 + * @Author zhangHeng + * @Date 2023-1-09 + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class ParentAreaVO extends SysArea implements Serializable { + private static final long serialVersionUID = 5935612028047136844L; + + /** + * 上级区域名称 + */ + private String parentName; +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java new file mode 100644 index 0000000..a669783 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java @@ -0,0 +1,62 @@ +package com.xinelu.applet.domain.vo.sysarea; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author ljh + * @version 1.0 + * Create by 2022/9/20 17:58 + */ +@Data +public class SysAreaVO implements Serializable { + private static final long serialVersionUID = -6098312186830650793L; + + /** + * 省名称 + */ + private String provinceName; + + /** + * 省区域编码 + */ + private String provinceCode; + + /** + * 市名称 + */ + private String cityName; + + /** + * 市区域编码 + */ + private String cityCode; + + /** + * 区域名称 + */ + private String regionName; + + /** + * 区区域编码 + */ + private String regionCode; + + /** + * 街道名称 + */ + private String streetName; + + /** + * 街道区域编码 + */ + private String streetCode; + + + /** + * 街道区域编码 + */ + private String areaCode; + +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java new file mode 100644 index 0000000..b52d71c --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java @@ -0,0 +1,257 @@ +package com.xinelu.applet.mapper.nursestation; + + +import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.nursestationitem.NurseStationItem; +import com.xinelu.applet.domain.nursestationlabel.NurseStationLabel; +import com.xinelu.applet.domain.nursetype.NurseType; +import com.xinelu.applet.domain.vo.nursestation.NurseStationAndAreaVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationByUserVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationSysUserVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationVO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 护理站信息Mapper接口 + * + * @author ljh + * @date 2022-09-02 + */ +public interface NurseStationMapper { + /** + * 查询护理站信息 + * + * @param id 护理站信息主键 + * @return 护理站信息 + */ + NurseStationAndAreaVO selectNurseStationById(Long id); + + /** + * 查询护理站信息列表 + * + * @param nurseStation 护理站信息 + * @return 护理站信息集合 + */ + List selectNurseStationList(NurseStationVO nurseStation); + + + /** + * 查询护理站信息列表 + * + * @param nurseStation 输入参数 + * @return 护理站列表信息 + */ + List selectNurseStationListByUser(NurseStation nurseStation); + + + /** + * 通过护理站名称集合查询数据 + * + * @param nurseStationIdList 护理站id集合 + * @param nurseStationCode 护理站编码 + * @param nurseStationName 护理站名称 + * @return 列表信息 + */ + List selectNurseStationListByIds(@Param("nurseStationIdList") List nurseStationIdList, + @Param("nurseStationCode") String nurseStationCode, + @Param("nurseStationName") String nurseStationName); + + /** + * 新增护理站信息 + * + * @param nurseStation 护理站信息 + * @return 结果 + */ + int insertNurseStation(NurseStation nurseStation); + + /** + * 修改护理站信息 + * + * @param nurseStation 护理站信息 + * @return 结果 + */ + int updateNurseStation(NurseStation nurseStation); + + /** + * 删除护理站信息 + * + * @param id 护理站信息主键 + * @return 结果 + */ + int deleteNurseStationById(Long id); + + /** + * 批量删除护理站信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteNurseStationByIds(Long[] ids); + + /** + * 修改护理站图片路径 + * + * @param nurseStationCode 护理站编号 + * @param stationPictureUrl 护理站头像图片地址 + * @return int + **/ + int updateNurseStationByHead(@Param("nurseStationCode") String nurseStationCode, @Param("stationPictureUrl") String stationPictureUrl); + + /** + * 修改护理站简介图片路径 + * + * @param nurseStationCode 护理站编号 + * @param stationIntroducePcitureUrl 护理站图片路径 + * @return int + **/ + int updateNurseStationIntroduceByHead(@Param("nurseStationCode") String nurseStationCode, @Param("stationIntroducePcitureUrl") String stationIntroducePcitureUrl); + + + /** + * 修改护理站项目头像图片 + * + * @param nurseItemCode 护理项目编号 + * @param itemPictureUrl 护理项目图片地址 + * @return int + **/ + int updateNurseStationItemByHead(@Param("nurseItemCode") String nurseItemCode, @Param("itemPictureUrl") String itemPictureUrl); + + + /** + * 根据护理项目编号查询护理站信息 + * + * @param nurseItemCode 护理站项目编号 + * @return com.xinyilu.base.domain.nursestationitem.NurseStationItem + **/ + NurseStationItem getNurseItemCode(String nurseItemCode); + + /** + * 根据护理站编号查询所有信息 + * + * @param nurseStationCode 护理站编号 + * @return com.xinyilu.base.domain.nursestation.NurseStation + **/ + NurseStation getNurseStationCode(String nurseStationCode); + + + /** + * 根据护理站名称查询护理站信息列表 + * + * @param nurseStationIdList 护理站信息 + * @return 护理站信息集合 + */ + List selectNurseStationListByNames(@Param("nurseStationIdList") List nurseStationIdList); + + /** + * 护理站信息导入 + * + * @param nurseStation 护理站信息 + * @return int + **/ + int insertNurseStationImportList(List nurseStation); + + /** + * 查询护理站名称是否重复 + * + * @param areaCode 所属区域编码 + * @param nurseStationName 护理站名称 + * @return int + **/ + int getNurseStationName(@Param("areaCode") String areaCode, @Param("nurseStationName") String nurseStationName); + + /** + * 获取字典中的护理类型编码 + * + * @param nurseStation 护理站字典信息 + * @return com.xinyilu.base.vo.nursestation.NurseStationVO + **/ + List getSysDictNurseTypeCode(NurseStationVO nurseStation); + + + /** + * 根据护理站id删除护理站标签信息 + * + * @param ids 需要删除的数据主键集合 + * @return int 结果 + **/ + int deleteNurseStationLabelByIds(Long[] ids); + + + /** + * 根据护理站id查询护理站标签信息 + * + * @param ids 护理站id + * @return int id + **/ + int selectNurseStationLabelByIds(Long[] ids); + + + /** + * 根据护理站类型编码查询护理站类型名称 + * + * @param nurseTypeCodeList 护理站类型编码 + * @return java.util.List + **/ + List getNurseStationType(@Param("nurseTypeCodeList") List nurseTypeCodeList); + + + /** + * 查询护理站标签信息 + * + * @param nurseStationId 护理站信息主键 + * @return 护理站标签信息 + */ + List selectStationLabelByStationId(Long nurseStationId); + + /** + * 根据用户id查询护理站 + * + * @param sysUser 用户信息 + * @return java.util.List + **/ + NurseStationSysUserVO getNurseStationByUserId(NurseStationSysUserVO sysUser); + + /** + * 根据用户id查询护理站 + * + * @param nurseStationIdsList 用户信息 + * @return java.util.List + **/ + List getNurseStationIds(@Param("nurseStationIdsList") List nurseStationIdsList); + + /** + * 查询所有的护理站列表信息 + * + * @param nurseStationNames 护理站名称集合 + * @return 列表集合信息 + */ + List getAllNurseStationInfo(@Param("nurseStationNameList") List nurseStationNames); + + /** + * 根据护理站id查询护理站信息是否存在 + * + * @param idList 护理站id + * @return 护理站个数 + */ + int getNurseStationCount(@Param("idList") List idList); + + /** + * 根据id查询护理站表信息 + * + * @param stationId 护理站id + * @return 护理站信息 + */ + NurseStation getNurseStationById(Long stationId); + + /** + * 修改机构二维码地址信息 + * + * @param stationId 机构id + * @param stationWeChatCodeUrl 机构二维码地址 + * @return 数量 + */ + int updateStationWeChatCodeUrl(@Param("stationId") Long stationId, @Param("stationWeChatCodeUrl") String stationWeChatCodeUrl); +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java new file mode 100644 index 0000000..9fcd8cc --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java @@ -0,0 +1,103 @@ +package com.xinelu.applet.mapper.nursestationclassifyrelation; + + +import com.xinelu.applet.domain.nursestationclassifyrelation.NurseStationClassifyRelation; + +import java.util.List; + +/** + * 护理机构所属分类关系Mapper接口 + * + * @author zh + * @date 2023-02-09 + */ +public interface NurseStationClassifyRelationMapper { + /** + * 查询护理机构所属分类关系 + * + * @param id 护理机构所属分类关系主键 + * @return 护理机构所属分类关系 + */ + NurseStationClassifyRelation selectNurseStationClassifyRelationById(Long id); + + /** + * 查询护理机构所属分类关系列表 + * + * @param nurseStationClassifyRelation 护理机构所属分类关系 + * @return 护理机构所属分类关系集合 + */ + List selectNurseStationClassifyRelationList(NurseStationClassifyRelation nurseStationClassifyRelation); + + /** + * 新增护理机构所属分类关系 + * + * @param nurseStationClassifyRelation 护理机构所属分类关系 + * @return 结果 + */ + int insertNurseStationClassifyRelation(NurseStationClassifyRelation nurseStationClassifyRelation); + + /** + * 修改护理机构所属分类关系 + * + * @param nurseStationClassifyRelation 护理机构所属分类关系 + * @return 结果 + */ + int updateNurseStationClassifyRelation(NurseStationClassifyRelation nurseStationClassifyRelation); + + /** + * 删除护理机构所属分类关系 + * + * @param id 护理机构所属分类关系主键 + * @return 结果 + */ + int deleteNurseStationClassifyRelationById(Long id); + + /** + * 批量删除护理机构所属分类关系 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteNurseStationClassifyRelationByIds(Long[] ids); + + /** + * 批量新增护理机构所属分类关系 + * + * @param nurseStationClassifyRelationList 护理机构所属分类集合 + * @return 结果 + */ + int insertNurseStationClassifyRelationList(List nurseStationClassifyRelationList); + + /** + * 查询护理机构是否有分类 + * + * @param nurseStationId 护理站id + * @return 数量 + */ + int selectNurseStationClassifyRelationByStationId(Long nurseStationId); + + /** + * 查询护理机构是否有分类 + * + * @param nurseStationId 护理站id + * @return 数量 + */ + int selectNurseStationClassifyRelationByStationIds(Long[] nurseStationId); + + /** + * 根据护理站id批量删除护理机构所属分类关系 + * + * @param nurseStationId 护理站id + * @return 结果 + */ + int deleteStationClassifyRelationByStationId(Long nurseStationId); + + /** + * 根据护理站id批量删除护理机构所属分类关系 + * + * @param nurseStationId 护理站id + * @return 结果 + */ + int deleteStationClassifyRelationByStationIds(Long[] nurseStationId); +} + diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml new file mode 100644 index 0000000..e9854c3 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + select id, nurse_station_id, nurse_classify_id, create_by, create_time, update_by, update_time + from nurse_station_classify_relation + + + + + + + + insert into nurse_station_classify_relation + + nurse_station_id, + + nurse_classify_id, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{nurseStationId}, + + #{nurseClassifyId}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update nurse_station_classify_relation + + nurse_station_id = + #{nurseStationId}, + + nurse_classify_id = + #{nurseClassifyId}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from nurse_station_classify_relation + where id = #{id} + + + + delete from nurse_station_classify_relation where id in + + #{id} + + + + + insert into nurse_station_classify_relation ( + nurse_station_id, + nurse_classify_id, + create_by, + create_time + ) + values + + ( + #{nurseStationClassifyRelationList.nurseStationId}, + #{nurseStationClassifyRelationList.nurseClassifyId}, + #{nurseStationClassifyRelationList.createBy}, + #{nurseStationClassifyRelationList.createTime} + ) + + + + + + + + + delete + from nurse_station_classify_relation + where nurse_station_id = #{nurseStationId} + + + + delete + from nurse_station_classify_relation + where nurse_station_id in + + #{nurseStationId} + + + \ No newline at end of file diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java new file mode 100644 index 0000000..ce8ffa8 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java @@ -0,0 +1,87 @@ +package com.xinelu.applet.mapper.nursestationlabel; + +import com.xinelu.applet.domain.nursestationlabel.NurseStationLabel; +import com.xinelu.applet.domain.vo.nursestation.NurseStationLabelVO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 护理站标签信息Mapper接口 + * + * @author 纪寒 + * @date 2022-09-05 + */ +public interface NurseStationLabelMapper { + /** + * 查询护理站标签信息 + * + * @param id 护理站标签信息主键 + * @return 护理站标签信息 + */ + NurseStationLabel selectNurseStationLabelById(Long id); + + /** + * 查询护理站标签信息列表 + * + * @param nurseStationLabel 护理站标签信息 + * @return 护理站标签信息集合 + */ + List selectNurseStationLabelList(NurseStationLabel nurseStationLabel); + + /** + * 新增护理站标签信息 + * + * @param nurseStationLabel 护理站标签信息 + * @return 结果 + */ + int insertNurseStationLabel(NurseStationLabel nurseStationLabel); + + /** + * 修改护理站标签信息 + * + * @param nurseStationLabel 护理站标签信息 + * @return 结果 + */ + int updateNurseStationLabel(NurseStationLabel nurseStationLabel); + + /** + * 删除护理站标签信息 + * + * @param id 护理站标签信息主键 + * @return 结果 + */ + int deleteNurseStationLabelById(Long id); + + /** + * 批量删除护理站标签信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteNurseStationLabelByIds(Long[] ids); + + /** + * 根据护理站id 查询护理站标签信息 + * + * @param nurseStationId 护理站id + * @return int + **/ + int getNurseStationLabelStationId(Long nurseStationId); + + /** + * 根据护理站id 删除护理站标签信息 + * + * @param nurseStationId 护理站id + * @return int + **/ + int deleteNurseStationLabelStationId(Long nurseStationId); + + /** + * 批量新增护理站标签信息 + * + * @param nurseStationLabelList 护理站标签信息集合 + * @return 结果 + */ + int insertBatchNurseStationLabel(@Param("nurseStationLabelList") List nurseStationLabelList); +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.xml b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.xml new file mode 100644 index 0000000..d0fc2b9 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.xml @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + + select id, + nurse_station_id, + user_id, + label_code, + label_description, + sort, + create_by, + create_time, + update_by, + update_time + from nurse_station_label + + + + + + + + insert into nurse_station_label + + nurse_station_id, + + user_id, + + label_code, + + label_description, + + sort, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{nurseStationId}, + + #{userId}, + + #{labelCode}, + + #{labelDescription}, + + #{sort}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update nurse_station_label + + nurse_station_id = + #{nurseStationId}, + + user_id = + #{userId}, + + label_code = + #{labelCode}, + + label_description = + #{labelDescription}, + + sort = + #{sort}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from nurse_station_label + where id = #{id} + + + + delete from nurse_station_label where id in + + #{id} + + + + + + + + DELETE + FROM nurse_station_label + WHERE nurse_station_id = #{nurseStationId} + + + + insert into nurse_station_label( + nurse_station_id, + user_id, + label_code, + label_description, + sort, + create_by, + create_time + ) values + + ( + #{label.nurseStationId}, + #{label.userId}, + #{label.labelCode}, + #{label.labelDescription}, + #{label.labelSort}, + #{label.createBy}, + #{label.createTime} + ) + + + diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java new file mode 100644 index 0000000..1f41233 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java @@ -0,0 +1,123 @@ +package com.xinelu.applet.mapper.sysarea; + +import com.xinelu.applet.domain.sysarea.SysArea; +import com.xinelu.applet.domain.vo.sysarea.AreaInfoVO; +import com.xinelu.applet.domain.vo.sysarea.ParentAreaVO; +import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 区域Mapper接口 + * + * @author jihan + * @date 2022-09-02 + */ +public interface SysAreaMapper { + + /** + * 查询区域 + * + * @param id 区域主键 + * @param areaCode 区域 + * @return 区域 + */ + SysArea selectSysAreaById(@Param("id") Long id, @Param("areaCode") String areaCode); + + /** + * 查询区域列表 + * + * @param sysArea 区域 + * @return 区域集合 + */ + List selectSysAreaList(SysArea sysArea); + + /** + * 新增区域 + * + * @param sysArea 区域 + * @return 结果 + */ + int insertSysArea(SysArea sysArea); + + /** + * 修改区域 + * + * @param sysArea 区域 + * @return 结果 + */ + int updateSysArea(SysArea sysArea); + + /** + * 删除区域 + * + * @param id 区域主键 + * @return 结果 + */ + int deleteSysAreaById(Long id); + + /** + * 批量删除区域 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + int deleteSysAreaByIds(Long[] ids); + + /** + * 根据区域编码查询对应得市级区域信息 + * + * @param areaCode 区域编码 + * @return 市级区域集合 + */ + List getCityInfoList(@Param("areaCode") String areaCode, @Param("remoteSigns") Integer remoteSigns); + + /** + * 根据父id查询街道信息集合 + * + * @param parentIdList 父id集合 + * @return 街道集合 + */ + List getStreetInfoList(@Param("parentIdList") List parentIdList); + + /** + * 下级区域寻找上级区域 + * + * @param areaCode 区域编码 + * @return com.xinyilu.base.domain.vo.sysarea.SysAreaVO + **/ + SysAreaVO getSubordinateRegionsFindSuperiorRegions(@Param("areaCode") String areaCode); + + /** + * 区域编码的集合 + * + * @param areaCodeList 区域编码的集合 + * @return java.util.List + **/ + List getNurseStationAreaByList(@Param("areaCodeList") List areaCodeList); + + /** + * 区域编码的 + * + * @param areaCode 区域编码的集合 + * @return java.util.List + **/ + SysAreaVO getNurseStationAreaByCode(@Param("areaCode") String areaCode); + + /** + * 小程序商品修改用户地址地址区域编码的集合(街道) + * + * @param areaCodeList 区域编码的集合 + * @return java.util.List + **/ + List getNurseStationGoodsAreaByList(@Param("areaCodeList") List areaCodeList); + + /** + * 查询本级区域信息及上级区域信息 + * + * @param id 区域主键 + * @return ParentAreaVO + */ + ParentAreaVO selectParentName(Long id); +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java new file mode 100644 index 0000000..086ce01 --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java @@ -0,0 +1,152 @@ +package com.xinelu.applet.service.nursestation; + + +import com.xinelu.applet.domain.dto.nursestation.NurseStationDTO; +import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.nursestationitem.NurseStationItem; +import com.xinelu.applet.domain.vo.nursestation.NurseStationAndAreaVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationByUserVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationSysUserVO; +import com.xinelu.applet.domain.vo.nursestation.NurseStationVO; +import com.xinelu.common.core.domain.AjaxResult; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * 护理站信息Service接口 + * + * @author ljh + * @date 2022-09-02 + */ +public interface INurseStationService { + /** + * 查询护理站信息 + * + * @param id 护理站信息主键 + * @return 护理站信息 + */ + NurseStationAndAreaVO selectNurseStationById(Long id); + + /** + * 查询护理站信息列表 + * + * @param nurseStation 护理站信息 + * @return 护理站信息集合 + */ + List selectNurseStationList(NurseStationVO nurseStation); + + /** + * 查询所有护理站列列表信息 + * + * @param nurseStation 查询参数 + * @return 护理站列表信息 + */ + List selectNurseStationListByUser(NurseStation nurseStation); + + /** + * 查询用户绑定的护理站列表信息 + * + * @param nurseStationIdList 护理站id集合 + * @param nurseStation 查询条件信息 + * @return 护理站列表信息 + */ + List selectNurseStationListByIds(List nurseStationIdList, NurseStation nurseStation); + + /** + * 新增护理站信息 + * + * @param nurseStation 护理站信息 + * @return 结果 + */ + AjaxResult insertNurseStation(NurseStationDTO nurseStation); + + /** + * 修改护理站信息 + * + * @param nurseStation 护理站信息 + * @return 结果 + */ + AjaxResult updateNurseStation(NurseStationDTO nurseStation); + + /** + * 批量删除护理站信息 + * + * @param ids 需要删除的护理站信息主键集合 + * @return 结果 + */ + AjaxResult deleteNurseStationByIds(Long[] ids); + + /** + * 删除护理站信息信息 + * + * @param id 护理站信息主键 + * @return 结果 + */ + int deleteNurseStationById(Long id); + + /** + * 根据护理项目编号查询护理站信息 + * + * @param nurseItemCode 护理项目编号 + * @return com.xinyilu.base.domain.nursestationitem.NurseStationItem + **/ + NurseStationItem getNurseItemCode(String nurseItemCode); + + /** + * 根据护理站编号查询所有信息 + * + * @param nurseStationCode 护理站编号 + * @return com.xinyilu.base.domain.nursestation.NurseStation + **/ + NurseStation getNurseStationCode(String nurseStationCode); + + /** + * 头像图片接口 + * + * @param multipartFile 文件 + * @return com.xinyilu.common.core.domain.AjaxResult + **/ + AjaxResult updateNurseStationHeads(MultipartFile multipartFile, String type) throws Exception; + + /** + * 护理站信息导入 + * + * @param nurseStation 护理站信息 + * @return int + **/ + AjaxResult insertNurseStationImportList(List nurseStation); + + /** + * 获取字典中的护理类型编码 + * + * @param nurseStation 护理站字典信息 + * @return com.xinyilu.base.vo.nursestation.NurseStationVO + **/ + List getSysDictNurseTypeCode(NurseStationVO nurseStation); + + /** + * 根据护理站类型编码查询护理站类型名称 + * + * @param nurseTypeCode 护理站类型编码 + * @return java.util.List + **/ + AjaxResult getNurseStationType(String nurseTypeCode); + + /** + * 根据用户id查询护理站 + * + * @param sysUser 用户信息 + * @return java.util.List + **/ + AjaxResult getNurseStationByUserId(NurseStationSysUserVO sysUser); + + /** + * 根据护理站id查询护理站信息是否存在 + * + * @param idList 护理站信息主键 + * @return 护理站信息 + */ + int getNurseStationById(List idList); +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java new file mode 100644 index 0000000..49d5e3c --- /dev/null +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java @@ -0,0 +1,786 @@ +package com.xinelu.applet.service.nursestation.impl; + +import com.xinelu.applet.domain.dto.nursestation.NurseStationDTO; +import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.applet.domain.nurseclassifyinfo.NurseClassifyInfo; +import com.xinelu.applet.domain.nursestation.NurseStation; +import com.xinelu.applet.domain.nursestationclassifyrelation.NurseStationClassifyRelation; +import com.xinelu.applet.domain.nursestationitem.NurseStationItem; +import com.xinelu.applet.domain.nursetype.NurseType; +import com.xinelu.applet.domain.vo.nursestation.*; +import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import com.xinelu.applet.mapper.nursestation.NurseStationMapper; +import com.xinelu.applet.mapper.nursestationclassifyrelation.NurseStationClassifyRelationMapper; +import com.xinelu.applet.mapper.nursestationlabel.NurseStationLabelMapper; +import com.xinelu.applet.mapper.sysarea.SysAreaMapper; +import com.xinelu.applet.service.nursestation.INurseStationService; +import com.xinelu.common.config.AppletPageConfig; +import com.xinelu.common.config.XinELuConfig; +import com.xinelu.common.constant.Constants; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.enums.NurseClassifyInfoEnum; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.codes.GenerateSystemCodeUtil; +import com.xinelu.common.utils.file.FileUploadUtils; +import com.xinelu.common.utils.file.FileUtils; +import com.xinelu.common.utils.file.MimeTypeUtils; +import com.xinelu.common.utils.regex.RegexUtil; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.io.File; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 护理站信息Service业务层处理 + * + * @author ljh + * @date 2022-09-02 + */ +@Service +public class NurseStationServiceImpl implements INurseStationService { + @Resource + private RegexUtil regexUtil; + @Resource + private NurseStationMapper nurseStationMapper; + @Resource + private NurseStationLabelMapper nurseStationLabelMapper; + @Resource + private GenerateSystemCodeUtil generateSystemCodeUtil; + @Resource + private XinELuConfig xinELuConfig; + @Resource + private SysAreaMapper sysAreaMapper; + @Resource + private NurseStationClassifyRelationMapper stationClassifyRelationMapper; + @Resource + private AppletPageConfig appletPageConfig; + + /** + * 护理站营业时间默认值 + */ + private static final String OPEN_TIME = "00:00:00"; + + /** + * 获取小程序二维码接口失败标识 + */ + private static final String FAIL = "FAIL"; + + /** + * 返回成功状态码 + */ + private static final int SUCCESS_CODE = 0; + + /** + * 查询护理站信息 + * + * @param id 护理站信息主键 + * @return 护理站信息 + */ + @Override + public NurseStationAndAreaVO selectNurseStationById(Long id) { + // 根据护理站id查询护理站所属护理机构 + NurseStationAndAreaVO nurseStation = nurseStationMapper.selectNurseStationById(id); + //筛选护理站所属护理机构列表 + List nurseClassifyInfoList = nurseStation.getNurseClassifyInfoList().stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotBlank(item.getClassifyType()) && item.getClassifyType().equals(NurseClassifyInfoEnum.NURSE_AGENCY.getInfo())).collect(Collectors.toList()); + if (CollectionUtils.isNotEmpty(nurseClassifyInfoList)) { + nurseStation.setNurseClassifyInfoList(nurseClassifyInfoList); + } + //用逗号分割护理机构名称为字符串 + StringJoiner stringJoiner = new StringJoiner(","); + nurseClassifyInfoList.forEach(s -> stringJoiner.add(s.getClassifyName())); + String classifyNameList = stringJoiner.toString(); + //回显护理站所属护理机构的字符串 + nurseStation.setClassifyNameList(classifyNameList); + if (StringUtils.isNotBlank(nurseStation.getAreaCode())) { + SysAreaVO nurseStationAndAreaCode = sysAreaMapper.getSubordinateRegionsFindSuperiorRegions(nurseStation.getAreaCode()); + nurseStation.setProvinceCode(StringUtils.isBlank(nurseStationAndAreaCode.getProvinceCode()) ? "" : nurseStationAndAreaCode.getProvinceCode()); + nurseStation.setProvinceName(StringUtils.isBlank(nurseStationAndAreaCode.getProvinceName()) ? "" : nurseStationAndAreaCode.getProvinceName()); + nurseStation.setCityCode(StringUtils.isBlank(nurseStationAndAreaCode.getCityCode()) ? "" : nurseStationAndAreaCode.getCityCode()); + nurseStation.setCityName(StringUtils.isBlank(nurseStationAndAreaCode.getCityName()) ? "" : nurseStationAndAreaCode.getCityName()); + nurseStation.setRegionCode(StringUtils.isBlank(nurseStationAndAreaCode.getRegionCode()) ? "" : nurseStationAndAreaCode.getRegionCode()); + nurseStation.setRegionName(StringUtils.isBlank(nurseStationAndAreaCode.getRegionName()) ? "" : nurseStationAndAreaCode.getRegionName()); + nurseStation.setStreetCode(StringUtils.isBlank(nurseStationAndAreaCode.getStreetCode()) ? "" : nurseStationAndAreaCode.getStreetCode()); + nurseStation.setStreetName(StringUtils.isBlank(nurseStationAndAreaCode.getStreetName()) ? "" : nurseStationAndAreaCode.getStreetName()); + } + return nurseStation; + } + + /** + * 查询护理站信息列表 + * + * @param nurseStation 护理站信息 + * @return 护理站信息 + */ + @Override + public List selectNurseStationList(NurseStationVO nurseStation) { + // 查询护理站的信息 + List nurseStationList = nurseStationMapper.selectNurseStationList(nurseStation); + //获取所有的护理站的区域编码 + List areaCodeList = nurseStationList + .stream().filter(Objects::nonNull) + .map(NurseStationVO::getAreaCode) + .filter(StringUtils::isNotBlank).distinct().collect(Collectors.toList()); + if (CollectionUtils.isEmpty(areaCodeList)) { + return nurseStationList; + } + // 获取本护理站的区域信息 + List nurseStationAreaByList = sysAreaMapper.getNurseStationAreaByList(areaCodeList); + if (CollectionUtils.isEmpty(nurseStationAreaByList)) { + return nurseStationList; + } + Map collect = nurseStationAreaByList.stream().filter(item -> Objects.nonNull(item.getStreetCode())).collect(Collectors.toMap(SysAreaVO::getStreetCode, item -> item)); + nurseStationList.forEach(item -> { + SysAreaVO orDefault = collect.getOrDefault(item.getAreaCode(), new SysAreaVO()); + item.setAreaName(orDefault.getProvinceName() + "-" + orDefault.getCityName() + "-" + orDefault.getRegionName() + "-" + orDefault.getStreetName()); + }); + return nurseStationList; + } + + /** + * 查询所有护理站列列表信息 + * + * @param nurseStation 查询参数 + * @return 护理站列表信息 + */ + @Override + public List selectNurseStationListByUser(NurseStation nurseStation) { + return nurseStationMapper.selectNurseStationListByUser(nurseStation); + } + + /** + * 查询用户绑定的护理站列表信息 + * + * @param nurseStationIdList 护理站id集合 + * @param nurseStation 查询参数 + * @return 护理站列表信息 + */ + @Override + public List selectNurseStationListByIds(List nurseStationIdList, NurseStation nurseStation) { + //护理站名称 + String nurseStationName = StringUtils.isBlank(nurseStation.getNurseStationName()) ? "" : nurseStation.getNurseStationName(); + //护理站编码 + String nurseStationCode = StringUtils.isBlank(nurseStation.getNurseStationCode()) ? "" : nurseStation.getNurseStationCode(); + return nurseStationMapper.selectNurseStationListByIds(nurseStationIdList, nurseStationCode, nurseStationName); + } + + /** + * 新增护理站信息 + * + * @param nurseStation 护理站信息 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public AjaxResult insertNurseStation(NurseStationDTO nurseStation) { + //校验电话 + AjaxResult checkPhone = checkPhone(nurseStation); + if (Objects.nonNull(checkPhone)) { + return checkPhone; + } + //校验营业时间 + AjaxResult checkOpenTime = checkOpenTime(nurseStation); + if (Objects.nonNull(checkOpenTime)) { + return checkOpenTime; + } + // 查询判断护理站名称是否重复 + int nurseStationName = nurseStationMapper.getNurseStationName(nurseStation.getAreaCode(), nurseStation.getNurseStationName()); + if (nurseStationName > 0) { + throw new ServiceException("此区域已有相同的护理站名称:" + nurseStation.getNurseStationName() + ",请重新输入!"); + } + // 设置创建人与创建时间 + nurseStation.setUserId(SecurityUtils.getUserId()); + nurseStation.setCreateBy(SecurityUtils.getUsername()); + nurseStation.setCreateTime(LocalDateTime.now()); + //设置营业时间 + this.setBusinessHours(nurseStation); + //护理站编码 生成有效唯一的编码 + nurseStation.setNurseStationCode(Constants.PATIENT_PREFIX + generateSystemCodeUtil.generateSystemCode(Constants.PATIENT_PREFIX)); + // 新增护理站信息 + int insertNurseStation = nurseStationMapper.insertNurseStation(nurseStation); + if (insertNurseStation <= 0) { + throw new ServiceException("新增护理站信息失败,请联系管理员!"); + } + if (Objects.isNull(nurseStation.getId())) { + throw new ServiceException("新增护理站信息失败,请联系管理员!"); + } + // 新增护理站标签信息 + if (CollectionUtils.isEmpty(nurseStation.getNurseStationLabelList())) { + return AjaxResult.success(); + } + this.insertNurseStationLabelLists(nurseStation.getNurseStationLabelList(), nurseStation.getId()); + //新增护理机构分类关系表 + if (nurseStation.getNurseStationClassifyIds().length == 0 || nurseStation.getNurseStationClassifyIds() == null) { + return AjaxResult.success(); + } + this.insertNurseStationClassifyRelation(nurseStation.getNurseStationClassifyIds(), nurseStation.getId()); + return AjaxResult.success(); + } + + + /** + * 修改护理站信息 + * + * @param nurseStation 护理站信息 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public AjaxResult updateNurseStation(NurseStationDTO nurseStation) { + //校验电话 + AjaxResult checkPhone = checkPhone(nurseStation); + if (Objects.nonNull(checkPhone)) { + return checkPhone; + } + //校验营业时间 + AjaxResult checkOpenTime = checkOpenTime(nurseStation); + if (Objects.nonNull(checkOpenTime)) { + return checkOpenTime; + } + // 根据修改护理站的id查询所有信息 + NurseStationAndAreaVO station = nurseStationMapper.selectNurseStationById(nurseStation.getId()); + if (Objects.isNull(station)) { + return AjaxResult.error("当前护理站信息不存在,无法修改,请联系管理员!"); + } + boolean nurseName = (StringUtils.isNotBlank(station.getAreaCode()) && !nurseStation.getAreaCode().equals(station.getAreaCode())) + || (StringUtils.isNotBlank(station.getNurseStationName()) && !nurseStation.getNurseStationName().equals(station.getNurseStationName())); + if (nurseName) { + int nurseStationName = nurseStationMapper.getNurseStationName(nurseStation.getAreaCode(), nurseStation.getNurseStationName()); + if (nurseStationName > 0) { + throw new ServiceException("此区域已有相同的护理站名称:" + nurseStation.getNurseStationName() + ",请重新输入!"); + } + } + // 设置修改人人与修改时间 + nurseStation.setUpdateBy(SecurityUtils.getUsername()); + nurseStation.setUpdateTime(LocalDateTime.now()); + //设置营业时间 + this.setBusinessHours(nurseStation); + // 修改护理站信息 + int insertNurseStation = nurseStationMapper.updateNurseStation(nurseStation); + if (insertNurseStation <= 0) { + throw new ServiceException("修改护理站信息失败,请联系管理员!"); + } + if (Objects.isNull(nurseStation.getId())) { + throw new ServiceException("修改护理站信息失败,请联系管理员!"); + } + //全增全删护理站标签及护理机构分类 + this.updateStationLabelAndClassifyRelation(nurseStation); + if (StringUtils.isNotBlank(nurseStation.getStationPictureUrl()) && StringUtils.isNotBlank(station.getStationPictureUrl()) && !nurseStation.getStationPictureUrl().equals(station.getStationPictureUrl())) { + //删除护理站图片地址 + this.deletePictureUrl(station.getStationPictureUrl()); + } + if (StringUtils.isNotBlank(nurseStation.getStationIntroducePcitureUrl()) && StringUtils.isNotBlank(station.getStationIntroducePcitureUrl()) && !nurseStation.getStationIntroducePcitureUrl().equals(station.getStationIntroducePcitureUrl())) { + //删除护理站简介图片地址 + this.deletePictureUrl(station.getStationIntroducePcitureUrl()); + } + //删除护理站富文本图片 + this.deleteNurseStationPictureUrl(nurseStation, station); + return AjaxResult.success(); + } + + /** + * 批量删除护理站信息 + * + * @param ids 需要删除的护理站信息主键 + * @return 结果 + */ + @Transactional(rollbackFor = Exception.class) + @Override + public AjaxResult deleteNurseStationByIds(Long[] ids) { + //根据护理站id查询 + List nurseStationIds = nurseStationMapper.getNurseStationIds(Arrays.asList(ids)); + //获取护理站图片地址 + List stationPictureUrlList = nurseStationIds.stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotBlank(item.getStationPictureUrl())).map(NurseStationSysUserVO::getStationPictureUrl).distinct().collect(Collectors.toList()); + //获取护理站简介图片地址 + List stationIntroducePictureUrlList = nurseStationIds.stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotBlank(item.getStationIntroducePcitureUrl())).map(NurseStationSysUserVO::getStationIntroducePcitureUrl).distinct().collect(Collectors.toList()); + //获取护理站富文本的内容 + List nurseStationAgencyIntroduceList = nurseStationIds.stream().filter(Objects::nonNull).filter(item -> StringUtils.isNotBlank(item.getAgencyIntroduce())).map(NurseStationSysUserVO::getAgencyIntroduce).distinct().collect(Collectors.toList()); + // 删除护理站信息 + int nurseStationByIds = nurseStationMapper.deleteNurseStationByIds(ids); + if (nurseStationByIds <= 0) { + throw new ServiceException("删除护理站信息失败!"); + } + int stationLabelByIds = nurseStationMapper.selectNurseStationLabelByIds(ids); + if (stationLabelByIds > 0) { + int nurseStationLabelByIds = nurseStationMapper.deleteNurseStationLabelByIds(ids); + if (nurseStationLabelByIds <= 0) { + throw new ServiceException("删除护理站信息标签配置失败!"); + } + } + //删除护理机构所属分类关系表 - 查询护理机构所属分类关系是否存在 + int relationCount = stationClassifyRelationMapper.selectNurseStationClassifyRelationByStationIds(ids); + if (relationCount > 0) { + //删除关系表 + int deleteRelationCount = stationClassifyRelationMapper.deleteStationClassifyRelationByStationIds(ids); + if (deleteRelationCount <= 0) { + throw new ServiceException("删除护理机构所属分类关系失败!"); + } + } + //遍历删除护理站图片地址 + stationPictureUrlList.forEach(this::deletePictureUrl); + //遍历删除护理站简介图片地址 + stationIntroducePictureUrlList.forEach(this::deletePictureUrl); + //遍历删除护理站富文本图片地址 + for (String nurseStationAgencyIntroduce : nurseStationAgencyIntroduceList) { + List nurseStationImgSrc = FileUtils.getImgSrc(nurseStationAgencyIntroduce); + for (String pictureUrl : nurseStationImgSrc) { + if (StringUtils.isBlank(pictureUrl)) { + continue; + } + //修改路径 + String substring = pictureUrl.substring(pictureUrl.indexOf("/profile")); + //删除商品富文本图片 + deletePictureUrl(substring); + } + } + return AjaxResult.success(); + } + + /** + * 删除护理站信息信息 + * + * @param id 护理站信息主键 + * @return 结果 + */ + @Override + public int deleteNurseStationById(Long id) { + return nurseStationMapper.deleteNurseStationById(id); + } + + + /** + * 根据护理项目编号查询护理站信息 + * + * @param nurseItemCode 护理项目编号 + * @return com.xinelu.applet.domain.nursestationitem.NurseStationItem + **/ + @Override + public NurseStationItem getNurseItemCode(String nurseItemCode) { + return nurseStationMapper.getNurseItemCode(nurseItemCode); + } + + + /** + * 根据护理站编号查询所有信息 + * + * @param nurseStationCode 护理站编号 + * @return com.xinelu.applet.domain.nursestation.NurseStation + **/ + @Override + public NurseStation getNurseStationCode(String nurseStationCode) { + return nurseStationMapper.getNurseStationCode(nurseStationCode); + } + + + /** + * 头像图片上传接口 + * + * @param multipartFile 文件 + * @return com.xinelu.common.core.domain.AjaxResult + **/ + @Override + public AjaxResult updateNurseStationHeads(MultipartFile multipartFile, String type) throws Exception { + //获取不同的文件路径 + String uploadPathUrl = ""; + switch (type) { + //护理站图片路径上传 + case Constants.NURSE_STATION_TYPE: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getNurserStationPictureUrl(); + break; + //护理站简介附近图片路径上传 + case Constants.NURSE_STATION_INTRODUCE_TYPE: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getNurserStationIntroducePictureUrl(); + break; + //护理站项目图片路径上传 + case Constants.NURSE_STATION_ITEM_TYPE: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getNurserStationItemPictureUrl(); + break; + //商品图片路径上传 + case Constants.GOODS_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getGoodsPictureUrl(); + break; + //用户头像上传 + case Constants.HEAD_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getHeadPictureUrl(); + break; + //商品属性图片地址 + case Constants.ATTRIBUTE_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getAttributePitureUrl(); + break; + //商品分类图片地址 + case Constants.GOODS_CATEGORY_PICTURE: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getGoodsCategoryPicture(); + break; + //护理项目分类图标存放地址 + case Constants.NURSE_ITEM_CLASSIFY_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getNurseItemClassifyUrl(); + break; + //护理机构分类图片识别标识 + case Constants.NURSE_STATION_CLASSIFY_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getNurseStationClassifyUrl(); + break; + //海报图片存放路径地址 + case Constants.POSTER_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPosterPictureUrl(); + break; + //资讯主缩略图地址 + case Constants.LEAD_THUMBNAIL_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getLeadThumbnailUrl(); + break; + //客服图片地址 + case Constants.GROUP_QR_CODE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getGroupQrCodeUrl(); + break; + //科室人员证书图片存放路径 + case Constants.CERTIFICATE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getCertificateUrl(); + break; + //健康咨询科室人员头像地址 + case Constants.PERSON_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPersonPictureUrl(); + break; + //护理人员证书地址 + case Constants.PERSON_CERTIFICATE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPersonCertificateUrl(); + break; + default: + break; + } + if (StringUtils.isBlank(uploadPathUrl)) { + return AjaxResult.success(); + } + //上传 + String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION); + if (StringUtils.isBlank(pictureName)) { + throw new ServiceException("图片上传失败,请联系管理员!"); + } + AjaxResult ajax = AjaxResult.success("上传成功!"); + ajax.put("imgUrl", pictureName); + return ajax; + } + + + /** + * 护理站信息导入 + * + * @param nurseStation 护理站信息 + * @return 导入结果 + **/ + @Transactional(rollbackFor = Exception.class) + @Override + public AjaxResult insertNurseStationImportList(List nurseStation) { + //判断添加的数据是否为空 + if (CollectionUtils.isEmpty(nurseStation)) { + return AjaxResult.error("请添加护理站导入信息!"); + } + //根据护理站名称做去除处理 + List importDataList = nurseStation.stream().filter(item -> StringUtils.isNotBlank(item.getNurseStationName())).distinct().collect(Collectors.toList()); + //校验联系电话格式是否正确 + NurseStationImportDTO dto = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getPhone()))).findFirst().orElse(new NurseStationImportDTO()); + if (StringUtils.isNotBlank(dto.getPhone())) { + return AjaxResult.error("当前护理站电话:" + dto.getPhone() + " 格式不正确,请重新录入!"); + } + //校验负责人联系电话格式是否正确 + NurseStationImportDTO dtoTwo = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getDutyPhone())).filter(item -> BooleanUtils.isFalse(regexUtil.regexPhone(item.getDutyPhone()))).findFirst().orElse(new NurseStationImportDTO()); + if (StringUtils.isNotBlank(dtoTwo.getDutyPhone())) { + return AjaxResult.error("当前负责人电话:" + dtoTwo.getDutyPhone() + " 格式不正确,请重新录入!"); + } + List nurseStationNames = importDataList.stream().filter(item -> StringUtils.isNotBlank(item.getNurseStationName())).map(NurseStationImportDTO::getNurseStationName).distinct().collect(Collectors.toList()); + //根据名称查询护理站基本信息 + List allNurseStationInfo = nurseStationMapper.getAllNurseStationInfo(nurseStationNames); + //做差集,去除数据库中已经存在的护理站信息 + List subtractList = new ArrayList<>(CollectionUtils.subtract(importDataList, allNurseStationInfo)); + if (CollectionUtils.isEmpty(subtractList)) { + return AjaxResult.success(); + } + List nurseStationList = new ArrayList<>(); + for (NurseStationImportDTO item : subtractList) { + item.setUserId(SecurityUtils.getUserId()); + item.setCreateTime(LocalDateTime.now()); + item.setNurseStationCode(Constants.PATIENT_PREFIX + generateSystemCodeUtil.generateSystemCode(Constants.PATIENT_PREFIX)); + NurseStation nurseStations = new NurseStation(); + BeanUtils.copyProperties(item, nurseStations); + nurseStationList.add(nurseStations); + } + int insertCount = nurseStationMapper.insertNurseStationImportList(nurseStationList); + if (insertCount <= 0) { + throw new ServiceException("导入护理站信息失败,请联系管理员!"); + } + return AjaxResult.success(); + } + + /** + * 获取字典中的护理类型编码 + * + * @param nurseStation 护理站字典信息 + * @return com.xinelu.applet.vo.nursestation.NurseStationVO + **/ + @Override + public List getSysDictNurseTypeCode(NurseStationVO nurseStation) { + return nurseStationMapper.getSysDictNurseTypeCode(nurseStation); + } + + /** + * 根据护理站类型编码查询护理站类型名称 + * + * @param nurseTypeCode 护理站类型编码 + * @return java.util.List + **/ + @Override + public AjaxResult getNurseStationType(String nurseTypeCode) { + // 得到的编码如果是多个进行分割 + List nurseTypeCodeList = Arrays.asList(StringUtils.split(nurseTypeCode, ",")); + // 去重 查询值 + List nurseStationType = nurseStationMapper.getNurseStationType(nurseTypeCodeList).stream().distinct().collect(Collectors.toList()); + return AjaxResult.success(nurseStationType); + } + + + /** + * 根据用户id查询护理站 + * + * @param sysUser 用户信息 + * @return java.util.List + **/ + @Override + public AjaxResult getNurseStationByUserId(NurseStationSysUserVO sysUser) { + sysUser.setUserId(SecurityUtils.getUserId()); + NurseStationSysUserVO nurseStationByUserId = nurseStationMapper.getNurseStationByUserId(sysUser); + + String nurseStationIds = nurseStationByUserId.getNurseStationIds(); + List nurseTypeCodeList = Arrays.asList(StringUtils.split(nurseStationIds, ",")); + //List 转 List + List cdids = nurseTypeCodeList.stream().map(s -> Long.parseLong(s.trim())).collect(Collectors.toList()); + List stationIds = nurseStationMapper.getNurseStationIds(cdids).stream().distinct().collect(Collectors.toList()); + return AjaxResult.success(stationIds); + } + + /** + * 根据护理站id查询护理站信息是否存在 + * + * @param idList 护理站信息主键 + * @return 护理站信息 + */ + @Override + public int getNurseStationById(List idList) { + return nurseStationMapper.getNurseStationCount(idList); + } + + + /** + * 新增护理站标签信息 + * + * @param nurseStationLabels 护理站标签集合 + * @param nurseStationId 护理站id + **/ + private void insertNurseStationLabelLists(List nurseStationLabels, Long nurseStationId) { + // 判断护理站标签信息是否为空 + for (NurseStationLabelVO nurseStationLabel : nurseStationLabels) { + //判断项目成绩级别是否为空 + nurseStationLabel.setNurseStationId(nurseStationId); + nurseStationLabel.setCreateBy(SecurityUtils.getUsername()); + nurseStationLabel.setCreateTime(LocalDateTime.now()); + // 护理站标签编码 生成有效唯一的编码 + nurseStationLabel.setLabelCode(Constants.LABEL_CODE + generateSystemCodeUtil.generateSystemCode(Constants.LABEL_CODE)); + nurseStationLabel.setUserId(SecurityUtils.getUserId()); + } + // 新增护理站标签信息 + int nurseStationLabel = nurseStationLabelMapper.insertBatchNurseStationLabel(nurseStationLabels); + if (nurseStationLabel <= 0) { + throw new ServiceException("新增护理站标签信息失败,请联系管理员!"); + } + } + + /** + * 删除护理站富文本图片 + * + * @param nurseStation 前端传的 + * @param station 数据库查的 + * @return void + **/ + public void deleteNurseStationPictureUrl(NurseStationDTO nurseStation, NurseStationAndAreaVO station) { + if (StringUtils.isNotBlank(nurseStation.getAgencyIntroduce()) && StringUtils.isNotBlank(station.getAgencyIntroduce()) + && !nurseStation.getAgencyIntroduce().equals(station.getAgencyIntroduce())) { + //数据库中的 + List stationImgSrc = FileUtils.getImgSrc(station.getAgencyIntroduce()); + //前端传的 + List nurseStationImgSrc = FileUtils.getImgSrc(nurseStation.getAgencyIntroduce()); + //差集不同的 + List subtractNurseStationImgSrc = new ArrayList<>(CollectionUtils.subtract(stationImgSrc, nurseStationImgSrc)); + for (String pictureUrl : subtractNurseStationImgSrc) { + if (StringUtils.isBlank(pictureUrl)) { + continue; + } + //修改路径 + String substring = pictureUrl.substring(pictureUrl.indexOf("/profile")); + //删除商品富文本图片 + deletePictureUrl(substring); + } + } + } + + /** + * 删除护理站图片地址 + * + * @param pictureUrl 护理站图片地址 + * @return void 护理站图片地址 + **/ + private void deletePictureUrl(String pictureUrl) { + if (StringUtils.isBlank(pictureUrl)) { + return; + } + String picture = XinELuConfig.getProfile() + pictureUrl.replaceAll("/profile", ""); + File checkReportNameFile = new File(picture); + if (checkReportNameFile.exists()) { + boolean delete = checkReportNameFile.delete(); + if (BooleanUtils.isFalse(delete)) { + throw new ServiceException("图片地址删除失败!"); + } + } + } + + /** + * 新增护理机构分类关系表 + * + * @param nurseStationClassifyIds 护理机构ids + * @param stationId 护理站id + */ + private void insertNurseStationClassifyRelation(Long[] nurseStationClassifyIds, Long stationId) { + List nurseStationClassifyRelations = new ArrayList<>(); + //遍历塞值 + for (Long nurseStationClassifyId : nurseStationClassifyIds) { + NurseStationClassifyRelation stationClassifyRelation = new NurseStationClassifyRelation(); + stationClassifyRelation.setNurseStationId(stationId); + stationClassifyRelation.setNurseClassifyId(nurseStationClassifyId); + stationClassifyRelation.setCreateBy(SecurityUtils.getUsername()); + stationClassifyRelation.setCreateTime(LocalDateTime.now()); + nurseStationClassifyRelations.add(stationClassifyRelation); + } + //新增护理机构分类关系表 + int insertCount = stationClassifyRelationMapper.insertNurseStationClassifyRelationList(nurseStationClassifyRelations); + if (insertCount <= 0) { + throw new ServiceException("护理机构类型新增失败,请联系管理员!"); + } + } + + /** + * 全增全删护理站标签及护理机构分类 + * + * @param nurseStation 护理站修改信息 + */ + private void updateStationLabelAndClassifyRelation(NurseStationDTO nurseStation) { + //删除护理站标签信息 + int nurseStationLabelStationId = nurseStationLabelMapper.getNurseStationLabelStationId(nurseStation.getId()); + if (nurseStationLabelStationId > 0) { + int deleteNurseStationLabelStationId = nurseStationLabelMapper.deleteNurseStationLabelStationId(nurseStation.getId()); + if (deleteNurseStationLabelStationId <= 0) { + throw new ServiceException("删除护理站标签信息失败"); + } + } + //修改护理站标签信息 + if (CollectionUtils.isNotEmpty(nurseStation.getNurseStationLabelList())) { + this.insertNurseStationLabelLists(nurseStation.getNurseStationLabelList(), nurseStation.getId()); + } + //删除护理机构所属分类关系表 + int count = stationClassifyRelationMapper.selectNurseStationClassifyRelationByStationId(nurseStation.getId()); + if (count > 0) { + int deleteCount = stationClassifyRelationMapper.deleteStationClassifyRelationByStationId(nurseStation.getId()); + if (deleteCount <= 0) { + throw new ServiceException("删除护理机构所属分类关系失败"); + } + } + //重新增加护理机构所属分类关系表 + if (nurseStation.getNurseStationClassifyIds() != null && nurseStation.getNurseStationClassifyIds().length != 0) { + this.insertNurseStationClassifyRelation(nurseStation.getNurseStationClassifyIds(), nurseStation.getId()); + } + } + + /** + * 校验护理站营业时间 + * + * @param nurseStation 输入参数 + * @return 校验结果 + */ + private AjaxResult checkOpenTime(NurseStationDTO nurseStation) { + if (StringUtils.isBlank(nurseStation.getMorningOpenStartTimeStr()) + || StringUtils.isBlank(nurseStation.getMorningOpenEndTimeStr()) + || OPEN_TIME.equals(nurseStation.getMorningOpenStartTimeStr()) + || OPEN_TIME.equals(nurseStation.getMorningOpenEndTimeStr())) { + return AjaxResult.error("上午营业时间不能为空!"); + } + if (StringUtils.isBlank(nurseStation.getAfternoonOpenStartTimeStr()) + || StringUtils.isBlank(nurseStation.getAfternoonOpenEndTimeStr()) + || OPEN_TIME.equals(nurseStation.getAfternoonOpenStartTimeStr()) + || OPEN_TIME.equals(nurseStation.getAfternoonOpenEndTimeStr())) { + return AjaxResult.error("下午营业时间不能为空!"); + } + //格式化日期 + LocalTime morningStartTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getMorningOpenStartTimeStr()))); + LocalTime morningEndTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getMorningOpenEndTimeStr()))); + LocalTime afterStartTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getAfternoonOpenStartTimeStr()))); + LocalTime afterEndTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getAfternoonOpenEndTimeStr()))); + if (morningStartTime.isAfter(morningEndTime) || morningStartTime.equals(morningEndTime)) { + return AjaxResult.error("上午营业开始时间不能大于等于上午营业结束时间!"); + } + if (afterStartTime.isAfter(afterEndTime) || afterStartTime.equals(afterEndTime)) { + return AjaxResult.error("下午营业开始时间不能大于等于下午营业结束时间!"); + } + if (morningEndTime.isAfter(afterStartTime)) { + return AjaxResult.error("上午营业结束时间不能大于下午营业开始时间!"); + } + return null; + } + + /** + * 校点电话 + * + * @param nurseStation 输入参数 + * @return 结果 + */ + private AjaxResult checkPhone(NurseStationDTO nurseStation) { + if (StringUtils.isNotBlank(nurseStation.getPhone())) { + // 校验手机号是否正确 + boolean phone = regexUtil.regexSeatNumber(nurseStation.getPhone()); + if (BooleanUtils.isFalse(phone)) { + return AjaxResult.error("您输入的联系电话" + nurseStation.getPhone() + "不正确,请重新输入!"); + } + } + if (StringUtils.isNotBlank(nurseStation.getDutyPhone())) { + // 校验负责人手机号是否正确 + boolean dutyPhone = regexUtil.regexSeatNumber(nurseStation.getDutyPhone()); + if (BooleanUtils.isFalse(dutyPhone)) { + return AjaxResult.error("您输入的联系电话" + nurseStation.getDutyPhone() + "不正确,请重新输入!"); + } + } + return null; + } + + /** + * 设置营业时间 + * + * @param nurseStation 护理站信息 + */ + private void setBusinessHours(NurseStationDTO nurseStation) { + //格式化日期 + LocalTime morningStartTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getMorningOpenStartTimeStr()))); + LocalTime morningEndTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getMorningOpenEndTimeStr()))); + LocalTime afterStartTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getAfternoonOpenStartTimeStr()))); + LocalTime afterEndTime = LocalTime.parse(DateTimeFormatter.ofPattern("HH:mm").format(LocalTime.parse(nurseStation.getAfternoonOpenEndTimeStr()))); + //塞值 + nurseStation.setMorningOpenStartTime(morningStartTime); + nurseStation.setMorningOpenEndTime(morningEndTime); + nurseStation.setAfternoonOpenStartTime(afterStartTime); + nurseStation.setAfternoonOpenEndTime(afterEndTime); + } +} diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml new file mode 100644 index 0000000..8d37068 --- /dev/null +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml @@ -0,0 +1,818 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, + area_code, + user_id, + nurse_station_code, + nurse_station_name, + nurse_station_type, + agency_introduce, + nurse_station_description, + longitude, + latitude, + phone, + address, + duty_person, + duty_phone, + station_picture_url, + station_introduce_pciture_url, + sort, + create_by, + create_time, + update_by, + update_time, + nurse_grade, + opening_hours_describe, + morning_open_start_time, + morning_open_end_time, + afternoon_open_start_time, + afternoon_open_end_time, + station_wechat_code_url + from nurse_station + + + + + + + + + + insert into nurse_station + + area_code, + + user_id, + + nurse_station_code, + + nurse_station_name, + + nurse_station_type, + + agency_introduce, + + nurse_station_description, + + longitude, + + latitude, + + phone, + + address, + + duty_person, + + duty_phone, + + station_picture_url, + + station_introduce_pciture_url, + + sort, + + create_by, + + create_time, + + update_by, + + update_time, + + nurse_grade, + + opening_hours_describe, + + morning_open_start_time, + + morning_open_end_time, + + afternoon_open_start_time, + + afternoon_open_end_time, + + station_wechat_code_url, + + + + #{areaCode}, + + #{userId}, + + #{nurseStationCode}, + + #{nurseStationName}, + + #{nurseStationType}, + + #{agencyIntroduce}, + + #{nurseStationDescription}, + + #{longitude}, + + #{latitude}, + + #{phone}, + + #{address}, + + #{dutyPerson}, + + #{dutyPhone}, + + #{stationPictureUrl}, + + #{stationIntroducePcitureUrl}, + + #{sort}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + #{nurseGrade}, + + #{openingHoursDescribe}, + + #{morningOpenStartTime}, + + #{morningOpenEndTime}, + + #{afternoonOpenStartTime}, + + #{afternoonOpenEndTime}, + + #{stationWechatCodeUrl}, + + + + + + update nurse_station + + area_code = + #{areaCode}, + + user_id = + #{userId}, + + nurse_station_code = + #{nurseStationCode}, + + nurse_station_name = + #{nurseStationName}, + + nurse_station_type = + #{nurseStationType}, + + agency_introduce = + #{agencyIntroduce}, + + nurse_station_description = + #{nurseStationDescription}, + + longitude = + #{longitude}, + + latitude = + #{latitude}, + + phone = + #{phone}, + + address = + #{address}, + + duty_person = + #{dutyPerson}, + + duty_phone = + #{dutyPhone}, + + station_picture_url = + #{stationPictureUrl}, + + station_introduce_pciture_url = + #{stationIntroducePcitureUrl}, + + sort = + #{sort}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + nurse_grade = + #{nurseGrade}, + + opening_hours_describe = + #{openingHoursDescribe}, + + morning_open_start_time = + #{morningOpenStartTime}, + + morning_open_end_time = + #{morningOpenEndTime}, + + afternoon_open_start_time = + #{afternoonOpenStartTime}, + + afternoon_open_end_time = + #{afternoonOpenEndTime}, + + station_wechat_code_url = + #{stationWechatCodeUrl}, + + + where id = #{id} + + + + delete + from nurse_station + where id = #{id} + + + + delete from nurse_station where id in + + #{id} + + + + + delete from nurse_station_label where nurse_station_id in + + #{id} + + + + + update nurse_station + set station_picture_url = #{stationPictureUrl} + where nurse_station_code = #{nurseStationCode} + + + + update nurse_station + set station_introduce_pciture_url = #{stationIntroducePcitureUrl} + where nurse_station_code = #{nurseStationCode} + + + + + + + + + + + insert into nurse_station( + area_code, + user_id, + nurse_station_code, + nurse_station_name, + nurse_station_type, + agency_introduce, + nurse_station_description, + longitude, + latitude, + phone, + address, + duty_person, + duty_phone, + station_picture_url, + station_introduce_pciture_url, + sort, + create_by, + create_time, + update_by, + update_time + ) values + + ( + #{NurseStation.areaCode}, + #{NurseStation.userId}, + #{NurseStation.nurseStationCode}, + #{NurseStation.nurseStationName}, + #{NurseStation.nurseStationType}, + #{NurseStation.agencyIntroduce}, + #{NurseStation.nurseStationDescription}, + #{NurseStation.longitude}, + #{NurseStation.latitude}, + #{NurseStation.phone}, + #{NurseStation.address}, + #{NurseStation.dutyPerson}, + #{NurseStation.dutyPhone}, + #{NurseStation.stationPictureUrl}, + #{NurseStation.stationIntroducePcitureUrl}, + #{NurseStation.sort}, + #{NurseStation.createBy}, + #{NurseStation.createTime}, + #{NurseStation.updateBy}, + #{NurseStation.updateTime} + ) + + + + + + + update nurse_station_item + set item_picture_url = #{itemPictureUrl} + where nurse_item_code = #{nurseItemCode} + + + + + + + + + + + + + + + + + + + + + + + + + update nurse_station set station_wechat_code_url = #{stationWeChatCodeUrl}, update_time = now() where id = #{stationId} + + diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml new file mode 100644 index 0000000..d460c2b --- /dev/null +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml @@ -0,0 +1,357 @@ + + + + + + + + + + + + + + + + + + + + + select id, + parent_id, + area_code, + area_name, + area_level, + parent_code, + remote_signs, + sort, + create_by, + create_time, + update_by, + update_time + from sys_area + + + + + + + + insert into sys_area + + parent_id, + + area_code, + + area_name, + + area_level, + + parent_code, + + remote_signs, + + sort, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{parentId}, + + #{areaCode}, + + #{areaName}, + + #{areaLevel}, + + #{parentCode}, + + #{remoteSigns}, + + #{sort}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update sys_area + + parent_id = + #{parentId}, + + area_code = + #{areaCode}, + + area_name = + #{areaName}, + + area_level = + #{areaLevel}, + + parent_code = + #{parentCode}, + + remote_signs = + #{remoteSigns}, + + sort = + #{sort}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from sys_area + where id = #{id} + + + + delete from sys_area where id in + + #{id} + + + + + + + + + + + + + + + + + + + From 30a6e1b575c9c79eeb2c8af3f198c3084b8e94fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com> Date: Wed, 20 Sep 2023 15:15:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BB=A3=E7=A0=81=E7=A7=BB=E6=A4=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nursestation/NurseStationMapper.xml | 9 +++++--- .../mapper/manage/sysarea/SysAreaMapper.xml | 22 +++++++++---------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml index 8d37068..0967ef1 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml @@ -36,7 +36,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -813,6 +813,9 @@ - update nurse_station set station_wechat_code_url = #{stationWeChatCodeUrl}, update_time = now() where id = #{stationId} + update nurse_station + set station_wechat_code_url = #{stationWeChatCodeUrl}, + update_time = now() + where id = #{stationId} diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml index d460c2b..e7e89d1 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml @@ -63,7 +63,7 @@ order by sort - + resultType="com.xinelu.applet.domain.vo.sysarea.AreaInfoVO"> SELECT id, parent_id, area_code, @@ -196,7 +196,7 @@ - SELECT province.area_name province_name, province.area_code province_code, @@ -280,8 +280,8 @@ - SELECT province.area_name province_name, province.area_code province_code, @@ -307,8 +307,8 @@ - SELECT province.area_name province_name, province.area_code province_code, city.area_name city_name, @@ -342,7 +342,7 @@ AND region.area_code = #{areaCode} limit 1; - SELECT sa.id, sa.parent_code, (select area_name FROM sys_area where area_code = sa.parent_code) parentName, From 43466c5b1200a37b9c33fbef1d04213ff220ed48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com> Date: Wed, 20 Sep 2023 15:36:32 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E4=BB=A3=E7=A0=81=E7=A7=BB=E6=A4=8D=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nursestation/NurseStationController.java | 12 +++---- .../dto/nursestation/NurseStationDTO.java | 6 ++-- .../nursestation/NurseStationImportDTO.java | 2 +- .../nurseclassifyinfo/NurseClassifyInfo.java | 2 +- .../domain/nursestation/NurseStation.java | 6 ++-- .../NurseStationClassifyRelation.java | 2 +- .../nursestationitem/NurseStationItem.java | 2 +- .../nursestationlabel/NurseStationLabel.java | 2 +- .../domain/nursetype/NurseType.java | 2 +- .../domain/sysarea/SysArea.java | 2 +- .../nursestation/NurseStationAndAreaVO.java | 8 ++--- .../vo/nursestation/NurseStationByUserVO.java | 6 ++-- .../vo/nursestation/NurseStationLabelVO.java | 2 +- .../nursestation/NurseStationSysUserVO.java | 2 +- .../vo/nursestation/NurseStationVO.java | 8 ++--- .../domain/vo/sysarea/AreaInfoVO.java | 2 +- .../domain/vo/sysarea/ParentAreaVO.java | 4 +-- .../domain/vo/sysarea/SysAreaVO.java | 2 +- .../nursestation/NurseStationMapper.java | 20 +++++------ .../NurseStationClassifyRelationMapper.java | 4 +-- .../NurseStationClassifyRelationMapper.xml | 0 .../NurseStationLabelMapper.java | 6 ++-- .../NurseStationLabelMapper.xml | 0 .../mapper/sysarea/SysAreaMapper.java | 10 +++--- .../nursestation/INurseStationService.java | 18 +++++----- .../impl/NurseStationServiceImpl.java | 34 +++++++++---------- .../nursestation/NurseStationMapper.xml | 26 +++++++------- .../mapper/manage/sysarea/SysAreaMapper.xml | 22 ++++++------ 28 files changed, 106 insertions(+), 106 deletions(-) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/controller/nursestation/NurseStationController.java (95%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/dto/nursestation/NurseStationDTO.java (87%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/dto/nursestation/NurseStationImportDTO.java (97%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/nurseclassifyinfo/NurseClassifyInfo.java (98%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/nursestation/NurseStation.java (98%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java (96%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/nursestationitem/NurseStationItem.java (99%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/nursestationlabel/NurseStationLabel.java (98%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/nursetype/NurseType.java (98%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/sysarea/SysArea.java (98%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/nursestation/NurseStationAndAreaVO.java (85%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/nursestation/NurseStationByUserVO.java (76%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/nursestation/NurseStationLabelVO.java (97%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/nursestation/NurseStationSysUserVO.java (94%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/nursestation/NurseStationVO.java (79%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/sysarea/AreaInfoVO.java (94%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/sysarea/ParentAreaVO.java (82%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/domain/vo/sysarea/SysAreaVO.java (95%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/mapper/nursestation/NurseStationMapper.java (92%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java (95%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml (100%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/mapper/nursestationlabel/NurseStationLabelMapper.java (92%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/mapper/nursestationlabel/NurseStationLabelMapper.xml (100%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/mapper/sysarea/SysAreaMapper.java (91%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/service/nursestation/INurseStationService.java (87%) rename xinelu-nurse-manage/src/main/java/com/xinelu/{applet => manage}/service/nursestation/impl/NurseStationServiceImpl.java (97%) diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/nursestation/NurseStationController.java similarity index 95% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/nursestation/NurseStationController.java index f19b99c..deedc21 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/controller/nursestation/NurseStationController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/nursestation/NurseStationController.java @@ -1,11 +1,11 @@ -package com.xinelu.applet.controller.nursestation; +package com.xinelu.manage.controller.nursestation; -import com.xinelu.applet.domain.dto.nursestation.NurseStationDTO; -import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationSysUserVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationVO; -import com.xinelu.applet.service.nursestation.INurseStationService; +import com.xinelu.manage.domain.dto.nursestation.NurseStationDTO; +import com.xinelu.manage.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationSysUserVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationVO; +import com.xinelu.manage.service.nursestation.INurseStationService; import com.xinelu.common.annotation.Log; import com.xinelu.common.constant.Constants; import com.xinelu.common.core.controller.BaseController; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/dto/nursestation/NurseStationDTO.java similarity index 87% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/dto/nursestation/NurseStationDTO.java index 3ac2ad3..4d49bae 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationDTO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/dto/nursestation/NurseStationDTO.java @@ -1,7 +1,7 @@ -package com.xinelu.applet.domain.dto.nursestation; +package com.xinelu.manage.domain.dto.nursestation; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.vo.nursestation.NurseStationLabelVO; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.vo.nursestation.NurseStationLabelVO; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/dto/nursestation/NurseStationImportDTO.java similarity index 97% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/dto/nursestation/NurseStationImportDTO.java index 3d3733c..5051986 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/dto/nursestation/NurseStationImportDTO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/dto/nursestation/NurseStationImportDTO.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.dto.nursestation; +package com.xinelu.manage.domain.dto.nursestation; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nurseclassifyinfo/NurseClassifyInfo.java similarity index 98% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nurseclassifyinfo/NurseClassifyInfo.java index 3b0ca1c..c068b26 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nurseclassifyinfo/NurseClassifyInfo.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nurseclassifyinfo/NurseClassifyInfo.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.nurseclassifyinfo; +package com.xinelu.manage.domain.nurseclassifyinfo; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestation/NurseStation.java similarity index 98% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestation/NurseStation.java index 790595d..0728b04 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestation/NurseStation.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestation/NurseStation.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.nursestation; +package com.xinelu.manage.domain.nursestation; import com.xinelu.common.annotation.Excel; @@ -158,7 +158,7 @@ public class NurseStation extends BaseDomain implements Serializable { */ @ApiModelProperty(value = "护理站简介图片路径") @Excel(name = "护理站简介图片路径") - private String stationIntroducePcitureUrl; + private String stationIntroducePictureUrl; /** * 排序 @@ -226,7 +226,7 @@ public class NurseStation extends BaseDomain implements Serializable { .append("dutyPerson", getDutyPerson()) .append("dutyPhone", getDutyPhone()) .append("stationPictureUrl", getStationPictureUrl()) - .append("stationIntroducePcitureUrl", getStationIntroducePcitureUrl()) + .append("stationIntroducePcitureUrl", getStationIntroducePictureUrl()) .append("sort", getSort()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java similarity index 96% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java index a180402..5550b00 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationclassifyrelation/NurseStationClassifyRelation.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.nursestationclassifyrelation; +package com.xinelu.manage.domain.nursestationclassifyrelation; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationitem/NurseStationItem.java similarity index 99% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationitem/NurseStationItem.java index 50d19ff..1ee94e8 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationitem/NurseStationItem.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationitem/NurseStationItem.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.nursestationitem; +package com.xinelu.manage.domain.nursestationitem; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationlabel/NurseStationLabel.java similarity index 98% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationlabel/NurseStationLabel.java index 74dbe63..285df7c 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursestationlabel/NurseStationLabel.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursestationlabel/NurseStationLabel.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.nursestationlabel; +package com.xinelu.manage.domain.nursestationlabel; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursetype/NurseType.java similarity index 98% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursetype/NurseType.java index 0617273..72df2d5 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/nursetype/NurseType.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/nursetype/NurseType.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.nursetype; +package com.xinelu.manage.domain.nursetype; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/sysarea/SysArea.java similarity index 98% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/sysarea/SysArea.java index 1a47591..6734e34 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/sysarea/SysArea.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/sysarea/SysArea.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.sysarea; +package com.xinelu.manage.domain.sysarea; import com.xinelu.common.annotation.Excel; import com.xinelu.common.core.domain.BaseDomain; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationAndAreaVO.java similarity index 85% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationAndAreaVO.java index afdfb82..6dff826 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationAndAreaVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationAndAreaVO.java @@ -1,9 +1,9 @@ -package com.xinelu.applet.domain.vo.nursestation; +package com.xinelu.manage.domain.vo.nursestation; -import com.xinelu.applet.domain.nurseclassifyinfo.NurseClassifyInfo; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import com.xinelu.manage.domain.nurseclassifyinfo.NurseClassifyInfo; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.vo.sysarea.SysAreaVO; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationByUserVO.java similarity index 76% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationByUserVO.java index 970aa5c..c3b2cad 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationByUserVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationByUserVO.java @@ -1,7 +1,7 @@ -package com.xinelu.applet.domain.vo.nursestation; +package com.xinelu.manage.domain.vo.nursestation; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.vo.sysarea.SysAreaVO; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationLabelVO.java similarity index 97% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationLabelVO.java index e257482..10f63a7 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationLabelVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationLabelVO.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.vo.nursestation; +package com.xinelu.manage.domain.vo.nursestation; import com.xinelu.common.annotation.Excel; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationSysUserVO.java similarity index 94% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationSysUserVO.java index 3b12a00..6dd8aa2 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationSysUserVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationSysUserVO.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.vo.nursestation; +package com.xinelu.manage.domain.vo.nursestation; import lombok.Data; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationVO.java similarity index 79% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationVO.java index a596580..1911691 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/nursestation/NurseStationVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/nursestation/NurseStationVO.java @@ -1,9 +1,9 @@ -package com.xinelu.applet.domain.vo.nursestation; +package com.xinelu.manage.domain.vo.nursestation; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.nursetype.NurseType; -import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.nursetype.NurseType; +import com.xinelu.manage.domain.vo.sysarea.SysAreaVO; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/AreaInfoVO.java similarity index 94% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/AreaInfoVO.java index 7e1d718..c4f3d3a 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/AreaInfoVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/AreaInfoVO.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.vo.sysarea; +package com.xinelu.manage.domain.vo.sysarea; import lombok.Data; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/ParentAreaVO.java similarity index 82% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/ParentAreaVO.java index 0a10ff4..b7af585 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/ParentAreaVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/ParentAreaVO.java @@ -1,6 +1,6 @@ -package com.xinelu.applet.domain.vo.sysarea; +package com.xinelu.manage.domain.vo.sysarea; -import com.xinelu.applet.domain.sysarea.SysArea; +import com.xinelu.manage.domain.sysarea.SysArea; import lombok.Data; import lombok.EqualsAndHashCode; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/SysAreaVO.java similarity index 95% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/SysAreaVO.java index a669783..32bb4f8 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/domain/vo/sysarea/SysAreaVO.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/vo/sysarea/SysAreaVO.java @@ -1,4 +1,4 @@ -package com.xinelu.applet.domain.vo.sysarea; +package com.xinelu.manage.domain.vo.sysarea; import lombok.Data; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestation/NurseStationMapper.java similarity index 92% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestation/NurseStationMapper.java index b52d71c..8c997e7 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestation/NurseStationMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestation/NurseStationMapper.java @@ -1,15 +1,15 @@ -package com.xinelu.applet.mapper.nursestation; +package com.xinelu.manage.mapper.nursestation; -import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.nursestationitem.NurseStationItem; -import com.xinelu.applet.domain.nursestationlabel.NurseStationLabel; -import com.xinelu.applet.domain.nursetype.NurseType; -import com.xinelu.applet.domain.vo.nursestation.NurseStationAndAreaVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationByUserVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationSysUserVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationVO; +import com.xinelu.manage.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.nursestationitem.NurseStationItem; +import com.xinelu.manage.domain.nursestationlabel.NurseStationLabel; +import com.xinelu.manage.domain.nursetype.NurseType; +import com.xinelu.manage.domain.vo.nursestation.NurseStationAndAreaVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationByUserVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationSysUserVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationVO; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java similarity index 95% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java index 9fcd8cc..9080cb0 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.java @@ -1,7 +1,7 @@ -package com.xinelu.applet.mapper.nursestationclassifyrelation; +package com.xinelu.manage.mapper.nursestationclassifyrelation; -import com.xinelu.applet.domain.nursestationclassifyrelation.NurseStationClassifyRelation; +import com.xinelu.manage.domain.nursestationclassifyrelation.NurseStationClassifyRelation; import java.util.List; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml similarity index 100% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationclassifyrelation/NurseStationClassifyRelationMapper.xml diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationlabel/NurseStationLabelMapper.java similarity index 92% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationlabel/NurseStationLabelMapper.java index ce8ffa8..a7cd323 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationlabel/NurseStationLabelMapper.java @@ -1,7 +1,7 @@ -package com.xinelu.applet.mapper.nursestationlabel; +package com.xinelu.manage.mapper.nursestationlabel; -import com.xinelu.applet.domain.nursestationlabel.NurseStationLabel; -import com.xinelu.applet.domain.vo.nursestation.NurseStationLabelVO; +import com.xinelu.manage.domain.nursestationlabel.NurseStationLabel; +import com.xinelu.manage.domain.vo.nursestation.NurseStationLabelVO; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.xml b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationlabel/NurseStationLabelMapper.xml similarity index 100% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/nursestationlabel/NurseStationLabelMapper.xml rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/nursestationlabel/NurseStationLabelMapper.xml diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/sysarea/SysAreaMapper.java similarity index 91% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/sysarea/SysAreaMapper.java index 1f41233..0e744a2 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/mapper/sysarea/SysAreaMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/sysarea/SysAreaMapper.java @@ -1,9 +1,9 @@ -package com.xinelu.applet.mapper.sysarea; +package com.xinelu.manage.mapper.sysarea; -import com.xinelu.applet.domain.sysarea.SysArea; -import com.xinelu.applet.domain.vo.sysarea.AreaInfoVO; -import com.xinelu.applet.domain.vo.sysarea.ParentAreaVO; -import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; +import com.xinelu.manage.domain.sysarea.SysArea; +import com.xinelu.manage.domain.vo.sysarea.AreaInfoVO; +import com.xinelu.manage.domain.vo.sysarea.ParentAreaVO; +import com.xinelu.manage.domain.vo.sysarea.SysAreaVO; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/INurseStationService.java similarity index 87% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/INurseStationService.java index 086ce01..c334558 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/INurseStationService.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/INurseStationService.java @@ -1,14 +1,14 @@ -package com.xinelu.applet.service.nursestation; +package com.xinelu.manage.service.nursestation; -import com.xinelu.applet.domain.dto.nursestation.NurseStationDTO; -import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.nursestationitem.NurseStationItem; -import com.xinelu.applet.domain.vo.nursestation.NurseStationAndAreaVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationByUserVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationSysUserVO; -import com.xinelu.applet.domain.vo.nursestation.NurseStationVO; +import com.xinelu.manage.domain.dto.nursestation.NurseStationDTO; +import com.xinelu.manage.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.nursestationitem.NurseStationItem; +import com.xinelu.manage.domain.vo.nursestation.NurseStationAndAreaVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationByUserVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationSysUserVO; +import com.xinelu.manage.domain.vo.nursestation.NurseStationVO; import com.xinelu.common.core.domain.AjaxResult; import org.springframework.web.multipart.MultipartFile; diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java similarity index 97% rename from xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java rename to xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java index 49d5e3c..b44287d 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/applet/service/nursestation/impl/NurseStationServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java @@ -1,19 +1,19 @@ -package com.xinelu.applet.service.nursestation.impl; +package com.xinelu.manage.service.nursestation.impl; -import com.xinelu.applet.domain.dto.nursestation.NurseStationDTO; -import com.xinelu.applet.domain.dto.nursestation.NurseStationImportDTO; -import com.xinelu.applet.domain.nurseclassifyinfo.NurseClassifyInfo; -import com.xinelu.applet.domain.nursestation.NurseStation; -import com.xinelu.applet.domain.nursestationclassifyrelation.NurseStationClassifyRelation; -import com.xinelu.applet.domain.nursestationitem.NurseStationItem; -import com.xinelu.applet.domain.nursetype.NurseType; -import com.xinelu.applet.domain.vo.nursestation.*; -import com.xinelu.applet.domain.vo.sysarea.SysAreaVO; -import com.xinelu.applet.mapper.nursestation.NurseStationMapper; -import com.xinelu.applet.mapper.nursestationclassifyrelation.NurseStationClassifyRelationMapper; -import com.xinelu.applet.mapper.nursestationlabel.NurseStationLabelMapper; -import com.xinelu.applet.mapper.sysarea.SysAreaMapper; -import com.xinelu.applet.service.nursestation.INurseStationService; +import com.xinelu.manage.domain.dto.nursestation.NurseStationDTO; +import com.xinelu.manage.domain.dto.nursestation.NurseStationImportDTO; +import com.xinelu.manage.domain.nurseclassifyinfo.NurseClassifyInfo; +import com.xinelu.manage.domain.nursestation.NurseStation; +import com.xinelu.manage.domain.nursestationclassifyrelation.NurseStationClassifyRelation; +import com.xinelu.manage.domain.nursestationitem.NurseStationItem; +import com.xinelu.manage.domain.nursetype.NurseType; +import com.xinelu.manage.domain.vo.nursestation.*; +import com.xinelu.manage.domain.vo.sysarea.SysAreaVO; +import com.xinelu.manage.mapper.nursestation.NurseStationMapper; +import com.xinelu.manage.mapper.nursestationclassifyrelation.NurseStationClassifyRelationMapper; +import com.xinelu.manage.mapper.nursestationlabel.NurseStationLabelMapper; +import com.xinelu.manage.mapper.sysarea.SysAreaMapper; +import com.xinelu.manage.service.nursestation.INurseStationService; import com.xinelu.common.config.AppletPageConfig; import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.constant.Constants; @@ -280,9 +280,9 @@ public class NurseStationServiceImpl implements INurseStationService { //删除护理站图片地址 this.deletePictureUrl(station.getStationPictureUrl()); } - if (StringUtils.isNotBlank(nurseStation.getStationIntroducePcitureUrl()) && StringUtils.isNotBlank(station.getStationIntroducePcitureUrl()) && !nurseStation.getStationIntroducePcitureUrl().equals(station.getStationIntroducePcitureUrl())) { + if (StringUtils.isNotBlank(nurseStation.getStationIntroducePictureUrl()) && StringUtils.isNotBlank(station.getStationIntroducePictureUrl()) && !nurseStation.getStationIntroducePictureUrl().equals(station.getStationIntroducePictureUrl())) { //删除护理站简介图片地址 - this.deletePictureUrl(station.getStationIntroducePcitureUrl()); + this.deletePictureUrl(station.getStationIntroducePictureUrl()); } //删除护理站富文本图片 this.deleteNurseStationPictureUrl(nurseStation, station); diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml index 0967ef1..81aeeed 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestation/NurseStationMapper.xml @@ -20,7 +20,7 @@ - + @@ -36,7 +36,7 @@ - + @@ -68,7 +68,7 @@ - + @@ -124,8 +124,8 @@ from nurse_station - @@ -202,7 +202,7 @@ - @@ -694,7 +694,7 @@ - SELECT sdt.dict_name, sdd.dict_label nurseTypeName, sdd.dict_value nurseTypeCode @@ -747,8 +747,8 @@ - SELECT su.user_id, su.nurse_station_ids @@ -762,8 +762,8 @@ order by su.create_time desc - SELECT ns.id nurseStationId, ns.nurse_station_name, @@ -783,7 +783,7 @@ order by ns.create_time desc - select nurse_station_name, phone, address, duty_person, duty_phone, agency_introduce FROM nurse_station diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml index e7e89d1..55655f7 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/sysarea/SysAreaMapper.xml @@ -63,7 +63,7 @@ order by sort - + resultType="com.xinelu.manage.domain.vo.sysarea.AreaInfoVO"> SELECT id, parent_id, area_code, @@ -196,7 +196,7 @@ - SELECT province.area_name province_name, province.area_code province_code, @@ -280,8 +280,8 @@ - SELECT province.area_name province_name, province.area_code province_code, @@ -307,8 +307,8 @@ - SELECT province.area_name province_name, province.area_code province_code, city.area_name city_name, @@ -342,7 +342,7 @@ AND region.area_code = #{areaCode} limit 1; - SELECT sa.id, sa.parent_code, (select area_name FROM sys_area where area_code = sa.parent_code) parentName,