From 8a5e062d2cfed5aedb07a542139cde62fab2a5ba Mon Sep 17 00:00:00 2001 From: xiepeng Date: Sun, 28 Apr 2024 17:57:47 +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 --- .../FreighttTrailerController.java | 31 ++-- .../InspectAnnuallyController.java | 42 ++--- .../controller/insure/InsureController.java | 4 + .../maintenance/MaintenanceController.java | 1 + .../OperatingVehiclesController.java | 174 +++++++++--------- .../SafetyInvestmentUseController.java | 1 - .../scrapManage/ScrapManageController.java | 6 +- .../scrapManage/ScrapManageMapper.java | 2 + .../scrapManage/ScrapManageService.java | 2 + .../impl/ScrapManageServiceImpl.java | 5 + .../datasource/insure/InsureMapper.xml | 2 +- .../datasource/scrapManage/ScrapManage.xml | 11 +- 12 files changed, 157 insertions(+), 124 deletions(-) diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index 94dc550..324bca6 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -1,5 +1,8 @@ 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.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -168,7 +171,7 @@ public class FreighttTrailerController extends BaseController { } PageData trailerInfo = taxationManageService.findByTrailerId(pd); if(!Tools.isEmpty(trailerInfo)) { - trailerInfo.put("PLATE_NUMBER",pd.getString("PLATE_NUMBER")); + BeanUtil.copyProperties(pd,trailerInfo); trailerInfo.put("FRAMES_NUMBER", pd.getString("VIN")); trailerInfo.put("VEHICLE_TYPE", pd.getString("TRAILER_TYPE")); trailerInfo.put("VEHICLEOWNER", pd.getString("CAR_OWNERS")); @@ -176,22 +179,29 @@ public class FreighttTrailerController extends BaseController { trailerInfo.put("FIRSTSHOW_DATE", pd.getString("INITIAL_REGISTRATION_DATE")); taxationManageService.edit(trailerInfo); } - // 挂车 处理 更新 过户信息 PageData vehicleInfo = new PageData(); vehicleInfo.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); vehicleInfo.put("ID", pd.getString("FREIGHTTRAILER_ID")); PageData trailerAssignedInfo = assignedManageService.findByRawVehicleId(vehicleInfo); if (!Tools.isEmpty(trailerAssignedInfo)) { + BeanUtil.copyProperties(pd,trailerAssignedInfo); trailerAssignedInfo.put("FRAMES_NUMBER", pd.getString("VIN")); - trailerAssignedInfo.put("VEHICLE_BRAND", pd.getString("TRAILER_BRAND")); - trailerAssignedInfo.put("VEHICLE_MODEL", pd.getString("TRAILER_MODEL")); - trailerAssignedInfo.put("PLATE_NUMBER", pd.getString("PLATE_NUMBER")); - trailerAssignedInfo.put("RAW_OWNERS", pd.getString("CAR_OWNERS")); trailerAssignedInfo.put("RAW_CONTACT_NUMBER", pd.getString("CONTACT_PHONE")); trailerAssignedInfo.put("RAW_OPERATION_CERTIFICATE", pd.getString("OPER_CERTIFICATE_NUM")); assignedManageService.edit(trailerAssignedInfo); } + PageData data = scrapManageService.findByScrapVehicleId(vehicleInfo); + if(!ObjectUtil.isEmpty(data)) { + BeanUtil.copyProperties(pd,data); + data.put("FRAMES_NUMBER", pd.getString("VIN")); + data.put("VEHICLEOWNER", pd.getString("CAR_OWNERS")); + data.put("VEHICLEOWNER_NUMBER", pd.getString("CAR_OWNERS_TEL")); + data.put("FIRSTSHOW_DATE", pd.getString("INITIAL_REGISTRATION_DATE")); + data.put("BRAND", pd.getString("TRAILER_BRAND")); + data.put("VEHICLE_MODEL", pd.getString("TRAILER_MODEL")); + scrapManageService.edit(data); + } freightTrailerService.edit(pd); map.put("pd", pd); map.put("result", errInfo); @@ -567,6 +577,7 @@ public class FreighttTrailerController extends BaseController { page.setPd(pd); List insAnnually = inspectAnnuallyService.annuallyList(page); + // 获取所有的营运车辆 List operatings = insAnnually.stream().filter(data -> StringUtils.equals("1",data.getString("VEHICLE_MODEL"))) .collect(Collectors.toList()); @@ -580,13 +591,7 @@ public class FreighttTrailerController extends BaseController { }else{ varList = operatingList; } - /*for (int i = 0; i < insAnnually.size(); i++) { - for (int j = 0; j < operatingList.size(); j++) { - if(operatingList.get(j).get("OPERATING_ID").equals(insAnnually.get(i).get("VEHICLE"))) { - operatingList.remove(j); - } - } - }*/ + if(pd.containsKey("ID")){ pd.put("OPERATING_ID", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID")); diff --git a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java index 03d9fe3..bbefd73 100644 --- a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java +++ b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.inspectAnnually; +import cn.hutool.core.bean.BeanUtil; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -22,6 +23,7 @@ import org.springframework.web.servlet.ModelAndView; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * 年检管理 @@ -160,21 +162,20 @@ public class InspectAnnuallyController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); List varList = inspectAnnuallyService.list(page); //列出年检列表 - - varList.stream().anyMatch(data -> { - 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"); - } - return false; - }); - + varList.stream().anyMatch(InspectAnnuallyController::vehicleType); map.put("varList", varList); map.put("page", page); map.put("result", errInfo); return map; } + private static boolean vehicleType (PageData data) { + 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"); + } + return false; + } /** * 去修改页面获取数据 @@ -192,20 +193,19 @@ public class InspectAnnuallyController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); pd = inspectAnnuallyService.findById(pd); //根据ID读取 - + PageData vehicle = new PageData(); if ("1".equals(pd.getString("VEHICLE_MODEL"))) { - PageData opearting = new PageData(); - opearting.put("OPERATING_ID", pd.get("VEHICLE")); - opearting.put("CORPINFO_ID", pd.get("CORPINFO_ID")); - PageData pageData = operatingVehiclesService.findById(opearting); - pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND")); + vehicle.put("OPERATING_ID", pd.get("VEHICLE")); + vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + PageData pageData = operatingVehiclesService.findById(vehicle); + BeanUtil.copyProperties(pageData,pd); + /*pd.put("VEHICLE_BRAND", pageData.get("VEHICLE_BRAND"));*/ pd.put("VEHICLE_TYPE", pageData.get("VEHICLE_MODEL")); - pd.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER")); + /*pd.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER"));*/ } else { - PageData freight = new PageData(); - freight.put("FREIGHTTRAILER_ID", pd.get("VEHICLE")); - freight.put("CORPINFO_ID", pd.get("CORPINFO_ID")); - PageData pageData = freightTrailerService.findById(freight); + vehicle.put("FREIGHTTRAILER_ID", pd.get("VEHICLE")); + vehicle.put("CORPINFO_ID", pd.get("CORPINFO_ID")); + PageData pageData = freightTrailerService.findById(vehicle); pd.put("VEHICLE_BRAND", pageData.get("TRAILER_BRAND")); pd.put("VEHICLE_TYPE", pageData.get("TRAILER_MODEL")); } diff --git a/src/main/java/com/zcloud/controller/insure/InsureController.java b/src/main/java/com/zcloud/controller/insure/InsureController.java index af3af5c..f19bac0 100644 --- a/src/main/java/com/zcloud/controller/insure/InsureController.java +++ b/src/main/java/com/zcloud/controller/insure/InsureController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.insure; +import cn.hutool.core.collection.CollectionUtil; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.ResponseBody; import java.util.*; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * 保险管理 @@ -64,6 +66,7 @@ public class InsureController extends BaseController { map.put("pd", pd); map.put("result", errInfo); return map; + } /** @@ -224,6 +227,7 @@ public class InsureController extends BaseController { // 过滤掉保险列表中所有的营运车辆 List varList = new ArrayList<>(); + if (!CollectionUtils.isEmpty(insures)) { varList = operatingList.stream().parallel() .filter(operating -> insures.stream() diff --git a/src/main/java/com/zcloud/controller/maintenance/MaintenanceController.java b/src/main/java/com/zcloud/controller/maintenance/MaintenanceController.java index 2305b6e..d9f3407 100644 --- a/src/main/java/com/zcloud/controller/maintenance/MaintenanceController.java +++ b/src/main/java/com/zcloud/controller/maintenance/MaintenanceController.java @@ -223,6 +223,7 @@ public class MaintenanceController extends BaseController { } else { varList = operatingList; } + if (pd.containsKey("ID")) { pd.put("OPERATING_ID", pd.getString("ID")); pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID")); diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index a5baf5c..e6a5bef 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.operatingvehicles; +import cn.hutool.core.bean.BeanUtil; import com.zcloud.controller.base.BaseController; import com.zcloud.entity.Page; import com.zcloud.entity.PageData; @@ -12,9 +13,11 @@ import com.zcloud.service.system.ImgFilesService; import com.zcloud.util.*; import net.sf.json.JSONArray; import org.apache.commons.io.FileUtils; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @@ -32,9 +35,6 @@ public class OperatingVehiclesController extends BaseController { @Autowired private OperatingVehiclesService operatingVehiclesService; - @Autowired - private Smb smb; - @Autowired private ImgFilesService imgfilesService; @@ -47,22 +47,24 @@ public class OperatingVehiclesController extends BaseController { @Autowired private AssignedManageService assignedManageService; - /**新增 + /** + * 新增 + * * @param * @throws Exception */ - @RequestMapping(value="/add") + @RequestMapping(value = "/add") @ResponseBody - public Object add() throws Exception{ - Map map = new HashMap(); + public Object add() throws Exception { + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - pd.put("OPERATING_ID", this.get32UUID()); //运营车辆主键 - pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) - pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id - pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字 - pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("OPERATING_ID", this.get32UUID()); //运营车辆主键 + pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) + pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id + pd.put("CREATORNAME", Jurisdiction.getName()); //添加人名字 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("NETWORK_STATUS", "未入网"); pd.put("ISSCRAP", "0"); @@ -72,38 +74,34 @@ public class OperatingVehiclesController extends BaseController { return map; } - /**删除 + /** + * 删除 + * * @param * @throws Exception */ - @RequestMapping(value="/delete") + @RequestMapping(value = "/delete") @ResponseBody - public Object delete() throws Exception{ - Map map = new HashMap(); + public Object delete() throws Exception { + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - if(Tools.notEmpty(pd.getString("OPERATING_ID"))) { + if (Tools.notEmpty(pd.getString("OPERATING_ID"))) { PageData findPageData = operatingVehiclesService.findById(pd); + findPageData.remove("REMARK"); PageData scrapAddData = new PageData(); - scrapAddData.put("SCRAP_ID",this.get32UUID()); + BeanUtil.copyProperties(findPageData,scrapAddData); + scrapAddData.put("SCRAP_ID", this.get32UUID()); scrapAddData.put("RECORD_NUMBER", findPageData.get("GOODSSELFNUMBER")); - scrapAddData.put("FRAMES_NUMBER", findPageData.get("FRAMES_NUMBER")); - scrapAddData.put("PLATE_NUMBER", findPageData.get("PLATE_NUMBER")); scrapAddData.put("SCRAP_VEHICLEMODEL", "运输车辆"); - scrapAddData.put("VEHICLEOWNER", findPageData.get("VEHICLEOWNER")); - scrapAddData.put("CONTACT_NUMBER", findPageData.get("CONTACT_NUMBER")); scrapAddData.put("SCRAP_DATE", DateUtil.date2Str(new Date())); scrapAddData.put("REGISTRANT", Jurisdiction.getName()); - scrapAddData.put("CREATTIME", DateUtil.date2Str(new Date())); - scrapAddData.put("OPERATTIME", DateUtil.date2Str(new Date())); - scrapAddData.put("VEHICLEOWNER_NUMBER", findPageData.get("VEHICLEOWNER_NUMBER")); - scrapAddData.put("FIRSTSHOW_DATE", findPageData.get("FIRSTSHOW_DATE")); + scrapAddData.put("CREATTIME", DateUtil.date2Str(new Date())); + scrapAddData.put("OPERATTIME", DateUtil.date2Str(new Date())); scrapAddData.put("BRAND", findPageData.get("VEHICLE_BRAND")); - scrapAddData.put("VEHICLE_MODEL", findPageData.get("VEHICLE_MODEL")); scrapAddData.put("TRANSACTION_DATE", DateUtil.date2Str(new Date())); - scrapAddData.put("CORPINFO_ID", findPageData.get("CORPINFO_ID")); scrapAddData.put("SCRAP_VEHICLE", findPageData.get("PLATE_NUMBER")); scrapAddData.put("ISDELETE", "0"); scrapManageService.save(scrapAddData); @@ -112,18 +110,20 @@ public class OperatingVehiclesController extends BaseController { pd.put("DELETORNAME", Jurisdiction.getName()); pd.put("DELETTIME", DateUtil.date2Str(new Date())); operatingVehiclesService.delete(pd); - map.put("result", errInfo); //返回结果 + map.put("result", errInfo); //返回结果 return map; } - /**修改 + /** + * 修改 + * * @param * @throws Exception */ - @RequestMapping(value="/edit") + @RequestMapping(value = "/edit") @ResponseBody - public Object edit() throws Exception{ - Map map = new HashMap(); + public Object edit() throws Exception { + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); @@ -133,35 +133,40 @@ public class OperatingVehiclesController extends BaseController { operatingVehiclesService.edit(pd); PageData pageData = new PageData(); pageData.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); - pageData.put("ID",pd.getString("OPERATING_ID")); + pageData.put("ID", pd.getString("OPERATING_ID")); PageData vehicleAssignedInfo = assignedManageService.findByRawVehicleId(pageData); if (!Tools.isEmpty(vehicleAssignedInfo)) { - vehicleAssignedInfo.put("FRAMES_NUMBER", pd.getString("FRAMES_NUMBER")); - vehicleAssignedInfo.put("VEHICLE_BRAND", pd.getString("VEHICLE_BRAND")); - vehicleAssignedInfo.put("VEHICLE_MODEL", pd.getString("VEHICLE_MODEL")); - vehicleAssignedInfo.put("ENGINE_NUMBER", pd.getString("ENGINE_NUMBER")); + BeanUtil.copyProperties(pd, vehicleAssignedInfo); vehicleAssignedInfo.put("POWER_TYPE", pd.getString("FUEL_TYPE")); - vehicleAssignedInfo.put("EMISSION_STANDARD", pd.getString("EMISSION_STANDARD")); - vehicleAssignedInfo.put("PLATE_NUMBER", pd.getString("PLATE_NUMBER")); vehicleAssignedInfo.put("RAW_OWNERS", pd.getString("VEHICLEOWNER")); vehicleAssignedInfo.put("RAW_CONTACT_NUMBER", pd.getString("CONTACT_NUMBER")); vehicleAssignedInfo.put("RAW_OPERATION_CERTIFICATE", pd.getString("OPERATING_CERTIFICATE")); assignedManageService.edit(vehicleAssignedInfo); } + PageData pd2 = scrapManageService.findByScrapVehicleId(pageData); + if(!ObjectUtils.isEmpty(pd2)) { + BeanUtil.copyProperties(pd,pd2); + pd2.put("VEHICLE_MODEL", pd.getString("VEHICLE_MODEL")); + pd2.put("VEHICLEOWNER_NUMBER", pd.getString("CONTACT_NUMBER")); + pd2.put("BRAND", pd.getString("VEHICLE_BRAND")); + scrapManageService.edit(pd2); + } map.put("pd", pd); map.put("result", errInfo); return map; } - /**去修改页面获取数据 + /** + * 去修改页面获取数据 + * * @param * @throws Exception */ - @RequestMapping(value="/goEdit") + @RequestMapping(value = "/goEdit") @ResponseBody - public Object goEdit() throws Exception{ - Map map = new HashMap(); + public Object goEdit() throws Exception { + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); @@ -169,11 +174,11 @@ public class OperatingVehiclesController extends BaseController { pd = operatingVehiclesService.findById(pd); pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID")); - pd.put("TYPE",130); + pd.put("TYPE", 130); List headstockphoto = imgfilesService.listAll(pd);//车头照片 - pd.put("TYPE",121); + pd.put("TYPE", 121); List drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片 - pd.put("TYPE",122); + pd.put("TYPE", 122); List operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片 List zdepartmentPdList = new ArrayList(); @@ -231,18 +236,18 @@ public class OperatingVehiclesController extends BaseController { @RequestMapping(value = "/findById") @ResponseBody public Object findById() throws Exception { - Map map = new HashMap(); + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("FOREIGN_KEY", pd.getString("OPERATING_ID")); - pd.put("TYPE",130); + pd.put("TYPE", 130); List headstockphoto = imgfilesService.listAll(pd);//车头照片 - pd.put("TYPE",121); + pd.put("TYPE", 121); List drivinglicensephoto = imgfilesService.listAll(pd);//行驶证照片 - pd.put("TYPE",132); + pd.put("TYPE", 132); List operatingcertificatephoto = imgfilesService.listAll(pd);//运营证照片 map.put("pd", pd); map.put("headstockphoto", headstockphoto); @@ -257,11 +262,11 @@ public class OperatingVehiclesController extends BaseController { @RequestMapping(value = "/setOperationsScrapStatus") @ResponseBody public Object setOperationsScrapStatus() throws Exception { - Map map = new HashMap(); + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); operatingVehiclesService.setScrapStatus(pd); map.put("pd", pd); map.put("result", errInfo); @@ -280,10 +285,10 @@ public class OperatingVehiclesController extends BaseController { return map; } - @RequestMapping(value="/findByPlateNumber") + @RequestMapping(value = "/findByPlateNumber") @ResponseBody - public Object findByPlateNumber() throws Exception{ - Map map = new HashMap(); + public Object findByPlateNumber() throws Exception { + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); @@ -296,44 +301,43 @@ public class OperatingVehiclesController extends BaseController { } - - - - /**导出到excel + /** + * 导出到excel + * * @param * @throws Exception */ - @RequestMapping(value="/excel") + @RequestMapping(value = "/excel") // // @RequiresPermissions("toExcel") - public ModelAndView exportExcel() throws Exception{ + public ModelAndView exportExcel() throws Exception { ModelAndView mv = new ModelAndView(); PageData pd = new PageData(); pd = this.getPageData(); String DATA_IDS = pd.getString("DATA_IDS"); - if(Tools.notEmpty(DATA_IDS)){ + if (Tools.notEmpty(DATA_IDS)) { String[] ArrayDATA_IDS = DATA_IDS.split(","); - pd.put("ArrayDATA_IDS",ArrayDATA_IDS); + pd.put("ArrayDATA_IDS", ArrayDATA_IDS); } - Map dataMap = new HashMap(); + Map dataMap = new HashMap(); List titles = new ArrayList(); - titles.add("车牌号"); //1 - titles.add("车架号"); //2 - titles.add("车辆类型"); //3 - titles.add("运营证号"); //4 - titles.add("归属部门"); //5 - titles.add("车主"); //6 - titles.add("车主电话"); //7 - titles.add("初登日期"); //8 - titles.add("发证日期"); //9 - titles.add("到期日期"); //10 - titles.add("车辆品牌"); //11 - titles.add("车辆型号"); //12 - titles.add("核定总质量"); //13 - titles.add("核定载质量"); //14 + titles.add("车牌号"); //1 + titles.add("车架号"); //2 + titles.add("车辆类型"); //3 + titles.add("运营证号"); //4 + titles.add("归属部门"); //5 + titles.add("车主"); //6 + titles.add("车主电话"); //7 + titles.add("初登日期"); //8 + titles.add("发证日期"); //9 + titles.add("到期日期"); //10 + titles.add("车辆品牌"); //11 + titles.add("车辆型号"); //12 + titles.add("核定总质量"); //13 + titles.add("核定载质量"); //14 dataMap.put("titles", titles); List varOList = operatingVehiclesService.listOut(pd); List varList = new ArrayList(); - for(int i=0;i map = new HashMap(); String errInfo = "success"; @@ -421,7 +425,7 @@ public class OperatingVehiclesController extends BaseController { convertExcelDate(lpd, "var10"); // 初登日期 FIRSTSHOW_DATE convertExcelDate(lpd, "var11"); // 发证日期 CERTIFICATE_DATE convertExcelDate(lpd, "var12"); // 到期日期 EXPIRE_DATE - System.out.println(lpd.get("var10")+"--"+lpd.get("var11")+"--"+lpd.get("var12")); + System.out.println(lpd.get("var10") + "--" + lpd.get("var11") + "--" + lpd.get("var12")); for (int i = 0; i < header.size(); i++) { if (!lpd.containsKey("var" + i)) { errorStr.append("

第" + succeeNum + "行的\"" + header.get(i) + "\"无数据

"); @@ -491,7 +495,7 @@ public class OperatingVehiclesController extends BaseController { } map.put("result", "success");//返回结果 map.put("resultType", errInfo);//返回message类型 - map.put("isExcel","1");//返回类型 + map.put("isExcel", "1");//返回类型 map.put("resultStr", errorStr.toString()); return map; } diff --git a/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java b/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java index 1f71082..722c6d6 100644 --- a/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java +++ b/src/main/java/com/zcloud/controller/safetyInvestment/SafetyInvestmentUseController.java @@ -134,7 +134,6 @@ public class SafetyInvestmentUseController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID List varList = safetyinvestmentuseService.listAll(pd); //列出SafetyInvestmentUse列表 - // 计算预提额合计 Double drawingsTotal = varList.stream(). filter(data -> StringUtils.equals(data.getString("USE_TYPE"), "1")) diff --git a/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java b/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java index 2912179..5d4b0d5 100644 --- a/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java +++ b/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java @@ -84,8 +84,10 @@ public class ScrapManageController extends BaseController { pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER")); pd2.put("CORPINFO_ID", pageData.get("CORPINFO_ID")); PageData scrapVehicle = operatingVehiclesService.findByfindByPlateNumber(pd2); - scrapVehicle.put("ISSCRAP", "0"); - operatingVehiclesService.edit(scrapVehicle); + if(!ObjectUtils.isEmpty(scrapVehicle)) { + scrapVehicle.put("ISSCRAP", "0"); + operatingVehiclesService.edit(scrapVehicle); + } }else{ PageData pd2 = new PageData(); pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER")); diff --git a/src/main/java/com/zcloud/mapper/datasource/scrapManage/ScrapManageMapper.java b/src/main/java/com/zcloud/mapper/datasource/scrapManage/ScrapManageMapper.java index 49ad8d2..edd5a70 100644 --- a/src/main/java/com/zcloud/mapper/datasource/scrapManage/ScrapManageMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/scrapManage/ScrapManageMapper.java @@ -34,4 +34,6 @@ public interface ScrapManageMapper{ List datalistPage(Page page); List scrapListAll(String corpId); + + PageData findByScrapVehicleId(PageData pd); } diff --git a/src/main/java/com/zcloud/service/scrapManage/ScrapManageService.java b/src/main/java/com/zcloud/service/scrapManage/ScrapManageService.java index 1d5ab0c..7a1405d 100644 --- a/src/main/java/com/zcloud/service/scrapManage/ScrapManageService.java +++ b/src/main/java/com/zcloud/service/scrapManage/ScrapManageService.java @@ -34,4 +34,6 @@ public interface ScrapManageService { public List list(Page page); List scrapListAll(String corpId); + + PageData findByScrapVehicleId(PageData pd); } diff --git a/src/main/java/com/zcloud/service/scrapManage/impl/ScrapManageServiceImpl.java b/src/main/java/com/zcloud/service/scrapManage/impl/ScrapManageServiceImpl.java index 1d569da..088e703 100644 --- a/src/main/java/com/zcloud/service/scrapManage/impl/ScrapManageServiceImpl.java +++ b/src/main/java/com/zcloud/service/scrapManage/impl/ScrapManageServiceImpl.java @@ -48,4 +48,9 @@ public class ScrapManageServiceImpl implements ScrapManageService { public List scrapListAll(String corpId) { return scrapManageMapper.scrapListAll(corpId); } + + @Override + public PageData findByScrapVehicleId(PageData pd) { + return scrapManageMapper.findByScrapVehicleId(pd); + } } diff --git a/src/main/resources/mybatis/datasource/insure/InsureMapper.xml b/src/main/resources/mybatis/datasource/insure/InsureMapper.xml index 99e2245..df3e443 100644 --- a/src/main/resources/mybatis/datasource/insure/InsureMapper.xml +++ b/src/main/resources/mybatis/datasource/insure/InsureMapper.xml @@ -198,7 +198,7 @@ INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID LEFT JOIN bus_traffic_operatingvehicle bto on bto.OPERATING_ID = f.VEHICLE LEFT JOIN bus_traffic_mechanical_freighttrailer btmf on btmf.FREIGHTTRAILER_ID = f.VEHICLE - where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} AND (bto.ISSCRAP = '0' OR btmf.ISSCRAP = '0') + where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') diff --git a/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml b/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml index 43daecd..b1d4549 100644 --- a/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml +++ b/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml @@ -184,7 +184,7 @@ OPERATTIME = #{OPERATTIME}, DELETOR = #{DELETOR}, DELETORNAME = #{DELETORNAME}, - DELETTIME =#{DELETTIME} + DELETTIME =#{DELETTIME}, SCRAPFLAG =#{SCRAPFLAG} where SCRAP_ID = #{SCRAP_ID} @@ -413,5 +413,14 @@ where f.SCRAP_ID = '0' + +