update===>:APP工单列表。
This commit is contained in:
parent
7fcf37c42f
commit
765c588098
@ -0,0 +1,36 @@
|
||||
package com.xinelu.applet.controller.appgoodsorder;
|
||||
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.manage.dto.goodsorder.GoodsOrderDTO;
|
||||
import com.xinelu.manage.service.goodsOrder.IGoodsOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @description: APP工单控制器
|
||||
* @author: haown
|
||||
* @create: 2023-10-20 10:02
|
||||
**/
|
||||
@Api(tags = "APP工单控制器")
|
||||
@RestController
|
||||
@RequestMapping("/nurseApp/orders")
|
||||
public class AppGoodsOrderController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private IGoodsOrderService goodsOrderService;
|
||||
|
||||
/**
|
||||
* 工单列表
|
||||
*/
|
||||
@GetMapping("/getList")
|
||||
@ApiOperation(value = "查询工单列表")
|
||||
public TableDataInfo getList(GoodsOrderDTO goodsOrderDTO) {
|
||||
startPage();
|
||||
return getDataTable(goodsOrderService.getConsultationOrders(goodsOrderDTO));
|
||||
}
|
||||
}
|
||||
@ -168,6 +168,12 @@ public class HealthConsultationServiceImpl implements HealthConsultationService
|
||||
goodsOrder.setCreateTime(LocalDateTime.now());
|
||||
goodsOrder.setOrderTime(LocalDateTime.now());
|
||||
goodsOrder.setOriginalTotalPrice(healthConsultationOrderDTO.getTotalPrice());
|
||||
goodsOrder.setHospitalPersonId(hospitalPersonInfo.getId());
|
||||
goodsOrder.setHospitalPersonName(hospitalPersonInfo.getPersonName());
|
||||
goodsOrder.setHealthConsultationContent(healthConsultationOrderDTO.getHealthConsultationContent());
|
||||
goodsOrder.setHealthAppointDate(healthConsultationOrderDTO.getHealthAppointDate());
|
||||
goodsOrder.setConsultationInfoId(healthConsultationOrderDTO.getConsultationInfoId());
|
||||
|
||||
int insertGoodsOrder = goodsOrderMapper.insertGoodsOrder(goodsOrder);
|
||||
if (insertGoodsOrder <= 0) {
|
||||
throw new ServiceException("预约订单新增信息失败,请联系管理员!");
|
||||
|
||||
@ -27,6 +27,11 @@ public class HealthConsultationOrderDTO implements Serializable {
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会诊信息表id
|
||||
*/
|
||||
private Long consultationInfoId;
|
||||
|
||||
/**
|
||||
* 商品订单表id
|
||||
*/
|
||||
|
||||
@ -61,6 +61,7 @@ public class GoodsOrder extends BaseDomain implements Serializable {
|
||||
|
||||
/**
|
||||
* 订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED
|
||||
* RECEIVED_GOODS (商品订单为:待评价,专家咨询订单为:待服务),已完成:COMPLETED(专家咨询订单使用)
|
||||
*/
|
||||
@ApiModelProperty(value = "订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED")
|
||||
@Excel(name = "订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED")
|
||||
|
||||
@ -0,0 +1,39 @@
|
||||
package com.xinelu.manage.dto.goodsorder;
|
||||
|
||||
import com.xinelu.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 工单查询传输对象
|
||||
* @author: haown
|
||||
* @create: 2023-10-20 10:42
|
||||
**/
|
||||
@ApiModel("工单查询传输对象")
|
||||
@Data
|
||||
public class GoodsOrderDTO extends BaseEntity {
|
||||
|
||||
@ApiModelProperty("医生主键id")
|
||||
private Long hospitalPersonId;
|
||||
|
||||
@ApiModelProperty("居民主键id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED
|
||||
*/
|
||||
@ApiModelProperty("订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,"
|
||||
+ "待收货:WAIT_RECEIVED_GOODS(专家咨询订单为:待接单),"
|
||||
+ "已收货:RECEIVED_GOODS(商品订单为:待评价,专家咨询订单为:待服务),"
|
||||
+ "退款中:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED_GOODS,"
|
||||
+ "已退货:RETURNED_GOODS,已评价:EVALUATED,已完成:COMPLETED(专家咨询订单使用)")
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 订单类型,积分兑换:INTEGRAL_EXCHANGE,直接购买:DIRECT_BUY,健康咨询:HEALTH_CONSULTATION
|
||||
*/
|
||||
@ApiModelProperty("订单类型,积分兑换:INTEGRAL_EXCHANGE,直接购买:DIRECT_BUY,健康咨询:HEALTH_CONSULTATION")
|
||||
private String orderType;
|
||||
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.xinelu.manage.mapper.goodsOrder;
|
||||
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
import com.xinelu.manage.dto.goodsorder.GoodsOrderDTO;
|
||||
import com.xinelu.manage.vo.RefundOrderInfoVO;
|
||||
import com.xinelu.manage.vo.goods.GoodsOrderAndDetailsInfo;
|
||||
import com.xinelu.manage.vo.goodsorder.*;
|
||||
@ -199,4 +200,11 @@ public interface GoodsOrderMapper {
|
||||
*/
|
||||
List<GoodsOrderAndDetails> selectGoodsOrderByTime(@Param("beforeTime") LocalDateTime beforeTime, @Param("time") LocalDateTime time,
|
||||
@Param("orderStatus") String orderStatus, @Param("orderType") String orderType);
|
||||
|
||||
/**
|
||||
* 医生APP专家咨询工单列表查询
|
||||
* @param goodsOrderDTO
|
||||
* @return
|
||||
*/
|
||||
List<AppGoodsOrderVO> getConsultationOrders(GoodsOrderDTO goodsOrderDTO);
|
||||
}
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
package com.xinelu.manage.service.goodsOrder;
|
||||
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
import com.xinelu.manage.dto.goodsorder.GoodsOrderDTO;
|
||||
import com.xinelu.manage.vo.goodsorder.AppGoodsOrderVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsInfoOrderVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsOrderDetailsVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsOrderRefundVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsOrderVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -97,4 +98,11 @@ public interface IGoodsOrderService {
|
||||
* @return com.xinyilu.base.vo.goodsorder.GoodsOrderRefundVO
|
||||
**/
|
||||
GoodsOrderRefundVO getGoodsOrderRefund(Long goodsOrderId);
|
||||
|
||||
/**
|
||||
* 医生APP专家咨询工单列表查询
|
||||
* @param goodsOrderDTO
|
||||
* @return
|
||||
*/
|
||||
List<AppGoodsOrderVO> getConsultationOrders(GoodsOrderDTO goodsOrderDTO);
|
||||
}
|
||||
|
||||
@ -5,8 +5,10 @@ import com.xinelu.common.enums.ConfirmRefundStatusEnum;
|
||||
import com.xinelu.common.enums.GooodsOrderStatusEnum;
|
||||
import com.xinelu.common.utils.SecurityUtils;
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
import com.xinelu.manage.dto.goodsorder.GoodsOrderDTO;
|
||||
import com.xinelu.manage.mapper.goodsOrder.GoodsOrderMapper;
|
||||
import com.xinelu.manage.service.goodsOrder.IGoodsOrderService;
|
||||
import com.xinelu.manage.vo.goodsorder.AppGoodsOrderVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsInfoOrderVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsOrderDetailsVO;
|
||||
import com.xinelu.manage.vo.goodsorder.GoodsOrderRefundVO;
|
||||
@ -137,7 +139,11 @@ public class GoodsOrderServiceImpl implements IGoodsOrderService {
|
||||
return goodsOrderMapper.getGoodsOrderRefund(goodsOrderId);
|
||||
}
|
||||
|
||||
/**
|
||||
@Override public List<AppGoodsOrderVO> getConsultationOrders(GoodsOrderDTO goodsOrderDTO) {
|
||||
return goodsOrderMapper.getConsultationOrders(goodsOrderDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单信息具体明细
|
||||
*
|
||||
* @param orderNo 订单编号
|
||||
|
||||
@ -0,0 +1,96 @@
|
||||
package com.xinelu.manage.vo.goodsorder;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: App工单列表返回视图类
|
||||
* @author: haown
|
||||
* @create: 2023-10-20 11:02
|
||||
**/
|
||||
@ApiModel("App工单列表返回视图类")
|
||||
@Data
|
||||
public class AppGoodsOrderVO {
|
||||
|
||||
/**
|
||||
* 专家咨询信息表id
|
||||
*/
|
||||
@ApiModelProperty("专家咨询信息表id")
|
||||
private Long consultationInfoId;
|
||||
|
||||
@ApiModelProperty(value = "患者id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 患者名称
|
||||
*/
|
||||
@ApiModelProperty(value = "患者名称")
|
||||
private String patientName;
|
||||
|
||||
/**
|
||||
* 患者身份证号
|
||||
*/
|
||||
@ApiModelProperty(value = "患者身份证号")
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 患者联系方式
|
||||
*/
|
||||
@ApiModelProperty(value = "患者联系方式")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 现住址所在地区
|
||||
*/
|
||||
@ApiModelProperty(value = "现住址所在地区")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 状态(1 未完成 ,2 已完成)
|
||||
*/
|
||||
@ApiModelProperty(value = "状态(1 未完成 ,2 已完成)")
|
||||
@Excel(name = "状态(1 未完成 ,2 已完成)")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 预约日期(视频问诊预约),时间格式:yyyy-MM-dd
|
||||
*/
|
||||
@ApiModelProperty(value = "预约日期(视频问诊预约),时间格式:yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "预约日期(视频问诊预约),时间格式:yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date appointmentDate;
|
||||
|
||||
/**
|
||||
* 预约开始时间点(视频问诊预约),时间格式:HH:mm
|
||||
*/
|
||||
@ApiModelProperty(value = "预约开始时间点(视频问诊预约),时间格式:HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalTime appointmentStartTime;
|
||||
|
||||
/**
|
||||
* 预约结束时间点(视频问诊预约),时间格式:HH:mm
|
||||
*/
|
||||
@ApiModelProperty(value = "预约结束时间点(视频问诊预约),时间格式:HH:mm")
|
||||
@JsonFormat(pattern = "HH:mm")
|
||||
private LocalTime appointmentEndTime;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@ApiModelProperty(value = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
@ApiModelProperty(value = "订单状态,待付款:WAIT_PAY,已付款:PAY,已取消:CANCEL,待收货:WAIT_RECEIVED,已收货:RECEIVED,待退款:WAIT_REFUND,已退款:REFUNDED,待退货:WAIT_RETURNED,已退货:RETURNED")
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 健康咨询内容,健康咨询类型的订单使用
|
||||
**/
|
||||
@ApiModelProperty(value = "健康咨询内容")
|
||||
private String healthConsultationContent;
|
||||
}
|
||||
@ -755,4 +755,24 @@
|
||||
and gor.order_status = #{orderStatus} and gor.order_type = #{orderType}
|
||||
and gor.del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getConsultationOrders" resultType="com.xinelu.manage.vo.goodsorder.AppGoodsOrderVO">
|
||||
select
|
||||
c.patient_id as patientId, c.id as consultationInfoId,
|
||||
c.patient_name as patientName, c.card_no as cardNo,
|
||||
c.phone, c.address,c.appointment_date, c.appointment_start_time, c.appointment_end_time,
|
||||
gr.order_no, gr.order_status, gr.health_consultation_content
|
||||
from goods_order gr left join consultation_info c on gr.consultation_info_id = c.id
|
||||
where gr.del_flag = 0 and c.consultation_type = 'VIDEO_CONSULTATION'
|
||||
hospitalPersonId
|
||||
<if test="hospitalPersonId != null">
|
||||
and gr.hospital_person_id = #{hospitalPersonId}
|
||||
</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">
|
||||
and gr.order_status = #{orderStatus}
|
||||
</if>
|
||||
<if test="orderType != null and orderType != ''">
|
||||
and gr.order_type = #{orderType}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user