| | |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | |
| | | /** |
| | | * 资金申请主表Controller |
| | | * |
| | | * |
| | | * @author ruoyi |
| | | * @date 2022-01-18 |
| | | */ |
| | | @Api("资金申请主表") |
| | | @RestController |
| | | @RequestMapping("/project/donateconsolationfund") |
| | | public class ServiceDonateconsolationfundController extends BaseController |
| | | { |
| | | public class ServiceDonateconsolationfundController extends BaseController { |
| | | @Autowired |
| | | private IServiceDonateconsolationfundService serviceDonateconsolationfundService; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询资金申请主表列表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceDonateconsolationfund serviceDonateconsolationfund) |
| | | { |
| | | public TableDataInfo list(ServiceDonateconsolationfund serviceDonateconsolationfund) { |
| | | startPage(); |
| | | List<ServiceDonateconsolationfund> list = serviceDonateconsolationfundService.queryList(serviceDonateconsolationfund); |
| | | return getDataTable(list); |
| | |
| | | @ApiOperation("导出资金申请主表列表") |
| | | @Log(title = "资金申请主表", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceDonateconsolationfund serviceDonateconsolationfund) |
| | | { |
| | | public AjaxResult export(ServiceDonateconsolationfund serviceDonateconsolationfund) { |
| | | List<ServiceDonateconsolationfund> list = serviceDonateconsolationfundService.queryList(serviceDonateconsolationfund); |
| | | ExcelUtil<ServiceDonateconsolationfund> util = new ExcelUtil<ServiceDonateconsolationfund>(ServiceDonateconsolationfund.class); |
| | | return util.exportExcel(list, "资金申请主表数据"); |
| | |
| | | */ |
| | | @ApiOperation("获取资金申请主表详细信息") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | return AjaxResult.success(serviceDonateconsolationfundService.getById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("新增资金申请主表") |
| | | @Log(title = "资金申请主表", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund) |
| | | { |
| | | return toAjax(serviceDonateconsolationfundService.save(serviceDonateconsolationfund)); |
| | | public AjaxResult add(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund) { |
| | | boolean save = serviceDonateconsolationfundService.save(serviceDonateconsolationfund); |
| | | return AjaxResult.success(serviceDonateconsolationfund); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @ApiOperation("修改资金申请主表") |
| | | @Log(title = "资金申请主表", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund) |
| | | { |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceDonateconsolationfund serviceDonateconsolationfund) { |
| | | return toAjax(serviceDonateconsolationfundService.updateById(serviceDonateconsolationfund)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("删除资金申请主表") |
| | | @Log(title = "资金申请主表", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceDonateconsolationfundService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | } |