From 30d46d06fb4153e48df281d3008ed90935b3c06d Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期二, 19 七月 2022 16:45:08 +0800
Subject: [PATCH] 1. 新增扬尘监测数据超标情况表
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt | 63 +++++++++++++++++++++++++++----
1 files changed, 54 insertions(+), 9 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
index dbcdd84..647b09e 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/SearchServiceImpl.kt
@@ -1,5 +1,11 @@
package cn.flightfeather.supervision.lightshare.service.impl
+import cn.flightfeather.supervision.business.report.DataSource
+import cn.flightfeather.supervision.business.report.DbMapper
+import cn.flightfeather.supervision.business.report.file.ReportOne
+import cn.flightfeather.supervision.business.report.file.ReportThree
+import cn.flightfeather.supervision.business.report.file.ReportTwo
+import cn.flightfeather.supervision.business.report.template.*
import cn.flightfeather.supervision.common.utils.*
import cn.flightfeather.supervision.domain.ds1.entity.*
import cn.flightfeather.supervision.domain.ds1.mapper.*
@@ -36,19 +42,58 @@
val scoreMapper: ScoreMapper,
val inspectionMapper: InspectionMapper,
val taskMapper: TaskMapper,
- val monitorobjectversionMapper: MonitorobjectversionMapper
+ val monitorobjectversionMapper: MonitorobjectversionMapper,
+ val evaluationruleMapper: EvaluationruleMapper,
+ val evaluationsubruleMapper: EvaluationsubruleMapper2,
+ val evaluationMapper: EvaluationMapper,
+ val itemevaluationMapper: ItemevaluationMapper
) : SearchService {
private val dateUtil = DateUtil()
- override fun writeToFile(config: ExcelConfigVo) {
- val fileName = "target/${dateUtil.DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
+ override fun writeToFile(config: ExcelConfigVo, mode:Int) {
+ val dbMapper = DbMapper(
+ scenseMapper,
+ problemlistMapper,
+ problemtypeMapper,
+ subtaskMapper,
+ monitorobjectversionMapper,
+ sceneConstructionSiteMapper,
+ sceneMixingPlantMapper,
+ sceneStorageYardMapper,
+ sceneWharfMapper,
+ taskMapper,
+ evaluationruleMapper, evaluationsubruleMapper, evaluationMapper, itemevaluationMapper
+ )
+ val dataSource = DataSource(config, dbMapper)
+ val t = when (mode) {
+// //闂涓庢暣鏀硅窡韪眹鎬昏〃
+// 0 -> ProDetailSummary(dataSource)
+// //鍒嗚闀囬棶棰樻暣鏀瑰垎鏋愭眹鎬昏〃
+// 1 -> ProAnalysisSummary(dataSource)
+//
+// //瑙勮寖鎬ц瘎浼拌鎯呰〃
+// 2 -> ScoreDetailSummary(dataSource)
+// //鍒嗚闀囪鑼冩�у垎鏋愯〃
+// 3 -> ScoreAnalysisSummary(dataSource)
+//
+// //闂涓庢暣鏀瑰垎绫荤粺璁¤〃
+// 4 -> ProTypeDetailSummary(dataSource)
+// //闂涓庢暣鏀瑰垎绫绘帓鍚�
+// 5 -> ProTypeRankSummary(dataSource)
+// //鏈堝害涓昏鎴栧吀鍨嬮棶棰樺垎鏋愯〃
+// 6 -> ProTypeRankMainSummary(dataSource)
+// //宸ュ湴鏂藉伐闃舵闂鍒嗙被鍒嗘瀽琛�
+// 7 -> ProTypeStatusSummary(dataSource)
- val out = FileOutputStream(fileName)
-// val heads = getTableTitles(config.sceneType, config.districtCode)
-// val contents = getTableContents(config, heads.size)
- val r = getTable(2, config)
- ExcelUtil.write2(out, r.first, r.second)
+ 8 -> ReportOne(dataSource)
+ 9 -> ReportTwo(dataSource)
+ 10 -> ReportThree(dataSource)
+
+ else -> null
+ }
+// t?.execute()
+ t?.toFile("target/")
}
override fun getExcel(config: ExcelConfigVo, response: HttpServletResponse): HttpServletResponse {
@@ -517,7 +562,7 @@
//鍘熸湁鐨勭涓�琛岃〃澶村鍔�1琛岃璺ㄥ害,鍚屾椂鏂扮殑绗簩琛岃〃澶存坊鍔犵┖浣�
head[0].forEach {
(it as ExcelUtil.MyCell).rowSpan++
- h2.add(0, "")
+// h2.add(0, "")
}
//鍚堝苟琛ㄥご
head[0].addAll(h1)
--
Gitblit v1.9.3