123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- package com.ruoyi.web.controller.project;
- import java.util.List;
- import com.ruoyi.common.enums.BusinessType;
- import com.ruoyi.common.utils.poi.ExcelUtil;
- import com.ruoyi.system.domain.project.BmConstructionEntry;
- import com.ruoyi.system.service.project.IBmConstructionEntryService;
- import org.springframework.security.access.prepost.PreAuthorize;
- 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.ruoyi.common.annotation.Log;
- import com.ruoyi.common.core.controller.BaseController;
- import com.ruoyi.common.core.domain.AjaxResult;
- import com.ruoyi.common.core.page.TableDataInfo;
- /**
- * 项目入规
- (跟项目一对一)Controller
- *
- * @author ruoyi
- * @date 2021-12-20
- */
- @RestController
- @RequestMapping("/constructionEntry/entry")
- public class BmConstructionEntryController extends BaseController
- {
- @Autowired
- private IBmConstructionEntryService bmConstructionEntryService;
- /**
- * 查询项目入规
- (跟项目一对一)列表
- */
- @PreAuthorize("@ss.hasPermi('constructionEntry:entry:list')")
- @GetMapping("/list")
- public TableDataInfo list(BmConstructionEntry bmConstructionEntry)
- {
- startPage();
- List<BmConstructionEntry> list = bmConstructionEntryService.selectBmConstructionEntryList(bmConstructionEntry);
- return getDataTable(list);
- }
- /**
- * 导出项目入规
- (跟项目一对一)列表
- */
- @PreAuthorize("@ss.hasPermi('constructionEntry:entry:export')")
- @Log(title = "项目入规 (跟项目一对一)", businessType = BusinessType.EXPORT)
- @GetMapping("/export")
- public AjaxResult export(BmConstructionEntry bmConstructionEntry)
- {
- List<BmConstructionEntry> list = bmConstructionEntryService.selectBmConstructionEntryList(bmConstructionEntry);
- ExcelUtil<BmConstructionEntry> util = new ExcelUtil<BmConstructionEntry>(BmConstructionEntry.class);
- return util.exportExcel(list, "entry");
- }
- /**
- * 获取项目入规
- (跟项目一对一)详细信息
- */
- @PreAuthorize("@ss.hasPermi('constructionEntry:entry:query')")
- @GetMapping(value = "/{id}")
- public AjaxResult getInfo(@PathVariable("id") Long id)
- {
- return AjaxResult.success(bmConstructionEntryService.selectBmConstructionEntryById(id));
- }
- /**
- * 新增项目入规
- (跟项目一对一)
- */
- @PreAuthorize("@ss.hasPermi('constructionEntry:entry:add')")
- @Log(title = "项目入规 (跟项目一对一)", businessType = BusinessType.INSERT)
- @PostMapping
- public AjaxResult add(@RequestBody BmConstructionEntry bmConstructionEntry)
- {
- return toAjax(bmConstructionEntryService.insertBmConstructionEntry(bmConstructionEntry));
- }
- /**
- * 修改项目入规
- (跟项目一对一)
- */
- @PreAuthorize("@ss.hasPermi('constructionEntry:entry:edit')")
- @Log(title = "项目入规 (跟项目一对一)", businessType = BusinessType.UPDATE)
- @PutMapping
- public AjaxResult edit(@RequestBody BmConstructionEntry bmConstructionEntry)
- {
- return toAjax(bmConstructionEntryService.updateBmConstructionEntry(bmConstructionEntry));
- }
- /**
- * 删除项目入规
- (跟项目一对一)
- */
- @PreAuthorize("@ss.hasPermi('constructionEntry:entry:remove')")
- @Log(title = "项目入规 (跟项目一对一)", businessType = BusinessType.DELETE)
- @DeleteMapping("/{ids}")
- public AjaxResult remove(@PathVariable Long[] ids)
- {
- return toAjax(bmConstructionEntryService.deleteBmConstructionEntryByIds(ids));
- }
- }
|