| | |
| | | break; |
| | | } |
| | | // HuaWeiSMSUtil.sendSms("[\"" + authCode + "\"]", phone, "8822061324669", templateCode); |
| | | String sData = aLiSendSms.sendSms(phone, "SMS_147415322", "{\"code\":\"" + authCode + "\"}"); |
| | | String sData = aLiSendSms.sendSms(phone, "SMS_467580138", "{\"code\":\"" + authCode + "\"}"); |
| | | // JSONObject jsonObject = JSON.parseObject(sData); |
| | | // String message = jsonObject.getString("Message"); |
| | | // if(!"OK".equals(message)){ |
| | |
| | | driver.setName(registeredWarpper.getName()); |
| | | driver.setSex(registeredWarpper.getSex()); |
| | | driver.setIdCard(registeredWarpper.getIdCard()); |
| | | |
| | | //设置人脸识别照片 |
| | | driver.setFaceImgUrl(registeredWarpper.getFaceImgUrl()); |
| | | |
| | | String code = registeredWarpper.getPlaceOfEmployment(); |
| | | Company query = companyCityService.query(code); |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private ITSysFaceDistinguishService faceDistinguishService; |
| | | /** |
| | | * 上下班操作 |
| | | * @param uid |
| | |
| | | public ResultUtil work(Integer uid, String type) throws Exception { |
| | | DriverWork driverWork = driverWorkMapper.queryNewWork(uid, null, 1); |
| | | Driver driver = this.selectById(uid); |
| | | if (driver.getCarId()==null){ |
| | | return ResultUtil.error("请先绑定车辆"); |
| | | } |
| | | if(null != driverWork){//作下班操作 |
| | | //检测是否有未完成的订单 |
| | | List<Map<String, Object>> list = orderService.queryOrderList(1, 1, 10, uid); |
| | |
| | | } |
| | | }).start(); |
| | | }else{ |
| | | //拿到后台配置的人脸识别配置 |
| | | TSysFaceDistinguish tSysFaceDistinguish = faceDistinguishService.selectOne(null); |
| | | //如果是关闭就结束 |
| | | if (tSysFaceDistinguish.getIsOpen()!=2){ |
| | | if (driver.getFailCount()>=5){ |
| | | return ResultUtil.error("请进行人脸认证后重试"); |
| | | } |
| | | } |
| | | |
| | | driverWork = new DriverWork(); |
| | | driverWork.setState(1); |
| | | driverWork.setDriverId(uid); |
| | |
| | | if(Integer.valueOf(t) == 3){ |
| | | CarService query1 = carServiceMapper.query(3, driver.getCarId()); |
| | | if(query1 == null){ |
| | | return ResultUtil.error("车辆未添加直通车服务"); |
| | | return ResultUtil.error("车辆未添加跨城服务"); |
| | | } |
| | | } |
| | | DriverOrders query = driverOrdersMapper.query(uid, Integer.valueOf(t)); |
| | |
| | | baseWarpper.setName("出租车"); |
| | | break; |
| | | case 3: |
| | | baseWarpper.setName("直通车"); |
| | | baseWarpper.setName("城际拼车"); |
| | | break; |
| | | case 4: |
| | | baseWarpper.setName("同城小件物流"); |
| | |
| | | break; |
| | | case 6: |
| | | baseWarpper.setName("包车"); |
| | | break; |
| | | case 7: |
| | | baseWarpper.setName("接送机/站"); |
| | | break; |
| | | } |
| | | maps.add(baseWarpper); |
| | |
| | | this.updateById(driver1); |
| | | |
| | | smsrecordService.saveData(7, phone, code, "短信验证码【" + code + "】已发到您的手机,验证码将在5分钟后失效,请及时登录!"); |
| | | |
| | | DriverWork driverWork = driverWorkMapper.queryNewWork(uid, null, 1); |
| | | if (driverWork==null){ |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | //检测是否有未完成的订单 |
| | | List<Map<String, Object>> list = orderService.queryOrderList(1, 1, 10, uid); |
| | | if(list.size() > 0){ |
| | | return ResultUtil.error("还有未完成的订单,不能进行下班操作"); |
| | | } |
| | | driverWork.setEndTime(new Date()); |
| | | driverWork.setState(2); |
| | | driverWorkMapper.updateById(driverWork); |
| | | driver1.setState(1); |
| | | this.updateById(driver1); |
| | | |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | if(pushMinistryOfTransport){//上传数据 |
| | | pushMinistryOfTransportUtil.operateLogout(uid); |
| | | } |
| | | } |
| | | }).start(); |
| | | |
| | | |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public Map<String, Object> queryPhone(Integer uid) throws Exception { |
| | | public Map<String, Object> queryPhone(Integer uid,String wechat) 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)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("wechatUrl",wechat); |
| | | if(company.getType() == 3){//加盟商 |
| | | Phone phone = phoneMapper.queryInfo(company.getId(), 2); |
| | | map.put("franchisee", null != phone ? phone.getPhone() : ""); |
| | |
| | | }else{ |
| | | map.put("platform", ""); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | if(company.getType() == 2){//分公司 |
| | |
| | | |
| | | break; |
| | | case 3: |
| | | sb.append("直通车"); |
| | | sb.append("跨城"); |
| | | break; |
| | | case 4: |
| | | break; |
| | |
| | | DriverActivityOrder driverActivityOrder = driverActivityOrderMapper.selectById(dah.getActivityId()); |
| | | activityWarpper.setId(driverActivityOrder.getId()); |
| | | activityWarpper.setContent("今日" + driverActivityOrder.getStart() + "-" + driverActivityOrder.getEnd() + "累计接单" + driverActivityOrder.getOrderNum() + "单奖励" + driverActivityOrder.getMoney() + "元"); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("H:m"); |
| | | Date start = sdf.parse(driverActivityOrder.getStart()); |
| | | Date end = sdf.parse(driverActivityOrder.getEnd()); |
| | | Integer integer = orderService.queryOrderNum(uid, start, end); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | |
| | | Integer integer = orderService.queryOrderNum(uid, sdf1.parse(sdf.format(new Date()) + " " + driverActivityOrder.getStart() + ":00"), sdf1.parse(sdf.format(new Date()) + " " + driverActivityOrder.getEnd() + ":59")); |
| | | activityWarpper.setCarryOut(integer > driverActivityOrder.getOrderNum() ? driverActivityOrder.getOrderNum() + "/" + driverActivityOrder.getOrderNum() : integer + "/" + driverActivityOrder.getOrderNum()); |
| | | break; |
| | | } |
| | |
| | | DriverActivityOrder dao = driverActivityOrderMapper.selectById(dah.getActivityId()); |
| | | Integer integer = orderService.queryOrderNum(dah.getDriverId(), sdf1.parse(sdf.format(new Date()) + " " + dao.getStart() + ":00"), |
| | | sdf1.parse(sdf.format(new Date()) + " " + dao.getEnd() + ":59")); |
| | | dao.setOrderNum(integer); |
| | | if(dao.getOrderNum() <= integer){ |
| | | dah.setCarryOut(2);//完成状态 |
| | | driverActivityHistoryMapper.updateById(dah); |
| | |
| | | //添加收入记录 |
| | | incomeService.saveData(2, dah.getDriverId(), 1, dao.getId(), null, dah.getMoney()); |
| | | } |
| | | driverActivityHistoryMapper.updateById(dah); |
| | | } |
| | | } |
| | | |