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());