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)
|
}
|