You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tcZz-java/ruoyi-admin/src/main/java/com/ruoyi/tcZz/controller/TcZbxqController.java

123 lines
3.8 KiB

2 years ago
package com.ruoyi.tcZz.controller;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
2 years ago
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.utils.poi.ExcelUtil;
2 years ago
import com.ruoyi.tcZz.domain.TcZbxq;
import com.ruoyi.tcZz.service.ITcZbxqService;
2 years ago
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;
2 years ago
/**
2 years ago
* Controller
*
2 years ago
* @author ruoyi
* @date 2023-10-12
*/
@RestController
2 years ago
@Api(tags = "转办量、转办详情")
2 years ago
@RequestMapping("/tcZz/netWorkYq/zbxq")
2 years ago
public class TcZbxqController extends BaseController {
2 years ago
@Autowired
private ITcZbxqService tcZbxqService;
/**
*
*/
2 years ago
@ApiOperation(value = "查询 转办量、转办详情列表", response = TcZbxq.class)
2 years ago
@GetMapping("/list")
2 years ago
public TableDataInfo list(TcZbxq tcZbxq) {
2 years ago
startPage();
List<TcZbxq> list = tcZbxqService.selectTcZbxqList(tcZbxq);
return getDataTable(list);
}
/**
*
*/
2 years ago
@ApiOperation(value = " 导出 转办量、转办详情列表")
2 years ago
@PostMapping("/export")
2 years ago
public void export(HttpServletResponse response, TcZbxq tcZbxq) {
2 years ago
List<TcZbxq> list = tcZbxqService.selectTcZbxqList(tcZbxq);
ExcelUtil<TcZbxq> util = new ExcelUtil<TcZbxq>(TcZbxq.class);
util.exportExcel(response, list, " 转办量、转办详情数据");
}
/**
*
*/
2 years ago
@ApiOperation(value = " 获取 转办量、转办详情详细信息")
2 years ago
@GetMapping(value = "/{id}")
2 years ago
public AjaxResult getInfo(@PathVariable("id") Long id) {
2 years ago
return success(tcZbxqService.selectTcZbxqById(id));
}
/**
*
*/
2 years ago
@ApiOperation(value = "新增 转办量、转办详情")
2 years ago
@PostMapping
2 years ago
public AjaxResult add(@RequestBody TcZbxq tcZbxq) {
2 years ago
return toAjax(tcZbxqService.insertTcZbxq(tcZbxq));
}
/**
*
*/
2 years ago
@ApiOperation(value = "修改 转办量、转办详情")
2 years ago
@PutMapping
2 years ago
public AjaxResult edit(@RequestBody TcZbxq tcZbxq) {
2 years ago
return toAjax(tcZbxqService.updateTcZbxq(tcZbxq));
}
/**
*
*/
2 years ago
@ApiOperation(value = " 删除 转办量、转办详情")
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
2 years ago
return toAjax(tcZbxqService.deleteTcZbxqByIds(ids));
}
2 years ago
/**
*
*/
@ApiOperation("通用导入excel信息")
@PostMapping("/common/importExcel")
public AjaxResult importExcel(MultipartFile file) throws Exception {
ExcelUtil<TcZbxq> util = new ExcelUtil<TcZbxq>(TcZbxq.class);
List<TcZbxq> tcZbxqList = util.importExcel(file.getInputStream());
tcZbxqService.importUser(tcZbxqList);
return AjaxResult.success();
}
1 year ago
2 years ago
/**
*
*
* @param isStatus
* @return
*/
@ApiOperation("批量启用禁用")
@GetMapping("/isStatus")
1 year ago
public AjaxResult isStatus(@RequestParam("isStatus") Integer isStatus, @RequestParam("ids") List<String> ids) {
tcZbxqService.updateByisStatus(isStatus, ids);
2 years ago
return AjaxResult.success();
}
2 years ago
@ApiOperation("通用下载excel模板")
@PostMapping("/importTemplate")
1 year ago
public void importTemplate(HttpServletResponse response) {
2 years ago
ExcelUtil<TcZbxq> util = new ExcelUtil<TcZbxq>(TcZbxq.class);
util.importTemplateExcel(response, " 转办量、转办详情");
}
2 years ago
}