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> selectByRvcdList(@Param("rvcdList") List<String> rvcdList);
|
||||||
|
/**
|
||||||
|
* 根据基地流域编码列表批量查询电站
|
||||||
|
*/
|
||||||
|
List<SdEngInfoBH> selectByReachcdList(@Param("rvcdList") List<String> rvcdList);
|
||||||
|
|
||||||
List<StationBasinInfo> selectStationBasinInfo();
|
List<StationBasinInfo> selectStationBasinInfo();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -215,7 +215,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
|||||||
|
|
||||||
if (!allowedRvcdSet.isEmpty() || !directStcdSet.isEmpty()) {
|
if (!allowedRvcdSet.isEmpty() || !directStcdSet.isEmpty()) {
|
||||||
if (!allowedRvcdSet.isEmpty()) {
|
if (!allowedRvcdSet.isEmpty()) {
|
||||||
List<SdEngInfoBH> stationsFromHbrv = engInfoBHMapper.selectByRvcdList(new ArrayList<>(allowedRvcdSet));
|
List<SdEngInfoBH> stationsFromHbrv = engInfoBHMapper.selectByReachcdList(new ArrayList<>(allowedRvcdSet));
|
||||||
for (SdEngInfoBH station : stationsFromHbrv) {
|
for (SdEngInfoBH station : stationsFromHbrv) {
|
||||||
if (station.getStcd() != null) {
|
if (station.getStcd() != null) {
|
||||||
directStcdSet.add(station.getStcd());
|
directStcdSet.add(station.getStcd());
|
||||||
@ -230,7 +230,7 @@ public class FishImportServiceImpl implements IFishImportService {
|
|||||||
directStcdSet.add(station.getStcd());
|
directStcdSet.add(station.getStcd());
|
||||||
}
|
}
|
||||||
if (station.getRvcd() != null) {
|
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>()
|
return findFirst(engInfoBHMapper.selectList(new LambdaQueryWrapper<SdEngInfoBH>()
|
||||||
.select(SdEngInfoBH::getStcd)
|
.select(SdEngInfoBH::getStcd)
|
||||||
.eq(SdEngInfoBH::getStcd, normalizedStationCode)
|
.eq(SdEngInfoBH::getStcd, normalizedStationCode)
|
||||||
.eq(SdEngInfoBH::getRvcd, normalizedRvcd))) != null;
|
.eq(SdEngInfoBH::getReachcd, normalizedRvcd))) != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -331,5 +331,14 @@
|
|||||||
ORDER BY HBRVCD, ORDER_INDEX ASC
|
ORDER BY HBRVCD, ORDER_INDEX ASC
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user