feiyu02
2025-09-30 a3cc1d220f8a1de11874bebceba0130d32157ff1
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package cn.flightfeather.supervision.lightshare.web
 
import cn.flightfeather.supervision.lightshare.service.NightConstructionService
import io.swagger.annotations.Api
import org.springframework.web.bind.annotation.*
 
@Api(tags = ["NightConstructionController"], description = "夜间施工许可证信息API接口")
@RestController
@RequestMapping("/nightwork")
class NightConstructionController(val nightConstructionService: NightConstructionService) {
 
    @GetMapping("/record/all")
    fun getRecord(
        @RequestParam(value = "cityCode", required = false) cityCode: String?,
        @RequestParam("districtCode") districtCode: String,
        @RequestParam("page") page: Int,
        @RequestParam("perPage") perPage: Int,
    ) = nightConstructionService.getRecord(cityCode, districtCode, page, perPage)
 
    @GetMapping("/record")
    fun getNightWorkFile(
        @RequestParam("userId") userId: String,
        @RequestParam(value = "isRead", required = false) isRead: Boolean?,
        @RequestParam("page") page: Int,
        @RequestParam("perPage") perPage: Int,
    ) = nightConstructionService.getNightWorkFile(userId, isRead, page, perPage)
 
    @PostMapping("/sign")
    fun signFile(
        @RequestParam("userId") userId: String,
        @RequestParam("fileNum") fileNum: String,
        @RequestParam("id") id: Int,
    ) = nightConstructionService.signFile(userId, fileNum, id)
 
    @PostMapping("/record")
    fun updateRecord(
        @RequestParam recordId: Int,
        @RequestParam(required = false) userId: String?,
        @RequestParam(required = false) sceneId: String?,
    ) = resPack { nightConstructionService.updateRecord(recordId, userId, sceneId) }
 
    @GetMapping("/summary")
    fun getSummary(
        @RequestParam(value = "cityCode", required = false) cityCode: String?,
        @RequestParam("districtCode") districtCode: String,
    ) = nightConstructionService.getSummary(cityCode, districtCode)
}