riku
2022-06-09 9867f6d5c5bccfe52b878c344c536905dd6b309e
src/main/kotlin/cn/flightfeather/supervision/common/score/item/ScoreItem_6.kt
@@ -6,6 +6,8 @@
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Component
import tk.mybatis.mapper.entity.Example
import java.time.LocalDate
import java.time.ZoneId
import javax.annotation.PostConstruct
@Component
@@ -32,6 +34,8 @@
    override var maxScore: Int = 10
    override fun calScore(): Pair<Int, Int> {
        val startTime = LocalDate.of(info.year, sMonth, 1).atStartOfDay(ZoneId.systemDefault())
        val lastTime = LocalDate.of(info.year, eMonth, 1).plusMonths(1).atStartOfDay(ZoneId.systemDefault())
        // FIXME: 2021/4/26 涉执法意见、责令整改或行政处罚,扣除全部分数
        val r5 = scoreItem5.execute(info)
        if (r5.first != 0) {
@@ -40,6 +44,8 @@
        val complaints = complaintMapper.selectByExample(Example(Complaint::class.java).apply {
            createCriteria().andEqualTo("cpSceneid", info.userId)
                .andGreaterThanOrEqualTo("cpTime", startTime)
                .andLessThan("cpTime", lastTime)
        })
        
        return if (condition1(complaints)) {