| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | |
| | | addToList(templateId, checkTemplate, examineTag, templateRuleList, scoreList, indexFace, CheckConstants.Rule_Category_Face); |
| | | } |
| | | } |
| | | |
| | | //储存分数 |
| | | scoreMapper.saveBatch(scoreList); |
| | | //TODO:根据报警分数阈值,添加报警信息 |
| | | |
| | | if(!CollectionUtils.isEmpty(scoreList)) { |
| | | scoreMapper.saveBatch(scoreList); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | BigDecimal score = index.multiply(templateRule.getWeight()); |
| | | scoreFinal = scoreFinal.add(score); |
| | | } catch (Exception e) { |
| | | log.info("反射异常", e); |
| | | log.info("反射异常", e.getMessage()); |
| | | } |
| | | return scoreFinal; |
| | | } |