Commit d1be6cdc authored by linruibiao's avatar linruibiao

接口编写

parent 1023f6af
...@@ -21,4 +21,35 @@ ...@@ -21,4 +21,35 @@
<result property="recordStatus" column="record_status"/> <result property="recordStatus" column="record_status"/>
<result property="description" column="description"/> <result property="description" column="description"/>
</resultMap> </resultMap>
<select id="selectDraftList" resultType="com.syc.slm.slmbi.entity.InstrumentPanelDraft">
select * from instrument_panel_draft where panel_id in
<if test="panelIds!=null">
(
<foreach collection="panelIds" item="id" separator=",">
#{id}
</foreach>
)
</if>
and access_permission='public'
union ALL
select * from instrument_panel_draft where panel_id in
<if test="panelIds!=null">
(
<foreach collection="panelIds" item="id" separator=",">
#{id}
</foreach>
)
</if>
and access_permission='private' and IFNULL(updater,creator)=#{userId}
union ALL
select * from instrument_panel_draft where panel_id in
<if test="panelIds!=null">
(
<foreach collection="panelIds" item="id" separator=",">
#{id}
</foreach>
)
</if>
and access_permission='custom' and check_panel_permissions(#{appId},id,#{officeIds},#{userId},#{roleId})>0
</select>
</mapper> </mapper>
...@@ -33,4 +33,17 @@ ...@@ -33,4 +33,17 @@
select id,`name`,parent_id from instrument_panel_group select id,`name`,parent_id from instrument_panel_group
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="selectGroupByIds" resultType="com.syc.slm.slmbi.vo.PanelTreeNodeVo">
select id,`name`,parent_id,'group' node_type from instrument_panel_group
<if test="finalPanelIds!=null">
where id IN (
<foreach collection="finalPanelIds" item="id" separator=",">
#{id}
</foreach>
)
</if>
<if test="name!=null">
and `name` like '%${name}%'
</if>
</select>
</mapper> </mapper>
...@@ -45,4 +45,22 @@ ...@@ -45,4 +45,22 @@
join instrument_panel_group g on p.group_id =g.id join instrument_panel_group g on p.group_id =g.id
${ew.customSqlSegment} ${ew.customSqlSegment}
</select> </select>
<select id="selectPanelByIds" resultType="com.syc.slm.slmbi.vo.PanelTreeNodeVo">
select
id,
`name`,
group_id parent_id,
'panel' node_type
from instrument_panel
<if test="finalPanelIds!=null">
where id IN (
<foreach collection="finalPanelIds" item="id" separator=",">
#{id}
</foreach>
)
</if>
<if test="name!=null">
and `name` like '%${name}%'
</if>
</select>
</mapper> </mapper>
...@@ -29,4 +29,5 @@ ...@@ -29,4 +29,5 @@
) )
</if> </if>
</update> </update>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment