| New file |
| | |
| | | package cn.gistack.sm.sg.controller; |
| | | |
| | | import cn.gistack.sm.sg.DO.SgGxDO; |
| | | import cn.gistack.sm.sg.DTO.ProjectSearchDTO; |
| | | import cn.gistack.sm.sg.VO.SgGxVO; |
| | | import cn.gistack.sm.sg.service.SgGxService; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * 施工工序基本表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author shenyijian |
| | | * @since 2024-06-13 15:46:18 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/sg_gx") |
| | | public class SgGxController extends BladeController { |
| | | @Autowired |
| | | private SgGxService sgGxService; |
| | | |
| | | /** |
| | | * 新增工序 |
| | | */ |
| | | @PostMapping(value = "/add") |
| | | public R add(@RequestBody SgGxDO sgGxDO) { |
| | | sgGxService.add(sgGxDO); |
| | | return R.success("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改工序 |
| | | */ |
| | | @PostMapping(value = "/update") |
| | | public R update(@RequestBody SgGxDO sgGxDO) { |
| | | sgGxService.update(sgGxDO); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping(value = "/page") |
| | | public R queryPageList(ProjectSearchDTO searchDTO, Query query) { |
| | | IPage<SgGxVO> page = sgGxService.queryPageList(Condition.getPage(query), searchDTO); |
| | | return R.data(page); |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @GetMapping(value = "/detail") |
| | | public R detail(Long id) { |
| | | |
| | | SgGxVO sgGxDO = sgGxService.detail(id); |
| | | return R.data(sgGxDO); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public R delete(Long id) { |
| | | sgGxService.delete(id); |
| | | return R.success("删除成功"); |
| | | } |
| | | } |