| | |
| | | |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.ruoyi.common.annotation.AddOrgId; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | |
| | | /** |
| | | * 方案分类Controller |
| | | * |
| | | * |
| | | * @author smartor |
| | | * @date 2023-03-04 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/smartor/schemecategory") |
| | | public class SchemeCategoryController extends BaseController |
| | | { |
| | | public class SchemeCategoryController extends BaseController { |
| | | @Autowired |
| | | private ISchemeCategoryService schemeCategoryService; |
| | | |
| | |
| | | * 查询方案分类列表 |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:schemecategory:list')") |
| | | @PostMapping("/list") |
| | | public TableDataInfo list(@RequestBody SchemeCategory schemeCategory) |
| | | { |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("list") |
| | | public TableDataInfo list(@RequestBody SchemeCategory schemeCategory) { |
| | | startPage(); |
| | | List<SchemeCategory> list = schemeCategoryService.selectSchemeCategoryList(schemeCategory); |
| | | return getDataTable(list); |
| | |
| | | //@PreAuthorize("@ss.hasPermi('smartor:schemecategory:export')") |
| | | @Log(title = "方案分类", businessType = BusinessType.EXPORT) |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response, SchemeCategory schemeCategory) |
| | | { |
| | | public void export(HttpServletResponse response, SchemeCategory schemeCategory) { |
| | | List<SchemeCategory> list = schemeCategoryService.selectSchemeCategoryList(schemeCategory); |
| | | ExcelUtil<SchemeCategory> util = new ExcelUtil<SchemeCategory>(SchemeCategory.class); |
| | | util.exportExcel(response, list, "方案分类数据"); |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:schemecategory:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return success(schemeCategoryService.selectSchemeCategoryById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:schemecategory:add')") |
| | | @Log(title = "方案分类", businessType = BusinessType.INSERT) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SchemeCategory schemeCategory) |
| | | { |
| | | public AjaxResult add(@RequestBody SchemeCategory schemeCategory) { |
| | | return toAjax(schemeCategoryService.insertSchemeCategory(schemeCategory)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:schemecategory:edit')") |
| | | @Log(title = "方案分类", businessType = BusinessType.UPDATE) |
| | | @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid") |
| | | @PostMapping("/edit") |
| | | public AjaxResult edit(@RequestBody SchemeCategory schemeCategory) |
| | | { |
| | | public AjaxResult edit(@RequestBody SchemeCategory schemeCategory) { |
| | | return toAjax(schemeCategoryService.updateSchemeCategory(schemeCategory)); |
| | | } |
| | | |
| | |
| | | */ |
| | | //@PreAuthorize("@ss.hasPermi('smartor:schemecategory:remove')") |
| | | @Log(title = "方案分类", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(schemeCategoryService.deleteSchemeCategoryByIds(ids)); |
| | | } |
| | | } |