Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/QianYunTong
# Conflicts:
# DriverQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/util/zhenglian/SM4Util.java
74个文件已修改
5个文件已删除
10个文件已添加
| | |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.redisson</groupId> |
| | | <artifactId>redisson-spring-boot-starter</artifactId> |
| | | <version>3.16.8</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.lettuce</groupId> |
| | | <artifactId>lettuce-core</artifactId> |
| | | </dependency> |
| | |
| | | <version>1.0.0</version> |
| | | <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> |
| | |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.internal.util.file.IOUtils; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.vo.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ALiSendSms; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import com.stylefeng.guns.modular.system.util.WeChatUtil; |
| | | //import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.QianYunTongConfig; |
| | | import com.stylefeng.guns.modular.system.warpper.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.http.*; |
| | | import org.springframework.util.Base64Utils; |
| | | import org.springframework.util.LinkedMultiValueMap; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static org.bouncycastle.cms.RecipientId.password; |
| | | |
| | | /** |
| | | * 司机控制器 |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/driver/queryPhone") |
| | | @ApiOperation(value = "获取客服电话", tags = {"司机端-个人中心"}, notes = "车队=franchisee,分公司=branch,平台=platform") |
| | | @ApiOperation(value = "获取客服电话(黔云通)", tags = {"司机端-个人中心"}, notes = "车队=franchisee,分公司=branch,平台=platform") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "当前行政区划代码", name = "code", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil queryPhone(HttpServletRequest request){ |
| | | public ResultUtil queryPhone(String code, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | Map<String, Object> map = driverService.queryPhone(uid); |
| | | Map<String, Object> map = driverService.queryPhone(uid, code); |
| | | return ResultUtil.success(map); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/base/driver/getDriverInfo") |
| | | public void getDriverInfo(String lsu, String ssologinid, String ticket, HttpSession session) { |
| | | try { |
| | | String onconParam = edu.yale.its.tp.cas.client.Util.getOnconParam(session); |
| | | onconParam = new String(Base64.getDecoder().decode(onconParam), "UTF-8"); |
| | | System.err.println("lsu: " + lsu + ",ticket: " + ticket + ",ssologinid: " + ssologinid); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | // @ResponseBody |
| | |
| | | |
| | | @Resource |
| | | private DriverWorkMapper driverWorkMapper; |
| | | @Autowired |
| | | private ISysTimeoutMoneyService sysTimeoutMoneyService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private ICarService carService; |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private ISysTimeoutMoneyService sysTimeoutMoneyService; |
| | | |
| | | |
| | | /** |
| | | * 获取服务中页面订单详情 |
| | |
| | | Map<String, Object> map = orderService.queryOrderInfo(uid, orderId, orderType); |
| | | |
| | | if (orderType == 4 || orderType == 5){ |
| | | |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(null); |
| | | OpenCity openCity = openCityService.openCity1(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(new EntityWrapper<SysTimeoutMoney>().eq("openCityId", openCity.getId())); |
| | | map.put("timeOutMoney",Double.parseDouble(map.get("timeOutMoney").toString())); |
| | | map.put("note","配送超过" + sysTimeoutMoney.getTimeOut() + "分钟扣订单的" + sysTimeoutMoney.getDeductMoney() + "%费用"); |
| | | |
| | |
| | | } |
| | | } |
| | | return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map)); |
| | | //return ResultUtil.success(OrderInfoWarpper.getOrderInfoWarpper(map)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | Map<String, Object> map = orderService.queryOrderInfo(uid, orderId, 7); |
| | | |
| | | if (orderType == 4 || orderType == 5){ |
| | | |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(null); |
| | | OpenCity openCity = openCityService.openCity1(map.get("startLon").toString(), map.get("startLat").toString()); |
| | | SysTimeoutMoney sysTimeoutMoney = sysTimeoutMoneyService.selectOne(new EntityWrapper<SysTimeoutMoney>().eq("openCityId", openCity.getId())); |
| | | map.put("timeOutMoney",Double.parseDouble(map.get("timeOutMoney").toString())); |
| | | map.put("note","配送超过" + sysTimeoutMoney.getTimeOut() + "分钟扣订单的" + sysTimeoutMoney.getDeductMoney() + "%费用"); |
| | | |
| | |
| | | |
| | | @Resource |
| | | private UserInfoMapper userInfoMapper; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private DateUtil dateUtil; |
| | |
| | | map.put("orderNumber", orderCrossCity.getOrderNum()); |
| | | map.put("totalMoney", new BigDecimal(totalMoney).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | map.put("serverMoney", new BigDecimal(serverMoney).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | | Phone phone = phoneMapper.queryInfo(orderCrossCity.getCompanyId(), 1); |
| | | OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 1, 1); |
| | | map.put("emergencyCall", null != phone ? phone.getPhone() : "110"); |
| | | map.put("orders", JSON.toJSONString(order)); |
| | | |
| | |
| | | orderCrossCity.setIsReassign(1); |
| | | orderCrossCity.setLineShiftDriverId(orderCrossCityWarpper.getLineShiftDriverId()); |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderCrossCity.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderCrossCity.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderCrossCity.setTelX(map.get("telX")); |
| | | orderCrossCity.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderCrossCity.setTelX(map.get("telX")); |
| | | // orderCrossCity.setBindId(map.get("bindId")); |
| | | // } |
| | | if(orderCrossCityWarpper.getTravelMode() == 2){//包车 |
| | | // orderCrossCity.setSeatNumber(lineShiftDriver.getLaveSeatNumber()); |
| | | // orderCrossCity.setPeopleNumber(lineShiftDriver.getLaveSeat()); |
| | |
| | | |
| | | |
| | | UserInfo userInfo = userInfoMapper.selectById(orderCrossCity.getUserId()); |
| | | SysIntegral query1 = sysIntegralMapper.query(orderCrossCity.getCompanyId()); |
| | | OpenCity openCity = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()); |
| | | SysIntegral query1 = sysIntegralMapper.query(openCity.getId()); |
| | | userInfo.setIntegral(userInfo.getIntegral() + (query.getAmount().intValue() * query1.getIntegral()));//积分 |
| | | userInfoMapper.updateById(userInfo); |
| | | System.out.println("==============userInfo修改完毕==================="+userInfo); |
| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.dao.UserInfoMapper; |
| | | import com.stylefeng.guns.modular.system.dao.UserMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class NewlyAddedController { |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/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 = driverService.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(); |
| | |
| | | orderLogistics.setSnatchOrderTime(new Date()); |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderLogistics.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderLogistics.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderLogistics.getRecipientPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderLogistics.setTelX(map.get("telX")); |
| | | orderLogistics.setBindId(map.get("bindId")); |
| | | } |
| | | UserInfo userInfo = userInfoMapper.selectById(orderLogistics.getUserId()); |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderLogistics.getRecipientPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderLogistics.setTelX(map.get("telX")); |
| | | // orderLogistics.setBindId(map.get("bindId")); |
| | | // } |
| | | // UserInfo userInfo = userInfoMapper.selectById(orderLogistics.getUserId()); |
| | | |
| | | Map<String, String> map1 = chinaMobileUtil.midAxbBindSend(userInfo.getPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | System.out.println("二次绑定信息:"+map1); |
| | | if(String.valueOf(map1.get("code")).equals("200")){ |
| | | orderLogistics.setTelXOne(map1.get("telX")); |
| | | orderLogistics.setBindIdOne(map1.get("bindId")); |
| | | } |
| | | // Map<String, String> map1 = chinaMobileUtil.midAxbBindSend(userInfo.getPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // System.out.println("二次绑定信息:"+map1); |
| | | // if(String.valueOf(map1.get("code")).equals("200")){ |
| | | // orderLogistics.setTelXOne(map1.get("telX")); |
| | | // orderLogistics.setBindIdOne(map1.get("bindId")); |
| | | // } |
| | | |
| | | this.updateById(orderLogistics); |
| | | |
| | |
| | | } |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderLogistics.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderLogistics.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 TODO 车载端使用真实号码 |
| | | // Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | public ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | OrderPrivateCar orderPrivateCar = this.selectById(orderId); |
| | | if(null == orderPrivateCar){ |
| | | return ResultUtil.error("订单已被抢了"); |
| | |
| | | orderPrivateCar.setSnatchOrderTime(new Date()); |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderPrivateCar.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderPrivateCar.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderPrivateCar.setTelX(map.get("telX")); |
| | | orderPrivateCar.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderPrivateCar.setTelX(map.get("telX")); |
| | | // orderPrivateCar.setBindId(map.get("bindId")); |
| | | // } |
| | | |
| | | this.updateById(orderPrivateCar); |
| | | |
| | |
| | | |
| | | systemNoticeService.addSystemNotice(2, "您已成功抢得快车订单,请及时联系客户!", orderPrivateCar.getDriverId(), 1); |
| | | systemNoticeService.addSystemNotice(1, "您的订单已指派给" + driver.getName().substring(0, 1) + "师傅,请保持电话畅通!", orderPrivateCar.getUserId(), 1); |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){ |
| | | |
| | | if(pushMinistryOfTransport){ |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //上传数据 |
| | | pushMinistryOfTransportUtil.orderCreate(orderId); |
| | | pushMinistryOfTransportUtil.orderMatch(orderId); |
| | | } |
| | | } |
| | | }).start(); |
| | | }).start(); |
| | | } |
| | | |
| | | |
| | | return ResultUtil.success(orderPrivateCar.getId()); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface OpenCityMapper extends BaseMapper<OpenCity> { |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市列表(有效的) |
| | | * @return |
| | | */ |
| | | List<OpenCity> queryOpenCity(); |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市 |
| | | * @param code |
| | | * @return |
| | | */ |
| | | List<OpenCity> queryByCode(@Param("code") String code); |
| | | } |
| | |
| | | * @param code |
| | | * @return |
| | | */ |
| | | List<Phone> queryPhones(@Param("province") String province, @Param("city") String city, @Param("code") String code); |
| | | List<Phone> queryPhones(@Param("openCityId") Integer openCityId); |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 获取电话 |
| | | * @param companyId |
| | | * @param openCityId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | Phone queryInfo(@Param("companyId") Integer companyId, @Param("type") Integer type); |
| | | Phone queryInfo(@Param("openCityId") Integer openCityId, @Param("type") Integer type, @Param("platform") Integer platform); |
| | | } |
| | |
| | | * @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); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 获取改派金额 |
| | | * @param companyId |
| | | * @param openCityId |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | Double queryMoney(@Param("companyId") Integer companyId) throws Exception; |
| | | Double queryMoney(@Param("openCityId") Integer openCityId) throws Exception; |
| | | } |
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.OpenCityMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.OpenCity"> |
| | | <id column="id" property="id"/> |
| | | <result column="code" property="code"/> |
| | | <result column="lon" property="lon"/> |
| | | <result column="lat" property="lat"/> |
| | | <result column="isQualifications" property="isQualifications"/> |
| | | <result column="areaName" property="areaName"/> |
| | | <result column="cityName" property="cityName"/> |
| | | <result column="provinceName" property="provinceName"/> |
| | | |
| | | <result column="flag" property="flag"/> |
| | | <result column="insertTime" property="insertTime"/> |
| | | <result column="insertUser" property="insertUser"/> |
| | | <result column="updateTime" property="updateTime"/> |
| | | <result column="updateUser" property="updateUser"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="queryOpenCity" resultType="OpenCity"> |
| | | select |
| | | id as id, |
| | | code as code, |
| | | lon as lon, |
| | | lat as lat, |
| | | isQualifications as isQualifications, |
| | | areaName as areaName, |
| | | cityName as cityName, |
| | | provinceName as provinceName, |
| | | flag as flag, |
| | | insertTime as insertTime, |
| | | insertUser as insertUser, |
| | | updateTime as updateTime, |
| | | updateUser as updateUser |
| | | from t_open_city where flag = 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="queryByCode" resultType="OpenCity"> |
| | | select |
| | | id as id, |
| | | code as code, |
| | | lon as lon, |
| | | lat as lat, |
| | | isQualifications as isQualifications, |
| | | areaName as areaName, |
| | | cityName as cityName, |
| | | provinceName as provinceName, |
| | | flag as flag, |
| | | insertTime as insertTime, |
| | | insertUser as insertUser, |
| | | updateTime as updateTime, |
| | | updateUser as updateUser |
| | | from t_open_city where flag = 1 and code = #{code} |
| | | </select> |
| | | </mapper> |
| | |
| | | <result column="platform" property="platform"/> |
| | | <result column="phone" property="phone" /> |
| | | <result column="companyId" property="companyId"/> |
| | | <result column="openCityId" property="openCityId"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | type as type, |
| | | platform as platform, |
| | | phone as phone, |
| | | companyId as companyId |
| | | from t_phone where companyId in ( |
| | | select companyId from t_company_city where state = 1 |
| | | <if test="null != province"> |
| | | and provinceCode = #{province} |
| | | </if> |
| | | <if test="null != city"> |
| | | and cityCode = #{city} |
| | | </if> |
| | | <if test="null != code"> |
| | | and areaCode = #{code} |
| | | </if> |
| | | ) |
| | | companyId as companyId, |
| | | openCityId as openCityId |
| | | from t_phone where openCityId = #{openCityId} |
| | | </select> |
| | | |
| | | |
| | |
| | | <if test="null != type"> |
| | | and type = #{type} |
| | | </if> |
| | | <if test="null != companyId"> |
| | | and companyId = #{companyId} |
| | | <if test="null != platform"> |
| | | and platform = #{platform} |
| | | </if> |
| | | <if test="null != openCityId"> |
| | | and openCityId = #{openCityId} |
| | | </if> |
| | | </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> |
| | |
| | | <result column="money" property="money"/> |
| | | <result column="isSpecialCar" property="isSpecialCar"/> |
| | | <result column="isTaxiCar" property="isTaxiCar"/> |
| | | <result column="openCityId" property="openCityId"/> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <select id="queryMoney" resultType="double"> |
| | | select money from t_sys_reformist where companyId = #{companyId} |
| | | select money from t_sys_reformist where openCityId = #{openCityId} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | |
| | | /** |
| | | * 开通城市 |
| | | */ |
| | | @TableName("t_open_city") |
| | | public class OpenCity extends BaseBean { |
| | | /** |
| | | * 城市编号(行政编号) |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("lon") |
| | | private Double lon; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("lat") |
| | | private Double lat; |
| | | /** |
| | | * 是否需要网约车资格(1:是,2:否) |
| | | */ |
| | | @TableField("isQualifications") |
| | | private Integer isQualifications; |
| | | /** |
| | | * 省名称 |
| | | */ |
| | | @TableField("areaName") |
| | | private String areaName; |
| | | /** |
| | | * 市名称 |
| | | */ |
| | | @TableField("cityName") |
| | | private String cityName; |
| | | /** |
| | | * 区县名称 |
| | | */ |
| | | @TableField("provinceName") |
| | | private String provinceName; |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public Integer getIsQualifications() { |
| | | return isQualifications; |
| | | } |
| | | |
| | | public void setIsQualifications(Integer isQualifications) { |
| | | this.isQualifications = isQualifications; |
| | | } |
| | | |
| | | public String getAreaName() { |
| | | return areaName; |
| | | } |
| | | |
| | | public void setAreaName(String areaName) { |
| | | this.areaName = areaName; |
| | | } |
| | | |
| | | public String getCityName() { |
| | | return cityName; |
| | | } |
| | | |
| | | public void setCityName(String cityName) { |
| | | this.cityName = cityName; |
| | | } |
| | | |
| | | public String getProvinceName() { |
| | | return provinceName; |
| | | } |
| | | |
| | | public void setProvinceName(String provinceName) { |
| | | this.provinceName = provinceName; |
| | | } |
| | | |
| | | public Double getLon() { |
| | | return lon; |
| | | } |
| | | |
| | | public void setLon(Double lon) { |
| | | this.lon = lon; |
| | | } |
| | | |
| | | public Double getLat() { |
| | | return lat; |
| | | } |
| | | |
| | | public void setLat(Double lat) { |
| | | this.lat = lat; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "OpenCity{" + |
| | | "code='" + code + '\'' + |
| | | ", lon=" + lon + |
| | | ", lat=" + lat + |
| | | ", isQualifications=" + isQualifications + |
| | | ", areaName='" + areaName + '\'' + |
| | | ", cityName='" + cityName + '\'' + |
| | | ", provinceName='" + provinceName + '\'' + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | 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{" + |
| | |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 推单距离(公里) |
| | | */ |
| | | @TableField("pushDistance") |
| | |
| | | */ |
| | | @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 + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | @TableField("companyId") |
| | | private Integer companyId; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | /** |
| | | * 金额 |
| | | */ |
| | | @TableField("money") |
| | |
| | | public void setCompanyId(Integer companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | public Double getMoney() { |
| | | return money; |
| | | } |
| | |
| | | */ |
| | | @TableField("deductMoney") |
| | | private Double deductMoney; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | |
| | | public void setDeductMoney(Double deductMoney) { |
| | | this.deductMoney = deductMoney; |
| | | } |
| | | |
| | | |
| | | public Integer getOpenCityId() { |
| | | return openCityId; |
| | | } |
| | | |
| | | public void setOpenCityId(Integer openCityId) { |
| | | this.openCityId = openCityId; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | 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; |
| | |
| | | */ |
| | | @ApiModelProperty("用户是否显示(1=是,2=否)") |
| | | private Integer userShow; |
| | | /** |
| | | * 开通城市id |
| | | */ |
| | | @TableField("openCityId") |
| | | private Integer openCityId; |
| | | |
| | | |
| | | public Integer getId() { |
| | |
| | | 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; |
| | |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | Map<String, Object> queryPhone(Integer uid) throws Exception; |
| | | Map<String, Object> queryPhone(Integer uid, String code) throws Exception; |
| | | |
| | | |
| | | /** |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import com.stylefeng.guns.modular.system.model.OpenCity; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface IOpenCityService extends IService<OpenCity> { |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市列表 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | List<BaseWarpper> queryOpenCity() throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 判断是否是开通城市 |
| | | * @param code |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | boolean openCity(String code) 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; |
| | | } |
| | |
| | | |
| | | @Autowired |
| | | private ICompanyCityService companyCityService; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private GDFalconUtil gdFalconUtil; |
| | |
| | | private CarServiceMapper carServiceMapper; |
| | | |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | |
| | | |
| | | private String salt = "SA;d5#"; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private OrderPrivateCarMapper orderPrivateCarMapper; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private OrderCrossCityMapper orderCrossCityMapper; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private OrderTaxiMapper orderTaxiMapper; |
| | | |
| | | @Autowired |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryPhone(String code) throws Exception { |
| | | Company query = companyCityService.query(code); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(null == query){ |
| | | map.put("phone", ""); |
| | | }else{ |
| | | Phone phone = phoneMapper.queryInfo(query.getId(), 2); |
| | | map.put("phone", null != phone ? phone.getPhone() : ""); |
| | | } |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("phone", null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | |
| | |
| | | loginWarpper.setRongYunToken(token1.getToken()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(phone); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(phone); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryPhone(Integer uid) throws Exception { |
| | | public Map<String, Object> queryPhone(Integer uid, String code) throws Exception { |
| | | Driver driver = this.selectById(uid); |
| | | Company company = companyMapper.selectById(driver.getFranchiseeId() != null && driver.getFranchiseeId() != 0 ? driver.getFranchiseeId() : ( |
| | | driver.getCompanyId() != null && driver.getCompanyId() != 0 ? driver.getCompanyId() : 1)); |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | Company company = companyMapper.selectById(driver.getCompanyId()); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(company.getType() == 3){//加盟商 |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("branch", ""); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("franchisee", null != phone ? phone.getPhone() : ""); |
| | | company = companyMapper.selectById(company.getSuperiorId()); |
| | | if(null != company){ |
| | | phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("branch", null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("branch", ""); |
| | | } |
| | | company = companyMapper.selectById(company.getSuperiorId()); |
| | | if(null != company){ |
| | | phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("platform", null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | phone = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | if(company.getType() == 2){//分公司 |
| | | map.put("franchisee", ""); |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("branch", null != phone ? phone.getPhone() : ""); |
| | | company = companyMapper.selectById(company.getSuperiorId()); |
| | | if(null != company){ |
| | | phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | phone = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | | if(company.getType() == 1){//平台 |
| | | map.put("franchisee", ""); |
| | | map.put("branch", ""); |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2, 1); |
| | | map.put("platform", null != phone ? phone.getPhone() : ""); |
| | | return map; |
| | | } |
| | |
| | | loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
| | |
| | | loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
| | |
| | | loginWarpper.setAppid(UUIDUtil.getRandomCode()); |
| | | |
| | | //创建高德猎鹰的终端数据 |
| | | String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | loginWarpper.setTerminalId(tid); |
| | | // String tid = gdFalconUtil.createTerminal(driver.getPhone()); |
| | | // loginWarpper.setServerId(gdFalconUtil.getServerId()); |
| | | // loginWarpper.setTerminalId(tid); |
| | | return ResultUtil.success(loginWarpper); |
| | | } |
| | | |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | 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 |
| | | public class OpenCityServiceImpl extends ServiceImpl<OpenCityMapper, OpenCity> implements IOpenCityService { |
| | | |
| | | @Resource |
| | | private OpenCityMapper openCityMapper; |
| | | |
| | | @Autowired |
| | | private GDMapGeocodingUtil gdMapGeocodingUtil; |
| | | |
| | | |
| | | /** |
| | | * 获取开通城市列表 |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public List<BaseWarpper> queryOpenCity() throws Exception { |
| | | List<OpenCity> openCities = openCityMapper.queryOpenCity(); |
| | | List<BaseWarpper> list = new ArrayList<>(); |
| | | for(OpenCity c : openCities){ |
| | | BaseWarpper baseWarpper = new BaseWarpper(); |
| | | baseWarpper.setId(c.getId()); |
| | | baseWarpper.setName(ToolUtil.isEmpty(c.getProvinceName()) ? |
| | | (ToolUtil.isEmpty(c.getCityName()) ? (ToolUtil.isEmpty(c.getAreaName()) ? "" : c.getAreaName()) : c.getCityName()) : c.getProvinceName()); |
| | | baseWarpper.setLon(null != c.getLon() ? c.getLon() : 0); |
| | | baseWarpper.setLat(null != c.getLat() ? c.getLat() : 0); |
| | | baseWarpper.setContent(c.getCode()); |
| | | baseWarpper.setName(baseWarpper.getName().replaceAll("市辖区", "")); |
| | | list.add(baseWarpper); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断是否是开通城市 |
| | | * @param code |
| | | * @return |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public boolean openCity(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | List<OpenCity> openCities = openCityMapper.queryByCode(code); |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(city); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(province); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public OpenCity openCity1(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | List<OpenCity> openCities = openCityMapper.queryByCode(code); |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(city); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | openCities = openCityMapper.queryByCode(province); |
| | | } |
| | | if(openCities.size() == 0){ |
| | | return null; |
| | | } |
| | | 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); |
| | | } |
| | | } |
| | |
| | | import com.stylefeng.guns.modular.system.model.OrderPosition; |
| | | import com.stylefeng.guns.modular.system.service.IAdditionalFeeService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.IOpenCityService; |
| | | import com.stylefeng.guns.modular.system.service.IOrderService; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.warpper.BaseWarpper; |
| | | import com.stylefeng.guns.modular.system.warpper.OrderListWarpper; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import org.redisson.api.RLock; |
| | | import org.redisson.api.RedissonClient; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | |
| | | |
| | | @Autowired |
| | | private IAdditionalFeeService additionalFeeService; |
| | | |
| | | @Autowired |
| | | private RedissonClient redissonClient; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil grabOrder(Integer orderId, Integer orderType, Integer uid) throws Exception { |
| | | public ResultUtil grabOrder(Integer orderId, Integer orderType, Integer uid) throws Exception { |
| | | //专车和出租是批量下单,所以这里需要将两种类型的抢单操作通过一个锁来一起控制 |
| | | if(1 == orderType || 2 == orderType){ |
| | | RLock lock = redissonClient.getLock("grabOrder:" + orderId); |
| | | if(!lock.tryLock()){ |
| | | return ResultUtil.error("抢单失败,请稍后重试"); |
| | | } |
| | | try { |
| | | if(1 == orderType){ |
| | | return orderPrivateCarService.grabOrder(orderId, uid); |
| | | } |
| | | if(2 == orderType){ |
| | | return orderTaxiService.grabOrder(orderId, uid); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | lock.unlock(); |
| | | } |
| | | } |
| | | switch (orderType){ |
| | | case 1://专车 |
| | | return orderPrivateCarService.grabOrder(orderId, uid); |
| | | case 2://出租 |
| | | return orderTaxiService.grabOrder(orderId, uid); |
| | | case 3://城际 |
| | | return ResultUtil.success();//不作任何操作,跨城默认选择的司机 |
| | | case 4://同城小件 |
| | |
| | | */ |
| | | @Override |
| | | public Double queryReassignMoney(Integer orderId, Integer orderType) throws Exception { |
| | | Integer companyId = null; |
| | | Integer openCityId = null; |
| | | switch (orderType){ |
| | | case 1://专车 |
| | | companyId = orderPrivateCarService.selectById(orderId).getCompanyId(); |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()).getId(); |
| | | break; |
| | | case 2://出租 |
| | | companyId = orderTaxiService.selectById(orderId).getCompanyId(); |
| | | OrderTaxi orderTaxi = orderTaxiService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()).getId(); |
| | | break; |
| | | case 3://城际 |
| | | companyId = orderCrossCityService.selectById(orderId).getCompanyId(); |
| | | OrderCrossCity orderCrossCity = orderCrossCityService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderCrossCity.getStartLon().toString(), orderCrossCity.getStartLat().toString()).getId(); |
| | | break; |
| | | case 4://同城小件 |
| | | companyId = orderLogisticsService.selectById(orderId).getCompanyId(); |
| | | OrderLogistics orderLogistics = orderLogisticsService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderLogistics.getStartLon().toString(), orderLogistics.getStartLat().toString()).getId(); |
| | | break; |
| | | case 5://跨城小件 |
| | | companyId = orderLogisticsService.selectById(orderId).getCompanyId(); |
| | | OrderLogistics orderLogistics1 = orderLogisticsService.selectById(orderId); |
| | | openCityId = openCityService.openCity1(orderLogistics1.getStartLon().toString(), orderLogistics1.getStartLat().toString()).getId(); |
| | | |
| | | break; |
| | | case 6: |
| | | break; |
| | | } |
| | | return sysReformistMapper.queryMoney(companyId); |
| | | return sysReformistMapper.queryMoney(openCityId); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | //调用移动的小号接口 |
| | | Driver driver = driverService.selectById(orderPrivateCar.getDriverId()); |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderPrivateCar.setTelX(map.get("telX")); |
| | | orderPrivateCar.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderPrivateCar.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderPrivateCar.setTelX(map.get("telX")); |
| | | // orderPrivateCar.setBindId(map.get("bindId")); |
| | | // } |
| | | orderPrivateCarService.updateById(orderPrivateCar); |
| | | } |
| | | break; |
| | |
| | | } |
| | | //调用移动的小号接口 |
| | | Driver driver = driverService.selectById(orderTaxi.getDriverId()); |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderTaxi.setTelX(map.get("telX")); |
| | | orderTaxi.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderTaxi.setTelX(map.get("telX")); |
| | | // orderTaxi.setBindId(map.get("bindId")); |
| | | // } |
| | | orderTaxiService.updateById(orderTaxi); |
| | | } |
| | | break; |
| | |
| | | } |
| | | //调用移动的小号接口 |
| | | Driver driver = driverService.selectById(orderCrossCity.getDriverId()); |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderCrossCity.setTelX(map.get("telX")); |
| | | orderCrossCity.setBindId(map.get("bindId")); |
| | | } |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderCrossCity.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderCrossCity.setTelX(map.get("telX")); |
| | | // orderCrossCity.setBindId(map.get("bindId")); |
| | | // } |
| | | orderCrossCityService.updateById(orderCrossCity); |
| | | } |
| | | break; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | 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; |
| | |
| | | |
| | | @Resource |
| | | private PhoneMapper phoneMapper; |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | /** |
| | | * 获取所有系统电话 |
| | |
| | | */ |
| | | @Override |
| | | public List<Phone> queryPhones(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | |
| | | List<Phone> 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); |
| | | } |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | List<Phone> list = phoneMapper.queryPhones(openCity.getId()); |
| | | return list; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryCustomerPhone(String code) throws Exception { |
| | | String province = code.substring(0, 2) + "0000"; |
| | | String city = code.substring(0, 4) + "00"; |
| | | |
| | | OpenCity openCity = openCityService.openCity1(code); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //平台电话 |
| | | Phone query = phoneMapper.query(2, 1, null, null, null); |
| | | Phone query = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform", null != query ? query.getPhone() : ""); |
| | | |
| | | //公司 |
| | | query = phoneMapper.query(2, null, province, city, code); |
| | | if(query == null){ |
| | | query = phoneMapper.query(2, null, province, city, null); |
| | | } |
| | | if(query == null){ |
| | | query = phoneMapper.query(2, null, province, null, null); |
| | | } |
| | | query = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("company", null != query ? query.getPhone() : ""); |
| | | |
| | | //调度电话 |
| | | query = phoneMapper.query(3, null, province, city, code); |
| | | if(query == null){ |
| | | query = phoneMapper.query(3, null, province, city, null); |
| | | } |
| | | if(query == null){ |
| | | query = phoneMapper.query(3, null, province, null, null); |
| | | } |
| | | query = phoneMapper.queryInfo(openCity.getId(), 3, null); |
| | | map.put("scheduling", null != query ? query.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.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.taxi.model.OrderTaxi; |
| | | import com.stylefeng.guns.modular.taxi.service.IOrderTaxiService; |
| | | import com.stylefeng.guns.modular.taxi.service.impl.OrderTaxiServiceImpl; |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | |
| | | @Autowired |
| | | private IPushOrderService pushOrderService; |
| | | |
| | | @Autowired |
| | | private IOpenCityService openCityService; |
| | | |
| | | @Autowired |
| | | private PushUtil pushUtil; |
| | |
| | | if (ToolUtil.isNotEmpty(vehicle)) { |
| | | integers = JSON.parseArray(vehicle).toJavaList(Integer.class); |
| | | } |
| | | Company query = companyCityService.query(String.valueOf(orderTaxi.getStartLon()), String.valueOf(orderTaxi.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 2, query.getId());//获取需要推送的次数 |
| | | OpenCity openCity = openCityService.openCity1(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 2, openCity.getId());//获取需要推送的次数 |
| | | for (int i = 1; i <=6; i++) { |
| | | PushOrder pushOrder = pushOrderService.querys(i, 2, query.getId()).get(0); |
| | | int finalI = i; |
| | | PushOrder pushOrder = querys.stream().filter(s -> s.getType() == (finalI <= 3 ? finalI : 3)).findFirst().orElse(null); |
| | | System.out.println("pushOrder:" + pushOrder); |
| | | //获取空闲司机 |
| | | List<Driver> list = driverService.queryIdleDriver(2, orderTaxi.getStartLon(), orderTaxi.getStartLat(), pushOrder.getPushDistance(), null);//所有附近空闲司机 |
| | |
| | | if(ToolUtil.isNotEmpty(vehicle)){ |
| | | integers = JSON.parseArray(vehicle).toJavaList(Integer.class); |
| | | } |
| | | Company query = companyCityService.query(String.valueOf(orderPrivateCar.getStartLon()), String.valueOf(orderPrivateCar.getStartLat()));//获取起点所属分公司 |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, query.getId());//获取需要推送的次数 |
| | | OpenCity openCity = openCityService.openCity1(orderPrivateCar.getStartLon().toString(), orderPrivateCar.getStartLat().toString()); |
| | | List<PushOrder> querys = pushOrderService.querys(null, 1, openCity.getId());//获取需要推送的次数 |
| | | for(int i = 1; i <= 6; i++){ |
| | | OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(id); |
| | | if (null == orderPrivateCar || orderPrivateCar.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); |
| | | System.out.println("pushOrder:"+pushOrder); |
| | | int i2 = pushOrder.getPushTime() / 10; |
| | | if(i2==0){ |
| | |
| | | public QianYunTongConfig getQianYunTongConfig() { |
| | | if("dev".equals(activeProfile)){ |
| | | this.appkey = "10001104"; |
| | | this.privateKeyPath = "C:\\Users\\Admin\\Desktop\\private_key_test.pem"; |
| | | this.privateKeyPath = "C:\\Users\\Administrator\\Desktop\\private_key_test.pem"; |
| | | this.userName = "xiaofei"; |
| | | this.status = "1"; |
| | | this.setApiUrl("https://test-zhongtai.stqcloud.com:10070"); |
| | |
| | | */ |
| | | public class SM4Util { |
| | | private static final String ALGORITHM_NAME = "SM4"; |
| | | |
| | | |
| | | private static final String ALGORITHM_MODE = "SM4/ECB/PKCS5Padding"; |
| | | |
| | | |
| | | |
| | | |
| | | static { |
| | | Security.addProvider(new BouncyCastleProvider()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生成 SM4 密钥 |
| | | * @return 密钥的 Base64 编码字符串 |
| | |
| | | SecretKey secretKey = kg.generateKey(); |
| | | return Base64.getEncoder().encodeToString(secretKey.getEncoded()); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * SM4 加密 |
| | | * @param plainText 明文 |
| | |
| | | byte[] encryptedBytes = cipher.doFinal(plainText.getBytes(StandardCharsets.UTF_8)); |
| | | return Base64.getEncoder().encodeToString(encryptedBytes); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * SM4 解密 |
| | | * @param cipherText 密文的 Base64 编码字符串 |
| | |
| | | byte[] decryptedBytes = cipher.doFinal(cipherBytes); |
| | | return new String(decryptedBytes, StandardCharsets.UTF_8); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | // 生成密钥 |
| | | String key = generateKey(); |
| | | System.out.println("生成的密钥: " + key); |
| | | |
| | | |
| | | // 明文 |
| | | String plainText = "Hello, SM4!"; |
| | | System.out.println("明文: " + plainText); |
| | | |
| | | |
| | | // 加密 |
| | | String cipherText = encrypt(plainText, key); |
| | | System.out.println("密文: " + cipherText); |
| | | |
| | | |
| | | // 解密 |
| | | String decryptedText = decrypt(cipherText, key); |
| | | System.out.println("解密后的明文: " + decryptedText); |
| | |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public synchronized ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | public ResultUtil grabOrder(Integer orderId, Integer uid) throws Exception { |
| | | OrderPrivateCar orderPrivateCar1 = orderPrivateCarService.selectById(orderId); |
| | | if(null != orderPrivateCar1 && orderPrivateCar1.getType() == 3 && orderPrivateCar1.getState() != 1&& orderPrivateCar1.getState() != 11){ |
| | | return ResultUtil.error("订单已被抢了"); |
| | |
| | | orderTaxi.setSnatchOrderTime(new Date()); |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderTaxi.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 |
| | | Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | if(String.valueOf(map.get("code")).equals("200")){ |
| | | orderTaxi.setTelX(map.get("telX")); |
| | | orderTaxi.setBindId(map.get("bindId")); |
| | | } |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderTaxi.setTrackId(track); |
| | | // |
| | | // //调用移动的小号接口 |
| | | // Map<String, String> map = chinaMobileUtil.midAxbBindSend(orderTaxi.getPassengersPhone(), driver.getPhone(), (System.currentTimeMillis() + 86400000)); |
| | | // if(String.valueOf(map.get("code")).equals("200")){ |
| | | // orderTaxi.setTelX(map.get("telX")); |
| | | // orderTaxi.setBindId(map.get("bindId")); |
| | | // } |
| | | |
| | | this.updateById(orderTaxi); |
| | | |
| | |
| | | } |
| | | |
| | | //调用高德创建轨迹 |
| | | String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | String track = gdFalconUtil.createTrack(s); |
| | | orderTaxi.setTrackId(track); |
| | | // String s = gdFalconUtil.selectTerminal(driver.getPhone()); |
| | | // String track = gdFalconUtil.createTrack(s); |
| | | // orderTaxi.setTrackId(track); |
| | | |
| | | //调用移动的小号接口 TODO 车载端使用真实号码 |
| | | // Map<String, String> geocode = gdMapGeocodingUtil.geocode(orderTaxi.getStartLon().toString(), orderTaxi.getStartLat().toString()); |
| | |
| | | max-request-size: 100MB |
| | | max-file-size: 100MB |
| | | redis: |
| | | host: 127.0.0.1 |
| | | host: 192.168.110.80 |
| | | port: 6379 |
| | | password: 123456 |
| | | database: 0 |
| | |
| | | appletsAppSecret: 5610fc6126255ca5f7bd9fa4330338b6 # |
| | | mchId: 111 #微信支付分配的商户号 |
| | | key: 111 #key为商户平台设置的密钥key: |
| | | url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1} |
| | | |
| | | --- |
| | | |
| | |
| | | server: |
| | | port: 8007 |
| | | |
| | | guns: |
| | | swagger-open: true #是否开启swagger (true/false) |
| | | kaptcha-open: false #是否开启登录时验证码 (true/false) |
| | | file-upload-path: d:/tmp #文件上传目录(不配置的话为java.io.tmpdir目录) |
| | | picture-server-address: http://192.168.0.43/resources/ #图片服务器地址 |
| | | spring-session-open: false #是否开启spring session,如果是多机环境需要开启(true/false) |
| | | session-invalidate-time: 1800 #session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒 |
| | | session-validation-interval: 900 #多久检测一次失效的session(只在单机环境下生效) 单位:秒 |
| | | |
| | | spring: |
| | | application: |
| | | name: driver-server |
| | | profiles: |
| | | active: dev |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | | prefix: /WEB-INF/view |
| | | devtools: |
| | | restart: |
| | | enabled: false |
| | | additional-paths: src/main/java |
| | | exclude: static/**,WEB-INF/view/** |
| | | servlet: |
| | | multipart: |
| | | max-request-size: 100MB |
| | | max-file-size: 100MB |
| | | redis: |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | password: 123456 |
| | | database: 0 |
| | | timeout: 1000 |
| | | # cluster: |
| | | # nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | |
| | | mybatis-plus: |
| | | typeAliasesPackage: com.stylefeng.guns.modular |
| | | global-config: |
| | | id-type: 0 #0:数据库ID自增 1:用户输入id 2:全局唯一id(IdWorker) 3:全局唯一ID(uuid) |
| | | db-column-underline: false |
| | | configuration: |
| | | configuration.map-underscore-to-camel-case: true #是否开启自动驼峰命名规则(camel case)映射 |
| | | log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl #输出Sql,如需打印Sql注释该配置 |
| | | |
| | | |
| | | eureka: |
| | | client: |
| | | service-url: #注册中心地址 |
| | | defaultZone: http://sinata:sinata@127.0.0.1:8000/eureka #启用身份验证的方式连接 |
| | | register-with-eureka: true #在注册中心进行注册 |
| | | fetch-registry: true #从Eureka中获取注册信息。 |
| | | |
| | | --- |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: traffic_scusr |
| | | password: QYT_sc@20#25 |
| | | db-name: traffic_scdb #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | --- |
| | | spring: |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.195:27017,172.21.35.196:27017/traveling_track |
| | | |
| | | --- |
| | | |
| | | wx: |
| | | grantType: authorization_code #填authorization_code |
| | | appid: 111 #应用唯一标识,在微信开放平台提交应用审核通过后获得 |
| | | appSecret: 111 #应用密钥AppSecret,在微信开放平台提交应用审核通过后获得 |
| | | appletsAppid: wxcc3c9058e2b294db #小程序APPid |
| | | appletsAppSecret: 5610fc6126255ca5f7bd9fa4330338b6 # |
| | | mchId: 111 #微信支付分配的商户号 |
| | | key: 111 #key为商户平台设置的密钥key: |
| | | url: https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1} |
| | | rongyun: |
| | | app_key: bmdehs6pbnozs |
| | | app_secret: RovVwtABN1 |
| | | --- |
| | | |
| | | alipay: |
| | | appid: 111 #应用程序唯一标识 |
| | | appPrivateKey: 111 #开发者应用私钥 |
| | | alipayPublicKey: 1 #应用公钥 |
| | | alipay_public_key: 111 #支付宝公钥 |
| | | |
| | | --- |
| | | |
| | | juhe: #聚合数据 |
| | | appKey: 111 # |
| | | |
| | | |
| | | --- |
| | | |
| | | jiguang: |
| | | appKey-driver: 111 #极光推送应用唯一标识 |
| | | masterSecret-driver: 111 #用于服务器端 API 调用时与 AppKey 配合使用达到鉴权的目的 |
| | | appKey-dispatch: 111 #极光推送应用唯一标识 |
| | | masterSecret-dispatch: 111 #用于服务器端 API 调用时与 AppKey 配合使用达到鉴权的目的 |
| | | |
| | | |
| | | --- |
| | | |
| | | #支付回调地址 |
| | | #正式环境 |
| | | callbackPath: https://traffic.qytzt.cn/driver |
| | | |
| | | --- |
| | | #交通部推送数据功能开关 |
| | | pushMinistryOfTransport: false |
| | | |
| | | active: "@spring.active@" |
| | |
| | | max-request-size: 500MB |
| | | max-file-size: 500MB |
| | | redis: |
| | | host: 127.0.0.1 |
| | | host: 192.168.110.80 |
| | | port: 6379 |
| | | password: 123456 |
| | | |
| | |
| | | <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;"> |
| | |
| | | port: 6000 |
| | | spring: |
| | | profiles: |
| | | # active: dev |
| | | active: prod |
| | | active: dev |
| | | # active: prod |
| | | application: |
| | | name: message #服务名称 |
| | | servlet: |
| | |
| | | max-request-size: 100MB |
| | | max-file-size: 100MB |
| | | redis: |
| | | host: 172.21.35.151 |
| | | port: 6512 |
| | | password: SC_cache@20#25 |
| | | database: 0 |
| | | timeout: 1000 |
| | | cluster: |
| | | nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | host: 192.168.110.80 |
| | | port: 6379 |
| | | password: 123456 |
| | | # host: 172.21.35.151 |
| | | # port: 6512 |
| | | # password: SC_cache@20#25 |
| | | # database: 0 |
| | | # timeout: 1000 |
| | | # cluster: |
| | | # nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | |
| | |
| | | <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; |
| | |
| | | // CreateTravelItineraryRequest request = new CreateTravelItineraryRequest(); |
| | | // request.setScene("TRAFFIC"); |
| | | // request.setPartnerId("522700"); |
| | | // request.setOrderNo("123456"); |
| | | // request.setOrderNo("0123456"); |
| | | // request.setCustomerId("11448156"); |
| | | // request.setDriverId("11448158"); |
| | | // request.setSupplierShopId("981100006005951"); |
| | | // request.setServiceType(1); |
| | | // String travelItinerary = createTravelItinerary(request); |
| | | // System.err.println(travelItinerary);//1948565171253956608 |
| | | // System.err.println(travelItinerary);//1948685426689200128 |
| | | |
| | | //修改行程状态 |
| | | // ModifyTravelItineraryRequest request = new ModifyTravelItineraryRequest(); |
| | | // request.setScene("TRAFFIC"); |
| | | // request.setPartnerId("522700"); |
| | | // request.setOrderId("1948565171253956608"); |
| | | // request.setOrderId("1948685426689200128"); |
| | | // request.setStatus(7); |
| | | // request.setDriverId("11448158"); |
| | | // request.setSupplierShopId("981100006005951"); |
| | |
| | | // tradeOrderCreateData.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"0\"}"); |
| | | // tradeOrderCreateData.setCharge(new BigDecimal("0.01")); |
| | | // tradeOrderCreateData.setChannelSource("GRJYCXWXXCX"); |
| | | // tradeOrderCreateData.setOrderId("1948565171253956608"); |
| | | // tradeOrderCreateData.setOrderNo("123456"); |
| | | // tradeOrderCreateData.setOrderId("1948685426689200128"); |
| | | // tradeOrderCreateData.setOrderNo("0123456"); |
| | | // tradeOrderCreateData.setCustomerId("11448156"); |
| | | // tradeOrderCreateData.setPayPartnerId("5400004"); |
| | | // tradeOrderCreateData.setPartnerPayId("1948565171253956608"); |
| | | // tradeOrderCreateData.setPartnerPayId("1948685426689200128"); |
| | | // tradeOrderCreateData.setCurrency("RMB"); |
| | | // tradeOrderCreateData.setTotalFee("1"); |
| | | // tradeOrderCreateData.setRetUrl("/home/"); |
| | |
| | | // |
| | | // List<GoodsInfoRequest> goodsInfo = new ArrayList<>(); |
| | | // GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest(); |
| | | // goodsInfoRequest.setId("1"); |
| | | // goodsInfoRequest.setSubAppId(QianYunTongProperties.appId); |
| | | // goodsInfoRequest.setId("981100006005901"); |
| | | // goodsInfoRequest.setSubAppId("wxcbad113185a243e1"); |
| | | // goodsInfoRequest.setSubOpenId("oVLur6yFtED8ruXBWUFKXjzXJ_BQ"); |
| | | // goodsInfoRequest.setProfitSharing("1"); |
| | | // goodsInfoRequest.setAreaInfo("520100"); |
| | | // goodsInfoRequest.setPayType("0"); |
| | | // goodsInfoRequest.setBusinessType("10408"); |
| | | // goodsInfo.add(goodsInfoRequest); |
| | | // tradeOrderCreateData.setGoodsInfo(goodsInfo); |
| | | // TradeOrderCreate tradeOrderCreate = tradeOrderCreate1(tradeOrderCreateData); |
| | | // System.err.println(tradeOrderCreate); |
| | | // //TradeOrderCreate(orderInfo=OrderInfo(orderId=1948565171253956608, status=null), payInfo=PayInfo(retCode=000000, retMsg=success, success=true, data=PayInfoData(redirectUrl=https://qhsctest.qytzt.cn/gray/mobile/index.html?f=allCashDesk&accessToken=5nUBXayFpfZz%2FXUZiMu9LyWg15VM5hbmhIjUt0hdmws%3D, payId=540000420250725000135518, status=null, payTime=null, payFee=null, paymentInfos=null), sign=ea01f3b186be02e43367b856fd2ec699)) |
| | | // //TradeOrderCreate(orderInfo=OrderInfo(orderId=1948685426689200128, status=null), payInfo=PayInfo(retCode=000000, retMsg=success, success=true, data=PayInfoData(redirectUrl=https://qhsctest.qytzt.cn/gray/mobile/index.html?f=allCashDesk&accessToken=5nUBXayFpfZz%2FXUZiMu9L61szNy2MhjTJ938TeNnX0U%3D, payId=540000420250725000135548, status=null, payTime=null, payFee=null, paymentInfos=null), sign=c9d849ee21dcc401cee968d4d31de04f)) |
| | | |
| | | //查询支付单信息 |
| | | // GetPaymentInfoDataRequest getPaymentInfoDataRequest = new GetPaymentInfoDataRequest(); |
| | | // getPaymentInfoDataRequest.setPartnerId("5400004"); |
| | | // getPaymentInfoDataRequest.setPartnerPayId("1948565171253956608"); |
| | | // getPaymentInfoDataRequest.setPartnerPayId("1948685426689200128"); |
| | | // GetPaymentInfo getPaymentInfo = paymentInfo(getPaymentInfoDataRequest); |
| | | // System.err.println(getPaymentInfo); |
| | | |
| | | //拉起支付 |
| | | TradePayOff1Data tradePayOff1Data = new TradePayOff1Data(); |
| | | tradePayOff1Data.setPartnerId("5400004"); |
| | | tradePayOff1Data.setScene("TRAFFIC"); |
| | | tradePayOff1Data.setPartnerPayId("1948565171253956608"); |
| | | tradePayOff1Data.setCurrency("RMB"); |
| | | tradePayOff1Data.setTotalFee("1"); |
| | | tradePayOff1Data.setRetUrl("/home/"); |
| | | tradePayOff1Data.setClientIp("127.0.0.1"); |
| | | tradePayOff1Data.setNeedLoginFlag("N"); |
| | | tradePayOff1Data.setOrderDesc("出行订单支付"); |
| | | tradePayOff1Data.setAccessMode("H5"); |
| | | List<GoodsInfoRequest> goodsInfo = new ArrayList<>(); |
| | | GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest(); |
| | | goodsInfoRequest.setId("1"); |
| | | goodsInfoRequest.setSubAppId(QianYunTongProperties.appId); |
| | | goodsInfoRequest.setSubOpenId("oVLur6yFtED8ruXBWUFKXjzXJ_BQ"); |
| | | goodsInfoRequest.setProfitSharing("1"); |
| | | goodsInfo.add(goodsInfoRequest); |
| | | tradePayOff1Data.setGoodsInfo(goodsInfo); |
| | | PayInfo payInfo = tradePayOff1(tradePayOff1Data); |
| | | System.err.println(payInfo); |
| | | |
| | | |
| | | // TradePayOff1Data tradePayOff1Data = new TradePayOff1Data(); |
| | | // tradePayOff1Data.setPartnerId("5400004"); |
| | | // tradePayOff1Data.setScene("TRAFFIC"); |
| | | // tradePayOff1Data.setPartnerPayId("1948685426689200128"); |
| | | // tradePayOff1Data.setCurrency("RMB"); |
| | | // tradePayOff1Data.setTotalFee("1"); |
| | | // tradePayOff1Data.setRetUrl("/home/"); |
| | | // tradePayOff1Data.setClientIp("127.0.0.1"); |
| | | // tradePayOff1Data.setNeedLoginFlag("N"); |
| | | // tradePayOff1Data.setOrderDesc("出行订单支付"); |
| | | // tradePayOff1Data.setAccessMode("APP"); |
| | | // List<GoodsInfoRequest> goodsInfo = new ArrayList<>(); |
| | | // GoodsInfoRequest goodsInfoRequest = new GoodsInfoRequest(); |
| | | // goodsInfoRequest.setId("981100006005901"); |
| | | // goodsInfoRequest.setSubAppId("wxcbad113185a243e1"); |
| | | // goodsInfoRequest.setSubOpenId("oVLur6yFtED8ruXBWUFKXjzXJ_BQ"); |
| | | // goodsInfoRequest.setProfitSharing("1"); |
| | | // goodsInfoRequest.setAreaInfo("520100"); |
| | | // goodsInfoRequest.setPayType("0"); |
| | | // goodsInfoRequest.setBusinessType("10408"); |
| | | // goodsInfo.add(goodsInfoRequest); |
| | | // tradePayOff1Data.setGoodsInfo(goodsInfo); |
| | | // PayInfo payInfo = tradePayOff1(tradePayOff1Data); |
| | | // System.err.println(payInfo); |
| | | //PayInfo(retCode=000000, retMsg=success, success=true, data=PayInfoData(redirectUrl=https://qhsctest.qytzt.cn/gray/mobile/index.html?f=allCashDesk&accessToken=5nUBXayFpfZz%2FXUZiMu9LzeRXmqmlqaCS%2BHfu5udIt4%3D, payId=540000420250725000135549, status=null, payTime=null, payFee=null, paymentInfos=null), sign=8154ba2728280900b122c56352c1c7fe) |
| | | |
| | | |
| | | // (补偿单)拉起支付 |
| | | // TradePayOffData tradePayOffData = new TradePayOffData(); |
| | | // tradePayOffData.setPartnerId("5400004"); |
| | | // tradePayOffData.setScene("TRAFFIC"); |
| | | // tradePayOffData.setPartnerPayId("1948685426689200128"); |
| | | // tradePayOffData.setCurrency("RMB"); |
| | | // tradePayOffData.setTotalFee("1"); |
| | | // tradePayOffData.setRetUrl("/home/"); |
| | | // tradePayOffData.setClientIp("127.0.0.1"); |
| | | // tradePayOffData.setNeedLoginFlag("N"); |
| | | // tradePayOffData.setOrderDesc("出行订单支付"); |
| | | // tradePayOffData.setAccessMode("APP"); |
| | | // List<PaymentInfoRequest> paymentInfoRequests = new ArrayList<>(); |
| | | // PaymentInfoRequest paymentInfoRequest = new PaymentInfoRequest(); |
| | | // paymentInfoRequest.setPayModeId("501212"); |
| | | // paymentInfoRequests.add(paymentInfoRequest); |
| | | // tradePayOffData.setPaymentInfos(paymentInfoRequests); |
| | | // List<GoodsInfo> goodsInfo = new ArrayList<>(); |
| | | // GoodsInfo goodsInfo1 = new GoodsInfo(); |
| | | // goodsInfo1.setMerchantCode(""); |
| | | // goodsInfo1.setCustId(""); |
| | | // goodsInfo1.setCustName(""); |
| | | // goodsInfo1.setProfitSharing("1"); |
| | | // goodsInfo.add(goodsInfo1); |
| | | // tradePayOffData.setGoodsInfo(goodsInfo); |
| | | // PayInfo payInfo1 = tradePayOff(tradePayOffData); |
| | | // System.err.println(payInfo1); |
| | | |
| | | //订单创建 |
| | | // CreateOrderRequest createOrderRequest = new CreateOrderRequest(); |
| | | // createOrderRequest.setTreatShopId(""); |
| | | // createOrderRequest.setTreatShopId("11448158"); |
| | | // createOrderRequest.setOrderAppId("52270015"); |
| | | // createOrderRequest.setScene("TRAFFIC"); |
| | | // createOrderRequest.setPartnerId("522700"); |
| | | // createOrderRequest.setField1("{\"profitSharing\":\"0\",\"isPromote\":\"0\"}"); |
| | | // createOrderRequest.setField1("{\"profitSharing\":\"1\",\"isPromote\":\"0\"}"); |
| | | // createOrderRequest.setCharge(new BigDecimal("0.01")); |
| | | // createOrderRequest.setChannelSource("GRJYCXWXXCX"); |
| | | // createOrderRequest.setOrderId(""); |
| | | // createOrderRequest.setOrderNo(""); |
| | | // createOrderRequest.setCustomerId(""); |
| | | // createOrderRequest.setOrderId("1948685426689200128"); |
| | | // createOrderRequest.setOrderNo("0123456"); |
| | | // createOrderRequest.setCustomerId("11448156"); |
| | | // OrderInfo orderInfo = tradeOrderCreate(createOrderRequest); |
| | | // System.err.println(orderInfo); |
| | | |
| | | //行程单列表查询 |
| | | // GetTravelItineraryListRequest request = new GetTravelItineraryListRequest(); |
| | | // request.setScene("TRAFFIC"); |
| | | // request.setPartnerId("522700"); |
| | | // request.setCustomerId("11448156"); |
| | | // request.setOrderNo("0123456"); |
| | | // request.setDriverId("11448158"); |
| | | // ListPage<TravelItinerary> travelItineraryList = getTravelItineraryList(request); |
| | | // System.err.println(travelItineraryList); |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static PayInfo tradePayOff(TradePayOffData tradePayOffData) { |
| | | TradeRequest request = new TradeRequest<TradePayOffData>(); |
| | | request.setSceneId(QianYunTongProperties.sceneId); |
| | | request.setSceneId("1774717104844095488"); |
| | | request.setAppId(QianYunTongProperties.appkey); |
| | | request.setConfigVersion(1); |
| | | request.setRequestId(UUIDUtil.getRandomCode()); |
| | |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | | String privateKeyPath = "C:\\Users\\39373\\Desktop\\黔云通\\private_key_test.pem"; |
| | | String privateKeyPath = "C:\\Users\\Administrator\\Desktop\\private_key_test.pem"; |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | |
| | | * 分账标识。0:不分账,1:分账 |
| | | */ |
| | | private String profitSharing; |
| | | /** |
| | | * 地区标识,默认传520100 |
| | | */ |
| | | private String areaInfo; |
| | | /** |
| | | * 是否匿名。默认传0 |
| | | */ |
| | | private String payType; |
| | | /** |
| | | * 业务类型,默认传10408 |
| | | */ |
| | | private String businessType; |
| | | } |
| | |
| | | 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); |
| | |
| | | application: |
| | | name: user-server |
| | | profiles: |
| | | # active: dev |
| | | active: prod |
| | | active: dev |
| | | # active: prod |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | max-request-size: 100MB |
| | | max-file-size: 100MB |
| | | redis: |
| | | host: 172.21.35.151 |
| | | port: 6512 |
| | | password: SC_cache@20#25 |
| | | database: 0 |
| | | timeout: 1000 |
| | | cluster: |
| | | nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | host: 192.168.110.80 |
| | | port: 6379 |
| | | password: 123456 |
| | | # redis: |
| | | # host: 172.21.35.151 |
| | | # port: 6512 |
| | | # password: SC_cache@20#25 |
| | | # database: 0 |
| | | # timeout: 1000 |
| | | # cluster: |
| | | # nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | |
| | | mybatis-plus: |
| | | typeAliasesPackage: com.stylefeng.guns.modular |
| | |
| | | swagger: |
| | | base-package: com.stylefeng.guns.modular |
| | | |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: traffic_scusr |
| | | password: QYT_sc@20#25 |
| | | db-name: traffic_scdb #用来搜集数据库的所有表 |
| | | url: jdbc:mysql://192.168.110.80:3306/qyttravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: 123456 |
| | | db-name: qyttravel #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | |
| | | #spring: |
| | | # datasource: |
| | | # url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | # username: traffic_scusr |
| | | # password: QYT_sc@20#25 |
| | | # db-name: traffic_scdb #用来搜集数据库的所有表 |
| | | # filters: wall,mergeStat |
| | | |
| | | |
| | | --- |
| | | spring: |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.195:27017,172.21.35.196:27017/traveling_track |
| | | uri: mongodb://192.168.110.80:27017/traveling_track |
| | | # uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.195:27017,172.21.35.196:27017/traveling_track |
| | | |
| | | |
| | | --- |