| | |
| | | |
| | | @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); |
| | | 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("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); |
| | | Phone phone = phoneMapper.queryInfo(openCity.getId(), 2, 2); |
| | | map.put("franchisee", null != phone ? phone.getPhone() : ""); |
| | | phone = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform", null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | 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); |
| | | phone = phoneMapper.queryInfo(openCity.getId(), 2, 1); |
| | | map.put("platform",null != phone ? phone.getPhone() : ""); |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | 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); |
| | | } |
| | | |