| | |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.utils.GaoDeMapUtil; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.worker.entity.MasterWorker; |
| | | import com.ruoyi.worker.entity.Order; |
| | | import com.ruoyi.worker.entity.RecoveryServe; |
| | |
| | | // 根据经纬度计算与师傅的距离 |
| | | Result<Long> result = GaoDeMapUtil.getDistance(orderPosition, longitude + "," + latitude); |
| | | Long distance = result.getDatas(); |
| | | // 回收服务信息 |
| | | RecoveryServe recoveryServe = recoveryServeService.lambdaQuery().eq(RecoveryServe::getId, order.getServeId()) |
| | | .eq(RecoveryServe::getIsDelete, 0).one(); |
| | | // vo类信息封装 |
| | | OrderListVO orderListVO = new OrderListVO(order.getServeId()); |
| | | BeanUtils.copyProperties(orderListVO, orderListVO); |
| | | orderListVO.setOrderId(order.getId()); |
| | | orderListVO.setOrderNumber(order.getOrderNumber()); |
| | | orderListVO.setSiteId(order.getSiteId()); |
| | | orderListVO.setSiteName(order.getSiteName()); |
| | | orderListVO.setServeId(order.getServeId()); |
| | | orderListVO.setServeName(order.getServeName()); |
| | | orderListVO.setServePicture(recoveryServe.getCover()); |
| | | orderListVO.setServePrice(recoveryServe.getDefaultPrice()); |
| | | orderListVO.setUserId(userid); |
| | | orderListVO.setReservationName(order.getReservationName()); |
| | | orderListVO.setReservationPhone(order.getReservationPhone()); |
| | | orderListVO.setReservationAddress(order.getReservationAddress()); |
| | | orderListVO.setTime(order.getTime()); |
| | | orderListVO.setServerId(order.getServerId()); |
| | | orderListVO.setServerName(order.getServerName()); |
| | | orderListVO.setServerPhone(order.getServerPhone()); |
| | | orderListVO.setReservationRemark(order.getReservationRemark()); |
| | | orderListVO.setOrderMoney(order.getOrderMoney()); |
| | | orderListVO.setState(order.getState()); |
| | | orderListVO.setAcceptTime(order.getAcceptTime()); |
| | | orderListVO.setArriveTime(order.getArriveTime()); |
| | | orderListVO.setType(order.getType()); |
| | | orderListVO.setLongitude(order.getLongitude()); |
| | | orderListVO.setLatitude(order.getLatitude()); |
| | | OrderNotHandleVO vo = new OrderNotHandleVO(distance, orderListVO); |
| | | list.add(vo); |
| | | } |