| | |
| | | public String tDriver_look(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | model.addAttribute("item",tDriver); |
| | | String placeOfPractice = tDriver.get("placeOfPractice").toString().replaceAll(",", "-"); |
| | | model.addAttribute("placeOfPractice", placeOfPractice); |
| | | Object placeOfPractice1 = tDriver.get("placeOfPractice"); |
| | | if(placeOfPractice1==null){ |
| | | model.addAttribute("placeOfPractice", ""); |
| | | }else { |
| | | model.addAttribute("placeOfPractice", placeOfPractice1.toString().replaceAll(",", "-")); |
| | | } |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_look.html"; |
| | | } |
| | |
| | | System.out.println("司机注册审核发送短信 :【driverId=" + tDriver.getId().toString() + "】,调用接口:" + result); |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == tDriver.getAuthState()) { |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | Integer objectId = tDriver.getCompanyId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | |
| | | }else{ |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | TCompany tCompany1 = itCompanyService.selectById(tDriver.getCompanyId()); |
| | | tDriver.setEmpId(empId); |
| | | tDriver.setEntercode(tCompany1.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | tDriver.setEntercode(tCompany.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany.getEnterCode())); |
| | | } |
| | | tDriverService.updateById(tDriver); |
| | | } |
| | |
| | | tDriver.setInsertTime(new Date()); |
| | | tDriver.setInsertUser(shiroExtUtil.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | |
| | | tDriver.setAccount(tDriver.getPhone()); |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == tDriver.getAuthState()) { |
| | |
| | | tDriver.setRemark(remark); |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == tDriver.getAuthState() && tDriver.getEmpId() == null) { |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | Integer objectId = tDriver.getCompanyId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(tDriver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | |
| | | TCompany tCompany1 = itCompanyService.selectById(tDriver.getCompanyId()); |
| | | tDriver.setEmpId(empId); |
| | | tDriver.setEntercode(tCompany1.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | tDriver.setEntercode(tCompany.getEnterCode()); |
| | | tDriver.setEnterId(Long.valueOf(tCompany.getEnterCode())); |
| | | } |
| | | |
| | | tDriverService.updateById(tDriver); |
| | |
| | | shellList.add("经营业务:快车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 2) { |
| | |
| | | shellList.add("经营业务:快车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } else if (shiroExtUtil.getUser().getRoleType() == 3) { |
| | |
| | | shellList.add("经营业务:快车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | | shellList.add("经营业务:小件跨城物流[是/否]"); |
| | | shellList.add("经营业务:包车[是/否]"); |
| | | shellList.add("登录账号[手机号]"); |
| | | shellList.add("登录密码[密码长度为6-18]"); |
| | | } |
| | |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //经营业务:小件同城物流[是/否] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //经营业务:小件跨城物流[是/否] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(16); //经营业务:包车[是/否] |
| | | String sixteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | sixteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell17 = row.getCell(17); //登录账号[手机号] |
| | | Cell cell17 = row.getCell(14); //登录账号[手机号] |
| | | String seventeen = null; |
| | | if (SinataUtil.isNotEmpty(cell17)){ |
| | | seventeen = String.valueOf(cell17.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell18 = row.getCell(18); //登录密码[密码长度为6-18] |
| | | Cell cell18 = row.getCell(15); //登录密码[密码长度为6-18] |
| | | String eighteen = null; |
| | | if (SinataUtil.isNotEmpty(cell18)){ |
| | | eighteen = String.valueOf(cell18.getStringCellValue()).trim(); |
| | |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(nine) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen) |
| | | || SinataUtil.isEmpty(seventeen)|| SinataUtil.isEmpty(eighteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | |
| | | //判断经营业务【跨城出行】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!fourteen.equals("是") && !fourteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!fifteen.equals("是") && !fifteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!sixteen.equals("是") && !sixteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(six)){ |
| | |
| | | |
| | | //审核通过,在中台添加司机账号 |
| | | if (2 == driver.getAuthState()) { |
| | | ShiroUser user = shiroExtUtil.getUser(); |
| | | Integer objectId = user.getObjectId(); |
| | | Integer objectId = driver.getCompanyId(); |
| | | TCompany tCompany = itCompanyService.selectById(objectId); |
| | | List<QYTUserInfo> userInfoByPhone = UserUtil.getUserInfoByPhone(driver.getPhone(), tCompany.getEnterCode()); |
| | | Long empId = null; |
| | |
| | | empId = userInfoByPhone.get(0).getEmpId(); |
| | | } |
| | | |
| | | TCompany tCompany1 = itCompanyService.selectById(driver.getCompanyId()); |
| | | driver.setEmpId(empId); |
| | | driver.setEntercode(tCompany1.getEnterCode()); |
| | | driver.setEnterId(Long.valueOf(tCompany1.getEnterCode())); |
| | | driver.setEntercode(tCompany.getEnterCode()); |
| | | driver.setEnterId(Long.valueOf(tCompany.getEnterCode())); |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(fourteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(fifteen)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(sixteen)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | } |
| | |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //经营业务:小件同城物流[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(13); //经营业务:小件跨城物流[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | thirteen = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(14); //经营业务:包车[是/否] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | fourteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(15); //登录账号[手机号] |
| | | Cell cell15 = row.getCell(12); //登录账号[手机号] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fifteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(16); //登录密码[密码长度为6-18] |
| | | Cell cell16 = row.getCell(13); //登录密码[密码长度为6-18] |
| | | String sixteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | sixteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(seven) |
| | | || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen)){ |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(fifteen) || SinataUtil.isEmpty(sixteen)){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | | //判断账号是否存在 |
| | |
| | | //判断经营业务【跨城出行】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!fourteen.equals("是") && !fourteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(four)){ |
| | |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(thirteen)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(fourteen)) { |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | |
| | |
| | | ten = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(11); //经营业务:小件同城物流[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | eleven = String.valueOf(cell12.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell13 = row.getCell(12); //经营业务:小件跨城物流[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell13)){ |
| | | twelve = String.valueOf(cell13.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell14 = row.getCell(13); //经营业务:包车[是/否] |
| | | String thirteen = null; |
| | | if (SinataUtil.isNotEmpty(cell14)){ |
| | | thirteen = String.valueOf(cell14.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell15 = row.getCell(14); //登录账号[手机号] |
| | | Cell cell15 = row.getCell(11); //登录账号[手机号] |
| | | String fourteen = null; |
| | | if (SinataUtil.isNotEmpty(cell15)){ |
| | | fourteen = String.valueOf(cell15.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell16 = row.getCell(15); //登录密码[密码长度为6-18] |
| | | Cell cell16 = row.getCell(12); //登录密码[密码长度为6-18] |
| | | String fifteen = null; |
| | | if (SinataUtil.isNotEmpty(cell16)){ |
| | | fifteen = String.valueOf(cell16.getStringCellValue()).trim(); |
| | |
| | | if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(one) || SinataUtil.isEmpty(two) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) |
| | | || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(eight) |
| | | || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) |
| | | || SinataUtil.isEmpty(eleven) || SinataUtil.isEmpty(twelve) || SinataUtil.isEmpty(thirteen) |
| | | || SinataUtil.isEmpty(fourteen) || SinataUtil.isEmpty(fifteen) ){ |
| | | return new ErrorTip(500, "单元格不能为空"); |
| | | }else{ |
| | |
| | | //判断经营业务【跨城出行】 |
| | | if (!ten.equals("是") && !ten.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【跨城出行】内容不正确"); |
| | | } |
| | | //判断经营业务【小件同城物流】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件同城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【小件跨城物流】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【小件跨城物流】内容不正确"); |
| | | } |
| | | //判断经营业务【包车】 |
| | | if (!thirteen.equals("是") && !thirteen.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【包车】内容不正确"); |
| | | } |
| | | //判断驾龄 |
| | | if (!isInteger(three)){ |
| | |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(3); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件同城物流服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(4); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加小件跨城物流服务模式 |
| | | if ("是".equals(twelve)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(5); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | //添加包车服务模式 |
| | | if ("是".equals(thirteen)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | | service.setType(6); |
| | | itDriverServiceService.insert(service); |
| | | } |
| | | } |