riku
2021-12-10 98d774555f6207ac07dbfb9c542b1b489839b827
1. 自动评分调整
已修改5个文件
42 ■■■■ 文件已修改
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_2.kt 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/application.yml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/test/kotlin/cn/flightfeather/supervision/common/score/AutoScoreTest.kt 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/kotlin/cn/flightfeather/supervision/SupervisionApplication.kt
@@ -21,7 +21,7 @@
    @Bean
    fun runner() = ApplicationRunner {
        webSocketServer.start()
        taskController.run()
//        taskController.run()
    }
}
src/main/kotlin/cn/flightfeather/supervision/common/score/AutoScore.kt
@@ -280,21 +280,17 @@
                }
            } ?: 0
            // 写入数据库
//            if (r > 0) {
//                evaluationList.forEach { el -> evaluationMapper.insert(el) }
//                itemevaluationList.forEach { il -> itemevaluationMapper.insert(il) }
                for (e in evaluationList) {
                    if (e.ertype?.toInt()?.equals(0) == true) {
                        finalScore(e, year, eMonth, period)
                        break
                    }
                }
//            for (e in evaluationList) {
//                if (e.ertype?.toInt()?.equals(0) == true) {
//                    finalScore(e, year, eMonth, period)
//                    break
//                }
//            }
        }
        // 写入文档
//        ExcelUtil.write2(emptyList(), contents, workbook)
//        workbook.write(out)
        ExcelUtil.write2(emptyList(), contents, workbook)
        workbook.write(out)
        workbook.close()
        out.flush()
        out.close()
src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_2.kt
@@ -68,11 +68,11 @@
//                }
//            }
//        }
//        return true
        return true
        // FIXME: 2021/4/26 季度内台账不得分的,可认定为缺正规环评审批文件,扣10分 
        val r3 = scoreItem3.execute(info)
        val r4 = scoreItem4.execute(info)
        return !(r3.second == 0 && r4.second == 0)
//        val r3 = scoreItem3.execute(info)
//        val r4 = scoreItem4.execute(info)
//        return !(r3.second == 0 && r4.second == 0)
    }
}
src/main/resources/application.yml
@@ -12,14 +12,14 @@
#    password: 123456
    #-TestEnd-
    url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
    username: ledger
    password: ledger_fxxchackxr
#    url: jdbc:mysql://localhost:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#    username: ledger
#    password: ledger_fxxchackxr
    #   开发远程服务器
#    url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
#    username: remoteU1
#    password: eSoF8DnzfGTlhAjE
    url: jdbc:mysql://47.100.191.150:3306/ledger?serverTimezone=Asia/Shanghai&prepStmtCacheSize=517&cachePrepStmts=true&autoReconnect=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
    username: remoteU1
    password: eSoF8DnzfGTlhAjE
    initialSize: 5
    minIdle: 5
src/test/kotlin/cn/flightfeather/supervision/common/score/AutoScoreTest.kt
@@ -20,6 +20,6 @@
    @Test
    fun go() {
        autoScore.go(2021, 4)
        autoScore.go(2021, 7)
    }
}