| | |
| | | import com.ruoyi.system.vo.asset.OaApprovalApplicationStorageVehicleDetailVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | * @author CodeBuddy |
| | | * @since 2025-09-17 |
| | | */ |
| | | @Slf4j |
| | | @Api(tags = {"OA审批-资产入库申请相关接口"}) |
| | | @Validated |
| | | @RestController |
| | |
| | | @ApiOperation("获取资产入库申请分页列表") |
| | | @PostMapping("/page-list") |
| | | public R<IPage<OaApprovalApplicationStoragePageVO>> getPageList(@RequestBody OaApprovalApplicationStoragePageQuery pageQuery) { |
| | | IPage<OaApprovalApplicationStoragePageVO> page = oaApprovalApplicationStorageService.getPageList(pageQuery); |
| | | IPage<OaApprovalApplicationStoragePageVO> page = null; |
| | | try { |
| | | page = oaApprovalApplicationStorageService.getPageList(pageQuery); |
| | | } catch (Exception e) { |
| | | log.error("获取资产入库申请分页列表失败", e); |
| | | return R.fail("服务器开小差啦"); |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @ApiOperation("删除资产入库申请") |
| | | @DeleteMapping("/{id}") |
| | | @Log(title = "资产入库申请-删除", businessType = BusinessType.DELETE) |
| | | public R<Void> delete(@PathVariable Integer id) { |
| | | oaApprovalApplicationStorageService.removeById(id); |
| | | public R<Void> delete(@ApiParam(name = "id",value = "审批单ID",required = true) @PathVariable Integer id) { |
| | | oaApprovalApplicationStorageService.removeByApplicationId(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation("获取通用资产入库申请详情") |
| | | @GetMapping("/detail/general/{id}") |
| | | public R<OaApprovalApplicationStorageGeneralDetailVO> getGeneralDetail(@PathVariable Integer id) { |
| | | public R<OaApprovalApplicationStorageGeneralDetailVO> getGeneralDetail(@ApiParam(name = "id",value = "审批单ID",required = true) @PathVariable Integer id) { |
| | | OaApprovalApplicationStorageGeneralDetailVO detail = oaApprovalApplicationStorageService.getGeneralDetail(id); |
| | | return R.ok(detail); |
| | | } |
| | | |
| | | @ApiOperation("获取房产资产入库申请详情") |
| | | @GetMapping("/detail/property/{id}") |
| | | public R<OaApprovalApplicationStoragePropertyDetailVO> getPropertyDetail(@PathVariable Integer id) { |
| | | public R<OaApprovalApplicationStoragePropertyDetailVO> getPropertyDetail(@ApiParam(name = "id",value = "审批单ID",required = true) @PathVariable Integer id) { |
| | | OaApprovalApplicationStoragePropertyDetailVO detail = oaApprovalApplicationStorageService.getPropertyDetail(id); |
| | | return R.ok(detail); |
| | | } |
| | | |
| | | @ApiOperation("获取车辆资产入库申请详情") |
| | | @GetMapping("/detail/vehicle/{id}") |
| | | public R<OaApprovalApplicationStorageVehicleDetailVO> getVehicleDetail(@PathVariable Integer id) { |
| | | public R<OaApprovalApplicationStorageVehicleDetailVO> getVehicleDetail(@ApiParam(name = "id",value = "审批单ID",required = true) @PathVariable Integer id) { |
| | | OaApprovalApplicationStorageVehicleDetailVO detail = oaApprovalApplicationStorageService.getVehicleDetail(id); |
| | | return R.ok(detail); |
| | | } |