更新监测点时新增新能源站字段
This commit is contained in:
@@ -198,6 +198,6 @@
|
||||
<select id="getLineByDeptIdAndNewStation" resultType="string">
|
||||
select pdl.Line_Id from pq_dept_line pdl
|
||||
inner join pq_line_detail pld on pdl.Line_Id = pld.Id
|
||||
where pdl.Id = #{id} and pld.New_Station_Id in (select pns.id from pq_new_station pns where pns.station_type = #{stationType})
|
||||
where pdl.Id = #{id} and pld.New_Station_Id in (select pns.id from pq_new_station pns where pns.station_type = #{stationType} and pns.state = 1)
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.device.pq.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
@@ -80,7 +81,9 @@ public class NewStationServiceImpl extends ServiceImpl<NewStationMapper, NewStat
|
||||
|
||||
@Override
|
||||
public NewStation selectById(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
LambdaQueryWrapper<NewStation> lambdaUpdateWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaUpdateWrapper.eq(NewStation::getId,id).eq(NewStation::getState,1);
|
||||
return this.baseMapper.selectOne(lambdaUpdateWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user