小程序服务评价代码修改

This commit is contained in:
张恒 2023-10-20 14:03:32 +08:00
parent d7dab603ee
commit bf84a29a37
3 changed files with 12 additions and 4 deletions

View File

@ -47,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);

View File

@ -163,7 +163,7 @@ public class NursingOrderServiceImpl implements INursingOrderService {
throw new ServiceException("获取微信小程序用户信息失败", 201);
}
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();
data.forEach(item -> item.setOrderSource(OrderSourceEnum.FAMILY_DOCTOR.getInfo()));
List<PatientOrder> orderEvaluate = nursingOrderMapper.getOrderEvaluateByPatientId(nurseOrder.getParentId());
@ -182,8 +182,10 @@ public class NursingOrderServiceImpl implements INursingOrderService {
patientOrders.addAll(data);
}
}
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());
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;
}
}

View File

@ -155,6 +155,12 @@
<if test="orderType != null and orderType != ''">
and gr.order_type = #{orderType}
</if>
<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
</where>