update===>:APP工单列表。

This commit is contained in:
haown 2023-10-20 15:44:09 +08:00
parent 7fcf37c42f
commit 765c588098
10 changed files with 227 additions and 2 deletions

View File

@ -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));
}
}

View File

@ -168,6 +168,12 @@ public class HealthConsultationServiceImpl implements HealthConsultationService
goodsOrder.setCreateTime(LocalDateTime.now()); goodsOrder.setCreateTime(LocalDateTime.now());
goodsOrder.setOrderTime(LocalDateTime.now()); goodsOrder.setOrderTime(LocalDateTime.now());
goodsOrder.setOriginalTotalPrice(healthConsultationOrderDTO.getTotalPrice()); 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); int insertGoodsOrder = goodsOrderMapper.insertGoodsOrder(goodsOrder);
if (insertGoodsOrder <= 0) { if (insertGoodsOrder <= 0) {
throw new ServiceException("预约订单新增信息失败,请联系管理员!"); throw new ServiceException("预约订单新增信息失败,请联系管理员!");

View File

@ -27,6 +27,11 @@ public class HealthConsultationOrderDTO implements Serializable {
*/ */
private Long id; private Long id;
/**
* 会诊信息表id
*/
private Long consultationInfoId;
/** /**
* 商品订单表id * 商品订单表id
*/ */

View File

@ -61,6 +61,7 @@ public class GoodsOrder extends BaseDomain implements Serializable {
/** /**
* 订单状态待付款WAIT_PAY已付款PAY已取消CANCEL待收货WAIT_RECEIVED已收货RECEIVED待退款WAIT_REFUND已退款REFUNDED待退货WAIT_RETURNED已退货RETURNED * 订单状态待付款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") @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") @Excel(name = "订单状态待付款WAIT_PAY已付款PAY已取消CANCEL待收货WAIT_RECEIVED已收货RECEIVED待退款WAIT_REFUND已退款REFUNDED待退货WAIT_RETURNED已退货RETURNED")

View File

@ -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;
}

View File

@ -1,6 +1,7 @@
package com.xinelu.manage.mapper.goodsOrder; package com.xinelu.manage.mapper.goodsOrder;
import com.xinelu.manage.domain.goodsOrder.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.RefundOrderInfoVO;
import com.xinelu.manage.vo.goods.GoodsOrderAndDetailsInfo; import com.xinelu.manage.vo.goods.GoodsOrderAndDetailsInfo;
import com.xinelu.manage.vo.goodsorder.*; import com.xinelu.manage.vo.goodsorder.*;
@ -199,4 +200,11 @@ public interface GoodsOrderMapper {
*/ */
List<GoodsOrderAndDetails> selectGoodsOrderByTime(@Param("beforeTime") LocalDateTime beforeTime, @Param("time") LocalDateTime time, List<GoodsOrderAndDetails> selectGoodsOrderByTime(@Param("beforeTime") LocalDateTime beforeTime, @Param("time") LocalDateTime time,
@Param("orderStatus") String orderStatus, @Param("orderType") String orderType); @Param("orderStatus") String orderStatus, @Param("orderType") String orderType);
/**
* 医生APP专家咨询工单列表查询
* @param goodsOrderDTO
* @return
*/
List<AppGoodsOrderVO> getConsultationOrders(GoodsOrderDTO goodsOrderDTO);
} }

View File

@ -1,11 +1,12 @@
package com.xinelu.manage.service.goodsOrder; package com.xinelu.manage.service.goodsOrder;
import com.xinelu.manage.domain.goodsOrder.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.GoodsInfoOrderVO;
import com.xinelu.manage.vo.goodsorder.GoodsOrderDetailsVO; import com.xinelu.manage.vo.goodsorder.GoodsOrderDetailsVO;
import com.xinelu.manage.vo.goodsorder.GoodsOrderRefundVO; import com.xinelu.manage.vo.goodsorder.GoodsOrderRefundVO;
import com.xinelu.manage.vo.goodsorder.GoodsOrderVO; import com.xinelu.manage.vo.goodsorder.GoodsOrderVO;
import java.util.List; import java.util.List;
@ -97,4 +98,11 @@ public interface IGoodsOrderService {
* @return com.xinyilu.base.vo.goodsorder.GoodsOrderRefundVO * @return com.xinyilu.base.vo.goodsorder.GoodsOrderRefundVO
**/ **/
GoodsOrderRefundVO getGoodsOrderRefund(Long goodsOrderId); GoodsOrderRefundVO getGoodsOrderRefund(Long goodsOrderId);
/**
* 医生APP专家咨询工单列表查询
* @param goodsOrderDTO
* @return
*/
List<AppGoodsOrderVO> getConsultationOrders(GoodsOrderDTO goodsOrderDTO);
} }

View File

@ -5,8 +5,10 @@ import com.xinelu.common.enums.ConfirmRefundStatusEnum;
import com.xinelu.common.enums.GooodsOrderStatusEnum; import com.xinelu.common.enums.GooodsOrderStatusEnum;
import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.SecurityUtils;
import com.xinelu.manage.domain.goodsOrder.GoodsOrder; 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.mapper.goodsOrder.GoodsOrderMapper;
import com.xinelu.manage.service.goodsOrder.IGoodsOrderService; 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.GoodsInfoOrderVO;
import com.xinelu.manage.vo.goodsorder.GoodsOrderDetailsVO; import com.xinelu.manage.vo.goodsorder.GoodsOrderDetailsVO;
import com.xinelu.manage.vo.goodsorder.GoodsOrderRefundVO; import com.xinelu.manage.vo.goodsorder.GoodsOrderRefundVO;
@ -137,7 +139,11 @@ public class GoodsOrderServiceImpl implements IGoodsOrderService {
return goodsOrderMapper.getGoodsOrderRefund(goodsOrderId); return goodsOrderMapper.getGoodsOrderRefund(goodsOrderId);
} }
/** @Override public List<AppGoodsOrderVO> getConsultationOrders(GoodsOrderDTO goodsOrderDTO) {
return goodsOrderMapper.getConsultationOrders(goodsOrderDTO);
}
/**
* 查询订单信息具体明细 * 查询订单信息具体明细
* *
* @param orderNo 订单编号 * @param orderNo 订单编号

View File

@ -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;
}

View File

@ -755,4 +755,24 @@
and gor.order_status = #{orderStatus} and gor.order_type = #{orderType} and gor.order_status = #{orderStatus} and gor.order_type = #{orderType}
and gor.del_flag = 0 and gor.del_flag = 0
</select> </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> </mapper>