feiyu02
2022-07-20 39e208b6b0482a25c77e53590087c02d9d937563
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
28
29
30
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.lightshare.service.LedgerService
import cn.flightfeather.supervision.lightshare.vo.CopyLedgerVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.web.bind.annotation.*
import org.springframework.web.multipart.MultipartFile
 
@Api(tags = ["LedgerController"], description = "台账管理API接口")
@RestController
@RequestMapping("/ledger")
class LedgerController(private val ledgerService: LedgerService){
 
    @ApiOperation("获取某类场景的台账上传完成情况")
    @GetMapping("/summary")
    fun getLedgerSummary(
        @RequestParam("time") time: String,
        @RequestParam("districtCode") districtCode: String,
        @RequestParam("sceneType") sceneType: Byte,
    ) = ledgerService.getLedgerSummary(time, districtCode, sceneType)
 
    @ApiOperation("复制场景的台账")
    @PostMapping("/copy")
    fun copyLedger(
        @RequestParam("userId") userId: String,
        @RequestParam("time") time: String,
        @RequestBody copyLedgerList: List<CopyLedgerVo>
    ) = ledgerService.copyLedger(userId, time, copyLedgerList)
}