| | |
| | | <div> |
| | | <div style="float: left;"> |
| | | <label class="lab checked" onclick="checkedLable(this)" tag="pushOrderSettings">推单设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="driverPayDays">司机分账账期设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="driverPayDays">司机分账账期设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="cancelOrderSettings">取消订单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="cancelTheReservationOrderSetting">预约单取消设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="spellOrderSetting">拼单派单设置</label>--> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="timeoutDeductionSettings">超时扣款设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="spellOrderSetting">拼单派单设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="timeoutDeductionSettings">超时扣款设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="reassigningSet">改派设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="faceRecognitionSettings">人脸识别设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="faceRecognitionSettings">人脸识别设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="integralSet">积分设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="withdrawalFeeSetting">提现手续费设置</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="withdrawalFeeSetting">提现手续费设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="phoneSettings">电话设置</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="holidayServiceFeeSetting">节假日服务费设置</label> |
| | | <!-- <label class="lab" onclick="checkedLable(this)" tag="95128TheOnCall">95128电召</label>--> |
| | | <label class="lab" onclick="checkedLable(this)" tag="95128TheOnCall">95128电召</label> |
| | | <label class="lab" onclick="checkedLable(this)" tag="moduleManagement">模块管理</label> |
| | | </div> |
| | | <div style="float: left;width: 1200px;margin-left: 50px;"> |
| | |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/openApiClient-1.0.0.jar</systemPath> |
| | | </dependency> |
| | | <!--单点登录sdk--> |
| | | <dependency> |
| | | <groupId>com.cas</groupId> |
| | | <artifactId>cas-client-oncon</artifactId> |
| | | <version>3.0.5</version> |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/cas-client-oncon-3.0.5.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.cas</groupId> |
| | | <artifactId>cas-client-oncon-core</artifactId> |
| | | <version>1.2.2</version> |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/cas-client-oncon-core-1.2.2.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-httpclient</groupId> |
| | | <artifactId>commons-httpclient</artifactId> |
| | |
| | | package com.stylefeng.guns.modular.CharteredCar.server.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.CharteredCar.dao.OrderCharteredCarMapper; |
| | | import com.stylefeng.guns.modular.CharteredCar.model.OrderCharteredCar; |
| | | import com.stylefeng.guns.modular.CharteredCar.server.IOrderCharteredCarService; |
| | | import com.stylefeng.guns.modular.account.controller.AppOrderController; |
| | | import com.stylefeng.guns.modular.api.OrderController; |
| | | import com.stylefeng.guns.modular.crossCity.dao.OrderCrossCityMapper; |
| | | import com.stylefeng.guns.modular.crossCity.model.OrderCrossCity; |
| | | import com.stylefeng.guns.modular.specialTrain.dao.OrderPrivateCarMapper; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.system.dao.SensitiveWordsMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.Company; |
| | | import com.stylefeng.guns.modular.system.model.OrderCancel; |
| | | import com.stylefeng.guns.modular.system.model.SensitiveWords; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | |
| | | |
| | | @Autowired |
| | | private IPaymentRecordService paymentRecordService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | |
| | | } |
| | | |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("companyId", orderCharteredCar.getCompanyId())); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (money.intValue() * query1.getIntegral()));//积分 |
| | | // OpenCity openCity = openCityService.openCity1(orderCharteredCar.getStartLon().toString(), orderCharteredCar.getStartLat().toString()); |
| | | // SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("openCityId", openCity.getId())); |
| | | // userInfo.setIntegral(userInfo.getIntegral() + (money.intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(uid, "包车-感谢费", money, 2, 1, 1, 6, orderId); |
| | |
| | | paymentRecordService.updateById(query); |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(orderCharteredCar.getUserId()); |
| | | SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("companyId", orderCharteredCar.getCompanyId())); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | // OpenCity openCity = openCityService.openCity1(orderCharteredCar.getStartLon().toString(), orderCharteredCar.getStartLat().toString()); |
| | | // SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("openCityId", openCity.getId())); |
| | | // userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(userInfo.getId(), "包车-感谢费", query.getAmount(), 2, 1, 1, 6, orderId); |
| | | userInfoService.updateById(userInfo); |
| | |
| | | |
| | | @Autowired |
| | | private IOrderService orderService; |
| | | |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | @Autowired |
| | | private WeChatUtil weChatUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderPrivateCarService orderPrivateCarService; |
| | | |
| | | |
| | | @Autowired |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | |
| | | @Autowired |
| | | private IComplaintService complaintService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderEvaluateService orderEvaluateService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderCrossCityService orderCrossCityService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Resource |
| | | private ISystemPriceCityService systemPriceCityService; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | if(orderPrivateCar.getState()>1){ |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | System.out.println("参数:"+orderPrivateCar.getCompanyId()+"|"+orderPrivateCar.getServerCarModelId()); |
| | | System.out.println("query1:"+query1); |
| | | if(orderPrivateCar.getState()>1) { |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()); |
| | | String provinceCode = geocode.get("provinceCode"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | String districtCode = geocode.get("districtCode"); |
| | | //获取匹配的城市价格配置 |
| | | SystemPriceCity systemPriceCity = systemPriceCityService.queryOne(provinceCode, cityCode, districtCode); |
| | | if (null == systemPriceCity) { |
| | | return ResultUtil.error("请先配置价格规则"); |
| | | } |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId(), systemPriceCity.getId()); |
| | | System.out.println("参数:" + orderPrivateCar.getCompanyId() + "|" + orderPrivateCar.getServerCarModelId()); |
| | | System.out.println("query1:" + query1); |
| | | //开始根据不同的方式计算金额 |
| | | if(query1!=null){ |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString());//等待费 |
| | | JSONObject contentPutOne = JSON.parseObject(query1.get("contentPutOne").toString());//一人拼成 |
| | | JSONObject contentNotOne = JSON.parseObject(query1.get("contentNotOne").toString());//一人未拼成 |
| | | JSONObject contentPutTwo = JSON.parseObject(query1.get("contentPutTwo").toString());//2人拼成 |
| | | JSONObject contentNotTwo = JSON.parseObject(query1.get("contentNotTwo").toString());//2人未拼成 |
| | | JSONObject contentPutThree = JSON.parseObject(query1.get("contentPutThree").toString());//3人拼成 |
| | | if (query1 != null) { |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString());//等待费 |
| | | JSONObject contentPutOne = JSON.parseObject(query1.get("contentPutOne").toString());//一人拼成 |
| | | JSONObject contentNotOne = JSON.parseObject(query1.get("contentNotOne").toString());//一人未拼成 |
| | | JSONObject contentPutTwo = JSON.parseObject(query1.get("contentPutTwo").toString());//2人拼成 |
| | | JSONObject contentNotTwo = JSON.parseObject(query1.get("contentNotTwo").toString());//2人未拼成 |
| | | JSONObject contentPutThree = JSON.parseObject(query1.get("contentPutThree").toString());//3人拼成 |
| | | JSONObject contentNotThree = JSON.parseObject(query1.get("contentNotThree").toString());//3人未拼成 |
| | | JSONObject contentExclusive = JSON.parseObject(query1.get("contentExclusive").toString());//独享 |
| | | JSONObject contentPrice = JSON.parseObject(query1.get("contentPrice").toString());//一口价 |
| | |
| | | import com.stylefeng.guns.modular.call.dao.OrderCallMapper; |
| | | import com.stylefeng.guns.modular.call.model.OrderCall; |
| | | import com.stylefeng.guns.modular.call.server.IOrderCallService; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.model.SysIntegral; |
| | | import com.stylefeng.guns.modular.system.model.UserInfo; |
| | | import com.stylefeng.guns.modular.system.service.IIncomeService; |
| | | import com.stylefeng.guns.modular.system.service.ISysIntegralService; |
| | | import com.stylefeng.guns.modular.system.service.ISystemNoticeService; |
| | | import com.stylefeng.guns.modular.system.service.IUserInfoService; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.PayMoneyUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | |
| | | |
| | | @Autowired |
| | | private ISysIntegralService sysIntegralService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | |
| | | |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("companyId", orderCall.getCompanyId())); |
| | | OpenCity openCity = openCityService.openCity1(orderCall.getStartLon().toString(), orderCall.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("openCityId", openCity.getId())); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (money.intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | |
| | | paymentRecordService.updateById(query); |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(orderCall.getUserId()); |
| | | SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("companyId", orderCall.getCompanyId())); |
| | | OpenCity openCity = openCityService.openCity1(orderCall.getStartLon().toString(), orderCall.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralService.selectOne(new EntityWrapper<SysIntegral>().eq("openCityId", openCity.getId())); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | //添加交易明细 |
| | | transactionDetailsService.saveData(userInfo.getId(), "助老模式-感谢费", query.getAmount(), 2, 1, 1, 7, orderId); |
| | |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.CouponWarpper; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Api("新增2.0") |
| | | @RestController |
| | |
| | | |
| | | @Autowired |
| | | private ICompanyService companyService; |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | |
| | | |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/newlyAdded/getShowModular") |
| | | @ApiOperation(value = "获取显示模块设置", tags = {"用户端-2.0新增"}, notes = "") |
| | | @ApiOperation(value = "获取显示模块设置(黔云通)", tags = {"用户端-2.0新增"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "当前经度", name = "lon", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "当前纬度", name = "lon", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<List<TbShowModular>> getShowModular(HttpServletRequest request){ |
| | | public ResultUtil<List<TbShowModular>> getShowModular(String lon, String lat, HttpServletRequest request){ |
| | | try { |
| | | // Integer uid = userInfoService.getUserIdFormRedis(request); |
| | | // if(null == uid){ |
| | | // return ResultUtil.tokenErr(); |
| | | // } |
| | | return ResultUtil.success(showModularService.selectList(null)); |
| | | OpenCity openCity = openCityService.openCity1(lon, lat); |
| | | return ResultUtil.success(showModularService.selectList(new EntityWrapper<TbShowModular>().eq("openCityId",openCity.getId()))); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | Double price1 = 0D; |
| | | Double price2 = 0D; |
| | | if(type == 4){//同城 |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, null); |
| | | if(null == query1){ |
| | | return ResultUtil.error("请先完善价格设定"); |
| | | } |
| | |
| | | price1 = jsonObject.getDouble("num2"); |
| | | price2 = jsonObject.getDouble("num13"); |
| | | }else{ |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, null); |
| | | if(null == query1){ |
| | | return ResultUtil.error("请先完善价格设定"); |
| | | } |
| | |
| | | // TODO: 2023/11/4 无法修改 |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(startLon + "," + startLat, location, 1); |
| | | double distance1 = new BigDecimal(distance.get("distance")).divide(new BigDecimal(1000)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue(); |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, null); |
| | | if(null != query1){ |
| | | if(type == 4){ |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString()); |
| | |
| | | Double price1 = 0D; |
| | | Double price2 = 0D; |
| | | if(type == 4){//同城 |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, null); |
| | | // TODO: 2023/11/4 已优化 |
| | | if(null == dist){ |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(startLon + "," + startLat, endLon + "," + endLat, 1); |
| | |
| | | price2 = jsonObject.getDouble("num22"); |
| | | } |
| | | }else{ |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null); |
| | | Map<String, Object> query1 = systemPriceMapper.query(query.getId(), type, null, null); |
| | | String content = String.valueOf(query1.get("content")); |
| | | JSONObject jsonObject = JSON.parseObject(content); |
| | | price1 = jsonObject.getDouble("num1"); |
| | |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | integers = JSON.parseArray(vehicle).toJavaList(Integer.class); |
| | | } |
| | | Company query = companyCityService.query(String.valueOf(orderLogistics.getStartLon()), String.valueOf(orderLogistics.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//用专车的推单配置 |
| | | for(int i = 1; i <= querys.size(); i++){ |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, openCity.getId());//用专车的推单配置 |
| | | for(int i = 1; i <= querys.size() + 5; i++){ |
| | | // OrderLogistics orderLogistics = orderLogisticsMapper.selectById(id); |
| | | // if (null == orderLogistics || orderLogistics.getState() > 1) { |
| | | // break; |
| | | // } |
| | | PushOrder pushOrder = pushOrderService.querys(i, 1, query.getId()).get(0); |
| | | int finalI = i; |
| | | PushOrder pushOrder = querys.stream().filter(s -> s.getType() == (finalI <= 3 ? finalI : 3)).findFirst().orElse(null); |
| | | |
| | | int i2 = pushOrder.getPushTime() / 10; |
| | | if(i2==0){ |
| | |
| | | orderIds.remove(orderLogistics.getId()); |
| | | return; |
| | | } |
| | | if (i == querys.size() && state == 1) { |
| | | if (i == querys.size() + 5 && state == 1) { |
| | | orderIds.remove(orderLogistics.getId()); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(orderMoney)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | |
| | | // } |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(orderMoney)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | |
| | | |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(orderMoney)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (orderMoney.intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | |
| | | this.updateById(orderLogistics); |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(orderLogistics.getUserId()); |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | userInfoService.updateById(userInfo); |
| | | |
| | |
| | | orderLogisticsSpreadService.updateById(orderLogisticsSpread); |
| | | |
| | | UserInfo userInfo = userInfoService.selectById(orderLogistics.getUserId()); |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | userInfoService.updateById(userInfo); |
| | | |
| | |
| | | |
| | | userInfo.setBalance(new BigDecimal(userInfo.getBalance()).subtract(new BigDecimal(money)).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (money.intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | |
| | | query.setState(2); |
| | | query.setCode(order_id); |
| | | paymentRecordService.updateById(query); |
| | | |
| | | SysIntegral query1 = sysIntegralMapper.query(orderLogistics.getCompanyId()); |
| | | |
| | | OpenCity openCity = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | |
| | | //添加交易明细 |
| | |
| | | * @return |
| | | */ |
| | | CancleOrder query(@Param("type") Integer type, @Param("orderType") Integer orderType, |
| | | @Param("companyId") Integer companyId); |
| | | @Param("openCityId") Integer openCityId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<PushOrder> querys(@Param("type") Integer type, @Param("pushType") Integer pushType, |
| | | @Param("companyId") Integer companyId); |
| | | @Param("openCityId") Integer openCityId); |
| | | } |
| | |
| | | |
| | | public interface SysIntegralMapper extends BaseMapper<SysIntegral> { |
| | | |
| | | SysIntegral query(@Param("companyId") Integer companyId); |
| | | SysIntegral query(@Param("openCityId") Integer openCityId); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.SystemPriceCity; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/7/26 9:24 |
| | | */ |
| | | public interface SystemPriceCityMapper extends BaseMapper<SystemPriceCity> { |
| | | } |
| | |
| | | |
| | | /** |
| | | * 获取价格 |
| | | * |
| | | * @param companyId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Map<String, Object> query(@Param("companyId") Integer companyId, @Param("type") Integer type, |
| | | @Param("serverCarModelId") Integer serverCarModelId); |
| | | @Param("serverCarModelId") Integer serverCarModelId, @Param("systemPriceCityId") Integer systemPriceCityId); |
| | | } |
| | |
| | | money as money, |
| | | `type` as `type`, |
| | | orderType as orderType |
| | | from t_sys_cancle_order where `type` = #{type} and orderType = #{orderType} and companyId = #{companyId} |
| | | from t_sys_cancle_order where `type` = #{type} and orderType = #{orderType} and openCityId = #{openCityId} |
| | | </select> |
| | | </mapper> |
| | |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.PushOrder"> |
| | | <id column="id" property="id"/> |
| | | <result column="companyId" property="companyId"/> |
| | | <result column="openCityId" property="openCityId"/> |
| | | <result column="pushDistance" property="pushDistance"/> |
| | | <result column="pushTime" property="pushTime"/> |
| | | <result column="driverProportion" property="driverProportion"/> |
| | |
| | | select |
| | | id as id, |
| | | companyId as companyId, |
| | | openCityId as openCityId, |
| | | pushDistance as pushDistance, |
| | | pushTime as pushTime, |
| | | driverProportion as driverProportion, |
| | | `type` as `type`, |
| | | pushType as pushType |
| | | from t_sys_push_order where companyId = #{companyId} |
| | | from t_sys_push_order where openCityId = #{openCityId} |
| | | <if test="null != type"> |
| | | and `type` = #{type} |
| | | </if> |
| | |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.SysIntegral"> |
| | | <id column="id" property="id" /> |
| | | <result column="companyId" property="companyId" /> |
| | | <result column="openCityId" property="openCityId" /> |
| | | <result column="integral" property="integral" /> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="query" resultType="SysIntegral"> |
| | | select * from t_sys_integral where companyId = #{companyId} |
| | | select * from t_sys_integral where openCityId = #{openCityId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.SystemPriceCityMapper"> |
| | | |
| | | </mapper> |
| | |
| | | <if test="null != serverCarModelId"> |
| | | and serverCarModelId = #{serverCarModelId} |
| | | </if> |
| | | <if test="null != systemPriceCityId"> |
| | | and systemPriceCityId = #{systemPriceCityId} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | */ |
| | | @TableName("t_sys_cancle_order") |
| | | public class CancleOrder { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 时间(分钟) |
| | | */ |
| | | @TableField("minuteNum") |
| | | private Integer minuteNum; |
| | | /** |
| | | * 金额 |
| | | */ |
| | | @TableField("money") |
| | | private Double money; |
| | | /** |
| | | * 类型(1=取消,2=预约取消) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 订单类型(1=专车,2=出租车) |
| | | */ |
| | | @TableField("orderType") |
| | | private Integer orderType; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getMinuteNum() { |
| | | return minuteNum; |
| | | } |
| | | |
| | | public void setMinuteNum(Integer minuteNum) { |
| | | this.minuteNum = minuteNum; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(Double money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getOrderType() { |
| | | return orderType; |
| | | } |
| | | |
| | | public void setOrderType(Integer orderType) { |
| | | this.orderType = orderType; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CancleOrder{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", minuteNum=" + minuteNum + |
| | | ", money=" + money + |
| | | ", type=" + type + |
| | | ", orderType=" + orderType + |
| | | '}'; |
| | | } |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 时间(分钟) |
| | | */ |
| | | @TableField("minuteNum") |
| | | private Integer minuteNum; |
| | | /** |
| | | * 金额 |
| | | */ |
| | | @TableField("money") |
| | | private Double money; |
| | | /** |
| | | * 类型(1=取消,2=预约取消) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 订单类型(1=专车,2=出租车) |
| | | */ |
| | | @TableField("orderType") |
| | | private Integer orderType; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | public Integer getMinuteNum() { |
| | | return minuteNum; |
| | | } |
| | | |
| | | public void setMinuteNum(Integer minuteNum) { |
| | | this.minuteNum = minuteNum; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(Double money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getOrderType() { |
| | | return orderType; |
| | | } |
| | | |
| | | public void setOrderType(Integer orderType) { |
| | | this.orderType = orderType; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "CancleOrder{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", minuteNum=" + minuteNum + |
| | | ", money=" + money + |
| | | ", type=" + type + |
| | | ", orderType=" + orderType + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableName("t_phone") |
| | | public class Phone { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 数据类型(1:报警电话,2:投诉电话) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 是否是平台数据(1=是,2=否) |
| | | */ |
| | | @TableField("platform") |
| | | private Integer platform; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | @TableField("phone") |
| | | private String phone; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getPlatform() { |
| | | return platform; |
| | | } |
| | | |
| | | public void setPlatform(Integer platform) { |
| | | this.platform = platform; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Phone{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", platform=" + platform + |
| | | ", phone='" + phone + '\'' + |
| | | ", companyId=" + companyId + |
| | | '}'; |
| | | } |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 数据类型(1:报警电话,2:投诉电话) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 是否是平台数据(1=是,2=否) |
| | | */ |
| | | @TableField("platform") |
| | | private Integer platform; |
| | | /** |
| | | * 电话 |
| | | */ |
| | | @TableField("phone") |
| | | private String phone; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getPlatform() { |
| | | return platform; |
| | | } |
| | | |
| | | public void setPlatform(Integer platform) { |
| | | this.platform = platform; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Phone{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", platform=" + platform + |
| | | ", phone='" + phone + '\'' + |
| | | ", companyId=" + companyId + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableName("t_sys_push_order") |
| | | public class PushOrder { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 推单距离(公里) |
| | | */ |
| | | @TableField("pushDistance") |
| | | private Double pushDistance; |
| | | /** |
| | | * 推单时间(秒) |
| | | */ |
| | | @TableField("pushTime") |
| | | private Integer pushTime; |
| | | /** |
| | | * 推单占所有司机百分比 |
| | | */ |
| | | @TableField("driverProportion") |
| | | private Double driverProportion; |
| | | /** |
| | | * 推单次数(1=第一轮,2=第二轮,3=第三轮) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 推单单据类型(1=专车,2=出租车) |
| | | */ |
| | | @TableField("pushType") |
| | | private Integer pushType; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Double getPushDistance() { |
| | | return pushDistance; |
| | | } |
| | | |
| | | public void setPushDistance(Double pushDistance) { |
| | | this.pushDistance = pushDistance; |
| | | } |
| | | |
| | | public Integer getPushTime() { |
| | | return pushTime; |
| | | } |
| | | |
| | | public void setPushTime(Integer pushTime) { |
| | | this.pushTime = pushTime; |
| | | } |
| | | |
| | | public Double getDriverProportion() { |
| | | return driverProportion; |
| | | } |
| | | |
| | | public void setDriverProportion(Double driverProportion) { |
| | | this.driverProportion = driverProportion; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getPushType() { |
| | | return pushType; |
| | | } |
| | | |
| | | public void setPushType(Integer pushType) { |
| | | this.pushType = pushType; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PushOrder{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", pushDistance=" + pushDistance + |
| | | ", pushTime=" + pushTime + |
| | | ", driverProportion=" + driverProportion + |
| | | ", type=" + type + |
| | | ", pushType=" + pushType + |
| | | '}'; |
| | | } |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 推单距离(公里) |
| | | */ |
| | | @TableField("pushDistance") |
| | | private Double pushDistance; |
| | | /** |
| | | * 推单时间(秒) |
| | | */ |
| | | @TableField("pushTime") |
| | | private Integer pushTime; |
| | | /** |
| | | * 推单占所有司机百分比 |
| | | */ |
| | | @TableField("driverProportion") |
| | | private Double driverProportion; |
| | | /** |
| | | * 推单次数(1=第一轮,2=第二轮,3=第三轮) |
| | | */ |
| | | @TableField("type") |
| | | private Integer type; |
| | | /** |
| | | * 推单单据类型(1=专车,2=出租车) |
| | | */ |
| | | @TableField("pushType") |
| | | private Integer pushType; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | public Double getPushDistance() { |
| | | return pushDistance; |
| | | } |
| | | |
| | | public void setPushDistance(Double pushDistance) { |
| | | this.pushDistance = pushDistance; |
| | | } |
| | | |
| | | public Integer getPushTime() { |
| | | return pushTime; |
| | | } |
| | | |
| | | public void setPushTime(Integer pushTime) { |
| | | this.pushTime = pushTime; |
| | | } |
| | | |
| | | public Double getDriverProportion() { |
| | | return driverProportion; |
| | | } |
| | | |
| | | public void setDriverProportion(Double driverProportion) { |
| | | this.driverProportion = driverProportion; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getPushType() { |
| | | return pushType; |
| | | } |
| | | |
| | | public void setPushType(Integer pushType) { |
| | | this.pushType = pushType; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "PushOrder{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", pushDistance=" + pushDistance + |
| | | ", pushTime=" + pushTime + |
| | | ", driverProportion=" + driverProportion + |
| | | ", type=" + type + |
| | | ", pushType=" + pushType + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableName("t_sys_integral") |
| | | public class SysIntegral { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getIntegral() { |
| | | return integral; |
| | | } |
| | | |
| | | public void setIntegral(Integer integral) { |
| | | this.integral = integral; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "SysIntegral{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", integral=" + integral + |
| | | '}'; |
| | | } |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 企业id |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 积分 |
| | | */ |
| | | @TableField("integral") |
| | | private Integer integral; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | public Integer getIntegral() { |
| | | return integral; |
| | | } |
| | | |
| | | public void setIntegral(Integer integral) { |
| | | this.integral = integral; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "SysIntegral{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", integral=" + integral + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 服务价格规则 |
| | | */ |
| | | @Data |
| | | @TableName("t_system_price") |
| | | public class SystemPrice { |
| | | /** |
| | |
| | | @TableField("id") |
| | | private Integer id; |
| | | /** |
| | | * 价格城市id |
| | | */ |
| | | @TableField("systemPriceCityId") |
| | | private Integer systemPriceCityId; |
| | | /** |
| | | * 业务类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | @TableField("type") |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import lombok.Data; /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/7/26 9:16 |
| | | */ |
| | | @Data |
| | | @TableName("t_system_price_city") |
| | | public class SystemPriceCity extends BaseBean { |
| | | /** |
| | | * 省编号 |
| | | */ |
| | | @TableField("areaCode") |
| | | private String areaCode; |
| | | /** |
| | | * 省名称 |
| | | */ |
| | | @TableField("areaName") |
| | | private String areaName; |
| | | /** |
| | | * 市编号 |
| | | */ |
| | | @TableField("cityCode") |
| | | private String cityCode; |
| | | /** |
| | | * 市名称 |
| | | */ |
| | | @TableField("cityName") |
| | | private String cityName; |
| | | /** |
| | | * 区县编号 |
| | | */ |
| | | @TableField("provinceCode") |
| | | private String provinceCode; |
| | | /** |
| | | * 区县名称 |
| | | */ |
| | | @TableField("provinceName") |
| | | private String provinceName; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | */ |
| | | @TableName("tb_show_modular") |
| | | public class TbShowModular extends Model<TbShowModular> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=招募,2=租车,3=买车,4=出租个人车辆,5=卖车,6=商家中心,7=打车卡) |
| | | */ |
| | | @ApiModelProperty("类型(1=招募,2=租车,3=买车,4=出租个人车辆,5=卖车,6=商家中心,7=打车卡)") |
| | | private Integer type; |
| | | /** |
| | | * 司机是否显示(1=是,2=否) |
| | | */ |
| | | @ApiModelProperty("司机是否显示(1=是,2=否)") |
| | | private Integer driverShow; |
| | | /** |
| | | * 用户是否显示(1=是,2=否) |
| | | */ |
| | | @ApiModelProperty("用户是否显示(1=是,2=否)") |
| | | private Integer userShow; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getDriverShow() { |
| | | return driverShow; |
| | | } |
| | | |
| | | public void setDriverShow(Integer driverShow) { |
| | | this.driverShow = driverShow; |
| | | } |
| | | |
| | | public Integer getUserShow() { |
| | | return userShow; |
| | | } |
| | | |
| | | public void setUserShow(Integer userShow) { |
| | | this.userShow = userShow; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TbShowModular{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", driverShow=" + driverShow + |
| | | ", userShow=" + userShow + |
| | | "}"; |
| | | } |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=招募,2=租车,3=买车,4=出租个人车辆,5=卖车,6=商家中心,7=打车卡) |
| | | */ |
| | | @ApiModelProperty("类型(1=招募,2=租车,3=买车,4=出租个人车辆,5=卖车,6=商家中心,7=打车卡)") |
| | | private Integer type; |
| | | /** |
| | | * 司机是否显示(1=是,2=否) |
| | | */ |
| | | @ApiModelProperty("司机是否显示(1=是,2=否)") |
| | | private Integer driverShow; |
| | | /** |
| | | * 用户是否显示(1=是,2=否) |
| | | */ |
| | | @ApiModelProperty("用户是否显示(1=是,2=否)") |
| | | private Integer userShow; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(Integer type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public Integer getDriverShow() { |
| | | return driverShow; |
| | | } |
| | | |
| | | public void setDriverShow(Integer driverShow) { |
| | | this.driverShow = driverShow; |
| | | } |
| | | |
| | | public Integer getUserShow() { |
| | | return userShow; |
| | | } |
| | | |
| | | public void setUserShow(Integer userShow) { |
| | | this.userShow = userShow; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TbShowModular{" + |
| | | "id=" + id + |
| | | ", type=" + type + |
| | | ", driverShow=" + driverShow + |
| | | ", userShow=" + userShow + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @TableName("tb_spell_order_rule") |
| | | public class TbSpellOrderRule extends Model<TbSpellOrderRule> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Integer companyId; |
| | | /** |
| | | * 规则每个输入框为一个参数{"num1":1,"num2":2.3} |
| | | */ |
| | | private String content; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TbSpellOrderRule{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", content=" + content + |
| | | "}"; |
| | | } |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Integer companyId; |
| | | /** |
| | | * 规则每个输入框为一个参数{"num1":1,"num2":2.3} |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public void setContent(String content) { |
| | | this.content = content; |
| | | } |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TbSpellOrderRule{" + |
| | | "id=" + id + |
| | | ", companyId=" + companyId + |
| | | ", content=" + content + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | CancleOrder query(Integer type, Integer orderType, Integer companyId) throws Exception; |
| | | CancleOrder query(Integer type, Integer orderType, Integer openCityId) throws Exception; |
| | | } |
| | |
| | | |
| | | |
| | | OpenCity openCity1(String code) throws Exception; |
| | | |
| | | |
| | | OpenCity openCity1(String lon, String lat) throws Exception; |
| | | } |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<PushOrder> querys(Integer type, Integer pushType, Integer companyId) throws Exception; |
| | | List<PushOrder> querys(Integer type, Integer pushType, Integer openCityId) throws Exception; |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.SystemPriceCity; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/7/26 9:24 |
| | | */ |
| | | public interface ISystemPriceCityService extends IService<SystemPriceCity> { |
| | | |
| | | |
| | | /** |
| | | * 查询匹配的数据 |
| | | * @param provinceCode |
| | | * @param cityCode |
| | | * @param districtCode |
| | | * @return |
| | | */ |
| | | SystemPriceCity queryOne(String provinceCode, String cityCode, String districtCode); |
| | | |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public CancleOrder query(Integer type, Integer orderType, Integer companyId) throws Exception { |
| | | return cancleOrderMapper.query(type, orderType, companyId); |
| | | public CancleOrder query(Integer type, Integer orderType, Integer openCityId) throws Exception { |
| | | return cancleOrderMapper.query(type, orderType, openCityId); |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.dao.OpenCityMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.util.GDMapGeocodingUtil; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | |
| | | |
| | | @Resource |
| | | private OpenCityMapper openCityMapper; |
| | | |
| | | @Autowired |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | return openCities.get(0); |
| | | } |
| | | |
| | | @Override |
| | | public OpenCity openCity1(String lon, String lat) throws Exception { |
| | | Map<String, String> geocode = gdMapGeocodingUtil.geocode(lon, lat); |
| | | String districtCode = geocode.get("districtCode"); |
| | | return openCity1(districtCode); |
| | | } |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.dao.PhoneMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.model.Phone; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IPhoneService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | @Resource |
| | | private PhoneMapper phoneMapper; |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | /** |
| | | * 获取所有系统电话 |
| | |
| | | */ |
| | | @Override |
| | | public List<Phone> queryPhones(String code) throws Exception { |
| | | List<Phone> list = new ArrayList<>(); |
| | | if(ToolUtil.isNotEmpty(code)){ |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | |
| | | list = phoneMapper.queryPhones(province, city, code); |
| | | if(list.size() == 0){ |
| | | list = phoneMapper.queryPhones(province, city, null); |
| | | } |
| | | if(list.size() == 0){ |
| | | list = phoneMapper.queryPhones(province, null, null); |
| | | } |
| | | } |
| | | return list; |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | return phoneMapper.selectList(new EntityWrapper<Phone>().eq("openCityId", openCity)); |
| | | } |
| | | |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryCustomerPhone(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //平台电话 |
| | | Phone query = phoneMapper.query(2, 1, null, null, null); |
| | | map.put("platform", null != query ? query.getPhone() : ""); |
| | | |
| | | //公司 |
| | | query = phoneMapper.query(2, 2, province, city, code); |
| | | if(query == null){ |
| | | query = phoneMapper.query(2, 2, province, city, null); |
| | | } |
| | | if(query == null){ |
| | | query = phoneMapper.query(2, 2, province, null, null); |
| | | } |
| | | map.put("company", null != query ? query.getPhone() : ""); |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | Phone phone = this.selectOne(new EntityWrapper<Phone>().eq("openCityId", openCity).eq("type", 2).eq("platform", 1)); |
| | | map.put("platform", null != phone ? phone.getPhone() : ""); |
| | | phone = this.selectOne(new EntityWrapper<Phone>().eq("openCityId", openCity).eq("type", 2).eq("platform", 2)); |
| | | map.put("company", null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<PushOrder> querys(Integer type, Integer pushType, Integer companyId) throws Exception { |
| | | return pushOrderMapper.querys(type, pushType, companyId); |
| | | public List<PushOrder> querys(Integer type, Integer pushType, Integer openCityId) throws Exception { |
| | | return pushOrderMapper.querys(type, pushType, openCityId); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.ServerCarModelMapper; |
| | | import com.stylefeng.guns.modular.system.dao.SystemPriceMapper; |
| | | import com.stylefeng.guns.modular.system.model.Company; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.model.OpenCityBusiness; |
| | | import com.stylefeng.guns.modular.system.model.ServerCarModel; |
| | | import com.stylefeng.guns.modular.system.service.ICompanyCityService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityBusinessService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IServerCarModelService; |
| | | import com.stylefeng.guns.modular.system.model.SystemPriceCity; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.GDMapElectricFenceUtil; |
| | | import com.stylefeng.guns.modular.system.util.GDMapGeocodingUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | |
| | | @Service |
| | | public class ServerCarModelServiceImpl extends ServiceImpl<ServerCarModelMapper, ServerCarModel> implements IServerCarModelService { |
| | | |
| | | |
| | | @Resource |
| | | private ServerCarModelMapper serverCarModelMapper; |
| | | |
| | | |
| | | @Resource |
| | | private ISystemPriceCityService systemPriceCityService; |
| | | |
| | | @Resource |
| | | private SystemPriceMapper systemPriceMapper; |
| | | |
| | | |
| | | @Autowired |
| | | private GDMapElectricFenceUtil gdMapElectricFenceUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private ICompanyCityService companyCityService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | |
| | | @Autowired |
| | | private IOpenCityBusinessService openCityBusinessService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据起点和终点获取车型 |
| | | * @param startLonLat |
| | |
| | | if(type == 1 && query.getIsSpe() == 2){ |
| | | return ResultUtil.success(new ArrayList<>()); |
| | | } |
| | | |
| | | |
| | | // TODO: 2023/11/4 无法修改 |
| | | Map<String, String> distance = gdMapElectricFenceUtil.getDistance(startLonLat, endLonLat, 1); |
| | | if(null == distance){ |
| | | if (null == distance) { |
| | | return ResultUtil.error("获取预估距离出错", new ArrayList<>()); |
| | | } |
| | | String distance1 = distance.get("distance");//距离(米) |
| | | double distance1_ = Double.valueOf(distance1).doubleValue(); |
| | | String duration = distance.get("duration");//时间(秒) |
| | | long duration_ = Long.valueOf(duration).longValue(); |
| | | |
| | | List<ServerCarModelWarpper> price = this.getPrice(query.getId(), distance1_, duration_, 0, 1); |
| | | List<ServerCarModelWarpper> price = this.getPrice(query.getId(), distance1_, duration_, 0, 1, geocode); |
| | | //添加出租车车型和价格 |
| | | ServerCarModelWarpper serverCarModelWarpper = this.getTextPrice(query.getId(), distance1_, duration_, 0, 2); |
| | | ServerCarModelWarpper serverCarModelWarpper = this.getTextPrice(query.getId(), distance1_, duration_, 0, 2, geocode); |
| | | price.add(serverCarModelWarpper); |
| | | return ResultUtil.success(price); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取业务类型对应的所有服务车型 |
| | | * |
| | | * @param type |
| | | * @return |
| | | */ |
| | |
| | | public List<Map<String, Object>> queryServerCarModels(Integer type) { |
| | | return serverCarModelMapper.queryServerCarModel(type); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 计算价格 |
| | | * |
| | | * @param companyId |
| | | * @param distance |
| | | * @param duration |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | public List<ServerCarModelWarpper> getPrice(Integer companyId, double distance, long duration, long wait, Integer type) throws Exception { |
| | | public List<ServerCarModelWarpper> getPrice(Integer companyId, double distance, long duration, long wait, Integer type, Map<String, String> geocode) throws Exception { |
| | | String provinceCode = geocode.get("provinceCode"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | String districtCode = geocode.get("districtCode"); |
| | | //获取匹配的城市价格配置 |
| | | SystemPriceCity systemPriceCity = systemPriceCityService.queryOne(provinceCode, cityCode, districtCode); |
| | | if (null == systemPriceCity) { |
| | | return new ArrayList<>(); |
| | | } |
| | | List<Map<String, Object>> list = serverCarModelMapper.queryServerCarModel(type); |
| | | List<ServerCarModelWarpper> data = new ArrayList<>(); |
| | | for(Map<String, Object> map : list){ |
| | | Map<String, Object> query1 = systemPriceMapper.query(companyId, type, Integer.valueOf(map.get("id").toString())); |
| | | if(null == query1){//排除没有设置价格的车型 |
| | | for (Map<String, Object> map : list) { |
| | | Map<String, Object> query1 = systemPriceMapper.query(companyId, type, Integer.valueOf(map.get("id").toString()), systemPriceCity.getId()); |
| | | if (null == query1) {//排除没有设置价格的车型 |
| | | continue; |
| | | } |
| | | //开始根据不同的方式计算金额 |
| | | double amount = 0; |
| | | if(type == 1){//专车 |
| | | |
| | | if (type == 1) {//专车 |
| | | double d = distance / 1000;//实际公里 |
| | | double t = duration / 60;//实际时间 |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString());//等待费 |
| | |
| | | serverCarModelWarpper.setFareTypeNote3(query1.get("fareTypeNote3").toString()); |
| | | serverCarModelWarpper.setContentPutOne(contentPutOne); |
| | | serverCarModelWarpper.setContentNotOne(contentNotOne); |
| | | |
| | | |
| | | serverCarModelWarpper.setContentPutTwo(contentPutTwo); |
| | | serverCarModelWarpper.setContentNotTwo(contentNotTwo); |
| | | |
| | | |
| | | serverCarModelWarpper.setContentPutThree(contentPutThree); |
| | | serverCarModelWarpper.setContentNotThree(contentNotThree); |
| | | |
| | | |
| | | |
| | | |
| | | serverCarModelWarpper.setContentExclusive(contentExclusive); |
| | | serverCarModelWarpper.setContentPrice(contentPrice); |
| | | |
| | | serverCarModelWarpper.setAmount(new BigDecimal(this.calculationPrice(contentExclusive,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setBuyNowAmount(new BigDecimal(this.calculationPrice(contentPrice,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setPutTogetherOneAmount(new BigDecimal(this.calculationPrice(contentPutOne,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setNotAssembledOneAmount(new BigDecimal(this.calculationPrice(contentNotOne,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setPutTogetherTwoAmount(new BigDecimal(this.calculationPrice(contentPutTwo,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setNotAssembledTwoAmount(new BigDecimal(this.calculationPrice(contentNotTwo,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setPutTogetherThreeAmount(new BigDecimal(this.calculationPrice(contentPutThree,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | serverCarModelWarpper.setNotAssembledThreeAmount(new BigDecimal(this.calculationPrice(contentNotThree,distance,duration,wait,waitMoney)).setScale(BigDecimal.ROUND_HALF_EVEN, 2).doubleValue()); |
| | | |
| | | serverCarModelWarpper.setAmount(this.calculationPrice(contentExclusive, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setBuyNowAmount(this.calculationPrice(contentPrice, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setPutTogetherOneAmount(this.calculationPrice(contentPutOne, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setNotAssembledOneAmount(this.calculationPrice(contentNotOne, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setPutTogetherTwoAmount(this.calculationPrice(contentPutTwo, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setNotAssembledTwoAmount(this.calculationPrice(contentNotTwo, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setPutTogetherThreeAmount(this.calculationPrice(contentPutThree, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setNotAssembledThreeAmount(this.calculationPrice(contentNotThree, distance, duration, wait, waitMoney)); |
| | | serverCarModelWarpper.setMileage(d); |
| | | serverCarModelWarpper.setDuration(t); |
| | | serverCarModelWarpper.setIsOpen(Integer.parseInt(query1.get("isOpen").toString())); |
| | |
| | | } |
| | | return data; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public ServerCarModelWarpper getTextPrice(Integer companyId, double distance, long duration, long wait, Integer type) throws Exception { |
| | | Map<String, Object> query1 = systemPriceMapper.query(companyId, type, null); |
| | | if(null == query1){//排除没有设置价格的车型 |
| | | |
| | | |
| | | public ServerCarModelWarpper getTextPrice(Integer companyId, double distance, long duration, long wait, Integer type, Map<String, String> geocode) throws Exception { |
| | | String provinceCode = geocode.get("provinceCode"); |
| | | String cityCode = geocode.get("cityCode"); |
| | | String districtCode = geocode.get("districtCode"); |
| | | //获取匹配的城市价格配置 |
| | | SystemPriceCity systemPriceCity = systemPriceCityService.queryOne(provinceCode, cityCode, districtCode); |
| | | if (null == systemPriceCity) { |
| | | return null; |
| | | } |
| | | Map<String, Object> query1 = systemPriceMapper.query(companyId, type, null, systemPriceCity.getId()); |
| | | if (null == query1) {//排除没有设置价格的车型 |
| | | return null; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | double d = distance / 1000;//实际公里 |
| | | double t = duration / 60;//实际时间 |
| | | JSONObject jsonObject = JSON.parseObject(query1.get("content").toString());//等待费 |
| | |
| | | } |
| | | |
| | | Double amount = 0D; |
| | | if(System.currentTimeMillis() > start_date && System.currentTimeMillis() <= end_date){ |
| | | if (System.currentTimeMillis() > start_date && System.currentTimeMillis() <= end_date) { |
| | | amount = num7; |
| | | if(d > num8){ |
| | | BigDecimal multiply = new BigDecimal(d).subtract(new BigDecimal(num8)).multiply(new BigDecimal(num9)); |
| | | if(d > num4){ |
| | | multiply = new BigDecimal(d).subtract(new BigDecimal(num4)).multiply(new BigDecimal(num5)).add(multiply); |
| | | BigDecimal multiply = BigDecimal.ZERO; |
| | | BigDecimal yt = BigDecimal.ZERO; |
| | | if (d > num8) { |
| | | multiply = new BigDecimal(d).subtract(new BigDecimal(num8)).multiply(new BigDecimal(num9)); |
| | | if (d > num4) { |
| | | yt = new BigDecimal(d).subtract(new BigDecimal(num4)).multiply(new BigDecimal(num5)); |
| | | } |
| | | amount = new BigDecimal(num7).add(multiply).setScale(2, BigDecimal.ROUND_DOWN).doubleValue(); |
| | | amount = new BigDecimal(num7).add(multiply).add(yt).setScale(2, BigDecimal.ROUND_DOWN).doubleValue(); |
| | | } |
| | | }else{ |
| | | map.put("qibujia", num7); |
| | | map.put("lichengfei", multiply.doubleValue()); |
| | | map.put("yuantufei", yt.doubleValue()); |
| | | map.put("zongfeiyong", amount); |
| | | } else { |
| | | amount = num1; |
| | | if(d > num2){ |
| | | BigDecimal multiply = new BigDecimal(d).subtract(new BigDecimal(num2)).multiply(new BigDecimal(num3)); |
| | | if(d > num4){ |
| | | multiply = new BigDecimal(d).subtract(new BigDecimal(num4)).multiply(new BigDecimal(num5)).add(multiply); |
| | | BigDecimal multiply = BigDecimal.ZERO; |
| | | BigDecimal yt = BigDecimal.ZERO; |
| | | if (d > num2) { |
| | | multiply = new BigDecimal(d).subtract(new BigDecimal(num2)).multiply(new BigDecimal(num3)); |
| | | if (d > num4) { |
| | | yt = new BigDecimal(d).subtract(new BigDecimal(num4)).multiply(new BigDecimal(num5)); |
| | | } |
| | | amount = new BigDecimal(num1).add(multiply).setScale(2, BigDecimal.ROUND_DOWN).doubleValue(); |
| | | amount = new BigDecimal(num1).add(multiply).add(yt).setScale(2, BigDecimal.ROUND_DOWN).doubleValue(); |
| | | } |
| | | map.put("qibujia", num1); |
| | | map.put("lichengfei", multiply.doubleValue()); |
| | | map.put("yuantufei", yt.doubleValue()); |
| | | map.put("zongfeiyong", amount); |
| | | } |
| | | List<Map<String, Object>> list = serverCarModelMapper.queryServerCarModel(4); |
| | | String isCheck = "0"; |
| | |
| | | ServerCarModelWarpper serverCarModelWarpper = new ServerCarModelWarpper(); |
| | | serverCarModelWarpper.setId(0); |
| | | serverCarModelWarpper.setName("出租车"); |
| | | serverCarModelWarpper.setAmount(amount); |
| | | serverCarModelWarpper.setAmount(map); |
| | | serverCarModelWarpper.setDx_check(Integer.valueOf(isCheck)); |
| | | serverCarModelWarpper.setContentPutOne(new JSONObject()); |
| | | serverCarModelWarpper.setContentNotOne(new JSONObject()); |
| | |
| | | serverCarModelWarpper.setContentNotThree(new JSONObject()); |
| | | serverCarModelWarpper.setContentExclusive(new JSONObject()); |
| | | serverCarModelWarpper.setContentPrice(new JSONObject()); |
| | | |
| | | |
| | | return serverCarModelWarpper; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public Double calculationPrice(JSONObject rule, double distance, long duration, long wait,Double waitMoney) throws Exception { |
| | | double amount = 0; |
| | | |
| | | |
| | | public Map<String, Object> calculationPrice(JSONObject rule, double distance, long duration, long wait, Double waitMoney) throws Exception { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //等待费 |
| | | Date date = new Date(); |
| | | double d = distance / 1000;//实际公里 |
| | |
| | | double yt1 = 0;//远途1段 |
| | | double yt2 = 0;//远途2段 |
| | | double yt3 = 0;//远途3段 |
| | | |
| | | |
| | | |
| | | |
| | | //夜间服务处理逻辑 |
| | | Calendar s = Calendar.getInstance(); |
| | | s.setTime(date); |
| | | s.set(Calendar.HOUR_OF_DAY, Integer.valueOf(rule.getString("num14").split(" - ")[0].split(":")[0])); |
| | | s.set(Calendar.MINUTE, Integer.valueOf(rule.getString("num14").split(" - ")[0].split(":")[1])); |
| | | |
| | | |
| | | Calendar e = Calendar.getInstance(); |
| | | e.setTime(date); |
| | | e.set(Calendar.HOUR_OF_DAY, Integer.valueOf(rule.getString("num14").split(" - ")[1].split(":")[0])); |
| | | e.set(Calendar.MINUTE, Integer.valueOf(rule.getString("num14").split(" - ")[1].split(":")[1])); |
| | | |
| | | if(date.getTime() > s.getTimeInMillis() && date.getTime() < e.getTimeInMillis()){ |
| | | if(d > rule.getDouble("num6")){ |
| | | |
| | | if (date.getTime() > s.getTimeInMillis() && date.getTime() < e.getTimeInMillis()) { |
| | | if (d > rule.getDouble("num6")) { |
| | | yt1 = rule.getDouble("num18") * (d - rule.getDouble("num6")); |
| | | } |
| | | if(d > rule.getDouble("num9")){ |
| | | if (d > rule.getDouble("num9")) { |
| | | yt2 = rule.getDouble("num19") * (d - rule.getDouble("num9")); |
| | | } |
| | | if(d > rule.getDouble("num12")){ |
| | | if (d > rule.getDouble("num12")) { |
| | | yt3 = rule.getDouble("num20") * (d - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num15") + (d1 * rule.getDouble("num16")) + (t1 * rule.getDouble("num17")) + (wait * waitMoney) + yt1 + yt2 + yt3; |
| | | double amount = rule.getDouble("num15") + (d1 * rule.getDouble("num16")) + (t1 * rule.getDouble("num17")) + (wait * waitMoney) + yt1 + yt2 + yt3; |
| | | map.put("qibujia", rule.getDouble("num15")); |
| | | map.put("lichengfei", d1 * rule.getDouble("num16")); |
| | | map.put("shichangfei", t1 * rule.getDouble("num17")); |
| | | map.put("dengdaifei", wait * waitMoney); |
| | | map.put("yuantufei", yt1 + yt2 + yt3); |
| | | map.put("zongfeiyong", amount); |
| | | }else{ |
| | | Calendar s1 = Calendar.getInstance(); |
| | | s1.setTime(date); |
| | |
| | | e1.setTime(date); |
| | | e1.set(Calendar.HOUR_OF_DAY, Integer.valueOf(rule.getString("num21").split(" - ")[1].split(":")[0])); |
| | | e1.set(Calendar.MINUTE, Integer.valueOf(rule.getString("num21").split(" - ")[1].split(":")[1])); |
| | | |
| | | |
| | | Calendar s2 = Calendar.getInstance(); |
| | | s2.setTime(date); |
| | | s2.set(Calendar.HOUR_OF_DAY, Integer.valueOf(rule.getString("num22").split(" - ")[0].split(":")[0])); |
| | | s2.set(Calendar.MINUTE, Integer.valueOf(rule.getString("num22").split(" - ")[0].split(":")[1])); |
| | | |
| | | |
| | | Calendar e2 = Calendar.getInstance(); |
| | | e2.setTime(date); |
| | | e2.set(Calendar.HOUR_OF_DAY, Integer.valueOf(rule.getString("num22").split(" - ")[1].split(":")[0])); |
| | | e2.set(Calendar.MINUTE, Integer.valueOf(rule.getString("num22").split(" - ")[1].split(":")[1])); |
| | | //高峰时段处理逻辑 |
| | | if((date.getTime() > s1.getTimeInMillis() && date.getTime() < e1.getTimeInMillis()) || (date.getTime() > s2.getTimeInMillis() && date.getTime() < e2.getTimeInMillis())){ |
| | | if(d > rule.getDouble("num6")){ |
| | | if ((date.getTime() > s1.getTimeInMillis() && date.getTime() < e1.getTimeInMillis()) || (date.getTime() > s2.getTimeInMillis() && date.getTime() < e2.getTimeInMillis())) { |
| | | if (d > rule.getDouble("num6")) { |
| | | yt1 = rule.getDouble("num26") * (d - rule.getDouble("num6")); |
| | | } |
| | | if(d > rule.getDouble("num9")){ |
| | | if (d > rule.getDouble("num9")) { |
| | | yt2 = rule.getDouble("num27") * (d - rule.getDouble("num9")); |
| | | } |
| | | if(d > rule.getDouble("num12")){ |
| | | if (d > rule.getDouble("num12")) { |
| | | yt3 = rule.getDouble("num28") * (d - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num23") + (d1 * rule.getDouble("num24")) + (t1 * rule.getDouble("num25")) + (wait * waitMoney) + yt1 + yt2 + yt3; |
| | | double amount = rule.getDouble("num23") + (d1 * rule.getDouble("num24")) + (t1 * rule.getDouble("num25")) + (wait * waitMoney) + yt1 + yt2 + yt3; |
| | | map.put("qibujia", rule.getDouble("num23")); |
| | | map.put("lichengfei", d1 * rule.getDouble("num24")); |
| | | map.put("shichangfei", t1 * rule.getDouble("num25")); |
| | | map.put("dengdaifei", wait * waitMoney); |
| | | map.put("yuantufei", yt1 + yt2 + yt3); |
| | | map.put("zongfeiyong", amount); |
| | | }else{ |
| | | //其他时间段的计算 |
| | | if(d > rule.getDouble("num6")){ |
| | | if (d > rule.getDouble("num6")) { |
| | | yt1 = rule.getDouble("num8") * (d - rule.getDouble("num6")); |
| | | } |
| | | if(d > rule.getDouble("num9")){ |
| | | if (d > rule.getDouble("num9")) { |
| | | yt2 = rule.getDouble("num11") * (d - rule.getDouble("num9")); |
| | | } |
| | | if(d > rule.getDouble("num12")){ |
| | | if (d > rule.getDouble("num12")) { |
| | | yt3 = rule.getDouble("num13") * (d - rule.getDouble("num12")); |
| | | } |
| | | amount = rule.getDouble("num1") + (d1 * rule.getDouble("num4")) + (t1 * rule.getDouble("num5")) + (wait * waitMoney) + yt1 + yt2 + yt3; |
| | | double amount = rule.getDouble("num1") + (d1 * rule.getDouble("num4")) + (t1 * rule.getDouble("num5")) + (wait * waitMoney) + yt1 + yt2 + yt3; |
| | | map.put("qibujia", rule.getDouble("num1")); |
| | | map.put("lichengfei", d1 * rule.getDouble("num4")); |
| | | map.put("shichangfei", t1 * rule.getDouble("num5")); |
| | | map.put("dengdaifei", wait * waitMoney); |
| | | map.put("yuantufei", yt1 + yt2 + yt3); |
| | | map.put("zongfeiyong", amount); |
| | | } |
| | | } |
| | | return amount; |
| | | return map; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.modular.system.dao.SystemPriceCityMapper; |
| | | import com.stylefeng.guns.modular.system.model.SystemPriceCity; |
| | | import com.stylefeng.guns.modular.system.service.ISystemPriceCityService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/7/26 9:25 |
| | | */ |
| | | @Service |
| | | public class SystemPriceCityServiceImpl extends ServiceImpl<SystemPriceCityMapper, SystemPriceCity> implements ISystemPriceCityService { |
| | | |
| | | |
| | | /** |
| | | * 查询匹配数据 |
| | | * @param provinceCode |
| | | * @param cityCode |
| | | * @param districtCode |
| | | * @return |
| | | */ |
| | | @Override |
| | | public SystemPriceCity queryOne(String provinceCode, String cityCode, String districtCode) { |
| | | SystemPriceCity systemPriceCity = this.selectOne(new EntityWrapper<SystemPriceCity>().eq("areaCode", provinceCode).eq("cityCode", cityCode).eq("provinceCode", districtCode)); |
| | | if(null == systemPriceCity){ |
| | | systemPriceCity = this.selectOne(new EntityWrapper<SystemPriceCity>().eq("areaCode", provinceCode).eq("cityCode", cityCode)); |
| | | if(null == systemPriceCity){ |
| | | systemPriceCity = this.selectOne(new EntityWrapper<SystemPriceCity>().eq("areaCode", provinceCode)); |
| | | } |
| | | } |
| | | return systemPriceCity; |
| | | }} |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.common.constant.state.Order; |
| | | import com.stylefeng.guns.modular.specialTrain.model.OrderPrivateCar; |
| | | import com.stylefeng.guns.modular.specialTrain.server.IOrderPrivateCarService; |
| | | import com.stylefeng.guns.modular.system.dao.CarMapper; |
| | |
| | | import com.stylefeng.guns.modular.system.dao.SystemPriceMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.taxi.model.TransactionDetails; |
| | | import com.stylefeng.guns.modular.taxi.service.ITransactionDetailsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | public void operatePay(Integer orderId){ |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | Map<String, Object> query = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | Map<String, Object> query = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId(), null); |
| | | Car car = carMapper.selectById(orderPrivateCar.getCarId()); |
| | | ServerCarModel serverCarModel = serverCarModelMapper.selectById(orderPrivateCar.getServerCarModelId()); |
| | | // TransactionDetails transactionDetails = transactionDetailsService.selectById(new EntityWrapper<TransactionDetails>().eq("orderId", orderId).eq("orderType", 1)); |
| | |
| | | * @throws Exception |
| | | */ |
| | | private Map<String, Double> setMoney(OrderPrivateCar orderPrivateCar) { |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId()); |
| | | Map<String, Object> query1 = systemPriceMapper.query(orderPrivateCar.getCompanyId(), 1, orderPrivateCar.getServerCarModelId(), null); |
| | | Map<String, Double> map = new HashMap<>(); |
| | | //开始根据不同的方式计算金额 |
| | | double amount1 = 0; |
| | |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | | String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | String privateKeyPath = "C:\\Users\\Administrator\\Desktop\\private_key_test.pem"; |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | |
| | | package com.stylefeng.guns.modular.system.warpper; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @ApiModelProperty("车型照片") |
| | | private String img; |
| | | @ApiModelProperty("预估金额-专车对应独享") |
| | | private Double amount; |
| | | private Map<String, Object> amount; |
| | | @ApiModelProperty("包车的价格") |
| | | private String price; |
| | | @ApiModelProperty("预估里程(公里)") |
| | | private Double mileage; |
| | | @ApiModelProperty("预估时间(分钟)") |
| | | private Double duration; |
| | | |
| | | |
| | | @ApiModelProperty("预估金额-专车对应一口价") |
| | | private Double buyNowAmount; |
| | | private Map<String, Object> buyNowAmount; |
| | | @ApiModelProperty("预估金额-专车对应一人拼成价格") |
| | | private Double putTogetherOneAmount; |
| | | private Map<String, Object> putTogetherOneAmount; |
| | | @ApiModelProperty("预估金额-专车对应一人未拼成价格") |
| | | private Double notAssembledOneAmount; |
| | | private Map<String, Object> notAssembledOneAmount; |
| | | @ApiModelProperty("预估金额-专车对应两人拼成价格") |
| | | private Double putTogetherTwoAmount; |
| | | private Map<String, Object> putTogetherTwoAmount; |
| | | @ApiModelProperty("预估金额-专车对应两人未拼成价格") |
| | | private Double notAssembledTwoAmount; |
| | | private Map<String, Object> notAssembledTwoAmount; |
| | | @ApiModelProperty("预估金额-专车对应三人拼成价格") |
| | | private Double putTogetherThreeAmount; |
| | | private Map<String, Object> putTogetherThreeAmount; |
| | | @ApiModelProperty("预估金额-专车对应三人未拼成价格") |
| | | private Double notAssembledThreeAmount; |
| | | private Map<String, Object> notAssembledThreeAmount; |
| | | @ApiModelProperty("是否开启拼车(1=是,2=否)") |
| | | private Integer isOpen; |
| | | |
| | |
| | | public void setIsOpenExclusive(Integer isOpenExclusive) { |
| | | this.isOpenExclusive = isOpenExclusive; |
| | | } |
| | | |
| | | |
| | | public Integer getIsOpenPrice() { |
| | | return isOpenPrice; |
| | | } |
| | | |
| | | |
| | | public void setIsOpenPrice(Integer isOpenPrice) { |
| | | this.isOpenPrice = isOpenPrice; |
| | | } |
| | | |
| | | public Double getBuyNowAmount() { |
| | | |
| | | public Map<String, Object> getBuyNowAmount() { |
| | | return buyNowAmount; |
| | | } |
| | | |
| | | public void setBuyNowAmount(Double buyNowAmount) { |
| | | |
| | | public void setBuyNowAmount(Map<String, Object> buyNowAmount) { |
| | | this.buyNowAmount = buyNowAmount; |
| | | } |
| | | |
| | | public Double getPutTogetherOneAmount() { |
| | | |
| | | public Map<String, Object> getPutTogetherOneAmount() { |
| | | return putTogetherOneAmount; |
| | | } |
| | | |
| | | public void setPutTogetherOneAmount(Double putTogetherOneAmount) { |
| | | |
| | | public void setPutTogetherOneAmount(Map<String, Object> putTogetherOneAmount) { |
| | | this.putTogetherOneAmount = putTogetherOneAmount; |
| | | } |
| | | |
| | | public Double getNotAssembledOneAmount() { |
| | | |
| | | public Map<String, Object> getNotAssembledOneAmount() { |
| | | return notAssembledOneAmount; |
| | | } |
| | | |
| | | public void setNotAssembledOneAmount(Double notAssembledOneAmount) { |
| | | |
| | | public void setNotAssembledOneAmount(Map<String, Object> notAssembledOneAmount) { |
| | | this.notAssembledOneAmount = notAssembledOneAmount; |
| | | } |
| | | |
| | | public Double getPutTogetherTwoAmount() { |
| | | |
| | | public Map<String, Object> getPutTogetherTwoAmount() { |
| | | return putTogetherTwoAmount; |
| | | } |
| | | |
| | | public void setPutTogetherTwoAmount(Double putTogetherTwoAmount) { |
| | | |
| | | public void setPutTogetherTwoAmount(Map<String, Object> putTogetherTwoAmount) { |
| | | this.putTogetherTwoAmount = putTogetherTwoAmount; |
| | | } |
| | | |
| | | public Double getNotAssembledTwoAmount() { |
| | | |
| | | public Map<String, Object> getNotAssembledTwoAmount() { |
| | | return notAssembledTwoAmount; |
| | | } |
| | | |
| | | public void setNotAssembledTwoAmount(Double notAssembledTwoAmount) { |
| | | |
| | | public void setNotAssembledTwoAmount(Map<String, Object> notAssembledTwoAmount) { |
| | | this.notAssembledTwoAmount = notAssembledTwoAmount; |
| | | } |
| | | |
| | | public Double getPutTogetherThreeAmount() { |
| | | |
| | | public Map<String, Object> getPutTogetherThreeAmount() { |
| | | return putTogetherThreeAmount; |
| | | } |
| | | |
| | | public void setPutTogetherThreeAmount(Double putTogetherThreeAmount) { |
| | | |
| | | public void setPutTogetherThreeAmount(Map<String, Object> putTogetherThreeAmount) { |
| | | this.putTogetherThreeAmount = putTogetherThreeAmount; |
| | | } |
| | | |
| | | public Double getNotAssembledThreeAmount() { |
| | | |
| | | public Map<String, Object> getNotAssembledThreeAmount() { |
| | | return notAssembledThreeAmount; |
| | | } |
| | | |
| | | public void setNotAssembledThreeAmount(Double notAssembledThreeAmount) { |
| | | |
| | | public void setNotAssembledThreeAmount(Map<String, Object> notAssembledThreeAmount) { |
| | | this.notAssembledThreeAmount = notAssembledThreeAmount; |
| | | } |
| | | |
| | | |
| | | public Integer getIsOpen() { |
| | | return isOpen; |
| | | } |
| | | |
| | | |
| | | public void setIsOpen(Integer isOpen) { |
| | | this.isOpen = isOpen; |
| | | } |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public Double getAmount() { |
| | | |
| | | public Map<String, Object> getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(Double amount) { |
| | | |
| | | public void setAmount(Map<String, Object> amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | |
| | | public String getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | |
| | | public void setPrice(String price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | |
| | | public Double getMileage() { |
| | | return mileage; |
| | | } |
| | |
| | | serverCarModelWarpper.setId(null != map.get("id") ? Integer.valueOf(map.get("id").toString()) : 0); |
| | | serverCarModelWarpper.setName(null != map.get("name") ? map.get("name").toString() : ""); |
| | | serverCarModelWarpper.setImg(null != map.get("img") ? map.get("img").toString() : ""); |
| | | serverCarModelWarpper.setAmount(null != map.get("amount") ? Double.valueOf(map.get("amount").toString()) : 0); |
| | | serverCarModelWarpper.setPrice(null != map.get("price") ? map.get("price").toString() : ""); |
| | | serverCarModelWarpper.setMileage(null != map.get("mileage") ? Double.valueOf(map.get("mileage").toString()) : 0); |
| | | serverCarModelWarpper.setDuration(null != map.get("duration") ? Double.valueOf(map.get("duration").toString()) : 0); |