From b992b368da14ccd6b5f8c45496eaff7f3003ca8a Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 19 一月 2026 17:31:45 +0800
Subject: [PATCH] 2026.1.19 1. 新增用户业务配置表和用户业务配置结果记录表
---
src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt | 54 ++++++++----------------------------------------------
1 files changed, 8 insertions(+), 46 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt b/src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt
index 29092cd..62138e6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt
@@ -38,6 +38,8 @@
// private val SCENE_TYPE = SceneType.Restaurant
private val SCENE_TYPE = SceneType.VehicleRepair
+
+ private val district = "寰愭眹鍖�"
}
@PostConstruct
@@ -94,7 +96,7 @@
}
fun go(_year: Int? = null, _month: Int? = null) {
- val fileName = "${SCENE_TYPE.des}鑷姩璇勫垎-${DateUtil.DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
+ val fileName = "${district}${SCENE_TYPE.des}鑷姩璇勫垎-${DateUtil.DateToString(Date(), "yyyy-MM-ddhhmmss")}.xls"
// val filePath = "E:\\宸ヤ綔\\寮�鍙慭\椋炵窘鐜app\\鑷姩璇勫垎\\${SCENE_TYPE.des}\\$fileName"
val filePath = "C:\\work\\宸ヤ綔\\绗笁鏂圭洃绠\鑷姩璇勫垎\\${SCENE_TYPE.des}\\$fileName"
val out = FileOutputStream(File(filePath))
@@ -103,9 +105,10 @@
val userList = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
createCriteria().andEqualTo("usertypeid", UserType.Enterprise.value.toByte())
- // FIXME: 2021/4/28 鍦烘櫙绫诲瀷
+ .andEqualTo("extension1", district)
.andEqualTo("extension2", SCENE_TYPE.value.toString())
.andEqualTo("isenable", true)
+ and(createCriteria().orNotEqualTo("workno", "test").orIsNull("workno"))
// orderBy("workno")
})
@@ -160,9 +163,9 @@
}
val info = Info(
- it.guid,
- it.acountname,
- it.realname,
+ it?.guid,
+ it?.acountname,
+ it?.realname,
SCENE_TYPE,
year,
month,
@@ -375,47 +378,6 @@
name = itemRule.itemname
value = itemRule.extension1 ?: "0"
extension1 = (itemRule.extension1 != null).toString()
- }
-
- private fun write2File(info: Info, evaluations: List<Evaluation>, topItems: MutableList<Evaluationsubrule>,
- rules: MutableList<Pair<Evaluationsubrule, MutableList<Evaluationsubrule>>>) {
-
- val heads = mutableListOf<Array<String>>()
- val contents = mutableListOf<Array<Any>>()
- topItems.forEach {
- val cList = mutableListOf<Any>()
- cList.add(it.itemname ?: "")
- val array1 = mutableListOf<ExcelUtil.MyCell>()
- val array2 = mutableListOf<ExcelUtil.MyCell>()
- val array3 = mutableListOf<ExcelUtil.MyCell>()
- for (r in rules) {
- if (r.first.fatherid == it.guid || r.first.guid == it.guid) {
- array1.add(ExcelUtil.MyCell(r.first.itemname?:"", 0))
-
- r.second.forEach { s ->
- if (s.fatherid == r.first.guid) {
- array2.add(ExcelUtil.MyCell(s.itemname?:"", 1))
- array3.add(ExcelUtil.MyCell(s.extension1?:"", 1))
- array1.last().rowSpan++
- }
- }
- }
- }
- cList.add(array1.toTypedArray())
- cList.add(array2.toTypedArray())
- cList.add(array3.toTypedArray())
- contents.add(cList.toTypedArray())
- }
- evaluations.forEach {
- if ((it.ertype?.toInt() == 0)) {
- val totalScoreList = mutableListOf<Any>()
- totalScoreList.add("鎬诲垎")
- totalScoreList.add(it.resultscorebef ?: "0")
- contents.add(totalScoreList.toTypedArray())
- }
- }
-
- ExcelUtil.write2(heads, contents, workbook!!, info.userName ?: "鏈煡鐢ㄦ埛")
}
private fun addToFile(contents: MutableList<Array<Any>>, info: Info, evaluations: List<Evaluation>, topItems: MutableList<Evaluationsubrule>,
--
Gitblit v1.9.3