From cb0952eae5e96dd7f82cb50b94fc9f0d1d2057bf Mon Sep 17 00:00:00 2001 From: "277151821@qq.com" <277151821@qq.com> Date: Thu, 7 Mar 2024 11:06:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FreighttTrailerController.java | 12 +- .../InspectAnnuallyController.java | 185 +++++++++++++++ .../freighttrailer/FreightTrailerMapper.java | 2 +- .../InspectAnnuallyMapper.java | 64 ++++++ .../freighttrailer/FreightTrailerService.java | 2 +- .../impl/FreightTrailerServiceImpl.java | 4 +- .../InspectAnnuallyService.java | 64 ++++++ .../impl/InspectAnnuallyServiceImpl.java | 88 +++++++ .../freighttrailer/FreightTrailerMapper.xml | 5 +- .../inspectAnnually/InspectAnnuallyMapper.xml | 215 ++++++++++++++++++ 10 files changed, 634 insertions(+), 7 deletions(-) create mode 100644 src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java create mode 100644 src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java create mode 100644 src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java create mode 100644 src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java create mode 100644 src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml diff --git a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java index 07c3060..57dc26f 100644 --- a/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java +++ b/src/main/java/com/zcloud/controller/freighttrailer/FreighttTrailerController.java @@ -215,8 +215,16 @@ public class FreighttTrailerController extends BaseController { public Object vehicleList() throws Exception { Map map = new HashMap(); String errInfo = "success"; - String corpId = Jurisdiction.getCORPINFO_ID(); - List list = freightTrailerService.trailerList(corpId); //列出Question列表 + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); + List list = freightTrailerService.vehicleList(pd); //列出Question列表 + if(pd.containsKey("ID")){ + pd.put("FOREIGN_KEY", pd.getString("ID")); + pd.put("TYPE",121); + List drivingLicenseImgs = imgfilesService.listAll(pd);//行驶证照片 + map.put("drivingLicenseImgs", drivingLicenseImgs); + } map.put("list", list); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java new file mode 100644 index 0000000..6f0c0cf --- /dev/null +++ b/src/main/java/com/zcloud/controller/inspectAnnually/InspectAnnuallyController.java @@ -0,0 +1,185 @@ +package com.zcloud.controller.inspectAnnually; + +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.logs.LogAnno; +import com.zcloud.service.inspectAnnually.InspectAnnuallyService; +import com.zcloud.service.system.ImgFilesService; +import com.zcloud.util.DateUtil; +import com.zcloud.util.Jurisdiction; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 年检管理 + */ +@Controller +@RequestMapping("/inspectAnnually") +public class InspectAnnuallyController extends BaseController { + + @Autowired + private InspectAnnuallyService inspectAnnuallyService; + @Autowired + private ImgFilesService imgfilesService; + + /** + * 新增 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/add") + // @RequiresPermissions( value = {"question:add" , "courseware:add"}, logical = Logical.OR) + @ResponseBody + @LogAnno(menuType = "机务档案", menuServer = "年检管理", instructionsOperate = "年检管理", instructionsType = "新增") + public Object add() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("INSPECTANNUALLY_ID", this.get32UUID()); //主键 + pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id + pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID + pd.put("ARCHIVES_TYPE", "正常"); //档案状态 + + inspectAnnuallyService.save(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /** + * 删除 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/delete") + // @RequiresPermissions( value = {"question:del" , "courseware:del"}, logical = Logical.OR) + @ResponseBody + @LogAnno(menuType = "机务档案", menuServer = "年检管理", instructionsOperate = "年检管理", instructionsType = "删除") + public Object delete() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("DELETEOR", Jurisdiction.getUSER_ID()); //删除人id + pd.put("DELETEORNAME", Jurisdiction.getUsername()); //删除人 + pd.put("DELETTIME", DateUtil.date2Str(new Date())); //删除时间 + inspectAnnuallyService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } + + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/edit") + // @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR) + @ResponseBody + @LogAnno(menuType = "机务档案", menuServer = "年检管理", instructionsOperate = "年检管理", instructionsType = "修改") + public Object edit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id + pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + inspectAnnuallyService.edit(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /** + * 修改 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/edit2") + // @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR) + @ResponseBody + @LogAnno(menuType = "机务档案", menuServer = "年检管理", instructionsOperate = "年检管理", instructionsType = "修改") + public Object edit2() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id + pd.put("OPERATORNAME", Jurisdiction.getUsername()); //修改人 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 + inspectAnnuallyService.edit2(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /** + * 列表 + * + * @param page + * @throws Exception + */ + @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"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID + page.setPd(pd); + List varList = inspectAnnuallyService.list(page); //列出Question列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + /** + * 去修改页面获取数据 + * + * @param + * @throws Exception + */ + @RequestMapping(value = "/goEdit") + // @RequiresPermissions( value = {"question:edit" , "courseware:edit"}, logical = Logical.OR) + @ResponseBody + @LogAnno(menuType = "机务档案", menuServer = "年检管理", instructionsOperate = "年检管理", instructionsType = "去修改页面获取数据") + public Object goEdit() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = inspectAnnuallyService.findById(pd); //根据ID读取 + + pd.put("FOREIGN_KEY", pd.getString("INSPECTANNUALLY_ID")); + pd.put("TYPE",124); + List inspectinfoImgs = imgfilesService.listAll(pd);//年检资料图片 + + map.put("pd", pd); + map.put("inspectinfoImgs", inspectinfoImgs); + map.put("result", errInfo); + return map; + } + + +} 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 d42d03a..c467cb5 100644 --- a/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/freighttrailer/FreightTrailerMapper.java @@ -73,6 +73,6 @@ public interface FreightTrailerMapper { * @param * @throws Exception */ - List vehicleList(String corpId); + List vehicleList(PageData pd); } diff --git a/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java b/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java new file mode 100644 index 0000000..b6a690b --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/inspectAnnually/InspectAnnuallyMapper.java @@ -0,0 +1,64 @@ +package com.zcloud.mapper.datasource.inspectAnnually; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 企业信息管理-货运挂车 + */ +public interface InspectAnnuallyMapper { + + /** + * 新增 + * + * @param pd + * @throws Exception + */ + void save(PageData pd); + + /** + * 删除 + * + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /** + * 修改 + * + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /** + * 修改 + * + * @param pd + * @throws Exception + */ + void edit2(PageData pd); + + /** + * 列表 + * + * @param page + * @throws Exception + */ + List datalistPage(Page page); + + + /** + * 通过id获取数据 + * + * @param pd + * @throws Exception + */ + PageData findById(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 ec0e977..be1428d 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java +++ b/src/main/java/com/zcloud/service/freighttrailer/FreightTrailerService.java @@ -73,7 +73,7 @@ public interface FreightTrailerService { * @param * @throws Exception */ - public List vehicleList(String corpId) throws Exception; + public List vehicleList(PageData pd) throws Exception; } 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 b938895..3d0d7bb 100644 --- a/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java +++ b/src/main/java/com/zcloud/service/freighttrailer/impl/FreightTrailerServiceImpl.java @@ -99,8 +99,8 @@ public class FreightTrailerServiceImpl implements FreightTrailerService { * @param * @throws Exception */ - public List vehicleList(String corpId) throws Exception { - return freightTrailerMapper.vehicleList(corpId); + public List vehicleList(PageData pd) throws Exception { + return freightTrailerMapper.vehicleList(pd); } } diff --git a/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java b/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java new file mode 100644 index 0000000..fdce75b --- /dev/null +++ b/src/main/java/com/zcloud/service/inspectAnnually/InspectAnnuallyService.java @@ -0,0 +1,64 @@ +package com.zcloud.service.inspectAnnually; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +/** + * 企业信息管理-货运挂车 + */ +public interface InspectAnnuallyService { + + /** + * 新增 + * + * @param pd + * @throws Exception + */ + public void save(PageData pd) throws Exception; + + /** + * 删除 + * + * @param pd + * @throws Exception + */ + public void delete(PageData pd) throws Exception; + + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void edit(PageData pd) throws Exception; + + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void edit2(PageData pd) throws Exception; + + /** + * 列表 + * + * @param page + * @throws Exception + */ + public List list(Page page) throws Exception; + + + /** + * 通过id获取数据 + * + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd) throws Exception; + + +} + diff --git a/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java b/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java new file mode 100644 index 0000000..3ef2669 --- /dev/null +++ b/src/main/java/com/zcloud/service/inspectAnnually/impl/InspectAnnuallyServiceImpl.java @@ -0,0 +1,88 @@ +package com.zcloud.service.inspectAnnually.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.inspectAnnually.InspectAnnuallyMapper; +import com.zcloud.service.inspectAnnually.InspectAnnuallyService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * 企业信息管理-货运挂车 + */ +@Service +@Transactional +public class InspectAnnuallyServiceImpl implements InspectAnnuallyService { + + @Autowired + private InspectAnnuallyMapper inspectAnnuallyMapper; + + /** + * 新增 + * + * @param pd + * @throws Exception + */ + public void save(PageData pd) throws Exception { + inspectAnnuallyMapper.save(pd); + } + + /** + * 删除 + * + * @param pd + * @throws Exception + */ + public void delete(PageData pd) throws Exception { + inspectAnnuallyMapper.delete(pd); + } + + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void edit(PageData pd) throws Exception { + inspectAnnuallyMapper.edit(pd); + } + + /** + * 修改 + * + * @param pd + * @throws Exception + */ + public void edit2(PageData pd) throws Exception { + inspectAnnuallyMapper.edit2(pd); + } + + /** + * 列表 + * + * @param page + * @throws Exception + */ + public List list(Page page) throws Exception { + return inspectAnnuallyMapper.datalistPage(page); + } + + + + /** + * 通过id获取数据 + * + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd) throws Exception { + return inspectAnnuallyMapper.findById(pd); + } + + + +} + diff --git a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml index d2c95ed..700f454 100644 --- a/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml +++ b/src/main/resources/mybatis/datasource/freighttrailer/FreightTrailerMapper.xml @@ -231,10 +231,13 @@ * from v_traffic f - where f.CORPINFO_ID = #{corpId} + where f.CORPINFO_ID = #{CORPINFO_ID} and f.TRAFFIC_TYPE = #{TRAFFIC_TYPE} + + and f.ID = #{ID} + diff --git a/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml b/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml new file mode 100644 index 0000000..485f51a --- /dev/null +++ b/src/main/resources/mybatis/datasource/inspectAnnually/InspectAnnuallyMapper.xml @@ -0,0 +1,215 @@ + + + + + + + bus_traffic_mechanical_inspect_annually + + + + + +INSPECTANNUALLY_ID, +CORPINFO_ID, +NUM, +VEHICLE_MODEL, +VEHICLE, +CAR_OWNERS, +TELEPHONE, +REGISTRANT, +PROCESSING_DATE, +ANNUAL_INSPECTION_CYCLE, +DUE_DATE, +INSPECTFEES, +ACTUAL_COLLECTION, +ADDRESS, +REMINDER_DAYS, +REMINDER_DATE, +REMINDER_STATUS, +INSPECTINFO, +NOTES, +ARCHIVES_TYPE, +ISDELETE, +CREATOR, +CREATORNAME, +CREATTIME + + + + +#{INSPECTANNUALLY_ID}, +#{CORPINFO_ID}, +#{NUM}, +#{VEHICLE_MODEL}, +#{VEHICLE}, +#{CAR_OWNERS}, +#{TELEPHONE}, +#{REGISTRANT}, +#{PROCESSING_DATE}, +#{ANNUAL_INSPECTION_CYCLE}, +#{DUE_DATE}, +#{INSPECTFEES}, +#{ACTUAL_COLLECTION}, +#{ADDRESS}, +#{REMINDER_DAYS}, +#{REMINDER_DATE}, +#{REMINDER_STATUS}, +#{INSPECTINFO}, +#{NOTES}, +#{ARCHIVES_TYPE}, +#{ISDELETE}, +#{CREATOR}, +#{CREATORNAME}, +#{CREATTIME} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1', + DELETEOR = #{DELETEOR}, + DELETEORNAME = #{DELETEORNAME}, + DELETTIME = #{DELETTIME} + where + INSPECTANNUALLY_ID = #{INSPECTANNUALLY_ID} + + + + + update + + set + NUM = #{NUM}, + VEHICLE_MODEL = #{VEHICLE_MODEL}, + VEHICLE = #{VEHICLE}, + CAR_OWNERS = #{CAR_OWNERS}, + TELEPHONE = #{TELEPHONE}, + REGISTRANT = #{REGISTRANT}, + PROCESSING_DATE = #{PROCESSING_DATE}, + ANNUAL_INSPECTION_CYCLE = #{ANNUAL_INSPECTION_CYCLE}, + DUE_DATE = #{DUE_DATE}, + INSPECTFEES = #{INSPECTFEES}, + ACTUAL_COLLECTION = #{ACTUAL_COLLECTION}, + ADDRESS = #{ADDRESS}, + REMINDER_DAYS = #{REMINDER_DAYS}, + REMINDER_DATE = #{REMINDER_DATE}, + REMINDER_STATUS = #{REMINDER_STATUS}, + INSPECTINFO = #{INSPECTINFO}, + NOTES = #{NOTES}, + ARCHIVES_TYPE = #{ARCHIVES_TYPE}, + OPERATOR = #{OPERATOR}, + OPERATORNAME = #{OPERATORNAME}, + OPERATTIME = #{OPERATTIME} + where + INSPECTANNUALLY_ID = #{INSPECTANNUALLY_ID} + + + + + update + + set + + REMINDER_STATUS = #{REMINDER_STATUS}, + + OPERATOR = #{OPERATOR}, + OPERATORNAME = #{OPERATORNAME}, + OPERATTIME = #{OPERATTIME} + where + INSPECTANNUALLY_ID = #{INSPECTANNUALLY_ID} + + + + + + + + + +