小程序护理机构代码移植
This commit is contained in:
parent
8f439825e8
commit
75287e11de
@ -0,0 +1,48 @@
|
||||
package com.xinelu.applet.controller.appletlogin;
|
||||
|
||||
import com.xinelu.applet.service.appletlogin.AppletLoginService;
|
||||
import com.xinelu.common.annotation.MobileRequestAuthorization;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.utils.regex.RegexUtil;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description 微信小程序登录注册控制器
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-02 10:53:35
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/nurseApplet/login")
|
||||
public class AppletLoginController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private AppletLoginService appletLoginService;
|
||||
@Resource
|
||||
private RegexUtil regexUtil;
|
||||
@Resource
|
||||
private XinELuConfig xinYiLuConfig;
|
||||
|
||||
/**
|
||||
* 根据用户Id获取用户的登录信息
|
||||
*
|
||||
* @param patientId 用户Id
|
||||
* @return 被护理人信息
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/getPatientInfo")
|
||||
public AjaxResult getPatientInfoByPatientId(Long patientId) {
|
||||
if (Objects.isNull(patientId)) {
|
||||
return AjaxResult.error("用户信息不能为空!");
|
||||
}
|
||||
return appletLoginService.getPatientInfoByPatientId(patientId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,155 @@
|
||||
package com.xinelu.applet.dto.appletlogin;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import com.xinelu.manage.domain.patientdiseaseinfo.PatientDiseaseInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-02 16:09:47
|
||||
* @Version 1.0
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class AppletUserInfoDTO extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -8543322521752828306L;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 护理人编号
|
||||
*/
|
||||
private String patientCode;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotBlank(message = "姓名不能为空", groups = {Insert.class})
|
||||
@Length(max = 20, message = "姓名不能超过20字符", groups = {Insert.class})
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@NotBlank(message = "手机号不能为空", groups = {Insert.class})
|
||||
@Length(max = 11, message = "手机号码不能超过11位", groups = {Insert.class})
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 所属区域地址
|
||||
*/
|
||||
@NotBlank(message = "所属区域不能为空", groups = {Insert.class})
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@NotBlank(message = "身份证号不能为空", groups = {Insert.class})
|
||||
@Length(max = 18, message = "身份证号不能超过18位", groups = {Insert.class})
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
@NotBlank(message = "居住地址不能为空", groups = {Insert.class})
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 个人头像地址
|
||||
*/
|
||||
private String headPictureUrl;
|
||||
|
||||
/**
|
||||
* 小区名称
|
||||
*/
|
||||
private String communityAliasName;
|
||||
|
||||
/**
|
||||
* 居住地址经度
|
||||
*/
|
||||
private String homeLongitude;
|
||||
|
||||
/**
|
||||
* 居住地址纬度
|
||||
*/
|
||||
private String homeLatitude;
|
||||
|
||||
/**
|
||||
* 用户微信unionid
|
||||
*/
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 用户微信openid
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 所在位置名称
|
||||
*/
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 疾病类型id集合
|
||||
*/
|
||||
private List<Long> diseaseIdList;
|
||||
|
||||
/**
|
||||
* 护理id类型
|
||||
*/
|
||||
private List<Long> nurseTypeIdList;
|
||||
|
||||
/**
|
||||
* 登录标识
|
||||
*/
|
||||
private Integer loginFlag;
|
||||
|
||||
/**
|
||||
* 会员疾病信息集合
|
||||
*/
|
||||
private List<PatientDiseaseInfo> diseaseInfoList;
|
||||
|
||||
/**
|
||||
* 会员完善信息来源
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 邀请好友完善信息方式-邀请人id
|
||||
*/
|
||||
private Long invitationPatientId;
|
||||
|
||||
/**
|
||||
* 累计签到次数
|
||||
*/
|
||||
private Integer totalSignInDays;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate birthDate;
|
||||
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.xinelu.applet.dto.appletlogin;
|
||||
|
||||
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import lombok.Data;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description 预约订单耗材输入参数实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-06 13:57:40
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AppointmentConsumableDTO implements Serializable {
|
||||
private static final long serialVersionUID = -9084427575084646478L;
|
||||
|
||||
/**
|
||||
* 订单明细表id
|
||||
*/
|
||||
private Long appointOrderDetailsId;
|
||||
|
||||
/**
|
||||
* 耗材包code
|
||||
*/
|
||||
private String consumableCode;
|
||||
|
||||
/**
|
||||
* 耗材详情
|
||||
*/
|
||||
@NotBlank(message = "耗材名称不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 50, message = "耗材名称不能超过50个字符", groups = {Insert.class, Update.class})
|
||||
private String consumableDetail;
|
||||
|
||||
/**
|
||||
* 耗材包价格
|
||||
*/
|
||||
@NotNull(message = "耗材包价格不能为空", groups = {Insert.class, Update.class})
|
||||
private BigDecimal consumablePrice;
|
||||
|
||||
/**
|
||||
* 耗材包数量
|
||||
*/
|
||||
@NotNull(message = "耗材包数量不能为空", groups = {Insert.class, Update.class})
|
||||
private Integer consumableCount;
|
||||
|
||||
/**
|
||||
* 耗材包单位
|
||||
*/
|
||||
@NotBlank(message = "耗材包单位不能为空", groups = {Insert.class, Update.class})
|
||||
private String consumableUnit;
|
||||
}
|
||||
@ -0,0 +1,193 @@
|
||||
package com.xinelu.applet.dto.appletlogin;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import lombok.Data;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 预约输入参数实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-06 13:26:20
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class AppointmentInfoDTO implements Serializable {
|
||||
private static final long serialVersionUID = 6099437044812889671L;
|
||||
|
||||
/**
|
||||
* 被护理人id
|
||||
*/
|
||||
@NotNull(message = "用户信息不能为空!", groups = {Insert.class, Update.class})
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
@NotNull(message = "护理站信息不能为空!", groups = {Insert.class, Update.class})
|
||||
private Long stationId;
|
||||
|
||||
/**
|
||||
* 护理项目id
|
||||
*/
|
||||
@NotNull(message = "套餐信息不能为空!", groups = {Insert.class, Update.class})
|
||||
private Long stationItemId;
|
||||
|
||||
/**
|
||||
* 护理项目价格id
|
||||
*/
|
||||
private Long stationItemPriceId;
|
||||
|
||||
/**
|
||||
* 服务地址
|
||||
*/
|
||||
@NotBlank(message = "服务地址不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 200, message = "服务地址不能超过200个字符", groups = {Insert.class, Update.class})
|
||||
private String serviceAddress;
|
||||
|
||||
/**
|
||||
* 服务日期
|
||||
*/
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@NotNull(message = "服务日期不能为空", groups = {Insert.class, Update.class})
|
||||
private LocalDate serviceDate;
|
||||
|
||||
/**
|
||||
* 服务开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@NotNull(message = "服务开始时间不能为空", groups = {Insert.class, Update.class})
|
||||
private LocalTime serviceStartTime;
|
||||
|
||||
/**
|
||||
* 服务结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalTime serviceEndTime;
|
||||
|
||||
/**
|
||||
* 护理项目名称
|
||||
*/
|
||||
@NotBlank(message = "套餐名称不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 50, message = "套餐名称不能超过50个字符", groups = {Insert.class, Update.class})
|
||||
private String nurseItemName;
|
||||
|
||||
/**
|
||||
* 护理项目价格
|
||||
*/
|
||||
private BigDecimal nurseItemPrice;
|
||||
|
||||
/**
|
||||
* 护理项目服务时长和单位
|
||||
*/
|
||||
@Length(max = 50, message = "套餐服务时长不能超过50个字符", groups = {Insert.class, Update.class})
|
||||
private String serveDurationUnit;
|
||||
|
||||
/**
|
||||
* 耗材总价格
|
||||
*/
|
||||
private BigDecimal consumableTotalPrice;
|
||||
|
||||
/**
|
||||
* 订单应付总价格
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 备注信息
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 订单数量
|
||||
*/
|
||||
private Long orderCount;
|
||||
|
||||
/**
|
||||
* 耗材包信息集合
|
||||
*/
|
||||
private List<AppointmentConsumableDTO> orderConsumableList;
|
||||
|
||||
/**
|
||||
* 下单方式,手机App:MOBILE_APP,微信小程序:WECHAT_APPLET,支付宝小程序:ALI_PAY_APPLET
|
||||
*/
|
||||
@NotBlank(message = "下单方式不能为空!", groups = {Insert.class, Update.class})
|
||||
private String orderChannel;
|
||||
|
||||
/**
|
||||
* 预约时间点间隔
|
||||
*/
|
||||
private String appointmentTimeInterval;
|
||||
|
||||
/**
|
||||
* 提前预约时长
|
||||
*/
|
||||
private String advanceAppointDuration;
|
||||
|
||||
/**
|
||||
* 预约时间点数量上限
|
||||
*/
|
||||
private Integer appointmentLimitCount;
|
||||
|
||||
/**
|
||||
* 营业时间上午开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@NotNull(message = "上午营业开始时间不能为空!", groups = {Insert.class, Update.class})
|
||||
private LocalTime morningOpenStartTime;
|
||||
|
||||
/**
|
||||
* 营业时间上午结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@NotNull(message = "上午营业结束时间不能为空!", groups = {Insert.class, Update.class})
|
||||
private LocalTime morningOpenEndTime;
|
||||
|
||||
/**
|
||||
* 营业时间下午开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@NotNull(message = "下午营业开始时间不能为空!", groups = {Insert.class, Update.class})
|
||||
private LocalTime afternoonOpenStartTime;
|
||||
|
||||
/**
|
||||
* 营业时间下午结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
@NotNull(message = "下午营业结束时间不能为空!", groups = {Insert.class, Update.class})
|
||||
private LocalTime afternoonOpenEndTime;
|
||||
|
||||
/**
|
||||
* 失能情况,NOT_DISABLED:未失能,DISABLED:已失能
|
||||
*/
|
||||
@NotBlank(message = "失能情况不能为空!", groups = {Insert.class, Update.class})
|
||||
private String disablingCondition;
|
||||
|
||||
/**
|
||||
* 失能原因
|
||||
*/
|
||||
private String disablingReason;
|
||||
|
||||
/**
|
||||
* 订单佣金金额
|
||||
*/
|
||||
private BigDecimal orderCommissionAmount;
|
||||
}
|
||||
@ -0,0 +1,74 @@
|
||||
package com.xinelu.applet.dto.appletlogin;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2023/2/27 11:14
|
||||
*/
|
||||
@Data
|
||||
public class PatientInfoPersonalCenterDTO implements Serializable {
|
||||
private static final long serialVersionUID = 6456221141849992770L;
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotBlank(message = "姓名不能为空", groups = {Insert.class})
|
||||
@Length(max = 20, message = "姓名不能超过20字符", groups = {Insert.class})
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@NotBlank(message = "手机号不能为空", groups = {Insert.class})
|
||||
@Length(max = 11, message = "手机号码不能超过11位", groups = {Insert.class})
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@NotBlank(message = "身份证号不能为空", groups = {Insert.class})
|
||||
@Length(max = 18, message = "身份证号不能超过18位", groups = {Insert.class})
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 个人头像地址
|
||||
*/
|
||||
private String headPictureUrl;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
private String sex;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private LocalDate birthDate;
|
||||
|
||||
|
||||
/**
|
||||
* 所在位置名称
|
||||
*/
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
@NotBlank(message = "居住地址不能为空", groups = {Insert.class})
|
||||
private String address;
|
||||
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.xinelu.applet.dto.appletlogin;
|
||||
|
||||
|
||||
import com.xinelu.common.custominterface.Query;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 预约输入实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-05 15:29:57
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class StationItemInfoDTO implements Serializable {
|
||||
private static final long serialVersionUID = 4977158514795211599L;
|
||||
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
@NotNull(message = "护理站信息不能为空", groups = {Query.class})
|
||||
private Long stationId;
|
||||
|
||||
/**
|
||||
* 护理项目id
|
||||
*/
|
||||
@NotNull(message = "护理项目信息不能为空", groups = {Query.class})
|
||||
private Long stationItemId;
|
||||
|
||||
/**
|
||||
* 护理项目价格id
|
||||
*/
|
||||
private Long stationItemPriceId;
|
||||
}
|
||||
@ -0,0 +1,169 @@
|
||||
package com.xinelu.applet.mapper.appletlogin;
|
||||
|
||||
import com.xinelu.applet.dto.appletlogin.AppointmentConsumableDTO;
|
||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO;
|
||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO;
|
||||
import com.xinelu.applet.vo.appletlogin.PatientVO;
|
||||
import com.xinelu.applet.vo.appletlogin.RegisterPatientInfoVO;
|
||||
import com.xinelu.applet.vo.diseaseinfo.DiseasesInfoVO;
|
||||
import com.xinelu.manage.domain.nursetype.NurseType;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-02 10:57:17
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface AppletLoginMapper {
|
||||
|
||||
/**
|
||||
* 根据openid查询被护理人信息
|
||||
*
|
||||
* @param openId 微信openId
|
||||
* @return 被护理人基本信息
|
||||
*/
|
||||
PatientInfo getPatientInfoByOpenId(String openId);
|
||||
|
||||
/**
|
||||
* 根据patientId查询被护理人信息
|
||||
*
|
||||
* @param patientId 用户id主键
|
||||
* @return 被护理人基本信息
|
||||
*/
|
||||
PatientInfo getPatientInfoByPatientId(Long patientId);
|
||||
|
||||
/**
|
||||
* 查询所有的基本信息
|
||||
*
|
||||
* @return 基本信息集合
|
||||
*/
|
||||
List<DiseasesInfoVO> getAllDiseaseInfo();
|
||||
|
||||
/**
|
||||
* 查询所有的护理类型信息
|
||||
*
|
||||
* @return 护理类型信息集合
|
||||
*/
|
||||
List<NurseType> getAllNurseTypeInfo();
|
||||
|
||||
/**
|
||||
* 根据手机号或者身份证号查询被护理人信息
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @param cardNo 身份证号
|
||||
* @return 数量
|
||||
*/
|
||||
int getPatientByPhoneAndCardNo(@Param("phone") String phone, @Param("cardNo") String cardNo);
|
||||
|
||||
/**
|
||||
* 查询护理人列表信息
|
||||
*
|
||||
* @param openId 微信的openid
|
||||
* @return 护理人信息集合
|
||||
*/
|
||||
List<PatientVO> getPatientInfoList(String openId);
|
||||
|
||||
/**
|
||||
* 查询预约护理站项目信息
|
||||
*
|
||||
* @param stationId 护理站id
|
||||
* @param stationItemId 护理站项目id
|
||||
* @param stationItemPriceId 护理站项目价格id
|
||||
* @return 护理项目信息集合
|
||||
*/
|
||||
NurserStationItemInfoVO getNurserStationItemInfo(@Param("stationId") Long stationId,
|
||||
@Param("stationItemId") Long stationItemId,
|
||||
@Param("stationItemPriceId") Long stationItemPriceId);
|
||||
|
||||
/**
|
||||
* 查询护理站项目耗材信息
|
||||
*
|
||||
* @param stationId 护理站id
|
||||
* @param stationItemId 护理项目id
|
||||
* @return 护理项目耗材集合
|
||||
*/
|
||||
List<NurserStationItemConsumableVO> getItemConsumableList(@Param("stationId") Long stationId,
|
||||
@Param("stationItemId") Long stationItemId);
|
||||
|
||||
/**
|
||||
* 批量新增订单耗材信息
|
||||
*
|
||||
* @param orderConsumableList 耗材详情表集合
|
||||
* @return 新增结果
|
||||
*/
|
||||
int insertBatchOrderConsumable(List<AppointmentConsumableDTO> orderConsumableList);
|
||||
|
||||
/**
|
||||
* 根据被护理人id查询被护理人相关信息
|
||||
*
|
||||
* @param patientId 被护理人id
|
||||
* @return 被护理人相关信息
|
||||
*/
|
||||
RegisterPatientInfoVO getRegisterPatientInfoById(Long patientId);
|
||||
|
||||
/**
|
||||
* 根据被护理人id查询被护理人护理类型信息
|
||||
*
|
||||
* @param patientId 被护理人id
|
||||
* @return 被护理人护理类型集合
|
||||
*/
|
||||
List<NurseType> getPatientNurseTypeInfo(Long patientId);
|
||||
|
||||
/**
|
||||
* 根据phone查询被护理人信息
|
||||
*
|
||||
* @param phone 手机号
|
||||
* @param openId 用户微信openId
|
||||
* @return 被护理人基本信息
|
||||
*/
|
||||
PatientInfoVO getPatientInfoByPhone(@Param("phone") String phone, @Param("openId") String openId);
|
||||
|
||||
/**
|
||||
* 根据会员id查询疾病信息
|
||||
*
|
||||
* @param patientId 会员id
|
||||
* @return java.util.List<com.xinyilu.base.vo.diseaseinfo.DiseasesInfoVO>
|
||||
**/
|
||||
List<DiseasesInfoVO> selectPatientDiseaseInfos(Long patientId);
|
||||
|
||||
/**
|
||||
* 查询预约护理站项目信息(0203项目详情)
|
||||
*
|
||||
* @param stationId 护理站id
|
||||
* @param stationItemId 护理站项目id
|
||||
* @param stationItemPriceId 护理站项目价格id
|
||||
* @return 护理项目信息集合
|
||||
*/
|
||||
NurserStationItemInfoVO getNurserStationItemAndPoser(@Param("stationId") Long stationId,
|
||||
@Param("stationItemId") Long stationItemId,
|
||||
@Param("stationItemPriceId") Long stationItemPriceId);
|
||||
|
||||
/**
|
||||
* 根据护理项目id和预约时间点统计预约订单数量
|
||||
*
|
||||
* @param itemId 护理项目id
|
||||
* @param serviceDate 预约时间日期
|
||||
* @param serviceStartTime 预约时间点
|
||||
* @param orderStatusList 预约订单状态
|
||||
* @return 订单数量
|
||||
*/
|
||||
Integer getAppointOrderCountByIdAndTime(@Param("itemId") Long itemId, @Param("serviceDate") LocalDate serviceDate,
|
||||
@Param("serviceStartTime") LocalTime serviceStartTime,
|
||||
@Param("orderStatusList") List<String> orderStatusList);
|
||||
|
||||
|
||||
/**
|
||||
* 删除会员账户信息,逻辑删除
|
||||
*
|
||||
* @param patientId 会员id
|
||||
* @return 删除数量
|
||||
*/
|
||||
int deletePatientInfoById(Long patientId);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.xinelu.applet.service.appletlogin;
|
||||
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
|
||||
/**
|
||||
* @Description 微信小程序登录注册业务层
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-02 10:55:14
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface AppletLoginService {
|
||||
|
||||
/**
|
||||
* 根据用户的patientId查询用户是否注册
|
||||
*
|
||||
* @param patientId 用户id主键
|
||||
* @return 个人信息
|
||||
*/
|
||||
AjaxResult getPatientInfoByPatientId(Long patientId);
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.xinelu.applet.service.appletlogin.impl;
|
||||
|
||||
|
||||
import com.xinelu.applet.mapper.appletlogin.AppletLoginMapper;
|
||||
import com.xinelu.applet.service.appletlogin.AppletLoginService;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description 微信小程序登录注册业务层实现类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-02 10:55:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class AppletLoginServiceImpl implements AppletLoginService {
|
||||
|
||||
@Resource
|
||||
private AppletLoginMapper appletLoginMapper;
|
||||
|
||||
/**
|
||||
* 根据微信用户的patientId查询用户是否注册
|
||||
*
|
||||
* @param patientId 用户id主键
|
||||
* @return 用户信息
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getPatientInfoByPatientId(Long patientId) {
|
||||
PatientInfo patientInfo = appletLoginMapper.getPatientInfoByPatientId(patientId);
|
||||
if (Objects.isNull(patientInfo)) {
|
||||
return AjaxResult.error("当前用户未认证个人信息,请先认证个人信息!");
|
||||
}
|
||||
return AjaxResult.success(patientInfo);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.xinelu.applet.vo.appletlogin;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description 预约护理站项目耗材返回值实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-06 09:35:53
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class NurserStationItemConsumableVO implements Serializable {
|
||||
private static final long serialVersionUID = 4436146778001296338L;
|
||||
/**
|
||||
* 耗材编号
|
||||
*/
|
||||
private String consumableCode;
|
||||
|
||||
/**
|
||||
* 耗材详情
|
||||
*/
|
||||
private String consumableDetail;
|
||||
|
||||
/**
|
||||
* 耗材包单位
|
||||
*/
|
||||
private String consumableUnit;
|
||||
|
||||
/**
|
||||
* 耗材包价格
|
||||
*/
|
||||
private BigDecimal consumablePrice;
|
||||
|
||||
/**
|
||||
* 耗材包数量
|
||||
*/
|
||||
private Integer consumableCount;
|
||||
}
|
||||
@ -0,0 +1,140 @@
|
||||
package com.xinelu.applet.vo.appletlogin;
|
||||
|
||||
import com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO;
|
||||
import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 预约护理站项目信息返回值实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-06 09:06:21
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class NurserStationItemInfoVO implements Serializable {
|
||||
private static final long serialVersionUID = -4568299806954496609L;
|
||||
/**
|
||||
* 护理站id
|
||||
*/
|
||||
private Long stationId;
|
||||
|
||||
/**
|
||||
* 护理项目id
|
||||
*/
|
||||
private Long stationItemId;
|
||||
|
||||
/**
|
||||
* 护理项目价格id
|
||||
*/
|
||||
private Long stationItemPriceId;
|
||||
|
||||
/**
|
||||
* 护理项目编号
|
||||
*/
|
||||
private String nurseItemCode;
|
||||
|
||||
/**
|
||||
* 护理项目名称
|
||||
*/
|
||||
private String nurseItemName;
|
||||
|
||||
/**
|
||||
* 提前预约时长,单位天
|
||||
*/
|
||||
private String advanceAppointDuration;
|
||||
|
||||
/**
|
||||
* 护理服务时长和单位
|
||||
*/
|
||||
private String serveDurationUnit;
|
||||
|
||||
/**
|
||||
* 护理项目价格
|
||||
*/
|
||||
private BigDecimal nurseItemPrice;
|
||||
|
||||
/**
|
||||
* 护理项目耗材总价格
|
||||
*/
|
||||
private BigDecimal consumableTotalPrice;
|
||||
|
||||
/**
|
||||
* 应付金额
|
||||
*/
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 护理项目内容简介
|
||||
*/
|
||||
private String nurseItemContent;
|
||||
|
||||
/**
|
||||
* 护理项目图片地址
|
||||
*/
|
||||
private String itemPictureUrl;
|
||||
|
||||
/**
|
||||
* 护理项目耗材信息集合
|
||||
*/
|
||||
private List<NurserStationItemConsumableVO> itemConsumableList;
|
||||
|
||||
/**
|
||||
* 预约时间点上限
|
||||
*/
|
||||
private Integer appointmentLimitCount;
|
||||
|
||||
/**
|
||||
* 预约时间间隔
|
||||
*/
|
||||
private String appointmentTimeInterval;
|
||||
|
||||
/**
|
||||
* 护理站上午营业开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
private LocalTime morningOpenStartTime;
|
||||
|
||||
/**
|
||||
* 护理站上午营业结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
private LocalTime morningOpenEndTime;
|
||||
|
||||
/**
|
||||
* 护理站下午营业开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
private LocalTime afternoonOpenStartTime;
|
||||
|
||||
/**
|
||||
* 护理站下午营业结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern = "HH:mm")
|
||||
private LocalTime afternoonOpenEndTime;
|
||||
|
||||
/**
|
||||
* 近七天的预约时间点集合
|
||||
*/
|
||||
List<WeekDaysVO> appointmentTimeList;
|
||||
|
||||
/**
|
||||
* 护理站名称(0203版新增)
|
||||
*/
|
||||
private String nurseStationName;
|
||||
|
||||
/**
|
||||
* 护理项目海报集合(0203版新增)
|
||||
*/
|
||||
private List<PoserInfoHomeVO> poserInfoList;
|
||||
|
||||
/**
|
||||
* 护理项目佣金金额
|
||||
*/
|
||||
private BigDecimal commissionAmount;
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.xinelu.applet.vo.appletlogin;
|
||||
|
||||
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 会员登录实体类
|
||||
* @Author ZH
|
||||
* @Date 2023-03-31
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PatientAndPersonFlagVO extends PatientInfo implements Serializable {
|
||||
private static final long serialVersionUID = -8901662810070697229L;
|
||||
|
||||
/**
|
||||
* 护理员账号标识标识
|
||||
*/
|
||||
private Boolean personLoginFlag;
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.xinelu.applet.vo.appletlogin;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 被护理人信息返回值实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-04 14:23:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class PatientVO implements Serializable {
|
||||
private static final long serialVersionUID = 3640074027224739707L;
|
||||
/**
|
||||
* 护理人表id
|
||||
*/
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 护理人姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 微信unionid
|
||||
*/
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 所属区域编码
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
|
||||
/**
|
||||
* 省名称
|
||||
*/
|
||||
private String provinceName;
|
||||
|
||||
/**
|
||||
* 市名称
|
||||
*/
|
||||
private String cityName;
|
||||
|
||||
/**
|
||||
* 区名称
|
||||
*/
|
||||
private String regionName;
|
||||
|
||||
/**
|
||||
* 街道名称
|
||||
*/
|
||||
private String streetName;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.xinelu.applet.vo.appletlogin;
|
||||
|
||||
|
||||
import com.xinelu.manage.domain.diseaseinfo.DiseaseInfo;
|
||||
import com.xinelu.manage.domain.nursetype.NurseType;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 注册信息返回值实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2022-09-14 17:18:01
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class RegisterPatientInfoVO implements Serializable {
|
||||
private static final long serialVersionUID = -544718055450210107L;
|
||||
/**
|
||||
* 护理人编号
|
||||
*/
|
||||
private String patientCode;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 所属区域地址
|
||||
*/
|
||||
private String areaCode;
|
||||
|
||||
/**
|
||||
* 区域名称
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 居住地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 小区名称
|
||||
*/
|
||||
private String communityAliasName;
|
||||
|
||||
/**
|
||||
* 居住地址经度
|
||||
*/
|
||||
private String homeLongitude;
|
||||
|
||||
/**
|
||||
* 居住地址纬度
|
||||
*/
|
||||
private String homeLatitude;
|
||||
|
||||
/**
|
||||
* 用户微信unionid
|
||||
*/
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 用户微信openid
|
||||
*/
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 疾病类型信息集合
|
||||
*/
|
||||
private List<DiseaseInfo> diseaseInfoList;
|
||||
|
||||
/**
|
||||
* 护理类型信息集合
|
||||
*/
|
||||
private List<NurseType> nurseTypeList;
|
||||
}
|
||||
@ -0,0 +1,100 @@
|
||||
package com.xinelu.applet.vo.diseaseinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author ljh
|
||||
* @version 1.0
|
||||
* Create by 2022/11/11 13:36
|
||||
*/
|
||||
@Data
|
||||
public class DiseasesInfoVO extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -3461137370921513980L;
|
||||
/***
|
||||
* 疾病id
|
||||
**/
|
||||
private Long diseaseId;
|
||||
|
||||
/***
|
||||
* 人员id
|
||||
**/
|
||||
private Long patientId;
|
||||
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "请选择疾病信息", groups = {Update.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 疾病唯一编码
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病唯一编码")
|
||||
@Excel(name = "疾病唯一编码")
|
||||
private String diseaseCode;
|
||||
|
||||
/**
|
||||
* 疾病名称
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病名称")
|
||||
@Excel(name = "疾病名称")
|
||||
@NotNull(message = "疾病名称不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 50, message = "疾病名称不能超过50个字符", groups = {Insert.class, Update.class})
|
||||
private String diseaseName;
|
||||
|
||||
/**
|
||||
* 疾病描述
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病描述")
|
||||
@Excel(name = "疾病描述")
|
||||
@NotNull(message = "疾病描述不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 100, message = "疾病描述不能超过100个字符", groups = {Insert.class, Update.class})
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty(value = "排序")
|
||||
@Excel(name = "排序")
|
||||
@NotNull(message = "排序不能为空", groups = {Insert.class, Update.class})
|
||||
private Integer sort;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
if (!super.equals(o)) {
|
||||
return false;
|
||||
}
|
||||
DiseasesInfoVO that = (DiseasesInfoVO) o;
|
||||
return Objects.equals(diseaseId, that.diseaseId) && Objects.equals(diseaseName, that.diseaseName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(diseaseId, diseaseName);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,44 @@
|
||||
package com.xinelu.applet.vo.specialdisease;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 日期和周几返回值实体类
|
||||
* @Author 纪寒
|
||||
* @Date 2023-02-14 14:42:16
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class WeekDaysVO implements Serializable {
|
||||
private static final long serialVersionUID = -2041624480230245987L;
|
||||
/**
|
||||
* 周几
|
||||
*/
|
||||
private String week;
|
||||
|
||||
/**
|
||||
* 日期
|
||||
*/
|
||||
private String date;
|
||||
|
||||
/**
|
||||
* 上午日期时间点
|
||||
*/
|
||||
private List<String> morningList;
|
||||
|
||||
/**
|
||||
* 下午日期时间点
|
||||
*/
|
||||
private List<String> afternoonList;
|
||||
|
||||
/**
|
||||
* 日期,格式:MM-dd
|
||||
*/
|
||||
@JsonFormat(pattern = "MM-dd")
|
||||
private LocalDate healthConsultationDate;
|
||||
}
|
||||
@ -0,0 +1,383 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinelu.applet.mapper.appletlogin.AppletLoginMapper">
|
||||
|
||||
<!-- 被护理人基本信息以及其疾病信息结果映射 -->
|
||||
<resultMap type="com.xinelu.applet.vo.appletlogin.RegisterPatientInfoVO" id="RegisterPatientInfo">
|
||||
<result property="patientCode" column="nurseStationId"/>
|
||||
<result property="patientName" column="patientName"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="areaCode" column="areaCode"/>
|
||||
<result property="areaName" column="areaName"/>
|
||||
<result property="cardNo" column="cardNo"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="communityAliasName" column="communityAliasName"/>
|
||||
<result property="homeLongitude" column="homeLongitude"/>
|
||||
<result property="homeLatitude" column="homeLatitude"/>
|
||||
<result property="unionid" column="unionid"/>
|
||||
<result property="openid" column="openid"/>
|
||||
<collection property="diseaseInfoList" javaType="java.util.List" resultMap="PatientDiseaseInfoResult"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 护理人疾病信息结果映射 -->
|
||||
<resultMap type="DiseaseInfo" id="PatientDiseaseInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="diseaseCode" column="disease_code"/>
|
||||
<result property="diseaseName" column="disease_name"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 护理站及护理信息结果映射 -->
|
||||
<resultMap type="com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO"
|
||||
id="NurserStationItemInfoVO">
|
||||
<result property="stationId" column="stationId"/>
|
||||
<result property="stationItemId" column="stationItemId"/>
|
||||
<result property="stationItemPriceId" column="stationItemPriceId"/>
|
||||
<result property="nurseItemCode" column="nurse_item_code"/>
|
||||
<result property="nurseItemName" column="nurse_item_name"/>
|
||||
<result property="advanceAppointDuration" column="advance_appoint_duration"/>
|
||||
<result property="serveDurationUnit" column="serve_duration_unit"/>
|
||||
<result property="nurseItemPrice" column="nurseItemPrice"/>
|
||||
<result property="nurseItemContent" column="nurse_item_content"/>
|
||||
<result property="itemPictureUrl" column="item_picture_url"/>
|
||||
<result property="nurseStationName" column="nurse_station_name"/>
|
||||
<collection property="poserInfoList" javaType="java.util.List" resultMap="PoserInfoResult"/>
|
||||
</resultMap>
|
||||
<!-- 海报模块信息结果映射 -->
|
||||
<resultMap type="com.xinelu.applet.vo.nearbynursingstation.PoserInfoHomeVO" id="PoserInfoResult">
|
||||
<result property="id" column="poserInfoId"/>
|
||||
<result property="poserName" column="poser_name"/>
|
||||
<result property="posterPictureUrl" column="poster_picture_url"/>
|
||||
<result property="posterVideoUrl" column="poster_video_url"/>
|
||||
<result property="moduleType" column="module_type"/>
|
||||
<result property="jumpLink" column="jump_link"/>
|
||||
<result property="dictCode" column="dict_code"/>
|
||||
<result property="dictLabel" column="dict_label"/>
|
||||
<result property="dictValue" column="dict_value"/>
|
||||
<result property="dictType" column="dict_type"/>
|
||||
</resultMap>
|
||||
<select id="getPatientInfoByOpenId" parameterType="string" resultType="patientInfo">
|
||||
SELECT
|
||||
id,
|
||||
community_code,
|
||||
area_code,
|
||||
patient_code,
|
||||
patient_name,
|
||||
card_no,
|
||||
user_id,
|
||||
unionid,
|
||||
openid,
|
||||
phone,
|
||||
address,
|
||||
urgent_contact_name,
|
||||
urgent_contact_phone,
|
||||
community_alias_name,
|
||||
home_longitude,
|
||||
home_latitude,
|
||||
head_picture_url
|
||||
FROM
|
||||
patient_info
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="openId != null and openId != ''">
|
||||
and openid = #{openId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getPatientInfoByPatientId" parameterType="long" resultType="patientInfo">
|
||||
SELECT
|
||||
id,
|
||||
community_code,
|
||||
area_code,
|
||||
patient_code,
|
||||
patient_name,
|
||||
card_no,
|
||||
user_id,
|
||||
unionid,
|
||||
openid,
|
||||
phone,
|
||||
address,
|
||||
urgent_contact_name,
|
||||
urgent_contact_phone,
|
||||
community_alias_name,
|
||||
home_longitude,
|
||||
home_latitude,
|
||||
head_picture_url
|
||||
FROM
|
||||
patient_info
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="patient != null">
|
||||
and id = #{patient}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getAllDiseaseInfo" resultType="com.xinelu.applet.vo.diseaseinfo.DiseasesInfoVO">
|
||||
SELECT id,
|
||||
id diseaseId,
|
||||
user_id,
|
||||
disease_code,
|
||||
disease_name,
|
||||
sort
|
||||
FROM disease_info
|
||||
order by sort asc
|
||||
</select>
|
||||
|
||||
<select id="getAllNurseTypeInfo" resultType="nurseType">
|
||||
SELECT id,
|
||||
user_id,
|
||||
nurse_type_code,
|
||||
nurse_type_name
|
||||
FROM nurse_type
|
||||
</select>
|
||||
|
||||
<select id="getPatientByPhoneAndCardNo" resultType="int">
|
||||
select count(1) patientCount from patient_info
|
||||
<where>
|
||||
and del_flag = 0
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="cardNo != null and cardNo != ''">
|
||||
and card_no = #{cardNo}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getPatientInfoList"
|
||||
resultType="com.xinelu.applet.vo.appletlogin.PatientVO">
|
||||
select id patient_id, patient_name, unionid, openid, address, phone from patient_info
|
||||
<where>
|
||||
<if test="openId != null and openId != ''">
|
||||
openid = #{openId}
|
||||
</if>
|
||||
</where>
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
<select id="getItemConsumableList"
|
||||
resultType="com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO">
|
||||
SELECT
|
||||
nsic.consumable_detail,
|
||||
nsic.consumable_unit,
|
||||
IFNULL(nsic.consumable_price, 0) consumable_price,
|
||||
nsic.consumable_count
|
||||
FROM
|
||||
nurse_station_item_consumable nsic
|
||||
<where>
|
||||
<if test="stationItemId != null">
|
||||
and nsic.nurse_station_item_id = #{stationItemId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getNurserStationItemInfo"
|
||||
resultType="com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO">
|
||||
SELECT
|
||||
nsi.nurse_station_id stationId,
|
||||
nsi.id stationItemId,
|
||||
nsip.id stationItemPriceId,
|
||||
nsi.nurse_item_code,
|
||||
nsi.nurse_item_name,
|
||||
IFNULL(nsi.advance_appoint_duration, '') advance_appoint_duration,
|
||||
nsi.nurse_item_content,
|
||||
nsi.item_picture_url,
|
||||
nsip.serve_duration_unit,
|
||||
IFNULL(nsip.price, 0) nurseItemPrice,
|
||||
nsi.appointment_limit_count,
|
||||
IFNULL(nsi.appointment_time_interval, '') appointment_time_interval,
|
||||
ns.morning_open_start_time,
|
||||
ns.morning_open_end_time,
|
||||
ns.afternoon_open_start_time,
|
||||
ns.afternoon_open_end_time,
|
||||
nsip.commission_amount
|
||||
FROM
|
||||
nurse_station_item nsi
|
||||
LEFT JOIN nurse_station_item_price nsip ON nsi.id = nsip.nurse_station_item_id
|
||||
LEFT JOIN nurse_station ns ON ns.id = nsi.nurse_station_id
|
||||
<where>
|
||||
<if test="stationId != null">
|
||||
and nsi.nurse_station_id = #{stationId}
|
||||
</if>
|
||||
<if test="stationItemId != null">
|
||||
and nsi.id = #{stationItemId}
|
||||
</if>
|
||||
<if test="stationItemPriceId != null">
|
||||
and nsip.id = #{stationItemPriceId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertBatchOrderConsumable">
|
||||
insert into appointment_order_consumable(
|
||||
appoint_order_details_id,
|
||||
order_consumable_name,
|
||||
order_consumable_price,
|
||||
order_consumable_count,
|
||||
consumable_unit,
|
||||
del_flag,
|
||||
create_time
|
||||
) values
|
||||
<foreach item="orderConsumable" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{orderConsumable.appointOrderDetailsId},
|
||||
#{orderConsumable.consumableDetail},
|
||||
#{orderConsumable.consumablePrice},
|
||||
#{orderConsumable.consumableCount},
|
||||
#{orderConsumable.consumableUnit},
|
||||
0,
|
||||
now()
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<select id="getRegisterPatientInfoById" resultMap="RegisterPatientInfo">
|
||||
SELECT
|
||||
pi.id patientId,
|
||||
pi.area_code areaCode,
|
||||
sa.area_name areaName,
|
||||
pi.patient_code patientCode,
|
||||
pi.patient_name patientName,
|
||||
pi.card_no cardNo,
|
||||
pi.unionid,
|
||||
pi.openid,
|
||||
pi.phone,
|
||||
pi.address,
|
||||
pi.community_alias_name communityAliasName,
|
||||
pi.home_longitude homeLongitude,
|
||||
pi.home_latitude homeLatitude,
|
||||
di.id,
|
||||
di.disease_code,
|
||||
di.disease_name
|
||||
FROM
|
||||
patient_info pi
|
||||
left join sys_area sa on pi.area_code = sa.area_code
|
||||
left join patient_disease_info pdi on pi.id = pdi.patient_id
|
||||
left join disease_info di on pdi.disease_id = di.id
|
||||
<where>
|
||||
<if test="patientId != null">
|
||||
pi.id = #{patientId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getPatientNurseTypeInfo" resultType="nurseType">
|
||||
SELECT
|
||||
nt.id,
|
||||
nt.nurse_type_code,
|
||||
nt.nurse_type_name
|
||||
FROM
|
||||
nurse_type nt
|
||||
LEFT JOIN patient_nurse_type pnt ON pnt.nurse_type_id = nt.id
|
||||
<where>
|
||||
<if test="patientId != null">
|
||||
pnt.patient_id = #{patientId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getPatientInfoByPhone" parameterType="string"
|
||||
resultType="com.xinelu.manage.vo.patientinfo.PatientInfoVO">
|
||||
SELECT
|
||||
id,
|
||||
community_code,
|
||||
area_code,
|
||||
patient_code,
|
||||
patient_name,
|
||||
card_no,
|
||||
user_id,
|
||||
unionid,
|
||||
openid,
|
||||
phone,
|
||||
address,
|
||||
urgent_contact_name,
|
||||
urgent_contact_phone,
|
||||
community_alias_name,
|
||||
home_longitude,
|
||||
home_latitude,
|
||||
head_picture_url,
|
||||
(select count(1) from nurse_station_person where phone = #{phone}) personCount
|
||||
FROM
|
||||
patient_info
|
||||
<where>
|
||||
del_flag = 0
|
||||
<if test="phone != null and phone != ''">
|
||||
and phone = #{phone}
|
||||
</if>
|
||||
<if test="openId != null and openId != ''">
|
||||
and openid = #{openId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectPatientDiseaseInfos" parameterType="com.xinelu.applet.vo.diseaseinfo.DiseasesInfoVO"
|
||||
resultType="com.xinelu.applet.vo.diseaseinfo.DiseasesInfoVO">
|
||||
select
|
||||
id,
|
||||
patient_id,
|
||||
disease_id,
|
||||
user_id,
|
||||
disease_name
|
||||
from patient_disease_info
|
||||
<where>
|
||||
<if test="patientId != null ">
|
||||
and patient_id = #{patientId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getNurserStationItemAndPoser" resultMap="NurserStationItemInfoVO">
|
||||
SELECT
|
||||
nsi.nurse_item_name,
|
||||
nsi.nurse_item_content,
|
||||
nsi.item_picture_url,
|
||||
IFNULL(nsip.price, 0) nurseItemPrice,
|
||||
ns.nurse_station_name,
|
||||
pi.poster_picture_url,
|
||||
pi.poster_video_url,
|
||||
pi.module_type,
|
||||
pi.jump_link
|
||||
FROM
|
||||
nurse_station_item nsi
|
||||
LEFT JOIN nurse_station_item_price nsip ON nsi.id = nsip.nurse_station_item_id
|
||||
LEFT JOIN nurse_station ns ON ns.id = nsi.nurse_station_id
|
||||
LEFT JOIN poser_info pi ON pi.nurse_item_id = nsi.id
|
||||
<where>
|
||||
<if test="stationId != null">
|
||||
and nsi.nurse_station_id = #{stationId}
|
||||
</if>
|
||||
<if test="stationItemId != null">
|
||||
and nsi.id = #{stationItemId}
|
||||
</if>
|
||||
<if test="stationItemPriceId != null">
|
||||
and nsip.id = #{stationItemPriceId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getAppointOrderCountByIdAndTime" resultType="integer">
|
||||
SELECT
|
||||
count( 1 ) orderCount
|
||||
FROM
|
||||
appointment_order ao
|
||||
INNER JOIN appointment_order_details aod ON ao.order_no = aod.order_no
|
||||
WHERE
|
||||
aod.nurse_station_item_id = #{itemId}
|
||||
AND aod.service_start_time = #{serviceStartTime}
|
||||
AND aod.service_date = #{serviceDate}
|
||||
AND ao.order_status IN
|
||||
<foreach item="orderStatus" collection="orderStatusList" open="(" separator="," close=")">
|
||||
#{orderStatus}
|
||||
</foreach>
|
||||
</select>
|
||||
<update id="deletePatientInfoById">
|
||||
update patient_info
|
||||
set del_flag = 1,
|
||||
update_time = now()
|
||||
where id = #{patientId}
|
||||
</update>
|
||||
</mapper>
|
||||
@ -0,0 +1,92 @@
|
||||
package com.xinelu.manage.domain.diseaseinfo;
|
||||
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import com.xinelu.common.custominterface.Insert;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import net.sf.jsqlparser.statement.update.Update;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 疾病信息字典对象 disease_info
|
||||
*
|
||||
* @author 纪寒
|
||||
* @date 2022-09-02
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "疾病信息字典对象", description = "disease_info")
|
||||
public class DiseaseInfo extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -3668410738484204313L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@NotNull(message = "请选择疾病信息", groups = {Update.class})
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户id")
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 疾病唯一编码
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病唯一编码")
|
||||
@Excel(name = "疾病唯一编码")
|
||||
private String diseaseCode;
|
||||
|
||||
/**
|
||||
* 疾病名称
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病名称")
|
||||
@Excel(name = "疾病名称")
|
||||
@NotNull(message = "疾病名称不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 50, message = "疾病名称不能超过50个字符", groups = {Insert.class, Update.class})
|
||||
private String diseaseName;
|
||||
|
||||
/**
|
||||
* 疾病描述
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病描述")
|
||||
@Excel(name = "疾病描述")
|
||||
@NotNull(message = "疾病描述不能为空", groups = {Insert.class, Update.class})
|
||||
@Length(max = 100, message = "疾病描述不能超过100个字符", groups = {Insert.class, Update.class})
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@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("userId", getUserId())
|
||||
.append("diseaseCode", getDiseaseCode())
|
||||
.append("diseaseName", getDiseaseName())
|
||||
.append("sort", getSort())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,76 @@
|
||||
package com.xinelu.manage.domain.patientdiseaseinfo;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 患者疾病关系对象 patient_disease_info
|
||||
*
|
||||
* @author 纪寒
|
||||
* @date 2022-09-02
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ApiModel(value = "患者疾病关系对象", description = "patient_disease_info")
|
||||
public class PatientDiseaseInfo extends BaseDomain implements Serializable {
|
||||
private static final long serialVersionUID = -3788106898887561459L;
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 被护理人基本信息表id
|
||||
*/
|
||||
@ApiModelProperty(value = "被护理人基本信息表id")
|
||||
@Excel(name = "被护理人基本信息表id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 疾病表id
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病表id")
|
||||
@Excel(name = "疾病表id")
|
||||
private Long diseaseId;
|
||||
|
||||
/**
|
||||
* 用户表id
|
||||
*/
|
||||
@ApiModelProperty(value = "用户表id")
|
||||
@Excel(name = "用户表id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 疾病名称
|
||||
*/
|
||||
@ApiModelProperty(value = "疾病名称")
|
||||
@Excel(name = "疾病名称")
|
||||
private String diseaseName;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("patientId", getPatientId())
|
||||
.append("diseaseId", getDiseaseId())
|
||||
.append("userId", getUserId())
|
||||
.append("diseaseName", getDiseaseName())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user