前往Shuct.Net首页

Shudepb PB反编译专家长时间以来,为业内同类软件事实上的唯一选择.细节,彰显专业.态度,决定品质.

关于PB反编译的搜索

我写的第100个存储器,谁知道怎么写能简单些吗? - chengg0769 来自四川,在东莞虚度十载 - 博客频道 - CSDN.NET chengg0769 来自四川,在东莞虚度十载 PB反编译_Powerbuilder DeCompiler_PB反编译器_PB混淆器_PB加密 目录视图 摘要视图 订阅 学院APP首次下载,可得50C币! 欢迎来帮助开源“进步” 当讲师?爱学习?投票攒课吧 CSDN 2015博客之星评选 感恩分享 我写的第100个存储器,谁知道怎么写能简单些吗? 标签: 存储paymentdeleteinserttableext 2007-10-22 08:18 640人阅读 评论(0) 收藏 举报 版权声明:本文为博主原创文章,未经博主允许不得转载。 /*依照新给定的提成表格,结算代理商提成*//*V1.01*/ /*200705268*//*20070604:修改添加本地通话和长途*//*20070925修正*//* @foot结算方式:0=按本系统内标记的已经收款的号码 1=按原系统出票的记录*//*20071021修正1:增加单独计算某个分局客户(特殊),2:长途+本地,增加全部费用选项 3.客户范围增加客户必须单线收益率达标,4.代理商的排除项可以单独设置*/ alter procedure pr_agent_deduct_new(@cycle int,@foot smallint=0,@ext_supplier varchar(10) ='',@debug smallint = 0)as declare @SQLCMD varchar(8000) declare @cyclestring varchar(9)set @cyclestring = cast(@cycle as varchar(9)) /*删除结果表内的该帐期资料*/delete from loc_agent_deduct_newwhere cycle = @cycle and(@ext_supplier = '' or supplier = @ext_supplier) /*如果单独重算一个代理商,只能删除这一个的资料*/-----------------------------------------------------------------------------------------------------------------------/*公式*/create table #agent_deduct_percent(supplier varchar(10),seq smallint,type char(1),custarea varchar(6),escpecial int,servtype varchar(6),callout char(1),billitems varchar(6),sign1 char(1),amt1 int,sign2 char(1),amt2 int,per dec(6,4),okgrade smallint, /*金额对比应该套用的公式等级*/objectamt_ys int , /*写入应收*/objectamt int, /*实收金额*/deductamt int, /*应提金额*/foot smallint /*按收款还是出票结算*/) /*按新帐期拷贝公式样本loc_sys_deduct_percent进入到提成结果表loc_agent_deduct_new*/insert into #agent_deduct_percentselect distinct t1.supplier,seq,type,custarea,escpecial,servtype,callout,billitems,sign1,amt1,sign2,amt2,per,0,0,0,0,@footfrom loc_sys_deduct_percent t1,a_inv_supplier t2where t1.supplier = t2.supplier andt2.deducttype = 10 and /*20070926*/(@ext_supplier = '' or t1.supplier = @ext_supplier)-------------------------------------------------//DEBUGif (@debug >0) select * from #agent_deduct_percent-------------------------------------------------//DEBUG-----------------------------------------------------------------------/*应收金额按业务种类和长途本地的金额值*/create table #acct_amt(substation varchar(6), /*分局代号*/supplier varchar(10), /*供应商代码*/acct_id int, /*合同号*/acc_nbr varchar(16), /*电话号码*/billitem int, /*bill_item_type_id*/charge int, /*应收金额总额*/DP03amt tinyint, /*客户范围,用于计算DP03=全部客户-特殊客户,需要枚举特殊客户范围逐一排除*/DP05amt int, /*单线收益率金额*/DP11amt tinyint, /*super = '10' 固话*/DP12amt tinyint, /*super = '11' 语音专线*/DP13amt tinyint, /*super = '12' 汇线通*/localcallamt tinyint, /*本地通话费*/longcallamt tinyint, /*长途通话*/eliminateamt tinyint, /*不参与结算提成的项目的金额*/upfrontamt int, /*upfront*/received tinyint, /*payment ramark已经收款(现金或转帐)*/invsend tinyint /*已经出过票的*/)--客户资料写入insert into #acct_amtselect t3.substation,t1.salesid,t1.acct_id,t1.acc_nbr,0,0,0,0,0,0,0,0,0,0,0,0from loc_sys_sales_acct t1,a_inv_supplier t2,rmt_f_acct t3where t1.salesid = t2.supplier andt1.acct_id = t3.acct_id andt2.deducttype = 10 and exists(select 1 from loc_sys_deduct_percent where supplier = t1.salesid) and(@ext_supplier = '' or t1.salesid = @ext_supplier) and t1.cycle = @cycle and t1.type = 'P'--rmt_a_bill_item_51_x金额写入set @SQLCMD = 'insert into #acct_amtselect t1.supplier,t1.acct_id,t1.acc_nbr,t2.bill_item_type_id,t2.due_charge,t1.DP11amt,t1.DP12amt,t1.DP13amt,t1.localcallamt,t1.longcallamt,t1.eliminateamt,t1.upfrontamt,t1.received,t1.invsendfrom #acct_amt t1,rmt_a_bill_item_51_'+ @cyclestring + ' t2where t1.acct_id = t2.acct_id andt1.acc_nbr = t2.acc_nbr andt2.due_charge>0 andt2.bill_item_type_id >0'exec(@SQLCMD) -------------------------------------------------//DEBUGif (@debug >0) select * from #agent_deduct_percentif (@debug >0) select * from #acct_amt-------------------------------------------------//DEBUG --------------------------------------------------------------------Dp05amt单线收益率set @SQLCMD = 'update #acct_amtset DP05amt = (select sum(t10.charge) from #acct_amt t10 where t10.acct_id = t1.acct_id)/ /*金额*/ (select count(1) from rmt_f_serv t11 where t11.acct_id = t1.acct_id and t11.state in(''F01'',''F0A'',''F0J''))from #acct_amt t1'exec(@SQLCMD) --业务种类四种写入set @SQLCMD = 'update #acct_amtset DP11amt = 1from #acct_amt t1,rmt_a_bill_item_51_'+ @cyclestring + ' t2,rmt_f_serv t3,rmt_s_serv_type_little t4where t1.billitem > 0 andt2.acct_id = t3.acct_id andt2.acc_nbr = t3.acc_nbr andt3.serv_type_id %100 = t4.serv_type_id andt4.super = 10 andt2.acct_id = t1.acct_id and t2.acc_nbr = t1.acc_nbr'exec(@SQLCMD)--set @SQLCMD = 'update #acct_amtset DP12amt = 1from #acct_amt t1,rmt_a_bill_item_51_'+ @cyclestring + ' t2,rmt_f_serv t3,rmt_s_serv_type_little t4where t1.billitem > 0 andt2.acct_id = t3.acct_id andt2.acc_nbr = t3.acc_nbr andt3.serv_type_id %100 = t4.serv_type_id andt4.super = 11 andt2.acct_id = t1.acct_id and t2.acc_nbr = t1.acc_nbr'exec(@SQLCMD)--set @SQLCMD = 'update #acct_amtset DP13amt = 1from #acct_amt t1,rmt_a_bill_item_51_'+ @cyclestring + ' t2,rmt_f_serv t3,rmt_s_serv_type_little t4where t1.billitem > 0 andt2.acct_id = t3.acct_id andt2.acc_nbr = t3.acc_nbr andt3.serv_type_id %100 = t4.serv_type_id andt4.super = 12 andt2.acct_id = t1.acct_id and t2.acc_nbr = t1.acc_nbr'exec(@SQLCMD)--/*DP21,全部;DP22,排除项目*///20071021:修正:需要按代理商设置1.FORALL全部;2.FORPART:部分;3.代号:只适合该代理商//--------------------set @SQLCMD = 'update #acct_amtset eliminateamt = 1from #acct_amt t1,loc_agent_eliminate_items t3where t1.billitem > 0 andt1.billitem = t3.billitem and(t3.include =''A'' or /*全部*/ (t3.include =''B'' and /*特殊除外的代理商*/ not t1.supplier in(select t10.supplier from loc_agent_eliminate_items t10 where t10.cycle = ' + @cyclestring + ' and t10.include = ''C'')) or(t3.include =''C'' and t1.supplier = t3.supplier)) and /*特殊的代理商*/t3.cycle = '+ @cyclestring exec(@SQLCMD)--localcallamt本地通话费set @SQLCMD = 'update #acct_amtset localcallamt = 1from #acct_amt t1,rmt_bill_item_type_distill t3where t1.billitem > 0 andt1.billitem = t3.bill_item_type_id andt3.cycle = '+ @cyclestring + ' andt3.is_localcall = ''Y'''exec(@SQLCMD)--longcallamt长途话费set @SQLCMD = 'update #acct_amtset longcallamt = 1from #acct_amt t1,rmt_bill_item_type_distill t3where t1.billitem > 0 andt1.billitem = t3.bill_item_type_id andt3.cycle = '+ @cyclestring + ' andt3.is_longdistance = ''Y'''exec(@SQLCMD)--预付费金额set @SQLCMD = 'update #acct_amtset upfrontamt = (select isnull(sum(fee),0) from CTTMISTICKET.dbo.rmt_unfront_total t2 where t2.cycle = ' + @cyclestring +' and t2.acct_id = t1.acct_id and t2.acc_nbr = t1.acc_nbr)from #acct_amt t1where t1.billitem =0' /*特别注意billitem=0为预付*/exec(@SQLCMD)--received (1/0)set @SQLCMD = 'update #acct_amtset received = 1from #acct_amt t1,rmt_a_payment_tab t2,rmt_a_payment_remark t3where t2.cyc_seq_nbr = ' + @cyclestring +' andt2.cyc_seq_nbr = t3.cyc_seq_nbr andt2.tab_nbr = t3.tab_nbr andt2.tab_nbr_type = t3.tab_nbr_type andt2.state = ''R01'' andt2.this_payment >0 and(t3.receive =''是'' or t3.transfer =''是'') andt2.acct_id = t1.acct_id and t2.acc_nbr = t1.acc_nbr'exec(@SQLCMD)--已经出票的号码set @SQLCMD = 'update #acct_amtset invsend = 1from #acct_amt t1,rmt_a_payment_tab t2where t2.cyc_seq_nbr = ' + @cyclestring +' andt2.state = ''R01'' andt2.this_payment >0 andt2.acct_id = t1.acct_id and t2.acc_nbr = t1.acc_nbr'exec(@SQLCMD) --删除不是出票代表号码的记录(金额为0 or null)delete from #acct_amt where billitem >0 and (charge = 0 or charge is null)delete from #acct_amt where billitem =0 and upfrontamt = 0------------------------------------------//DEBUGif @debug>0 select * from #acct_amt------------------------------------------//DEBUG--------------------------------------------------------------------------------------/*游标使用的变量*/declare @supplier varchar(10)declare @seq smallintdeclare @type char(1) /*A:后付B:预付*/declare @custarea varchar(6)declare @escpecial intdeclare @servtype varchar(6)declare @callout char(1)declare @billitems varchar(6) /*设置光标来推算*/declare cur_supplier_distinct cursor for select distinct supplier,seq,type,custarea,escpecial,servtype,callout,billitems from #agent_deduct_percentopen cur_supplier_distinct fetch cur_supplier_distinct into @supplier,@seq,@type,@custarea,@escpecial,@servtype,@callout,@billitems while (@@fetch_status) = 0begin /*写入应收总额:objectamt_ys*/ if (@type = 'B') /*预付*/ begin update #agent_deduct_percent set objectamt_ys = (select isnull(sum(upfrontamt),0) from #acct_amt t2 where t2.supplier = t1.supplier and t2.billitem = 0) /*后付/预付标致位*/ from #agent_deduct_percent t1 where t1.supplier = @supplier and t1.seq = @seq end if (@type = 'A') /*后付*/ begin update #agent_deduct_percent set objectamt_ys = (select isnull(sum(charge),0) from #acct_amt t2 where t2.supplier = t1.supplier and t2.billitem > 0 and /*后付/预付标致位*/ (@custarea = 'DP01' or (@custarea = 'DP02' and escpecial = t2.acct_id) or (@custarea = 'DP03' and exists(select 1 from #agent_deduct_percent where supplier = t1.supplier and custarea = 'DP02'))or /*客户范围,用于计算DP03=全部客户-特殊客户,需要枚举特殊客户范围逐一排除*/ (@custarea = 'DP04' and escpecial =cast(t2.substation as int)) or (@custarea = 'DP05' and escpecial*100 < t2.DP05amt)) and ((@servtype = 'DP11' and DP11amt = 1) or (@servtype = 'DP12' and DP12amt = 1) or (@servtype = 'DP13' and DP13amt = 1) or (@servtype = 'DP14' and (DP11amt = 1 or DP12amt = 1 or DP13amt = 1))) and (@callout = 'Z'or /*20071021全部*/ (@callout = 'A' and (localcallamt = 1 or longcallamt = 1)) or (@callout = 'B' and localcallamt = 1) or (@callout = 'C' and longcallamt = 1)) and (@billitems = 'DP21' or (@billitems = 'DP22' and eliminateamt = 0)) ) from #agent_deduct_percent t1 where t1.supplier = @supplier and t1.seq = @seq end -------------------------------------------------//DEBUG if (@debug >0) select * from #agent_deduct_percent -------------------------------------------------//DEBUG /*比对应该属于哪个提成级别,注意是用应收金额来比较的*/ update #agent_deduct_percent set okgrade = 1 where ((sign1 = 'A' and objectamt_ys/100.00 >amt1) or (sign1 = 'B' and objectamt_ys/100.00 >=amt1)) and ((sign2 = 'A' and objectamt_ys/100.00 <amt2) or (sign2 = 'B' and objectamt_ys/100.00 <=amt2)) and supplier = @supplier and seq = @seq -------------------------------------------------//DEBUG if (@debug >0) select * from #agent_deduct_percent -------------------------------------------------//DEBUG /*写入实收总额:objectamt*/ if (@type = 'B') /*预付*/ begin update #agent_deduct_percent /*预付费的两个一样*/ set objectamt = objectamt_ys where supplier = @supplier and seq = @seq end if (@type = 'A') /*后付*/ begin update #agent_deduct_percent set objectamt = (select isnull(sum(charge),0) from #acct_amt t2 where t2.supplier = t1.supplier and seq = @seq and t2.billitem > 0 and /*后付/预付标致位*/ (@custarea = 'DP01' or (@custarea = 'DP02' and escpecial = t2.acct_id) or (@custarea = 'DP03' and escpecial =0) or (@custarea = 'DP04' and escpecial =cast(t2.substation as int)) and ((@servtype = 'DP11' and DP11amt = 1) or (@servtype = 'DP12' and DP12amt = 1) or (@servtype = 'DP13' and DP13amt = 1) or (@servtype = 'DP14' and (DP11amt = 1 or DP12amt = 1 or DP13amt = 1))) and (@callout = 'Z'or /*20071021全部*/ (@callout = 'A' and (localcallamt = 1 or longcallamt = 1)) or (@callout = 'B' and localcallamt = 1) or (@callout = 'C' and longcallamt = 1)) and (@billitems = 'DP21' or (@billitems = 'DP22' and eliminateamt = 0)) and ((@foot = 0 and received = 1) or /*与应收的差别*/ (@foot = 1 and invsend = 1)) /*按出票金额还是按实际收款标记的金额*/ ) from #agent_deduct_percent t1 where t1.supplier = @supplier and t1.seq = @seq end -------------------------------------------------//DEBUG if (@debug >0) select * from #agent_deduct_percent -------------------------------------------------//DEBUG set @supplier='' set @seq=0 set @type='' set @custarea='' set @escpecial='' set @servtype='' set @callout='' set @billitems='' fetch cur_supplier_distinct into @supplier,@seq,@type,@custarea,@escpecial,@servtype,@callout,@billitemsend-------------------------------------------------//DEBUGif (@debug >0) select * from #agent_deduct_percent-------------------------------------------------//DEBUG /*删除 okgrade=0的行*/delete from #agent_deduct_percent where okgrade=0 /*不匹配的等级*/-------------------------------------------------//DEBUGif (@debug >0) select * from #agent_deduct_percent-------------------------------------------------//DEBUG /*计算结算的结果值deductamt*/update #agent_deduct_percentset deductamt = objectamt*per -------------------------------------------------//DEBUGif (@debug >0) select * from #agent_deduct_percent-------------------------------------------------//DEBUG --------------------------------------------------------------------------------------/*将#agent_deduct_percent的计算结果插入loc_agent_deduct_new*/insert into loc_agent_deduct_newselect @cycle,supplier,seq,type,custarea,escpecial,servtype,billitems,objectamt_ys/100.00,objectamt/100.00,per,deductamt/100.00,footfrom #agent_deduct_percent /*将明细也存档备检查*/delete from loc_agent_deduct_acct where cycle = @cycledelete from loc_agent_deduct_acct where cycle < @cycle and datediff(mm,createdate,getdate()) > -12insert into loc_agent_deduct_acctselect @cycle,*,getdate()from #acct_amt /*清理临时表*/drop table #agent_deduct_percentdrop table #acct_amt close cur_supplier_distinctdeallocate cur_supplier_distinct 上一篇独具目光的郭研(转载) 下一篇奔三的总结[原创] 顶 0 踩 0 猜你在找 查看评论 * 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场 个人资料 chengg0769 访问:767373次 积分:11201 等级: 积分:11201 排名:第653名 原创:279篇 转载:211篇 译文:0篇 评论:358条 文章搜索 文章分类 PB反编译与加密(12) IOS和安卓(9) PB与数据库(16) 网络相关(1) 搜索相关(0) 闲话扯起耍(4) 其他语言(7) 文章存档 2015年10月(3)2015年09月(2)2015年08月(3)2015年07月(1)2015年05月(1)2015年03月(1)2014年04月(1)2014年01月(1)2013年12月(2)2013年11月(2)2013年09月(1)2013年02月(1)2012年11月(1)2012年09月(1)2012年08月(6)2012年07月(1)2012年05月(3)2012年03月(4)2011年12月(2)2011年11月(2)2011年10月(9)2011年09月(6)2011年08月(11)2011年07月(2)2011年06月(4)2011年04月(3)2010年12月(1)2010年10月(2)2010年09月(8)2010年08月(1)2010年07月(8)2010年06月(17)2010年05月(2)2010年04月(2)2010年03月(4)2010年01月(1)2009年09月(8)2009年08月(5)2009年07月(8)2009年06月(8)2009年05月(16)2009年03月(2)2009年02月(7)2008年12月(2)2008年11月(4)2008年10月(5)2008年08月(1)2008年07月(2)2008年01月(12)2007年12月(29)2007年11月(7)2007年10月(4)2007年09月(20)2007年08月(55)2007年07月(176) 阅读排行 做代理网站最有效的4种宣传方法(admin9.com)(18287) 搜索引擎学习资源(作者:dongdonglang)(15074) PowerBuilder DeCompiler(PB DeCompiler) Demo download(PB反编译,支持5-12)(10092) 再谈powerbuilder程序防止破解的办法(终结篇,以后不再写这个问题)(9787) 浅谈Powerbuilder的未来和Powerbuilder使用者的未来(8068) Powerbuilder混淆,加密(powerbuilder防止反编译,pb混淆器,PB加壳,支持5-12) obfuscator for PowerBuilder(8001) 程序员的SEO总结(7829) PB11.5,PB12 web项目初探(7827) 在一台联想3000G430 T1600笔记本上安装黑苹果(东皇v10.6.3)成功(7332) 文件夹加密原理 [转](7330) 评论排行 浅谈Powerbuilder的未来和Powerbuilder使用者的未来(49) 程序员的SEO总结(32) 有关Powerbuilder的悲观论和乐观论(由郭贴引发的300多贴争辩想到的,也是很久就想秉明的一个观点)(22) Powerbuilder混淆,加密(powerbuilder防止反编译,pb混淆器,PB加壳,支持5-12) obfuscator for PowerBuilder(20) 因为垄断形成,数据库市场将出现更多开源数据库(19) 戏说DataWindow的“移植”和“临摹”(19) 免费软件模式之随想(18) 软件提交到国外的下载站的几点操作和想法(15) PB11.5,PB12 web项目初探(15) 关于对pbd反编译器的期待(11) 推荐文章 *Hadoop节点"慢磁盘"监控 *假如你想成为全栈工程师… *没有躲过的坑--正则表达式截取字符串 *CardView完全解析与RecyclerView结合使用(三十二) *And roid 高仿微信发朋友圈浏览图片效果 *通过Ajax的方式执行GP服务 最新评论 PB inet组件 Post给php时怎么接收 bczhan: 非常感谢,最近做接口,刚才用上了 电讯业营收管理软件--菜单图示[JPG10张] weilexinye: 不懂,学习中。 关于EXECryptor参数设置的问题 fcmguanba: 你好!关于软件加壳加密的问题,我们可以探讨一下吗?你加我的QQ号码:1715960127 四年级数学题难倒家长(转载) qing7416: 我能做,但换成我四年级,多半不会做,会做的也做不对 中文垂直搜索引擎、行业搜索引擎大全(最新计137家) (转贴) defineconst: 真全! 搜索引擎开发,垂直搜索开发探讨:蜘蛛,并行,搜索,垂直搜索,搜索开发,lucene,java,分布[原创] defineconst: 你好还在弄搜索吗?UserB是谁的啊 如何用VC编写供PB调用的DLL (转) tang0575: 为啥我调用时,PB提示没有这个函数呢 基于MapServer的WebGIS开发(转) qq_20787725: 很好的一片文章 谢谢 垂直搜索开发:垂直搜索引擎开发全过程[原创] zww_ren_0: 要精英中的精英(就像你)才能玩。。。 垂直搜索开发:垂直搜索引擎开发全过程[原创] zww_ren_0: C.忠告就表示这货没任何价值了。。。按你的意思来说,实际一点来说。 我的未来方向 pconline/asp.net周金桥老师的aspnet 友人Blog 旧博客在sina Bluesen的语音卡开发平台 JackXu的开源语音卡框架 经验丰富的好友:杨光的专栏 蓝星际语音平台,Koodoo语言 Lucene改造者-yuetiantian 西部.阿呆's blog manesking:全文检索c/c fullfocus研究lucene,nutch 黄国酬的博客 把“天轰穿”的asp.net 雨松.安卓