|
@@ -29,6 +29,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
@@ -203,10 +204,13 @@ public class AssoGroupFeatureService extends ServiceImpl<AssoGroupFeatureMapper,
|
|
|
Integer groupId1 = queryFeatureHistoryDTO.getGroupId();
|
|
|
AssoGroupFeature assoGroupFeature = new AssoGroupFeature();
|
|
|
if (featureId1 != null && groupId1 != null) {
|
|
|
- assoGroupFeature = this.getOne(new LambdaQueryWrapper<AssoGroupFeature>()
|
|
|
+ List<AssoGroupFeature> list = this.list(new LambdaQueryWrapper<AssoGroupFeature>()
|
|
|
.eq(AssoGroupFeature::getFeatureId, featureId1)
|
|
|
- .eq(AssoGroupFeature::getGroupId, groupId1),
|
|
|
- false);
|
|
|
+ .eq(AssoGroupFeature::getGroupId, groupId1)
|
|
|
+ .orderByDesc(BaseEntity::getId));
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
+ assoGroupFeature = list.get(0);
|
|
|
+ }
|
|
|
} else {
|
|
|
//根据特征id查询证据组合和特征关联
|
|
|
assoGroupFeature = this.getById(featureGroupId);
|