From 0481353111afb43a2322e18530dde26f1d841ead Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期五, 21 四月 2023 11:15:34 +0800
Subject: [PATCH] 代码调整

---
 ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java |   59 ++++++++++++-----------------------------------------------
 1 files changed, 12 insertions(+), 47 deletions(-)

diff --git a/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java b/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java
index afe2025..cf3a42c 100644
--- a/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java
+++ b/ManagementTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TCarController.java
@@ -101,13 +101,13 @@
      */
     @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);
@@ -158,12 +158,12 @@
         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);
         }
 
@@ -542,43 +542,8 @@
             }
             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() {
@@ -614,7 +579,7 @@
         shellList.add("所属机构[平台车辆/加盟车辆]");
         shellList.add("所属分公司[提示:加盟车辆选填]");
         shellList.add("所属加盟商[提示:加盟车辆选填]");
-        shellList.add("服务模式:快车[是/否]");
+        shellList.add("服务模式:专车[是/否]");
         shellList.add("服务模式:出租车[是/否]");
         shellList.add("服务模式:跨城出行[是/否]");
         shellList.add("服务模式:小件同城物流[是/否]");
@@ -678,7 +643,7 @@
                     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();
@@ -767,9 +732,9 @@
                     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("否")){
@@ -879,7 +844,7 @@
                     }
                     tCarService.insert(car);
 
-                    //添加快车服务模式
+                    //添加专车服务模式
                     if ("是".equals(three)){
                         TCarService service = new TCarService();
                         service.setCarId(car.getId());

--
Gitblit v1.7.1