P15GEN2\59518
2024-05-29 d4210c7c4b04abde20037ea8aa0f54ef8a2649aa
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
27
28
29
30
31
32
33
34
35
36
<?xml version="1.0" encoding="UTF-8" ?>
    
<sqls>
    <dataSpace name="authorization">
    
        <sql name="getAuthorizeTemplate">
        <![CDATA[
            select sys_template_authorization.*,
                sys_template_authorization_target.category_code,
                sys_template_authorization_target.category_name,
                sys_template_authorization_target.term_code,
                sys_template_authorization_target.term_name
            from sys_template_authorization_target
            left join sys_template_authorization 
                on sys_template_authorization_target.template_id = sys_template_authorization.id
            where sys_template_authorization_target.company_id = '@{company_id}'
                and sys_template_authorization_target.bu_id = '@{bu_id}'
                and sys_template_authorization_target.category_code = '@{category_code}'
                and sys_template_authorization_target.term_code = '@{term_code}'
        ]]>    
        </sql>
        
        <sql name="createAuthorizeProduces">
            <![CDATA[
            insert into md_org_account_hospital_product (
                id, parent_id, product_id, product_name
            )
            select UUID_SHORT(), '@{authorize_id}', product_id, product_name
            from md_org_account_hospital_apply_product 
            where parent_id = '@{apply_id}'
            ]]>    
        </sql>        
        
    </dataSpace>
    
</sqls>