fix:涉密资产统计

pg_adapter
wangxy 8 months ago
parent bc25237365
commit 72dc1197eb

@ -2,7 +2,9 @@ package com.ruoyi.web.controller.system.property;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.utils.uuid.Seq; import com.ruoyi.common.utils.uuid.Seq;
import com.ruoyi.system.service.ITdPropertyNetinfoService;
import com.ruoyi.web.controller.manager.SysAreaManager; import com.ruoyi.web.controller.manager.SysAreaManager;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -26,26 +28,27 @@ import javax.annotation.Resource;
/** /**
* Controller * Controller
* *
* @author ruoyi * @author ruoyi
* @date 2024-05-09 * @date 2024-05-09
*/ */
@Controller @Controller
@RequestMapping("/system/network") @RequestMapping("/system/network")
public class TdPropertyNetController extends BaseController public class TdPropertyNetController extends BaseController {
{
private String prefix = "system/network/network"; private String prefix = "system/network/network";
@Autowired @Autowired
private ITdPropertyNetService tdPropertyNetService; private ITdPropertyNetService tdPropertyNetService;
@Autowired
private ITdPropertyNetinfoService tdPropertyNetinfoService;
@Resource @Resource
private SysAreaManager sysAreaManager; private SysAreaManager sysAreaManager;
@RequiresPermissions("system:network:view") @RequiresPermissions("system:network:view")
@GetMapping() @GetMapping()
public String network() public String network() {
{
return prefix + "/network"; return prefix + "/network";
} }
@ -55,8 +58,7 @@ public class TdPropertyNetController extends BaseController
@RequiresPermissions("system:network:list") @RequiresPermissions("system:network:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(TdPropertyNet tdPropertyNet) public TableDataInfo list(TdPropertyNet tdPropertyNet) {
{
startPage(); startPage();
List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet); List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet);
return getDataTable(list); return getDataTable(list);
@ -69,8 +71,7 @@ public class TdPropertyNetController extends BaseController
@Log(title = "涉密网络设备", businessType = BusinessType.EXPORT) @Log(title = "涉密网络设备", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(TdPropertyNet tdPropertyNet) public AjaxResult export(TdPropertyNet tdPropertyNet) {
{
List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet); List<TdPropertyNet> list = tdPropertyNetService.selectTdPropertyNetList(tdPropertyNet);
list.forEach(tdPropertyNet1 -> { list.forEach(tdPropertyNet1 -> {
tdPropertyNet1.setFramework(sysAreaManager.getAreaName(tdPropertyNet1.getFramework())); tdPropertyNet1.setFramework(sysAreaManager.getAreaName(tdPropertyNet1.getFramework()));
@ -84,9 +85,8 @@ public class TdPropertyNetController extends BaseController
* *
*/ */
@GetMapping("/add") @GetMapping("/add")
public String add(ModelMap mmap) public String add(ModelMap mmap) {
{ mmap.put("sysuser", getSysUser());
mmap.put("sysuser",getSysUser());
return prefix + "/add"; return prefix + "/add";
} }
@ -97,9 +97,8 @@ public class TdPropertyNetController extends BaseController
@Log(title = "涉密网络设备", businessType = BusinessType.INSERT) @Log(title = "涉密网络设备", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(TdPropertyNet tdPropertyNet) public AjaxResult addSave(TdPropertyNet tdPropertyNet) {
{ tdPropertyNet.setNetId("Net_" + Seq.getId(Seq.commSeqType));
tdPropertyNet.setNetId("Net_"+ Seq.getId(Seq.commSeqType));
return toAjax(tdPropertyNetService.insertTdPropertyNet(tdPropertyNet)); return toAjax(tdPropertyNetService.insertTdPropertyNet(tdPropertyNet));
} }
@ -108,8 +107,7 @@ public class TdPropertyNetController extends BaseController
*/ */
@RequiresPermissions("system:network:edit") @RequiresPermissions("system:network:edit")
@GetMapping("/edit/{netId}") @GetMapping("/edit/{netId}")
public String edit(@PathVariable("netId") String netId, ModelMap mmap) public String edit(@PathVariable("netId") String netId, ModelMap mmap) {
{
TdPropertyNet tdPropertyNet = tdPropertyNetService.selectTdPropertyNetByNetId(netId); TdPropertyNet tdPropertyNet = tdPropertyNetService.selectTdPropertyNetByNetId(netId);
mmap.put("tdPropertyNet", tdPropertyNet); mmap.put("tdPropertyNet", tdPropertyNet);
return prefix + "/edit"; return prefix + "/edit";
@ -122,8 +120,7 @@ public class TdPropertyNetController extends BaseController
@Log(title = "涉密网络设备", businessType = BusinessType.UPDATE) @Log(title = "涉密网络设备", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(TdPropertyNet tdPropertyNet) public AjaxResult editSave(TdPropertyNet tdPropertyNet) {
{
return toAjax(tdPropertyNetService.updateTdPropertyNet(tdPropertyNet)); return toAjax(tdPropertyNetService.updateTdPropertyNet(tdPropertyNet));
} }
@ -132,10 +129,12 @@ public class TdPropertyNetController extends BaseController
*/ */
@RequiresPermissions("system:network:remove") @RequiresPermissions("system:network:remove")
@Log(title = "涉密网络设备", businessType = BusinessType.DELETE) @Log(title = "涉密网络设备", businessType = BusinessType.DELETE)
@PostMapping( "/remove") @PostMapping("/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids) {
{ QueryWrapper queryWrapper= new QueryWrapper();
queryWrapper.in("net_id",ids.split(","));
tdPropertyNetinfoService.remove(queryWrapper);
return toAjax(tdPropertyNetService.deleteTdPropertyNetByNetIds(ids)); return toAjax(tdPropertyNetService.deleteTdPropertyNetByNetIds(ids));
} }
@ -144,9 +143,8 @@ public class TdPropertyNetController extends BaseController
*/ */
@RequiresPermissions("system:network:list") @RequiresPermissions("system:network:list")
@GetMapping("/detail/{netId}") @GetMapping("/detail/{netId}")
public String detail(@PathVariable("netId") String netId, ModelMap mmap) public String detail(@PathVariable("netId") String netId, ModelMap mmap) {
{ mmap.put("netId", netId);
mmap.put("netId",netId);
return "system/network/netinfo/netinfo"; return "system/network/netinfo/netinfo";
} }

@ -1,6 +1,9 @@
package com.ruoyi.system.mapper; package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyNetinfo; import com.ruoyi.system.domain.TdPropertyNetinfo;
/** /**
@ -9,7 +12,7 @@ import com.ruoyi.system.domain.TdPropertyNetinfo;
* @author ruoyi * @author ruoyi
* @date 2024-05-09 * @date 2024-05-09
*/ */
public interface TdPropertyNetinfoMapper public interface TdPropertyNetinfoMapper extends BaseMapper<TdPropertyNetinfo>
{ {
/** /**
* *

@ -1,6 +1,9 @@
package com.ruoyi.system.service; package com.ruoyi.system.service;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyNetinfo; import com.ruoyi.system.domain.TdPropertyNetinfo;
/** /**
@ -9,7 +12,7 @@ import com.ruoyi.system.domain.TdPropertyNetinfo;
* @author ruoyi * @author ruoyi
* @date 2024-05-09 * @date 2024-05-09
*/ */
public interface ITdPropertyNetinfoService public interface ITdPropertyNetinfoService extends IService<TdPropertyNetinfo>
{ {
/** /**
* *

@ -1,6 +1,8 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TdPropertyNetinfoMapper; import com.ruoyi.system.mapper.TdPropertyNetinfoMapper;
@ -15,7 +17,8 @@ import com.ruoyi.common.core.text.Convert;
* @date 2024-05-09 * @date 2024-05-09
*/ */
@Service @Service
public class TdPropertyNetinfoServiceImpl implements ITdPropertyNetinfoService public class TdPropertyNetinfoServiceImpl extends ServiceImpl<TdPropertyNetinfoMapper, TdPropertyNetinfo> implements ITdPropertyNetinfoService
{ {
@Autowired @Autowired
private TdPropertyNetinfoMapper tdPropertyNetinfoMapper; private TdPropertyNetinfoMapper tdPropertyNetinfoMapper;

Loading…
Cancel
Save