diff --git a/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java new file mode 100644 index 0000000..1c1b171 --- /dev/null +++ b/src/main/java/com/zcloud/controller/assignedManage/AssignedManageController.java @@ -0,0 +1,155 @@ +package com.zcloud.controller.assignedManage; + +import com.zcloud.controller.base.BaseController; +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.service.assignedManage.AssignedManageService; +import com.zcloud.service.taxationManage.TaxationManageService; +import com.zcloud.util.*; +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.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; + +@Controller +@RequestMapping("/assignedmanage") +public class AssignedManageController extends BaseController { + + @Autowired + private AssignedManageService assignedManageService; + + @Autowired + private Smb smb; + + /**新增 + * @param + * @throws Exception + */ + @RequestMapping(value="/add") + @ResponseBody + public Object add() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("ASSIGNED_ID", this.get32UUID()); //车船税主键 + pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) + pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id + pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id + pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 + pd.put("ASSIGNED_DATE", pd.get("TRANSACTION_DATE")); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("VEHICLE_TYPE",pd.get("ASSIGNED_VEHICLE_MODEL")); + pd.put("NOW_CONTACT_NUMBER",pd.get("NOW_OWNERS_NUMBER")); + assignedManageService.save(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + /**删除 + * @param + * @throws Exception + */ + @RequestMapping(value="/delete") + @ResponseBody + public Object delete() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("DELETOR", Jurisdiction.getUSER_ID()); + pd.put("DELETORNAME", Jurisdiction.getUsername()); + pd.put("DELETTIME", DateUtil.date2Str(new Date())); + assignedManageService.delete(pd); + map.put("result", errInfo); //返回结果 + return map; + } + + /**修改 + * @param + * @throws Exception + */ + @RequestMapping(value="/edit") + @ResponseBody + public Object edit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) + pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人id + pd.put("CREATORNAME", Jurisdiction.getUsername()); //添加人名字 + pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 + pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人id + pd.put("OPERATORNAME", Jurisdiction.getUsername()); // 修改人名字 + pd.put("OPERATTIME", DateUtil.date2Str(new Date())); // 修改时间 + String expireDate = pd.getString("EXPIRE_DATE"); + String day = DateUtil.getDay(); + boolean flag = DateUtil.compareDate(expireDate, day); + if(flag) { + pd.put("EXPIRE_STATUS","expirestatus_01"); + }else{ + pd.put("EXPIRE_STATUS","expirestatus_02"); + } + assignedManageService.edit(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + /**去修改页面获取数据 + * @param + * @throws Exception + */ + @RequestMapping(value="/goEdit") + @ResponseBody + public Object goEdit() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd = assignedManageService.findById(pd); + map.put("pd", pd); + map.put("result", errInfo); + return map; + } + + @RequestMapping(value="/list") + @ResponseBody + public Object list(Page page) throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 + if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + page.setPd(pd); + List varList = assignedManageService.list(page); //列出MajorDangerSource列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + } + + @RequestMapping(value = "/operationvehicleList") + @ResponseBody + public Object operationVehicleList() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + String corpId = Jurisdiction.getCORPINFO_ID(); + List list = assignedManageService.operationVehicleList(corpId); //列出Question列表 + map.put("list", list); + map.put("result", errInfo); + return map; + } +} diff --git a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java index ae9ca83..7f4c4d1 100644 --- a/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java +++ b/src/main/java/com/zcloud/controller/operatingvehicles/OperatingVehiclesController.java @@ -177,21 +177,49 @@ public class OperatingVehiclesController extends BaseController { return map; } - @RequestMapping(value="/list") + @RequestMapping(value = "/list") + // @RequiresPermissions( value = {"question:list" , "courseware:list"}, logical = Logical.OR) @ResponseBody - public Object list(Page page) throws Exception{ - Map map = new HashMap(); + @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(); - String KEYWORDS = pd.getString("KEYWORDS"); //关键词检索条件 - if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); + pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); //企业ID page.setPd(pd); - List varList = operatingVehiclesService.list(page); //列出MajorDangerSource列表 + List varList = operatingVehiclesService.list(page); //列出Question列表 map.put("varList", varList); map.put("page", page); map.put("result", errInfo); - System.out.println(); return map; } + + @RequestMapping(value = "/operationvehicleList") + @ResponseBody + public Object operationVehicleList() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + String corpId = Jurisdiction.getCORPINFO_ID(); + List list = operatingVehiclesService.operationVehicleList(corpId); //列出Question列表 + map.put("list", list); + map.put("result", errInfo); + return map; + } + + /*@RequestMapping(value = "/list") + @ResponseBody + 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 = operatingVehiclesService.list(page); //列出Question列表 + map.put("varList", varList); + map.put("page", page); + map.put("result", errInfo); + return map; + }*/ } diff --git a/src/main/java/com/zcloud/mapper/datasource/assignedManage/AssignedManageMapper.java b/src/main/java/com/zcloud/mapper/datasource/assignedManage/AssignedManageMapper.java new file mode 100644 index 0000000..96b619e --- /dev/null +++ b/src/main/java/com/zcloud/mapper/datasource/assignedManage/AssignedManageMapper.java @@ -0,0 +1,38 @@ +package com.zcloud.mapper.datasource.assignedManage; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +public interface AssignedManageMapper { + + /**新增 + * @param pd + * @throws Exception + */ + void save(PageData pd); + + /**删除 + * @param pd + * @throws Exception + */ + void delete(PageData pd); + + /**修改 + * @param pd + * @throws Exception + */ + void edit(PageData pd); + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + PageData findById(PageData pd); + + + List datalistPage(Page page); + + List operationvehicleList(String corpId); +} diff --git a/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java b/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java index 0ec903b..72013e2 100644 --- a/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/operatingvehicles/OperatingVehiclesMapper.java @@ -33,4 +33,6 @@ public interface OperatingVehiclesMapper { List datalistPage(Page page); + + List operationVehicleList(String corpId); } diff --git a/src/main/java/com/zcloud/service/assignedManage/AssignedManageService.java b/src/main/java/com/zcloud/service/assignedManage/AssignedManageService.java new file mode 100644 index 0000000..00ed344 --- /dev/null +++ b/src/main/java/com/zcloud/service/assignedManage/AssignedManageService.java @@ -0,0 +1,38 @@ +package com.zcloud.service.assignedManage; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; + +import java.util.List; + +public interface AssignedManageService { + + /**新增 + * @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; + + /**通过id获取数据 + * @param pd + * @throws Exception + */ + public PageData findById(PageData pd)throws Exception; + + public List list(Page page); + + List operationVehicleList(String corpId); +} diff --git a/src/main/java/com/zcloud/service/assignedManage/impl/AssignedManageServiceImpl.java b/src/main/java/com/zcloud/service/assignedManage/impl/AssignedManageServiceImpl.java new file mode 100644 index 0000000..bd9d779 --- /dev/null +++ b/src/main/java/com/zcloud/service/assignedManage/impl/AssignedManageServiceImpl.java @@ -0,0 +1,51 @@ +package com.zcloud.service.assignedManage.impl; + +import com.zcloud.entity.Page; +import com.zcloud.entity.PageData; +import com.zcloud.mapper.datasource.assignedManage.AssignedManageMapper; +import com.zcloud.mapper.datasource.taxationManage.TaxationManageMapper; +import com.zcloud.service.assignedManage.AssignedManageService; +import com.zcloud.service.taxationManage.TaxationManageService; +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 AssignedManageServiceImpl implements AssignedManageService { + + @Autowired + private AssignedManageMapper assignedManageMapper; + + @Override + public void save(PageData pd) throws Exception { + assignedManageMapper.save(pd); + } + + @Override + public void delete(PageData pd) throws Exception { + assignedManageMapper.delete(pd); + } + + @Override + public void edit(PageData pd) throws Exception { + assignedManageMapper.edit(pd); + } + + @Override + public PageData findById(PageData pd) throws Exception { + return assignedManageMapper.findById(pd); + } + + @Override + public List list(Page page) { + return assignedManageMapper.datalistPage(page); + } + + @Override + public List operationVehicleList(String corpId) { + return assignedManageMapper.operationvehicleList(corpId); + } +} diff --git a/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java b/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java index a17e9ce..e6dfd33 100644 --- a/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java +++ b/src/main/java/com/zcloud/service/operatingvehicles/OperatingVehiclesService.java @@ -32,4 +32,8 @@ public interface OperatingVehiclesService { public PageData findById(PageData pd)throws Exception; public List list(Page page); + + List operationVehicleList(String corpId); + + } diff --git a/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java b/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java index 5cdcbd9..7c23ac8 100644 --- a/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java +++ b/src/main/java/com/zcloud/service/operatingvehicles/impl/OperatingVehiclesServiceImpl.java @@ -41,4 +41,9 @@ public class OperatingVehiclesServiceImpl implements OperatingVehiclesService { public List list(Page page) { return operatingVehiclesMapper.datalistPage(page); } + + @Override + public List operationVehicleList(String corpId) { + return operatingVehiclesMapper.operationVehicleList(corpId); + } } diff --git a/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml b/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml new file mode 100644 index 0000000..bfab614 --- /dev/null +++ b/src/main/resources/mybatis/datasource/assignedManage/AssignedManageMapper.xml @@ -0,0 +1,472 @@ + + + + + + + BUS_TRAFFIC_ASSIGNED + + + + + SYS_DICTIONARIES + + + + + f.ASSIGNED_ID, + f.RECORD_NUMBER, + f.CORPINFO_ID, + f.ASSIGNED_TYPE, + f.RAW_PLATE_NUMBER, + f.NOW_PLATE_NUMBER, + f.RAW_OWNERS, + f.NOW_OWNERS, + f.ASSIGNED_DATE, + f.REGISTRANT, + f.RAW_TRANSPORT_ENTERPRISES, + f.ASSIGNED_VEHICLE_MODEL, + f.ASSIGNED_VEHICLE, + f.RAW_OWNERS_NUMBER, + f.RAW_VEHICLE_OPERATION_CERTIFICATE, + f.FRAMES_NUMBER, + f.RAW_DRIVINGLICENSE_IMG, + f.ASSIGNED_WAY, + f.TRANSACTION_DATE, + f.NOW_OWNERS_NUMBER, + f.NOW_DRIVINGLICENSE_IMG, + f.NOW_VEHICLE_OPERATION_CERTIFICATE, + f.ASSIGNED_MATERIAL, + f.REMARK, + f.VEHICLE_TYPE, + f.VEHICLE_BRAND, + f.VEHICLE_MODEL, + f.ENGINE_NUMBER, + f.POWER_TYPE, + f.EMISSION_STANDARD, + f.RAW_CONTACT_NUMBER, + f.NOW_CONTACT_NUMBER, + f.RAW_OPERATION_CERTIFICATE, + f.NOW_OPERATION_CERTIFICATE, + f.TRANSPORT_ENTERPRISES, + f.ISDELETE, + f.CREATOR, + f.CREATORNAME, + f.CREATTIME, + f.OPERATOR, + f.OPERATORNAME, + f.OPERATTIME, + f.DELETOR, + f.DELETORNAME, + f.DELETTIME + + + + + ASSIGNED_ID, + RECORD_NUMBER, + CORPINFO_ID, + ASSIGNED_TYPE, + RAW_PLATE_NUMBER, + NOW_PLATE_NUMBER, + RAW_OWNERS, + NOW_OWNERS, + ASSIGNED_DATE, + REGISTRANT, + RAW_TRANSPORT_ENTERPRISES, + ASSIGNED_VEHICLE_MODEL, + ASSIGNED_VEHICLE, + RAW_OWNERS_NUMBER, + RAW_VEHICLE_OPERATION_CERTIFICATE, + FRAMES_NUMBER, + RAW_DRIVINGLICENSE_IMG, + ASSIGNED_WAY, + TRANSACTION_DATE, + NOW_OWNERS_NUMBER, + NOW_DRIVINGLICENSE_IMG, + NOW_VEHICLE_OPERATION_CERTIFICATE, + ASSIGNED_MATERIAL, + REMARK, + VEHICLE_TYPE, + VEHICLE_BRAND, + VEHICLE_MODEL, + ENGINE_NUMBER, + POWER_TYPE, + EMISSION_STANDARD, + RAW_CONTACT_NUMBER, + NOW_CONTACT_NUMBER, + RAW_OPERATION_CERTIFICATE, + NOW_OPERATION_CERTIFICATE, + TRANSPORT_ENTERPRISES, + ISDELETE, + CREATOR, + CREATORNAME, + CREATTIME, + OPERATOR, + OPERATORNAME, + OPERATTIME, + DELETOR, + DELETORNAME, + DELETTIME + + + + + #{ASSIGNED_ID}, + #{RECORD_NUMBER}, + #{CORPINFO_ID}, + #{ASSIGNED_TYPE}, + #{RAW_PLATE_NUMBER}, + #{NOW_PLATE_NUMBER}, + #{RAW_OWNERS}, + #{NOW_OWNERS}, + #{ASSIGNED_DATE}, + #{REGISTRANT}, + #{RAW_TRANSPORT_ENTERPRISES}, + #{ASSIGNED_VEHICLE_MODEL}, + #{ASSIGNED_VEHICLE}, + #{RAW_OWNERS_NUMBER}, + #{RAW_VEHICLE_OPERATION_CERTIFICATE}, + #{FRAMES_NUMBER}, + #{RAW_DRIVINGLICENSE_IMG}, + #{ASSIGNED_WAY}, + #{TRANSACTION_DATE}, + #{NOW_OWNERS_NUMBER}, + #{NOW_DRIVINGLICENSE_IMG}, + #{NOW_VEHICLE_OPERATION_CERTIFICATE}, + #{ASSIGNED_MATERIAL}, + #{REMARK}, + #{VEHICLE_TYPE}, + #{VEHICLE_BRAND}, + #{VEHICLE_MODEL}, + #{ENGINE_NUMBER}, + #{POWER_TYPE}, + #{EMISSION_STANDARD}, + #{RAW_CONTACT_NUMBER}, + #{NOW_CONTACT_NUMBER}, + #{RAW_OPERATION_CERTIFICATE}, + #{NOW_OPERATION_CERTIFICATE}, + #{TRANSPORT_ENTERPRISES}, + #{ISDELETE}, + #{CREATOR}, + #{CREATORNAME}, + #{CREATTIME}, + #{OPERATOR}, + #{OPERATORNAME}, + #{OPERATTIME}, + #{DELETOR}, + #{DELETORNAME}, + #{DELETTIME} + + + + + insert into + + ( + + ) values ( + + ) + + + + + update + + set + ISDELETE = '1' + where + ASSIGNED_ID = #{ASSIGNED_ID} + + + + + update + + set + ASSIGNED_ID = #{ASSIGNED_ID}, + RECORD_NUMBER = #{RECORD_NUMBER}, + CORPINFO_ID = #{CORPINFO_ID}, + ASSIGNED_TYPE = #{ASSIGNED_TYPE}, + RAW_PLATE_NUMBER = #{RAW_PLATE_NUMBER}, + NOW_PLATE_NUMBER = #{NOW_PLATE_NUMBER}, + RAW_OWNERS = #{RAW_OWNERS}, + NOW_OWNERS = #{NOW_OWNERS}, + ASSIGNED_DATE = #{ASSIGNED_DATE}, + REGISTRANT = #{REGISTRANT}, + REGISTRANT = #{REGISTRANT}, + ASSIGNED_VEHICLE_MODEL = #{ASSIGNED_VEHICLE_MODEL}, + ASSIGNED_VEHICLE = #{ASSIGNED_VEHICLE}, + RAW_OWNERS_NUMBER = #{RAW_OWNERS_NUMBER}, + RAW_VEHICLE_OPERATION_CERTIFICATE = #{RAW_VEHICLE_OPERATION_CERTIFICATE}, + FRAMES_NUMBER = #{FRAMES_NUMBER}, + RAW_DRIVINGLICENSE_IMG = #{RAW_DRIVINGLICENSE_IMG}, + ASSIGNED_WAY = #{ASSIGNED_WAY}, + TRANSACTION_DATE = #{TRANSACTION_DATE}, + NOW_OWNERS_NUMBER = #{NOW_OWNERS_NUMBER}, + NOW_DRIVINGLICENSE_IMG = #{NOW_DRIVINGLICENSE_IMG}, + NOW_VEHICLE_OPERATION_CERTIFICATE = #{NOW_VEHICLE_OPERATION_CERTIFICATE}, + ASSIGNED_MATERIAL = #{ASSIGNED_MATERIAL}, + REMARK = #{REMARK}, + VEHICLE_TYPE = #{VEHICLE_TYPE}, + VEHICLE_BRAND = #{VEHICLE_BRAND}, + VEHICLE_MODEL = #{VEHICLE_MODEL}, + ENGINE_NUMBER = #{ENGINE_NUMBER}, + POWER_TYPE = #{POWER_TYPE}, + EMISSION_STANDARD = #{EMISSION_STANDARD}, + RAW_CONTACT_NUMBER = #{RAW_CONTACT_NUMBER}, + NOW_CONTACT_NUMBER = #{NOW_CONTACT_NUMBER}, + RAW_OPERATION_CERTIFICATE = #{RAW_OPERATION_CERTIFICATE}, + NOW_OPERATION_CERTIFICATE = #{NOW_OPERATION_CERTIFICATE}, + TRANSPORT_ENTERPRISES = #{TRANSPORT_ENTERPRISES}, + ISDELETE = #{ISDELETE}, + CREATOR = #{CREATOR}, + CREATORNAME = #{CREATORNAME}, + CREATTIME = #{CREATTIME}, + OPERATOR = #{OPERATOR}, + OPERATORNAME = #{OPERATORNAME}, + OPERATTIME = #{OPERATTIME}, + DELETOR = #{DELETOR}, + DELETORNAME = #{DELETORNAME}, + DELETTIME = #{DELETTIME} + where + ASSIGNED_ID = #{ASSIGNED_ID} + + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml index 7a2d269..6753c3f 100644 --- a/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml +++ b/src/main/resources/mybatis/datasource/operatingvehicles/OperatingVehiclesMapper.xml @@ -458,7 +458,7 @@ from f - where f.ISDELETE = '0' + where f.ISDELETE = '0' and f.CORPINFO_ID = #{pd.CORPINFO_ID} and f.PLATE_NUMBER LIKE CONCAT(CONCAT('%', #{pd.PLATE_NUMBER}),'%') @@ -499,5 +499,15 @@ where f.ISDELETE = '0' + +