| | |
| | | package com.ruoyi.admin.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.admin.entity.MasterWorker; |
| | | import com.ruoyi.admin.entity.RecoveryServe; |
| | | import com.ruoyi.admin.entity.Site; |
| | | import com.ruoyi.admin.entity.*; |
| | | import com.ruoyi.admin.netty.NettyChannelMap; |
| | | import com.ruoyi.admin.netty.NettyWebSocketController; |
| | | import com.ruoyi.admin.service.*; |
| | | import com.ruoyi.admin.sorcket.WebSocketServer; |
| | | import com.ruoyi.admin.utils.AddressDto; |
| | | import com.ruoyi.admin.utils.DescribeInstances; |
| | | import com.ruoyi.admin.utils.OcrBase; |
| | | import com.ruoyi.admin.vo.OrderByServeRecordVO; |
| | | import com.ruoyi.admin.vo.OrderDetailVO; |
| | | import com.ruoyi.common.core.constant.Constants; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.Result; |
| | | import com.ruoyi.common.core.utils.GaoDeMapUtil; |
| | | import com.ruoyi.common.core.utils.SnowflakeIdWorker; |
| | | import com.ruoyi.common.core.vo.CityInfoVO; |
| | | import com.ruoyi.common.core.vo.PaperInVo; |
| | | import com.ruoyi.common.core.vo.PrintDto; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.security.annotation.Logical; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.api.entity.*; |
| | | import com.ruoyi.order.api.entity.ChangeDispatch; |
| | | import com.ruoyi.order.api.entity.Order; |
| | | import com.ruoyi.order.api.feignClient.ExchangeDispatchClient; |
| | | import com.ruoyi.order.api.feignClient.OrderClient; |
| | | import com.ruoyi.order.api.request.OrderCountDataRequest; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import com.tencentcloudapi.ocr.v20181119.models.BusinessCardOCRResponse; |
| | | import com.tencentcloudapi.ocr.v20181119.models.ClassifyDetectOCRResponse; |
| | | import com.tencentcloudapi.ocr.v20181119.models.SmartStructuralOCRV2Response; |
| | | import com.tencentcloudapi.ocr.v20181119.models.WaybillOCRResponse; |
| | | import io.netty.channel.ChannelHandlerContext; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections4.Get; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | import java.nio.file.Files; |
| | | import java.nio.file.Paths; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private ExchangeDispatchClient dispatchClient; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private FranchiseeService franchiseeService; |
| | | |
| | | /** |
| | | * 雪花算法类 |
| | |
| | | * |
| | | * @param id 订单id |
| | | */ |
| | | @RequiresPermissions(value = {"user_detail", "order_detail"}, logical = Logical.OR) |
| | | @ApiOperation(value = "订单列表-查询订单详情(包含服务信息、师傅信息、服务记录、订单评价)", tags = {"后台-订单管理"}) |
| | | @GetMapping(value = "/orderDetail") |
| | | @ApiImplicitParams({ |
| | |
| | | // 独立orderService |
| | | return R.ok(orderService.orderListDetail(id)); |
| | | } |
| | | @Resource |
| | | private RecoveryClassifyService recoveryClassifyService; |
| | | |
| | | |
| | | /** |
| | | * 订单列表 |
| | | * |
| | | * @param orderQueryRequest 订单列表查询参数 |
| | | */ |
| | | @RequiresPermissions("order_list") |
| | | @ApiOperation(value = "订单列表-分页", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/queryPage") |
| | | public R<Page<Order>> queryPage(@RequestBody OrderQueryRequest orderQueryRequest) { |
| | |
| | | return R.loginExpire("登录失效!"); |
| | | } |
| | | if (loginUser.getIsFranchisee()) { |
| | | orderQueryRequest.setCityList(loginUser.getCityList()); |
| | | if (null == orderQueryRequest.getCityList() || orderQueryRequest.getCityList().isEmpty()) { |
| | | orderQueryRequest.setCityList(loginUser.getCityList()); |
| | | } else { |
| | | orderQueryRequest.getCityList().addAll(loginUser.getCityList()); |
| | | } |
| | | } |
| | | List<Integer> servIds = new ArrayList<>(); |
| | | if (orderQueryRequest.getClassNameId()!=null){ |
| | | List<Integer> classIds = recoveryClassifyService.lambdaQuery().eq(RecoveryClassify::getId, orderQueryRequest.getClassNameId()).list().stream().map(RecoveryClassify::getId).collect(Collectors.toList()); |
| | | servIds = recoveryServeService.lambdaQuery().eq(BaseEntity::getIsDelete,0).in(RecoveryServe::getClassifyId, classIds).list().stream().map(RecoveryServe::getId).collect(Collectors.toList()); |
| | | } |
| | | orderQueryRequest.setServIds(servIds); |
| | | Page<Order> data = orderClient.queryPage(orderQueryRequest).getData(); |
| | | if (null != data) { |
| | | for (Order record : data.getRecords()) { |
| | |
| | | record.setServerName(masterWorker.getRealName()); |
| | | record.setServerPhone(masterWorker.getPhone()); |
| | | } |
| | | if (record.getAddress()!=null) { |
| | | record.setReservationAddress(record.getReservationAddress() + record.getAddress()); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(data); |
| | |
| | | /** |
| | | * 订单列表 |
| | | */ |
| | | @RequiresPermissions("order_list") |
| | | @ApiOperation(value = "订单列表-各订单数量统计", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/orderPageCount") |
| | | public R<OrderPageCountVO> orderPageCount(@RequestBody OrderQueryRequest orderQueryRequest) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | if (null == loginUser) { |
| | | return R.loginExpire("登录失效!"); |
| | | } |
| | | if (loginUser.getIsFranchisee()) { |
| | | if (null == orderQueryRequest.getCityList() || orderQueryRequest.getCityList().isEmpty()) { |
| | | orderQueryRequest.setCityList(loginUser.getCityList()); |
| | | } else { |
| | | orderQueryRequest.getCityList().addAll(loginUser.getCityList()); |
| | | } |
| | | } |
| | | List<Integer> servIds = new ArrayList<>(); |
| | | if (orderQueryRequest.getClassNameId()!=null){ |
| | | List<Integer> classIds = recoveryClassifyService.lambdaQuery().eq(RecoveryClassify::getId, orderQueryRequest.getClassNameId()).list().stream().map(RecoveryClassify::getId).collect(Collectors.toList()); |
| | | servIds = recoveryServeService.lambdaQuery().eq(BaseEntity::getIsDelete,0).in(RecoveryServe::getClassifyId, classIds).list().stream().map(RecoveryServe::getId).collect(Collectors.toList()); |
| | | } |
| | | orderQueryRequest.setServIds(servIds); |
| | | |
| | | return R.ok(orderClient.orderPageCount(orderQueryRequest).getData()); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param id 订单id |
| | | */ |
| | | @RequiresPermissions("order_detail") |
| | | @ApiOperation(value = "订单列表-订单详情", tags = {"后台-订单管理"}) |
| | | @GetMapping(value = "/detail") |
| | | @ApiImplicitParams({ |
| | |
| | | return R.ok(orderClient.detail(id).getData()); |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private RecoveryServePriceService recoveryServePriceService; |
| | | /** |
| | | * 新增订单 |
| | | * 后台订单为指定订单,默认为待上门状态 |
| | | * |
| | | * @param order 站点信息 |
| | | */ |
| | | @RequiresPermissions("order_save") |
| | | @ApiOperation(value = "订单列表-新增订单", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/save") |
| | | public R<String> save(@RequestBody OrderRequest order) { |
| | |
| | | RecoveryServe recoveryServe = recoveryServeService.lambdaQuery() |
| | | .eq(RecoveryServe::getId, order.getServeId()) |
| | | .eq(RecoveryServe::getIsDelete, 0).one(); |
| | | |
| | | order.setServeName(recoveryServe.getServeName()); |
| | | order.setServePrice(recoveryServe.getDefaultPrice()); |
| | | order.setOrderMoney(recoveryServe.getDefaultPrice()); |
| | | RecoveryServePrice one = recoveryServePriceService.lambdaQuery().eq(RecoveryServePrice::getCity, order.getCityCode()).eq(RecoveryServePrice::getRecoveryServeId, order.getServeId()).eq(BaseEntity::getIsDelete, 0).one(); |
| | | if (one==null) { |
| | | order.setOrderMoney(recoveryServe.getDefaultPrice()); |
| | | }else { |
| | | order.setOrderMoney(one.getRecoveryPrice()); |
| | | } |
| | | Boolean data = orderClient.save(order).getData(); |
| | | if (null == data) { |
| | | return R.fail(orderClient.save(order).getMsg()); |
| | | } |
| | | try { |
| | | WebSocketServer.sendInfo("您有一条新的订单,请注意查收!", String.valueOf(order.getServerId())); |
| | | } catch (IOException e) { |
| | | return R.fail("订单推送失败!"); |
| | | System.out.println("服务人员id:" + order.getServerId()); |
| | | ChannelHandlerContext context = NettyChannelMap.getData(String.valueOf(order.getServerId())); |
| | | System.out.println("socket连接信息:" + context); |
| | | if (null != context) { |
| | | System.out.println("服务端发送消息到: " + order.getServerId()); |
| | | NettyWebSocketController.sendMsgToClient(context, "您有一条新的订单,请注意查收!"); |
| | | } |
| | | return data ? R.ok() : R.fail(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // @RequiresPermissions({"reassignment_edit","order_edit"}) |
| | | |
| | | @ApiOperation(value = "订单列表-编辑", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/edit") |
| | | public R<String> edit(@RequestBody OrderRequest order) { |
| | | // 站点信息 |
| | | Site site = siteService.lambdaQuery() |
| | | .eq(Site::getId, order.getSiteId()) |
| | | .eq(Site::getIsDelete, 0).one(); |
| | | if (null != site) { |
| | | order.setSiteName(site.getSiteName()); |
| | | } |
| | | |
| | | // 师傅信息 |
| | | if (null != order.getServerId()) { |
| | | MasterWorker masterWorker = masterWorkerService.lambdaQuery() |
| | | .eq(MasterWorker::getId, order.getServerId()) |
| | | .eq(MasterWorker::getIsDelete, 0).one(); |
| | | order.setServerName(masterWorker.getRealName()); |
| | | order.setServerPhone(masterWorker.getPhone()); |
| | | } else { |
| | | // 待派单状态 |
| | | order.setState(Constants.ZERO); |
| | | } |
| | | RecoveryServe recoveryServe = recoveryServeService.lambdaQuery() |
| | | .eq(RecoveryServe::getId, order.getServeId()) |
| | | .eq(RecoveryServe::getIsDelete, 0).one(); |
| | | RecoveryServePrice one = recoveryServePriceService.lambdaQuery().eq(RecoveryServePrice::getCity, order.getCityCode()).eq(RecoveryServePrice::getRecoveryServeId, order.getServeId()).eq(BaseEntity::getIsDelete, 0).last("limit 1").one(); |
| | | if (one==null) { |
| | | order.setOrderMoney(recoveryServe.getDefaultPrice()); |
| | | }else { |
| | | order.setOrderMoney(one.getRecoveryPrice()); |
| | | } |
| | | order.setServeName(recoveryServe.getServeName()); |
| | | // 后台订单 |
| | | order.setType(Constants.ONE); |
| | | Boolean data = orderClient.edit(order).getData(); |
| | | |
| | | System.out.println("服务人员id:" + order.getServerId()); |
| | | ChannelHandlerContext context = NettyChannelMap.getData(String.valueOf(order.getServerId())); |
| | | System.out.println("socket连接信息:" + context); |
| | | if (null != context) { |
| | | System.out.println("服务端发送消息到: " + order.getServerId()); |
| | | NettyWebSocketController.sendMsgToClient(context, "您有一条新的订单,请注意查收!"); |
| | | } |
| | | return data ? R.ok() : R.fail(); |
| | | |
| | | } |
| | | /** |
| | | * 订单派单/改派 |
| | | * |
| | | * @param type 1:订单派单;2:订单改派 |
| | | */ |
| | | @RequiresPermissions("order_reassignment") |
| | | @ApiOperation(value = "订单列表-订单派单/改派", tags = {"后台-订单管理"}) |
| | | @GetMapping(value = "/reassignment") |
| | | @ApiImplicitParams({ |
| | |
| | | @ApiImplicitParam(value = "改派原因", name = "applyReason", dataType = "String") |
| | | }) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R<String> reassignment(@RequestParam Integer type, @RequestParam String orderId, |
| | | public R<String> reassignment(@RequestParam Integer type, @RequestParam String orderIds, |
| | | @RequestParam Integer workerId, String applyReason) { |
| | | String[] split = orderIds.split(","); |
| | | for (String orderId : split) { |
| | | |
| | | MasterWorker masterWorker = masterWorkerService.lambdaQuery() |
| | | .eq(MasterWorker::getId, workerId) |
| | | .eq(MasterWorker::getIsDelete, 0).one(); |
| | |
| | | changeDispatch.setIsDelete(Constants.ZERO); |
| | | result = dispatchClient.saveRecord(changeDispatch).getData(); |
| | | } |
| | | try { |
| | | WebSocketServer.sendInfo("您有一条新的订单,请注意查收!", String.valueOf(workerId)); |
| | | } catch (IOException e) { |
| | | return R.fail("订单推送失败!"); |
| | | ChannelHandlerContext context = NettyChannelMap.getData(String.valueOf(workerId)); |
| | | if (null != context) { |
| | | NettyWebSocketController.sendMsgToClient(context, "您有一条新的订单,请注意查收!"); |
| | | } |
| | | return result ? R.ok() : R.fail(); |
| | | // try { |
| | | // WebSocketServer.sendInfo("您有一条新的订单,请注意查收!", String.valueOf(workerId)); |
| | | // } catch (IOException e) { |
| | | // return R.fail("订单推送失败!"); |
| | | // } |
| | | } |
| | | |
| | | return R.ok() ; |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @param ids 站点多条id拼接 |
| | | */ |
| | | @RequiresPermissions("order_delete") |
| | | @ApiOperation(value = "订单列表-批量删除订单", tags = {"后台-订单管理"}) |
| | | @GetMapping(value = "/batchDelete") |
| | | @ApiImplicitParams({ |
| | |
| | | return R.ok(orderClient.batchDelete(ids).getData()); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单列表-excel导出 |
| | | * |
| | | * @param orderQueryRequest 筛选参数 |
| | | */ |
| | | @RequiresPermissions("order_export") |
| | | @ApiOperation(value = "订单列表-excel导出", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/excelExport") |
| | | public R<String> excelExport(@RequestBody OrderQueryRequest orderQueryRequest, HttpServletResponse response) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 旧数据迁移 |
| | | * |
| | | * @param index 权限 |
| | | */ |
| | | @ApiOperation(value = "旧数据迁移", tags = {"后台-首页"}) |
| | | @GetMapping(value = "/oldData") |
| | | public R<String> oldData(@RequestParam Integer index, @RequestParam("pageNum") Integer pageNum, |
| | | @RequestParam("pageSize") Integer pageSize) { |
| | | return orderClient.oldData(index, pageNum, pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "ocr识别", tags = {"后台-首页"}) |
| | | @PostMapping (value = "/ocr") |
| | | public R<JSONObject> ocr(String ocrAddress) { |
| | | return R.ok(DescribeInstances.ocr(ocrAddress)); |
| | | } |
| | | |
| | | /** |
| | | * 订单列表-excel导出 |
| | | * |
| | | * @param name 师傅姓名 |
| | | * @param phone 师傅电话 |
| | | */ |
| | | @RequiresPermissions("order_count") |
| | | @ApiOperation(value = "订单统计", tags = {"后台-订单管理"}) |
| | | @GetMapping(value = "/orderCount") |
| | | @ApiImplicitParams({ |
| | |
| | | public R<Page<OrderCountVO>> orderCount(String name, String phone, |
| | | @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum, |
| | | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) { |
| | | Page<OrderCountVO> data = orderClient.orderCount(name, phone, pageNum, pageSize).getData(); |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | if (null == loginUser) { |
| | | return R.loginExpire("登录失效!"); |
| | | } |
| | | List<String> cityList = new ArrayList<>(); |
| | | if (loginUser.getIsFranchisee()) { |
| | | cityList = loginUser.getCityList(); |
| | | } |
| | | // 查询参数 |
| | | OrderCountDataRequest orderCountDataRequest = new OrderCountDataRequest(); |
| | | orderCountDataRequest.setWorkerName(name); |
| | | orderCountDataRequest.setWorkerPhone(phone); |
| | | orderCountDataRequest.setCityList(cityList); |
| | | orderCountDataRequest.setPageNum(pageNum); |
| | | orderCountDataRequest.setPageSize(pageSize); |
| | | // 远程调用 |
| | | Page<OrderCountVO> data = orderClient.orderCount(orderCountDataRequest).getData(); |
| | | List<Integer> idList = data.getRecords().stream().map(OrderCountVO::getWorkerId) |
| | | .collect(Collectors.toList()); |
| | | List<MasterWorker> masterWorkerList; |
| | |
| | | masterWorkerList = masterWorkerService.lambdaQuery() |
| | | .eq(MasterWorker::getIsDelete, 0).list(); |
| | | } |
| | | // 师傅头像列表 |
| | | Map<Integer, String> profilePictureMap = masterWorkerList.stream().collect(Collectors.toMap(MasterWorker::getId, |
| | | mw -> Optional.ofNullable(mw.getProfilePicture()).orElse(""))); |
| | | // 师傅姓名 |
| | | Map<Integer, String> realNameMap = masterWorkerList.stream().collect(Collectors.toMap(MasterWorker::getId, |
| | | mw -> Optional.ofNullable(mw.getRealName()).orElse(""))); |
| | | for (OrderCountVO record : data.getRecords()) { |
| | |
| | | return R.ok(data); |
| | | } |
| | | |
| | | @ApiOperation(value = "打印计数", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/print") |
| | | public R print(@RequestParam Long id) { |
| | | |
| | | orderClient.count(String.valueOf(id)); |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "打印入库单子", tags = {"后台-订单管理"}) |
| | | @PostMapping(value = "/paperCount") |
| | | public R paperCount(@RequestParam Integer id,@RequestParam String date) { |
| | | R<List<PaperInVo>> papercount = orderClient.papercount(String.valueOf(id),date); |
| | | for (PaperInVo datum : papercount.getData()) { |
| | | datum.setName(recoveryServeService.getById(datum.getServeId()).getServeName()); |
| | | } |
| | | PrintDto printDto =new PrintDto(); |
| | | printDto.setName(masterWorkerService.getById(id).getRealName()); |
| | | printDto.setPapers(papercount.getData()); |
| | | printDto.setDate(date); |
| | | return R.ok(printDto); |
| | | } |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | @ApiOperation(value = "地图统计", tags = {"后台-订单管理-地图统计"}) |
| | | @PostMapping(value = "/map/works") |
| | | public R<List<MasterWorker>> map(String cityCode) { |
| | | |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | if (null == loginUser) { |
| | | return R.loginExpire("登录失效!"); |
| | | } |
| | | if (cityCode==null) { |
| | | if (loginUser.getIsFranchisee()) { |
| | | cityCode = loginUser.getCityList().get(0); |
| | | } else { |
| | | cityCode = "420100"; |
| | | } |
| | | } |
| | | Set<Integer> workIds = redisService.getCacheSet("workerLocation:" + cityCode+":"); |
| | | if (workIds==null||workIds.isEmpty()){ |
| | | return R.ok(new ArrayList<>()); |
| | | } |
| | | List<MasterWorker> list = masterWorkerService.lambdaQuery().in(MasterWorker::getId, workIds).list(); |
| | | for (MasterWorker masterWorker : list) { |
| | | masterWorker.setLacation(redisService.getCacheObject("work:"+masterWorker.getId()+":")); |
| | | } |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @ApiOperation(value = "获师傅", tags = {"后台-订单管理-地图统计"}) |
| | | @PostMapping(value = "/map/line") |
| | | public R<List<OrderByServeRecordVO>> line(Integer id) { |
| | | R<List<Order>> workday = orderClient.workday(id); |
| | | System.out.println(workday.getData()); |
| | | List<OrderByServeRecordVO> list = new ArrayList<>(); |
| | | for (Order datum : workday.getData()) { |
| | | OrderByServeRecordVO orderByServeRecord = new OrderByServeRecordVO(); |
| | | |
| | | // String masterFolderPath = "/usr/local/coordinate/" + datum.getServerId(); |
| | | // File masterFolder = new File(masterFolderPath); |
| | | // 检查师傅ID的文件夹是否存在,存在就读取轨迹数据 |
| | | // System.out.println("文件是否存在:" + masterFolder.exists()); |
| | | // if (masterFolder.exists()) { |
| | | // 检查订单ID的JSON文件是否存在,不存在则创建 |
| | | // String jsonFilePath = masterFolderPath + "/" + datum.getId() + ".json"; |
| | | String jsonFilePath = "C:\\Users\\Admin\\Desktop\\1814257493315514369.json"; |
| | | File jsonFile = new File(jsonFilePath); |
| | | System.out.println("订单Json文件是否存在:" + jsonFile.exists()); |
| | | if (jsonFile.exists()) { |
| | | try { |
| | | String jsonContent = new String(Files.readAllBytes(Paths.get(jsonFilePath))); |
| | | System.out.println("JSON 文件内容:" + jsonContent); |
| | | List<com.alibaba.fastjson2.JSONObject> coordinate = com.alibaba.fastjson2.JSONObject.parseObject(jsonContent, List.class); |
| | | List<String> coordinateList = new ArrayList<>(); |
| | | if (null != coordinate) { |
| | | for (com.alibaba.fastjson2.JSONObject jsonObject : coordinate) { |
| | | Object s = jsonObject.get("coordinate"); |
| | | coordinateList.add(String.valueOf(s)); |
| | | } |
| | | orderByServeRecord.setCoordinate(coordinateList); |
| | | } |
| | | } catch (IOException e) { |
| | | System.out.println(e.getMessage()); |
| | | } |
| | | // } |
| | | } |
| | | list.add(orderByServeRecord); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @Resource |
| | | private RegionService regionService; |
| | | |
| | | @ApiOperation(value = "获取城市名字", tags = {"后台-订单管理-地图统计"}) |
| | | @PostMapping(value = "/map/cityName") |
| | | public R line(String cityCode) { |
| | | Region one = regionService.lambdaQuery().eq(Region::getCode, cityCode).one(); |
| | | return R.ok(one.getName(),""); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // @ApiOperation(value = "获取司机的订单路线", tags = {"后台-订单管理-地图统计"}) |
| | | // @PostMapping(value = "/map/works/line") |
| | | // public R<List<MasterWorker>> map(@RequestParam Integer workId) { |
| | | // |
| | | // |
| | | // return R.ok(list); |
| | | // } |
| | | |
| | | |
| | | |
| | | } |