feiyu02
2024-01-09 c1becf4cbd2e99601ce011c14b8742427249cfb4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package cn.flightfeather.supervision.business.autooutput.score.restaurant
 
import cn.flightfeather.supervision.business.autooutput.score.ScoreItem
import cn.flightfeather.supervision.domain.ds1.entity.Problemlist
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import javax.annotation.PostConstruct
 
/**
 * Date 2022/1/20 16:14
 * Created by feiyu
 */
@Component
class ReScoreItem8: ScoreItem() {
 
    companion object {
        private lateinit var instance: ReScoreItem8
    }
 
    @PostConstruct
    fun init() {
        instance = this
    }
 
    override var id: String = "yAAn3zm6e2PenHeJ"
 
    override var name: String = "整改措施及效果"
 
    /**
     * 执法检查汇总情况
     * 选项如下:
     *      1.全部按时整改并及时提交材料
     *      2.问题部分整改或不及时提供材料
     *      3.问题无整改
     */
    override fun otherProblem(size: Int): List<Int>? {
        val p = problemlistMapper.selectByExample(Example(Problemlist::class.java).apply {
            createCriteria().andEqualTo("stguid", evaluationScene.subTask.value?.stguid)
//                .andGreaterThanOrEqualTo("time", info.sTime)
//                .andLessThan("time", info.eTime)
        })
        var i = 0
 
        val total = p.size
        var changed = 0
        p.forEach {
            if (it.ischanged == true) {
                changed++
            }
        }
        return when {
            changed == 0 && total > 0 -> listOf(2)
            changed < total -> listOf(1)
            else -> null
        }
    }
}