| | |
| | | baseWarpper.setName(language == 1 ? "跨城小件物流" : language == 2 ? "Cross-city small parts logistics" : "Logistique des petites pièces à travers la ville"); |
| | | break; |
| | | } |
| | | baseWarpper.setName(language == 1 ? "取消订单费用" : language == 2 ? "Cancellation fee" : "Frais d'annulation"); |
| | | List<Income> incomes = incomeService.queryData(1, 1, 3, Integer.valueOf(map.get("incomeId").toString()), Integer.valueOf(map.get("orderType").toString())); |
| | | Map<String, Object> map1 = new HashMap<>(); |
| | | |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际,4=同城小件物流)", name = "orderType", required = true, dataType = "int"), |
| | | // @ApiImplicitParam(value = "支付方式(1=OK平台收款,2=其他方式收款)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "行程费用(出租车必传)", name = "travelFee", required = false, dataType = "double"), |
| | | @ApiImplicitParam(value = "停车费", name = "parkingFee", required = false, dataType = "double"), |
| | | @ApiImplicitParam(value = "过路费", name = "crossingFee", required = false, dataType = "double"), |
| | |
| | | new Thread(()->{ |
| | | try { |
| | | fleetEngineUtil.reportBillableEvent(finalOrderLogistics.getTripId()); |
| | | log.warn("上报时间:{},tripid:{},created_at:{},completed_at:{}", System.currentTimeMillis(), finalOrderLogistics.getTripId(), |
| | | finalOrderLogistics.getInsertTime().getTime(), finalOrderLogistics.getEndServiceTime().getTime()); |
| | | log.warn("行程结束:{} {}", System.currentTimeMillis(), finalOrderLogistics.getTripId()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | if(orderPrivateCar.getArriveTime()==null){ |
| | | orderPrivateCar.setArriveTime(orderPrivateCar.getStartServiceTime()); |
| | | } |
| | | |
| | | //获取google trip_info获取轨迹线路,重新存储轨迹和计算行驶距离和时间 |
| | | |
| | | |
| | | orderPrivateCar = this.setMoney(orderPrivateCar, 0D, 0D);//计算费用 |
| | | orderPrivateCar.setPayManner(type); |
| | | orderPrivateCar.setParkMoney(null == parkingFee ? 0D : parkingFee); |
| | |
| | | try { |
| | | //上报google |
| | | fleetEngineUtil.reportBillableEvent(finalOrderPrivateCar.getTripId()); |
| | | log.warn("上报时间:{},tripid:{},created_at:{},completed_at:{}", System.currentTimeMillis(), finalOrderPrivateCar.getTripId(), |
| | | finalOrderPrivateCar.getInsertTime().getTime(), finalOrderPrivateCar.getEndServiceTime().getTime()); |
| | | log.warn("行程结束:{} {}", System.currentTimeMillis(), finalOrderPrivateCar.getTripId()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | balanceUsageRecordService.saveBalanceUsageRecord(settlementRecord.getDriverId(), 1, laveActivityMoney, settlementRecord.getType() + 2); |
| | | laveActivityMoney = 0D; |
| | | payMoney1 = new BigDecimal(payMoney1).subtract(new BigDecimal(laveActivityMoney)).setScale(2, RoundingMode.HALF_EVEN).doubleValue(); |
| | | } |
| | | |
| | | SettlementRecord settlementRecord1 = new SettlementRecord(); |
| | | BeanUtils.copyProperties(settlementRecord, settlementRecord1); |
| | | settlementRecord1.setId(null); |
| | | settlementRecord1.setPayMoney(payMoney1.doubleValue()); |
| | | settlementRecord1.setBalanceType(2); |
| | | settlementRecord1.setPayMoney(payMoney1); |
| | | settlementRecord1.setPaymentStatus(2); |
| | | settlementRecord1.setPayType(payType); |
| | | settlementRecord1.setBalanceType(1); |
| | | settlementRecord1.setPayTime(new Date()); |
| | | this.insert(settlementRecord1); |
| | | balanceUsageRecordService.saveBalanceUsageRecord(settlementRecord.getDriverId(), 2, payMoney1.doubleValue(), settlementRecord.getType() + 2); |
| | | |
| | | balanceUsageRecordService.saveBalanceUsageRecord(settlementRecord.getDriverId(), 2, payMoney1, settlementRecord.getType() + 2); |
| | | laveBusinessMoney = new BigDecimal(laveBusinessMoney).subtract(new BigDecimal(payMoney1)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | }else{ |
| | | settlementRecord.setPaymentStatus(2); |
| | | settlementRecord.setPayType(payType); |
| | | settlementRecord.setPayMoney(payMoney1); |
| | | settlementRecord.setBalanceType(2); |
| | | settlementRecord.setPayTime(new Date()); |
| | | this.updateById(settlementRecord); |
| | | balanceUsageRecordService.saveBalanceUsageRecord(settlementRecord.getDriverId(), 2, payMoney1, settlementRecord.getType() + 2); |
| | | laveBusinessMoney = new BigDecimal(laveBusinessMoney).subtract(new BigDecimal(payMoney1)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | } |
| | | } |
| | | } |
| | | driver1.setLaveBusinessMoney(laveBusinessMoney); |
| | |
| | | ORDER BY date_format(insertTime, '%Y-%m-%d') DESC |
| | | </select> |
| | | <select id="getList1" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | select |
| | | a.`date` as times, |
| | | a.driverNum, |
| | | b.duration as timeNumber |
| | | from ( |
| | | select `date`, count(driverId) as driverNum from t_driver_online where assessment = 0 group by `date` |
| | | ) as a |
| | | select aa.startTime as times, aa.driverNum, bb.duration as timeNumber from ( |
| | | select a.startTime, count(a.driverId) as driverNum from ( |
| | | select DATE_FORMAT(startTime, '%Y-%m-%d') as startTime, driverId from t_driver_work group by DATE_FORMAT(startTime, '%Y-%m-%d'), driverId |
| | | ) as a group by a.startTime |
| | | ) as aa |
| | | left join ( |
| | | select `date`, sum(duration) as duration from t_driver_online where assessment = 0 group by `date` |
| | | ) as b on (a.date = b.date) |
| | | ORDER BY a.date DESC |
| | | select DATE_FORMAT(startTime, '%Y-%m-%d') as startTime, sum(if(endTime is null, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(endTime)) - UNIX_TIMESTAMP(startTime)) as duration from t_driver_work group by DATE_FORMAT(startTime, '%Y-%m-%d') |
| | | ) as bb on (aa.startTime = bb.startTime) |
| | | ORDER BY aa.startTime DESC |
| | | </select> |
| | | <select id="getList2" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | select |
| | | CONCAT(b.firstName, ' ', b.lastName) as `name`, |
| | | a.duration as timeNumber |
| | | from t_driver_online a |
| | | from (select DATE_FORMAT(startTime, '%Y-%m-%d') as startTime, driverId, sum(if(endTime is null, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(endTime)) - UNIX_TIMESTAMP(startTime)) as duration from t_driver_work group by DATE_FORMAT(startTime, '%Y-%m-%d'), driverId) as a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | where a.assessment = 0 and DATE_FORMAT(a.`date`, '%Y-%m-%d') = #{times} |
| | | where a.startTime = #{times} |
| | | </select> |
| | | <select id="getTotal" resultType="map"> |
| | | SELECT COUNT(o.driverId) driverNum,SUM(o.timeNumber) timeNumber from (SELECT |
| | |
| | | |
| | | |
| | | <select id="queryOperationalData" resultType="map"> |
| | | |
| | | select |
| | | *, |
| | | ROUND(if(orderNum != 0, cancelNum / orderNum, 0) * 100, 2) as cancelProportion, |
| | |
| | | </if> |
| | | group by DATE_FORMAT(insertTime, '%Y-%m-%d') |
| | | union all |
| | | select DATE_FORMAT(a.date, '%Y-%m-%d') as time, 0, count(a.id) as `online`, 0 as orderNum, 0 as cancelNum, 0 as onlinePay, 0 as offlinePay, 0 as money, 0 as complaint |
| | | from t_driver_online a |
| | | select DATE_FORMAT(a.startTime, '%Y-%m-%d') as time, 0, count(a.driverId) as `online`, 0 as orderNum, 0 as cancelNum, 0 as onlinePay, 0 as offlinePay, 0 as money, 0 as complaint |
| | | from (select driverId, DATE_FORMAT(startTime, '%Y-%m-%d') as startTime from t_driver_work group by driverId, DATE_FORMAT(startTime, '%Y-%m-%d')) a |
| | | left join t_driver b on (a.driverId = b.id) |
| | | where assessment = 0 |
| | | |
| | | <if test="null != companyId"> |
| | | and if(b.franchiseeId is null or b.franchiseeId = 0, b.companyId = #{companyId}, b.franchiseeId = #{companyId}) |
| | | </if> |
| | | <if test="null != start and '' != start and null != end and '' != end"> |
| | | and DATE_FORMAT(a.date, '%Y-%m-%d') between #{start} and #{end} |
| | | and DATE_FORMAT(a.startTime, '%Y-%m-%d') between #{start} and #{end} |
| | | </if> |
| | | group by DATE_FORMAT(a.date, '%Y-%m-%d') |
| | | group by DATE_FORMAT(a.startTime, '%Y-%m-%d') |
| | | union all |
| | | <if test="1 == type"> |
| | | select DATE_FORMAT(travelTime, '%Y-%m-%d'), 0, 0, count(id), 0, 0, 0, 0, 0 from t_order_private_car where isDelete = 1 |
| | |
| | | <select id="queryDiscountInfo" resultType="map"> |
| | | select |
| | | aa.time, |
| | | aa.`name`, |
| | | aa.phone, |
| | | ANY_VALUE(aa.`name`) as name, |
| | | ANY_VALUE(aa.phone) as phone, |
| | | sum(aa.discountMoney) as discountMoney |
| | | from ( |
| | | select |
| | |
| | | <if test="null != companyId"> |
| | | and a.companyId = #{companyId} |
| | | </if> |
| | | ) as aa group by aa.time, userId order by aa.time desc |
| | | ) as aa group by aa.time, aa.userId order by aa.time desc |
| | | <if test="null != offset and null != limit"> |
| | | limit #{offset}, #{limit} |
| | | </if> |
| | |
| | | and a.companyId = #{companyId} |
| | | </if> |
| | | ) as aa group by aa.time, userId |
| | | |
| | | ) as w |
| | | </select> |
| | | </mapper> |
| | |
| | | 每周 <input type="number" min="1" max="7" class="date" value="${null != item && item.type == '2' ? item.day : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> (几)可结算 |
| | | </div> |
| | | <div class="form-group"> |
| | | 每天超过 <input type="number" min="1" max="31" id="maxPrice" value="${null != item && item.type != '1' ? item.maxPrice : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 必须结算 |
| | | 周/月日上限超过 <input type="number" min="1" max="31" id="maxPrice" value="${null != item && item.type != '1' ? item.maxPrice : ''}" style="background-color: #FFFFFF;background-image: none;border: 1px solid #e5e6e7;border-radius: 1px;color: inherit;padding: 6px 12px;"/> 必须结算 |
| | | </div> |
| | | </div> |
| | | <div class="row"> |
| | |
| | | validators: { |
| | | notEmpty: { |
| | | message: '消息内容不能为空' |
| | | }, |
| | | regexp:{ |
| | | regexp: /^.{1,20}$/, |
| | | message: '消息内容不超过20个字' |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | sort: { |
| | |
| | | import org.apache.commons.lang.StringEscapeUtils; |
| | | import org.apache.http.client.utils.URLEncodedUtils; |
| | | import org.bouncycastle.util.encoders.UrlBase64Encoder; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.StringUtils; |
| | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class OrderController { |
| | | |
| | | private Logger log = LoggerFactory.getLogger(OrderController.class); |
| | | |
| | | @Autowired |
| | | private IOrderTaxiService orderTaxiService; |
| | |
| | | } |
| | | String randomCode = UUIDUtil.getRandomCode(); |
| | | redisUtil.setStrValue("trip" + uid, randomCode); |
| | | log.warn("生成tripId:{} {}", System.currentTimeMillis(), randomCode); |
| | | return ResultUtil.success(randomCode); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | import org.jsoup.nodes.Element; |
| | | import org.jsoup.nodes.FormElement; |
| | | import org.jsoup.select.Elements; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | |
| | | |
| | | @Service |
| | | public class OrderLogisticsServiceImpl extends ServiceImpl<OrderLogisticsMapper, OrderLogistics> implements IOrderLogisticsService { |
| | | |
| | | private Logger log = LoggerFactory.getLogger(OrderLogisticsServiceImpl.class); |
| | | |
| | | @Resource |
| | | private SystemPriceMapper systemPriceMapper; |
| | |
| | | //修改行程信息 |
| | | fleetEngineUtil.updateTrip("CANCELED", null, null, orderLogistics.getTripId(), null, null, null, null); |
| | | } |
| | | |
| | | log.warn("取消订单:{} {}", System.currentTimeMillis(), orderLogistics.getTrackId()); |
| | | //添加消息 |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功取消包裹订单,谢谢使用!" : language == 2 ? "You've cancelled the delivery order successfully, thank you for using I-GO " |
| | | : "Vous avez annulé la commande de livraison avec succès, merci d’utiliser I-GO", orderLogistics.getUserId(), 1); |
| | |
| | | import org.jsoup.nodes.Document; |
| | | import org.jsoup.nodes.Element; |
| | | import org.jsoup.select.Elements; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | |
| | | |
| | | @Service |
| | | public class OrderPrivateCarServiceImpl extends ServiceImpl<OrderPrivateCarMapper, OrderPrivateCar> implements IOrderPrivateCarService { |
| | | |
| | | private Logger log = LoggerFactory.getLogger(OrderPrivateCarServiceImpl.class); |
| | | |
| | | @Resource |
| | | private OrderPrivateCarMapper orderPrivateCarMapper; |
| | |
| | | if((orderPrivateCar.getState() == 10 || orderPrivateCar.getState() == 12) && null != orderPrivateCar.getDriverId()){ |
| | | fleetEngineUtil.updateTrip("CANCELED", null, null, orderPrivateCar.getTripId(), null, null, null, null); |
| | | } |
| | | |
| | | log.warn("取消订单:{} {}", System.currentTimeMillis(), orderPrivateCar.getTrackId()); |
| | | //添加消息 |
| | | systemNoticeService.addSystemNotice(1, language == 1 ? "您已成功取消出行订单,谢谢使用!" : language == 2 ? "You've cancelled the ride order successfully, thank you for using I-GO " : "Vous avez annulé la commande de course avec succès, merci d’utiliser I-GO", orderPrivateCar.getUserId(), 1); |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | userRedPacketRecord.setEndTime(new Date()); |
| | | userRedPacketRecord.setState(2); |
| | | multiply1 = multiply1.subtract(remainingAmount).setScale(2, RoundingMode.HALF_EVEN); |
| | | jsonObject.put("money", remainingAmount); |
| | | jsonObject.put("money", remainingAmount.setScale(2, RoundingMode.HALF_EVEN)); |
| | | jsonArray.add(jsonObject); |
| | | }else if(remainingAmount.compareTo(multiply1) > 0){ |
| | | userRedPacketRecord.setRemainingAmount(remainingAmount.subtract(multiply1).setScale(2, RoundingMode.HALF_EVEN).doubleValue()); |
| | | jsonObject.put("money", multiply1); |
| | | jsonObject.put("money", multiply1.setScale(2, RoundingMode.HALF_EVEN)); |
| | | jsonArray.add(jsonObject); |
| | | multiply1 = BigDecimal.ZERO; |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public static String getRandomCode(Integer num) throws Exception{ |
| | | public static String getRandomCode(Integer num) { |
| | | String str = null; |
| | | if(0 < num){ |
| | | if(num % 32 > 0){ |
| | |
| | | str = UUIDUtil.getRandomCode().substring(0, num); |
| | | } |
| | | }else{ |
| | | throw new Exception("参数只能大于0"); |
| | | return ""; |
| | | } |
| | | return str; |
| | | } |