@ -1,6 +1,20 @@
package com.ruoyi.web.controller.system.property ;
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.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.common.utils.uuid.Seq ;
import com.ruoyi.system.domain.TdPropertyEment ;
import com.ruoyi.web.controller.manager.TdPropertyEmentManager ;
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 ;
/ * *
/ * *
* packageName com . ruoyi . web . controller . system . property
* packageName com . ruoyi . web . controller . system . property
@ -11,5 +25,84 @@ import com.ruoyi.common.core.controller.BaseController;
* @date 2024 / 8 / 20
* @date 2024 / 8 / 20
* @description
* @description
* /
* /
@Controller
@RequestMapping ( "/system/prementData" )
public class TdPropertyEmentController extends BaseController {
public class TdPropertyEmentController extends BaseController {
private String prefix = "system/property/ementdata" ;
@Resource
private TdPropertyEmentManager tdPropertyEmentManager ;
@RequiresPermissions ( "system:property:view" )
@GetMapping ( )
public String tdEment ( ) {
return prefix + "/propertyEment" ;
}
/ * *
* 设 备 列 表
* /
@RequiresPermissions ( "system:property:list" )
@PostMapping ( "/list" )
@ResponseBody
public TableDataInfo list ( TdPropertyEment tdPropertyEment ) {
startPage ( ) ;
List < TdPropertyEment > tdPropertyEments = tdPropertyEmentManager . selectEmentList ( tdPropertyEment ) ;
return getDataTable ( tdPropertyEments ) ;
}
/ * *
* 新 增 设 备
* /
@GetMapping ( "/add/{useId}" )
public String add ( @PathVariable ( "useId" ) String useId , ModelMap mmap ) {
mmap . put ( "useId" , useId ) ;
return prefix + "/add" ;
}
/ * *
* 新 增 设 备
* /
@RequiresPermissions ( "system:property:add" )
@Log ( title = "涉密设备" , businessType = BusinessType . INSERT )
@PostMapping ( "/add" )
@ResponseBody
public AjaxResult addSave ( TdPropertyEment tdPropertyEment ) {
tdPropertyEment . setId ( "Ement_" + Seq . getId ( Seq . commSeqType ) ) ;
tdPropertyEment . setMaintainState ( "1" ) ;
return toAjax ( tdPropertyEmentManager . saveOrUpdate ( tdPropertyEment ) ) ;
}
/ * *
* 设 备 详 情
* /
@RequiresPermissions ( "system:property:detail" )
@GetMapping ( "/detail/{id}" )
public String detail ( @PathVariable ( "id" ) String id , ModelMap mmap ) {
TdPropertyEment tdPropertyEment = tdPropertyEmentManager . selecttdEment ( id ) ;
mmap . put ( "tdPropertyEment" , tdPropertyEment ) ;
return prefix + "/detail" ;
}
/ * *
* 删 除 设 备
* /
@RequiresPermissions ( "system:property:remove" )
@Log ( title = "涉密设备" , businessType = BusinessType . DELETE )
@PostMapping ( "/remove" )
@ResponseBody
public AjaxResult remove ( String ids ) {
return toAjax ( tdPropertyEmentManager . deletedEmentByids ( ids ) ) ;
}
/ * *
*
* 查 询 所 有 设 备
* @return com . ruoyi . common . core . domain . AjaxResult
* /
@PostMapping ( "/getList" )
@ResponseBody
public AjaxResult getList ( ) {
return AjaxResult . success ( tdPropertyEmentManager . selectList ( ) ) ;
}
}
}