diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcSjlytjController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcSjlytjController.java new file mode 100644 index 00000000..c1965aaf --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcSjlytjController.java @@ -0,0 +1,104 @@ +package com.ruoyi.tcZz.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.tcZz.domain.TcSjlytj; +import com.ruoyi.tcZz.service.ITcSjlytjService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 数据来源统计tc_sjlytj Controller + * + * @author ruoyi + * @date 2023-10-12 + */ +@RestController +@RequestMapping("/tcZz/networkSecurity/DataSourceTj") +public class TcSjlytjController extends BaseController +{ + @Autowired + private ITcSjlytjService tcSjlytjService; + + /** + * 查询数据来源统计tc_sjlytj 列表 + */ + @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:DataSourceTj:list')") + @GetMapping("/list") + public TableDataInfo list(TcSjlytj tcSjlytj) + { + startPage(); + List list = tcSjlytjService.selectTcSjlytjList(tcSjlytj); + return getDataTable(list); + } + + /** + * 导出数据来源统计tc_sjlytj 列表 + */ + @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:DataSourceTj:export')") + @Log(title = "数据来源统计tc_sjlytj ", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TcSjlytj tcSjlytj) + { + List list = tcSjlytjService.selectTcSjlytjList(tcSjlytj); + ExcelUtil util = new ExcelUtil(TcSjlytj.class); + util.exportExcel(response, list, "数据来源统计tc_sjlytj 数据"); + } + + /** + * 获取数据来源统计tc_sjlytj 详细信息 + */ + @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:DataSourceTj:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(tcSjlytjService.selectTcSjlytjById(id)); + } + + /** + * 新增数据来源统计tc_sjlytj + */ + @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:DataSourceTj:add')") + @Log(title = "数据来源统计tc_sjlytj ", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TcSjlytj tcSjlytj) + { + return toAjax(tcSjlytjService.insertTcSjlytj(tcSjlytj)); + } + + /** + * 修改数据来源统计tc_sjlytj + */ + @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:DataSourceTj:edit')") + @Log(title = "数据来源统计tc_sjlytj ", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TcSjlytj tcSjlytj) + { + return toAjax(tcSjlytjService.updateTcSjlytj(tcSjlytj)); + } + + /** + * 删除数据来源统计tc_sjlytj + */ + @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:DataSourceTj:remove')") + @Log(title = "数据来源统计tc_sjlytj ", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(tcSjlytjService.deleteTcSjlytjByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcSjlytj.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcSjlytj.java new file mode 100644 index 00000000..c2addb39 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcSjlytj.java @@ -0,0 +1,98 @@ +package com.ruoyi.tcZz.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 数据来源统计tc_sjlytj 对象 tc_sjlytj + * + * @author ruoyi + * @date 2023-10-12 + */ +public class TcSjlytj extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 云端监测(G) */ + @Excel(name = "云端监测(G)") + private String lable1; + + /** 云端监测(G)总量 */ + @Excel(name = "云端监测(G)总量") + private String lable1Sum; + + /** APT(M) */ + @Excel(name = "APT(M)") + private String lable2; + + /** APT(M) 总量 */ + @Excel(name = "APT(M) 总量") + private String lable2Sum; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setLable1(String lable1) + { + this.lable1 = lable1; + } + + public String getLable1() + { + return lable1; + } + public void setLable1Sum(String lable1Sum) + { + this.lable1Sum = lable1Sum; + } + + public String getLable1Sum() + { + return lable1Sum; + } + public void setLable2(String lable2) + { + this.lable2 = lable2; + } + + public String getLable2() + { + return lable2; + } + public void setLable2Sum(String lable2Sum) + { + this.lable2Sum = lable2Sum; + } + + public String getLable2Sum() + { + return lable2Sum; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("lable1", getLable1()) + .append("lable1Sum", getLable1Sum()) + .append("lable2", getLable2()) + .append("lable2Sum", getLable2Sum()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcSjlytjMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcSjlytjMapper.java new file mode 100644 index 00000000..73b118b0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/mapper/TcSjlytjMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.tcZz.mapper; + +import java.util.List; +import com.ruoyi.tcZz.domain.TcSjlytj; + +/** + * 数据来源统计tc_sjlytj Mapper接口 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface TcSjlytjMapper +{ + /** + * 查询数据来源统计tc_sjlytj + * + * @param id 数据来源统计tc_sjlytj 主键 + * @return 数据来源统计tc_sjlytj + */ + public TcSjlytj selectTcSjlytjById(Long id); + + /** + * 查询数据来源统计tc_sjlytj 列表 + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 数据来源统计tc_sjlytj 集合 + */ + public List selectTcSjlytjList(TcSjlytj tcSjlytj); + + /** + * 新增数据来源统计tc_sjlytj + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 结果 + */ + public int insertTcSjlytj(TcSjlytj tcSjlytj); + + /** + * 修改数据来源统计tc_sjlytj + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 结果 + */ + public int updateTcSjlytj(TcSjlytj tcSjlytj); + + /** + * 删除数据来源统计tc_sjlytj + * + * @param id 数据来源统计tc_sjlytj 主键 + * @return 结果 + */ + public int deleteTcSjlytjById(Long id); + + /** + * 批量删除数据来源统计tc_sjlytj + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTcSjlytjByIds(Long[] ids); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcSjlytjService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcSjlytjService.java new file mode 100644 index 00000000..a2b15240 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcSjlytjService.java @@ -0,0 +1,61 @@ +package com.ruoyi.tcZz.service; + +import java.util.List; +import com.ruoyi.tcZz.domain.TcSjlytj; + +/** + * 数据来源统计tc_sjlytj Service接口 + * + * @author ruoyi + * @date 2023-10-12 + */ +public interface ITcSjlytjService +{ + /** + * 查询数据来源统计tc_sjlytj + * + * @param id 数据来源统计tc_sjlytj 主键 + * @return 数据来源统计tc_sjlytj + */ + public TcSjlytj selectTcSjlytjById(Long id); + + /** + * 查询数据来源统计tc_sjlytj 列表 + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 数据来源统计tc_sjlytj 集合 + */ + public List selectTcSjlytjList(TcSjlytj tcSjlytj); + + /** + * 新增数据来源统计tc_sjlytj + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 结果 + */ + public int insertTcSjlytj(TcSjlytj tcSjlytj); + + /** + * 修改数据来源统计tc_sjlytj + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 结果 + */ + public int updateTcSjlytj(TcSjlytj tcSjlytj); + + /** + * 批量删除数据来源统计tc_sjlytj + * + * @param ids 需要删除的数据来源统计tc_sjlytj 主键集合 + * @return 结果 + */ + public int deleteTcSjlytjByIds(Long[] ids); + + /** + * 删除数据来源统计tc_sjlytj 信息 + * + * @param id 数据来源统计tc_sjlytj 主键 + * @return 结果 + */ + public int deleteTcSjlytjById(Long id); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcSjlytjServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcSjlytjServiceImpl.java new file mode 100644 index 00000000..6df9e55a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcSjlytjServiceImpl.java @@ -0,0 +1,96 @@ +package com.ruoyi.tcZz.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.tcZz.mapper.TcSjlytjMapper; +import com.ruoyi.tcZz.domain.TcSjlytj; +import com.ruoyi.tcZz.service.ITcSjlytjService; + +/** + * 数据来源统计tc_sjlytj Service业务层处理 + * + * @author ruoyi + * @date 2023-10-12 + */ +@Service +public class TcSjlytjServiceImpl implements ITcSjlytjService +{ + @Autowired + private TcSjlytjMapper tcSjlytjMapper; + + /** + * 查询数据来源统计tc_sjlytj + * + * @param id 数据来源统计tc_sjlytj 主键 + * @return 数据来源统计tc_sjlytj + */ + @Override + public TcSjlytj selectTcSjlytjById(Long id) + { + return tcSjlytjMapper.selectTcSjlytjById(id); + } + + /** + * 查询数据来源统计tc_sjlytj 列表 + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 数据来源统计tc_sjlytj + */ + @Override + public List selectTcSjlytjList(TcSjlytj tcSjlytj) + { + return tcSjlytjMapper.selectTcSjlytjList(tcSjlytj); + } + + /** + * 新增数据来源统计tc_sjlytj + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 结果 + */ + @Override + public int insertTcSjlytj(TcSjlytj tcSjlytj) + { + tcSjlytj.setCreateTime(DateUtils.getNowDate()); + return tcSjlytjMapper.insertTcSjlytj(tcSjlytj); + } + + /** + * 修改数据来源统计tc_sjlytj + * + * @param tcSjlytj 数据来源统计tc_sjlytj + * @return 结果 + */ + @Override + public int updateTcSjlytj(TcSjlytj tcSjlytj) + { + tcSjlytj.setUpdateTime(DateUtils.getNowDate()); + return tcSjlytjMapper.updateTcSjlytj(tcSjlytj); + } + + /** + * 批量删除数据来源统计tc_sjlytj + * + * @param ids 需要删除的数据来源统计tc_sjlytj 主键 + * @return 结果 + */ + @Override + public int deleteTcSjlytjByIds(Long[] ids) + { + return tcSjlytjMapper.deleteTcSjlytjByIds(ids); + } + + /** + * 删除数据来源统计tc_sjlytj 信息 + * + * @param id 数据来源统计tc_sjlytj 主键 + * @return 结果 + */ + @Override + public int deleteTcSjlytjById(Long id) + { + return tcSjlytjMapper.deleteTcSjlytjById(id); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/tcZz/networkSecurity/TcSjlytjMapper.xml b/ruoyi-admin/src/main/resources/mapper/tcZz/networkSecurity/TcSjlytjMapper.xml new file mode 100644 index 00000000..0a1484b9 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/tcZz/networkSecurity/TcSjlytjMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + select id, lable1, lable1Sum, lable2, lable2Sum, create_by, create_time, update_by, update_time, remark from tc_sjlytj + + + + + + + + insert into tc_sjlytj + + lable1, + lable1Sum, + lable2, + lable2Sum, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{lable1}, + #{lable1Sum}, + #{lable2}, + #{lable2Sum}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update tc_sjlytj + + lable1 = #{lable1}, + lable1Sum = #{lable1Sum}, + lable2 = #{lable2}, + lable2Sum = #{lable2Sum}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from tc_sjlytj where id = #{id} + + + + delete from tc_sjlytj where id in + + #{id} + + + \ No newline at end of file