| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import com.ycl.platform.domain.entity.CalculateRecord; |
| | | import com.ycl.platform.domain.form.CalculateReportBackfillForm; |
| | | import com.ycl.platform.domain.param.HK.CoordinateByAreaParam; |
| | | import com.ycl.system.domain.group.Update; |
| | | import com.ycl.system.domain.group.Add; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import lombok.RequiredArgsConstructor; |
| | | import java.util.List; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import jakarta.validation.constraints.NotEmpty; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import com.ycl.platform.domain.query.CalculateReportQuery; |
| | | import com.ycl.platform.service.CalculateReportService; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.platform.domain.form.CalculateReportForm; |
| | | import com.ycl.platform.domain.query.CalculateReportQuery; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | |
| | | return calculateReportService.backfill(form); |
| | | } |
| | | |
| | | @GetMapping("/{id}") |
| | | @GetMapping("/{contractId}/{whichYear}/{whichMoth}") |
| | | @ApiOperation(value = "详情", notes = "详情") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:detail')") |
| | | public Result detail(@PathVariable("id") Long id) { |
| | | return calculateReportService.detail(id); |
| | | public Result detail(@PathVariable("contractId") Integer contractId,@PathVariable("whichYear") Integer whichYear,@PathVariable("whichMoth") Integer whichMoth) { |
| | | CalculateReportQuery query = new CalculateReportQuery(); |
| | | query.setContractId(contractId); |
| | | query.setWhichYear(whichYear); |
| | | query.setWhichMonth(whichMoth); |
| | | return calculateReportService.detail(query); |
| | | } |
| | | |
| | | @PutMapping("/status/{reportId}") |
| | | @PutMapping("/status/{contractId}/{whichYear}") |
| | | @ApiOperation(value = "修改发布状态", notes = "修改发布状态") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:status')") |
| | | public Result updatePublishStatus(@PathVariable("reportId") Long reportId) { |
| | | return calculateReportService.updatePublishStatus(reportId); |
| | | public Result updatePublishStatus(@PathVariable("contractId") Integer contractId,@PathVariable("whichYear") Integer whichYear) { |
| | | return calculateReportService.updatePublishStatus(contractId,whichYear); |
| | | } |
| | | |
| | | @PutMapping("/status/detail/{id}/{status}") |
| | | @ApiOperation(value = "修改发布状态", notes = "修改发布状态") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:status')") |
| | | public Result updatePublishStatusById(@PathVariable("id") Integer id,@PathVariable("status") String status) { |
| | | |
| | | return calculateReportService.updatePublishStatusById(id,status); |
| | | } |
| | | @PostMapping("/export") |
| | | @ApiOperation(value = "导出", notes = "导出") |
| | | @PreAuthorize("@ss.hasPermi('system:calculate:report:export')") |
| | | public void export(Integer whichYear,Integer whichMonth,Integer whichDay,Integer contractId, HttpServletResponse response) { |
| | | calculateReportService.export(whichYear,whichMonth,whichDay,contractId, response); |
| | | } |
| | | |
| | | } |