| | |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverServiceService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.DistancematrixVo; |
| | | import com.stylefeng.guns.modular.system.util.GoogleMap.GoogleMapUtil; |
| | | import com.stylefeng.guns.modular.system.util.PushUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.TextToSpeechUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderTimeInfo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | OrderTimeInfo orderTimeInfo = new OrderTimeInfo(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if(null != orderLogistics.getSnatchOrderTime()){ |
| | | orderTimeInfo.setSnatchOrderTime(sdf.format(orderLogistics.getSnatchOrderTime())); |
| | | orderTimeInfo.setSnatchOrderTime(DateUtil.conversionFormat(language, sdf.format(orderLogistics.getSnatchOrderTime()))); |
| | | } |
| | | if(null != orderLogistics.getStartServiceTime()){ |
| | | orderTimeInfo.setStartServiceTime(sdf.format(orderLogistics.getStartServiceTime())); |
| | | orderTimeInfo.setStartServiceTime(DateUtil.conversionFormat(language, sdf.format(orderLogistics.getStartServiceTime()))); |
| | | } |
| | | //分钟 |
| | | long time = (System.currentTimeMillis() - orderLogistics.getSnatchOrderTime().getTime()) / 60000; |
| | |
| | | } |
| | | orderTimeInfo.setUsedTime(usedTime); |
| | | if(null != orderLogistics.getEndServiceTime()){ |
| | | orderTimeInfo.setEndServiceTime(sdf.format(orderLogistics.getEndServiceTime())); |
| | | orderTimeInfo.setEndServiceTime(DateUtil.conversionFormat(language, sdf.format(orderLogistics.getEndServiceTime()))); |
| | | }else{ |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), orderLogistics.getEndLat(), orderLogistics.getEndLon()); |
| | | Long duration = distancematrix.getDuration(); |
| | | orderTimeInfo.setEndServiceTime(DateUtil.conversionFormat(language, sdf.format(new Date(System.currentTimeMillis() + duration * 1000)))); |
| | | } |
| | | DistancematrixVo distancematrix = GoogleMapUtil.getDistancematrix(orderLogistics.getStartLat(), orderLogistics.getStartLon(), orderLogistics.getEndLat(), orderLogistics.getEndLon()); |
| | | Long distance = distancematrix.getDistance(); |