From f339bb25556df892e2fc149eee81a2f422dca0a4 Mon Sep 17 00:00:00 2001 From: dongdingding <207595406@qq.com> Date: Tue, 17 Oct 2023 10:26:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=85=A5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tcZz/controller/TcWljgtjController.java | 2 +- .../tcZz/controller/TcWlmqfzrController.java | 2 +- .../tcZz/controller/TcWpyrwwclController.java | 2 +- .../tcZz/controller/TcXtjcController.java | 25 ++---- .../tcZz/controller/TcYqbgController.java | 35 +++++--- .../tcZz/controller/TcYqxxlnumController.java | 35 +++++--- .../tcZz/controller/TcYqxxltjController.java | 19 ++--- .../tcZz/controller/TcYqyjController.java | 80 +++++++++--------- .../tcZz/controller/TcYqzsController.java | 68 +++++++-------- .../tcZz/controller/TcYtlcController.java | 82 +++++++++--------- .../tcZz/controller/TcZbxqController.java | 83 ++++++++++--------- .../tcZz/controller/TcZdgzxmController.java | 82 +++++++++--------- .../tcZz/controller/TcZdlyjgController.java | 81 +++++++++--------- .../tcZz/controller/TcZdqymlController.java | 82 +++++++++--------- .../tcZz/controller/TcZfwzController.java | 82 +++++++++--------- .../tcZz/controller/TcZxyhController.java | 60 ++++++++------ .../java/com/ruoyi/tcZz/domain/TcBzhan.java | 2 +- .../com/ruoyi/tcZz/service/ITcWzService.java | 2 +- .../ruoyi/tcZz/service/ITcYqbgService.java | 10 +++ .../tcZz/service/ITcYqxxlnumService.java | 11 +++ .../ruoyi/tcZz/service/ITcYqyjService.java | 11 +++ .../ruoyi/tcZz/service/ITcYqzsService.java | 28 ++++--- .../ruoyi/tcZz/service/ITcYtlcService.java | 28 ++++--- .../ruoyi/tcZz/service/ITcZbxqService.java | 22 +++-- .../ruoyi/tcZz/service/ITcZdgzxmService.java | 11 +++ .../ruoyi/tcZz/service/ITcZdlyjgService.java | 11 +++ .../ruoyi/tcZz/service/ITcZdqymlService.java | 12 +++ .../ruoyi/tcZz/service/ITcZfwzService.java | 11 +++ .../ruoyi/tcZz/service/ITcZxyhService.java | 11 +++ .../tcZz/service/impl/TcYqbgServiceImpl.java | 14 ++++ .../service/impl/TcYqxxlnumServiceImpl.java | 13 +++ .../tcZz/service/impl/TcYqyjServiceImpl.java | 13 +++ .../tcZz/service/impl/TcYqzsServiceImpl.java | 13 +++ .../tcZz/service/impl/TcYtlcServiceImpl.java | 13 +++ .../tcZz/service/impl/TcZbxqServiceImpl.java | 13 +++ .../service/impl/TcZdgzxmServiceImpl.java | 13 +++ .../service/impl/TcZdlyjgServiceImpl.java | 13 +++ .../service/impl/TcZdqymlServiceImpl.java | 13 +++ .../tcZz/service/impl/TcZfwzServiceImpl.java | 13 +++ .../tcZz/service/impl/TcZxyhServiceImpl.java | 50 ++++++----- .../framework/config/SecurityConfig.java | 2 +- 41 files changed, 718 insertions(+), 455 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWljgtjController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWljgtjController.java index 0a2404f3..ff125cac 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWljgtjController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWljgtjController.java @@ -42,7 +42,7 @@ public class TcWljgtjController extends BaseController { /** * 查询网络监测统计列表 */ - @ApiOperation("查询网络监测统计列表") + @ApiOperation(value = "查询网络监测统计列表",response =TcWljgtj.class ) @GetMapping("/list") public TableDataInfo list(TcWljgtj tcWljgtj) { startPage(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWlmqfzrController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWlmqfzrController.java index 94c19234..136239ca 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWlmqfzrController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWlmqfzrController.java @@ -32,7 +32,7 @@ import org.springframework.web.multipart.MultipartFile; * @author ruoyi * @date 2023-10-13 */ -@Api("网络民情负责人") +@Api(tags = "网络民情负责人") @RestController @RequestMapping("/tcZz/networkEcology/wlmqfzr") public class TcWlmqfzrController extends BaseController { diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWpyrwwclController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWpyrwwclController.java index d5309f57..e38af52d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWpyrwwclController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcWpyrwwclController.java @@ -33,7 +33,7 @@ import org.springframework.web.multipart.MultipartFile; * @date 2023-10-13 */ @RestController -@Api("网评员任务完成率") +@Api(tags = "网评员任务完成率") @RequestMapping("/tcZz/networkEcology/wpyrwwcl") public class TcWpyrwwclController extends BaseController { @Autowired diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcXtjcController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcXtjcController.java index e097f526..c2dede91 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcXtjcController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcXtjcController.java @@ -39,22 +39,10 @@ public class TcXtjcController extends BaseController { @Autowired private ITcXtjcService tcXtjcService; - /** - * 查询系统监测列表 - */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:list')") - @GetMapping("/list") - public TableDataInfo list(TcXtjc tcXtjc) { - startPage(); - List list = tcXtjcService.selectTcXtjcList(tcXtjc); - return getDataTable(list); - } - /** * 导出系统监测列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:export')") - @Log(title = "系统监测", businessType = BusinessType.EXPORT) + @ApiOperation("导出系统监测列表") @PostMapping("/export") public void export(HttpServletResponse response, TcXtjc tcXtjc) { List list = tcXtjcService.selectTcXtjcList(tcXtjc); @@ -65,7 +53,7 @@ public class TcXtjcController extends BaseController { /** * 获取系统监测详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:query')") + @ApiOperation("获取系统监测详细信息") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcXtjcService.selectTcXtjcById(id)); @@ -74,8 +62,7 @@ public class TcXtjcController extends BaseController { /** * 新增系统监测 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:add')") - @Log(title = "系统监测", businessType = BusinessType.INSERT) + @ApiOperation("新增系统监测") @PostMapping public AjaxResult add(@RequestBody TcXtjc tcXtjc) { return toAjax(tcXtjcService.insertTcXtjc(tcXtjc)); @@ -84,8 +71,7 @@ public class TcXtjcController extends BaseController { /** * 修改系统监测 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:edit')") - @Log(title = "系统监测", businessType = BusinessType.UPDATE) + @ApiOperation("修改系统监测") @PutMapping public AjaxResult edit(@RequestBody TcXtjc tcXtjc) { return toAjax(tcXtjcService.updateTcXtjc(tcXtjc)); @@ -94,8 +80,7 @@ public class TcXtjcController extends BaseController { /** * 删除系统监测 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:remove')") - @Log(title = "系统监测", businessType = BusinessType.DELETE) + @ApiOperation("删除系统监测") @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcXtjcService.deleteTcXtjcByIds(ids)); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqbgController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqbgController.java index e4be7f8a..a7c1821f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqbgController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqbgController.java @@ -3,7 +3,10 @@ package com.ruoyi.tcZz.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.tcZz.domain.TcWljgtj; +import com.ruoyi.tcZz.domain.TcWz; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -22,6 +25,7 @@ import com.ruoyi.tcZz.domain.TcYqbg; import com.ruoyi.tcZz.service.ITcYqbgService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 舆情报告Controller @@ -30,7 +34,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @date 2023-10-12 */ @RestController -@Api("舆情报告") +@Api(tags = "舆情报告") @RequestMapping("/tcZz/netWorkYq/yqbg") public class TcYqbgController extends BaseController { @@ -40,7 +44,7 @@ public class TcYqbgController extends BaseController /** * 查询舆情报告列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqbg:list')") + @ApiOperation(value = "查询舆情报告列表", response = TcYqbg.class) @GetMapping("/list") public TableDataInfo list(TcYqbg tcYqbg) { @@ -52,8 +56,7 @@ public class TcYqbgController extends BaseController /** * 导出舆情报告列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqbg:export')") - @Log(title = "舆情报告", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出舆情报告列表") @PostMapping("/export") public void export(HttpServletResponse response, TcYqbg tcYqbg) { @@ -65,7 +68,7 @@ public class TcYqbgController extends BaseController /** * 获取舆情报告详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqbg:query')") + @ApiOperation(value = "获取舆情报告详细信息") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { @@ -75,8 +78,7 @@ public class TcYqbgController extends BaseController /** * 新增舆情报告 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqbg:add')") - @Log(title = "舆情报告", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增舆情报告") @PostMapping public AjaxResult add(@RequestBody TcYqbg tcYqbg) { @@ -86,8 +88,7 @@ public class TcYqbgController extends BaseController /** * 修改舆情报告 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqbg:edit')") - @Log(title = "舆情报告", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改舆情报告") @PutMapping public AjaxResult edit(@RequestBody TcYqbg tcYqbg) { @@ -97,11 +98,23 @@ public class TcYqbgController extends BaseController /** * 删除舆情报告 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqbg:remove')") - @Log(title = "舆情报告", businessType = BusinessType.DELETE) + @ApiOperation(value = "删除舆情报告") @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcYqbgService.deleteTcYqbgByIds(ids)); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcYqbg.class); + List tcYqbgList = util.importExcel(file.getInputStream()); + tcYqbgService.importUser(tcYqbgList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxlnumController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxlnumController.java index 0fbea8a0..2d4a0316 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxlnumController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxlnumController.java @@ -2,6 +2,10 @@ package com.ruoyi.tcZz.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.tcZz.domain.TcWljgtj; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -20,6 +24,7 @@ import com.ruoyi.tcZz.domain.TcYqxxlnum; import com.ruoyi.tcZz.service.ITcYqxxlnumService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 舆情信息量统计Controller @@ -27,6 +32,7 @@ import com.ruoyi.common.core.page.TableDataInfo; * @author ruoyi * @date 2023-10-12 */ +@Api(tags = "舆情信息量统计") @RestController @RequestMapping("/tcZz/netWorkYq/yqxxlnum") public class TcYqxxlnumController extends BaseController @@ -37,7 +43,7 @@ public class TcYqxxlnumController extends BaseController /** * 查询舆情信息量统计列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxlnum:list')") + @ApiOperation(value = "查询舆情信息量统计列表",response =TcYqxxlnum.class ) @GetMapping("/list") public TableDataInfo list(TcYqxxlnum tcYqxxlnum) { @@ -49,8 +55,7 @@ public class TcYqxxlnumController extends BaseController /** * 导出舆情信息量统计列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxlnum:export')") - @Log(title = "舆情信息量统计", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出舆情信息量统计列表") @PostMapping("/export") public void export(HttpServletResponse response, TcYqxxlnum tcYqxxlnum) { @@ -62,7 +67,7 @@ public class TcYqxxlnumController extends BaseController /** * 获取舆情信息量统计详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxlnum:query')") + @ApiOperation(value = "获取舆情信息量统计详细信息") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { @@ -72,8 +77,7 @@ public class TcYqxxlnumController extends BaseController /** * 新增舆情信息量统计 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxlnum:add')") - @Log(title = "舆情信息量统计", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增舆情信息量统计") @PostMapping public AjaxResult add(@RequestBody TcYqxxlnum tcYqxxlnum) { @@ -83,8 +87,7 @@ public class TcYqxxlnumController extends BaseController /** * 修改舆情信息量统计 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxlnum:edit')") - @Log(title = "舆情信息量统计", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改舆情信息量统计") @PutMapping public AjaxResult edit(@RequestBody TcYqxxlnum tcYqxxlnum) { @@ -94,11 +97,23 @@ public class TcYqxxlnumController extends BaseController /** * 删除舆情信息量统计 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxlnum:remove')") - @Log(title = "舆情信息量统计", businessType = BusinessType.DELETE) + @ApiOperation(value = "删除舆情信息量统计") @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcYqxxlnumService.deleteTcYqxxlnumByIds(ids)); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcYqxxlnum.class); + List tcYqxxlnumList = util.importExcel(file.getInputStream()); + tcYqxxlnumService.importUser(tcYqxxlnumList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxltjController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxltjController.java index edf78d77..ab0afb53 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxltjController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqxxltjController.java @@ -6,6 +6,7 @@ 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.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcYqxxltj; import com.ruoyi.tcZz.service.ITcYqxxltjService; import io.swagger.annotations.Api; @@ -34,7 +35,7 @@ public class TcYqxxltjController extends BaseController { /** * 查询舆情信息量统计明細列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:list')") + @ApiOperation(value = "查询舆情信息量统计明細列表",response = TcYqxxltj.class ) @GetMapping("/list") public TableDataInfo list(TcYqxxltj tcYqxxltj) { startPage(); @@ -45,8 +46,7 @@ public class TcYqxxltjController extends BaseController { /** * 导出舆情信息量统计明細列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:export')") - @Log(title = "舆情信息量统计明細", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出舆情信息量统计明細列表") @PostMapping("/export") public void export(HttpServletResponse response, TcYqxxltj tcYqxxltj) { List list = tcYqxxltjService.selectTcYqxxltjList(tcYqxxltj); @@ -57,7 +57,7 @@ public class TcYqxxltjController extends BaseController { /** * 获取舆情信息量统计明細详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:query')") + @ApiOperation(value = "获取舆情信息量统计明細详细信息") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcYqxxltjService.selectTcYqxxltjById(id)); @@ -66,8 +66,7 @@ public class TcYqxxltjController extends BaseController { /** * 新增舆情信息量统计明細 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:add')") - @Log(title = "舆情信息量统计明細", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增舆情信息量统计明細") @PostMapping public AjaxResult add(@RequestBody TcYqxxltj tcYqxxltj) { return toAjax(tcYqxxltjService.insertTcYqxxltj(tcYqxxltj)); @@ -76,8 +75,7 @@ public class TcYqxxltjController extends BaseController { /** * 修改舆情信息量统计明細 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:edit')") - @Log(title = "舆情信息量统计明細", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改舆情信息量统计明細") @PutMapping public AjaxResult edit(@RequestBody TcYqxxltj tcYqxxltj) { return toAjax(tcYqxxltjService.updateTcYqxxltj(tcYqxxltj)); @@ -86,8 +84,7 @@ public class TcYqxxltjController extends BaseController { /** * 删除舆情信息量统计明細 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:remove')") - @Log(title = "舆情信息量统计明細", businessType = BusinessType.DELETE) + @ApiOperation(value = "删除舆情信息量统计明細") @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcYqxxltjService.deleteTcYqxxltjByIds(ids)); @@ -96,7 +93,7 @@ public class TcYqxxltjController extends BaseController { /** * 查询舆情信息量统计明細列表 */ - @ApiOperation(value = "查询舆情信息量统计明細列表", response = TcYqxxltj.class) + @ApiOperation(value = "查询舆情信息量统计明細列表") @GetMapping("/ListNoToken") public TableDataInfo ListNoToken(TcYqxxltj tcYqxxltj) { startPage(); diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqyjController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqyjController.java index 0b667a46..1f3c35a7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqyjController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqyjController.java @@ -1,46 +1,43 @@ 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.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcYqyj; import com.ruoyi.tcZz.service.ITcYqyjService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 舆情预警Controller - * + * * @author ruoyi * @date 2023-10-12 */ @RestController +@Api(tags = "舆情预警") @RequestMapping("/tcZz/netWorkYq/yqyj") -public class TcYqyjController extends BaseController -{ +public class TcYqyjController extends BaseController { @Autowired private ITcYqyjService tcYqyjService; /** * 查询舆情预警列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqyj:list')") + @ApiOperation(value = "查询舆情预警列表", response = TcYqyj.class) @GetMapping("/list") - public TableDataInfo list(TcYqyj tcYqyj) - { + public TableDataInfo list(TcYqyj tcYqyj) { startPage(); List list = tcYqyjService.selectTcYqyjList(tcYqyj); return getDataTable(list); @@ -49,11 +46,9 @@ public class TcYqyjController extends BaseController /** * 导出舆情预警列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqyj:export')") - @Log(title = "舆情预警", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出舆情预警列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcYqyj tcYqyj) - { + public void export(HttpServletResponse response, TcYqyj tcYqyj) { List list = tcYqyjService.selectTcYqyjList(tcYqyj); ExcelUtil util = new ExcelUtil(TcYqyj.class); util.exportExcel(response, list, "舆情预警数据"); @@ -62,43 +57,48 @@ public class TcYqyjController extends BaseController /** * 获取舆情预警详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqyj:query')") + @ApiOperation(value = "获取舆情预警详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcYqyjService.selectTcYqyjById(id)); } /** * 新增舆情预警 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqyj:add')") - @Log(title = "舆情预警", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增舆情预警") @PostMapping - public AjaxResult add(@RequestBody TcYqyj tcYqyj) - { + public AjaxResult add(@RequestBody TcYqyj tcYqyj) { return toAjax(tcYqyjService.insertTcYqyj(tcYqyj)); } /** * 修改舆情预警 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqyj:edit')") - @Log(title = "舆情预警", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改舆情预警") @PutMapping - public AjaxResult edit(@RequestBody TcYqyj tcYqyj) - { + public AjaxResult edit(@RequestBody TcYqyj tcYqyj) { return toAjax(tcYqyjService.updateTcYqyj(tcYqyj)); } /** * 删除舆情预警 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqyj:remove')") - @Log(title = "舆情预警", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除舆情预警") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcYqyjService.deleteTcYqyjByIds(ids)); } + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcYqyj.class); + List tcYqyjList = util.importExcel(file.getInputStream()); + tcYqyjService.importUser(tcYqyjList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java index 80775a53..84319138 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYqzsController.java @@ -3,6 +3,7 @@ package com.ruoyi.tcZz.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.ruoyi.tcZz.domain.TcWljgtj; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -23,41 +24,29 @@ import com.ruoyi.tcZz.domain.TcYqzs; import com.ruoyi.tcZz.service.ITcYqzsService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 舆情走势图Controller - * + * * @author ruoyi * @date 2023-10-13 */ @Api(tags = "舆情走势图") @RestController @RequestMapping("/tcZz/netWorkYq/yqzs") -public class TcYqzsController extends BaseController -{ +public class TcYqzsController extends BaseController { @Autowired private ITcYqzsService tcYqzsService; - /** - * 查询舆情走势图列表 - */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqzs:list')") - @GetMapping("/list") - public TableDataInfo list(TcYqzs tcYqzs) - { - startPage(); - List list = tcYqzsService.selectTcYqzsList(tcYqzs); - return getDataTable(list); - } + /** * 导出舆情走势图列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqzs:export')") - @Log(title = "舆情走势图", businessType = BusinessType.EXPORT) + @ApiOperation("导出舆情走势图列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcYqzs tcYqzs) - { + public void export(HttpServletResponse response, TcYqzs tcYqzs) { List list = tcYqzsService.selectTcYqzsList(tcYqzs); ExcelUtil util = new ExcelUtil(TcYqzs.class); util.exportExcel(response, list, "舆情走势图数据"); @@ -66,55 +55,60 @@ public class TcYqzsController extends BaseController /** * 获取舆情走势图详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqzs:query')") + @ApiOperation("获取舆情走势图详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcYqzsService.selectTcYqzsById(id)); } /** * 新增舆情走势图 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqzs:add')") - @Log(title = "舆情走势图", businessType = BusinessType.INSERT) + @ApiOperation("新增舆情走势图") @PostMapping - public AjaxResult add(@RequestBody TcYqzs tcYqzs) - { + public AjaxResult add(@RequestBody TcYqzs tcYqzs) { return toAjax(tcYqzsService.insertTcYqzs(tcYqzs)); } /** * 修改舆情走势图 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqzs:edit')") - @Log(title = "舆情走势图", businessType = BusinessType.UPDATE) + @ApiOperation("修改舆情走势图") @PutMapping - public AjaxResult edit(@RequestBody TcYqzs tcYqzs) - { + public AjaxResult edit(@RequestBody TcYqzs tcYqzs) { return toAjax(tcYqzsService.updateTcYqzs(tcYqzs)); } /** * 删除舆情走势图 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqzs:remove')") - @Log(title = "舆情走势图", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation("删除舆情走势图") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcYqzsService.deleteTcYqzsByIds(ids)); } /** * 查询舆情走势图列表 */ - @ApiOperation(value = "查询舆情走势图列表",response =TcYqzs.class ) + @ApiOperation(value = "查询舆情走势图列表", response = TcYqzs.class) @GetMapping("/ListNoToken") - public TableDataInfo ListNoToken(TcYqzs tcYqzs) - { + public TableDataInfo ListNoToken(TcYqzs tcYqzs) { startPage(); List list = tcYqzsService.selectTcYqzsList(tcYqzs); return getDataTable(list); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcYqzs.class); + List tcYqzsList = util.importExcel(file.getInputStream()); + tcYqzsService.importUser(tcYqzsList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYtlcController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYtlcController.java index 1ccc8874..10281543 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYtlcController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcYtlcController.java @@ -1,46 +1,40 @@ 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.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcYtlc; import com.ruoyi.tcZz.service.ITcYtlcService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 约谈流程Controller - * + * * @author ruoyi * @date 2023-10-13 */ @RestController +@Api(tags = "约谈流程") @RequestMapping("/tcZz/netManage/ytlc") -public class TcYtlcController extends BaseController -{ +public class TcYtlcController extends BaseController { @Autowired private ITcYtlcService tcYtlcService; /** * 查询约谈流程列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:ytlc:list')") + @ApiOperation(value = "查询约谈流程列表", response = TcYtlc.class) @GetMapping("/list") - public TableDataInfo list(TcYtlc tcYtlc) - { + public TableDataInfo list(TcYtlc tcYtlc) { startPage(); List list = tcYtlcService.selectTcYtlcList(tcYtlc); return getDataTable(list); @@ -49,11 +43,9 @@ public class TcYtlcController extends BaseController /** * 导出约谈流程列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:ytlc:export')") - @Log(title = "约谈流程", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出约谈流程列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcYtlc tcYtlc) - { + public void export(HttpServletResponse response, TcYtlc tcYtlc) { List list = tcYtlcService.selectTcYtlcList(tcYtlc); ExcelUtil util = new ExcelUtil(TcYtlc.class); util.exportExcel(response, list, "约谈流程数据"); @@ -62,43 +54,49 @@ public class TcYtlcController extends BaseController /** * 获取约谈流程详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:ytlc:query')") + @ApiOperation(value = "获取约谈流程详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcYtlcService.selectTcYtlcById(id)); } /** * 新增约谈流程 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:ytlc:add')") - @Log(title = "约谈流程", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增约谈流程") @PostMapping - public AjaxResult add(@RequestBody TcYtlc tcYtlc) - { + public AjaxResult add(@RequestBody TcYtlc tcYtlc) { return toAjax(tcYtlcService.insertTcYtlc(tcYtlc)); } /** * 修改约谈流程 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:ytlc:edit')") - @Log(title = "约谈流程", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改约谈流程") @PutMapping - public AjaxResult edit(@RequestBody TcYtlc tcYtlc) - { + public AjaxResult edit(@RequestBody TcYtlc tcYtlc) { return toAjax(tcYtlcService.updateTcYtlc(tcYtlc)); } /** * 删除约谈流程 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:ytlc:remove')") - @Log(title = "约谈流程", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除约谈流程") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcYtlcService.deleteTcYtlcByIds(ids)); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcYtlc.class); + List tcYtlcList = util.importExcel(file.getInputStream()); + tcYtlcService.importUser(tcYtlcList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZbxqController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZbxqController.java index 75e17448..01a366b7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZbxqController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZbxqController.java @@ -1,46 +1,43 @@ 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.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcYtlc; import com.ruoyi.tcZz.domain.TcZbxq; import com.ruoyi.tcZz.service.ITcZbxqService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** - * 转办量、转办详情Controller - * + * 转办量、转办详情Controller + * * @author ruoyi * @date 2023-10-12 */ @RestController +@Api(tags = "转办量、转办详情") @RequestMapping("/tcZz/netWorkYq/zbxq") -public class TcZbxqController extends BaseController -{ +public class TcZbxqController extends BaseController { @Autowired private ITcZbxqService tcZbxqService; /** * 查询 转办量、转办详情列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:zbxq:list')") + @ApiOperation(value = "查询 转办量、转办详情列表", response = TcZbxq.class) @GetMapping("/list") - public TableDataInfo list(TcZbxq tcZbxq) - { + public TableDataInfo list(TcZbxq tcZbxq) { startPage(); List list = tcZbxqService.selectTcZbxqList(tcZbxq); return getDataTable(list); @@ -49,11 +46,9 @@ public class TcZbxqController extends BaseController /** * 导出 转办量、转办详情列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:zbxq:export')") - @Log(title = " 转办量、转办详情", businessType = BusinessType.EXPORT) + @ApiOperation(value = " 导出 转办量、转办详情列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcZbxq tcZbxq) - { + public void export(HttpServletResponse response, TcZbxq tcZbxq) { List list = tcZbxqService.selectTcZbxqList(tcZbxq); ExcelUtil util = new ExcelUtil(TcZbxq.class); util.exportExcel(response, list, " 转办量、转办详情数据"); @@ -62,43 +57,49 @@ public class TcZbxqController extends BaseController /** * 获取 转办量、转办详情详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:zbxq:query')") + @ApiOperation(value = " 获取 转办量、转办详情详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcZbxqService.selectTcZbxqById(id)); } /** * 新增 转办量、转办详情 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:zbxq:add')") - @Log(title = " 转办量、转办详情", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增 转办量、转办详情") @PostMapping - public AjaxResult add(@RequestBody TcZbxq tcZbxq) - { + public AjaxResult add(@RequestBody TcZbxq tcZbxq) { return toAjax(tcZbxqService.insertTcZbxq(tcZbxq)); } /** * 修改 转办量、转办详情 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:zbxq:edit')") - @Log(title = " 转办量、转办详情", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改 转办量、转办详情") @PutMapping - public AjaxResult edit(@RequestBody TcZbxq tcZbxq) - { + public AjaxResult edit(@RequestBody TcZbxq tcZbxq) { return toAjax(tcZbxqService.updateTcZbxq(tcZbxq)); } /** * 删除 转办量、转办详情 */ - @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:zbxq:remove')") - @Log(title = " 转办量、转办详情", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = " 删除 转办量、转办详情") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcZbxqService.deleteTcZbxqByIds(ids)); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcZbxq.class); + List tcZbxqList = util.importExcel(file.getInputStream()); + tcZbxqService.importUser(tcZbxqList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdgzxmController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdgzxmController.java index 23be1e18..2eacec33 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdgzxmController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdgzxmController.java @@ -1,46 +1,43 @@ 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.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZdgzxm; import com.ruoyi.tcZz.service.ITcZdgzxmService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 重点工作项目Controller - * + * * @author ruoyi * @date 2023-10-13 */ @RestController +@Api(tags = "重点工作项目") @RequestMapping("/tcZz/netManage/zdgzxm") -public class TcZdgzxmController extends BaseController -{ +public class TcZdgzxmController extends BaseController { @Autowired private ITcZdgzxmService tcZdgzxmService; /** * 查询重点工作项目列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdgzxm:list')") + @ApiOperation(value = "查询重点工作项目列表", response = TcZdgzxm.class) @GetMapping("/list") - public TableDataInfo list(TcZdgzxm tcZdgzxm) - { + public TableDataInfo list(TcZdgzxm tcZdgzxm) { startPage(); List list = tcZdgzxmService.selectTcZdgzxmList(tcZdgzxm); return getDataTable(list); @@ -49,11 +46,9 @@ public class TcZdgzxmController extends BaseController /** * 导出重点工作项目列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdgzxm:export')") - @Log(title = "重点工作项目", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出重点工作项目列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcZdgzxm tcZdgzxm) - { + public void export(HttpServletResponse response, TcZdgzxm tcZdgzxm) { List list = tcZdgzxmService.selectTcZdgzxmList(tcZdgzxm); ExcelUtil util = new ExcelUtil(TcZdgzxm.class); util.exportExcel(response, list, "重点工作项目数据"); @@ -62,43 +57,50 @@ public class TcZdgzxmController extends BaseController /** * 获取重点工作项目详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdgzxm:query')") + @ApiOperation(value = "获取重点工作项目详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcZdgzxmService.selectTcZdgzxmById(id)); } /** * 新增重点工作项目 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdgzxm:add')") - @Log(title = "重点工作项目", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增重点工作项目") @PostMapping - public AjaxResult add(@RequestBody TcZdgzxm tcZdgzxm) - { + public AjaxResult add(@RequestBody TcZdgzxm tcZdgzxm) { return toAjax(tcZdgzxmService.insertTcZdgzxm(tcZdgzxm)); } /** * 修改重点工作项目 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdgzxm:edit')") - @Log(title = "重点工作项目", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改重点工作项目") @PutMapping - public AjaxResult edit(@RequestBody TcZdgzxm tcZdgzxm) - { + public AjaxResult edit(@RequestBody TcZdgzxm tcZdgzxm) { return toAjax(tcZdgzxmService.updateTcZdgzxm(tcZdgzxm)); } /** * 删除重点工作项目 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdgzxm:remove')") - @Log(title = "重点工作项目", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除重点工作项目") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcZdgzxmService.deleteTcZdgzxmByIds(ids)); } + + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcZdgzxm.class); + List tcZdgzxmList = util.importExcel(file.getInputStream()); + tcZdgzxmService.importUser(tcZdgzxmList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdlyjgController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdlyjgController.java index ce9617d8..bc7a3337 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdlyjgController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdlyjgController.java @@ -1,46 +1,40 @@ 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.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZdlyjg; import com.ruoyi.tcZz.service.ITcZdlyjgService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 重点领域监管Controller - * + * * @author ruoyi * @date 2023-10-13 */ @RestController +@Api(tags = "重点领域监管") @RequestMapping("/tcZz/netManage/zdlyjg") -public class TcZdlyjgController extends BaseController -{ +public class TcZdlyjgController extends BaseController { @Autowired private ITcZdlyjgService tcZdlyjgService; /** * 查询重点领域监管列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdlyjg:list')") + @ApiOperation(value = "查询重点领域监管列表", response = TcZdlyjg.class) @GetMapping("/list") - public TableDataInfo list(TcZdlyjg tcZdlyjg) - { + public TableDataInfo list(TcZdlyjg tcZdlyjg) { startPage(); List list = tcZdlyjgService.selectTcZdlyjgList(tcZdlyjg); return getDataTable(list); @@ -49,11 +43,9 @@ public class TcZdlyjgController extends BaseController /** * 导出重点领域监管列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdlyjg:export')") - @Log(title = "重点领域监管", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出重点领域监管列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcZdlyjg tcZdlyjg) - { + public void export(HttpServletResponse response, TcZdlyjg tcZdlyjg) { List list = tcZdlyjgService.selectTcZdlyjgList(tcZdlyjg); ExcelUtil util = new ExcelUtil(TcZdlyjg.class); util.exportExcel(response, list, "重点领域监管数据"); @@ -62,43 +54,48 @@ public class TcZdlyjgController extends BaseController /** * 获取重点领域监管详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdlyjg:query')") + @ApiOperation(value = "获取重点领域监管详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcZdlyjgService.selectTcZdlyjgById(id)); } /** * 新增重点领域监管 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdlyjg:add')") - @Log(title = "重点领域监管", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增重点领域监管") @PostMapping - public AjaxResult add(@RequestBody TcZdlyjg tcZdlyjg) - { + public AjaxResult add(@RequestBody TcZdlyjg tcZdlyjg) { return toAjax(tcZdlyjgService.insertTcZdlyjg(tcZdlyjg)); } /** * 修改重点领域监管 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdlyjg:edit')") - @Log(title = "重点领域监管", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改重点领域监管") @PutMapping - public AjaxResult edit(@RequestBody TcZdlyjg tcZdlyjg) - { + public AjaxResult edit(@RequestBody TcZdlyjg tcZdlyjg) { return toAjax(tcZdlyjgService.updateTcZdlyjg(tcZdlyjg)); } /** * 删除重点领域监管 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdlyjg:remove')") - @Log(title = "重点领域监管", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除重点领域监管") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcZdlyjgService.deleteTcZdlyjgByIds(ids)); } + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcZdlyjg.class); + List tcZdlyjgList = util.importExcel(file.getInputStream()); + tcZdlyjgService.importUser(tcZdlyjgList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdqymlController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdqymlController.java index cd412e42..eac8cb39 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdqymlController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZdqymlController.java @@ -1,46 +1,40 @@ 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.common.core.page.TableDataInfo; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZdqyml; import com.ruoyi.tcZz.service.ITcZdqymlService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 重点企业名录Controller - * + * * @author ruoyi * @date 2023-10-13 */ @RestController +@Api(tags = "重点企业名录") @RequestMapping("/tcZz/netManage/zdqyml") -public class TcZdqymlController extends BaseController -{ +public class TcZdqymlController extends BaseController { @Autowired private ITcZdqymlService tcZdqymlService; /** * 查询重点企业名录列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdqyml:list')") + @ApiOperation(value = "查询重点企业名录列表", response = TcZdqyml.class) @GetMapping("/list") - public TableDataInfo list(TcZdqyml tcZdqyml) - { + public TableDataInfo list(TcZdqyml tcZdqyml) { startPage(); List list = tcZdqymlService.selectTcZdqymlList(tcZdqyml); return getDataTable(list); @@ -49,11 +43,9 @@ public class TcZdqymlController extends BaseController /** * 导出重点企业名录列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdqyml:export')") - @Log(title = "重点企业名录", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出重点企业名录列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcZdqyml tcZdqyml) - { + public void export(HttpServletResponse response, TcZdqyml tcZdqyml) { List list = tcZdqymlService.selectTcZdqymlList(tcZdqyml); ExcelUtil util = new ExcelUtil(TcZdqyml.class); util.exportExcel(response, list, "重点企业名录数据"); @@ -62,43 +54,49 @@ public class TcZdqymlController extends BaseController /** * 获取重点企业名录详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdqyml:query')") + @ApiOperation(value = "获取重点企业名录详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcZdqymlService.selectTcZdqymlById(id)); } /** * 新增重点企业名录 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdqyml:add')") - @Log(title = "重点企业名录", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增重点企业名录") @PostMapping - public AjaxResult add(@RequestBody TcZdqyml tcZdqyml) - { + public AjaxResult add(@RequestBody TcZdqyml tcZdqyml) { return toAjax(tcZdqymlService.insertTcZdqyml(tcZdqyml)); } /** * 修改重点企业名录 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdqyml:edit')") - @Log(title = "重点企业名录", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改重点企业名录") @PutMapping - public AjaxResult edit(@RequestBody TcZdqyml tcZdqyml) - { + public AjaxResult edit(@RequestBody TcZdqyml tcZdqyml) { return toAjax(tcZdqymlService.updateTcZdqyml(tcZdqyml)); } /** * 删除重点企业名录 */ - @PreAuthorize("@ss.hasPermi('tcZz/netManage:zdqyml:remove')") - @Log(title = "重点企业名录", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除重点企业名录") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcZdqymlService.deleteTcZdqymlByIds(ids)); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcZdqyml.class); + List tcZdqymlList = util.importExcel(file.getInputStream()); + tcZdqymlService.importUser(tcZdqymlList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZfwzController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZfwzController.java index 8a752900..5cf6db42 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZfwzController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZfwzController.java @@ -1,46 +1,43 @@ 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.core.page.TableDataInfo; import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZfwz; import com.ruoyi.tcZz.service.ITcZfwzService; -import com.ruoyi.common.utils.poi.ExcelUtil; -import com.ruoyi.common.core.page.TableDataInfo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 政府网站Controller - * + * * @author ruoyi * @date 2023-10-13 */ @RestController +@Api(tags = "政府网站") @RequestMapping("/tcZz/networkSecurity/zfwz") -public class TcZfwzController extends BaseController -{ +public class TcZfwzController extends BaseController { @Autowired private ITcZfwzService tcZfwzService; /** * 查询政府网站列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zfwz:list')") + @ApiOperation(value = "查询政府网站列表", response = TcZfwz.class) @GetMapping("/list") - public TableDataInfo list(TcZfwz tcZfwz) - { + public TableDataInfo list(TcZfwz tcZfwz) { startPage(); List list = tcZfwzService.selectTcZfwzList(tcZfwz); return getDataTable(list); @@ -49,11 +46,9 @@ public class TcZfwzController extends BaseController /** * 导出政府网站列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zfwz:export')") - @Log(title = "政府网站", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出政府网站列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcZfwz tcZfwz) - { + public void export(HttpServletResponse response, TcZfwz tcZfwz) { List list = tcZfwzService.selectTcZfwzList(tcZfwz); ExcelUtil util = new ExcelUtil(TcZfwz.class); util.exportExcel(response, list, "政府网站数据"); @@ -62,43 +57,50 @@ public class TcZfwzController extends BaseController /** * 获取政府网站详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zfwz:query')") + @ApiOperation(value = "获取政府网站详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcZfwzService.selectTcZfwzById(id)); } /** * 新增政府网站 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zfwz:add')") - @Log(title = "政府网站", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增政府网站") @PostMapping - public AjaxResult add(@RequestBody TcZfwz tcZfwz) - { + public AjaxResult add(@RequestBody TcZfwz tcZfwz) { return toAjax(tcZfwzService.insertTcZfwz(tcZfwz)); } /** * 修改政府网站 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zfwz:edit')") - @Log(title = "政府网站", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改政府网站") @PutMapping - public AjaxResult edit(@RequestBody TcZfwz tcZfwz) - { + public AjaxResult edit(@RequestBody TcZfwz tcZfwz) { return toAjax(tcZfwzService.updateTcZfwz(tcZfwz)); } /** * 删除政府网站 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zfwz:remove')") - @Log(title = "政府网站", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除政府网站") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcZfwzService.deleteTcZfwzByIds(ids)); } + + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcZfwz.class); + List tcZfwzList = util.importExcel(file.getInputStream()); + tcZfwzService.importUser(tcZfwzList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZxyhController.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZxyhController.java index 2e761f23..cc08bc5f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZxyhController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZxyhController.java @@ -2,6 +2,10 @@ package com.ruoyi.tcZz.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.tcZz.domain.TcWljgtj; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -20,27 +24,27 @@ import com.ruoyi.tcZz.domain.TcZxyh; import com.ruoyi.tcZz.service.ITcZxyhService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; +import org.springframework.web.multipart.MultipartFile; /** * 最新隐患Controller - * + * * @author ruoyi * @date 2023-10-12 */ @RestController +@Api(tags = "最新隐患") @RequestMapping("/tcZz/networkSecurity/zxyh") -public class TcZxyhController extends BaseController -{ +public class TcZxyhController extends BaseController { @Autowired private ITcZxyhService tcZxyhService; /** * 查询最新隐患列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zxyh:list')") + @ApiOperation(value = "查询最新隐患列表", response = TcZxyh.class) @GetMapping("/list") - public TableDataInfo list(TcZxyh tcZxyh) - { + public TableDataInfo list(TcZxyh tcZxyh) { startPage(); List list = tcZxyhService.selectTcZxyhList(tcZxyh); return getDataTable(list); @@ -49,11 +53,9 @@ public class TcZxyhController extends BaseController /** * 导出最新隐患列表 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zxyh:export')") - @Log(title = "最新隐患", businessType = BusinessType.EXPORT) + @ApiOperation(value = "导出最新隐患列表") @PostMapping("/export") - public void export(HttpServletResponse response, TcZxyh tcZxyh) - { + public void export(HttpServletResponse response, TcZxyh tcZxyh) { List list = tcZxyhService.selectTcZxyhList(tcZxyh); ExcelUtil util = new ExcelUtil(TcZxyh.class); util.exportExcel(response, list, "最新隐患数据"); @@ -62,43 +64,49 @@ public class TcZxyhController extends BaseController /** * 获取最新隐患详细信息 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zxyh:query')") + @ApiOperation(value = "获取最新隐患详细信息") @GetMapping(value = "/{id}") - public AjaxResult getInfo(@PathVariable("id") Long id) - { + public AjaxResult getInfo(@PathVariable("id") Long id) { return success(tcZxyhService.selectTcZxyhById(id)); } /** * 新增最新隐患 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zxyh:add')") - @Log(title = "最新隐患", businessType = BusinessType.INSERT) + @ApiOperation(value = "新增最新隐患") @PostMapping - public AjaxResult add(@RequestBody TcZxyh tcZxyh) - { + public AjaxResult add(@RequestBody TcZxyh tcZxyh) { return toAjax(tcZxyhService.insertTcZxyh(tcZxyh)); } /** * 修改最新隐患 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zxyh:edit')") - @Log(title = "最新隐患", businessType = BusinessType.UPDATE) + @ApiOperation(value = "修改最新隐患") @PutMapping - public AjaxResult edit(@RequestBody TcZxyh tcZxyh) - { + public AjaxResult edit(@RequestBody TcZxyh tcZxyh) { return toAjax(tcZxyhService.updateTcZxyh(tcZxyh)); } /** * 删除最新隐患 */ - @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:zxyh:remove')") - @Log(title = "最新隐患", businessType = BusinessType.DELETE) - @DeleteMapping("/{ids}") - public AjaxResult remove(@PathVariable Long[] ids) - { + @ApiOperation(value = "删除最新隐患") + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(tcZxyhService.deleteTcZxyhByIds(ids)); } + + + /** + * 导入 + */ + @ApiOperation("通用导入excel信息") + @PostMapping("/common/importExcel") + public AjaxResult importExcel(MultipartFile file) throws Exception { + ExcelUtil util = new ExcelUtil(TcZxyh.class); + List tcZxyhList = util.importExcel(file.getInputStream()); + tcZxyhService.importUser(tcZxyhList); + return AjaxResult.success(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcBzhan.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcBzhan.java index fbafee10..8cb8e122 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcBzhan.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/domain/TcBzhan.java @@ -37,7 +37,7 @@ public class TcBzhan extends BaseEntity /** 账号ID */ @Excel(name = "账号ID") @ApiModelProperty(value = "账号ID") - private Long zhId; + private String zhId; /** 网址 */ @Excel(name = "网址") diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcWzService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcWzService.java index 255f1b16..46168f35 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcWzService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcWzService.java @@ -63,7 +63,7 @@ public interface ITcWzService /** - * 导入网络监测统计信息 + * 导入网站信息 * * @return 结果 */ diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqbgService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqbgService.java index 3ad5e6c9..46cb2b22 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqbgService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqbgService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcYqbg; /** @@ -58,4 +60,12 @@ public interface ITcYqbgService * @return 结果 */ public int deleteTcYqbgById(Long id); + + + /** + * 导入舆情报告信息 + * + * @return 结果 + */ + public String importUser(List tcYqbgList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqxxlnumService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqxxlnumService.java index 68930b49..33329892 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqxxlnumService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqxxlnumService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcYqxxlnum; /** @@ -58,4 +60,13 @@ public interface ITcYqxxlnumService * @return 结果 */ public int deleteTcYqxxlnumById(Long id); + + + + /** + * 导入舆情信息量统计信息 + * + * @return 结果 + */ + public String importUser(List tcYqxxlnumList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqyjService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqyjService.java index 2c4f9088..61fbf2cc 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqyjService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqyjService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcYqyj; /** @@ -58,4 +60,13 @@ public interface ITcYqyjService * @return 结果 */ public int deleteTcYqyjById(Long id); + + + + /** + * 导入舆情预警信息 + * + * @return 结果 + */ + public String importUser(List tcYqyjList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java index 30c2692f..750ac18f 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYqzsService.java @@ -1,19 +1,19 @@ package com.ruoyi.tcZz.service; -import java.util.List; import com.ruoyi.tcZz.domain.TcYqzs; +import java.util.List; + /** * 舆情走势图Service接口 - * + * * @author ruoyi * @date 2023-10-13 */ -public interface ITcYqzsService -{ +public interface ITcYqzsService { /** * 查询舆情走势图 - * + * * @param id 舆情走势图主键 * @return 舆情走势图 */ @@ -21,7 +21,7 @@ public interface ITcYqzsService /** * 查询舆情走势图列表 - * + * * @param tcYqzs 舆情走势图 * @return 舆情走势图集合 */ @@ -29,7 +29,7 @@ public interface ITcYqzsService /** * 新增舆情走势图 - * + * * @param tcYqzs 舆情走势图 * @return 结果 */ @@ -37,7 +37,7 @@ public interface ITcYqzsService /** * 修改舆情走势图 - * + * * @param tcYqzs 舆情走势图 * @return 结果 */ @@ -45,7 +45,7 @@ public interface ITcYqzsService /** * 批量删除舆情走势图 - * + * * @param ids 需要删除的舆情走势图主键集合 * @return 结果 */ @@ -53,9 +53,17 @@ public interface ITcYqzsService /** * 删除舆情走势图信息 - * + * * @param id 舆情走势图主键 * @return 结果 */ public int deleteTcYqzsById(Long id); + + + /** + * 导入舆情走势图信息 + * + * @return 结果 + */ + public String importUser(List tcYqzsList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYtlcService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYtlcService.java index cbfd0ef9..e19b4319 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYtlcService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcYtlcService.java @@ -1,19 +1,19 @@ package com.ruoyi.tcZz.service; -import java.util.List; import com.ruoyi.tcZz.domain.TcYtlc; +import java.util.List; + /** * 约谈流程Service接口 - * + * * @author ruoyi * @date 2023-10-13 */ -public interface ITcYtlcService -{ +public interface ITcYtlcService { /** * 查询约谈流程 - * + * * @param id 约谈流程主键 * @return 约谈流程 */ @@ -21,7 +21,7 @@ public interface ITcYtlcService /** * 查询约谈流程列表 - * + * * @param tcYtlc 约谈流程 * @return 约谈流程集合 */ @@ -29,7 +29,7 @@ public interface ITcYtlcService /** * 新增约谈流程 - * + * * @param tcYtlc 约谈流程 * @return 结果 */ @@ -37,7 +37,7 @@ public interface ITcYtlcService /** * 修改约谈流程 - * + * * @param tcYtlc 约谈流程 * @return 结果 */ @@ -45,7 +45,7 @@ public interface ITcYtlcService /** * 批量删除约谈流程 - * + * * @param ids 需要删除的约谈流程主键集合 * @return 结果 */ @@ -53,9 +53,17 @@ public interface ITcYtlcService /** * 删除约谈流程信息 - * + * * @param id 约谈流程主键 * @return 结果 */ public int deleteTcYtlcById(Long id); + + + /** + * 导入约谈流程信息 + * + * @return 结果 + */ + public String importUser(List tcYtlcList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZbxqService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZbxqService.java index a2436c65..f794182c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZbxqService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZbxqService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcYtlc; import com.ruoyi.tcZz.domain.TcZbxq; /** @@ -13,7 +15,7 @@ public interface ITcZbxqService { /** * 查询 转办量、转办详情 - * + * * @param id 转办量、转办详情主键 * @return 转办量、转办详情 */ @@ -21,7 +23,7 @@ public interface ITcZbxqService /** * 查询 转办量、转办详情列表 - * + * * @param tcZbxq 转办量、转办详情 * @return 转办量、转办详情集合 */ @@ -29,7 +31,7 @@ public interface ITcZbxqService /** * 新增 转办量、转办详情 - * + * * @param tcZbxq 转办量、转办详情 * @return 结果 */ @@ -37,7 +39,7 @@ public interface ITcZbxqService /** * 修改 转办量、转办详情 - * + * * @param tcZbxq 转办量、转办详情 * @return 结果 */ @@ -45,7 +47,7 @@ public interface ITcZbxqService /** * 批量删除 转办量、转办详情 - * + * * @param ids 需要删除的 转办量、转办详情主键集合 * @return 结果 */ @@ -53,9 +55,17 @@ public interface ITcZbxqService /** * 删除 转办量、转办详情信息 - * + * * @param id 转办量、转办详情主键 * @return 结果 */ public int deleteTcZbxqById(Long id); + + + /** + * 导入转办量、转办 + * + * @return 结果 + */ + public String importUser(List tcZbxqList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdgzxmService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdgzxmService.java index 4ba40bd7..9ab76b01 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdgzxmService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdgzxmService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZdgzxm; /** @@ -58,4 +60,13 @@ public interface ITcZdgzxmService * @return 结果 */ public int deleteTcZdgzxmById(Long id); + + + + /** + * 导入重点工作项目信息 + * + * @return 结果 + */ + public String importUser(List tcZdgzxmList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdlyjgService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdlyjgService.java index 62354c93..9be16698 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdlyjgService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdlyjgService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZdlyjg; /** @@ -58,4 +60,13 @@ public interface ITcZdlyjgService * @return 结果 */ public int deleteTcZdlyjgById(Long id); + + + + /** + * 导入重点领域监管信息 + * + * @return 结果 + */ + public String importUser(List tcZdlyjgList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdqymlService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdqymlService.java index be6f5a3a..2cbd9e72 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdqymlService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZdqymlService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZdqyml; /** @@ -58,4 +60,14 @@ public interface ITcZdqymlService * @return 结果 */ public int deleteTcZdqymlById(Long id); + + + + + /** + * 导入网络监测统计信息 + * + * @return 结果 + */ + public String importUser(List tcZdqymlList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZfwzService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZfwzService.java index d32b0537..27eb139b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZfwzService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZfwzService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZfwz; /** @@ -58,4 +60,13 @@ public interface ITcZfwzService * @return 结果 */ public int deleteTcZfwzById(Long id); + + + + /** + * 导入政府网站信息 + * + * @return 结果 + */ + public String importUser(List tcZfwzList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZxyhService.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZxyhService.java index 745aece7..1b72a899 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZxyhService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/ITcZxyhService.java @@ -1,6 +1,8 @@ package com.ruoyi.tcZz.service; import java.util.List; + +import com.ruoyi.tcZz.domain.TcWljgtj; import com.ruoyi.tcZz.domain.TcZxyh; /** @@ -58,4 +60,13 @@ public interface ITcZxyhService * @return 结果 */ public int deleteTcZxyhById(Long id); + + + + /** + * 导入最新隐患信息 + * + * @return 结果 + */ + public String importUser(List tcZxyhList); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqbgServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqbgServiceImpl.java index c580a370..26a9850d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqbgServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqbgServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcYqbgMapper; @@ -93,4 +94,17 @@ public class TcYqbgServiceImpl implements ITcYqbgService { return tcYqbgMapper.deleteTcYqbgById(id); } + + @Override + public String importUser(List tcYqbgList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcYqbgList.isEmpty()) { + for (TcYqbg tcYqbg : tcYqbgList) { + tcYqbgMapper.insertTcYqbg(tcYqbg); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqxxlnumServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqxxlnumServiceImpl.java index 830bd96f..8c16a9c5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqxxlnumServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqxxlnumServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcYqxxlnumMapper; @@ -93,4 +94,16 @@ public class TcYqxxlnumServiceImpl implements ITcYqxxlnumService { return tcYqxxlnumMapper.deleteTcYqxxlnumById(id); } + + @Override + public String importUser(List tcYqxxlnumList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcYqxxlnumList.isEmpty()) { + for (TcYqxxlnum tcYqxxlnum : tcYqxxlnumList) { + tcYqxxlnumMapper.insertTcYqxxlnum(tcYqxxlnum); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqyjServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqyjServiceImpl.java index 1a495e38..6516f1b8 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqyjServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqyjServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcYqyjMapper; @@ -93,4 +94,16 @@ public class TcYqyjServiceImpl implements ITcYqyjService { return tcYqyjMapper.deleteTcYqyjById(id); } + + @Override + public String importUser(List tcYqyjList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcYqyjList.isEmpty()) { + for (TcYqyj tcYqyj : tcYqyjList) { + tcYqyjMapper.insertTcYqyj(tcYqyj); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java index a0407002..8bf1159b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYqzsServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcYqzsMapper; @@ -93,4 +94,16 @@ public class TcYqzsServiceImpl implements ITcYqzsService { return tcYqzsMapper.deleteTcYqzsById(id); } + + @Override + public String importUser(List tcYqzsList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcYqzsList.isEmpty()) { + for (TcYqzs tcYqzs : tcYqzsList) { + tcYqzsMapper.insertTcYqzs(tcYqzs); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYtlcServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYtlcServiceImpl.java index 181f4998..17680a59 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYtlcServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcYtlcServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcYtlcMapper; @@ -93,4 +94,16 @@ public class TcYtlcServiceImpl implements ITcYtlcService { return tcYtlcMapper.deleteTcYtlcById(id); } + + @Override + public String importUser(List tcYtlcList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcYtlcList.isEmpty()) { + for (TcYtlc tcYtlc : tcYtlcList) { + tcYtlcMapper.insertTcYtlc(tcYtlc); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZbxqServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZbxqServiceImpl.java index d0fa17e9..0b373113 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZbxqServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZbxqServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcYtlc; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcZbxqMapper; @@ -93,4 +94,16 @@ public class TcZbxqServiceImpl implements ITcZbxqService { return tcZbxqMapper.deleteTcZbxqById(id); } + + @Override + public String importUser(List tcZbxqList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZbxqList.isEmpty()) { + for (TcZbxq tcZbxq : tcZbxqList) { + tcZbxqMapper.insertTcZbxq(tcZbxq); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdgzxmServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdgzxmServiceImpl.java index cc8a4a10..3e42fd2d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdgzxmServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdgzxmServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcZdgzxmMapper; @@ -93,4 +94,16 @@ public class TcZdgzxmServiceImpl implements ITcZdgzxmService { return tcZdgzxmMapper.deleteTcZdgzxmById(id); } + + @Override + public String importUser(List tcZdgzxmList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZdgzxmList.isEmpty()) { + for (TcZdgzxm tcZdgzxm : tcZdgzxmList) { + tcZdgzxmMapper.insertTcZdgzxm(tcZdgzxm); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdlyjgServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdlyjgServiceImpl.java index f4db1c99..face0498 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdlyjgServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdlyjgServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcZdlyjgMapper; @@ -93,4 +94,16 @@ public class TcZdlyjgServiceImpl implements ITcZdlyjgService { return tcZdlyjgMapper.deleteTcZdlyjgById(id); } + + @Override + public String importUser(List tcZdlyjgList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZdlyjgList.isEmpty()) { + for (TcZdlyjg tcZdlyjg : tcZdlyjgList) { + tcZdlyjgMapper.insertTcZdlyjg(tcZdlyjg); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdqymlServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdqymlServiceImpl.java index 3b97eda4..60c09787 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdqymlServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZdqymlServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcZdqymlMapper; @@ -93,4 +94,16 @@ public class TcZdqymlServiceImpl implements ITcZdqymlService { return tcZdqymlMapper.deleteTcZdqymlById(id); } + + @Override + public String importUser(List tcZdqymlList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZdqymlList.isEmpty()) { + for (TcZdqyml tcZdqyml : tcZdqymlList) { + tcZdqymlMapper.insertTcZdqyml(tcZdqyml); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZfwzServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZfwzServiceImpl.java index 8867932e..66fc2734 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZfwzServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZfwzServiceImpl.java @@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcZfwzMapper; @@ -93,4 +94,16 @@ public class TcZfwzServiceImpl implements ITcZfwzService { return tcZfwzMapper.deleteTcZfwzById(id); } + + @Override + public String importUser(List tcZfwzList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZfwzList.isEmpty()) { + for (TcZfwz tcZfwz : tcZfwzList) { + tcZfwzMapper.insertTcZfwz(tcZfwz); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZxyhServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZxyhServiceImpl.java index bc17b0ed..f8302216 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZxyhServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/tcZz/service/impl/TcZxyhServiceImpl.java @@ -1,7 +1,9 @@ package com.ruoyi.tcZz.service.impl; import java.util.List; + import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.tcZz.domain.TcWljgtj; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.tcZz.mapper.TcZxyhMapper; @@ -10,87 +12,93 @@ import com.ruoyi.tcZz.service.ITcZxyhService; /** * 最新隐患Service业务层处理 - * + * * @author ruoyi * @date 2023-10-12 */ @Service -public class TcZxyhServiceImpl implements ITcZxyhService -{ +public class TcZxyhServiceImpl implements ITcZxyhService { @Autowired private TcZxyhMapper tcZxyhMapper; /** * 查询最新隐患 - * + * * @param id 最新隐患主键 * @return 最新隐患 */ @Override - public TcZxyh selectTcZxyhById(Long id) - { + public TcZxyh selectTcZxyhById(Long id) { return tcZxyhMapper.selectTcZxyhById(id); } /** * 查询最新隐患列表 - * + * * @param tcZxyh 最新隐患 * @return 最新隐患 */ @Override - public List selectTcZxyhList(TcZxyh tcZxyh) - { + public List selectTcZxyhList(TcZxyh tcZxyh) { return tcZxyhMapper.selectTcZxyhList(tcZxyh); } /** * 新增最新隐患 - * + * * @param tcZxyh 最新隐患 * @return 结果 */ @Override - public int insertTcZxyh(TcZxyh tcZxyh) - { + public int insertTcZxyh(TcZxyh tcZxyh) { tcZxyh.setCreateTime(DateUtils.getNowDate()); return tcZxyhMapper.insertTcZxyh(tcZxyh); } /** * 修改最新隐患 - * + * * @param tcZxyh 最新隐患 * @return 结果 */ @Override - public int updateTcZxyh(TcZxyh tcZxyh) - { + public int updateTcZxyh(TcZxyh tcZxyh) { tcZxyh.setUpdateTime(DateUtils.getNowDate()); return tcZxyhMapper.updateTcZxyh(tcZxyh); } /** * 批量删除最新隐患 - * + * * @param ids 需要删除的最新隐患主键 * @return 结果 */ @Override - public int deleteTcZxyhByIds(Long[] ids) - { + public int deleteTcZxyhByIds(Long[] ids) { return tcZxyhMapper.deleteTcZxyhByIds(ids); } /** * 删除最新隐患信息 - * + * * @param id 最新隐患主键 * @return 结果 */ @Override - public int deleteTcZxyhById(Long id) - { + public int deleteTcZxyhById(Long id) { return tcZxyhMapper.deleteTcZxyhById(id); } + + @Override + public String importUser(List tcZxyhList) { + StringBuilder successMsg = new StringBuilder(); + if (!tcZxyhList.isEmpty()) { + for (TcZxyh tcZxyh : tcZxyhList) { + tcZxyhMapper.insertTcZxyh(tcZxyh); + } + successMsg.append("导入成功"); + } + return successMsg.toString(); + + } } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index bc5b4016..f07a7204 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -117,7 +117,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/tcZz/networkSecurity/xtjc/ListNoToken", "/tcZz/netWorkYq/yqxxltj/ListNoToken").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**", "/tcZz/networkSecurity/cybersecurity/common/importExcel","/tcZz/networkEcology/**/**","/tcZz/networkSecurity/**/**" - ,"/tcZz/netManage/**/**" + ,"/tcZz/netManage/**/**","/tcZz/netWorkYq/**/**" ).permitAll() // 除上面外的所有请求全部需要鉴权认证 .anyRequest().authenticated()