|
|
@ -3,8 +3,8 @@ package com.ruoyi.tcZz.controller;
|
|
|
|
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.core.page.TableDataInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.common.exception.base.BaseException;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
|
|
import com.ruoyi.tcZz.domain.TcYqyj;
|
|
|
|
|
|
|
|
import com.ruoyi.tcZz.domain.TcYqzs;
|
|
|
|
import com.ruoyi.tcZz.domain.TcYqzs;
|
|
|
|
import com.ruoyi.tcZz.service.ITcYqzsService;
|
|
|
|
import com.ruoyi.tcZz.service.ITcYqzsService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
@ -56,6 +56,17 @@ public class TcYqzsController extends BaseController {
|
|
|
|
@ApiOperation("新增舆情走势图")
|
|
|
|
@ApiOperation("新增舆情走势图")
|
|
|
|
@PostMapping
|
|
|
|
@PostMapping
|
|
|
|
public AjaxResult add(@RequestBody TcYqzs tcYqzs) {
|
|
|
|
public AjaxResult add(@RequestBody TcYqzs tcYqzs) {
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 新增校验
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
TcYqzs tcYqzs1 = new TcYqzs();
|
|
|
|
|
|
|
|
tcYqzs1.setAreaId(tcYqzs.getAreaId());
|
|
|
|
|
|
|
|
tcYqzs1.setDateTime(tcYqzs.getDateTime());
|
|
|
|
|
|
|
|
List<TcYqzs> list = tcYqzsService.selectTcYqzsList(tcYqzs1);
|
|
|
|
|
|
|
|
if (!list.isEmpty()) {
|
|
|
|
|
|
|
|
throw new BaseException("同一天内不得新增多条太仓数据");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return toAjax(tcYqzsService.insertTcYqzs(tcYqzs));
|
|
|
|
return toAjax(tcYqzsService.insertTcYqzs(tcYqzs));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -100,6 +111,7 @@ public class TcYqzsController extends BaseController {
|
|
|
|
tcYqzsService.importUser(tcYqzsList);
|
|
|
|
tcYqzsService.importUser(tcYqzsList);
|
|
|
|
return AjaxResult.success();
|
|
|
|
return AjaxResult.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 批量启用禁用
|
|
|
|
* 批量启用禁用
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -109,15 +121,14 @@ public class TcYqzsController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("批量启用禁用")
|
|
|
|
@ApiOperation("批量启用禁用")
|
|
|
|
@GetMapping("/isStatus")
|
|
|
|
@GetMapping("/isStatus")
|
|
|
|
public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus,@RequestParam("ids") List<String> ids) {
|
|
|
|
public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus, @RequestParam("ids") List<String> ids) {
|
|
|
|
tcYqzsService.updateByisStatus(isStatus,ids);
|
|
|
|
tcYqzsService.updateByisStatus(isStatus, ids);
|
|
|
|
return AjaxResult.success();
|
|
|
|
return AjaxResult.success();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("通用下载excel模板")
|
|
|
|
@ApiOperation("通用下载excel模板")
|
|
|
|
@PostMapping("/importTemplate")
|
|
|
|
@PostMapping("/importTemplate")
|
|
|
|
public void importTemplate(HttpServletResponse response)
|
|
|
|
public void importTemplate(HttpServletResponse response) {
|
|
|
|
{
|
|
|
|
|
|
|
|
ExcelUtil<TcYqzs> util = new ExcelUtil<TcYqzs>(TcYqzs.class);
|
|
|
|
ExcelUtil<TcYqzs> util = new ExcelUtil<TcYqzs>(TcYqzs.class);
|
|
|
|
util.importTemplateExcel(response, " 舆情走势图列表");
|
|
|
|
util.importTemplateExcel(response, " 舆情走势图列表");
|
|
|
|
}
|
|
|
|
}
|
|
|
|