入会申请的问题

问题描述:
对于未申请过入会的人员,需要先加入到会员表中

其实最好的解决办法:
应该是将审核审批放在一个xml文件中,但是由于一些一言难尽的问题,不得不采取一些笨拙的方法。

在此过程中涉及的知识点有:

1.Oracle 的逻辑判断语法 https://blog.csdn.net/qq_26769591/article/details/88533799
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>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值