| | |
| | | */ |
| | | @RequestMapping("/tCar_add") |
| | | public String tCarAdd(Model model) { |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | |
| | | Integer roleType = ShiroKit.getUser().getRoleType(); |
| | | model.addAttribute("roleType",roleType); |
| | | if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else{ |
| | | model.addAttribute("franchiseeList",null); |
| | |
| | | model.addAttribute("objectName",tCompanyService.selectById(ShiroKit.getUser().getObjectId()).getName()); |
| | | |
| | | if (1 == roleType){ |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> companyList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 2)); |
| | | model.addAttribute("companyList",companyList); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tCar.getCompanyId()).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",tCar.getCompanyId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | }else if (2 == roleType){ |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId()).eq("state", 0).ne("flag", 3)); |
| | | List<TCompany> franchiseeList = tCompanyService.selectList(new EntityWrapper<TCompany>().eq("type", 3).eq("superiorId",ShiroKit.getUser().getObjectId())); |
| | | model.addAttribute("franchiseeList",franchiseeList); |
| | | } |
| | | |
| | |
| | | } |
| | | tCarServiceService.insert(service); |
| | | } |
| | | TCar obj = tCarService.selectById(tCar.getId()); |
| | | obj.setCompanyId(tCar.getCompanyId()); |
| | | obj.setFranchiseeId(tCar.getFranchiseeId()); |
| | | obj.setCarColor(tCar.getCarColor()); |
| | | obj.setCarModelId(tCar.getCarModelId()); |
| | | obj.setCarBrandId(tCar.getCarBrandId()); |
| | | obj.setCarLicensePlate(tCar.getCarLicensePlate()); |
| | | obj.setCarPhoto(tCar.getCarPhoto()); |
| | | obj.setDrivingLicenseNumber(tCar.getDrivingLicenseNumber()); |
| | | obj.setDrivingLicensePhoto(tCar.getDrivingLicensePhoto()); |
| | | obj.setAnnualInspectionTime(tCar.getAnnualInspectionTime()); |
| | | obj.setCommercialInsuranceTime(tCar.getCommercialInsuranceTime()); |
| | | obj.setPlateColor(tCar.getPlateColor()); |
| | | obj.setVehicleType(tCar.getVehicleType()); |
| | | obj.setOwnerName(tCar.getOwnerName()); |
| | | obj.setEngineId(tCar.getEngineId()); |
| | | obj.setVIN(tCar.getVIN()); |
| | | obj.setCertifyDateA(tCar.getCertifyDateA()); |
| | | obj.setCertifyDateB(tCar.getCertifyDateB()); |
| | | obj.setFuelType(tCar.getFuelType()); |
| | | obj.setEngineDisplace(tCar.getEngineDisplace()); |
| | | obj.setCertificate(tCar.getCertificate()); |
| | | obj.setTransAgency(tCar.getTransAgency()); |
| | | obj.setTransArea(tCar.getTransArea()); |
| | | obj.setTransDateStart(tCar.getTransDateStart()); |
| | | obj.setTransDateStop(tCar.getTransDateStop()); |
| | | obj.setFixState(tCar.getFixState()); |
| | | obj.setNextFixDate(tCar.getNextFixDate()); |
| | | obj.setCheckState(tCar.getCheckState()); |
| | | obj.setFeePrintId(tCar.getFeePrintId()); |
| | | obj.setGPSBrand(tCar.getGPSBrand()); |
| | | obj.setGPSIMEI(tCar.getGPSIMEI()); |
| | | obj.setGPSInstallDate(tCar.getGPSInstallDate()); |
| | | obj.setGPSModel(tCar.getGPSModel()); |
| | | obj.setRegisterDate(tCar.getRegisterDate()); |
| | | obj.setCommercialType(tCar.getCommercialType()); |
| | | tCarService.updateAllColumnById(obj); |
| | | |
| | | tCarService.updateById(tCar); |
| | | new Thread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | |
| | | shellList.add("所属机构[平台车辆/加盟车辆]"); |
| | | shellList.add("所属分公司[提示:加盟车辆选填]"); |
| | | shellList.add("所属加盟商[提示:加盟车辆选填]"); |
| | | shellList.add("服务模式:快车[是/否]"); |
| | | shellList.add("服务模式:专车[是/否]"); |
| | | shellList.add("服务模式:出租车[是/否]"); |
| | | shellList.add("服务模式:跨城出行[是/否]"); |
| | | shellList.add("服务模式:小件同城物流[是/否]"); |
| | |
| | | two = String.valueOf(cell2.getStringCellValue()).trim(); |
| | | } |
| | | |
| | | Cell cell3 = row.getCell(3); //服务模式:快车[是/否] |
| | | Cell cell3 = row.getCell(3); //服务模式:专车[是/否] |
| | | String three = null; |
| | | if (SinataUtil.isNotEmpty(cell3)){ |
| | | three = String.valueOf(cell3.getStringCellValue()).trim(); |
| | |
| | | if (!zero.equals("平台车辆") && !zero.equals("加盟车辆")){ |
| | | return new ErrorTip(500, "所属机构内容不正确"); |
| | | } |
| | | //判断服务模式【快车】 |
| | | //判断服务模式【专车】 |
| | | if (!three.equals("是") && !three.equals("否")){ |
| | | return new ErrorTip(500, "服务模式【快车】内容不正确"); |
| | | return new ErrorTip(500, "服务模式【专车】内容不正确"); |
| | | } |
| | | //判断服务模式【出租车】 |
| | | if (!four.equals("是") && !four.equals("否")){ |
| | |
| | | } |
| | | tCarService.insert(car); |
| | | |
| | | //添加快车服务模式 |
| | | //添加专车服务模式 |
| | | if ("是".equals(three)){ |
| | | TCarService service = new TCarService(); |
| | | service.setCarId(car.getId()); |