fix: 过鱼填报逻辑优化
This commit is contained in:
parent
d20269b156
commit
4522383206
@ -44,7 +44,10 @@ public interface SdEngInfoBHMapper extends BaseMapper<SdEngInfoBH> {
|
||||
* 根据基地流域编码列表批量查询电站
|
||||
*/
|
||||
List<SdEngInfoBH> selectByRvcdList(@Param("rvcdList") List<String> rvcdList);
|
||||
|
||||
/**
|
||||
* 根据基地流域编码列表批量查询电站
|
||||
*/
|
||||
List<SdEngInfoBH> selectByReachcdList(@Param("rvcdList") List<String> rvcdList);
|
||||
|
||||
List<StationBasinInfo> selectStationBasinInfo();
|
||||
}
|
||||
|
||||
@ -215,7 +215,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
|
||||
if (!allowedRvcdSet.isEmpty() || !directStcdSet.isEmpty()) {
|
||||
if (!allowedRvcdSet.isEmpty()) {
|
||||
List<SdEngInfoBH> stationsFromHbrv = engInfoBHMapper.selectByRvcdList(new ArrayList<>(allowedRvcdSet));
|
||||
List<SdEngInfoBH> stationsFromHbrv = engInfoBHMapper.selectByReachcdList(new ArrayList<>(allowedRvcdSet));
|
||||
for (SdEngInfoBH station : stationsFromHbrv) {
|
||||
if (station.getStcd() != null) {
|
||||
directStcdSet.add(station.getStcd());
|
||||
@ -230,7 +230,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
directStcdSet.add(station.getStcd());
|
||||
}
|
||||
if (station.getRvcd() != null) {
|
||||
allowedRvcdSet.add(station.getRvcd());
|
||||
allowedRvcdSet.add(station.getReachcd());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1146,7 +1146,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
||||
return findFirst(engInfoBHMapper.selectList(new LambdaQueryWrapper<SdEngInfoBH>()
|
||||
.select(SdEngInfoBH::getStcd)
|
||||
.eq(SdEngInfoBH::getStcd, normalizedStationCode)
|
||||
.eq(SdEngInfoBH::getRvcd, normalizedRvcd))) != null;
|
||||
.eq(SdEngInfoBH::getReachcd, normalizedRvcd))) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -331,5 +331,14 @@
|
||||
ORDER BY HBRVCD, ORDER_INDEX ASC
|
||||
</select>
|
||||
|
||||
<select id="selectByReachcdList" resultMap="BaseResultMap">
|
||||
SELECT * FROM SD_ENGINFO_B_H
|
||||
WHERE REACHCD IN
|
||||
<foreach collection="rvcdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
ORDER BY RVCD, ORDER_INDEX ASC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user