From aab7cc16663d2e1e3a89b4e96202a2edcf9317e6 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Tue, 23 Apr 2024 18:03:50 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TrafficSecurityNoticeController.java | 1 - ...SecurityWaybillRegistrationController.java | 1 - .../FreighttTrailerController.java | 10 +++++ .../maintain/MaintainController.java | 2 +- .../OperatingVehiclesController.java | 8 ++-- .../operations/OperationsController.java | 45 ++++++++++--------- .../TrafficDrivingCommitmentMapper.xml | 2 +- .../TrafficDrivingTypeMapper.xml | 2 +- .../TrafficSafetyActivitiesMapper.xml | 2 +- .../TrafficSafetyManualMapper.xml | 2 +- .../FirefightingMaintainMapper.xml | 1 + .../freighttrailer/FreightTrailerMapper.xml | 2 + .../inspectAnnually/InspectAnnuallyMapper.xml | 27 +---------- 13 files changed, 48 insertions(+), 57 deletions(-) diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityNoticeController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityNoticeController.java index f1a8830..86fe96e 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityNoticeController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityNoticeController.java @@ -89,7 +89,6 @@ public class TrafficSecurityNoticeController extends BaseController { pd.put("SIGNING", "0"); // 签收情况 pd.put("REPLY", "0"); // 回复情况 securityNoticeService.save(pd); - map.put("result", errInfo); map.put("pd", pd); return map; diff --git a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java index 6eeb98b..a1c264d 100644 --- a/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java +++ b/src/main/java/com/zcloud/controller/comprehensive/TrafficSecurityWaybillRegistrationController.java @@ -50,7 +50,6 @@ public class TrafficSecurityWaybillRegistrationController extends BaseController pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); List varList = trafficSecurityWaybillRegistrationService.listForSecurityWaybill(page); - map.put("varList", varList); map.put("page", page); 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 678ac31..716c3a9 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -153,6 +153,16 @@ public class FreighttTrailerController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 PageData freightTrailer = freightTrailerService.findById(pd); + if(StringUtils.equals(freightTrailer.getString("ISSCRAP"), "1")) { + pd.put("ISSCRAP", "1"); + } else{ + pd.put("ISSCRAP", "0"); + } + if (StringUtils.equals(freightTrailer.getString("ISASSIGNED"), "1")) { + pd.put("ISASSIGNED", "1"); + }else{ + pd.put("ISASSIGNED", "0"); + } List taxationList = taxationManageService.taxationList(pd.getString("CORPINFO_ID")); // 更新车船税数据 List assignedList = assignedManageService.assignedList(pd.getString("CORPINFO_ID")); // 更新过户数据 for (PageData taxation : taxationList) { diff --git a/src/main/java/com/zcloud/controller/maintain/MaintainController.java b/src/main/java/com/zcloud/controller/maintain/MaintainController.java index 0a5569e..f50438d 100644 --- a/src/main/java/com/zcloud/controller/maintain/MaintainController.java +++ b/src/main/java/com/zcloud/controller/maintain/MaintainController.java @@ -48,7 +48,7 @@ public class MaintainController extends BaseController { pd.put("MAINTAIN_ID", this.get32UUID()); pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id - pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 + pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 maintainService.save(pd); map.put("pd", pd); diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index 03f37be..1658feb 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -130,7 +130,7 @@ public class OperatingVehiclesController extends BaseController { pd.put("OPERATOR", Jurisdiction.getCORPINFO_ID()); pd.put("OPERATORNAME", Jurisdiction.getName()); pd.put("OPERATTIME", DateUtil.date2Str(new Date())); - PageData operation = operatingVehiclesService.findById(pd); + /*PageData operation = operatingVehiclesService.findById(pd); List assignedList = assignedManageService.assignedList(pd.getString("CORPINFO_ID")); for (PageData assigned : assignedList) { if(operation.get("PLATE_NUMBER").equals(assigned.get("RAW_PLATE_NUMBER"))) { @@ -138,12 +138,14 @@ public class OperatingVehiclesController extends BaseController { assigned.put("RAW_OWNERS", pd.get("VEHICLEOWNER")); assignedManageService.edit(assigned); } - } + }*/ operatingVehiclesService.edit(pd); map.put("pd", pd); map.put("result", errInfo); return map; } + + /**去修改页面获取数据 * @param * @throws Exception @@ -191,9 +193,7 @@ public class OperatingVehiclesController extends BaseController { } @RequestMapping(value = "/list") - // @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR) @ResponseBody - @LogAnno(menuType = "基础信息管理", menuServer = "货运挂车", instructionsOperate = "货运挂车", instructionsType = "列表") public Object list(Page page) throws Exception { Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/controller/operations/OperationsController.java b/src/main/java/com/zcloud/controller/operations/OperationsController.java index e3ad339..f1345f1 100644 --- a/src/main/java/com/zcloud/controller/operations/OperationsController.java +++ b/src/main/java/com/zcloud/controller/operations/OperationsController.java @@ -158,7 +158,7 @@ public class OperationsController extends BaseController { List varList = operationsService.list(page); //列出Question列表 varList.stream().anyMatch(data -> { - if("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) { + if ("1".equals(data.getString("OPEAR_ISSCRAP")) || "1".equals(data.getString("FREIGHT_ISSCRAP"))) { data.put("ARCHIVES_TYPE", "2"); } else if ("1".equals(data.getString("OPEAR_ISASSIGNED")) || "1".equals(data.getString("FREIGHT_ISASSIGNED"))) { data.put("ARCHIVES_TYPE", "1"); @@ -192,13 +192,15 @@ public class OperationsController extends BaseController { pd2.put("CORPINFO_ID", pd.get("CORPINFO_ID")); //企业ID page.setPd(pd2); List operationList = operationsService.list(page); - for (int i = 0; i < operationList.size(); i++) { - if(pd.get("OPERATIONS_ID").equals(operationList.get(i).get("OPERATIONS_ID"))) { - pd.put("CYCLE_NAME",operationList.get(i).get("CYCLE_NAME")); + if (!CollectionUtils.isEmpty(operationList)) { + for (int i = 0; i < operationList.size(); i++) { + if (pd.get("OPERATIONS_ID").equals(operationList.get(i).get("OPERATIONS_ID"))) { + pd.put("CYCLE_NAME", operationList.get(i).get("CYCLE_NAME")); + } } } pd.put("FOREIGN_KEY", pd.getString("OPERATIONS_ID")); - pd.put("TYPE",126); + pd.put("TYPE", 126); List operationsinfoImgs = imgfilesService.listAll(pd);//营运证资料图片 map.put("pd", pd); map.put("operationsinfoImgs", operationsinfoImgs); @@ -213,32 +215,33 @@ public class OperationsController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); - if(!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) { + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + if (!StringUtils.isEmpty(pd.getString("TRAFFIC_TYPE")) && pd.getString("TRAFFIC_TYPE").equals("1")) { // 营运车辆 List operatingList = operatingVehiclesService.operationVehicleList(pd.getString("CORPINFO_ID")); page.setPd(pd); List operationsList = operationsService.list(page); // 获取营运车辆列表中所有的运营车辆 - List operations = operationsList.stream().filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "1")) + List operations = operationsList.stream() + .filter(data -> StringUtils.equals(data.getString("VEHICLE_MODEL"), "1")) .collect(Collectors.toList()); // 过滤掉营运管理列表中所有营运车辆信息 List varList = new ArrayList<>(); - if(!CollectionUtils.isEmpty(operations)) { + if (!CollectionUtils.isEmpty(operations)) { varList = operatingList.stream().parallel() - .filter(operating -> operations.stream(). - noneMatch(operation -> StringUtils.equals(operating.getString("OPERATING_ID"), operation.getString("VEHICLE")))) + .filter(operating -> operations.stream() + .noneMatch(operation -> StringUtils.equals(operating.getString("OPERATING_ID"), operation.getString("VEHICLE")))) .collect(Collectors.toList()); - }else{ + } else { varList = operatingList; } - if(pd.containsKey("ID")){ + if (pd.containsKey("ID")) { pd.put("OPERATING_ID", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID")); - pd.put("TYPE",121); + pd.put("TYPE", 121); List drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片 map.put("drivingLicenseImgs", drivingLicenseImgs); } @@ -249,7 +252,7 @@ public class OperationsController extends BaseController { map.put("result", errInfo); return map; } - if("2".equals(pd.getString("TRAFFIC_TYPE"))) { + if ("2".equals(pd.getString("TRAFFIC_TYPE"))) { // 货运挂车 List freightList = freightTrailerService.trailerList(pd.getString("CORPINFO_ID")); page.setPd(pd); @@ -261,19 +264,19 @@ public class OperationsController extends BaseController { .collect(Collectors.toList()); List varList = new ArrayList<>(); - if(!CollectionUtils.isEmpty(operations)) { + if (!CollectionUtils.isEmpty(operations)) { varList = freightList.stream().parallel() .filter(freight -> operations.stream() .noneMatch(operation -> StringUtils.equals(freight.getString("FREIGHTTRAILER_ID"), operation.getString("VEHICLE")))) .collect(Collectors.toList()); - }else{ + } else { varList = freightList; } - if(pd.containsKey("ID")){ + if (pd.containsKey("ID")) { pd.put("FREIGHTTRAILER_ID", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("FREIGHTTRAILER_ID")); - pd.put("TYPE",121); + pd.put("TYPE", 121); List drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片 map.put("drivingLicenseImgs", drivingLicenseImgs); } @@ -286,9 +289,9 @@ public class OperationsController extends BaseController { } List resData = freightTrailerService.vehicleList(pd); - if(pd.containsKey("ID")){ + if (pd.containsKey("ID")) { pd.put("FOREIGN_KEY", pd.getString("ID")); - pd.put("TYPE",121); + pd.put("TYPE", 121); List drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片 map.put("drivingLicenseImgs", drivingLicenseImgs); } diff --git a/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml b/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml index d3fae6f..e18b0e8 100644 --- a/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml +++ b/src/main/resources/mybatis/datasource/comprehensive/TrafficDrivingCommitmentMapper.xml @@ -101,7 +101,7 @@ and f.INQUIRYCONTENT LIKE CONCAT(CONCAT('%', #{pd.INQUIRYCONTENT}),'%') - order by f.CREATTIME DESC + order by f.OPERATTIME DESC diff --git a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml index a10ab95..1b70e9b 100644 --- a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml +++ b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml @@ -204,6 +204,8 @@ f.APPROVED_LOAD_CAPACITY, f.VOLUME, f.NOTES, + f.ISSCRAP as ISSCRAP, + f.ISASSIGNED as ISASSIGNED, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 120 and t.FOREIGN_KEY = f.FREIGHTTRAILER_ID limit 1) as TRAILER_IMG, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 121 and t.FOREIGN_KEY = f.FREIGHTTRAILER_ID limit 1) as DRIVING_LICENSE_IMG, (select t.FILEPATH from bus_imgfiles t where t.TYPE = 122 and t.FOREIGN_KEY = f.FREIGHTTRAILER_ID limit 1) as OPER_CERTIFICATE_IMG, diff --git a/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml b/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml index 85297d0..aa1b6e7 100644 --- a/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml +++ b/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml @@ -136,30 +136,7 @@