zj_wfl_workflow.lwm 7.33 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
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 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:f="leaf.database.features" xmlns:bm="http://www.leaf-framework.org/schema/bm" alias="t1" baseTable="ZJ_WFL_WORKFLOW">
    <bm:fields>
        <bm:field name="workflow_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_ID" prompt="ZJ_WFL_WORKFLOW.WORKFLOW_ID"/>
        <bm:field name="workflow_code" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="WORKFLOW_CODE" prompt="工作流代码" queryWidth="80"/>
        <bm:field name="workflow_desc" databaseType="VARCHAR2" datatype="java.lang.String" forDisplay="true" forQuery="true" physicalName="WORKFLOW_DESC" prompt="工作流描述" queryWidth="130"/>
        <bm:field name="workflow_type_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="WORKFLOW_TYPE_ID" prompt="ZJ_WFL_WORKFLOW.WORKFLOW_TYPE_ID"/>
        <bm:field name="workflow_type_code" forInsert="false" forUpdate="false"/>
        <bm:field name="workflow_type_desc" forInsert="false" forUpdate="false"/>
        <bm:field name="sub_category" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SUB_CATEGORY" prompt="ZJ_WFL_WORKFLOW.SUB_CATEGORY"/>
        <bm:field name="sub_category_desc" forInsert="false" forUpdate="false"/>
        <bm:field name="enabled_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="ENABLED_FLAG" prompt="ZJ_WFL_WORKFLOW.ENABLED_FLAG"/>
        <bm:field name="can_cancel" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="CAN_CANCEL" prompt="是否可收回"/>
        <bm:field name="enabled_flag_desc" forInsert="false" forUpdate="false"/>
        <bm:field name="display_type" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="DISPLAY_MY_SUB_TYPE" prompt="ZJ_WFL_WORKFLOW.DISPLAY_MY_SUB_TYPE"/>
        <bm:field name="display_service_id" databaseType="NUMBER" datatype="java.lang.Long" physicalName="DISPLAY_MY_SUB_SERVICE_ID" prompt="ZJ_WFL_WORKFLOW.DISPLAY_MY_SUB_SERVICE_ID"/>
        <bm:field name="display_service_desc" forInsert="false" forUpdate="false"/>
        <bm:field name="display_service_name" forInsert="false" forUpdate="false"/>
        <bm:field name="show_approve_history_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SHOW_APPROVE_HISTORY_FLAG" prompt="ZJ_WFL_WORKFLOW.SHOW_APPROVE_HISTORY_FLAG"/>
        <bm:field name="show_all_approve_ht_flag" databaseType="VARCHAR2" datatype="java.lang.String" physicalName="SHOW_ALL_APPROVE_HT_FLAG" prompt="ZJ_WFL_WORKFLOW.SHOW_ALL_APPROVE_HT_FLAG"/>
        <bm:field name="serial_number" databaseType="NUMBER" datatype="java.lang.Long" physicalName="SERIAL_NUMBER" prompt="序号"/>
    </bm:fields>
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
    			select t1.workflow_id,
				       t1.workflow_code,
				       t1.workflow_desc,
				       t1.workflow_type_id,
				       t1.workflow_type_code,
				       t1.workflow_type_desc,
				       t1.sub_category,
				       t1.sub_category_desc,
				       t1.enabled_flag,
				       t1.can_cancel,
				       t1.enabled_flag_desc,
				       t1.display_type,
				       t1.display_service_id,
				       t1.display_service_desc,
				       t1.display_service_name,
				       t1.show_approve_history_flag,
				       t1.show_all_approve_ht_flag,
				       t1.serial_number
				  from zj_wfl_workflow_v t1
				  #WHERE_CLAUSE#
				  order by t1.serial_number,t1.workflow_type_code,t1.workflow_code
    		]]></bm:query-sql>
        </bm:operation>
        <bm:operation name="delete">
            <bm:update-sql><![CDATA[
            begin
				zj_wfl_workflow_pkg.delete_wfl_workflow
				(
					p_workflow_id        	  => ${@workflow_id},					
					p_user_id                 => ${/session/@user_id}
				);
			end;
			]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="insert">
            <bm:parameters>
                <bm:parameter name="workflow_id" input="true" inputPath="@workflow_id" output="true" outputPath="@workflow_id"/>
            </bm:parameters>
            <bm:update-sql><![CDATA[
	            begin
					 zj_wfl_workflow_pkg.workflow_handle(p_sql_type						=> 'INSERT',
					 									 p_workflow_id      			=> ${@workflow_id},
										                 p_workflow_code    			=> ${@workflow_code},
										                 p_workflow_desc    			=> ${@workflow_desc},
										                 p_workflow_type_id 			=> ${@workflow_type_id},
										                 p_sub_category     			=> ${@sub_category},
										                 p_enabled_flag     			=> ${@enabled_flag},
										                 p_can_cancel     				=> ${@can_cancel},
										                 p_display_type      			=> ${@display_type},
										                 p_display_service_id			=> ${@display_service_id},
										                 p_show_approve_history_flag	=> ${@show_approve_history_flag},
										                 p_show_all_approve_ht_flag		=> ${@show_all_approve_ht_flag},
										                 p_serial_number				=> ${@serial_number},
										                 p_user_id          			=> ${/session/@user_id});
			
				end;
			]]></bm:update-sql>
        </bm:operation>
        <bm:operation name="update">
            <bm:update-sql><![CDATA[
		   		begin
					 zj_wfl_workflow_pkg.workflow_handle(p_sql_type						=> 'UPDATE',
					 									 p_workflow_id      			=> ${@workflow_id},
										                 p_workflow_code    			=> ${@workflow_code},
										                 p_workflow_desc    			=> ${@workflow_desc},
										                 p_workflow_type_id 			=> ${@workflow_type_id},
										                 p_sub_category     			=> ${@sub_category},
										                 p_enabled_flag     			=> ${@enabled_flag},
										                 p_can_cancel     				=> ${@can_cancel},
										                 p_display_type      			=> ${@display_type},
										                 p_display_service_id			=> ${@display_service_id},
										                 p_show_approve_history_flag	=> ${@show_approve_history_flag},
										                 p_show_all_approve_ht_flag		=> ${@show_all_approve_ht_flag},
										                 p_serial_number				=> ${@serial_number},
										                 p_user_id          			=> ${/session/@user_id});
			
				end;
			]]></bm:update-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field field="workflow_id" queryOperator="="/>
        <bm:query-field field="workflow_code" queryOperator="like"/>
        <bm:query-field field="workflow_type_id" queryOperator="like"/>
        <bm:query-field field="workflow_desc" queryOperator="like"/>
        <bm:query-field field="sub_category" queryOperator="="/>
        <bm:query-field field="enabled_flag" queryOperator="="/>
    </bm:query-fields>
    <!-- <bm:data-filters>
        <bm:data-filter enforceOperations="query" expression="exists             (select 1 from  zj_wfl_workflow_node t,zj_wfl_workflow_assign_rule r,exp_emp_assign_e_v ex where t.workflow_id=t1.WORKFLOW_ID            and r.assign_source_id=t.node_id and r.company_id=${/session/@company_id} and r.approval_rule=&apos;APPOINTED_COM_POS&apos;         and ex.user_id=${/session/@user_id} )"/>
    </bm:data-filters> -->
    <bm:features>
        <f:standard-who/>
    </bm:features>
    <bm:primary-key>
        <bm:pk-field name="workflow_id"/>
    </bm:primary-key>
</bm:model>