From e7b8a9d4c4fe5f2ae81ae53a8a34ab3673ba3090 Mon Sep 17 00:00:00 2001 From: wangxy <1481820854@qq.com> Date: Tue, 24 Sep 2024 11:27:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=BD=BD=E4=BD=93=E4=B8=8B=E5=8F=91?= =?UTF-8?q?=E9=94=80=E6=AF=81=E6=8E=A5=E5=8F=A3=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../issued/DestoryIssuedController.java | 69 +++++++++++++++++++ .../issued/MaintainIssuedController.java | 67 ++++++++++++++++++ .../manager/CarrierIssuedManager.java | 4 ++ 3 files changed, 140 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/DestoryIssuedController.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/MaintainIssuedController.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/DestoryIssuedController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/DestoryIssuedController.java new file mode 100644 index 0000000..57a997e --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/DestoryIssuedController.java @@ -0,0 +1,69 @@ +package com.ruoyi.web.controller.carrier.issued; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.carrier.TdCarrierIssued; +import com.ruoyi.web.controller.manager.CarrierIssuedManager; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 销毁Controller + * @author Administrator + */ +@Controller +@RequestMapping("/system/destoryIssued") +public class DestoryIssuedController extends BaseController { + private String prefix = "system/destoryIssued"; + + @Resource + private CarrierIssuedManager carrierIssuedManager; + + @RequiresPermissions("system:destoryIssued:view") + @GetMapping() + public String destoryIssued() { + return prefix + "/destoryIssued"; + } + + /** + * 载体列表 + */ + @RequiresPermissions("system:destoryIssued:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(TdCarrierIssued tdCarrierIssued) { + startPage(); + List carriers = carrierIssuedManager.selectTdCarrierList(tdCarrierIssued); + return getDataTable(carriers); + } + + /** + * 国家秘密载体销毁 + */ + @RequiresPermissions("system:destoryIssued:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) { + TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id); + mmap.put("tdCarrierIssued", tdCarrierIssued); + return prefix + "/edit"; + } + + /** + * 国家秘密载体销毁 + */ + @RequiresPermissions("system:destoryIssued:edit") + @Log(title = "国家秘密载体销毁", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) { + return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/MaintainIssuedController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/MaintainIssuedController.java new file mode 100644 index 0000000..c6e2ba0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/carrier/issued/MaintainIssuedController.java @@ -0,0 +1,67 @@ +package com.ruoyi.web.controller.carrier.issued; + +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.carrier.TdCarrierIssued; +import com.ruoyi.web.controller.manager.CarrierIssuedManager; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * 维修Controller + */ +@Controller +@RequestMapping("/system/maintainIssued") +public class MaintainIssuedController extends BaseController { + private String prefix = "system/maintainIssued"; + + @Resource + private CarrierIssuedManager carrierIssuedManager; + @RequiresPermissions("system:maintainIssued:view") + @GetMapping() + public String maintainIssued() { + return prefix + "/maintainIssued"; + } + + /** + * 载体列表 + */ + @RequiresPermissions("system:maintainIssued:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(TdCarrierIssued tdCarrierIssued) { + startPage(); + List carriers = carrierIssuedManager.selectTdCarrierUpdateList(tdCarrierIssued); + return getDataTable(carriers); + } + + /** + * 国家秘密载体维修 + */ + @RequiresPermissions("system:maintainIssued:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") String id, ModelMap mmap) { + TdCarrierIssued tdCarrierIssued = carrierIssuedManager.selectTdCarrier(id); + mmap.put("tdCarrierIssued", tdCarrierIssued); + return prefix + "/edit"; + } + + /** + * 国家秘密载体维修 + */ + @RequiresPermissions("system:maintainIssued:edit") + @Log(title = "国家秘密载体维修", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(TdCarrierIssued tdCarrierIssued) { + return toAjax(carrierIssuedManager.saveOrUpdate(tdCarrierIssued)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java index 623d241..e51595c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/CarrierIssuedManager.java @@ -33,6 +33,10 @@ public class CarrierIssuedManager { return carrierIssuedService.selectTdCarrierList(tdCarrierIssued); } + public List selectTdCarrierUpdateList(TdCarrierIssued tdCarrierIssued) { + return carrierIssuedService.selectTdCarrierUpdateList(tdCarrierIssued); + } + public boolean saveOrUpdate(TdCarrierIssued tdCarrierIssued) { if (CharSequenceUtil.isNotBlank(tdCarrierIssued.getId())) { tdCarrierIssued.setUpdateBy(ShiroUtils.getSysUser().getLoginName());