| | |
| | | import org.apache.poi.ss.usermodel.Row; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Resource |
| | | private DriverPunishMapper driverPunishMapper; |
| | | |
| | | @Autowired |
| | | private RedisUtil redisUtil; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private ITComplaintService tComplaintService; |
| | | |
| | | /** |
| | | * 跳转投诉页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("complaint") |
| | | public String complaint(Model model,Integer driverId) { |
| | | |
| | | model.addAttribute("id",driverId); |
| | | return PREFIX + "tComplaint.html"; |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping("deductmoney") |
| | | public String deductmoney(Model model,Integer driverId) { |
| | | model.addAttribute("id",driverId); |
| | | model.addAttribute("driverMoney",tDriverService.selectById(driverId).getLaveBusinessMoney()); |
| | | return PREFIX + "deductmoney.html"; |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/complaintList") |
| | | @ResponseBody |
| | | public Object complaintList(String insertTime, |
| | | String userName, |
| | | String userPhone, |
| | | String driverPhone, |
| | | Integer isHandle,Integer driverId) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(insertTime)){ |
| | | String[] timeArray = insertTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(tComplaintService.getComplaintList(page,ShiroKit.getUser().getRoleType(),ShiroKit.getUser().getObjectId(),beginTime,endTime,userName,userPhone,driverPhone,isHandle,driverId)); |
| | | return super.packForBT(page); |
| | | } |
| | | /** |
| | | * 跳转到司机审核列表首页 |
| | | */ |
| | |
| | | return PREFIX + "tDriver_add.html"; |
| | | } |
| | | |
| | | /** |
| | | /**1 |
| | | * 跳转到修改审核司机 |
| | | */ |
| | | @RequestMapping("/tDriver_immediately/{tDriverId}") |
| | | public String tDriver_immediately(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | tDriver.put("account", null != tDriver.get("account") ? AESUtil.decrypt(tDriver.get("account").toString()) : ""); |
| | | tDriver.put("phone", null != tDriver.get("phone") ? AESUtil.decrypt(tDriver.get("phone").toString()) : ""); |
| | | tDriver.put("idCard", null != tDriver.get("idCard") ? AESUtil.decrypt(tDriver.get("idCard").toString()) : ""); |
| | | model.addAttribute("item",tDriver); |
| | | String placeOfPractice = tDriver.get("placeOfPractice").toString().replaceAll(",", "-"); |
| | | model.addAttribute("placeOfPractice", placeOfPractice); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_immediately.html"; |
| | | } |
| | |
| | | @RequestMapping("/tDriver_look/{tDriverId}") |
| | | public String tDriver_look(@PathVariable Integer tDriverId, Model model) { |
| | | Map<String, Object> tDriver = tDriverService.getDriverById(tDriverId); |
| | | tDriver.put("account", null != tDriver.get("account") ? AESUtil.decrypt(tDriver.get("account").toString()) : ""); |
| | | tDriver.put("phone", null != tDriver.get("phone") ? AESUtil.decrypt(tDriver.get("phone").toString()) : ""); |
| | | tDriver.put("idCard", null != tDriver.get("idCard") ? AESUtil.decrypt(tDriver.get("idCard").toString()) : ""); |
| | | model.addAttribute("item",tDriver); |
| | | String placeOfPractice = tDriver.get("placeOfPractice").toString().replaceAll(",", "-"); |
| | | model.addAttribute("placeOfPractice", placeOfPractice); |
| | | LogObjectHolder.me().set(tDriver); |
| | | return PREFIX + "tDriver_look.html"; |
| | | } |
| | |
| | | @RequestMapping("/tDriver_update/{tDriverId}") |
| | | public String tDriverUpdate(@PathVariable Integer tDriverId, Model model) { |
| | | TDriver tDriver = tDriverService.selectById(tDriverId); |
| | | tDriver.setAccount(null != tDriver.getAccount() ? AESUtil.decrypt(tDriver.getAccount()) : ""); |
| | | tDriver.setPhone(null != tDriver.getPhone() ? AESUtil.decrypt(tDriver.getPhone()) : ""); |
| | | tDriver.setIdCard(null != tDriver.getIdCard() ? AESUtil.decrypt(tDriver.getIdCard()) : ""); |
| | | model.addAttribute("item",tDriver); |
| | | LogObjectHolder.me().set(tDriver); |
| | | |
| | |
| | | return ResultUtil.success(driverPunishes); |
| | | } |
| | | |
| | | @Autowired |
| | | private IComplaintDeductmoneyService complaintDeductmoneyService; |
| | | |
| | | @ResponseBody |
| | | @RequestMapping(value = "/queryAllDeductmoney", method = RequestMethod.POST) |
| | | public ResultUtil queryAllDeductmoney(Integer driverId){ |
| | | List<ComplaintDeductmoney> driverPunishes = complaintDeductmoneyService.selectList(new EntityWrapper<ComplaintDeductmoney>().eq("driverId",driverId)); |
| | | return ResultUtil.success(driverPunishes); |
| | | } |
| | | |
| | | /** |
| | | * 根据分公司ID获取加盟商 |
| | |
| | | tDriver.setInsertTime(new Date()); |
| | | tDriver.setInsertUser(ShiroKit.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | |
| | | tDriver.setAccount(AESUtil.encrypt(tDriver.getAccount())); |
| | | tDriver.setPhone(AESUtil.encrypt(tDriver.getPhone())); |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | |
| | | tDriverService.insert(tDriver); |
| | |
| | | TDriver driver = tDriverService.selectById(tDriverId); |
| | | driver.setFlag("3"); |
| | | tDriverService.updateById(driver); |
| | | String value = redisUtil.getValue("DRIVER_" + driver.getPhone()); |
| | | redisUtil.remove(value); |
| | | redisUtil.remove("DRIVER_" + driver.getId()); |
| | | redisUtil.remove("DRIVER_" + driver.getPhone()); |
| | | return SUCCESS_TIP; |
| | | } |
| | | /** |
| | |
| | | } |
| | | } |
| | | }).start(); |
| | | |
| | | String value = redisUtil.getValue("DRIVER_" + tDriver.getPhone()); |
| | | redisUtil.remove(value); |
| | | redisUtil.remove("DRIVER_" + tDriver.getId()); |
| | | redisUtil.remove("DRIVER_" + tDriver.getPhone()); |
| | | } |
| | | tDriver.setRemark(remark); |
| | | tDriverService.updateById(tDriver); |
| | |
| | | } |
| | | tDriver.setUpdateTime(new Date()); |
| | | tDriver.setUpdateUser(ShiroKit.getUser().getId()); |
| | | // tDriver.setPassword(MD5Util.encrypt(tDriver.getPassword())); |
| | | if(ToolUtil.isEmpty(tDriver.getPassword())){ |
| | | tDriver.setPassword(obj.getPassword()); |
| | | }else{ |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | } |
| | | obj.setCompanyId(tDriver.getCompanyId()); |
| | | obj.setFranchiseeId(tDriver.getFranchiseeId()); |
| | | obj.setName(tDriver.getName()); |
| | | obj.setHeadImgUrl(tDriver.getHeadImgUrl()); |
| | | obj.setFaceImgUrl(tDriver.getFaceImgUrl()); |
| | | obj.setSex(tDriver.getSex()); |
| | | obj.setDriveCard(tDriver.getDriveCard()); |
| | | obj.setDriveCardImgUrl(tDriver.getDriveCardImgUrl()); |
| | | obj.setDriverAge(tDriver.getDriverAge()); |
| | | obj.setIdCard(tDriver.getIdCard()); |
| | | obj.setIdCardImgUrl1(tDriver.getIdCardImgUrl1()); |
| | | obj.setIdCardImgUrl2(tDriver.getIdCardImgUrl2()); |
| | | obj.setDriverAddress(tDriver.getDriverAddress()); |
| | | obj.setTaxiAptitudeCard(tDriver.getTaxiAptitudeCard()); |
| | | obj.setJobNumber(tDriver.getJobNumber()); |
| | | obj.setAccount(tDriver.getPhone()); |
| | | obj.setPassword(tDriver.getPassword()); |
| | | obj.setDriverNationality(tDriver.getDriverNationality()); |
| | | obj.setDriverNation(tDriver.getDriverNation()); |
| | | obj.setDriverMaritalStatus(tDriver.getDriverMaritalStatus()); |
| | | obj.setDriverLanguageLevel( tDriver.getDriverLanguageLevel()); |
| | | obj.setDriverEducation(tDriver.getDriverEducation()); |
| | | obj.setDriverCensus(tDriver.getDriverCensus()); |
| | | obj.setDriverAddress(tDriver.getDriverAddress()); |
| | | obj.setDriverContactAddress(tDriver.getDriverContactAddress()); |
| | | obj.setGetDriverLicenseDate(tDriver.getGetDriverLicenseDate()); |
| | | obj.setDriverLicenseOn(tDriver.getDriverLicenseOn()); |
| | | obj.setDriverLicenseOff(tDriver.getDriverLicenseOff()); |
| | | obj.setTaxiDriver(tDriver.getTaxiDriver()); |
| | | obj.setNetworkCarlssueOrganization(tDriver.getNetworkCarlssueOrganization()); |
| | | obj.setNetworkCarlssueDate(tDriver.getNetworkCarlssueDate()); |
| | | obj.setGetNetworkCarProofDate(tDriver.getGetNetworkCarProofDate()); |
| | | obj.setNetworkCarProofOn(tDriver.getNetworkCarProofOn()); |
| | | obj.setNetworkCarProofOff(tDriver.getNetworkCarProofOff()); |
| | | obj.setRegisterDate(tDriver.getRegisterDate()); |
| | | obj.setFullTimeDriver(tDriver.getFullTimeDriver()); |
| | | obj.setInDriverBlacklist(tDriver.getInDriverBlacklist()); |
| | | obj.setCommercialType(tDriver.getCommercialType()); |
| | | obj.setContractCompany(tDriver.getContractCompany()); |
| | | obj.setContractOn(tDriver.getContractOn()); |
| | | obj.setContractOff(tDriver.getContractOff()); |
| | | obj.setEmergencyContact(tDriver.getEmergencyContact()); |
| | | obj.setEmergencyContactPhone(tDriver.getEmergencyContactPhone()); |
| | | obj.setEmergencyContactAddress(tDriver.getEmergencyContactAddress()); |
| | | obj.setUpdateTime(new Date()); |
| | | obj.setUpdateUser(ShiroKit.getUser().getId()); |
| | | tDriverService.updateAllColumnById(obj); |
| | | |
| | | tDriver.setAccount(AESUtil.encrypt(tDriver.getAccount())); |
| | | tDriver.setPhone(AESUtil.encrypt(tDriver.getPhone())); |
| | | tDriver.setPassword(ShiroKit.md5(tDriver.getPassword(), "SA;d5#")); |
| | | tDriverService.updateById(tDriver); |
| | | |
| | | //删除业务 |
| | | tDriverServiceService.delete(new EntityWrapper<TDriverService>().eq("driverId",tDriver.getId())); |
| | |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:快车[是/否]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:快车[是/否]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | |
| | | shellList.add("居住地址"); |
| | | shellList.add("出租车资格证号"); |
| | | shellList.add("工号[选填]"); |
| | | shellList.add("经营业务:快车[是/否]"); |
| | | shellList.add("经营业务:专车[是/否]"); |
| | | shellList.add("经营业务:出租车[是/否]"); |
| | | shellList.add("经营业务:跨城出行[是/否]"); |
| | | shellList.add("经营业务:小件同城物流[是/否]"); |
| | |
| | | ten = String.valueOf(cell10.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell11 = row.getCell(11); //经营业务:快车[是/否] |
| | | Cell cell11 = row.getCell(11); //经营业务:专车[是/否] |
| | | String eleven = null; |
| | | if (SinataUtil.isNotEmpty(cell11)){ |
| | | eleven = String.valueOf(cell11.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell12 = row.getCell(12); //经营业务:快车[是/否] |
| | | Cell cell12 = row.getCell(12); //经营业务:专车[是/否] |
| | | String twelve = null; |
| | | if (SinataUtil.isNotEmpty(cell12)){ |
| | | twelve = String.valueOf(cell12.getStringCellValue()).trim(); |
| | |
| | | if (!four.equals("男") && !four.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【快车】 |
| | | //判断经营业务【专车】 |
| | | if (!eleven.equals("是") && !eleven.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【快车】内容不正确"); |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!twelve.equals("是") && !twelve.equals("否")){ |
| | |
| | | } |
| | | } |
| | | TDriver driver = new TDriver(); |
| | | seventeen = AESUtil.encrypt(seventeen); |
| | | driver.setAccount(seventeen); |
| | | driver.setJobNumber(ten); |
| | | driver.setPhone(seventeen); |
| | |
| | | tDriverService.insert(driver); |
| | | |
| | | |
| | | //添加快车服务模式 |
| | | //添加专车服务模式 |
| | | if ("是".equals(eleven)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | |
| | | eight = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(9); //经营业务:快车[是/否] |
| | | Cell cell9 = row.getCell(9); //经营业务:专车[是/否] |
| | | String nine = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | nine = String.valueOf(cell9.getStringCellValue()).trim(); |
| | |
| | | if (!two.equals("男") && !two.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【快车】 |
| | | //判断经营业务【专车】 |
| | | if (!nine.equals("是") && !nine.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【快车】内容不正确"); |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!ten.equals("是") && !ten.equals("否")){ |
| | |
| | | } |
| | | |
| | | TDriver driver = new TDriver(); |
| | | fifteen = AESUtil.encrypt(fifteen); |
| | | driver.setAccount(fifteen); |
| | | driver.setJobNumber(eight); |
| | | driver.setPhone(fifteen); |
| | |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | //添加快车服务模式 |
| | | //添加专车服务模式 |
| | | if ("是".equals(nine)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | |
| | | seven = String.valueOf(cell8.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell9 = row.getCell(8); //经营业务:快车[是/否] |
| | | Cell cell9 = row.getCell(8); //经营业务:专车[是/否] |
| | | String eight = null; |
| | | if (SinataUtil.isNotEmpty(cell9)){ |
| | | eight = String.valueOf(cell9.getStringCellValue()).trim(); |
| | |
| | | if (!one.equals("男") && !one.equals("女")){ |
| | | return new ErrorTip(500, "性别内容不正确"); |
| | | } |
| | | //判断经营业务【快车】 |
| | | //判断经营业务【专车】 |
| | | if (!eight.equals("是") && !eight.equals("否")){ |
| | | return new ErrorTip(500, "经营业务【快车】内容不正确"); |
| | | return new ErrorTip(500, "经营业务【专车】内容不正确"); |
| | | } |
| | | //判断经营业务【出租车】 |
| | | if (!nine.equals("是") && !nine.equals("否")){ |
| | |
| | | } |
| | | |
| | | TDriver driver = new TDriver(); |
| | | fifteen = AESUtil.encrypt(fifteen); |
| | | driver.setAccount(fourteen); |
| | | driver.setJobNumber(seven); |
| | | driver.setPhone(fourteen); |
| | |
| | | } |
| | | tDriverService.insert(driver); |
| | | |
| | | //添加快车服务模式 |
| | | //添加专车服务模式 |
| | | if ("是".equals(eight)){ |
| | | TDriverService service = new TDriverService(); |
| | | service.setDriverId(driver.getId()); |
| | |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private IIncomeService incomeService; |
| | | |
| | | /** |
| | | * 添加扣款记录 |
| | | * @param complaintDeductmoney |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/saveDeductmoney", method = RequestMethod.POST) |
| | | public ResultUtil saveDeductmoney(ComplaintDeductmoney complaintDeductmoney){ |
| | | try { |
| | | complaintDeductmoney.setCreateTime(new Date()); |
| | | complaintDeductmoney.insert(); |
| | | TDriver tDriver = tDriverService.selectById(complaintDeductmoney.getDriverId()); |
| | | tDriver.setLaveBusinessMoney(tDriver.getLaveBusinessMoney()-complaintDeductmoney.getMoney().doubleValue()); |
| | | tDriverService.updateById(tDriver); |
| | | Income income = new Income(); |
| | | income.setUserType(1); |
| | | income.setObjectId(tDriver.getCompanyId()); |
| | | income.setType(8); |
| | | income.setMoney(complaintDeductmoney.getMoney().doubleValue()); |
| | | income.setInsertTime(new Date()); |
| | | incomeService.insert(income); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | } |