parent
242a1e2dc9
commit
d777a90a83
@ -1,92 +1,92 @@
|
||||
package com.ruoyi.programManagement.controller;
|
||||
|
||||
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.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.programManagement.entity.SzEntBasicInfo;
|
||||
import com.ruoyi.programManagement.entity.request.SzEntBasicInfoPageRequest;
|
||||
import com.ruoyi.programManagement.entity.response.SzEntBasicInfoPageResponse;
|
||||
import com.ruoyi.programManagement.service.ISzEntBasicInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 企业基本信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-09-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pharmaceuticals/info")
|
||||
@Api(tags = "企业基本信息")
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class SzEntBasicInfoController extends BaseController {
|
||||
@Autowired
|
||||
private ISzEntBasicInfoService szEntBasicInfoService;
|
||||
|
||||
/**
|
||||
* 分页查询企业基本信息列表
|
||||
*
|
||||
* @Parm req 请求类
|
||||
*/
|
||||
@ApiOperation(value = "分页查询企业基本信息列表", response = SzEntBasicInfoPageResponse.class)
|
||||
@GetMapping("/list")
|
||||
public AjaxResult page(@Valid SzEntBasicInfoPageRequest req) {
|
||||
return success(szEntBasicInfoService.page(req));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出企业基本信息列表
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SzEntBasicInfo szEntBasicInfo) {
|
||||
List<SzEntBasicInfo> list = szEntBasicInfoService.selectSzEntBasicInfoList(szEntBasicInfo);
|
||||
ExcelUtil<SzEntBasicInfo> util = new ExcelUtil<SzEntBasicInfo>(SzEntBasicInfo.class);
|
||||
util.exportExcel(response, list, "企业基本信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业基本信息详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String ID) {
|
||||
return success(szEntBasicInfoService.selectSzEntBasicInfoByID(ID));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增企业基本信息
|
||||
*/
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SzEntBasicInfo szEntBasicInfo) {
|
||||
return toAjax(szEntBasicInfoService.insertSzEntBasicInfo(szEntBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改企业基本信息
|
||||
*/
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SzEntBasicInfo szEntBasicInfo) {
|
||||
return toAjax(szEntBasicInfoService.updateSzEntBasicInfo(szEntBasicInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除企业基本信息
|
||||
*/
|
||||
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] IDs) {
|
||||
return toAjax(szEntBasicInfoService.deleteSzEntBasicInfoByIDs(IDs));
|
||||
}
|
||||
}
|
||||
//package com.ruoyi.programManagement.controller;
|
||||
//
|
||||
//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.utils.poi.ExcelUtil;
|
||||
//import com.ruoyi.programManagement.entity.SzEntBasicInfo;
|
||||
//import com.ruoyi.programManagement.entity.request.SzEntBasicInfoPageRequest;
|
||||
//import com.ruoyi.programManagement.entity.response.SzEntBasicInfoPageResponse;
|
||||
//import com.ruoyi.programManagement.service.ISzEntBasicInfoService;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.transaction.annotation.Transactional;
|
||||
//import org.springframework.web.bind.annotation.*;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletResponse;
|
||||
//import javax.validation.Valid;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * 企业基本信息Controller
|
||||
// *
|
||||
// * @author ruoyi
|
||||
// * @date 2023-09-09
|
||||
// */
|
||||
//@RestController
|
||||
//@RequestMapping("/pharmaceuticals/info")
|
||||
//@Api(tags = "企业基本信息")
|
||||
//@Transactional(rollbackFor = Exception.class)
|
||||
//public class SzEntBasicInfoController extends BaseController {
|
||||
// @Autowired
|
||||
// private ISzEntBasicInfoService szEntBasicInfoService;
|
||||
//
|
||||
// /**
|
||||
// * 分页查询企业基本信息列表
|
||||
// *
|
||||
// * @Parm req 请求类
|
||||
// */
|
||||
// @ApiOperation(value = "分页查询企业基本信息列表", response = SzEntBasicInfoPageResponse.class)
|
||||
// @GetMapping("/list")
|
||||
// public AjaxResult page(@Valid SzEntBasicInfoPageRequest req) {
|
||||
// return success(szEntBasicInfoService.page(req));
|
||||
// }
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * 导出企业基本信息列表
|
||||
// */
|
||||
// @PostMapping("/export")
|
||||
// public void export(HttpServletResponse response, SzEntBasicInfo szEntBasicInfo) {
|
||||
// List<SzEntBasicInfo> list = szEntBasicInfoService.selectSzEntBasicInfoList(szEntBasicInfo);
|
||||
// ExcelUtil<SzEntBasicInfo> util = new ExcelUtil<SzEntBasicInfo>(SzEntBasicInfo.class);
|
||||
// util.exportExcel(response, list, "企业基本信息数据");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取企业基本信息详细信息
|
||||
// */
|
||||
//
|
||||
// @GetMapping(value = "/{id}")
|
||||
// public AjaxResult getInfo(@PathVariable("id") String ID) {
|
||||
// return success(szEntBasicInfoService.selectSzEntBasicInfoByID(ID));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 新增企业基本信息
|
||||
// */
|
||||
//
|
||||
// @PostMapping
|
||||
// public AjaxResult add(@RequestBody SzEntBasicInfo szEntBasicInfo) {
|
||||
// return toAjax(szEntBasicInfoService.insertSzEntBasicInfo(szEntBasicInfo));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 修改企业基本信息
|
||||
// */
|
||||
//
|
||||
// @PutMapping
|
||||
// public AjaxResult edit(@RequestBody SzEntBasicInfo szEntBasicInfo) {
|
||||
// return toAjax(szEntBasicInfoService.updateSzEntBasicInfo(szEntBasicInfo));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 删除企业基本信息
|
||||
// */
|
||||
//
|
||||
// @DeleteMapping("/{ids}")
|
||||
// public AjaxResult remove(@PathVariable String[] IDs) {
|
||||
// return toAjax(szEntBasicInfoService.deleteSzEntBasicInfoByIDs(IDs));
|
||||
// }
|
||||
//}
|
||||
|
Loading…
Reference in new issue