fix:涉密资产统计

pg_adapter
wangxy 8 months ago
parent f2aba24437
commit 4b8a75694d

@ -1,12 +1,16 @@
package com.ruoyi.web.controller.system.count;
import com.alibaba.fastjson.JSONObject;
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.domain.entity.SysDictData;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyNet;
import com.ruoyi.system.domain.TdPropertyNetinfo;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ITdPropertyNetService;
import com.ruoyi.system.service.ITdPropertyNetinfoService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -15,7 +19,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@Controller
@RequestMapping("/system/networknum")
@ -63,4 +70,35 @@ public class SysNetworknumController extends BaseController {
return prefix + "/print";
}
/**
*
*
* @param null
* @return
*/
@Autowired
private ISysDictDataService dictDataService;
@PostMapping("/countNetInfo")
@ResponseBody
public AjaxResult countNetInfo() {
SysDictData sysDictData = new SysDictData();
sysDictData.setDictType("sys_net_type");
List<SysDictData> smType = dictDataService.selectDictDataList(sysDictData);
List<String> list = smType.stream().map(SysDictData::getDictLabel).collect(Collectors.toList());
List<Long> yAxisData = new ArrayList<>();
smType.forEach(xAxis -> {
AtomicReference<Long> yAxis = new AtomicReference<>(0L);
Integer count = tdPropertyNetinfoService.lambdaQuery()
.eq(TdPropertyNetinfo::getNetName, xAxis.getDictValue())
.count();
yAxis.set(Long.valueOf(count));
yAxisData.add(yAxis.get());
});
JSONObject obj = new JSONObject();
obj.put("xAxisData", list.toArray());
obj.put("yAxisData", yAxisData);
return AjaxResult.success(obj);
}
}

@ -51,7 +51,7 @@
<div class="form-group">
<label class="col-sm-4 control-label">登记人员:</label>
<div class="col-sm-8">
<input name="netname" class="form-control" readonly th:value="${sysuser.userName}" type="text">
<input name="registName" class="form-control" readonly th:value="${sysuser.userName}" type="text">
</div>
</div>
</div>

@ -44,7 +44,7 @@ public class TdPropertyNetinfo extends BaseEntity
/** 登记人员 */
@Excel(name = "登记人员")
private String netname;
private String registName;
/** 责任人 */
@Excel(name = "责任人")
@ -129,15 +129,7 @@ public class TdPropertyNetinfo extends BaseEntity
{
return netSn;
}
public void setNetname(String netname)
{
this.netname = netname;
}
public String getNetname()
{
return netname;
}
public void setNetManager(String netManager)
{
this.netManager = netManager;
@ -184,6 +176,14 @@ public class TdPropertyNetinfo extends BaseEntity
return depart;
}
public String getRegistName() {
return registName;
}
public void setRegistName(String registName) {
this.registName = registName;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@ -195,7 +195,7 @@ public class TdPropertyNetinfo extends BaseEntity
.append("netName", getNetName())
.append("netSn", getNetSn())
.append("remark", getRemark())
.append("netname", getNetname())
.append("registName", getRegistName())
.append("netManager", getNetManager())
.append("netMiji", getNetMiji())
.append("netsmname", getNetsmname())

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

@ -3,7 +3,6 @@ package com.ruoyi.system.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.TdPropertyInfo;
import com.ruoyi.system.domain.TdPropertyNetinfo;
/**

@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="netName" column="net_name" />
<result property="netSn" column="net_sn" />
<result property="remark" column="remark" />
<result property="netname" column="netname" />
<result property="registName" column="regist_name" />
<result property="netManager" column="net_manager" />
<result property="netMiji" column="net_miji" />
<result property="netsmname" column="netsmname" />
@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTdPropertyNetinfoVo">
select id, net_id, net_brand, net_ip, net_no, net_name, net_sn, remark, netname, net_manager, net_miji, netsmname, is_curcial, depart from td_property_netinfo
select id, net_id, net_brand, net_ip, net_no, net_name, net_sn, remark, regist_name, net_manager, net_miji, netsmname, is_curcial, depart from td_property_netinfo
</sql>
<select id="selectTdPropertyNetinfoList" parameterType="TdPropertyNetinfo" resultMap="TdPropertyNetinfoResult">
@ -35,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="netNo != null and netNo != '' "> and net_no = #{netNo}</if>
<if test="netName != null and netName != '' "> and net_name = #{netName}</if>
<if test="netSn != null "> and net_sn = #{netSn}</if>
<if test="netname != null "> and netname = #{netname}</if>
<if test="registName != null "> and regist_name = #{registName}</if>
<if test="netManager != null "> and net_manager = #{netManager}</if>
<if test="netMiji != null "> and net_miji = #{netMiji}</if>
<if test="netsmname != null "> and netsmname = #{netsmname}</if>
@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="netName != null">net_name,</if>
<if test="netSn != null">net_sn,</if>
<if test="remark != null">remark,</if>
<if test="netname != null">netname,</if>
<if test="registName != null">regist_name,</if>
<if test="netManager != null">net_manager,</if>
<if test="netMiji != null">net_miji,</if>
<if test="netsmname != null">netsmname,</if>
@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="netName != null">#{netName},</if>
<if test="netSn != null">#{netSn},</if>
<if test="remark != null">#{remark},</if>
<if test="netname != null">#{netname},</if>
<if test="registName != null">#{registName},</if>
<if test="netManager != null">#{netManager},</if>
<if test="netMiji != null">#{netMiji},</if>
<if test="netsmname != null">#{netsmname},</if>
@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="netName != null">net_name = #{netName},</if>
<if test="netSn != null">net_sn = #{netSn},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="netname != null">netname = #{netname},</if>
<if test="registName != null">regist_name = #{registName},</if>
<if test="netManager != null">net_manager = #{netManager},</if>
<if test="netMiji != null">net_miji = #{netMiji},</if>
<if test="netsmname != null">netsmname = #{netsmname},</if>

Loading…
Cancel
Save