导入修改

duhanyu
dongdingding 1 year ago
parent c15359f70f
commit afa260e04d

@ -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.TcWlmqfzr;
import com.ruoyi.tcZz.service.ITcWlmqfzrService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -27,20 +32,19 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi
* @date 2023-10-13
*/
@Api("网络民情负责人")
@RestController
@RequestMapping("/tcZz/networkEcology/wlmqfzr")
public class TcWlmqfzrController extends BaseController
{
public class TcWlmqfzrController extends BaseController {
@Autowired
private ITcWlmqfzrService tcWlmqfzrService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlmqfzr:list')")
@ApiOperation(value = "查询网络民情负责人列表", response = TcWlmqfzr.class)
@GetMapping("/list")
public TableDataInfo list(TcWlmqfzr tcWlmqfzr)
{
public TableDataInfo list(TcWlmqfzr tcWlmqfzr) {
startPage();
List<TcWlmqfzr> list = tcWlmqfzrService.selectTcWlmqfzrList(tcWlmqfzr);
return getDataTable(list);
@ -49,11 +53,9 @@ public class TcWlmqfzrController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlmqfzr:export')")
@Log(title = "网络民情负责人", businessType = BusinessType.EXPORT)
@ApiOperation(value = "导出网络民情负责人列表")
@PostMapping("/export")
public void export(HttpServletResponse response, TcWlmqfzr tcWlmqfzr)
{
public void export(HttpServletResponse response, TcWlmqfzr tcWlmqfzr) {
List<TcWlmqfzr> list = tcWlmqfzrService.selectTcWlmqfzrList(tcWlmqfzr);
ExcelUtil<TcWlmqfzr> util = new ExcelUtil<TcWlmqfzr>(TcWlmqfzr.class);
util.exportExcel(response, list, "网络民情负责人数据");
@ -62,43 +64,49 @@ public class TcWlmqfzrController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlmqfzr:query')")
@ApiOperation(value = "获取网络民情负责人详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWlmqfzrService.selectTcWlmqfzrById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlmqfzr:add')")
@Log(title = "网络民情负责人", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增网络民情负责人")
@PostMapping
public AjaxResult add(@RequestBody TcWlmqfzr tcWlmqfzr)
{
public AjaxResult add(@RequestBody TcWlmqfzr tcWlmqfzr) {
return toAjax(tcWlmqfzrService.insertTcWlmqfzr(tcWlmqfzr));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlmqfzr:edit')")
@Log(title = "网络民情负责人", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改网络民情负责人")
@PutMapping
public AjaxResult edit(@RequestBody TcWlmqfzr tcWlmqfzr)
{
public AjaxResult edit(@RequestBody TcWlmqfzr tcWlmqfzr) {
return toAjax(tcWlmqfzrService.updateTcWlmqfzr(tcWlmqfzr));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlmqfzr: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(tcWlmqfzrService.deleteTcWlmqfzrByIds(ids));
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWlmqfzr> util = new ExcelUtil<TcWlmqfzr>(TcWlmqfzr.class);
List<TcWlmqfzr> tcWlmqfzrList = util.importExcel(file.getInputStream());
tcWlmqfzrService.importUser(tcWlmqfzrList);
return AjaxResult.success();
}
}

@ -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.TcWlwmzyz;
import com.ruoyi.tcZz.service.ITcWlwmzyzService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -27,20 +32,19 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author ruoyi
* @date 2023-10-13
*/
@Api(tags = "网络文明志愿者")
@RestController
@RequestMapping("/tcZz/networkEcology/wlwmzyz")
public class TcWlwmzyzController extends BaseController
{
public class TcWlwmzyzController extends BaseController {
@Autowired
private ITcWlwmzyzService tcWlwmzyzService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlwmzyz:list')")
@ApiOperation(value = "查询网络文明志愿者列表", response = TcWlwmzyz.class)
@GetMapping("/list")
public TableDataInfo list(TcWlwmzyz tcWlwmzyz)
{
public TableDataInfo list(TcWlwmzyz tcWlwmzyz) {
startPage();
List<TcWlwmzyz> list = tcWlwmzyzService.selectTcWlwmzyzList(tcWlwmzyz);
return getDataTable(list);
@ -49,11 +53,9 @@ public class TcWlwmzyzController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlwmzyz:export')")
@Log(title = "网络文明志愿者", businessType = BusinessType.EXPORT)
@ApiOperation(value = "导出网络文明志愿者列表")
@PostMapping("/export")
public void export(HttpServletResponse response, TcWlwmzyz tcWlwmzyz)
{
public void export(HttpServletResponse response, TcWlwmzyz tcWlwmzyz) {
List<TcWlwmzyz> list = tcWlwmzyzService.selectTcWlwmzyzList(tcWlwmzyz);
ExcelUtil<TcWlwmzyz> util = new ExcelUtil<TcWlwmzyz>(TcWlwmzyz.class);
util.exportExcel(response, list, "网络文明志愿者数据");
@ -62,43 +64,49 @@ public class TcWlwmzyzController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlwmzyz:query')")
@ApiOperation(value = "获取网络文明志愿者详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWlwmzyzService.selectTcWlwmzyzById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlwmzyz:add')")
@Log(title = "网络文明志愿者", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增网络文明志愿者")
@PostMapping
public AjaxResult add(@RequestBody TcWlwmzyz tcWlwmzyz)
{
public AjaxResult add(@RequestBody TcWlwmzyz tcWlwmzyz) {
return toAjax(tcWlwmzyzService.insertTcWlwmzyz(tcWlwmzyz));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlwmzyz:edit')")
@Log(title = "网络文明志愿者", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改网络文明志愿者")
@PutMapping
public AjaxResult edit(@RequestBody TcWlwmzyz tcWlwmzyz)
{
public AjaxResult edit(@RequestBody TcWlwmzyz tcWlwmzyz) {
return toAjax(tcWlwmzyzService.updateTcWlwmzyz(tcWlwmzyz));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wlwmzyz: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(tcWlwmzyzService.deleteTcWlwmzyzByIds(ids));
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWlwmzyz> util = new ExcelUtil<TcWlwmzyz>(TcWlwmzyz.class);
List<TcWlwmzyz> tcWlwmzyzList = util.importExcel(file.getInputStream());
tcWlwmzyzService.importUser(tcWlwmzyzList);
return AjaxResult.success();
}
}

@ -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.TcWpwzlyqk;
import com.ruoyi.tcZz.service.ITcWpwzlyqkService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -28,19 +33,18 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-13
*/
@RestController
@Api(tags = "网评文章录用情况")
@RequestMapping("/tcZz/networkEcology/wpwzlyqk")
public class TcWpwzlyqkController extends BaseController
{
public class TcWpwzlyqkController extends BaseController {
@Autowired
private ITcWpwzlyqkService tcWpwzlyqkService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpwzlyqk:list')")
@ApiOperation(value = "查询网评文章录用情况列表", response = TcWpwzlyqk.class)
@GetMapping("/list")
public TableDataInfo list(TcWpwzlyqk tcWpwzlyqk)
{
public TableDataInfo list(TcWpwzlyqk tcWpwzlyqk) {
startPage();
List<TcWpwzlyqk> list = tcWpwzlyqkService.selectTcWpwzlyqkList(tcWpwzlyqk);
return getDataTable(list);
@ -49,11 +53,9 @@ public class TcWpwzlyqkController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpwzlyqk:export')")
@Log(title = "网评文章录用情况", businessType = BusinessType.EXPORT)
@ApiOperation(value = "导出网评文章录用情况列表")
@PostMapping("/export")
public void export(HttpServletResponse response, TcWpwzlyqk tcWpwzlyqk)
{
public void export(HttpServletResponse response, TcWpwzlyqk tcWpwzlyqk) {
List<TcWpwzlyqk> list = tcWpwzlyqkService.selectTcWpwzlyqkList(tcWpwzlyqk);
ExcelUtil<TcWpwzlyqk> util = new ExcelUtil<TcWpwzlyqk>(TcWpwzlyqk.class);
util.exportExcel(response, list, "网评文章录用情况数据");
@ -62,43 +64,49 @@ public class TcWpwzlyqkController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpwzlyqk:query')")
@ApiOperation(value = "获取网评文章录用情况详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWpwzlyqkService.selectTcWpwzlyqkById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpwzlyqk:add')")
@Log(title = "网评文章录用情况", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增网评文章录用情况")
@PostMapping
public AjaxResult add(@RequestBody TcWpwzlyqk tcWpwzlyqk)
{
public AjaxResult add(@RequestBody TcWpwzlyqk tcWpwzlyqk) {
return toAjax(tcWpwzlyqkService.insertTcWpwzlyqk(tcWpwzlyqk));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpwzlyqk:edit')")
@Log(title = "网评文章录用情况", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改网评文章录用情况")
@PutMapping
public AjaxResult edit(@RequestBody TcWpwzlyqk tcWpwzlyqk)
{
public AjaxResult edit(@RequestBody TcWpwzlyqk tcWpwzlyqk) {
return toAjax(tcWpwzlyqkService.updateTcWpwzlyqk(tcWpwzlyqk));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpwzlyqk: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(tcWpwzlyqkService.deleteTcWpwzlyqkByIds(ids));
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWpwzlyqk> util = new ExcelUtil<TcWpwzlyqk>(TcWpwzlyqk.class);
List<TcWpwzlyqk> tcWpwzlyqkList = util.importExcel(file.getInputStream());
tcWpwzlyqkService.importUser(tcWpwzlyqkList);
return AjaxResult.success();
}
}

@ -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.TcWpy;
import com.ruoyi.tcZz.service.ITcWpyService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -28,19 +33,18 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-13
*/
@RestController
@Api(tags = "网评员")
@RequestMapping("/tcZz/networkEcology/wpy")
public class TcWpyController extends BaseController
{
public class TcWpyController extends BaseController {
@Autowired
private ITcWpyService tcWpyService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpy:list')")
@ApiOperation(value = "查询网评员列表", response = TcWpy.class)
@GetMapping("/list")
public TableDataInfo list(TcWpy tcWpy)
{
public TableDataInfo list(TcWpy tcWpy) {
startPage();
List<TcWpy> list = tcWpyService.selectTcWpyList(tcWpy);
return getDataTable(list);
@ -49,11 +53,9 @@ public class TcWpyController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpy:export')")
@Log(title = "网评员", businessType = BusinessType.EXPORT)
@ApiOperation(value = "导出网评员列表")
@PostMapping("/export")
public void export(HttpServletResponse response, TcWpy tcWpy)
{
public void export(HttpServletResponse response, TcWpy tcWpy) {
List<TcWpy> list = tcWpyService.selectTcWpyList(tcWpy);
ExcelUtil<TcWpy> util = new ExcelUtil<TcWpy>(TcWpy.class);
util.exportExcel(response, list, "网评员数据");
@ -62,43 +64,50 @@ public class TcWpyController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpy:query')")
@ApiOperation(value = "获取网评员详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWpyService.selectTcWpyById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpy:add')")
@Log(title = "网评员", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增网评员")
@PostMapping
public AjaxResult add(@RequestBody TcWpy tcWpy)
{
public AjaxResult add(@RequestBody TcWpy tcWpy) {
return toAjax(tcWpyService.insertTcWpy(tcWpy));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpy:edit')")
@Log(title = "网评员", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改网评员")
@PutMapping
public AjaxResult edit(@RequestBody TcWpy tcWpy)
{
public AjaxResult edit(@RequestBody TcWpy tcWpy) {
return toAjax(tcWpyService.updateTcWpy(tcWpy));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpy: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(tcWpyService.deleteTcWpyByIds(ids));
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWpy> util = new ExcelUtil<TcWpy>(TcWpy.class);
List<TcWpy> tcWpyList = util.importExcel(file.getInputStream());
tcWpyService.importUser(tcWpyList);
return AjaxResult.success();
}
}

@ -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.TcWpyrwwcl;
import com.ruoyi.tcZz.service.ITcWpyrwwclService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* Controller
@ -28,19 +33,18 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-13
*/
@RestController
@Api("网评员任务完成率")
@RequestMapping("/tcZz/networkEcology/wpyrwwcl")
public class TcWpyrwwclController extends BaseController
{
public class TcWpyrwwclController extends BaseController {
@Autowired
private ITcWpyrwwclService tcWpyrwwclService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpyrwwcl:list')")
@ApiOperation(value = "查询网评员任务完成率(网评系统)列表", response = TcWpyrwwcl.class)
@GetMapping("/list")
public TableDataInfo list(TcWpyrwwcl tcWpyrwwcl)
{
public TableDataInfo list(TcWpyrwwcl tcWpyrwwcl) {
startPage();
List<TcWpyrwwcl> list = tcWpyrwwclService.selectTcWpyrwwclList(tcWpyrwwcl);
return getDataTable(list);
@ -49,11 +53,9 @@ public class TcWpyrwwclController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpyrwwcl:export')")
@Log(title = "网评员任务完成率(网评系统)", businessType = BusinessType.EXPORT)
@ApiOperation(value = "导出网评员任务完成率(网评系统)列表")
@PostMapping("/export")
public void export(HttpServletResponse response, TcWpyrwwcl tcWpyrwwcl)
{
public void export(HttpServletResponse response, TcWpyrwwcl tcWpyrwwcl) {
List<TcWpyrwwcl> list = tcWpyrwwclService.selectTcWpyrwwclList(tcWpyrwwcl);
ExcelUtil<TcWpyrwwcl> util = new ExcelUtil<TcWpyrwwcl>(TcWpyrwwcl.class);
util.exportExcel(response, list, "网评员任务完成率(网评系统)数据");
@ -62,43 +64,49 @@ public class TcWpyrwwclController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpyrwwcl:query')")
@ApiOperation(value = "获取网评员任务完成率(网评系统)详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWpyrwwclService.selectTcWpyrwwclById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpyrwwcl:add')")
@Log(title = "网评员任务完成率(网评系统)", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增网评员任务完成率")
@PostMapping
public AjaxResult add(@RequestBody TcWpyrwwcl tcWpyrwwcl)
{
public AjaxResult add(@RequestBody TcWpyrwwcl tcWpyrwwcl) {
return toAjax(tcWpyrwwclService.insertTcWpyrwwcl(tcWpyrwwcl));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpyrwwcl:edit')")
@Log(title = "网评员任务完成率(网评系统)", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改网评员任务完成率")
@PutMapping
public AjaxResult edit(@RequestBody TcWpyrwwcl tcWpyrwwcl)
{
public AjaxResult edit(@RequestBody TcWpyrwwcl tcWpyrwwcl) {
return toAjax(tcWpyrwwclService.updateTcWpyrwwcl(tcWpyrwwcl));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/networkEcology:wpyrwwcl: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(tcWpyrwwclService.deleteTcWpyrwwclByIds(ids));
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWpyrwwcl> util = new ExcelUtil<TcWpyrwwcl>(TcWpyrwwcl.class);
List<TcWpyrwwcl> tTcWpyrwwclList = util.importExcel(file.getInputStream());
tcWpyrwwclService.importUser(tTcWpyrwwclList);
return AjaxResult.success();
}
}

@ -1,25 +1,23 @@
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.TcWz;
import com.ruoyi.tcZz.service.ITcWzService;
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
@ -28,19 +26,18 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-13
*/
@RestController
@Api(tags = "网站")
@RequestMapping("/tcZz/netManage/wz")
public class TcWzController extends BaseController
{
public class TcWzController extends BaseController {
@Autowired
private ITcWzService tcWzService;
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/netManage:wz:list')")
@ApiOperation(value = "查询网站列表", response = TcWz.class)
@GetMapping("/list")
public TableDataInfo list(TcWz tcWz)
{
public TableDataInfo list(TcWz tcWz) {
startPage();
List<TcWz> list = tcWzService.selectTcWzList(tcWz);
return getDataTable(list);
@ -49,11 +46,9 @@ public class TcWzController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/netManage:wz:export')")
@Log(title = "网站", businessType = BusinessType.EXPORT)
@ApiOperation(value = "导出网站列表")
@PostMapping("/export")
public void export(HttpServletResponse response, TcWz tcWz)
{
public void export(HttpServletResponse response, TcWz tcWz) {
List<TcWz> list = tcWzService.selectTcWzList(tcWz);
ExcelUtil<TcWz> util = new ExcelUtil<TcWz>(TcWz.class);
util.exportExcel(response, list, "网站数据");
@ -62,43 +57,50 @@ public class TcWzController extends BaseController
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/netManage:wz:query')")
@ApiOperation(value = "获取网站详细信息")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcWzService.selectTcWzById(id));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/netManage:wz:add')")
@Log(title = "网站", businessType = BusinessType.INSERT)
@ApiOperation(value = "新增网站")
@PostMapping
public AjaxResult add(@RequestBody TcWz tcWz)
{
public AjaxResult add(@RequestBody TcWz tcWz) {
return toAjax(tcWzService.insertTcWz(tcWz));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/netManage:wz:edit')")
@Log(title = "网站", businessType = BusinessType.UPDATE)
@ApiOperation(value = "修改网站")
@PutMapping
public AjaxResult edit(@RequestBody TcWz tcWz)
{
public AjaxResult edit(@RequestBody TcWz tcWz) {
return toAjax(tcWzService.updateTcWz(tcWz));
}
/**
*
*/
@PreAuthorize("@ss.hasPermi('tcZz/netManage:wz: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(tcWzService.deleteTcWzByIds(ids));
}
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcWz> util = new ExcelUtil<TcWz>(TcWz.class);
List<TcWz> tcWzList = util.importExcel(file.getInputStream());
tcWzService.importUser(tcWzList);
return AjaxResult.success();
}
}

@ -2,6 +2,8 @@ package com.ruoyi.tcZz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -28,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @date 2023-10-12
*/
@RestController
@Api("舆情报告")
@RequestMapping("/tcZz/netWorkYq/yqbg")
public class TcYqbgController extends BaseController
{

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljgtj;
import com.ruoyi.tcZz.domain.TcWlmqfzr;
/**
@ -58,4 +60,12 @@ public interface ITcWlmqfzrService
* @return
*/
public int deleteTcWlmqfzrById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWlmqfzr> tcWlmqfzrList);
}

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljgtj;
import com.ruoyi.tcZz.domain.TcWlwmzyz;
/**
@ -58,4 +60,13 @@ public interface ITcWlwmzyzService
* @return
*/
public int deleteTcWlwmzyzById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWlwmzyz> tcWlwmzyzList);
}

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljgtj;
import com.ruoyi.tcZz.domain.TcWpwzlyqk;
/**
@ -58,4 +60,12 @@ public interface ITcWpwzlyqkService
* @return
*/
public int deleteTcWpwzlyqkById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWpwzlyqk> tcWpwzlyqkList);
}

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljgtj;
import com.ruoyi.tcZz.domain.TcWpy;
/**
@ -58,4 +60,12 @@ public interface ITcWpyService
* @return
*/
public int deleteTcWpyById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWpy> tcWpyList);
}

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljgtj;
import com.ruoyi.tcZz.domain.TcWpyrwwcl;
/**
@ -58,4 +60,12 @@ public interface ITcWpyrwwclService
* @return
*/
public int deleteTcWpyrwwclById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWpyrwwcl> tTcWpyrwwclList);
}

@ -1,6 +1,8 @@
package com.ruoyi.tcZz.service;
import java.util.List;
import com.ruoyi.tcZz.domain.TcWljgtj;
import com.ruoyi.tcZz.domain.TcWz;
/**
@ -58,4 +60,12 @@ public interface ITcWzService
* @return
*/
public int deleteTcWzById(Long id);
/**
*
*
* @return
*/
public String importUser(List<TcWz> tcWzList);
}

@ -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.TcWlmqfzrMapper;
@ -93,4 +94,16 @@ public class TcWlmqfzrServiceImpl implements ITcWlmqfzrService
{
return tcWlmqfzrMapper.deleteTcWlmqfzrById(id);
}
@Override
public String importUser(List<TcWlmqfzr> tcWlmqfzrList) {
StringBuilder successMsg = new StringBuilder();
if (!tcWlmqfzrList.isEmpty()) {
for (TcWlmqfzr tcWlmqfzr : tcWlmqfzrList) {
tcWlmqfzrMapper.insertTcWlmqfzr(tcWlmqfzr);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -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.TcWlwmzyzMapper;
@ -15,8 +17,7 @@ import com.ruoyi.tcZz.service.ITcWlwmzyzService;
* @date 2023-10-13
*/
@Service
public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
{
public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService {
@Autowired
private TcWlwmzyzMapper tcWlwmzyzMapper;
@ -27,8 +28,7 @@ public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
* @return
*/
@Override
public TcWlwmzyz selectTcWlwmzyzById(Long id)
{
public TcWlwmzyz selectTcWlwmzyzById(Long id) {
return tcWlwmzyzMapper.selectTcWlwmzyzById(id);
}
@ -39,8 +39,7 @@ public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
* @return
*/
@Override
public List<TcWlwmzyz> selectTcWlwmzyzList(TcWlwmzyz tcWlwmzyz)
{
public List<TcWlwmzyz> selectTcWlwmzyzList(TcWlwmzyz tcWlwmzyz) {
return tcWlwmzyzMapper.selectTcWlwmzyzList(tcWlwmzyz);
}
@ -51,8 +50,7 @@ public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
* @return
*/
@Override
public int insertTcWlwmzyz(TcWlwmzyz tcWlwmzyz)
{
public int insertTcWlwmzyz(TcWlwmzyz tcWlwmzyz) {
tcWlwmzyz.setCreateTime(DateUtils.getNowDate());
return tcWlwmzyzMapper.insertTcWlwmzyz(tcWlwmzyz);
}
@ -64,8 +62,7 @@ public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
* @return
*/
@Override
public int updateTcWlwmzyz(TcWlwmzyz tcWlwmzyz)
{
public int updateTcWlwmzyz(TcWlwmzyz tcWlwmzyz) {
tcWlwmzyz.setUpdateTime(DateUtils.getNowDate());
return tcWlwmzyzMapper.updateTcWlwmzyz(tcWlwmzyz);
}
@ -77,8 +74,7 @@ public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
* @return
*/
@Override
public int deleteTcWlwmzyzByIds(Long[] ids)
{
public int deleteTcWlwmzyzByIds(Long[] ids) {
return tcWlwmzyzMapper.deleteTcWlwmzyzByIds(ids);
}
@ -89,8 +85,21 @@ public class TcWlwmzyzServiceImpl implements ITcWlwmzyzService
* @return
*/
@Override
public int deleteTcWlwmzyzById(Long id)
{
public int deleteTcWlwmzyzById(Long id) {
return tcWlwmzyzMapper.deleteTcWlwmzyzById(id);
}
@Override
public String importUser(List<TcWlwmzyz> tcWlwmzyzList) {
StringBuilder successMsg = new StringBuilder();
if (!tcWlwmzyzList.isEmpty()) {
for (TcWlwmzyz tcWlwmzyz : tcWlwmzyzList) {
tcWlwmzyzMapper.insertTcWlwmzyz(tcWlwmzyz);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -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.TcWpwzlyqkMapper;
@ -93,4 +94,18 @@ public class TcWpwzlyqkServiceImpl implements ITcWpwzlyqkService
{
return tcWpwzlyqkMapper.deleteTcWpwzlyqkById(id);
}
@Override
public String importUser(List<TcWpwzlyqk> tcWpwzlyqkList) {
StringBuilder successMsg = new StringBuilder();
if (!tcWpwzlyqkList.isEmpty()) {
for (TcWpwzlyqk tcWpwzlyqk : tcWpwzlyqkList) {
tcWpwzlyqkMapper.insertTcWpwzlyqk(tcWpwzlyqk);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -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.TcWpyMapper;
@ -93,4 +94,17 @@ public class TcWpyServiceImpl implements ITcWpyService
{
return tcWpyMapper.deleteTcWpyById(id);
}
@Override
public String importUser(List<TcWpy> tcWpyList) {
StringBuilder successMsg = new StringBuilder();
if (!tcWpyList.isEmpty()) {
for (TcWpy tcWpy : tcWpyList) {
tcWpyMapper.insertTcWpy(tcWpy);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -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.TcWpyrwwclMapper;
@ -93,4 +94,16 @@ public class TcWpyrwwclServiceImpl implements ITcWpyrwwclService
{
return tcWpyrwwclMapper.deleteTcWpyrwwclById(id);
}
@Override
public String importUser(List<TcWpyrwwcl> tTcWpyrwwclList) {
StringBuilder successMsg = new StringBuilder();
if (!tTcWpyrwwclList.isEmpty()) {
for (TcWpyrwwcl tcWpyrwwcl : tTcWpyrwwclList) {
tcWpyrwwclMapper.insertTcWpyrwwcl(tcWpyrwwcl);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

@ -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.TcWzMapper;
@ -93,4 +94,17 @@ public class TcWzServiceImpl implements ITcWzService
{
return tcWzMapper.deleteTcWzById(id);
}
@Override
public String importUser(List<TcWz> tcWzList) {
StringBuilder successMsg = new StringBuilder();
if (!tcWzList.isEmpty()) {
for (TcWz tcWz : tcWzList) {
tcWzMapper.insertTcWz(tcWz);
}
successMsg.append("导入成功");
}
return successMsg.toString();
}
}

Loading…
Cancel
Save