| | |
| | | public ResultUtil registeredDriver(String phone, String code, String password, Integer uid, Integer type, Integer userType) throws Exception { |
| | | ResultUtil<LoginWarpper> result = this.registeredDriver(phone, code, password,uid,type); |
| | | if(result.getCode() == 200 && null != uid){ |
| | | /*if(type == 2){ |
| | | if(type == 2){ |
| | | Driver driver = driverMapper.selectById(uid); |
| | | List<Map<String, Object>> query = driverActivityRegisteredMapper.query(userType, driver.getCompanyId()); |
| | | BigDecimal bigDecimal = new BigDecimal("0"); |
| | |
| | | if(Double.valueOf(String.valueOf(map.get("money"))).compareTo(0D) > 0){ |
| | | bigDecimal = bigDecimal.add(new BigDecimal(String.valueOf(map.get("money")))); |
| | | incomeService.saveData(2, driver.getId(), 1, Integer.valueOf(String.valueOf(map.get("id"))), null, Double.valueOf(String.valueOf(map.get("money")))); |
| | | |
| | | DriverActivityHistory driverActivityHistory = new DriverActivityHistory(); |
| | | driverActivityHistory.setActivityId(Integer.valueOf(String.valueOf(map.get("id")))); |
| | | driverActivityHistory.setCarryOut(2); |
| | | driverActivityHistory.setDay(new Date()); |
| | | driverActivityHistory.setDriverId(driver.getId()); |
| | | driverActivityHistory.setInsertTime(new Date()); |
| | | driverActivityHistory.setMoney(Double.valueOf(String.valueOf(map.get("money")))); |
| | | driverActivityHistory.setType(1); |
| | | driverActivityHistoryMapper.insert(driverActivityHistory); |
| | | |
| | | |
| | | } |
| | | } |
| | | driver.setActivityMoney(bigDecimal.add(new BigDecimal(driver.getActivityMoney())).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue()); |
| | |
| | | userCouponRecordMapper.insert(userCouponRecord); |
| | | } |
| | | } |
| | | }*/ |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | |
| | | if(null == driver){ |
| | | return ResultUtil.error("账号未注册"); |
| | | } |
| | | /*if(driver.getAuthState() == 1){ |
| | | if(driver.getAuthState() == 1){ |
| | | return ResultUtil.error("账号正在审核中,请耐心等待"); |
| | | }*/ |
| | | } |
| | | if(driver.getAuthState() == 3){ |
| | | return ResultUtil.error("账号已被冻结,请联系管理员"); |
| | | } |
| | |
| | | public ResultUtil work(Integer uid, String type) throws Exception { |
| | | DriverWork driverWork = driverWorkMapper.queryNewWork(uid, null, 1); |
| | | Driver driver = this.selectById(uid); |
| | | if(null == driver.getCarId()){ |
| | | return ResultUtil.error("暂未绑定车辆"); |
| | | } |
| | | |
| | | if(null != driverWork){//作下班操作 |
| | | //检测是否有未完成的订单 |
| | | List<Map<String, Object>> list = orderService.queryOrderList(1, 1, 10, uid); |