From 0de1e045c05a37f9234cc16cc900f9c887bcb590 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Wed, 15 May 2024 18:08:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../emergency/EmergencyPlanController.java | 3 + .../FreighttTrailerController.java | 22 ++++++- .../controller/insure/InsureController.java | 4 ++ .../OperatingVehiclesController.java | 1 + .../controller/system/UsersController.java | 1 + .../freighttrailer/FreightTrailerMapper.java | 2 + .../freighttrailer/FreightTrailerService.java | 2 + .../impl/FreightTrailerServiceImpl.java | 5 ++ .../freighttrailer/FreightTrailerMapper.xml | 11 ++++ .../OperatingVehiclesMapper.xml | 3 +- .../mybatis/datasource/system/UsersMapper.xml | 58 ++++++++++++++----- 11 files changed, 96 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/zcloud/controller/emergency/EmergencyPlanController.java b/src/main/java/com/zcloud/controller/emergency/EmergencyPlanController.java index 05fa9a1..2e0bc85 100644 --- a/src/main/java/com/zcloud/controller/emergency/EmergencyPlanController.java +++ b/src/main/java/com/zcloud/controller/emergency/EmergencyPlanController.java @@ -113,6 +113,9 @@ public class EmergencyPlanController extends BaseController { smb.sshSftp(file, fileName, Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile); pd.put("PLAN_ATTACH_NAME", file.getOriginalFilename()); pd.put("PLAN_ATTACH_IDS", Const.FILEPATHFILE + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName); + }else{ + pd.put("PLAN_ATTACH_NAME", null); + pd.put("PLAN_ATTACH_IDS", null); } emergencyplanService.edit(pd); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index 324bca6..ba17043 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -3,6 +3,7 @@ package com.zcloud.controller.freighttrailer; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; +import com.alibaba.druid.sql.visitor.SQLASTOutputVisitor; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -574,14 +575,15 @@ public class FreighttTrailerController extends BaseController { if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) { // 营运车辆 List operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID")); + operatingList = operatingList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList()); page.setPd(pd); List insAnnually = inspectAnnuallyService.annuallyList(page); - // 获取所有的营运车辆 - List operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL"))) + List operatings = insAnnually.stream().filter(data -> StringUtils.equals("1", data.getString("VEHICLE_MODEL"))) .collect(Collectors.toList()); + // 过滤掉年检车辆中已经存在的营运车辆 List varList = new ArrayList<>(); if(!CollectionUtils.isEmpty(operatings)) { @@ -609,6 +611,7 @@ public class FreighttTrailerController extends BaseController { if("2".equals(pd.getString("TRAFFIC_TYPE"))) { // 货运挂车 List freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID")); + freightList = freightList.stream().parallel().filter(data -> "0".equals(data.getString("ISASSIGNED"))).collect(Collectors.toList()); page.setPd(pd); List insAnnually = inspectAnnuallyService.annuallyList(page); @@ -660,4 +663,19 @@ public class FreighttTrailerController extends BaseController { return map; } + @RequestMapping(value = "/findTrailerByPlateNumber") + @ResponseBody + public Object findTrailerByPlateNumber() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("PLATE_NUMBER", pd.getString("vehicleNumber")); + PageData resData = freightTrailerService.findTrailerByPlateNumber(pd); + map.put("pd", resData); + map.put("result", errInfo); + return map; + } + } diff --git a/src/main/java/com/zcloud/controller/insure/InsureController.java b/src/main/java/com/zcloud/controller/insure/InsureController.java index 9f59996..7c98c90 100644 --- a/src/main/java/com/zcloud/controller/insure/InsureController.java +++ b/src/main/java/com/zcloud/controller/insure/InsureController.java @@ -121,6 +121,10 @@ public class InsureController extends BaseController { pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id pd.put("OPERATORNAME", Jurisdiction.getName()); //修改人 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + pd.put("operating","1"); + pd.put("operating",')'); + pd.put("isasscined","1"); + if (DateUtil.compareDate(pd.getString("DUE_DATE"), DateUtil.getDay()) && DateUtil.compareDate(DateUtil.getDay(), pd.getString("REMINDER_DATE"))) { pd.put("REVERT", 2); } else if (DateUtil.compareDate(DateUtil.getDay(), pd.getString("DUE_DATE"))) { diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index ed855e7..33b488e 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -73,6 +73,7 @@ public class OperatingVehiclesController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("NETWORK_STATUS", "未入网"); pd.put("ISSCRAP", "0"); + pd.put("ISASSIGNED", "0"); operatingVehiclesService.save(pd); map.put("pd", pd); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/system/UsersController.java b/src/main/java/com/zcloud/controller/system/UsersController.java index 5d575cb..568f4be 100644 --- a/src/main/java/com/zcloud/controller/system/UsersController.java +++ b/src/main/java/com/zcloud/controller/system/UsersController.java @@ -243,6 +243,7 @@ public class UsersController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //page.setPd(pd); List userList = usersService.userSelectPersonTypelist(pd);//列出用户列表 + System.out.println("userList = " + userList); map.put("userList", userList); //map.put("page", page); map.put("pd", pd); diff --git a/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java b/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java index 25dc146..283bea0 100644 --- a/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java @@ -92,5 +92,7 @@ public interface FreightTrailerMapper { List getScrapPulldownVehicleList(String corpId); void editInspectTreight(PageData pd); + + PageData findTrailerByPlateNumber(PageData pd); } diff --git a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java index c2451a6..9daca6a 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java +++ b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java @@ -92,5 +92,7 @@ public interface FreightTrailerService { List getScrapPulldownVehicleList(String corpId); void editInspectTreight(PageData data); + + PageData findTrailerByPlateNumber(PageData pd); } diff --git a/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java b/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java index b35911c..caab6ac 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java +++ b/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java @@ -147,5 +147,10 @@ public class FreightTrailerServiceImpl implements FreightTrailerService { public void editInspectTreight(PageData pd) { freightTrailerMapper.editInspectTreight(pd); } + + @Override + public PageData findTrailerByPlateNumber(PageData pd) { + return freightTrailerMapper.findTrailerByPlateNumber(pd); + } } diff --git a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml index be26cf2..f9596da 100644 --- a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml +++ b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml @@ -428,5 +428,16 @@ f.ISDELETE = '0' AND f.CORPINFO_ID = #{corpId} AND f.ISASSIGNED = '0' + + diff --git a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml index 31639e8..32fbf8f 100644 --- a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml +++ b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml @@ -355,6 +355,7 @@ where f.PLATE_NUMBER = #{PLATE_NUMBER} AND f.CORPINFO_ID = #{CORPINFO_ID} + AND f.ISDELETE = '0'