| | |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.*; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.WoUtil; |
| | | import com.stylefeng.guns.modular.system.dao.DriverPunishMapper; |
| | | import com.stylefeng.guns.modular.system.dao.DriverTrainMapper; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import com.stylefeng.guns.modular.system.util.*; |
| | | import com.stylefeng.guns.modular.system.util.EmailUtil; |
| | | import com.stylefeng.guns.modular.system.util.RedisUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.poi.ss.usermodel.Cell; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | @Autowired |
| | | private ITUserService userService; |
| | | @Autowired |
| | | private IUserActivityInviteService userActivityInviteService; |
| | | @Autowired |
| | | private IDriverActivityRegisteredService driverActivityRegisteredService; |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | @Autowired |
| | | private ITDriverServiceService itDriverServiceService; |
| | | |
| | | /** |
| | | * 跳转到司机审核列表首页 |
| | |
| | | */ |
| | | @RequestMapping("/tDriver_add") |
| | | public String tDriverAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2) |
| | | .eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("companyList",companyList); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tDriver.getCompanyId())); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tDriver.getCompanyId()).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | } |
| | | |
| | | //查询平台ID |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1)); |
| | | TCompany company = tCompanyService.selectOne(new EntityWrapper<TCompany>().eq("type", 1).eq("state", 0).ne("flag", 3)); |
| | | //判断是平台司机还是加盟司机 |
| | | if ((SinataUtil.isEmpty(tDriver.getCompanyId()) || tDriver.getCompanyId() == 0 || tDriver.getCompanyId() == company.getId()) && (SinataUtil.isEmpty(tDriver.getFranchiseeId()) || tDriver.getFranchiseeId() == 0)){ |
| | | model.addAttribute("companyType",1); |
| | |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "training.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存培训数据 |
| | |
| | | return ResultUtil.success(driverTrains); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到处罚页 |
| | | * @param id |
| | |
| | | model.addAttribute("id", id); |
| | | return PREFIX + "punish.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存处罚数据 |
| | |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取所有处罚数据 |
| | | * @param driverId |
| | |
| | | List<DriverPunish> driverPunishes = driverPunishMapper.queryAllPunish(driverId); |
| | | return ResultUtil.success(driverPunishes); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据分公司ID获取加盟商 |
| | |
| | | public Object listYesDriver(String insertTime, |
| | | String companyName, |
| | | String phone, |
| | | String name, |
| | | String lastName, |
| | | String firstName, |
| | | Integer addType, |
| | | Integer authState, |
| | | Integer state, |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tDriverService.getDriverList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,companyName,phone,name,addType,authState,state,teamId)); |
| | | page.setRecords(tDriverService.getDriverList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,companyName,phone,lastName,firstName,addType,authState,state,teamId)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | |
| | | return super.packForBT(page); |
| | | |
| | | } |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | @Autowired |
| | | private IUserActivityInviteService userActivityInviteService; |
| | | |
| | | @Autowired |
| | | private IDriverActivityRegisteredService driverActivityRegisteredService; |
| | | |
| | | |
| | | /** |
| | | * 审核操作 1=通过 2=不通过 |
| | |
| | | |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加线路 |
| | | * @param subArr |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除司机审核列表 |
| | | */ |
| | |
| | | tDriverService.updateById(driver); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 操作司机状态 |
| | | */ |
| | |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private ITCompanyService itCompanyService; |
| | | |
| | | @Autowired |
| | | private ITDriverServiceService itDriverServiceService; |
| | | |
| | | /** |
| | | * 验证是否可以字符转为整数 |