feiyu02
2024-11-19 752e00503f672ddfe2066afb6c235721a3a912b5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.lightshare.service.HazardousWasteService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RequestParam
import org.springframework.web.bind.annotation.RestController
 
@Api(tags = ["危废相关API接口"])
@RestController
@RequestMapping("/hw")
class HazardousWasteController(val hazardousWasteService: HazardousWasteService) {
 
    @ApiOperation(value = "获取用户所属企业的危废备案信息")
    @GetMapping("/file")
    fun getFile(@ApiParam(value = "用户id") @RequestParam("userId") userId: String) = hazardousWasteService.getFile(userId)
 
    @ApiOperation(value = "获取用户所属企业的危废处置记录")
    @GetMapping("/record")
    fun getRecord(
        @ApiParam(value = "用户id") @RequestParam("userId") userId: String,
        @ApiParam(value = "年份") @RequestParam(value = "year", required = false) year: String?
    ) = hazardousWasteService.getRecord(userId, year)
}