1 changed files with 115 additions and 0 deletions
@ -0,0 +1,115 @@ |
|||||
|
package com.kms.yg.sz.controller; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.shuili.common.core.controller.BaseController; |
||||
|
import com.shuili.common.core.domain.SearchParam; |
||||
|
import com.shuili.common.utils.poi.ExcelUtil; |
||||
|
import com.kms.common.utils.BaseEntityUtils; |
||||
|
|
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
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.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.shuili.common.mybaitsplus.BeanToWrapper; |
||||
|
|
||||
|
import com.shuili.common.annotation.Log; |
||||
|
import com.shuili.common.core.domain.AjaxResult; |
||||
|
import com.shuili.common.enums.BusinessType; |
||||
|
import com.kms.yg.sz.domain.BsSgcSzGzsc; |
||||
|
import com.kms.yg.sz.service.BsSgcSzGzscService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 水闸工作手册Controller |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2025-03-13 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/sz/gzsc") |
||||
|
@Api(tags = "水闸工作手册") |
||||
|
public class BsSgcSzGzscController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private BsSgcSzGzscService bsSgcSzGzscService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 查询水闸工作手册列表 |
||||
|
*/ |
||||
|
@PostMapping("/list") |
||||
|
@ApiOperation("水闸工作手册列表") |
||||
|
public IPage list(@RequestBody SearchParam<BsSgcSzGzsc> sp) |
||||
|
{ |
||||
|
return bsSgcSzGzscService.selectPage(sp); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出水闸工作手册列表 |
||||
|
*/ |
||||
|
@Log(title = "水闸工作手册导出", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ApiOperation("水闸工作手册导出") |
||||
|
public AjaxResult export(@RequestBody BsSgcSzGzsc bsSgcSzGzsc) |
||||
|
{ |
||||
|
List<BsSgcSzGzsc> list = bsSgcSzGzscService.listByIds(bsSgcSzGzsc.getIds()); |
||||
|
ExcelUtil<BsSgcSzGzsc> util = new ExcelUtil<>(BsSgcSzGzsc.class); |
||||
|
return util.exportExcel(list, "gzsc"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取水闸工作手册详细信息 |
||||
|
*/ |
||||
|
@ApiOperation(" 水闸工作手册详情") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") String id) |
||||
|
{ |
||||
|
return AjaxResult.success(bsSgcSzGzscService.getById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增水闸工作手册 |
||||
|
*/ |
||||
|
@Log(title = "水闸工作手册新增", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
@ApiOperation("水闸工作手册新增") |
||||
|
public AjaxResult add(@RequestBody BsSgcSzGzsc bsSgcSzGzsc) |
||||
|
{ |
||||
|
BaseEntityUtils.preInsert(bsSgcSzGzsc); |
||||
|
return toAjax(bsSgcSzGzscService.save(bsSgcSzGzsc)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改水闸工作手册 |
||||
|
*/ |
||||
|
@ApiOperation("水闸工作手册修改") |
||||
|
@Log(title = "水闸工作手册修改", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody BsSgcSzGzsc bsSgcSzGzsc) |
||||
|
{ |
||||
|
return toAjax(bsSgcSzGzscService.updateById(bsSgcSzGzsc)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除水闸工作手册 |
||||
|
*/ |
||||
|
@ApiOperation("水闸工作手册删除") |
||||
|
@Log(title = "水闸工作手册删除", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable String[] ids) |
||||
|
{ |
||||
|
return toAjax(bsSgcSzGzscService.removeByIds(Arrays.asList(ids))); |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue