小程序个人中心代码移植
This commit is contained in:
parent
d1c73e30d5
commit
8fe8dc82ab
@ -2,9 +2,11 @@ package com.xinelu.applet.controller.nurseapplogin;
|
||||
|
||||
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
|
||||
import com.xinelu.applet.service.nurseapplogin.NurseAppLoginService;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.common.annotation.MobileRequestAuthorization;
|
||||
import com.xinelu.common.core.controller.BaseController;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.core.page.TableDataInfo;
|
||||
import com.xinelu.common.custominterface.Query;
|
||||
import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.common.utils.regex.RegexUtil;
|
||||
@ -15,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
;
|
||||
@ -80,5 +83,20 @@ public class NurseAppLoginController extends BaseController {
|
||||
}
|
||||
return nurseAppLoginService.nurseAppPersonal(patientId);
|
||||
}
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param orderStatus 预约订单状态
|
||||
* @return 结果
|
||||
*/
|
||||
@MobileRequestAuthorization
|
||||
@GetMapping("/appServiceOrder")
|
||||
public TableDataInfo selectAppServiceOrder(Long patientId, String orderStatus) {
|
||||
startPage();
|
||||
List<OrderAndItemVO> appointmentOrderDetails = nurseAppLoginService.selectAppServiceOrderItem(patientId, orderStatus);
|
||||
return getDataTable(appointmentOrderDetails);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xinelu.applet.mapper.nurseapplogin;
|
||||
|
||||
|
||||
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.manage.domain.goodsOrder.GoodsOrder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -22,6 +23,15 @@ public interface NurseAppLoginMapper {
|
||||
*/
|
||||
PatientAndDiseaseVO getPatientDiseaseByPatientId(@Param("patientId") Long patientId);
|
||||
|
||||
/**
|
||||
* 预约查询预约订单明细
|
||||
*
|
||||
* @param patientId 预约订单明细主键
|
||||
* @param orderStatus 预约状态
|
||||
* @return 预约订单明细
|
||||
*/
|
||||
List<OrderAndItemVO> selectAppointmentOrderDetailsByPatientId(@Param("patientId") Long patientId, @Param("orderStatus") String orderStatus);
|
||||
|
||||
/**
|
||||
* 查询信息完善标识符
|
||||
*
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
package com.xinelu.applet.service.nurseapplogin;
|
||||
|
||||
import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description APP登录注册业务层
|
||||
* @Author zh
|
||||
@ -33,4 +36,13 @@ public interface NurseAppLoginService {
|
||||
* @return 结果
|
||||
*/
|
||||
AjaxResult nurseAppPersonal(Long patientId);
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param orderStatus 预约订单状态
|
||||
* @return 结果
|
||||
*/
|
||||
List<OrderAndItemVO> selectAppServiceOrderItem(Long patientId, String orderStatus);
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import com.xinelu.applet.utils.AppointmentTimeUtil;
|
||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemConsumableVO;
|
||||
import com.xinelu.applet.vo.appletlogin.NurserStationItemInfoVO;
|
||||
import com.xinelu.applet.vo.nurseapplogin.PatientAndDiseaseVO;
|
||||
import com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO;
|
||||
import com.xinelu.applet.vo.specialdisease.WeekDaysVO;
|
||||
import com.xinelu.common.core.domain.AjaxResult;
|
||||
import com.xinelu.common.enums.AppointmentTimeIntervalEnum;
|
||||
@ -26,10 +27,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalTime;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -180,4 +178,20 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService {
|
||||
patientDisease.setEvaluatedCount(evaluatedCount);
|
||||
return AjaxResult.success(patientDisease);
|
||||
}
|
||||
|
||||
/**
|
||||
* App查询预约服务订单
|
||||
*
|
||||
* @param patientId 用户id
|
||||
* @param orderStatus 预约订单状态
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<OrderAndItemVO> selectAppServiceOrderItem(Long patientId, String orderStatus) {
|
||||
List<OrderAndItemVO> appointmentOrderDetails = new ArrayList<>();
|
||||
if (Objects.isNull(patientId) && StringUtils.isBlank(orderStatus)) {
|
||||
return appointmentOrderDetails;
|
||||
}
|
||||
return nurseAppLoginMapper.selectAppointmentOrderDetailsByPatientId(patientId, orderStatus);
|
||||
}
|
||||
}
|
||||
@ -65,6 +65,40 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAppointmentOrderDetailsByPatientId"
|
||||
resultType="com.xinelu.applet.vo.nursepersonapplogin.OrderAndItemVO">
|
||||
SELECT
|
||||
aod.id,
|
||||
aod. nurse_station_item_id stationItemId,
|
||||
aod.nurse_station_item_price_id stationItemPriceId,
|
||||
aod.order_no,
|
||||
aod.order_count,
|
||||
aod.order_status,
|
||||
aod.appointment_status,
|
||||
aod.total_price,
|
||||
aod.nurse_item_name,
|
||||
aod.item_serve_duration_unit,
|
||||
aod.create_time,
|
||||
nsi.item_picture_url,
|
||||
ns.id stationId,
|
||||
ao.order_type
|
||||
FROM
|
||||
appointment_order ao
|
||||
LEFT JOIN appointment_order_details aod ON aod.order_no = ao.order_no
|
||||
LEFT JOIN nurse_station_item nsi ON nsi.id = aod.nurse_station_item_id
|
||||
LEFT JOIN nurse_station ns ON ns.id = nsi.nurse_station_id
|
||||
<where>
|
||||
ao.del_flag = 0
|
||||
<if test="patientId != null and patientId != ''">
|
||||
and ao.patient_id = #{patientId}
|
||||
</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">
|
||||
AND ao.order_status = #{orderStatus}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY aod.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getLoginFlagByPatientId" resultType="integer">
|
||||
select login_flag
|
||||
from patient_info
|
||||
|
||||
Loading…
Reference in New Issue
Block a user