|
@@ -104,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
${params.dataScopePlant}
|
|
|
+ order by d.createdate desc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTBasePointListByPlan" parameterType="TBasePoint" resultMap="TBasePointResult">
|
|
@@ -129,9 +130,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
left join t_base_plant bp on bp.plant_id = d.plant_id
|
|
|
left join t_base_region br on br.region_id = d.region_id
|
|
|
left join t_base_device bd on bd.dev_id = d.dev_id
|
|
|
- where point_id not in (select point_id
|
|
|
- from t_check_checkpoints
|
|
|
- where plan_id = #{planId}) and d.del_flag=0 and d.plant_id= #{plantId}
|
|
|
+ <where>
|
|
|
+ and point_id not in (select point_id
|
|
|
+ from t_check_checkpoints
|
|
|
+ where plan_id = #{planId})
|
|
|
+ and d.del_flag=0
|
|
|
+ and d.plant_id= #{plantId}
|
|
|
+ and d.approve_status=2
|
|
|
+ </where>
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
+ ${params.dataScopePlant}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTBasePointById" parameterType="Long" resultMap="TBasePointResult">
|
|
@@ -282,6 +290,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
update t_base_point set del_flag=1 where point_id = #{pointId}
|
|
|
</delete>
|
|
|
|
|
|
+ <delete id="disabledPoint" parameterType="Long">
|
|
|
+ update t_base_point set approve_status=-1 where point_id = #{pointId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
<delete id="deleteTBasePointByIds" parameterType="String">
|
|
|
update t_base_point set del_flag=1 where point_id in
|
|
|
<foreach item="pointId" collection="array" open="(" separator="," close=")">
|