From 4c99ee7028c3fe58a2cd4b8273b22c75c45574fc Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期五, 16 五月 2025 10:27:41 +0800 Subject: [PATCH] 修改文档bug --- ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java | 396 ++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 240 insertions(+), 156 deletions(-) diff --git a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java index f79c252..f53daf8 100644 --- a/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java +++ b/ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java @@ -6,21 +6,20 @@ import com.stylefeng.guns.core.base.tips.ErrorTip; import com.stylefeng.guns.core.common.constant.factory.PageFactory; import com.stylefeng.guns.core.shiro.ShiroKit; -import com.stylefeng.guns.core.util.DateUtil; -import com.stylefeng.guns.core.util.ExcelExportUtil; -import com.stylefeng.guns.core.util.SinataUtil; -import com.stylefeng.guns.core.util.WoUtil; +import com.stylefeng.guns.core.util.*; import com.stylefeng.guns.modular.system.dao.CarInsuranceMapper; import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.*; -import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; +import com.stylefeng.guns.modular.system.util.EmailUtil; import com.stylefeng.guns.modular.system.util.ResultUtil; import org.apache.commons.lang.time.DateUtils; -import org.apache.poi.hdf.extractor.TC; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; +import org.jsoup.Jsoup; +import org.jsoup.nodes.Document; +import org.jsoup.nodes.Element; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -33,6 +32,7 @@ import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.File; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.*; @@ -79,17 +79,17 @@ @Autowired private ITServerCarmodelService itServerCarmodelService; - @Autowired - private PushMinistryOfTransportUtil pushMinistryOfTransportUtil; - @Resource private CarInsuranceMapper carInsuranceMapper; @Autowired private ITCarColorService carColorService; - @Value("${pushMinistryOfTransport}") - private boolean pushMinistryOfTransport; + @Value("${spring.mail.template-path}") + private String templatePath; + + + /** * 跳转到车辆管理首页 @@ -98,11 +98,15 @@ public String index() { return PREFIX + "tCar.html"; } + + @RequestMapping("auth") public String auth() { return PREFIX + "tCarAuth.html"; } + + /** * 跳转到添加车辆管理 */ @@ -133,6 +137,8 @@ model.addAttribute("zcModelList",zcModelList); List<TServerCarmodel> kcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 2).eq("state", 1)); model.addAttribute("kcModelList",kcModelList); + List<TServerCarmodel> xjModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 4).eq("state", 1)); + model.addAttribute("xjModelList",xjModelList); List<TCarColor> state = carColorService.selectList(new EntityWrapper<TCarColor>().eq("state", 1)); model.addAttribute("color", state); return PREFIX + "tCar_add.html"; @@ -195,6 +201,7 @@ Integer six = 1; Integer zcModel = 0; Integer kcModel = 0; + Integer xjModel = 0; for (TCarService obj : serviceList){ if (obj.getType() == 1){ one = 2; @@ -208,7 +215,8 @@ kcModel = obj.getServerCarModelId(); } if (obj.getType() == 4){ - four = 2; + four = 4; + xjModel = obj.getServerCarModelId(); } if (obj.getType() == 5){ five = 2; @@ -225,11 +233,14 @@ model.addAttribute("six",six); model.addAttribute("zcModel",zcModel); model.addAttribute("kcModel",kcModel); + model.addAttribute("xjModel",xjModel); List<TServerCarmodel> zcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); model.addAttribute("zcModelList",zcModelList); List<TServerCarmodel> kcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 2).eq("state", 1)); model.addAttribute("kcModelList",kcModelList); + List<TServerCarmodel> xjModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 4).eq("state", 1)); + model.addAttribute("xjModelList",xjModelList); //车辆品牌 List<TCarBrand> brandList = tCarBrandService.selectList(new EntityWrapper<TCarBrand>().eq("state", 1)); @@ -241,6 +252,8 @@ model.addAttribute("color", state); return PREFIX + "tCar_edit.html"; } + + @RequestMapping("/tCar_auth/{tCarId}") public String tCarAuth(@PathVariable Integer tCarId, Model model) { TCar tCar = tCarService.selectById(tCarId); @@ -255,20 +268,34 @@ Integer six = 1; Integer zcModel = 0; Integer kcModel = 0; + Integer xjModel = 0; for (TCarService obj : serviceList){ if (obj.getType() == 1){ one = 2; zcModel = obj.getServerCarModelId(); } + if (obj.getType() == 1){ + four = 2; + zcModel = obj.getServerCarModelId(); + } + if (obj.getType() == 4){ + four = 4; + xjModel = obj.getServerCarModelId(); + } } model.addAttribute("one",one); + model.addAttribute("four",four); model.addAttribute("zcModel",zcModel); + model.addAttribute("xjModel",xjModel); List<TServerCarmodel> zcModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 1).eq("state", 1)); model.addAttribute("zcModelList",zcModelList); + List<TServerCarmodel> xjModelList = itServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 4).eq("state", 1)); + model.addAttribute("xjModelList",xjModelList); LogObjectHolder.me().set(tCar); return PREFIX + "tCar_auth.html"; } + /** * 跳转到保险列表页 * @param carId @@ -318,24 +345,8 @@ public ResultUtil saveCarInsurance(CarInsurance carInsurance){ if(carInsurance.getId() == null){ carInsuranceMapper.insert(carInsurance); - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){//上传数据 - pushMinistryOfTransportUtil.baseInfoVehicleInsurance(carInsurance.getId(), 1); - } - } - }).start(); }else{ carInsuranceMapper.updateById(carInsurance); - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){//上传数据 - pushMinistryOfTransportUtil.baseInfoVehicleInsurance(carInsurance.getId(), 2); - } - } - }).start(); } return ResultUtil.success(); @@ -386,14 +397,6 @@ @RequestMapping(value = "/delCarInsurance", method = RequestMethod.POST) public ResultUtil delCarInsurance(Integer id){ carInsuranceMapper.deleteById(id); - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){//上传数据 - pushMinistryOfTransportUtil.baseInfoVehicleInsurance(id, 3); - } - } - }).start(); return ResultUtil.success(); } @@ -457,7 +460,12 @@ */ @RequestMapping(value = "/add") @ResponseBody - public Object add(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel) { + public Object add(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel,String xjModel) throws Exception { + TCar tCar1 = tCarService.selectOne(new EntityWrapper<TCar>().eq("state", 1).ne("authState", 4).eq("carLicensePlate", tCar.getCarLicensePlate())); + if(null != tCar1){ + throw new Exception("车牌号重复"); + } + if (1 == roleType){ //平台 if (2 == companyType.intValue()){ if (SinataUtil.isNotEmpty(oneId)){ @@ -497,6 +505,7 @@ } tCar.setInsertTime(new Date()); tCar.setState(1); + tCar.setAuthState(1); tCarService.insert(tCar); //添加经营业务 @@ -507,21 +516,11 @@ service.setType(Integer.valueOf(serverArray[i])); if (1 == service.getType()){ service.setServerCarModelId(Integer.valueOf(zcModel)); - }else if (3 == service.getType()){ - service.setServerCarModelId(Integer.valueOf(kcModel)); + }else if (4 == service.getType()){ + service.setServerCarModelId(Integer.valueOf(xjModel)); } tCarServiceService.insert(service); } - - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){//上传数据 - pushMinistryOfTransportUtil.baseInfoCompanyStat(); - pushMinistryOfTransportUtil.baseInfoVehicle(tCar.getId()); - } - } - }).start(); return SUCCESS_TIP; } @@ -541,16 +540,6 @@ obj.setCarId(null); tDriverService.updateById(obj); } - - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){//上传数据 - pushMinistryOfTransportUtil.baseInfoCompanyStat(); - pushMinistryOfTransportUtil.baseInfoVehicle(tCar.getId()); - } - } - }).start(); return SUCCESS_TIP; } @@ -559,7 +548,12 @@ */ @RequestMapping(value = "/update") @ResponseBody - public Object update(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel) { + public Object update(TCar tCar,@RequestParam String serverBox,Integer roleType,Integer companyType,Integer oneId,Integer twoId,Integer franchiseeId,String zcModel,String kcModel,String xjModel)throws Exception { + TCar tCar1 = tCarService.selectOne(new EntityWrapper<TCar>().eq("state", 1).ne("authState", 4).eq("carLicensePlate", tCar.getCarLicensePlate())); + if(null != tCar1 && tCar.getId().compareTo(tCar1.getId()) != 0){ + throw new Exception("车牌号重复"); + } + if (1 == roleType){ //平台 if (2 == companyType.intValue()){ if (SinataUtil.isNotEmpty(oneId)){ @@ -601,28 +595,26 @@ service.setType(Integer.valueOf(serverArray[i])); if (1 == service.getType()){ service.setServerCarModelId(Integer.valueOf(zcModel)); - }else if (3 == service.getType()){ - service.setServerCarModelId(Integer.valueOf(kcModel)); + }else if (4 == service.getType()){ + service.setServerCarModelId(Integer.valueOf(xjModel)); } tCarServiceService.insert(service); } tCarService.updateById(tCar); - new Thread(new Runnable() { - @Override - public void run() { - if(pushMinistryOfTransport){ - pushMinistryOfTransportUtil.baseInfoVehicle(tCar.getId()); - } - } - }).start(); return SUCCESS_TIP; } + + @RequestMapping(value = "/updateAuth") @ResponseBody - public Object updateAuth(TCar tCar,String zcModel,@RequestParam String serverBox) { + public Object updateAuth(TCar tCar,String zcModel,String xjModel,@RequestParam String serverBox) { //添加经营业务 if(tCar.getAuthState()==2){ + //删除业务 + tCarServiceService.delete(new EntityWrapper<TCarService>().eq("carId",tCar.getId())); + + //添加经营业务 String[] serverArray = serverBox.split(","); for (int i=0;i<serverArray.length;i++){ TCarService service = new TCarService(); @@ -630,11 +622,102 @@ service.setType(Integer.valueOf(serverArray[i])); if (1 == service.getType()){ service.setServerCarModelId(Integer.valueOf(zcModel)); + }else if (4 == service.getType()){ + service.setServerCarModelId(Integer.valueOf(xjModel)); } tCarServiceService.insert(service); } + } tCarService.updateById(tCar); + tCar = tCarService.selectById(tCar.getId()); + TDriver tDriver = tDriverService.selectById(tCar.getDriverId()); + + if(null != tDriver && ToolUtil.isNotEmpty(tDriver.getEmail())){ + TCar finalTCar = tCar; + new Thread(new Runnable() { + @Override + public void run() { + try { + Integer language = tDriver.getLanguage(); + String path = templatePath + "driver/index.html"; + Document document = Jsoup.parse(new File(path), "UTF-8"); + if(1 == language){ + document.getElementById("english").remove(); + document.getElementById("french").remove(); + document.getElementById("invite").remove(); + document.getElementById("user").remove(); + document.getElementById("settle").remove(); + document.getElementById("pass").remove(); + document.getElementById("email").remove(); + document.getElementById("bill").remove(); + document.getElementById("reward").remove(); + document.getElementById("rewardToday").remove(); + document.getElementById("driverAudit").remove(); + document.getElementsByTag("title").get(0).text(2 == finalTCar.getAuthState() ? "车辆审核通过" : "车辆审核不通过"); + Element car_audit1_user = document.getElementById("car_audit1_user"); + car_audit1_user.text("Hello " + tDriver.getFirstName() + " " + tDriver.getLastName() + ","); + Element car_audit1_content = document.getElementById("car_audit1_content"); + if(2 == finalTCar.getAuthState()){ + car_audit1_content.html("您的车辆注册申请已获批准<br>详情请查看I-GO APP"); + }else{ + car_audit1_content.html("我们很遗憾地通知您: 您的车辆申请已被拒绝。相关详情,请与我们的客服联系,致电0577777767或发送电子邮件至support@i-go.group"); + } + EmailUtil.send(tDriver.getEmail(), 2 == finalTCar.getAuthState() ? "车辆审核通过" : "车辆审核不通过", document.html()); + } + if(2 == language){ + document.getElementById("chinese").remove(); + document.getElementById("french").remove(); + document.getElementById("invite1").remove(); + document.getElementById("user1").remove(); + document.getElementById("settle1").remove(); + document.getElementById("pass1").remove(); + document.getElementById("email1").remove(); + document.getElementById("bill1").remove(); + document.getElementById("reward1").remove(); + document.getElementById("rewardToday1").remove(); + document.getElementById("driverAudit1").remove(); + document.getElementsByTag("title").get(0).text(2 == finalTCar.getAuthState() ? "Vehicle is verified and qualified" : "Vehicle is not verified and qualified"); + Element car_audit2_user = document.getElementById("car_audit2_user"); + car_audit2_user.text("Hello " + tDriver.getFirstName() + " " + tDriver.getLastName() + ","); + Element car_audit2_content = document.getElementById("car_audit2_content"); + if(2 == finalTCar.getAuthState()){ + car_audit2_content.html("Your vehicle application has been approved. <br>See the I-GO platform for details."); + }else{ + car_audit2_content.html("We are sorry to inform you that your vehicle application was rejected. Please contact our service for relevant details, call 0577777767 or send e-mail to support@i-go.group"); + } + EmailUtil.send(tDriver.getEmail(), 2 == finalTCar.getAuthState() ? "Vehicle is verified and qualified" : "Vehicle is not verified and qualified", document.html()); + } + if(3 == language){ + document.getElementById("chinese").remove(); + document.getElementById("english").remove(); + document.getElementById("invite2").remove(); + document.getElementById("user2").remove(); + document.getElementById("settle2").remove(); + document.getElementById("pass2").remove(); + document.getElementById("email2").remove(); + document.getElementById("bill2").remove(); + document.getElementById("reward2").remove(); + document.getElementById("rewardToday2").remove(); + document.getElementById("driverAudit2").remove(); + document.getElementsByTag("title").get(0).text(2 == finalTCar.getAuthState() ? "Le véhicule est vérifié et qualifié" : "Le véhicule n’est pas vérifié et qualifié"); + Element car_audit3_user = document.getElementById("car_audit3_user"); + car_audit3_user.text("Bonjour " + tDriver.getFirstName() + " " + tDriver.getLastName() + ","); + Element car_audit3_content = document.getElementById("car_audit3_content"); + if(2 == finalTCar.getAuthState()){ + car_audit3_content.html("Votre demande de véhicule a été approuvée.<br>Veuillez consulter la plateforme I-GO pour plus de détails."); + }else{ + car_audit3_content.html("Nous avons le regret de vous informer que votre demande de véhicule a été rejetée. Veuillez contacter notre service pour plus de détails, appelez 0577777767 ou envoyez un e-mail à support@i-go.group"); + } + EmailUtil.send(tDriver.getEmail(), 2 == finalTCar.getAuthState() ? "Le véhicule est vérifié et qualifié" : "Le véhicule n’est pas vérifié et qualifié", document.html()); + } + }catch (Exception e){ + e.printStackTrace(); + } + } + }).start(); + } + return SUCCESS_TIP; } @@ -663,16 +746,16 @@ 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("roadworthiness sticker"); shellList.add("年检到期时间[例如 2020-02-02]"); shellList.add("商业保险到期时间[例如 2020-02-02]"); dataList.add(shellList); @@ -732,81 +815,81 @@ three = String.valueOf(cell3.getStringCellValue()).trim(); } - Cell cell4 = row.getCell(4); //服务模式:出租车[是/否] - String four = null; - if (SinataUtil.isNotEmpty(cell4)){ - four = String.valueOf(cell4.getStringCellValue()).trim(); - } +// Cell cell4 = row.getCell(4); //服务模式:出租车[是/否] +// String four = null; +// if (SinataUtil.isNotEmpty(cell4)){ +// four = String.valueOf(cell4.getStringCellValue()).trim(); +// } +// +// Cell cell5 = row.getCell(5); //服务模式:跨城出行[是/否] +// String five = null; +// if (SinataUtil.isNotEmpty(cell5)){ +// five = String.valueOf(cell5.getStringCellValue()).trim(); +// } - Cell cell5 = row.getCell(5); //服务模式:跨城出行[是/否] - String five = null; - if (SinataUtil.isNotEmpty(cell5)){ - five = String.valueOf(cell5.getStringCellValue()).trim(); - } - - Cell cell6 = row.getCell(6); //服务模式:小件跨城物流[是/否] + Cell cell6 = row.getCell(4); //服务模式:小件跨城物流[是/否] String six = null; if (SinataUtil.isNotEmpty(cell6)){ six = String.valueOf(cell6.getStringCellValue()).trim(); } - Cell cell7 = row.getCell(7); //服务模式:小件跨城物流[是/否] - String seven = null; - if (SinataUtil.isNotEmpty(cell7)){ - seven = String.valueOf(cell7.getStringCellValue()).trim(); - } +// Cell cell7 = row.getCell(7); //服务模式:小件跨城物流[是/否] +// String seven = null; +// if (SinataUtil.isNotEmpty(cell7)){ +// seven = String.valueOf(cell7.getStringCellValue()).trim(); +// } +// +// Cell cell8 = row.getCell(8); //服务模式:包车[是/否] +// String eight = null; +// if (SinataUtil.isNotEmpty(cell8)){ +// eight = String.valueOf(cell8.getStringCellValue()).trim(); +// } - Cell cell8 = row.getCell(8); //服务模式:包车[是/否] - String eight = null; - if (SinataUtil.isNotEmpty(cell8)){ - eight = String.valueOf(cell8.getStringCellValue()).trim(); - } - - Cell cell9 = row.getCell(9); //车辆品牌 + Cell cell9 = row.getCell(5); //车辆品牌 String nine = null; if (SinataUtil.isNotEmpty(cell9)){ nine = String.valueOf(cell9.getStringCellValue()).trim(); } - Cell cell10 = row.getCell(10); //车辆类型 + Cell cell10 = row.getCell(6); //车辆类型 String ten = null; if (SinataUtil.isNotEmpty(cell10)){ ten = String.valueOf(cell10.getStringCellValue()).trim(); } - Cell cell11 = row.getCell(11); //车辆颜色[黑色/银色/白色/红色/黄色/橙色/蓝色] + Cell cell11 = row.getCell(7); //车辆颜色[黑色/银色/白色/红色/黄色/橙色/蓝色] String eleven = null; if (SinataUtil.isNotEmpty(cell11)){ eleven = String.valueOf(cell11.getStringCellValue()).trim(); } - Cell cell12 = row.getCell(12); //车牌号 + Cell cell12 = row.getCell(8); //车牌号 String twelve = null; if (SinataUtil.isNotEmpty(cell12)){ twelve = String.valueOf(cell12.getStringCellValue()).trim(); } - Cell cell13 = row.getCell(13); //行驶证编号 + Cell cell13 = row.getCell(9); //行驶证编号 String thirteen = null; if (SinataUtil.isNotEmpty(cell13)){ thirteen = String.valueOf(cell13.getStringCellValue()).trim(); } - Cell cell14 = row.getCell(14); //年检到期时间 + Cell cell14 = row.getCell(10); //年检到期时间 String fourteen = null; if (SinataUtil.isNotEmpty(cell14)){ fourteen = String.valueOf(cell14.getStringCellValue()).trim(); } - Cell cell15 = row.getCell(15); //商业保险到期时间 + Cell cell15 = row.getCell(11); //商业保险到期时间 String fifteen = null; if (SinataUtil.isNotEmpty(cell15)){ fifteen = String.valueOf(cell15.getStringCellValue()).trim(); } - if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(three) || SinataUtil.isEmpty(four) - || SinataUtil.isEmpty(five) || SinataUtil.isEmpty(six) || SinataUtil.isEmpty(seven) - || SinataUtil.isEmpty(eight) || SinataUtil.isEmpty(nine) || SinataUtil.isEmpty(ten) + if (SinataUtil.isEmpty(zero) || SinataUtil.isEmpty(three) /*|| SinataUtil.isEmpty(four) + || SinataUtil.isEmpty(five) */|| SinataUtil.isEmpty(six) || /*SinataUtil.isEmpty(seven) + || 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, "单元格不能为空"); @@ -819,26 +902,26 @@ if (!three.equals("是") && !three.equals("否")){ return new ErrorTip(500, "服务模式【专车】内容不正确"); } - //判断服务模式【出租车】 - if (!four.equals("是") && !four.equals("否")){ - return new ErrorTip(500, "服务模式【出租车】内容不正确"); - } - //判断服务模式【跨城出行】 - if (!five.equals("是") && !five.equals("否")){ - return new ErrorTip(500, "服务模式【跨城出行】内容不正确"); - } +// //判断服务模式【出租车】 +// if (!four.equals("是") && !four.equals("否")){ +// return new ErrorTip(500, "服务模式【出租车】内容不正确"); +// } +// //判断服务模式【跨城出行】 +// if (!five.equals("是") && !five.equals("否")){ +// return new ErrorTip(500, "服务模式【跨城出行】内容不正确"); +// } //判断服务模式【小件同城物流】 if (!six.equals("是") && !six.equals("否")){ - return new ErrorTip(500, "服务模式【小件同城物流】内容不正确"); + return new ErrorTip(500, "服务模式【小件市内物流】内容不正确"); } - //判断服务模式【小件跨城物流】 - if (!seven.equals("是") && !seven.equals("否")){ - return new ErrorTip(500, "服务模式【小件跨城物流】内容不正确"); - } - //判断服务模式【包车】 - if (!eight.equals("是") && !eight.equals("否")){ - return new ErrorTip(500, "服务模式【包车】内容不正确"); - } +// //判断服务模式【小件跨城物流】 +// if (!seven.equals("是") && !seven.equals("否")){ +// return new ErrorTip(500, "服务模式【小件跨城物流】内容不正确"); +// } +// //判断服务模式【包车】 +// if (!eight.equals("是") && !eight.equals("否")){ +// return new ErrorTip(500, "服务模式【包车】内容不正确"); +// } //判断车辆颜色 if (!eleven.equals("黑色") && !eleven.equals("银色") && !eleven.equals("白色") && !eleven.equals("红色") && !eleven.equals("黄色") && !eleven.equals("橙色") && !eleven.equals("蓝色")){ return new ErrorTip(500, "车辆颜色内容不正确"); @@ -916,6 +999,7 @@ car.setCommercialInsuranceTime(DateUtil.parseDate(fifteen)); car.setInsertTime(new Date()); car.setState(1); + car.setAuthState(2); if (ShiroKit.getUser().getRoleType() == 1){ car.setAddType(2); }else if (ShiroKit.getUser().getRoleType() == 2){ @@ -934,20 +1018,20 @@ service.setType(1); tCarServiceService.insert(service); } - //添加出租车服务模式 - if ("是".equals(four)){ - TCarService service = new TCarService(); - service.setCarId(car.getId()); - service.setType(2); - tCarServiceService.insert(service); - } - //添加跨城出行服务模式 - if ("是".equals(five)){ - TCarService service = new TCarService(); - service.setCarId(car.getId()); - service.setType(3); - tCarServiceService.insert(service); - } +// //添加出租车服务模式 +// if ("是".equals(four)){ +// TCarService service = new TCarService(); +// service.setCarId(car.getId()); +// service.setType(2); +// tCarServiceService.insert(service); +// } +// //添加跨城出行服务模式 +// if ("是".equals(five)){ +// TCarService service = new TCarService(); +// service.setCarId(car.getId()); +// service.setType(3); +// tCarServiceService.insert(service); +// } //添加小件同城物流服务模式 if ("是".equals(six)){ TCarService service = new TCarService(); @@ -955,20 +1039,20 @@ service.setType(4); tCarServiceService.insert(service); } - //添加小件跨城物流服务模式 - if ("是".equals(seven)){ - TCarService service = new TCarService(); - service.setCarId(car.getId()); - service.setType(5); - tCarServiceService.insert(service); - } - //添加包车服务模式 - if ("是".equals(eight)){ - TCarService service = new TCarService(); - service.setCarId(car.getId()); - service.setType(6); - tCarServiceService.insert(service); - } +// //添加小件跨城物流服务模式 +// if ("是".equals(seven)){ +// TCarService service = new TCarService(); +// service.setCarId(car.getId()); +// service.setType(5); +// tCarServiceService.insert(service); +// } +// //添加包车服务模式 +// if ("是".equals(eight)){ +// TCarService service = new TCarService(); +// service.setCarId(car.getId()); +// service.setType(6); +// tCarServiceService.insert(service); +// } } } } catch (Exception e) { @@ -1038,7 +1122,7 @@ shellList.add("颜色"); shellList.add("服务模式"); shellList.add("车牌号"); - shellList.add("行驶证号码"); + shellList.add("roadworthiness sticker"); shellList.add("座位数"); shellList.add("关联司机"); shellList.add("年检到期时间"); -- Gitblit v1.7.1