update===>:修改测试问题。

This commit is contained in:
haown 2023-11-15 10:36:35 +08:00
parent 86ff47eb05
commit 6ba40f6e31
17 changed files with 180 additions and 36 deletions

View File

@ -73,7 +73,7 @@ public class AppletSchedulePlanController extends BaseController {
if (planDetail != null) { if (planDetail != null) {
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");
// 判断当前时间段是否已有居民预约 // 判断当前时间段是否已有居民预约
if (StringUtils.equals("1", planDetail.getApplyState()) && StringUtils.equals("0", schedulePlanDetailDTO.getStatus())) { if (StringUtils.equals("1", planDetail.getApplyState()) && StringUtils.equals("1", schedulePlanDetailDTO.getStatus())) {
return R.fail(planDetail.getScheduleStartTime().format(formatter) + "~" + planDetail.getScheduleEndTime().format(formatter) + "已有居民预约,请取消订单后再修改"); return R.fail(planDetail.getScheduleStartTime().format(formatter) + "~" + planDetail.getScheduleEndTime().format(formatter) + "已有居民预约,请取消订单后再修改");
} }
// 判断时间段是否已过 // 判断时间段是否已过

View File

@ -1,5 +1,6 @@
package com.xinelu.applet.controller.nursingorder; package com.xinelu.applet.controller.nursingorder;
import com.alibaba.fastjson2.JSONObject;
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO; import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
import com.xinelu.applet.service.nursingorder.INursingOrderService; import com.xinelu.applet.service.nursingorder.INursingOrderService;
import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO;
@ -11,13 +12,17 @@ import com.xinelu.common.core.domain.entity.SysDictData;
import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.common.enums.OrderTypeEnum; import com.xinelu.common.enums.OrderTypeEnum;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder; import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
import org.apache.commons.lang3.StringUtils; import com.xinelu.manage.service.messagepush.MessagePushService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
import javax.annotation.Resource;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/** /**
* @Description 个人中心订单页面 * @Description 个人中心订单页面
@ -32,6 +37,9 @@ public class NursingOrderController extends BaseController {
@Resource @Resource
private INursingOrderService nursingOrderService; private INursingOrderService nursingOrderService;
@Resource
private MessagePushService messagePushService;
/** /**
* 根据登录id查询订单列表(暂时不用) * 根据登录id查询订单列表(暂时不用)
*/ */
@ -107,4 +115,13 @@ public class NursingOrderController extends BaseController {
} }
return nursingOrderService.getAppletOrderList(nurseOrder); return nursingOrderService.getAppletOrderList(nurseOrder);
} }
@GetMapping("/pushMeg")
public AjaxResult pushMeg(Long orderId, Long patientId) {
JSONObject result = nursingOrderService.pushMeg(orderId, patientId);
if(result != null && result.containsKey("openid")) {
messagePushService.fdApprovePush(result);
}
return AjaxResult.success();
}
} }

View File

@ -1,6 +1,7 @@
package com.xinelu.applet.service.nursingorder; package com.xinelu.applet.service.nursingorder;
import com.alibaba.fastjson2.JSONObject;
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO; import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO; import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO;
import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO; import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
@ -65,4 +66,6 @@ public interface INursingOrderService {
* @return AjaxResult * @return AjaxResult
*/ */
TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder); TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder);
JSONObject pushMeg(Long orderId, Long patientId);
} }

View File

@ -1,7 +1,7 @@
package com.xinelu.applet.service.nursingorder.impl; package com.xinelu.applet.service.nursingorder.impl;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO; import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
import com.xinelu.applet.mapper.nursingorder.NursingOrderMapper; import com.xinelu.applet.mapper.nursingorder.NursingOrderMapper;
@ -19,19 +19,32 @@ import com.xinelu.common.enums.ConfirmRefundStatusEnum;
import com.xinelu.common.enums.GooodsOrderStatusEnum; import com.xinelu.common.enums.GooodsOrderStatusEnum;
import com.xinelu.common.enums.OrderSourceEnum; import com.xinelu.common.enums.OrderSourceEnum;
import com.xinelu.common.enums.OrderStatusEnum; import com.xinelu.common.enums.OrderStatusEnum;
import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.http.HttpUtils; import com.xinelu.common.utils.http.HttpUtils;
import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.common.utils.spring.SpringUtils;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder; import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
import com.xinelu.manage.domain.hospitalinfo.HospitalInfo;
import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo;
import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper;
import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService;
import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService;
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/** /**
* @Description 订单分页 * @Description 订单分页
* @Author ZhangHeng * @Author ZhangHeng
@ -45,6 +58,15 @@ public class NursingOrderServiceImpl implements INursingOrderService {
@Resource @Resource
private NursingOrderMapper nursingOrderMapper; private NursingOrderMapper nursingOrderMapper;
@Resource
private GoodsOrderMapper goodsOrderMapper;
@Resource
private IPatientInfoService patientService;
@Resource
private IHospitalPersonInfoService hospitalPersonInfoService;
@Resource
private IHospitalInfoService hospitalInfoService;
/** /**
* 未评价标识 * 未评价标识
*/ */
@ -204,4 +226,32 @@ public class NursingOrderServiceImpl implements INursingOrderService {
rspData.setMsg("查询成功"); rspData.setMsg("查询成功");
return rspData; return rspData;
} }
@Override public JSONObject pushMeg(Long orderId, Long patientId) {
JSONObject result = new JSONObject();
if (orderId != null && patientId != null) {
PatientInfoVO patient = patientService.selectPatientInfoById(patientId);
GoodsOrder goodsOrder = goodsOrderMapper.selectGoodsOrderById(orderId);
HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.selectHospitalPersonInfoById(goodsOrder.getHospitalPersonId());
HospitalInfo hospitalInfo = hospitalInfoService.selectHospitalInfoById(hospitalPersonInfo.getHospitalId());
if (patient != null && goodsOrder != null) {
// 组装发送消息通知参数
result.put("patientId", patientId);
result.put("openid", patient.getOpenid());
result.put("receiveName", patient.getPatientName());
result.put("text1", hospitalInfo.getHospitalName());
result.put("text2", "专家咨询");
result.put("text3", "专家咨询");
result.put("sendTitle", "专家咨询");
result.put("sendTime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date()));
result.put("busType", "10");
result.put("sendContent", patient.getPatientName() + "专家咨询预约成功");
result.put("messageType", "5");
result.put("messageCategory", "4");
result.put("cardNo", patient.getCardNo());
return result;
}
}
return null;
}
} }

View File

@ -10,7 +10,6 @@ import com.xinelu.common.core.page.TableDataInfo;
import com.xinelu.manage.domain.goodsCategory.GoodsCategory; import com.xinelu.manage.domain.goodsCategory.GoodsCategory;
import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo; import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo;
import com.xinelu.manage.vo.sysarea.SysAreaVO; import com.xinelu.manage.vo.sysarea.SysAreaVO;
import java.util.List; import java.util.List;
/** /**
@ -134,4 +133,5 @@ public interface INursingStationGoodsService {
* @return 结果 * @return 结果
*/ */
AjaxResult updateDefaultAddress(List<UpdateDefaultAddressVO> defaultAddressList); AjaxResult updateDefaultAddress(List<UpdateDefaultAddressVO> defaultAddressList);
} }

View File

@ -1,6 +1,10 @@
package com.xinelu.applet.service.nursingstationgoods.impl; package com.xinelu.applet.service.nursingstationgoods.impl;
import com.xinelu.applet.dto.nursingstationgoods.*; import com.xinelu.applet.dto.nursingstationgoods.GoodAttributeDetailsList;
import com.xinelu.applet.dto.nursingstationgoods.GoodDetails;
import com.xinelu.applet.dto.nursingstationgoods.GoodsList;
import com.xinelu.applet.dto.nursingstationgoods.GoodsOrderPatient;
import com.xinelu.applet.dto.nursingstationgoods.GoodsOrderStationDTO;
import com.xinelu.applet.mapper.nursingstationgoods.NursingStationGoodsMapper; import com.xinelu.applet.mapper.nursingstationgoods.NursingStationGoodsMapper;
import com.xinelu.applet.service.nursingstationgoods.INursingStationGoodsService; import com.xinelu.applet.service.nursingstationgoods.INursingStationGoodsService;
import com.xinelu.applet.vo.coupon.CouponVO; import com.xinelu.applet.vo.coupon.CouponVO;
@ -34,6 +38,16 @@ import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveVO;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO; import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
import com.xinelu.manage.vo.receiveAddressInfo.ReceiveAddressInfoVO; import com.xinelu.manage.vo.receiveAddressInfo.ReceiveAddressInfoVO;
import com.xinelu.manage.vo.sysarea.SysAreaVO; import com.xinelu.manage.vo.sysarea.SysAreaVO;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists; import org.apache.commons.compress.utils.Lists;
@ -42,13 +56,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
/** /**
* @author ljh * @author ljh
* @version 1.0 * @version 1.0

View File

@ -45,11 +45,10 @@ public class AppletSchedulePlanServiceImpl implements IAppletSchedulePlanService
detailList.forEach(detail -> { detailList.forEach(detail -> {
// 可预约状态 // 可预约状态
boolean status = true; boolean status = true;
if (StringUtils.equals("1", detail.getStatus()) || StringUtils.equals("1", detail.getApplyState())) {
status = false;
}
if (scheduleDate.isEqual(LocalDate.now()) && detail.getScheduleStartTime().isBefore(LocalTime.now())) { if (scheduleDate.isEqual(LocalDate.now()) && detail.getScheduleStartTime().isBefore(LocalTime.now())) {
status = false; status = false;
} else if (StringUtils.equals("1", detail.getStatus()) || StringUtils.equals("1", detail.getApplyState())) {
status = false;
} }
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm");

View File

@ -10,19 +10,37 @@ import com.xinelu.applet.vo.wechatpaymentinfo.vo.WeChatRefundInfoVO;
import com.xinelu.common.config.WeChatPaymentUrlConfig; import com.xinelu.common.config.WeChatPaymentUrlConfig;
import com.xinelu.common.config.XylWeChatPaymentConfig; import com.xinelu.common.config.XylWeChatPaymentConfig;
import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.AjaxResult;
import com.xinelu.common.enums.*; import com.xinelu.common.enums.ConfirmRefundStatusEnum;
import com.xinelu.common.enums.GooodsOrderStatusEnum;
import com.xinelu.common.enums.IntegralChangeType;
import com.xinelu.common.enums.OrderStatusEnum;
import com.xinelu.common.enums.OrderTypeEnum;
import com.xinelu.common.enums.PaymentMerchantTypeEnum;
import com.xinelu.common.enums.RefundStatusEnum;
import com.xinelu.common.enums.RefundTypeEnum;
import com.xinelu.common.exception.ServiceException; import com.xinelu.common.exception.ServiceException;
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder; import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder; import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
import com.xinelu.manage.domain.patientintegralchange.PatientIntegralChange; import com.xinelu.manage.domain.patientintegralchange.PatientIntegralChange;
import com.xinelu.manage.domain.refundinfo.RefundInfo; import com.xinelu.manage.domain.refundinfo.RefundInfo;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import com.xinelu.manage.dto.consultationInfo.ConsultationInfoDTO;
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper; import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper; import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.patientintegralchange.PatientIntegralChangeMapper; import com.xinelu.manage.mapper.patientintegralchange.PatientIntegralChangeMapper;
import com.xinelu.manage.mapper.refundinfo.RefundInfoMapper; import com.xinelu.manage.mapper.refundinfo.RefundInfoMapper;
import com.xinelu.manage.service.consultationInfo.IConsultationInfoService;
import com.xinelu.manage.service.scheduleplandetail.ISchedulePlanDetailService;
import com.xinelu.manage.vo.goodsorder.GoodsInfoRedemptionVO; import com.xinelu.manage.vo.goodsorder.GoodsInfoRedemptionVO;
import com.xinelu.manage.vo.patientinfo.PatientInfoVO; import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.CloseableHttpResponse;
@ -34,14 +52,6 @@ import org.apache.http.util.EntityUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
/** /**
* @Description 微信退款业务层实现类 * @Description 微信退款业务层实现类
* @Author 纪寒 * @Author 纪寒
@ -70,6 +80,10 @@ public class WeChatRefundServiceImpl implements WeChatRefundService {
private PatientIntegralChangeMapper patientIntegralChangeMapper; private PatientIntegralChangeMapper patientIntegralChangeMapper;
@Resource @Resource
private PatientInfoMapper patientInfoMapper; private PatientInfoMapper patientInfoMapper;
@Resource
private IConsultationInfoService consultationInfoService;
@Resource
private ISchedulePlanDetailService planDetailService;
/** /**
* 成功状态码 * 成功状态码
@ -236,6 +250,18 @@ public class WeChatRefundServiceImpl implements WeChatRefundService {
String refundParam = this.buildHealthConsultationRefundParam(goodsOrderInfo, outRefundNo); String refundParam = this.buildHealthConsultationRefundParam(goodsOrderInfo, outRefundNo);
String refundReason = StringUtils.isBlank(closeOrderDTO.getRemark()) ? "" : closeOrderDTO.getRemark(); String refundReason = StringUtils.isBlank(closeOrderDTO.getRemark()) ? "" : closeOrderDTO.getRemark();
this.applyWeRefund(refundParam, null, goodsOrderInfo, patientId, refundReason); this.applyWeRefund(refundParam, null, goodsOrderInfo, patientId, refundReason);
// 查询是否为专家咨询订单修改时间段的可预约状态
GoodsOrder goodsOrder = goodsOrderMapper.getGoodsOrderByOrderNo(closeOrderDTO.getOrderNo());
if (goodsOrder.getConsultationInfoId() != null) {
ConsultationInfoDTO consultationInfo = consultationInfoService.selectConsultationInfoById(goodsOrder.getConsultationInfoId());
if (consultationInfo != null && consultationInfo.getSchedulePlanDetailId() != null) {
// 修改预约时间段的状态
SchedulePlanDetail schedulePlanDetail = new SchedulePlanDetail();
schedulePlanDetail.setId(consultationInfo.getSchedulePlanDetailId());
schedulePlanDetail.setApplyState("0");
planDetailService.update(schedulePlanDetail);
}
}
return AjaxResult.success(); return AjaxResult.success();
} }

View File

@ -154,6 +154,9 @@ public class ConsultationInfo extends BaseEntity implements Serializable {
@Excel(name = "病历") @Excel(name = "病历")
private String medicalRecord; private String medicalRecord;
@ApiModelProperty(value = "预约班次明细表主键")
private Long schedulePlanDetailId;
/** /**
* 是否删除标识01 * 是否删除标识01
*/ */
@ -180,6 +183,7 @@ public class ConsultationInfo extends BaseEntity implements Serializable {
.append("situationDescription", getSituationDescription()) .append("situationDescription", getSituationDescription())
.append("problemStatement", getProblemStatement()) .append("problemStatement", getProblemStatement())
.append("medicalRecord", getMedicalRecord()) .append("medicalRecord", getMedicalRecord())
.append("schedulePlanDetailId", getSchedulePlanDetailId())
.append("delFlag", getDelFlag()) .append("delFlag", getDelFlag())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())

View File

@ -91,7 +91,7 @@ public class HospitalInfo extends BaseDomain implements Serializable {
@ApiModelProperty(value = "家医机构编号") @ApiModelProperty(value = "家医机构编号")
private String orgCode; private String orgCode;
@ApiModelProperty(value = "医院类别,1:家医机构2齐鲁名医机构") @ApiModelProperty(value = "医院类型,1:家医机构2齐鲁名医机构3专病机构")
private String category; private String category;
@Override @Override

View File

@ -162,4 +162,7 @@ public class ConsultationInfoDTO extends BaseEntity implements Serializable {
*/ */
@ApiModelProperty("问诊资料文件") @ApiModelProperty("问诊资料文件")
private List<String> fileUrls; private List<String> fileUrls;
@ApiModelProperty("预约时间段业务主键")
private Long schedulePlanDetailId;
} }

View File

@ -11,10 +11,12 @@ import com.xinelu.common.utils.file.FileUploadUtils;
import com.xinelu.common.utils.file.MimeTypeUtils; import com.xinelu.common.utils.file.MimeTypeUtils;
import com.xinelu.manage.domain.consultationInfo.ConsultationInfo; import com.xinelu.manage.domain.consultationInfo.ConsultationInfo;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder; import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
import com.xinelu.manage.domain.scheduleplandetail.SchedulePlanDetail;
import com.xinelu.manage.dto.consultationInfo.ConsultationInfoDTO; import com.xinelu.manage.dto.consultationInfo.ConsultationInfoDTO;
import com.xinelu.manage.mapper.consultationInfo.ConsultationInfoMapper; import com.xinelu.manage.mapper.consultationInfo.ConsultationInfoMapper;
import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper; import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper;
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
import com.xinelu.manage.mapper.scheduleplandetail.SchedulePlanDetailMapper;
import com.xinelu.manage.service.consultationInfo.IConsultationInfoService; import com.xinelu.manage.service.consultationInfo.IConsultationInfoService;
import com.xinelu.manage.service.messagepush.MessagePushService; import com.xinelu.manage.service.messagepush.MessagePushService;
import com.xinelu.manage.vo.consultationInfo.ConsultationInfoVO; import com.xinelu.manage.vo.consultationInfo.ConsultationInfoVO;
@ -54,6 +56,9 @@ public class ConsultationInfoServiceImpl implements IConsultationInfoService {
@Resource @Resource
private PatientInfoMapper patientInfoMapper; private PatientInfoMapper patientInfoMapper;
@Resource
private SchedulePlanDetailMapper schedulePlanDetailMapper;
/** /**
* 查询在线问诊-问诊信息图文和视频问诊基本信息 * 查询在线问诊-问诊信息图文和视频问诊基本信息
* *
@ -89,6 +94,9 @@ public class ConsultationInfoServiceImpl implements IConsultationInfoService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public AjaxResult insertConsultationInfo(ConsultationInfoDTO consultationInfoDTO) { public AjaxResult insertConsultationInfo(ConsultationInfoDTO consultationInfoDTO) {
if (StringUtils.equals("VIDEO_CONSULTATION", consultationInfoDTO.getConsultationType()) && consultationInfoDTO.getSchedulePlanDetailId() == null) {
return AjaxResult.error("请选择预约时间段");
}
consultationInfoDTO.setCreateTime(DateUtils.getNowDate()); consultationInfoDTO.setCreateTime(DateUtils.getNowDate());
ConsultationInfo consultationInfo = new ConsultationInfo(); ConsultationInfo consultationInfo = new ConsultationInfo();
BeanUtils.copyBeanProp(consultationInfo, consultationInfoDTO); BeanUtils.copyBeanProp(consultationInfo, consultationInfoDTO);
@ -96,6 +104,13 @@ public class ConsultationInfoServiceImpl implements IConsultationInfoService {
if (count > 0) { if (count > 0) {
if (CollectionUtils.isNotEmpty(consultationInfoDTO.getFileUrls())) { if (CollectionUtils.isNotEmpty(consultationInfoDTO.getFileUrls())) {
consultationInfoMapper.insertConsultationFile(consultationInfo.getId(), consultationInfoDTO.getFileUrls()); consultationInfoMapper.insertConsultationFile(consultationInfo.getId(), consultationInfoDTO.getFileUrls());
}
// 专家咨询修改预约时间段的预约状态
if (StringUtils.equals("VIDEO_CONSULTATION", consultationInfoDTO.getConsultationType())) {
SchedulePlanDetail schedulePlanDetail = new SchedulePlanDetail();
schedulePlanDetail.setId(consultationInfoDTO.getSchedulePlanDetailId());
schedulePlanDetail.setApplyState("1");
schedulePlanDetailMapper.updateByPrimaryKeySelective(schedulePlanDetail);
} }
return AjaxResult.success(consultationInfo); return AjaxResult.success(consultationInfo);
} }

View File

@ -16,4 +16,6 @@ public interface ISchedulePlanService {
int save(SchedulePlan schedulePlan) throws Exception; int save(SchedulePlan schedulePlan) throws Exception;
List<SchedulePlanVO> getListByDoctor(SchedulePlan schedulePlan); List<SchedulePlanVO> getListByDoctor(SchedulePlan schedulePlan);
int updateDetailByOrder(String orderNo);
} }

View File

@ -144,6 +144,11 @@ public class SchedulePlanServiceImpl implements ISchedulePlanService {
return retList; return retList;
} }
@Override public int updateDetailByOrder(String orderNo) {
return 0;
}
/** /**
* 生成计划明细 * 生成计划明细
* @param number人数 * @param number人数

View File

@ -141,7 +141,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
result.put("text2", (body.getProjectName().length() >= 17? (body.getProjectName().substring(0, 17) + "..."): body.getProjectName())); result.put("text2", (body.getProjectName().length() >= 17? (body.getProjectName().substring(0, 17) + "..."): body.getProjectName()));
result.put("text3", body.getProjectName()); result.put("text3", body.getProjectName());
result.put("sendTitle", "筛查预约"); result.put("sendTitle", "筛查预约");
result.put("sendTime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())); result.put("sendTime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", recordBody.getApplyStartTime()));
result.put("busType", "10"); result.put("busType", "10");
result.put("sendContent", registerVo.getPatientName() + "预约筛查成功"); result.put("sendContent", registerVo.getPatientName() + "预约筛查成功");
result.put("messageType", "5"); result.put("messageType", "5");

View File

@ -23,6 +23,7 @@
<result property="situationDescription" column="situation_description"/> <result property="situationDescription" column="situation_description"/>
<result property="problemStatement" column="problem_statement"/> <result property="problemStatement" column="problem_statement"/>
<result property="medicalRecord" column="medical_record"/> <result property="medicalRecord" column="medical_record"/>
<result property="schedulePlanDetailId" column="schedule_plan_detail_id"/>
<result property="delFlag" column="del_flag"/> <result property="delFlag" column="del_flag"/>
<result property="createBy" column="create_by"/> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
@ -49,6 +50,7 @@
situation_description, situation_description,
problem_statement, problem_statement,
medical_record, medical_record,
schedule_plan_detail_id,
del_flag, del_flag,
create_by, create_by,
create_time, create_time,
@ -133,6 +135,7 @@
situation_description, situation_description,
problem_statement, problem_statement,
medical_record, medical_record,
schedule_plan_detail_id,
del_flag, del_flag,
create_by, create_by,
create_time, create_time,
@ -184,6 +187,8 @@
<if test="problemStatement != null">problem_statement, <if test="problemStatement != null">problem_statement,
</if> </if>
<if test="medicalRecord != null">medical_record, <if test="medicalRecord != null">medical_record,
</if>
<if test="schedulePlanDetailId != null">schedule_plan_detail_id,
</if> </if>
<if test="delFlag != null">del_flag, <if test="delFlag != null">del_flag,
</if> </if>
@ -232,6 +237,8 @@
<if test="problemStatement != null">#{problemStatement}, <if test="problemStatement != null">#{problemStatement},
</if> </if>
<if test="medicalRecord != null">#{medicalRecord}, <if test="medicalRecord != null">#{medicalRecord},
</if>
<if test="schedulePlanDetailId != null">#{schedulePlanDetailId},
</if> </if>
<if test="delFlag != null">#{delFlag}, <if test="delFlag != null">#{delFlag},
</if> </if>
@ -307,6 +314,9 @@
<if test="medicalRecord != null">medical_record = <if test="medicalRecord != null">medical_record =
#{medicalRecord}, #{medicalRecord},
</if> </if>
<if test="schedulePlanDetailId != null">schedule_plan_detail_id =
#{schedulePlanDetailId},
</if>
<if test="delFlag != null">del_flag = <if test="delFlag != null">del_flag =
#{delFlag}, #{delFlag},
</if> </if>

View File

@ -781,5 +781,8 @@
<if test="orderType != null and orderType != ''"> <if test="orderType != null and orderType != ''">
and gr.order_type = #{orderType} and gr.order_type = #{orderType}
</if> </if>
<if test="patientId != null and patientId != ''">
and c.patient_id = #{patientId}
</if>
</select> </select>
</mapper> </mapper>