From 22fe44f96babb4b3d9013fe6d4c5b624c40a2fad Mon Sep 17 00:00:00 2001 From: wangxy <1356089412@qq.com> Date: Tue, 20 Aug 2024 11:14:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=AF=86=E5=93=81=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/TdPropertyEmentManager.java | 3 - .../TdPropertyEmentChangeController.java | 108 ++++++++++++++++++ 2 files changed, 108 insertions(+), 3 deletions(-) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentChangeController.java diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java index 892fd86..6a92803 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/manager/TdPropertyEmentManager.java @@ -2,11 +2,8 @@ package com.ruoyi.web.controller.manager; import cn.hutool.core.convert.Convert; import cn.hutool.core.text.CharSequenceUtil; -import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.system.domain.TdPropertyEment; -import com.ruoyi.system.domain.tdcase.TdCase; import com.ruoyi.system.service.TdPropertyEmentService; -import com.ruoyi.system.service.tdcase.TdCaseService; import org.springframework.stereotype.Component; import javax.annotation.Resource; diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentChangeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentChangeController.java new file mode 100644 index 0000000..12f8883 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/property/TdPropertyEmentChangeController.java @@ -0,0 +1,108 @@ +package com.ruoyi.web.controller.system.property; + +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.TdPropertyEment; +import com.ruoyi.web.controller.manager.TdPropertyEmentManager; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * packageName com.ruoyi.web.controller.system.property + * + * @author wangxy + * @version JDK 8 + * @className TdPropertyEmentChangeController + * @date 2024/8/20 + * @description 涉密设备维修 + */ +@Controller +@RequestMapping("/system/ementChange") +public class TdPropertyEmentChangeController extends BaseController { + + + private String prefix = "system/property/ementChange"; + + @Autowired + private TdPropertyEmentManager tdPropertyEmentManager; + + @RequiresPermissions("system:ementChange:view") + @GetMapping() + public String ementChange() { + return prefix + "/ementChange"; + } + + + /** + * 涉密设备维修列表 + */ + @RequiresPermissions("system:ementChange:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(TdPropertyEment tdPropertyEment) { + startPage(); + List tdPropertyEments = tdPropertyEmentManager.selectEmentList(tdPropertyEment); + return getDataTable(tdPropertyEments); + } + + + /** + * 涉密设备维修列变更 + */ + @RequiresPermissions("system:ementChange:change") + @GetMapping("/edit/{id}") + public String ementEdit(@PathVariable("id") String id, ModelMap mmap) { + TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id); + mmap.put("tdPropertyEment", tdPropertyEment); + return prefix + "/ementEdit"; + } + + + + /** + * 保存维修修改 + */ + @RequiresPermissions("system:ementChange:change") + @Log(title = "涉密设备维修", businessType = BusinessType.UPDATE) + @PostMapping("/update") + @ResponseBody + public AjaxResult update(TdPropertyEment tdPropertyEment) { + tdPropertyEment.setMaintainState("2"); + return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment)); + } + + + /** + * 涉密设备报废 + */ + @RequiresPermissions("system:ementChange:destory") + @GetMapping("/destory/{id}") + public String destory(@PathVariable("id") String id, ModelMap mmap) { + TdPropertyEment tdPropertyEment = tdPropertyEmentManager.selecttdEment(id); + mmap.put("tdPropertyEment", tdPropertyEment); + return prefix + "/destory"; + } + + /** + * 报废保存修改 + */ + @RequiresPermissions("system:ementChange:destory") + @Log(title = "涉密设备报废", businessType = BusinessType.UPDATE) + @PostMapping("/destorySave") + @ResponseBody + public AjaxResult destorySave(TdPropertyEment tdPropertyEment) { + return toAjax(tdPropertyEmentManager.saveOrUpdate(tdPropertyEment)); + } + + + + +}