1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?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.ProcessSpecVersionDepartmentMapper">
    <select id="getDepartPermsByPsvId" resultType="org.jeecg.modules.system.entity.MdcProduction">
        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_process_spec_version_department where psv_id=#{psvId}) p
                 on u.id=p.depart_id
    </select>
    <select id="getDepartNonPermsByPsvId" resultType="org.jeecg.modules.system.entity.MdcProduction">
        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_process_spec_version_department where psv_id=#{psvId})
    </select>
</mapper>