From 41336d567cdc9a1dedd62dd540982dc66ab914a0 Mon Sep 17 00:00:00 2001 From: xiepeng Date: Fri, 29 Mar 2024 18:06:18 +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 --- .../AssignedManageController.java | 8 ++-- .../FreighttTrailerController.java | 3 +- .../scrapManage/ScrapManageController.java | 22 ++++++++- .../TaxationManageController.java | 2 +- .../freighttrailer/FreightTrailerMapper.java | 4 ++ .../operations/OperationsMapper.java | 2 +- .../freighttrailer/FreightTrailerService.java | 4 ++ .../impl/FreightTrailerServiceImpl.java | 9 ++++ .../impl/OperationsServiceImpl.java | 2 +- .../assignedManage/AssignedManageMapper.xml | 4 +- .../freighttrailer/FreightTrailerMapper.xml | 37 ++++++++++++-- .../maintenance/MaintenanceMapper.xml | 16 ++----- .../operations/OperationsMapper.xml | 48 +++++++++++++++++++ .../datasource/scrapManage/ScrapManage.xml | 3 +- .../taxationManage/TaxationManageMapper.xml | 12 ++--- 15 files changed, 139 insertions(+), 37 deletions(-) diff --git a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java index 37b95a0..7fda2b5 100644 --- a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java +++ b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java @@ -16,10 +16,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.multipart.MultipartFile; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; @Controller @RequestMapping("/assignedmanage") @@ -149,10 +146,13 @@ public class AssignedManageController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); page.setPd(pd); List varList = assignedManageService.list(page); //列出MajorDangerSource列表 + List vehicleList = new ArrayList<>(); + 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 a1bd090..840dd3c 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -75,7 +75,8 @@ public class FreighttTrailerController extends BaseController { pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID - + pd.put("ISSCRAP", "0"); + pd.put("ISASSIGNED", "0"); freightTrailerService.save(pd); map.put("pd", pd); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java b/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java index 32e5784..0fb7d07 100644 --- a/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java +++ b/src/main/java/com/zcloud/controller/scrapManage/ScrapManageController.java @@ -55,6 +55,7 @@ public class ScrapManageController extends BaseController { pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + freightTrailerService.editScrapStatus(pd); scrapManageService.save(pd); map.put("pd", pd); map.put("result", errInfo); @@ -84,6 +85,13 @@ public class ScrapManageController extends BaseController { PageData scrapVehicle = operatingVehiclesService.findByfindByPlateNumber(pd2); scrapVehicle.put("ISSCRAP", "0"); operatingVehiclesService.edit(scrapVehicle); + }else{ + PageData pd2 = new PageData(); + pd2.put("PLATE_NUMBER", pageData.get("PLATE_NUMBER")); + pd2.put("CORPINFO_ID", pageData.get("CORPINFO_ID")); + PageData scrapVehicle = freightTrailerService.findByPlateNumber(pd2); + scrapVehicle.put("ISSCRAP", "0"); + freightTrailerService.edit(scrapVehicle); } scrapManageService.delete(pd); map.put("result", errInfo); //返回结果 @@ -192,7 +200,7 @@ public class ScrapManageController extends BaseController { return map; } - @RequestMapping(value = "/getscrapfreighttrailerlist") + /*@RequestMapping(value = "/getscrapfreighttrailerlist") @ResponseBody public Object getScrapFreightTrailerList() throws Exception { Map map = new HashMap(); @@ -210,6 +218,18 @@ public class ScrapManageController extends BaseController { map.put("varList", freightList); map.put("result", errInfo); return map; + }*/ + + @RequestMapping(value = "/getscrapfreighttrailerlist") + @ResponseBody + public Object getScrapFreightTrailerList() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + String corpId = Jurisdiction.getCORPINFO_ID(); + List freightList = freightTrailerService.trailerList(corpId); + map.put("varList", freightList); + map.put("result", errInfo); + return map; } diff --git a/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java b/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java index 444567e..4bf5500 100644 --- a/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java +++ b/src/main/java/com/zcloud/controller/taxationManage/TaxationManageController.java @@ -191,7 +191,7 @@ public class TaxationManageController extends BaseController { List taxationList = taxationManageService.list(page); // 列出车船税列表 for (int i = 0; i < taxationList.size(); i++) { for (int j = 0; j < varList.size(); j++) { - if(taxationList.get(i).get("PLATE_NUMBER").equals(varList.get(j).get("PLATE_NUMBER"))){ + if (taxationList.get(i).get("PLATE_NUMBER").equals(varList.get(j).get("PLATE_NUMBER")) || varList.get(j).get("ISSCRAP").equals("1")) { varList.remove(j); } } 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 924bc7f..fed1081 100644 --- a/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java @@ -78,5 +78,9 @@ public interface FreightTrailerMapper { List listOut(PageData pd); List listAll(PageData pd); + + void editScrapStatus(PageData pd); + + PageData findByPlateNumber(PageData pd2); } diff --git a/src/main/java/com/zcloud/mapper/datasource/operations/OperationsMapper.java b/src/main/java/com/zcloud/mapper/datasource/operations/OperationsMapper.java index 3486271..a0b3332 100644 --- a/src/main/java/com/zcloud/mapper/datasource/operations/OperationsMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/operations/OperationsMapper.java @@ -48,7 +48,7 @@ public interface OperationsMapper { * @param page * @throws Exception */ - List datalistPage(Page page); + List datalistPage2(Page page); /** diff --git a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java index 0728ce9..b06c52f 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java +++ b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java @@ -78,5 +78,9 @@ public interface FreightTrailerService { List listOut(PageData pd); List listAll(PageData pd); + + void editScrapStatus(PageData pd); + + PageData findByPlateNumber(PageData pd2); } 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 74d5c2a..55d94cf 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java +++ b/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java @@ -113,5 +113,14 @@ public class FreightTrailerServiceImpl implements FreightTrailerService { return freightTrailerMapper.listAll(pd); } + @Override + public void editScrapStatus(PageData pd) { + freightTrailerMapper.editScrapStatus(pd); + } + + @Override + public PageData findByPlateNumber(PageData pd2) { + return freightTrailerMapper.findByPlateNumber(pd2); + } } diff --git a/src/main/java/com/zcloud/service/operations/impl/OperationsServiceImpl.java b/src/main/java/com/zcloud/service/operations/impl/OperationsServiceImpl.java index d197098..782605b 100644 --- a/src/main/java/com/zcloud/service/operations/impl/OperationsServiceImpl.java +++ b/src/main/java/com/zcloud/service/operations/impl/OperationsServiceImpl.java @@ -67,7 +67,7 @@ public class OperationsServiceImpl implements OperationsService { * @throws Exception */ public List list(Page page) throws Exception { - return operationsMapper.datalistPage(page); + return operationsMapper.datalistPage2(page); } diff --git a/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml b/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml index fa1721b..7da25c3 100644 --- a/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml +++ b/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml @@ -423,10 +423,10 @@ @@ -259,4 +266,24 @@ where f.ISDELETE = '0' + + update + + set + ISSCRAP = '1' + where + FREIGHTTRAILER_ID = #{FREIGHTTRAILER_ID} + and + CORPINFO_ID = #{CORPINFO_ID} + + + + diff --git a/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml b/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml index a17f555..77e1682 100644 --- a/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml +++ b/src/main/resources/mybatis/datasource/maintenance/MaintenanceMapper.xml @@ -221,20 +221,14 @@ select f.*, case when f.DUE_DATE < NOW() then 0 else 1 end as DUE_DATE_TYPE, - v1.PLATE_NUMBER, - case - when btsm.PLATE_NUMBER is not null then '1' - when bta.RAW_PLATE_NUMBER is not null then '2' - else f.ARCHIVES_TYPE - end as NEW_ARCHIVES_TYPE, - COALESCE(bta.RAW_PLATE_NUMBER, '0') as RAW_PLATE_NUMBER + v1.PLATE_NUMBER from f - INNER JOIN v_traffic v1 on f.VEHICLE=v1.ID - LEFT JOIN BUS_TRAFFIC_SCRAP_MANAGEMENT btsm on v1.PLATE_NUMBER = btsm.PLATE_NUMBER - LEFT JOIN BUS_TRAFFIC_ASSIGNED bta on v1.PLATE_NUMBER = bta.RAW_PLATE_NUMBER - where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} + INNER JOIN v_traffic v1 on f.VEHICLE = v1.ID + LEFT JOIN BUS_TRAFFIC_OPERATINGVEHICLE o on o.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 (o.ISSCRAP = '0' OR btmf.ISSCRAP = '0') and f.BASICINFO_LICENSE_PLATE LIKE CONCAT(CONCAT('%', #{pd.BASICINFO_LICENSE_PLATE}),'%') diff --git a/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml b/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml index f9a1029..b903cd8 100644 --- a/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml +++ b/src/main/resources/mybatis/datasource/operations/OperationsMapper.xml @@ -257,4 +257,52 @@ ORDER BY f.CREATTIME DESC + + diff --git a/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml b/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml index 1fcf4ff..1751ff2 100644 --- a/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml +++ b/src/main/resources/mybatis/datasource/scrapManage/ScrapManage.xml @@ -184,7 +184,8 @@ OPERATTIME = #{OPERATTIME}, DELETOR = #{DELETOR}, DELETORNAME = #{DELETORNAME}, - DELETTIME =#{DELETTIME}, + DELETTIME =#{DELETTIME} + SCRAPFLAG =#{SCRAPFLAG} where SCRAP_ID = #{SCRAP_ID} diff --git a/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml b/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml index e72a45b..ccb6d1b 100644 --- a/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml +++ b/src/main/resources/mybatis/datasource/taxationManage/TaxationManageMapper.xml @@ -403,17 +403,11 @@