小程序代码移植
This commit is contained in:
parent
5d0e66f568
commit
8cf706fa6e
@ -24,12 +24,10 @@ import com.xinelu.common.utils.StringUtils;
|
|||||||
import com.xinelu.common.utils.bean.BeanUtils;
|
import com.xinelu.common.utils.bean.BeanUtils;
|
||||||
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
|
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
|
||||||
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
|
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.patientinfo.PatientInfo;
|
||||||
import com.xinelu.manage.domain.sysarea.SysArea;
|
import com.xinelu.manage.domain.sysarea.SysArea;
|
||||||
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
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.patientinfo.PatientInfoMapper;
|
||||||
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
|
import com.xinelu.manage.mapper.sysarea.SysAreaMapper;
|
||||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||||
@ -76,8 +74,6 @@ public class AppletLoginServiceImpl implements AppletLoginService {
|
|||||||
private AppointmentOrderDetailsMapper appointmentOrderDetailsMapper;
|
private AppointmentOrderDetailsMapper appointmentOrderDetailsMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private AppletAccessTokenUtil appletAccessTokenUtil;
|
private AppletAccessTokenUtil appletAccessTokenUtil;
|
||||||
@Resource
|
|
||||||
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -444,19 +440,6 @@ public class AppletLoginServiceImpl implements AppletLoginService {
|
|||||||
log.info("新增预约订单主表失败,失败原因:[{}]", appointmentOrder);
|
log.info("新增预约订单主表失败,失败原因:[{}]", appointmentOrder);
|
||||||
throw new ServiceException("预约护理信息失败,请联系管理员!");
|
throw new ServiceException("预约护理信息失败,请联系管理员!");
|
||||||
}
|
}
|
||||||
//新增预约订单流程记录信息表
|
|
||||||
AppointmentOrderProcessRecord appointment = new AppointmentOrderProcessRecord();
|
|
||||||
appointment.setOperatePersonId(dto.getPatientId());
|
|
||||||
appointment.setAppointmentOrderId(appointmentOrder.getId());
|
|
||||||
appointment.setAppointmentOrderNo(orderNo);
|
|
||||||
appointment.setOperateTime(LocalDateTime.now());
|
|
||||||
appointment.setOperateType(OrderProcessOperateTypeEnum.PLACE_ORDER.getInfo());
|
|
||||||
appointment.setOperateDetails("预约订单下单操作");
|
|
||||||
appointment.setCreateTime(LocalDateTime.now());
|
|
||||||
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointment);
|
|
||||||
if (count <= 0) {
|
|
||||||
throw new ServiceException("预约订单流程记录失败,请联系管理员!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -4,13 +4,10 @@ package com.xinelu.applet.service.nurseappletpersonworkorder.Impl;
|
|||||||
import com.xinelu.applet.dto.nursepersonapplogin.OrderFallbackDTO;
|
import com.xinelu.applet.dto.nursepersonapplogin.OrderFallbackDTO;
|
||||||
import com.xinelu.applet.service.nurseappletpersonworkorder.NurseAppletPersonWorkOrderService;
|
import com.xinelu.applet.service.nurseappletpersonworkorder.NurseAppletPersonWorkOrderService;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.OrderProcessOperateTypeEnum;
|
|
||||||
import com.xinelu.common.enums.OrderStatusEnum;
|
import com.xinelu.common.enums.OrderStatusEnum;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
|
|
||||||
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
|
|
||||||
import com.xinelu.manage.service.stationmessagepush.StationMessagePushService;
|
import com.xinelu.manage.service.stationmessagepush.StationMessagePushService;
|
||||||
import com.xinelu.manage.vo.appointmentorder.AppointmentReceivingOrderVO;
|
import com.xinelu.manage.vo.appointmentorder.AppointmentReceivingOrderVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -18,7 +15,6 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -33,8 +29,6 @@ public class NurseAppletPersonWorkOrderServiceImpl implements NurseAppletPersonW
|
|||||||
@Resource
|
@Resource
|
||||||
private AppointmentOrderMapper appointmentOrderMapper;
|
private AppointmentOrderMapper appointmentOrderMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
|
|
||||||
@Resource
|
|
||||||
private StationMessagePushService stationMessagePushService;
|
private StationMessagePushService stationMessagePushService;
|
||||||
@Resource
|
@Resource
|
||||||
private AppointmentOrderDetailsMapper appointmentOrderDetailsMapper;
|
private AppointmentOrderDetailsMapper appointmentOrderDetailsMapper;
|
||||||
@ -56,18 +50,6 @@ public class NurseAppletPersonWorkOrderServiceImpl implements NurseAppletPersonW
|
|||||||
if (update < 0) {
|
if (update < 0) {
|
||||||
throw new ServiceException("接单失败,请联系管理员!");
|
throw new ServiceException("接单失败,请联系管理员!");
|
||||||
}
|
}
|
||||||
AppointmentOrderProcessRecord appointmentOrderProcessRecord = new AppointmentOrderProcessRecord();
|
|
||||||
appointmentOrderProcessRecord.setAppointmentOrderNo(orderFallbackDTO.getAppointmentOrderNo());
|
|
||||||
appointmentOrderProcessRecord.setCreateTime(LocalDateTime.now());
|
|
||||||
appointmentOrderProcessRecord.setOperatePersonId(orderFallbackDTO.getStationPersonId());
|
|
||||||
appointmentOrderProcessRecord.setOperateTime(LocalDateTime.now());
|
|
||||||
appointmentOrderProcessRecord.setOperateType(OrderProcessOperateTypeEnum.RECEIVE_ORDER.getInfo());
|
|
||||||
appointmentOrderProcessRecord.setAppointmentOrderId(orderFallbackDTO.getAppointmentOrderId());
|
|
||||||
appointmentOrderProcessRecord.setOperateDetails("接单");
|
|
||||||
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointmentOrderProcessRecord);
|
|
||||||
if (count <= 0) {
|
|
||||||
throw new ServiceException("增加预约订单流程记录失败,请联系管理员!");
|
|
||||||
}
|
|
||||||
//异步发送消息
|
//异步发送消息
|
||||||
stationMessagePushService.receivingOrdersOperationsPush(appointmentReceivingOrder);
|
stationMessagePushService.receivingOrdersOperationsPush(appointmentReceivingOrder);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import com.xinelu.applet.service.nursepersonapplogin.INursePersonAppLoginService
|
|||||||
import com.xinelu.applet.vo.nursepersonapplogin.*;
|
import com.xinelu.applet.vo.nursepersonapplogin.*;
|
||||||
import com.xinelu.common.config.XinELuConfig;
|
import com.xinelu.common.config.XinELuConfig;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.OrderProcessOperateTypeEnum;
|
|
||||||
import com.xinelu.common.enums.OrderStatusEnum;
|
import com.xinelu.common.enums.OrderStatusEnum;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.AgeUtil;
|
import com.xinelu.common.utils.AgeUtil;
|
||||||
@ -16,12 +15,10 @@ import com.xinelu.common.utils.file.MimeTypeUtils;
|
|||||||
import com.xinelu.common.utils.regex.RegexUtil;
|
import com.xinelu.common.utils.regex.RegexUtil;
|
||||||
import com.xinelu.common.utils.sign.Md5Utils;
|
import com.xinelu.common.utils.sign.Md5Utils;
|
||||||
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
|
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
|
||||||
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
|
|
||||||
import com.xinelu.manage.domain.nursestationperson.NurseStationPerson;
|
import com.xinelu.manage.domain.nursestationperson.NurseStationPerson;
|
||||||
import com.xinelu.manage.domain.nursestationpersonrevenue.NurseStationPersonRevenue;
|
import com.xinelu.manage.domain.nursestationpersonrevenue.NurseStationPersonRevenue;
|
||||||
import com.xinelu.manage.domain.patientdiseaseinfo.PatientDiseaseInfo;
|
import com.xinelu.manage.domain.patientdiseaseinfo.PatientDiseaseInfo;
|
||||||
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
|
|
||||||
import com.xinelu.manage.mapper.nursestation.NurseStationMapper;
|
import com.xinelu.manage.mapper.nursestation.NurseStationMapper;
|
||||||
import com.xinelu.manage.mapper.nursestationperson.NurseStationPersonMapper;
|
import com.xinelu.manage.mapper.nursestationperson.NurseStationPersonMapper;
|
||||||
import com.xinelu.manage.mapper.nursestationpersonrevenue.NurseStationPersonRevenueMapper;
|
import com.xinelu.manage.mapper.nursestationpersonrevenue.NurseStationPersonRevenueMapper;
|
||||||
@ -71,8 +68,6 @@ public class NursePersonAppLoginServiceImpl implements INursePersonAppLoginServi
|
|||||||
@Resource
|
@Resource
|
||||||
private XinELuConfig xinYiLuConfig;
|
private XinELuConfig xinYiLuConfig;
|
||||||
@Resource
|
@Resource
|
||||||
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
|
|
||||||
@Resource
|
|
||||||
private NurseStationPersonRevenueMapper nurseStationPersonRevenueMapper;
|
private NurseStationPersonRevenueMapper nurseStationPersonRevenueMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private PatientDiseaseInfoMapper patientDiseaseInfoMapper;
|
private PatientDiseaseInfoMapper patientDiseaseInfoMapper;
|
||||||
@ -173,19 +168,6 @@ public class NursePersonAppLoginServiceImpl implements INursePersonAppLoginServi
|
|||||||
if (update <= 0) {
|
if (update <= 0) {
|
||||||
throw new ServiceException("任务退回失败,请联系管理员!");
|
throw new ServiceException("任务退回失败,请联系管理员!");
|
||||||
}
|
}
|
||||||
//流程记录
|
|
||||||
AppointmentOrderProcessRecord appointmentOrderProcessRecord = new AppointmentOrderProcessRecord();
|
|
||||||
appointmentOrderProcessRecord.setAppointmentOrderNo(orderFallbackDTO.getAppointmentOrderNo());
|
|
||||||
appointmentOrderProcessRecord.setCreateTime(LocalDateTime.now());
|
|
||||||
appointmentOrderProcessRecord.setOperatePersonId(orderFallbackDTO.getStationPersonId());
|
|
||||||
appointmentOrderProcessRecord.setOperateTime(LocalDateTime.now());
|
|
||||||
appointmentOrderProcessRecord.setOperateType(OrderProcessOperateTypeEnum.ACTIVE_BACK_ORDER.getInfo());
|
|
||||||
appointmentOrderProcessRecord.setOperateDetails(orderFallbackDTO.getTaskReturnReason());
|
|
||||||
appointmentOrderProcessRecord.setAppointmentOrderId(orderFallbackDTO.getAppointmentOrderId());
|
|
||||||
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointmentOrderProcessRecord);
|
|
||||||
if (count <= 0) {
|
|
||||||
throw new ServiceException("预约订单流程记录失败,请联系管理员!");
|
|
||||||
}
|
|
||||||
//异步发送信息
|
//异步发送信息
|
||||||
stationMessagePushService.refusalOrdersOperationsPush(appointmentReceivingOrder);
|
stationMessagePushService.refusalOrdersOperationsPush(appointmentReceivingOrder);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
@ -227,19 +209,6 @@ public class NursePersonAppLoginServiceImpl implements INursePersonAppLoginServi
|
|||||||
if (stationPersonRevenue <= 0) {
|
if (stationPersonRevenue <= 0) {
|
||||||
throw new ServiceException("新增护理员订单佣金收益记录失败,请联系管理员!");
|
throw new ServiceException("新增护理员订单佣金收益记录失败,请联系管理员!");
|
||||||
}
|
}
|
||||||
//新增预约订单流程记录信息表
|
|
||||||
AppointmentOrderProcessRecord appointment = new AppointmentOrderProcessRecord();
|
|
||||||
appointment.setOperatePersonId(Objects.isNull(orderDetails.getNurseStationPersonId()) ? null : orderDetails.getNurseStationPersonId());
|
|
||||||
appointment.setAppointmentOrderId(Objects.isNull(orderDetails.getId()) ? null : orderDetails.getId());
|
|
||||||
appointment.setAppointmentOrderNo(StringUtils.isBlank(orderDetails.getOrderNo()) ? "" : orderDetails.getOrderNo());
|
|
||||||
appointment.setOperateTime(LocalDateTime.now());
|
|
||||||
appointment.setOperateType(OrderProcessOperateTypeEnum.FINISH_ORDER.getInfo());
|
|
||||||
appointment.setOperateDetails("预约订单任务完成操作");
|
|
||||||
appointment.setCreateTime(LocalDateTime.now());
|
|
||||||
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointment);
|
|
||||||
if (count <= 0) {
|
|
||||||
throw new ServiceException("预约订单流程记录失败,请联系管理员!");
|
|
||||||
}
|
|
||||||
//更新护理员账户总金额
|
//更新护理员账户总金额
|
||||||
Long nurseStationPersonId = Objects.isNull(orderDetails.getNurseStationPersonId()) ? 0 : orderDetails.getNurseStationPersonId();
|
Long nurseStationPersonId = Objects.isNull(orderDetails.getNurseStationPersonId()) ? 0 : orderDetails.getNurseStationPersonId();
|
||||||
BigDecimal orderCommissionAmount = Objects.isNull(orderDetails.getOrderCommissionAmount()) ? BigDecimal.ZERO : orderDetails.getOrderCommissionAmount();
|
BigDecimal orderCommissionAmount = Objects.isNull(orderDetails.getOrderCommissionAmount()) ? BigDecimal.ZERO : orderDetails.getOrderCommissionAmount();
|
||||||
|
|||||||
@ -1,72 +0,0 @@
|
|||||||
package com.xinelu.manage.mapper.appointmentorderprocessrecord;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预约订单流程记录信息Mapper接口
|
|
||||||
*
|
|
||||||
* @author xinyilu
|
|
||||||
* @date 2023-03-29
|
|
||||||
*/
|
|
||||||
public interface AppointmentOrderProcessRecordMapper {
|
|
||||||
/**
|
|
||||||
* 查询预约订单流程记录信息
|
|
||||||
*
|
|
||||||
* @param id 预约订单流程记录信息主键
|
|
||||||
* @return 预约订单流程记录信息
|
|
||||||
*/
|
|
||||||
AppointmentOrderProcessRecord selectAppointmentOrderProcessRecordById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询预约订单流程记录信息列表
|
|
||||||
*
|
|
||||||
* @param appointmentOrderProcessRecord 预约订单流程记录信息
|
|
||||||
* @return 预约订单流程记录信息集合
|
|
||||||
*/
|
|
||||||
List<AppointmentOrderProcessRecord> selectAppointmentOrderProcessRecordList(AppointmentOrderProcessRecord appointmentOrderProcessRecord);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增预约订单流程记录信息
|
|
||||||
*
|
|
||||||
* @param appointmentOrderProcessRecord 预约订单流程记录信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertAppointmentOrderProcessRecord(AppointmentOrderProcessRecord appointmentOrderProcessRecord);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改预约订单流程记录信息
|
|
||||||
*
|
|
||||||
* @param appointmentOrderProcessRecord 预约订单流程记录信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int updateAppointmentOrderProcessRecord(AppointmentOrderProcessRecord appointmentOrderProcessRecord);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除预约订单流程记录信息
|
|
||||||
*
|
|
||||||
* @param id 预约订单流程记录信息主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteAppointmentOrderProcessRecordById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除预约订单流程记录信息
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int deleteAppointmentOrderProcessRecordByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量新增预约订单流程记录信息
|
|
||||||
*
|
|
||||||
* @param appointmentOrderProcessRecordList 预约订单流程记录信息
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
int insertAppointmentOrderProcessRecordList(List<AppointmentOrderProcessRecord> appointmentOrderProcessRecordList);
|
|
||||||
}
|
|
||||||
@ -3,18 +3,15 @@ package com.xinelu.manage.service.appointmentorder.impl;
|
|||||||
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.enums.AppointmentOrderTypeEnum;
|
import com.xinelu.common.enums.AppointmentOrderTypeEnum;
|
||||||
import com.xinelu.common.enums.OrderProcessOperateTypeEnum;
|
|
||||||
import com.xinelu.common.enums.OrderStatusEnum;
|
import com.xinelu.common.enums.OrderStatusEnum;
|
||||||
import com.xinelu.common.exception.ServiceException;
|
import com.xinelu.common.exception.ServiceException;
|
||||||
import com.xinelu.common.utils.SecurityUtils;
|
import com.xinelu.common.utils.SecurityUtils;
|
||||||
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
|
import com.xinelu.manage.domain.appointmentorder.AppointmentOrder;
|
||||||
import com.xinelu.manage.domain.appointmentorderconsumable.AppointmentOrderConsumable;
|
import com.xinelu.manage.domain.appointmentorderconsumable.AppointmentOrderConsumable;
|
||||||
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
|
import com.xinelu.manage.domain.appointmentorderdetails.AppointmentOrderDetails;
|
||||||
import com.xinelu.manage.domain.appointmentorderprocessrecord.AppointmentOrderProcessRecord;
|
|
||||||
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
import com.xinelu.manage.mapper.appointmentorder.AppointmentOrderMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderconsumable.AppointmentOrderConsumableMapper;
|
import com.xinelu.manage.mapper.appointmentorderconsumable.AppointmentOrderConsumableMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
import com.xinelu.manage.mapper.appointmentorderdetails.AppointmentOrderDetailsMapper;
|
||||||
import com.xinelu.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper;
|
|
||||||
import com.xinelu.manage.service.appointmentorder.IAppointmentOrderService;
|
import com.xinelu.manage.service.appointmentorder.IAppointmentOrderService;
|
||||||
import com.xinelu.manage.service.stationmessagepush.StationMessagePushService;
|
import com.xinelu.manage.service.stationmessagepush.StationMessagePushService;
|
||||||
import com.xinelu.manage.vo.appointmentorder.AppointmentOrderVO;
|
import com.xinelu.manage.vo.appointmentorder.AppointmentOrderVO;
|
||||||
@ -47,8 +44,6 @@ public class AppointmentOrderServiceImpl implements IAppointmentOrderService {
|
|||||||
private AppointmentOrderConsumableMapper appointmentOrderConsumableMapper;
|
private AppointmentOrderConsumableMapper appointmentOrderConsumableMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private StationMessagePushService stationMessagePushService;
|
private StationMessagePushService stationMessagePushService;
|
||||||
@Resource
|
|
||||||
private AppointmentOrderProcessRecordMapper appointmentOrderProcessRecordMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询预约订单信息
|
* 查询预约订单信息
|
||||||
@ -183,19 +178,6 @@ public class AppointmentOrderServiceImpl implements IAppointmentOrderService {
|
|||||||
if (updateAppointmentOrderStatus <= 0) {
|
if (updateAppointmentOrderStatus <= 0) {
|
||||||
throw new ServiceException("派单失败,请联系管理员!");
|
throw new ServiceException("派单失败,请联系管理员!");
|
||||||
}
|
}
|
||||||
//记录订单流程信息
|
|
||||||
AppointmentOrderProcessRecord appointmentOrderProcessRecord = new AppointmentOrderProcessRecord();
|
|
||||||
appointmentOrderProcessRecord.setAppointmentOrderNo(appointmentOrder.getOrderNo());
|
|
||||||
appointmentOrderProcessRecord.setCreateTime(LocalDateTime.now());
|
|
||||||
appointmentOrderProcessRecord.setOperatePersonId(appointmentOrder.getNurseStationPersonId());
|
|
||||||
appointmentOrderProcessRecord.setOperateTime(LocalDateTime.now());
|
|
||||||
appointmentOrderProcessRecord.setOperateType(OrderProcessOperateTypeEnum.DISPATCH_ORDER.getInfo());
|
|
||||||
appointmentOrderProcessRecord.setAppointmentOrderId(appointmentOrders.getId());
|
|
||||||
appointmentOrderProcessRecord.setOperateDetails("派单");
|
|
||||||
int count = appointmentOrderProcessRecordMapper.insertAppointmentOrderProcessRecord(appointmentOrderProcessRecord);
|
|
||||||
if (count <= 0) {
|
|
||||||
throw new ServiceException("增加预约订单流程记录失败,请联系管理员!");
|
|
||||||
}
|
|
||||||
stationMessagePushService.waitReceiveMessagePush(appointmentOrder);
|
stationMessagePushService.waitReceiveMessagePush(appointmentOrder);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,187 +0,0 @@
|
|||||||
<?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.manage.mapper.appointmentorderprocessrecord.AppointmentOrderProcessRecordMapper">
|
|
||||||
|
|
||||||
<resultMap type="AppointmentOrderProcessRecord" id="AppointmentOrderProcessRecordResult">
|
|
||||||
<result property="id" column="id"/>
|
|
||||||
<result property="operatePersonId" column="operate_person_id"/>
|
|
||||||
<result property="appointmentOrderId" column="appointment_order_id"/>
|
|
||||||
<result property="appointmentOrderNo" column="appointment_order_no"/>
|
|
||||||
<result property="operateTime" column="operate_time"/>
|
|
||||||
<result property="operateType" column="operate_type"/>
|
|
||||||
<result property="operateDetails" column="operate_details"/>
|
|
||||||
<result property="createBy" column="create_by"/>
|
|
||||||
<result property="createTime" column="create_time"/>
|
|
||||||
<result property="updateBy" column="update_by"/>
|
|
||||||
<result property="updateTime" column="update_time"/>
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectAppointmentOrderProcessRecordVo">
|
|
||||||
select id,
|
|
||||||
operate_person_id,
|
|
||||||
appointment_order_id,
|
|
||||||
appointment_order_no,
|
|
||||||
operate_time,
|
|
||||||
operate_type,
|
|
||||||
operate_details,
|
|
||||||
create_by,
|
|
||||||
create_time,
|
|
||||||
update_by,
|
|
||||||
update_time
|
|
||||||
from appointment_order_process_record
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectAppointmentOrderProcessRecordList" parameterType="AppointmentOrderProcessRecord"
|
|
||||||
resultMap="AppointmentOrderProcessRecordResult">
|
|
||||||
<include refid="selectAppointmentOrderProcessRecordVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="operatePersonId != null ">
|
|
||||||
and operate_person_id = #{operatePersonId}
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderId != null ">
|
|
||||||
and appointment_order_id = #{appointmentOrderId}
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderNo != null and appointmentOrderNo != ''">
|
|
||||||
and appointment_order_no = #{appointmentOrderNo}
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null ">
|
|
||||||
and operate_time = #{operateTime}
|
|
||||||
</if>
|
|
||||||
<if test="operateType != null and operateType != ''">
|
|
||||||
and operate_type = #{operateType}
|
|
||||||
</if>
|
|
||||||
<if test="operateDetails != null and operateDetails != ''">
|
|
||||||
and operate_details = #{operateDetails}
|
|
||||||
</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectAppointmentOrderProcessRecordById" parameterType="Long"
|
|
||||||
resultMap="AppointmentOrderProcessRecordResult">
|
|
||||||
<include refid="selectAppointmentOrderProcessRecordVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertAppointmentOrderProcessRecord" parameterType="AppointmentOrderProcessRecord"
|
|
||||||
useGeneratedKeys="true"
|
|
||||||
keyProperty="id">
|
|
||||||
insert into appointment_order_process_record
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="operatePersonId != null">operate_person_id,
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderId != null">appointment_order_id,
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderNo != null">appointment_order_no,
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">operate_time,
|
|
||||||
</if>
|
|
||||||
<if test="operateType != null">operate_type,
|
|
||||||
</if>
|
|
||||||
<if test="operateDetails != null">operate_details,
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">create_by,
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">create_time,
|
|
||||||
</if>
|
|
||||||
<if test="updateBy != null">update_by,
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">update_time,
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="operatePersonId != null">#{operatePersonId},
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderId != null">#{appointmentOrderId},
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderNo != null">#{appointmentOrderNo},
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">#{operateTime},
|
|
||||||
</if>
|
|
||||||
<if test="operateType != null">#{operateType},
|
|
||||||
</if>
|
|
||||||
<if test="operateDetails != null">#{operateDetails},
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">#{createBy},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateBy != null">#{updateBy},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">#{updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateAppointmentOrderProcessRecord" parameterType="AppointmentOrderProcessRecord">
|
|
||||||
update appointment_order_process_record
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="operatePersonId != null">operate_person_id =
|
|
||||||
#{operatePersonId},
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderId != null">appointment_order_id =
|
|
||||||
#{appointmentOrderId},
|
|
||||||
</if>
|
|
||||||
<if test="appointmentOrderNo != null">appointment_order_no =
|
|
||||||
#{appointmentOrderNo},
|
|
||||||
</if>
|
|
||||||
<if test="operateTime != null">operate_time =
|
|
||||||
#{operateTime},
|
|
||||||
</if>
|
|
||||||
<if test="operateType != null">operate_type =
|
|
||||||
#{operateType},
|
|
||||||
</if>
|
|
||||||
<if test="operateDetails != null">operate_details =
|
|
||||||
#{operateDetails},
|
|
||||||
</if>
|
|
||||||
<if test="createBy != null">create_by =
|
|
||||||
#{createBy},
|
|
||||||
</if>
|
|
||||||
<if test="createTime != null">create_time =
|
|
||||||
#{createTime},
|
|
||||||
</if>
|
|
||||||
<if test="updateBy != null">update_by =
|
|
||||||
#{updateBy},
|
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">update_time =
|
|
||||||
#{updateTime},
|
|
||||||
</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteAppointmentOrderProcessRecordById" parameterType="Long">
|
|
||||||
delete
|
|
||||||
from appointment_order_process_record
|
|
||||||
where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAppointmentOrderProcessRecordByIds" parameterType="String">
|
|
||||||
delete from appointment_order_process_record where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<insert id="insertAppointmentOrderProcessRecordList">
|
|
||||||
insert into appointment_order_process_record(
|
|
||||||
appointment_order_id,
|
|
||||||
appointment_order_no,
|
|
||||||
operate_time,
|
|
||||||
operate_type,
|
|
||||||
operate_details,
|
|
||||||
create_time
|
|
||||||
) values
|
|
||||||
<foreach item="appointmentOrderProcessRecordList" index="index" collection="list" separator=",">
|
|
||||||
(
|
|
||||||
#{appointmentOrderProcessRecordList.appointmentOrderId},
|
|
||||||
#{appointmentOrderProcessRecordList.appointmentOrderNo},
|
|
||||||
#{appointmentOrderProcessRecordList.operateTime},
|
|
||||||
#{appointmentOrderProcessRecordList.operateType},
|
|
||||||
#{appointmentOrderProcessRecordList.operateDetails},
|
|
||||||
#{appointmentOrderProcessRecordList.createTime}
|
|
||||||
)
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
Loading…
Reference in New Issue
Block a user