Merge branch 'jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into dev_gy_0920
This commit is contained in:
commit
7d17791ac1
@ -116,4 +116,30 @@ public class AppletLoginController extends BaseController {
|
||||
}
|
||||
return appletLoginService.existPatientInfo(openId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询省级区域信息信息(小程序app修改用户地址信息查询)
|
||||
*
|
||||
* @return 省级区域信息集合
|
||||
*/
|
||||
@GetMapping("/getProvinceInfo")
|
||||
public AjaxResult getProvinceAreaInfo() {
|
||||
return appletLoginService.getProvinceAreaInfo();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级区域编码查询下级区域(小程序app修改用户地址信息查询)
|
||||
*
|
||||
* @param areaCode 父级区域编码
|
||||
* @return 所属下级区域信息集合
|
||||
*/
|
||||
@GetMapping("/getSubordinateInfo")
|
||||
public AjaxResult getSubordinateAreaInfo(String areaCode) {
|
||||
if (StringUtils.isBlank(areaCode)) {
|
||||
return AjaxResult.error("上级区域编码不能为空");
|
||||
}
|
||||
return appletLoginService.getSubordinateAreaInfo(areaCode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -2,9 +2,11 @@ package com.xinelu.applet.controller.nurseapplogin;
|
||||
|
||||
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
|
||||
import com.xinelu.applet.service.nurseapplogin.NurseAppLoginService;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.common.annotation.MobileRequestAuthorization;
|
||||
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.Query;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.regex.RegexUtil;
|
||||
@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
;
|
||||
@ -80,5 +83,20 @@ public class NurseAppLoginController extends BaseController {
|
||||
}
|
||||
return nurseAppLoginService.nurseAppPersonal(patientId);
|
||||
}
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param orderStatus 预约订单状态
|
||||
* @return 结果
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/appServiceOrder")
|
||||
public TableDataInfo selectAppServiceOrder(Long patientId, String orderStatus) {
|
||||
startPage();
|
||||
List<OrderAndItemVO> appointmentOrderDetails = nurseAppLoginService.selectAppServiceOrderItem(patientId, orderStatus);
|
||||
return getDataTable(appointmentOrderDetails);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@ public class ChatRecordDTO extends BaseEntity implements Serializable {
|
||||
/**
|
||||
* 发送时间,时间格式:yyyy-MM-dd HH:mm:ss
|
||||
*/
|
||||
@NotNull(message = "接收时间不能为空", groups = {Insert.class})
|
||||
private Date sendTime;
|
||||
|
||||
/**
|
||||
|
||||
@ -128,6 +128,10 @@ public class ConsultationInfoDTO extends BaseEntity implements Serializable {
|
||||
@Length(max = 100, message = "病历不能超过100位", groups = {Insert.class, Update.class})
|
||||
private String medicalRecord;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 问诊资料文件
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xinelu.applet.mapper.nurseapplogin;
|
||||
|
||||
|
||||
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -22,6 +23,15 @@ public interface NurseAppLoginMapper {
|
||||
*/
|
||||
PatientAndDiseaseVO getPatientDiseaseByPatientId(@Param("patientId") Long patientId);
|
||||
|
||||
/**
|
||||
* 预约查询预约订单明细
|
||||
*
|
||||
* @param patientId 预约订单明细主键
|
||||
* @param orderStatus 预约状态
|
||||
* @return 预约订单明细
|
||||
*/
|
||||
List<OrderAndItemVO> selectAppointmentOrderDetailsByPatientId(@Param("patientId") Long patientId, @Param("orderStatus") String orderStatus);
|
||||
|
||||
/**
|
||||
* 查询信息完善标识符
|
||||
*
|
||||
|
||||
@ -52,4 +52,19 @@ public interface AppletLoginService {
|
||||
* @return 护理人列表集合
|
||||
*/
|
||||
AjaxResult existPatientInfo(String openId);
|
||||
|
||||
/**
|
||||
* 查询省级区域信息信息
|
||||
*
|
||||
* @return 省级区域信息集合
|
||||
*/
|
||||
AjaxResult getProvinceAreaInfo();
|
||||
|
||||
/**
|
||||
* 根据父区域编码查询其下属区域信息
|
||||
*
|
||||
* @param areaCode 父级区域编码
|
||||
* @return 下属区域信息集合
|
||||
*/
|
||||
AjaxResult getSubordinateAreaInfo(String areaCode);
|
||||
}
|
||||
|
||||
@ -26,10 +26,12 @@ import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
|
||||
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
|
||||
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
|
||||
import com.xinelu.manage.domain.patientinfo.PatientInfo;
|
||||
import com.xinelu.manage.domain.sysarea.SysArea;
|
||||
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
||||
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
||||
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
|
||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@ -88,6 +90,9 @@ public class AppletLoginServiceImpl implements AppletLoginService {
|
||||
*/
|
||||
private static final String OK = "ok";
|
||||
|
||||
@Resource
|
||||
private SysAreaMapper sysAreaMapper;
|
||||
|
||||
/**
|
||||
* 提前预约时间半天标识
|
||||
*/
|
||||
@ -308,6 +313,31 @@ public class AppletLoginServiceImpl implements AppletLoginService {
|
||||
return AjaxResult.success("NOT_LOGIN");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询省级区域信息信息
|
||||
*
|
||||
* @return 省级区域信息集合
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getProvinceAreaInfo() {
|
||||
SysArea area = new SysArea();
|
||||
area.setAreaLevel(1);
|
||||
area.setRemoteSigns(0);
|
||||
return AjaxResult.success(sysAreaMapper.selectSysAreaList(area));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据父级区域编码查询其下属区域信息
|
||||
*
|
||||
* @param areaCode 父级区域编码
|
||||
* @return 下属区域信息集合
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getSubordinateAreaInfo(String areaCode) {
|
||||
//查询出下级区域集合
|
||||
return AjaxResult.success(sysAreaMapper.getCityInfoList(areaCode, RemoteSignsEnum.REMOTE.getInfo()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验预约服务时间
|
||||
*
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.xinelu.applet.service.nurseapplogin;
|
||||
|
||||
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description APP登录注册业务层
|
||||
* @Author zh
|
||||
@ -33,4 +36,13 @@ public interface NurseAppLoginService {
|
||||
* @return 结果
|
||||
*/
|
||||
AjaxResult nurseAppPersonal(Long patientId);
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param orderStatus 预约订单状态
|
||||
* @return 结果
|
||||
*/
|
||||
List<OrderAndItemVO> selectAppServiceOrderItem(Long patientId, String orderStatus);
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import com.xinelu.applet.utils.AppointmentTimeUtil;
|
||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO;
|
||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO;
|
||||
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.AppointmentTimeIntervalEnum;
|
||||
@ -26,10 +27,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -180,4 +178,20 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
|
||||
patientDisease.setEvaluatedCount(evaluatedCount);
|
||||
return AjaxResult.success(patientDisease);
|
||||
}
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param orderStatus 预约订单状态
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<OrderAndItemVO> selectAppServiceOrderItem(Long patientId, String orderStatus) {
|
||||
List<OrderAndItemVO> appointmentOrderDetails = new ArrayList<>();
|
||||
if (Objects.isNull(patientId) && StringUtils.isBlank(orderStatus)) {
|
||||
return appointmentOrderDetails;
|
||||
}
|
||||
return nurseAppLoginMapper.selectAppointmentOrderDetailsByPatientId(patientId, orderStatus);
|
||||
}
|
||||
}
|
||||
@ -68,17 +68,17 @@
|
||||
ci.doctor_id,
|
||||
ci.doctor_name,
|
||||
ci.problem_description,
|
||||
COUNT(cr.id) as messageCount
|
||||
FROM
|
||||
consultation_info ci
|
||||
LEFT JOIN chat_record cr ON cr.consultation_id=ci.id AND read_status='0'
|
||||
ci.create_time,
|
||||
(SELECT COUNT(cr.id) FROM chat_record cr WHERE cr.consultation_id = ci.id AND read_status = '0'
|
||||
<if test="patientId != null ">
|
||||
and sender_id= ci.doctor_id
|
||||
</if>
|
||||
<if test="doctorId != null ">
|
||||
and sender_id= ci.patient_id
|
||||
</if>
|
||||
|
||||
) AS messageCount
|
||||
FROM
|
||||
consultation_info ci
|
||||
<where>
|
||||
<if test="patientId != null ">
|
||||
and ci.patient_id = #{patientId}
|
||||
@ -143,7 +143,7 @@
|
||||
SELECT file_url FROM consultation_file WHERE del_flag='0' AND consultation_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertConsultationInfo" parameterType="ConsultationInfo">
|
||||
<insert id="insertConsultationInfo" parameterType="ConsultationInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into consultation_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,
|
||||
@ -246,7 +246,7 @@
|
||||
<insert id="insertConsultationFile">
|
||||
insert into consultation_file(consultation_id, file_url) values
|
||||
<foreach item="item" index="index" collection="fileUrls" separator=",">
|
||||
(#{consultationId},#{item.fileUrl})
|
||||
(#{consultationId},#{item})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@ -65,6 +65,40 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppointmentOrderDetailsByPatientId"
|
||||
resultType="com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO">
|
||||
SELECT
|
||||
aod.id,
|
||||
aod. nurse_station_item_id stationItemId,
|
||||
aod.nurse_station_item_price_id stationItemPriceId,
|
||||
aod.order_no,
|
||||
aod.order_count,
|
||||
aod.order_status,
|
||||
aod.appointment_status,
|
||||
aod.total_price,
|
||||
aod.nurse_item_name,
|
||||
aod.item_serve_duration_unit,
|
||||
aod.create_time,
|
||||
nsi.item_picture_url,
|
||||
ns.id stationId,
|
||||
ao.order_type
|
||||
FROM
|
||||
appointment_order ao
|
||||
LEFT JOIN appointment_order_details aod ON aod.order_no = ao.order_no
|
||||
LEFT JOIN nurse_station_item nsi ON nsi.id = aod.nurse_station_item_id
|
||||
LEFT JOIN nurse_station ns ON ns.id = nsi.nurse_station_id
|
||||
<where>
|
||||
ao.del_flag = 0
|
||||
<if test="patientId != null and patientId != ''">
|
||||
and ao.patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">
|
||||
AND ao.order_status = #{orderStatus}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY aod.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getLoginFlagByPatientId" resultType="integer">
|
||||
select login_flag
|
||||
from patient_info
|
||||
|
||||
@ -22,7 +22,7 @@ import java.util.Date;
|
||||
* @date 2023-09-25
|
||||
*/
|
||||
@Data
|
||||
public class ConsultationInfoVO implements Serializable {
|
||||
public class ConsultationInfoVO extends BaseEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user