From a3cc1d220f8a1de11874bebceba0130d32157ff1 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 30 九月 2025 09:26:32 +0800 Subject: [PATCH] 2025.9.30 1. 联合前端调试数据产品接口(待完成) --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt | 6 +----- src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt | 26 +++++++++++++------------- src/main/kotlin/cn/flightfeather/supervision/common/utils/QueryByCache.kt | 2 +- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdMiddleServiceImpl.kt | 4 ---- src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemCountByArea.kt | 2 +- 5 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/utils/QueryByCache.kt b/src/main/kotlin/cn/flightfeather/supervision/common/utils/QueryByCache.kt index a024094..374cbce 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/common/utils/QueryByCache.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/common/utils/QueryByCache.kt @@ -14,7 +14,7 @@ * @param save 缂撳瓨淇濆瓨鏂规硶 * @return */ - fun <T> queryCache(cache: () -> T?, calculate: () -> T, save: (t: T) -> Unit): T { + fun <T> queryCache(cache: () -> T?, calculate: () -> T, save: (t: T) -> Unit = {}): T { val cacheData = cache.invoke() if (cacheData != null) { return cacheData diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt index 8c6e098..d13bfe1 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdBaseServiceImpl.kt @@ -105,8 +105,7 @@ } } return@queryCache res - }, - save = { } + } ) } @@ -151,7 +150,6 @@ res.sortBy { it.index } return@queryCache res }, - save = { } ) } @@ -202,7 +200,6 @@ res.sortBy { it.index } return@queryCache res }, - save = { } ) } @@ -233,7 +230,6 @@ return@queryCache res }, - save = { } ) } } \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdMiddleServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdMiddleServiceImpl.kt index f59c1d0..458de79 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdMiddleServiceImpl.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DataProdMiddleServiceImpl.kt @@ -59,7 +59,6 @@ } return@queryCache res }, - save = {} ) } @@ -96,7 +95,6 @@ } return@queryCache res }, - save = {} ) } @@ -128,7 +126,6 @@ return@queryCache res }, - save = {} ) } @@ -168,7 +165,6 @@ return@queryCache res }, - save = {} ) } } \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemCountByArea.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemCountByArea.kt index a9be50c..bcd8b2a 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemCountByArea.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/vo/dataprod/middle/DPProblemCountByArea.kt @@ -32,7 +32,7 @@ */ var problemCount: Int = 0 /** - * 闂鏁伴噺鍗犳瘮 + * 鍗曞満鏅棶棰樻暟閲忓潎鍊� */ var ratio: Double = 0.0 } \ No newline at end of file diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt index 5164525..2cc78fd 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/NightConstructionController.kt @@ -11,25 +11,25 @@ @GetMapping("/record/all") fun getRecord( - @RequestParam(value = "cityCode", required = false) cityCode: String?, - @RequestParam("districtCode") districtCode: String, - @RequestParam("page") page: Int, - @RequestParam("perPage") perPage: Int + @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 + @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 + @RequestParam("userId") userId: String, + @RequestParam("fileNum") fileNum: String, + @RequestParam("id") id: Int, ) = nightConstructionService.signFile(userId, fileNum, id) @PostMapping("/record") @@ -41,7 +41,7 @@ @GetMapping("/summary") fun getSummary( - @RequestParam(value = "cityCode", required = false) cityCode: String?, - @RequestParam("districtCode") districtCode: String + @RequestParam(value = "cityCode", required = false) cityCode: String?, + @RequestParam("districtCode") districtCode: String, ) = nightConstructionService.getSummary(cityCode, districtCode) } \ No newline at end of file -- Gitblit v1.9.3