导入接口新增

duhanyu
dongdingding 1 year ago
parent c9e0e5d451
commit 8a43df4a78

@ -1,25 +1,22 @@
package com.ruoyi.tcZz.controller; 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.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tcZz.domain.TcJgdw; import com.ruoyi.tcZz.domain.TcJgdw;
import com.ruoyi.tcZz.service.ITcJgdwService; import com.ruoyi.tcZz.service.ITcJgdwService;
import com.ruoyi.common.utils.poi.ExcelUtil; import io.swagger.annotations.Api;
import com.ruoyi.common.core.page.TableDataInfo; 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
@ -28,9 +25,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-12 * @date 2023-10-12
*/ */
@RestController @RestController
@Api(tags = "监管单位")
@RequestMapping("/tcZz/networkSecurity/jgdw") @RequestMapping("/tcZz/networkSecurity/jgdw")
public class TcJgdwController extends BaseController public class TcJgdwController extends BaseController {
{
@Autowired @Autowired
private ITcJgdwService tcJgdwService; private ITcJgdwService tcJgdwService;
@ -39,8 +36,7 @@ public class TcJgdwController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:list')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcJgdw tcJgdw) public TableDataInfo list(TcJgdw tcJgdw) {
{
startPage(); startPage();
List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw); List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw);
return getDataTable(list); return getDataTable(list);
@ -52,8 +48,7 @@ public class TcJgdwController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:export')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:export')")
@Log(title = "监管单位", businessType = BusinessType.EXPORT) @Log(title = "监管单位", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcJgdw tcJgdw) public void export(HttpServletResponse response, TcJgdw tcJgdw) {
{
List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw); List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw);
ExcelUtil<TcJgdw> util = new ExcelUtil<TcJgdw>(TcJgdw.class); ExcelUtil<TcJgdw> util = new ExcelUtil<TcJgdw>(TcJgdw.class);
util.exportExcel(response, list, "监管单位数据"); util.exportExcel(response, list, "监管单位数据");
@ -64,8 +59,7 @@ public class TcJgdwController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:query')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcJgdwService.selectTcJgdwById(id)); return success(tcJgdwService.selectTcJgdwById(id));
} }
@ -75,8 +69,7 @@ public class TcJgdwController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:add')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:add')")
@Log(title = "监管单位", businessType = BusinessType.INSERT) @Log(title = "监管单位", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcJgdw tcJgdw) public AjaxResult add(@RequestBody TcJgdw tcJgdw) {
{
return toAjax(tcJgdwService.insertTcJgdw(tcJgdw)); return toAjax(tcJgdwService.insertTcJgdw(tcJgdw));
} }
@ -86,8 +79,7 @@ public class TcJgdwController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:edit')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:edit')")
@Log(title = "监管单位", businessType = BusinessType.UPDATE) @Log(title = "监管单位", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcJgdw tcJgdw) public AjaxResult edit(@RequestBody TcJgdw tcJgdw) {
{
return toAjax(tcJgdwService.updateTcJgdw(tcJgdw)); return toAjax(tcJgdwService.updateTcJgdw(tcJgdw));
} }
@ -97,8 +89,32 @@ public class TcJgdwController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:remove')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:jgdw:remove')")
@Log(title = "监管单位", businessType = BusinessType.DELETE) @Log(title = "监管单位", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcJgdwService.deleteTcJgdwByIds(ids)); return toAjax(tcJgdwService.deleteTcJgdwByIds(ids));
} }
/**
*
*/
@ApiOperation(value = "查询监管单位列表", response = TcJgdw.class)
@GetMapping("/ListNoToken")
public TableDataInfo ListNoToken(TcJgdw tcJgdw) {
startPage();
List<TcJgdw> list = tcJgdwService.selectTcJgdwList(tcJgdw);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcJgdw> util = new ExcelUtil<TcJgdw>(TcJgdw.class);
List<TcJgdw> tcJgdwList = util.importExcel(file.getInputStream());
tcJgdwService.importUser(tcJgdwList);
return AjaxResult.success();
}
} }

@ -2,6 +2,10 @@ package com.ruoyi.tcZz.controller;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.tcZz.domain.TcCy;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -20,6 +24,7 @@ import com.ruoyi.tcZz.domain.TcXtjc;
import com.ruoyi.tcZz.service.ITcXtjcService; import com.ruoyi.tcZz.service.ITcXtjcService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/** /**
* Controller * Controller
@ -27,10 +32,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi * @author ruoyi
* @date 2023-10-12 * @date 2023-10-12
*/ */
@Api(tags = "系统监测")
@RestController @RestController
@RequestMapping("/tcZz/networkSecurity/xtjc") @RequestMapping("/tcZz/networkSecurity/xtjc")
public class TcXtjcController extends BaseController public class TcXtjcController extends BaseController {
{
@Autowired @Autowired
private ITcXtjcService tcXtjcService; private ITcXtjcService tcXtjcService;
@ -39,8 +44,7 @@ public class TcXtjcController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:list')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcXtjc tcXtjc) public TableDataInfo list(TcXtjc tcXtjc) {
{
startPage(); startPage();
List<TcXtjc> list = tcXtjcService.selectTcXtjcList(tcXtjc); List<TcXtjc> list = tcXtjcService.selectTcXtjcList(tcXtjc);
return getDataTable(list); return getDataTable(list);
@ -52,8 +56,7 @@ public class TcXtjcController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:export')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:export')")
@Log(title = "系统监测", businessType = BusinessType.EXPORT) @Log(title = "系统监测", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcXtjc tcXtjc) public void export(HttpServletResponse response, TcXtjc tcXtjc) {
{
List<TcXtjc> list = tcXtjcService.selectTcXtjcList(tcXtjc); List<TcXtjc> list = tcXtjcService.selectTcXtjcList(tcXtjc);
ExcelUtil<TcXtjc> util = new ExcelUtil<TcXtjc>(TcXtjc.class); ExcelUtil<TcXtjc> util = new ExcelUtil<TcXtjc>(TcXtjc.class);
util.exportExcel(response, list, "系统监测数据"); util.exportExcel(response, list, "系统监测数据");
@ -64,8 +67,7 @@ public class TcXtjcController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:query')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcXtjcService.selectTcXtjcById(id)); return success(tcXtjcService.selectTcXtjcById(id));
} }
@ -75,8 +77,7 @@ public class TcXtjcController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:add')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:add')")
@Log(title = "系统监测", businessType = BusinessType.INSERT) @Log(title = "系统监测", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcXtjc tcXtjc) public AjaxResult add(@RequestBody TcXtjc tcXtjc) {
{
return toAjax(tcXtjcService.insertTcXtjc(tcXtjc)); return toAjax(tcXtjcService.insertTcXtjc(tcXtjc));
} }
@ -86,8 +87,7 @@ public class TcXtjcController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:edit')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:edit')")
@Log(title = "系统监测", businessType = BusinessType.UPDATE) @Log(title = "系统监测", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcXtjc tcXtjc) public AjaxResult edit(@RequestBody TcXtjc tcXtjc) {
{
return toAjax(tcXtjcService.updateTcXtjc(tcXtjc)); return toAjax(tcXtjcService.updateTcXtjc(tcXtjc));
} }
@ -97,8 +97,32 @@ public class TcXtjcController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:remove')") @PreAuthorize("@ss.hasPermi('tcZz/networkSecurity:xtjc:remove')")
@Log(title = "系统监测", businessType = BusinessType.DELETE) @Log(title = "系统监测", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcXtjcService.deleteTcXtjcByIds(ids)); return toAjax(tcXtjcService.deleteTcXtjcByIds(ids));
} }
/**
*
*/
@ApiOperation(value = "查询系统监测列表", response = TcXtjc.class)
@GetMapping("/ListNoToken")
public TableDataInfo ListNoToken(TcXtjc tcXtjc) {
startPage();
List<TcXtjc> list = tcXtjcService.selectTcXtjcList(tcXtjc);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcXtjc> util = new ExcelUtil<TcXtjc>(TcXtjc.class);
List<TcXtjc> tcXtjcList = util.importExcel(file.getInputStream());
tcXtjcService.importUser(tcXtjcList);
return AjaxResult.success();
}
} }

@ -1,25 +1,22 @@
package com.ruoyi.tcZz.controller; 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.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.tcZz.domain.TcYqxxltj; import com.ruoyi.tcZz.domain.TcYqxxltj;
import com.ruoyi.tcZz.service.ITcYqxxltjService; import com.ruoyi.tcZz.service.ITcYqxxltjService;
import com.ruoyi.common.utils.poi.ExcelUtil; import io.swagger.annotations.Api;
import com.ruoyi.common.core.page.TableDataInfo; 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
@ -28,9 +25,9 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-12 * @date 2023-10-12
*/ */
@RestController @RestController
@Api(tags = "舆情信息量统计明細")
@RequestMapping("/tcZz/netWorkYq/yqxxltj") @RequestMapping("/tcZz/netWorkYq/yqxxltj")
public class TcYqxxltjController extends BaseController public class TcYqxxltjController extends BaseController {
{
@Autowired @Autowired
private ITcYqxxltjService tcYqxxltjService; private ITcYqxxltjService tcYqxxltjService;
@ -39,8 +36,7 @@ public class TcYqxxltjController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:list')") @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TcYqxxltj tcYqxxltj) public TableDataInfo list(TcYqxxltj tcYqxxltj) {
{
startPage(); startPage();
List<TcYqxxltj> list = tcYqxxltjService.selectTcYqxxltjList(tcYqxxltj); List<TcYqxxltj> list = tcYqxxltjService.selectTcYqxxltjList(tcYqxxltj);
return getDataTable(list); return getDataTable(list);
@ -52,8 +48,7 @@ public class TcYqxxltjController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:export')") @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:export')")
@Log(title = "舆情信息量统计明細", businessType = BusinessType.EXPORT) @Log(title = "舆情信息量统计明細", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TcYqxxltj tcYqxxltj) public void export(HttpServletResponse response, TcYqxxltj tcYqxxltj) {
{
List<TcYqxxltj> list = tcYqxxltjService.selectTcYqxxltjList(tcYqxxltj); List<TcYqxxltj> list = tcYqxxltjService.selectTcYqxxltjList(tcYqxxltj);
ExcelUtil<TcYqxxltj> util = new ExcelUtil<TcYqxxltj>(TcYqxxltj.class); ExcelUtil<TcYqxxltj> util = new ExcelUtil<TcYqxxltj>(TcYqxxltj.class);
util.exportExcel(response, list, "舆情信息量统计明細数据"); util.exportExcel(response, list, "舆情信息量统计明細数据");
@ -64,8 +59,7 @@ public class TcYqxxltjController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:query')") @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public AjaxResult getInfo(@PathVariable("id") Long id) {
{
return success(tcYqxxltjService.selectTcYqxxltjById(id)); return success(tcYqxxltjService.selectTcYqxxltjById(id));
} }
@ -75,8 +69,7 @@ public class TcYqxxltjController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:add')") @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:add')")
@Log(title = "舆情信息量统计明細", businessType = BusinessType.INSERT) @Log(title = "舆情信息量统计明細", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TcYqxxltj tcYqxxltj) public AjaxResult add(@RequestBody TcYqxxltj tcYqxxltj) {
{
return toAjax(tcYqxxltjService.insertTcYqxxltj(tcYqxxltj)); return toAjax(tcYqxxltjService.insertTcYqxxltj(tcYqxxltj));
} }
@ -86,8 +79,7 @@ public class TcYqxxltjController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:edit')") @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:edit')")
@Log(title = "舆情信息量统计明細", businessType = BusinessType.UPDATE) @Log(title = "舆情信息量统计明細", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TcYqxxltj tcYqxxltj) public AjaxResult edit(@RequestBody TcYqxxltj tcYqxxltj) {
{
return toAjax(tcYqxxltjService.updateTcYqxxltj(tcYqxxltj)); return toAjax(tcYqxxltjService.updateTcYqxxltj(tcYqxxltj));
} }
@ -97,8 +89,31 @@ public class TcYqxxltjController extends BaseController
@PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:remove')") @PreAuthorize("@ss.hasPermi('tcZz/netWorkYq:yqxxltj:remove')")
@Log(title = "舆情信息量统计明細", businessType = BusinessType.DELETE) @Log(title = "舆情信息量统计明細", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public AjaxResult remove(@PathVariable Long[] ids) {
{
return toAjax(tcYqxxltjService.deleteTcYqxxltjByIds(ids)); return toAjax(tcYqxxltjService.deleteTcYqxxltjByIds(ids));
} }
/**
*
*/
@ApiOperation(value = "查询舆情信息量统计明細列表", response = TcYqxxltj.class)
@GetMapping("/ListNoToken")
public TableDataInfo ListNoToken(TcYqxxltj tcYqxxltj) {
startPage();
List<TcYqxxltj> list = tcYqxxltjService.selectTcYqxxltjList(tcYqxxltj);
return getDataTable(list);
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcYqxxltj> util = new ExcelUtil<TcYqxxltj>(TcYqxxltj.class);
List<TcYqxxltj> YqxxltjList = util.importExcel(file.getInputStream());
tcYqxxltjService.importUser(YqxxltjList);
return AjaxResult.success();
}
} }

@ -61,7 +61,7 @@ public interface ITcCyService
public int deleteTcCyById(Long id); public int deleteTcCyById(Long id);
/** /**
* *
* *
* @return * @return
*/ */

@ -1,7 +1,9 @@
package com.ruoyi.tcZz.service; package com.ruoyi.tcZz.service;
import java.util.List; import java.util.List;
import com.ruoyi.tcZz.domain.TcJgdw; import com.ruoyi.tcZz.domain.TcJgdw;
import com.ruoyi.tcZz.domain.TcXtjc;
/** /**
* Service * Service
@ -9,8 +11,7 @@ import com.ruoyi.tcZz.domain.TcJgdw;
* @author ruoyi * @author ruoyi
* @date 2023-10-12 * @date 2023-10-12
*/ */
public interface ITcJgdwService public interface ITcJgdwService {
{
/** /**
* *
* *
@ -58,4 +59,12 @@ public interface ITcJgdwService
* @return * @return
*/ */
public int deleteTcJgdwById(Long id); public int deleteTcJgdwById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcJgdw> tcJgdwList);
} }

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service; package com.ruoyi.tcZz.service;
import java.util.List; import java.util.List;
import com.ruoyi.tcZz.domain.TcCy;
import com.ruoyi.tcZz.domain.TcXtjc; import com.ruoyi.tcZz.domain.TcXtjc;
/** /**
@ -58,4 +60,13 @@ public interface ITcXtjcService
* @return * @return
*/ */
public int deleteTcXtjcById(Long id); public int deleteTcXtjcById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcXtjc> tcXtjcList);
} }

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service; package com.ruoyi.tcZz.service;
import java.util.List; import java.util.List;
import com.ruoyi.tcZz.domain.TcJgdw;
import com.ruoyi.tcZz.domain.TcYqxxltj; import com.ruoyi.tcZz.domain.TcYqxxltj;
/** /**
@ -58,4 +60,13 @@ public interface ITcYqxxltjService
* @return * @return
*/ */
public int deleteTcYqxxltjById(Long id); public int deleteTcYqxxltjById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcYqxxltj> tcJgdwList);
} }

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.tcZz.domain.TcXtjc;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcJgdwMapper; import com.ruoyi.tcZz.mapper.TcJgdwMapper;
@ -93,4 +94,17 @@ public class TcJgdwServiceImpl implements ITcJgdwService
{ {
return tcJgdwMapper.deleteTcJgdwById(id); return tcJgdwMapper.deleteTcJgdwById(id);
} }
@Override
public String importUser(List<TcJgdw> tcJgdwList) {
StringBuilder successMsg = new StringBuilder();
if (!tcJgdwList.isEmpty()) {
for (TcJgdw tcJgdw : tcJgdwList) {
tcJgdwMapper.insertTcJgdw(tcJgdw);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
} }

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.tcZz.domain.TcCy;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcXtjcMapper; import com.ruoyi.tcZz.mapper.TcXtjcMapper;
@ -93,4 +94,18 @@ public class TcXtjcServiceImpl implements ITcXtjcService
{ {
return tcXtjcMapper.deleteTcXtjcById(id); return tcXtjcMapper.deleteTcXtjcById(id);
} }
@Override
public String importUser(List<TcXtjc> tcXtjcList) {
StringBuilder successMsg = new StringBuilder();
if (!tcXtjcList.isEmpty()) {
for (TcXtjc tcXtjc : tcXtjcList) {
tcXtjcMapper.insertTcXtjc(tcXtjc);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
} }

@ -2,6 +2,7 @@ package com.ruoyi.tcZz.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.tcZz.domain.TcXtjc;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.tcZz.mapper.TcYqxxltjMapper; import com.ruoyi.tcZz.mapper.TcYqxxltjMapper;
@ -93,4 +94,18 @@ public class TcYqxxltjServiceImpl implements ITcYqxxltjService
{ {
return tcYqxxltjMapper.deleteTcYqxxltjById(id); return tcYqxxltjMapper.deleteTcYqxxltjById(id);
} }
@Override
public String importUser(List<TcYqxxltj> tcJgdwList) {
StringBuilder successMsg = new StringBuilder();
if (!tcJgdwList.isEmpty()) {
for (TcYqxxltj tcYqxxltj : tcJgdwList) {
tcYqxxltjMapper.insertTcYqxxltj(tcYqxxltj);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
} }

@ -75,9 +75,9 @@ public class SwaggerConfig {
// 用ApiInfoBuilder进行定制 // 用ApiInfoBuilder进行定制
return new ApiInfoBuilder() return new ApiInfoBuilder()
// 设置标题 // 设置标题
.title("苏州应急3期系统_接口文档") .title("太仓综治")
// 描述 // 描述
.description("描述:用于苏州应急3期系统") .description("描述:用于太仓综治系统")
// 作者信息 // 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null)) .contact(new Contact(ruoyiConfig.getName(), null, null))
// 版本 // 版本

@ -114,7 +114,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers("/login", "/register", "/captchaImage").permitAll() .antMatchers("/login", "/register", "/captchaImage").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/tcZz/cy/ListNoToken","/tcZz/yqzs/ListNoToken","/tcZz/networkSecurity/cybersecurity/ListNoToken","/tcZz/networkSecurity/cybersecurity/common/importExcel","/tcZz/yqzs/common/importExcel","/tcZz/cy/common/importExcel").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**","/tcZz/cy/**n","/tcZz/yqzs/**",
"/tcZz/networkSecurity/cybersecurity/**","/tcZz/networkSecurity/xtjc/**",
"/tcZz/networkSecurity/jgdw/**","/tcZz/netWorkYq/yqxxltj/**","/tcZz/netWorkYq/yqxxltj/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()

Loading…
Cancel
Save