Merge branch 'jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' of http://182.92.166.109:3000/jihan/xinelu-api into jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支
This commit is contained in:
commit
1105f1eb34
@ -1,5 +1,6 @@
|
||||
package com.xinelu.applet.controller.nursingorder;
|
||||
|
||||
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
|
||||
import com.xinelu.applet.service.nursingorder.INursingOrderService;
|
||||
import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO;
|
||||
import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
|
||||
@ -14,6 +15,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@ -45,7 +47,7 @@ public class NursingOrderController extends BaseController {
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/goodsOrder")
|
||||
public TableDataInfo goodsOrder(AppletGoodsOrderVO goodsOrderVO) {
|
||||
public TableDataInfo goodsOrder(@RequestBody AppletGoodsOrderVO goodsOrderVO) {
|
||||
startPage();
|
||||
List<AppletGoodsOrderVO> goodsOrder = nursingOrderService.getGoodsOrder(goodsOrderVO);
|
||||
return getDataTable(goodsOrder);
|
||||
@ -99,10 +101,10 @@ public class NursingOrderController extends BaseController {
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/getAppletOrderList")
|
||||
public AjaxResult getAppletOrderList(Long parentId, String orderStatus) {
|
||||
if (Objects.isNull(parentId)) {
|
||||
return AjaxResult.error("请选择要查询的用户信息!");
|
||||
public TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder) {
|
||||
if (Objects.isNull(nurseOrder) || Objects.isNull(nurseOrder.getParentId()) || StringUtils.isBlank(nurseOrder.getCardNo()) || StringUtils.isBlank(nurseOrder.getOrderStatus())) {
|
||||
return getDataTable(new ArrayList<>());
|
||||
}
|
||||
return nursingOrderService.getAppletOrderList(parentId, orderStatus);
|
||||
return getDataTable(nursingOrderService.getAppletOrderList(nurseOrder));
|
||||
}
|
||||
}
|
||||
@ -84,4 +84,8 @@ public class OrderEvaluateAndPictureDTO implements Serializable {
|
||||
*/
|
||||
private List<OrderEvaluatePictureInfo> orderEvaluatePictureInfoList;
|
||||
|
||||
/**
|
||||
* 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR
|
||||
*/
|
||||
private String orderSource;
|
||||
}
|
||||
|
||||
@ -0,0 +1,48 @@
|
||||
package com.xinelu.applet.dto.nurseorder;
|
||||
|
||||
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description 个人中心订单查询
|
||||
* @Author zhangheng
|
||||
* @Date 2022-10-18
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class NurseOrderDTO extends BaseDomain implements Serializable {
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
private String orderStatus;
|
||||
|
||||
/**
|
||||
* 居民身份证号
|
||||
*/
|
||||
private String cardNo;
|
||||
|
||||
/**
|
||||
* 地区标识
|
||||
*/
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNum;
|
||||
|
||||
/**
|
||||
* 数量
|
||||
*/
|
||||
private Integer pageSize;
|
||||
}
|
||||
@ -69,7 +69,7 @@ public interface NursingOrderMapper {
|
||||
/**
|
||||
* 根据openid编号查询对应得订单
|
||||
*
|
||||
* @param patientId openid编号
|
||||
* @param patientId openid编号
|
||||
* @param orderStatus 订单状态
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@ -78,9 +78,17 @@ public interface NursingOrderMapper {
|
||||
/**
|
||||
* 根据openid编号查询对应得订单
|
||||
*
|
||||
* @param patientId openid编号
|
||||
* @param orderStatus 订单状态
|
||||
* @param patientId openid编号
|
||||
* @param orderStatusList 订单状态
|
||||
* @return AjaxResult
|
||||
*/
|
||||
List<PatientOrder> getGoodsOrderAndConsultationOrder(@Param("patientId") Long patientId, @Param("orderStatus") String orderStatus);
|
||||
List<PatientOrder> getGoodsOrderAndConsultationOrder(@Param("patientId") Long patientId, @Param("orderStatusList") List<String> orderStatusList);
|
||||
|
||||
/**
|
||||
* 根据patientId编号查询评价信息
|
||||
*
|
||||
* @param patientId openid编号
|
||||
* @return AjaxResult
|
||||
*/
|
||||
List<PatientOrder> getOrderEvaluateByPatientId(Long patientId);
|
||||
}
|
||||
@ -6,6 +6,7 @@ import com.xinelu.applet.service.apporderevaluate.IAppOrderEvaluateService;
|
||||
import com.xinelu.common.config.XinELuConfig;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.GooodsOrderStatusEnum;
|
||||
import com.xinelu.common.enums.OrderSourceEnum;
|
||||
import com.xinelu.common.enums.OrderStatusEnum;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.bean.BeanUtils;
|
||||
@ -85,12 +86,14 @@ public class AppOrderEvaluateServiceImpl implements IAppOrderEvaluateService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public AjaxResult insertGoodsOrderEvaluate(OrderEvaluateAndPictureDTO orderEvaluateAndPictureDTO) {
|
||||
GoodsOrder goodsOrder = appOrderEvaluateMapper.selectGoodsOrderByOrderNo(orderEvaluateAndPictureDTO.getOrderNo());
|
||||
if (Objects.isNull(goodsOrder) || StringUtils.isBlank(goodsOrder.getOrderStatus()) || !goodsOrder.getOrderStatus().equals(GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo())) {
|
||||
return AjaxResult.error("当前订单未确认收货,请先确认收货后进行评价!");
|
||||
}
|
||||
if (StringUtils.equals(GooodsOrderStatusEnum.EVALUATED.getInfo(), goodsOrder.getOrderStatus())) {
|
||||
return AjaxResult.error("当前订单已评价!");
|
||||
if (OrderSourceEnum.SPRING_DOCTOR.getInfo().equals(orderEvaluateAndPictureDTO.getOrderSource())) {
|
||||
GoodsOrder goodsOrder = appOrderEvaluateMapper.selectGoodsOrderByOrderNo(orderEvaluateAndPictureDTO.getOrderNo());
|
||||
if (Objects.isNull(goodsOrder) || StringUtils.isBlank(goodsOrder.getOrderStatus()) || !goodsOrder.getOrderStatus().equals(GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo())) {
|
||||
return AjaxResult.error("当前订单未确认收货,请先确认收货后进行评价!");
|
||||
}
|
||||
if (StringUtils.equals(GooodsOrderStatusEnum.EVALUATED.getInfo(), goodsOrder.getOrderStatus())) {
|
||||
return AjaxResult.error("当前订单已评价!");
|
||||
}
|
||||
}
|
||||
//新增评价信息
|
||||
OrderEvaluateInfo orderEvaluateInfo = new OrderEvaluateInfo();
|
||||
@ -100,9 +103,12 @@ public class AppOrderEvaluateServiceImpl implements IAppOrderEvaluateService {
|
||||
if (insertOrderEvaluateInfo <= 0) {
|
||||
throw new ServiceException("评价失败,请联系管理员!");
|
||||
}
|
||||
if (OrderSourceEnum.FAMILY_DOCTOR.getInfo().equals(orderEvaluateAndPictureDTO.getOrderSource())) {
|
||||
return AjaxResult.success();
|
||||
}
|
||||
//新增评价图片
|
||||
List<OrderEvaluatePictureInfo> afferentEvaluatePicture = orderEvaluateAndPictureDTO.getOrderEvaluatePictureInfoList();
|
||||
if (CollectionUtils.isNotEmpty(orderEvaluateAndPictureDTO.getOrderEvaluatePictureInfoList())) {
|
||||
if (CollectionUtils.isNotEmpty(afferentEvaluatePicture)) {
|
||||
afferentEvaluatePicture.forEach(item -> {
|
||||
item.setOrderEvaluateId(orderEvaluateInfo.getId());
|
||||
item.setCreateTime(LocalDateTime.now());
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
package com.xinelu.applet.service.nursingorder;
|
||||
|
||||
|
||||
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
|
||||
import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO;
|
||||
import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
|
||||
import com.xinelu.applet.vo.nursingorder.PatientOrder;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
@ -59,9 +61,8 @@ public interface INursingOrderService {
|
||||
/**
|
||||
* 根据openid编号查询对应得订单
|
||||
*
|
||||
* @param parentId openid编号
|
||||
* @param orderStatus 订单状态
|
||||
* @param nurseOrder nurseOrder
|
||||
* @return AjaxResult
|
||||
*/
|
||||
AjaxResult getAppletOrderList(Long parentId, String orderStatus);
|
||||
List<PatientOrder> getAppletOrderList(NurseOrderDTO nurseOrder);
|
||||
}
|
||||
@ -1,17 +1,24 @@
|
||||
package com.xinelu.applet.service.nursingorder.impl;
|
||||
|
||||
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.xinelu.applet.dto.nurseorder.NurseOrderDTO;
|
||||
import com.xinelu.applet.mapper.nursingorder.NursingOrderMapper;
|
||||
import com.xinelu.applet.service.nursingorder.INursingOrderService;
|
||||
import com.xinelu.applet.vo.nursingorder.AppletGoodsOrderVO;
|
||||
import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
|
||||
import com.xinelu.applet.vo.nursingorder.PatientOrder;
|
||||
import com.xinelu.applet.vo.nursingorder.PatientOrderVO;
|
||||
import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||
import com.xinelu.common.enums.ConfirmRefundStatusEnum;
|
||||
import com.xinelu.common.enums.GooodsOrderStatusEnum;
|
||||
import com.xinelu.common.enums.OrderSourceEnum;
|
||||
import com.xinelu.common.enums.OrderStatusEnum;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.http.HttpUtils;
|
||||
import com.xinelu.common.utils.spring.SpringUtils;
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -19,9 +26,8 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description 订单分页
|
||||
@ -41,7 +47,7 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
||||
private final String NOT_EVALUATED = "NOT_EVALUATED";
|
||||
|
||||
/**
|
||||
* 未评价标识
|
||||
* 已评价标识
|
||||
*/
|
||||
private final String EVALUATED = "EVALUATED";
|
||||
|
||||
@ -125,22 +131,26 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
||||
/**
|
||||
* 根据openid编号查询对应得订单
|
||||
*
|
||||
* @param parentId openid编号
|
||||
* @param orderStatus 订单状态
|
||||
* @param nurseOrder nurseOrder
|
||||
* @return AjaxResult
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getAppletOrderList(Long parentId, String orderStatus) {
|
||||
public List<PatientOrder> getAppletOrderList(NurseOrderDTO nurseOrder) {
|
||||
List<PatientOrder> patientOrders = new ArrayList<>();
|
||||
List<PatientOrder> appletOrderList = new ArrayList<>();
|
||||
List<PatientOrder> goodsOrderAndConsultationOrder = new ArrayList<>();
|
||||
if (NOT_EVALUATED.equals(orderStatus)) {
|
||||
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(parentId, OrderStatusEnum.COMPLETE.getInfo());
|
||||
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(parentId, GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo());
|
||||
if (NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||
List<String> strings = new ArrayList<>();
|
||||
strings.add(GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo());
|
||||
strings.add(GooodsOrderStatusEnum.COMPLETED.getInfo());
|
||||
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.COMPLETE.getInfo());
|
||||
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), strings);
|
||||
}
|
||||
if (EVALUATED.equals(orderStatus)) {
|
||||
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(parentId, OrderStatusEnum.EVALUATED.getInfo());
|
||||
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(parentId, GooodsOrderStatusEnum.EVALUATED.getInfo());
|
||||
if (EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||
List<String> strings = new ArrayList<>();
|
||||
strings.add(GooodsOrderStatusEnum.EVALUATED.getInfo());
|
||||
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.EVALUATED.getInfo());
|
||||
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), strings);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(appletOrderList)) {
|
||||
patientOrders.addAll(appletOrderList);
|
||||
@ -148,6 +158,34 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
||||
if (CollectionUtils.isNotEmpty(goodsOrderAndConsultationOrder)) {
|
||||
patientOrders.addAll(goodsOrderAndConsultationOrder);
|
||||
}
|
||||
return AjaxResult.success(patientOrders);
|
||||
String result = HttpUtils.sendGet(SpringUtils.getFdUrl(nurseOrder.getRegion()) + "/performance/recordV2/" + nurseOrder.getCardNo());
|
||||
if (StringUtils.isBlank(result)) {
|
||||
throw new ServiceException("获取微信小程序用户信息失败", 201);
|
||||
}
|
||||
PatientOrderVO resultHttp = JSON.parseObject(result, PatientOrderVO.class);
|
||||
if (Objects.nonNull(resultHttp) && CollectionUtils.isNotEmpty(resultHttp.getData()) && Objects.nonNull(resultHttp.getData().get(0).getOrderNo())) {
|
||||
List<PatientOrder> data = resultHttp.getData();
|
||||
data.forEach(item -> item.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo()));
|
||||
List<PatientOrder> orderEvaluate = nursingOrderMapper.getOrderEvaluateByPatientId(nurseOrder.getParentId());
|
||||
if (CollectionUtils.isNotEmpty(orderEvaluate) && EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||
for (PatientOrder patientOrder : orderEvaluate) {
|
||||
PatientOrder dataFirst = data.stream().filter(Objects::nonNull).filter(item -> Objects.nonNull(item.getOrderNo()) && patientOrder.getOrderNo().equals(item.getOrderNo())).findFirst().orElse(new PatientOrder());
|
||||
dataFirst.setCompositeScore(patientOrder.getCompositeScore());
|
||||
patientOrders.add(dataFirst);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(orderEvaluate) && NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||
Collection<PatientOrder> subtract = CollectionUtils.subtract(data, orderEvaluate);
|
||||
patientOrders.addAll(subtract);
|
||||
}
|
||||
if (CollectionUtils.isEmpty(orderEvaluate) && NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||
patientOrders.addAll(data);
|
||||
}
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(patientOrders)) {
|
||||
Collections.sort(patientOrders, Comparator.comparing(PatientOrder::getCreateTime, (u1, u2) -> u2.compareTo(u1)));
|
||||
patientOrders = patientOrders.stream().skip((nurseOrder.getPageNum() - 1) * nurseOrder.getPageSize()).limit(nurseOrder.getPageSize()).collect(Collectors.toList());
|
||||
}
|
||||
return patientOrders;
|
||||
}
|
||||
}
|
||||
@ -1,10 +1,13 @@
|
||||
package com.xinelu.applet.vo.nursingorder;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Description 服务评价
|
||||
@ -13,7 +16,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PatientOrder implements Serializable {
|
||||
public class PatientOrder extends BaseDomain implements Serializable {
|
||||
|
||||
/**
|
||||
* 被护理人信息表id
|
||||
@ -36,6 +39,7 @@ public class PatientOrder implements Serializable {
|
||||
/**
|
||||
* 下单时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
@ -60,4 +64,39 @@ public class PatientOrder implements Serializable {
|
||||
* 订单类型
|
||||
*/
|
||||
private String orderType;
|
||||
|
||||
/**
|
||||
* 预约服务满意度,一般:COMMONLY,满意:SATISFIED,不满意:DISSATISFIED
|
||||
*/
|
||||
@ApiModelProperty(value = "预约服务满意度,一般:COMMONLY,满意:SATISFIED,不满意:DISSATISFIED")
|
||||
private String evaluateSatisfaction;
|
||||
|
||||
/**
|
||||
* 商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星
|
||||
*/
|
||||
@ApiModelProperty(value = "商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星")
|
||||
private Integer compositeScore;
|
||||
|
||||
/**
|
||||
* 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR
|
||||
*/
|
||||
private String orderSource;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
PatientOrder that = (PatientOrder) o;
|
||||
return Objects.equals(orderNo, that.orderNo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(orderNo);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,31 @@
|
||||
package com.xinelu.applet.vo.nursingorder;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description 服务评价
|
||||
* @Author zhangheng
|
||||
* @Date 2022-10-18
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class PatientOrderVO implements Serializable {
|
||||
|
||||
/**
|
||||
* 成功标识
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 文字描述
|
||||
*/
|
||||
private String msg;
|
||||
|
||||
/**
|
||||
* 信息集合
|
||||
*/
|
||||
private List<PatientOrder> data;
|
||||
}
|
||||
@ -155,8 +155,11 @@
|
||||
<if test="orderType != null and orderType != ''">
|
||||
and gr.order_type = #{orderType}
|
||||
</if>
|
||||
<if test="orderType = null and orderType = ''">
|
||||
and gr.order_type IN #{orderTypeList}
|
||||
<if test="orderTypeList != null and orderTypeList != ''">
|
||||
gr.order_typ in
|
||||
<foreach collection="orderTypeList" item="orderTypeList" open="(" separator="," close=")">
|
||||
#{orderTypeList}
|
||||
</foreach>
|
||||
</if>
|
||||
and gr.del_flag = 0
|
||||
and god.del_flag = 0
|
||||
@ -347,11 +350,14 @@
|
||||
ao.create_time,
|
||||
aod.nurse_item_name orderName,
|
||||
nsi.item_picture_url pictureUrl,
|
||||
'APPOINTMENT_ORDER' AS orderType
|
||||
'APPOINTMENT_ORDER' AS orderType,
|
||||
nei.evaluate_satisfaction,
|
||||
'SPRING_DOCTOR' AS orderSource
|
||||
FROM
|
||||
appointment_order ao
|
||||
LEFT JOIN appointment_order_details aod ON ao.order_no = aod.order_no
|
||||
LEFT JOIN nurse_station_item nsi ON nsi.id = aod.nurse_station_item_id
|
||||
LEFT JOIN order_evaluate_info nei ON nei.order_no = ao.order_no
|
||||
where
|
||||
ao.order_status = #{orderStatus}
|
||||
and ao.patient_id = #{patientId}
|
||||
@ -364,19 +370,33 @@
|
||||
gor.patient_id,
|
||||
gor.order_no,
|
||||
gor.order_status,
|
||||
gor.order_time,
|
||||
gor.order_time createTime,
|
||||
gor.order_type,
|
||||
god.goods_name orderName,
|
||||
gad.attribute_piture_url pictureUrl,
|
||||
hpi.person_picture_url
|
||||
hpi.person_picture_url,
|
||||
nei.composite_score,
|
||||
'SPRING_DOCTOR' AS orderSource
|
||||
FROM
|
||||
goods_order gor
|
||||
LEFT JOIN goods_order_details god ON god.order_no = gor.order_no
|
||||
LEFT JOIN goods_attribute_details gad ON gad.id = god.goods_attribute_details_id
|
||||
LEFT JOIN hospital_person_info hpi ON hpi.id = gor.hospital_person_id
|
||||
LEFT JOIN order_evaluate_info nei ON nei.order_no = gor.order_no
|
||||
where
|
||||
gor.order_status = #{orderStatus}
|
||||
<if test="orderStatusList != null and orderStatusList != ''">
|
||||
gor.order_status in
|
||||
<foreach collection="orderStatusList" item="orderStatusList" open="(" separator="," close=")">
|
||||
#{orderStatusList}
|
||||
</foreach>
|
||||
</if>
|
||||
and gor.patient_id = #{patientId}
|
||||
and gor.del_flag = 0
|
||||
</select>
|
||||
|
||||
<select id="getOrderEvaluateByPatientId" resultType="com.xinelu.applet.vo.nursingorder.PatientOrder">
|
||||
SELECT order_no
|
||||
FROM order_evaluate_info
|
||||
where patient_id = #{patientId}
|
||||
</select>
|
||||
</mapper>
|
||||
@ -62,9 +62,9 @@ public class OrderEvaluateInfoController extends BaseController {
|
||||
/**
|
||||
* 新增预约服务订单和商品订单评价信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:orderEvaluateInfo:add')")
|
||||
//@PreAuthorize("@ss.hasPermi('system:orderEvaluateInfo:add')")
|
||||
@Log(title = "预约服务订单和商品订单评价信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("add")
|
||||
@PostMapping("/add")
|
||||
public AjaxResult add(@RequestBody OrderEvaluateInfo orderEvaluateInfo) {
|
||||
return toAjax(orderEvaluateInfoService.insertOrderEvaluateInfo(orderEvaluateInfo));
|
||||
}
|
||||
@ -74,7 +74,7 @@ public class OrderEvaluateInfoController extends BaseController {
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:orderEvaluateInfo:edit')")
|
||||
@Log(title = "预约服务订单和商品订单评价信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("edit")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody OrderEvaluateInfo orderEvaluateInfo) {
|
||||
return toAjax(orderEvaluateInfoService.updateOrderEvaluateInfo(orderEvaluateInfo));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user