Merge branch 'jihan_0920_护理服务、商城、积分兑换、在线问诊功能分支' into dev_gy_0920
This commit is contained in:
commit
962c4f0715
@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -36,7 +36,6 @@ public class ConsultationInfoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 查询在线问诊-问诊信息列表
|
* 查询在线问诊-问诊信息列表
|
||||||
*/
|
*/
|
||||||
//@PreAuthorize("@ss.hasPermi('system:info:list')")
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(ConsultationInfoDTO consultationInfoDTO) {
|
public TableDataInfo list(ConsultationInfoDTO consultationInfoDTO) {
|
||||||
startPage();
|
startPage();
|
||||||
@ -44,11 +43,9 @@ public class ConsultationInfoController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取在线问诊-问诊信息详细信息
|
* 获取在线问诊-问诊信息详细信息
|
||||||
*/
|
*/
|
||||||
//@PreAuthorize("@ss.hasPermi('system:info:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
return AjaxResult.success(consultationInfoService.selectConsultationInfoById(id));
|
return AjaxResult.success(consultationInfoService.selectConsultationInfoById(id));
|
||||||
@ -57,7 +54,6 @@ public class ConsultationInfoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 新增在线问诊-问诊信息
|
* 新增在线问诊-问诊信息
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('system:info:add')")
|
|
||||||
@Log(title = "在线问诊-问诊信息", businessType = BusinessType.INSERT)
|
@Log(title = "在线问诊-问诊信息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated(Insert.class) @RequestBody ConsultationInfoDTO consultationInfoDTO) {
|
public AjaxResult add(@Validated(Insert.class) @RequestBody ConsultationInfoDTO consultationInfoDTO) {
|
||||||
@ -67,14 +63,12 @@ public class ConsultationInfoController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 修改在线问诊-问诊信息(修改问诊状态)
|
* 修改在线问诊-问诊信息(修改问诊状态)
|
||||||
*/
|
*/
|
||||||
// @PreAuthorize("@ss.hasPermi('system:info:edit')")
|
|
||||||
@Log(title = "在线问诊-问诊信息", businessType = BusinessType.UPDATE)
|
@Log(title = "在线问诊-问诊信息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody ConsultationInfo consultationInfo) {
|
public AjaxResult edit(@RequestBody ConsultationInfo consultationInfo) {
|
||||||
return toAjax(consultationInfoService.updateConsultationInfo(consultationInfo));
|
return toAjax(consultationInfoService.updateConsultationInfo(consultationInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问诊资料上传接口
|
* 问诊资料上传接口
|
||||||
*/
|
*/
|
||||||
@ -88,5 +82,4 @@ public class ConsultationInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
return consultationInfoService.uploadConsultationFile(multipartFile);
|
return consultationInfoService.uploadConsultationFile(multipartFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,8 +46,8 @@ public class NursingOrderController extends BaseController {
|
|||||||
* 根据护理人id以及订单状态查询订单信息
|
* 根据护理人id以及订单状态查询订单信息
|
||||||
*/
|
*/
|
||||||
@MobileRequestAuthorization
|
@MobileRequestAuthorization
|
||||||
@GetMapping("/goodsOrder")
|
@PostMapping("/goodsOrder")
|
||||||
public TableDataInfo goodsOrder(AppletGoodsOrderVO goodsOrderVO) {
|
public TableDataInfo goodsOrder(@RequestBody AppletGoodsOrderVO goodsOrderVO) {
|
||||||
startPage();
|
startPage();
|
||||||
List<AppletGoodsOrderVO> goodsOrder = nursingOrderService.getGoodsOrder(goodsOrderVO);
|
List<AppletGoodsOrderVO> goodsOrder = nursingOrderService.getGoodsOrder(goodsOrderVO);
|
||||||
return getDataTable(goodsOrder);
|
return getDataTable(goodsOrder);
|
||||||
@ -99,12 +99,12 @@ public class NursingOrderController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 根据openid编号查询对应得订单
|
* 根据openid编号查询对应得订单
|
||||||
*/
|
*/
|
||||||
//@MobileRequestAuthorization
|
@MobileRequestAuthorization
|
||||||
@GetMapping("/getAppletOrderList")
|
@GetMapping("/getAppletOrderList")
|
||||||
public TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder) {
|
public TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder) {
|
||||||
if (Objects.isNull(nurseOrder) || Objects.isNull(nurseOrder.getParentId()) || StringUtils.isBlank(nurseOrder.getCardNo()) || StringUtils.isBlank(nurseOrder.getOrderStatus())) {
|
if (Objects.isNull(nurseOrder) || Objects.isNull(nurseOrder.getParentId()) || StringUtils.isBlank(nurseOrder.getCardNo()) || StringUtils.isBlank(nurseOrder.getOrderStatus())) {
|
||||||
return getDataTable(new ArrayList<>());
|
return getDataTable(new ArrayList<>());
|
||||||
}
|
}
|
||||||
return getDataTable(nursingOrderService.getAppletOrderList(nurseOrder));
|
return nursingOrderService.getAppletOrderList(nurseOrder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -35,4 +35,14 @@ public class NurseOrderDTO extends BaseDomain implements Serializable {
|
|||||||
* 地区标识
|
* 地区标识
|
||||||
*/
|
*/
|
||||||
private String region;
|
private String region;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页码
|
||||||
|
*/
|
||||||
|
private Integer pageNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
private Integer pageSize;
|
||||||
}
|
}
|
||||||
@ -78,11 +78,11 @@ public interface NursingOrderMapper {
|
|||||||
/**
|
/**
|
||||||
* 根据openid编号查询对应得订单
|
* 根据openid编号查询对应得订单
|
||||||
*
|
*
|
||||||
* @param patientId openid编号
|
* @param patientId openid编号
|
||||||
* @param orderStatus 订单状态
|
* @param orderStatusList 订单状态
|
||||||
* @return AjaxResult
|
* @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编号查询评价信息
|
* 根据patientId编号查询评价信息
|
||||||
|
|||||||
@ -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("预约订单新增信息失败,请联系管理员!");
|
||||||
|
|||||||
@ -4,9 +4,9 @@ package com.xinelu.applet.service.nursingorder;
|
|||||||
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;
|
||||||
import com.xinelu.applet.vo.nursingorder.PatientOrder;
|
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -64,5 +64,5 @@ public interface INursingOrderService {
|
|||||||
* @param nurseOrder nurseOrder
|
* @param nurseOrder nurseOrder
|
||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
List<PatientOrder> getAppletOrderList(NurseOrderDTO nurseOrder);
|
TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder);
|
||||||
}
|
}
|
||||||
@ -2,6 +2,7 @@ package com.xinelu.applet.service.nursingorder.impl;
|
|||||||
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSON;
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
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;
|
||||||
import com.xinelu.applet.service.nursingorder.INursingOrderService;
|
import com.xinelu.applet.service.nursingorder.INursingOrderService;
|
||||||
@ -10,8 +11,10 @@ import com.xinelu.applet.vo.nursingorder.NursingOrderInfoVO;
|
|||||||
import com.xinelu.applet.vo.nursingorder.PatientOrder;
|
import com.xinelu.applet.vo.nursingorder.PatientOrder;
|
||||||
import com.xinelu.applet.vo.nursingorder.PatientOrderVO;
|
import com.xinelu.applet.vo.nursingorder.PatientOrderVO;
|
||||||
import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO;
|
import com.xinelu.applet.vo.specialdisease.AppointmentOrderDetailsInfoVO;
|
||||||
|
import com.xinelu.common.constant.HttpStatus;
|
||||||
import com.xinelu.common.core.domain.AjaxResult;
|
import com.xinelu.common.core.domain.AjaxResult;
|
||||||
import com.xinelu.common.core.domain.entity.SysDictData;
|
import com.xinelu.common.core.domain.entity.SysDictData;
|
||||||
|
import com.xinelu.common.core.page.TableDataInfo;
|
||||||
import com.xinelu.common.enums.ConfirmRefundStatusEnum;
|
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;
|
||||||
@ -26,13 +29,9 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import static com.xinelu.common.utils.PageUtils.startPage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 订单分页
|
* @Description 订单分页
|
||||||
* @Author ZhangHeng
|
* @Author ZhangHeng
|
||||||
@ -139,17 +138,22 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
|||||||
* @return AjaxResult
|
* @return AjaxResult
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<PatientOrder> getAppletOrderList(NurseOrderDTO nurseOrder) {
|
public TableDataInfo getAppletOrderList(NurseOrderDTO nurseOrder) {
|
||||||
List<PatientOrder> patientOrders = new ArrayList<>();
|
List<PatientOrder> patientOrders = new ArrayList<>();
|
||||||
List<PatientOrder> appletOrderList = new ArrayList<>();
|
List<PatientOrder> appletOrderList = new ArrayList<>();
|
||||||
List<PatientOrder> goodsOrderAndConsultationOrder = new ArrayList<>();
|
List<PatientOrder> goodsOrderAndConsultationOrder = new ArrayList<>();
|
||||||
if (NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
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());
|
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.COMPLETE.getInfo());
|
||||||
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), GooodsOrderStatusEnum.RECEIVED_GOODS.getInfo());
|
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), strings);
|
||||||
}
|
}
|
||||||
if (EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
if (EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||||
|
List<String> strings = new ArrayList<>();
|
||||||
|
strings.add(GooodsOrderStatusEnum.EVALUATED.getInfo());
|
||||||
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.EVALUATED.getInfo());
|
appletOrderList = nursingOrderMapper.getAppointmentOrderListByParentId(nurseOrder.getParentId(), OrderStatusEnum.EVALUATED.getInfo());
|
||||||
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), GooodsOrderStatusEnum.EVALUATED.getInfo());
|
goodsOrderAndConsultationOrder = nursingOrderMapper.getGoodsOrderAndConsultationOrder(nurseOrder.getParentId(), strings);
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(appletOrderList)) {
|
if (CollectionUtils.isNotEmpty(appletOrderList)) {
|
||||||
patientOrders.addAll(appletOrderList);
|
patientOrders.addAll(appletOrderList);
|
||||||
@ -159,28 +163,37 @@ public class NursingOrderServiceImpl implements INursingOrderService {
|
|||||||
}
|
}
|
||||||
String result = HttpUtils.sendGet(SpringUtils.getFdUrl(nurseOrder.getRegion()) + "/performance/recordV2/" + nurseOrder.getCardNo());
|
String result = HttpUtils.sendGet(SpringUtils.getFdUrl(nurseOrder.getRegion()) + "/performance/recordV2/" + nurseOrder.getCardNo());
|
||||||
if (StringUtils.isBlank(result)) {
|
if (StringUtils.isBlank(result)) {
|
||||||
throw new ServiceException("获取微信小程序用户信息失败", 201);
|
throw new ServiceException("获取家医小程序用户订单信息失败", 201);
|
||||||
}
|
}
|
||||||
PatientOrderVO resultHttp = JSON.parseObject(result, PatientOrderVO.class);
|
PatientOrderVO resultHttp = JSON.parseObject(result, PatientOrderVO.class);
|
||||||
if (Objects.nonNull(resultHttp) && CollectionUtils.isNotEmpty(resultHttp.getData())) {
|
if (Objects.nonNull(resultHttp) && CollectionUtils.isNotEmpty(resultHttp.getData()) && Objects.nonNull(resultHttp.getData().get(0).getOrderNo())) {
|
||||||
List<PatientOrder> data = resultHttp.getData();
|
List<PatientOrder> data = resultHttp.getData();
|
||||||
|
data.forEach(item -> item.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo()));
|
||||||
List<PatientOrder> orderEvaluate = nursingOrderMapper.getOrderEvaluateByPatientId(nurseOrder.getParentId());
|
List<PatientOrder> orderEvaluate = nursingOrderMapper.getOrderEvaluateByPatientId(nurseOrder.getParentId());
|
||||||
if (CollectionUtils.isNotEmpty(orderEvaluate) && EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
if (CollectionUtils.isNotEmpty(orderEvaluate) && EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||||
for (PatientOrder patientOrder : orderEvaluate) {
|
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());
|
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());
|
dataFirst.setCompositeScore(patientOrder.getCompositeScore());
|
||||||
dataFirst.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo());
|
|
||||||
patientOrders.add(dataFirst);
|
patientOrders.add(dataFirst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollectionUtils.isNotEmpty(orderEvaluate) && NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
if (CollectionUtils.isNotEmpty(orderEvaluate) && NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||||
data.removeAll(orderEvaluate);
|
Collection<PatientOrder> subtract = CollectionUtils.subtract(data, orderEvaluate);
|
||||||
data.forEach(item ->item.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo()));
|
patientOrders.addAll(subtract);
|
||||||
|
}
|
||||||
|
if (CollectionUtils.isEmpty(orderEvaluate) && NOT_EVALUATED.equals(nurseOrder.getOrderStatus())) {
|
||||||
|
patientOrders.addAll(data);
|
||||||
}
|
}
|
||||||
patientOrders.addAll(data);
|
|
||||||
}
|
}
|
||||||
startPage();
|
TableDataInfo rspData = new TableDataInfo();
|
||||||
patientOrders.sort((t1, t2) -> t2.getCreateTime().compareTo(t1.getCreateTime()));
|
rspData.setTotal(new PageInfo(patientOrders).getTotal());
|
||||||
return patientOrders;
|
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());
|
||||||
|
}
|
||||||
|
rspData.setRows(patientOrders);
|
||||||
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
|
rspData.setMsg("查询成功");
|
||||||
|
return rspData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -27,6 +27,11 @@ public class HealthConsultationOrderDTO implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会诊信息表id
|
||||||
|
*/
|
||||||
|
private Long consultationInfoId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 商品订单表id
|
* 商品订单表id
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
package com.xinelu.applet.vo.nursingorder;
|
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 io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description 服务评价
|
* @Description 服务评价
|
||||||
@ -13,7 +16,7 @@ import java.time.LocalDateTime;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class PatientOrder implements Serializable {
|
public class PatientOrder extends BaseDomain implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 被护理人信息表id
|
* 被护理人信息表id
|
||||||
@ -36,6 +39,7 @@ public class PatientOrder implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 下单时间
|
* 下单时间
|
||||||
*/
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,4 +81,22 @@ public class PatientOrder implements Serializable {
|
|||||||
* 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR
|
* 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR
|
||||||
*/
|
*/
|
||||||
private String orderSource;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -155,8 +155,11 @@
|
|||||||
<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="orderType = null and orderType = ''">
|
<if test="orderTypeList != null and orderTypeList.size > 0">
|
||||||
and gr.order_type IN #{orderTypeList}
|
and gr.order_type in
|
||||||
|
<foreach collection="orderTypeList" item="orderTypeList" open="(" separator="," close=")">
|
||||||
|
#{orderTypeList}
|
||||||
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
and gr.del_flag = 0
|
and gr.del_flag = 0
|
||||||
and god.del_flag = 0
|
and god.del_flag = 0
|
||||||
@ -367,7 +370,7 @@
|
|||||||
gor.patient_id,
|
gor.patient_id,
|
||||||
gor.order_no,
|
gor.order_no,
|
||||||
gor.order_status,
|
gor.order_status,
|
||||||
gor.order_time,
|
gor.order_time createTime,
|
||||||
gor.order_type,
|
gor.order_type,
|
||||||
god.goods_name orderName,
|
god.goods_name orderName,
|
||||||
gad.attribute_piture_url pictureUrl,
|
gad.attribute_piture_url pictureUrl,
|
||||||
@ -381,7 +384,12 @@
|
|||||||
LEFT JOIN hospital_person_info hpi ON hpi.id = gor.hospital_person_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
|
LEFT JOIN order_evaluate_info nei ON nei.order_no = gor.order_no
|
||||||
where
|
where
|
||||||
gor.order_status = #{orderStatus}
|
<if test="orderTypeList != null and orderTypeList.size > 0">
|
||||||
|
gor.order_status in
|
||||||
|
<foreach collection="orderStatusList" item="orderStatusList" open="(" separator="," close=")">
|
||||||
|
#{orderStatusList}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
and gor.patient_id = #{patientId}
|
and gor.patient_id = #{patientId}
|
||||||
and gor.del_flag = 0
|
and gor.del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -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")
|
||||||
|
|||||||
@ -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;
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 订单编号
|
||||||
|
|||||||
@ -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.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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user