入會申請的問題

問題描述:
對於未申請過入會的人員,需要先加入到會員表中

其實最好的解決辦法:
應該是將審覈審批放在一個xml文件中,但是由於一些一言難盡的問題,不得不採取一些笨拙的方法。

在此過程中涉及的知識點有:

1.Oracle 的邏輯判斷語法
2.freemaker語法
3.jsp語法等

最終的解決辦法:
1.新增了一個專門處理審批的xml文件,
2.xml的內容如下:

<?xml version='1.0' encoding='UTF-8'?>

<query-config>
    <!-- 修改用戶信息-->
    <query id="Q_AUDIT_TRADE_APPLY_2" type="batch" result="easyui">
        <stmt>
            <![CDATA[

            update bi_trade_apply set apply_status=[state], apply_remarks =[remarks]
            where apply_id=[apply_id];
              <#if state=='3'>
          <#if apply_type=='0'>
            update bi_trade_info set trade_status=1,intrade_date=sysdate
            where account=(select account from bi_trade_apply where apply_id=[apply_id]);
          <#elseif apply_type=='1'>
            update bi_trade_info set(sex,birthday,political_status,nation,email,card_type,card_no,qualifications,degree,post,duties,memo,dept_id,tele_phone,leaguer_type)
                            =(select sex,birthday,political_status,nation,email,card_type,card_no,qualifications,degree,post,duties,memo,dept_id,tele_phone,leaguer_type from bi_trade_apply bta where bta.apply_id=[apply_id])
            where account=(select account from bi_trade_apply where apply_id=[apply_id])
          <#elseif apply_type=='2'>
            update bi_trade_info set trade_status=2
            where account=(select account from bi_trade_apply where apply_id=[apply_id]);
           </#if>
           </#if>
          <#if trade_status==-1>
            insert into bi_trade_info(account,name,sex,birthday,political_status,nation,email,card_type,card_no,
            qualifications,degree,post,duties,memo,dept_id,tele_phone,trade_status,intrade_date,leaguer_type)
            select account,name,sex,birthday,political_status,nation,email,card_type,card_no,
            qualifications,degree,post,duties,memo,dept_id,tele_phone,1,sysdate,leaguer_type
            from bi_trade_apply where apply_id=[apply_id];
          <#elseif trade_status==0>
            update bi_trade_info set trade_status=1,intrade_date=sysdate where account=(select account from bi_trade_apply
            where apply_id=[apply_id];
          <#elseif trade_status==2>
            update bi_trade_info set trade_status=1 where account=(select account from bi_trade_apply
            where apply_id=[apply_id]);
          </#if>

            ]]>
        </stmt>
        <processor name="set-value" type="before" seq="0" break="false">
            <param name="var">trade_status</param>
            <param name="sql">
                <![CDATA[
					select nvl(trade_status,-1)
                    from bi_trade_apply bta
                    left join bi_trade_info bti on bta.account=bti.account
                    where bta.apply_id=[apply_id]
				]]>
            </param>
        </processor>




    </query>
</query-config>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章