New file |
| | |
| | | package com.moral.api.controller; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.moral.api.pojo.ext.allocationextension.AllocationExtensionExt; |
| | | import com.moral.api.pojo.ext.allocationextension.AllocationExtensionPageExt; |
| | | import com.moral.api.pojo.query.allocationextension.AllocationExtensionAddCond; |
| | | import com.moral.api.pojo.query.allocationextension.AllocationExtensionPageCond; |
| | | import com.moral.api.pojo.vo.allocationextension.AllocationExtensionPageVo; |
| | | import com.moral.api.pojo.vo.allocationextension.AllocationExtensionVo; |
| | | import com.moral.api.service.AllocationExtensionService; |
| | | import com.moral.constant.PageResult; |
| | | import com.moral.constant.ResultMessage; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * <p> |
| | | * 交办单延期 前端控制器 |
| | | * </p> |
| | | * deyt template generate |
| | | * @author JI |
| | | * @since 2023-09-25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/allocationExtension") |
| | | @Api(tags = {"延期申请"}) |
| | | public class AllocationExtensionController { |
| | | |
| | | private final AllocationExtensionService allocationExtensionService; |
| | | |
| | | public AllocationExtensionController(AllocationExtensionService allocationExtensionService) { |
| | | this.allocationExtensionService = allocationExtensionService; |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | | @ApiOperation("详情") |
| | | public ResultMessage<AllocationExtensionVo> get(Integer id) { |
| | | AllocationExtensionExt allocationExtensionext = allocationExtensionService.extOne(id); |
| | | return ResultMessage.ok(allocationExtensionext == null ? null : AllocationExtensionVo.convert(allocationExtensionext)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/page") |
| | | @ApiOperation("分页") |
| | | public ResultMessage<PageResult<AllocationExtensionPageVo>> page(@Valid @RequestBody AllocationExtensionPageCond allocationExtensionPageCond) { |
| | | Page<AllocationExtensionPageExt> page = allocationExtensionService.extPage(allocationExtensionPageCond); |
| | | PageResult<AllocationExtensionPageVo> result = new PageResult<>(page); |
| | | result.setList(AllocationExtensionPageVo.convert(page.getRecords())); |
| | | return ResultMessage.ok(result); |
| | | } |
| | | |
| | | @GetMapping("check") |
| | | @ApiOperation("审批") |
| | | public ResultMessage check(@RequestParam @ApiParam(value = "id",name = "主键id") Integer id, |
| | | @RequestParam @ApiParam(value = "state",name = "状态") Integer state){ |
| | | allocationExtensionService.check(id,state); |
| | | return ResultMessage.ok(); |
| | | } |
| | | |
| | | } |