| | |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.aspectj.weaver.loadtime.Aj; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | @Api("资金审批流程") |
| | | @RestController |
| | | @RequestMapping("/project/fundflow") |
| | | public class ServiceFundflowController extends BaseController |
| | | { |
| | | public class ServiceFundflowController extends BaseController { |
| | | @Autowired |
| | | private IServiceFundflowService serviceFundflowService; |
| | | |
| | |
| | | */ |
| | | @ApiOperation("查询资金审批流程列表") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ServiceFundflow serviceFundflow) |
| | | { |
| | | public TableDataInfo list(ServiceFundflow serviceFundflow) { |
| | | startPage(); |
| | | List<ServiceFundflow> list = serviceFundflowService.queryList(serviceFundflow); |
| | | return getDataTable(list); |
| | |
| | | @ApiOperation("导出资金审批流程列表") |
| | | @Log(title = "资金审批流程", businessType = BusinessType.EXPORT) |
| | | @GetMapping("/export") |
| | | public AjaxResult export(ServiceFundflow serviceFundflow) |
| | | { |
| | | public AjaxResult export(ServiceFundflow serviceFundflow) { |
| | | List<ServiceFundflow> list = serviceFundflowService.queryList(serviceFundflow); |
| | | ExcelUtil<ServiceFundflow> util = new ExcelUtil<ServiceFundflow>(ServiceFundflow.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(serviceFundflowService.getById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | @ApiOperation("新增资金审批流程") |
| | | @Log(title = "资金审批流程", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | @PostMapping("/add") |
| | | @RepeatSubmit |
| | | public AjaxResult add(@RequestBody ServiceFundflow serviceFundflow) |
| | | { |
| | | return toAjax(serviceFundflowService.save(serviceFundflow)); |
| | | public AjaxResult add(@RequestBody ServiceFundflow serviceFundflow) { |
| | | boolean save = serviceFundflowService.save(serviceFundflow); |
| | | return AjaxResult.success(serviceFundflow); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Log(title = "资金审批流程", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/edit") |
| | | @RepeatSubmit |
| | | public AjaxResult edit(@RequestBody ServiceFundflow serviceFundflow) |
| | | { |
| | | public AjaxResult edit(@RequestBody ServiceFundflow serviceFundflow) { |
| | | return toAjax(serviceFundflowService.updateById(serviceFundflow)); |
| | | } |
| | | |
| | |
| | | @ApiOperation("删除资金审批流程") |
| | | @Log(title = "资金审批流程", businessType = BusinessType.DELETE) |
| | | @GetMapping("/remove/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | public AjaxResult remove(@PathVariable Long[] ids) { |
| | | return toAjax(serviceFundflowService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | } |