| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
| | | <mapper namespace="org.jeecg.modules.dnc.mapper.ComponentDepartmentMapper"> |
| | | <select id="getDepartPermsByComponentId" resultType="org.jeecg.modules.dnc.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | | , u.parent_id |
| | | , u.rank_level |
| | | , u.priority |
| | | from sys_department u |
| | | <select id="getDepartPermsByComponentId" resultType="org.jeecg.modules.system.entity.MdcProduction" parameterType="String"> |
| | | select u.id |
| | | , u.production_name |
| | | , u.parent_id |
| | | , u.production_order |
| | | , u.org_type |
| | | , org_code |
| | | from mdc_production u |
| | | inner join |
| | | (select depart_id from nc_component_department where component_id=#{componentId}) p |
| | | on u.depart_id=p.depart_id |
| | | on u.id=p.depart_id |
| | | </select> |
| | | |
| | | <select id="getDepartNonPermsByComponentId" resultType="org.jeecg.modules.dnc.ucenter.Department" parameterType="String"> |
| | | select u.depart_id |
| | | , u.depart_name |
| | | , u.depart_code |
| | | , u.parent_id |
| | | , u.rank_level |
| | | , u.priority |
| | | from sys_department u |
| | | where u.depart_id not in (select depart_id from nc_component_department where component_id=#{componentId}) |
| | | <select id="getDepartNonPermsByComponentId" resultType="org.jeecg.modules.system.entity.MdcProduction" parameterType="String"> |
| | | select u.id |
| | | , u.production_name |
| | | , u.parent_id |
| | | , u.production_order |
| | | , u.org_type |
| | | , org_code |
| | | from mdc_production u |
| | | where u.id not in (select depart_id from nc_component_department where component_id=#{componentId}) |
| | | </select> |
| | | </mapper> |