| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | @Override |
| | | public BigDecimal getSampleLength(String id) { |
| | | BigDecimal result = BigDecimal.ZERO; |
| | | List<MmPredictModelEntity> list = mmPredictModelDao.getSampleLength(id); |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | MmPredictModelEntity entity = mmPredictModelDao.getSampleLength(id); |
| | | if (ObjectUtils.isEmpty(entity)) { |
| | | return result; |
| | | } |
| | | result = list.get(0).getPredictsamplength(); |
| | | result = entity.getPredictsamplength(); |
| | | |
| | | return result; |
| | | } |