Pu Zhibing
7 天以前 6e0bccef16f74b5aa80eb51d7792a36ed7e20c38
UserQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -66,25 +66,28 @@
    @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;
@@ -132,6 +135,9 @@
    
    @Resource
    private RedisTemplate<String, Object> redisTemplate;
    @Resource
    private ISystemPriceCityService systemPriceCityService;
    
    
    /**
@@ -509,18 +515,27 @@
                }
                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());//一口价