src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JAScore.kt
@@ -15,12 +15,9 @@
 * 根据自动评分结果进行转换得出
 */
@Component
class JAScore {
class JAScore(private val scoreMapper: ScoreMapper) {
    @Autowired
    lateinit var scoreMapper: ScoreMapper
    fun toDb(e: Evaluation, info: Info) {
    fun toDb(e: Evaluation, isEnable: Boolean) {
        val time = LocalDateTime.ofInstant(e.evaluatetime?.toInstant(), ZoneId.systemDefault())
        val scoreVo = Score().apply {
            sceneId = e.sguid
@@ -30,7 +27,7 @@
            districtCode = e.districtcode
            districtName = e.districtname
            score = transform(e.resultscorebef?.toIntOrNull() ?: 0)
            completion = !info.online
            completion = !isEnable
        }
        val res = scoreMapper.selectByExample(Example(Score::class.java).apply {
@@ -51,7 +48,7 @@
     */
    private fun transform(oldS: Int): Int {
        return when {
            // 基本规范
            // 基本规范(90..94)和规范(>=95)
            oldS >= 90 -> 50
            // 不规范
            oldS >= 50 -> 30