feiyu02
2025-07-30 f75ff7a0fc566dc18b60987b3fa2e65cae4665da
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
package cn.flightfeather.supervision.lightshare.vo
 
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource
import cn.flightfeather.supervision.common.utils.UUIDGenerator
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
import cn.flightfeather.supervision.domain.ds1.entity.Inspection
import cn.flightfeather.supervision.domain.ds1.entity.Itemevaluation
import cn.flightfeather.supervision.domain.ds1.entity.Subtask
import com.fasterxml.jackson.annotation.JsonInclude
 
@JsonInclude(JsonInclude.Include.NON_NULL)
class ItemEvaluationVo : Itemevaluation() {
 
    companion object {
        /**
         * 生成新的一条评分记录
         */
        fun newItemEvaluation(
            rule: Evaluationrule?, subTask: Subtask?, inspection: Inspection?,
            itemRule: EvaluationSubRuleVo,
        ) = Itemevaluation().apply {
                ieguid = UUIDGenerator.generate16ShortUUID()
                iguid = inspection?.guid
                stguid = subTask?.stguid
                sguid = subTask?.scenseid
                sensename = subTask?.scensename
                erguid = rule?.guid
                rulename = rule?.rulename
                ruletype = rule?.ruletype?.toInt()
                ertype = itemRule.ertype
                esrguid = itemRule.guid
                name = itemRule.itemname
                value = itemRule.score.toString()
                extension1 = itemRule.selected.toString()
            }
    }
}