| | |
| | | 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; |
| | |
| | | @Autowired |
| | | private ICheckIndexCarService carService; |
| | | |
| | | //TODO:统一任务时间 |
| | | public void executeTemplate(Integer templateId) { |
| | | CheckTemplate checkTemplate = templateMapper.selectCheckTemplateById(templateId); |
| | | if (checkTemplate != null) { |
| | |
| | | } |
| | | } |
| | | //储存分数 |
| | | scoreMapper.saveBatch(scoreList); |
| | | 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; |
| | | } |