ITPub博客

首页 > Linux操作系统 > Linux操作系统 > wf_check_policy

wf_check_policy

原创 Linux操作系统 作者:huangjt007 时间:2012-04-10 10:44:12 0 删除 编辑

//
long ll_1,ll_2,ll_3,ll_4,ll_row,ll_row2
long ll_find1,ll_find2,ll_find3,ll_find4
string ls_item,ls_gzsj,ls_find
string ls_type,ls_xh
double ldb_xsj,ldb_sqj,ldb_bhj,ldb_qkthj,ldb_gybhjxsj,ldb_dybhjxsj,ldb_fsyzjxs
dw_4.reset()
dw_5.reset()
ll_find1=0
ll_find2=0
ll_find3=0
ll_find4=0
//目前暂定同一物料一年只有一个系数,多的不管.
for ll_1=1 to dw_1.rowcount()
 ls_item=dw_1.getitemstring(ll_1,"t_wlbm")
 ls_gzsj=string(dw_1.GetItemDateTime(ll_1,"t_gzsj"),"yyyy")
 select count(*) into :ll_find1  from tbl_proprize where t_item=:ls_item and convert(char(4),t_udat,121)=:ls_gzsj;
 if isnull(ll_find1) then ll_find1=0
 select count(*) into :ll_find3  from tbl_proprice where t_item=:ls_item and convert(char(4),t_udat,121)=:ls_gzsj;
 if isnull(ll_find3) then ll_find3=0
 if ll_find1=0 or ll_find3=0 then //当年还没有政策或者价格
  dw_4.accepttext()
  ll_find2=0
   ls_find="t_item='"+ls_item+"'"
   ll_find2=dw_4.find(ls_find,1,dw_4.rowcount())
   ll_find4=dw_5.find(ls_find,1,dw_5.rowcount())
   
   ls_type=dw_1.getitemstring(ll_1,"t_cpm")
   ls_xh=dw_1.getitemstring(ll_1,"t_xh")
   ldb_xsj=dw_1.getitemnumber(ll_1,"t_xsj")*10000
   ldb_sqj=dw_1.getitemnumber(ll_1,"t_sqj")*10000
   ldb_bhj=dw_1.getitemnumber(ll_1,"t_bhj")*10000
   ldb_qkthj=dw_1.getitemnumber(ll_1,"t_qkthj")*10000
   ldb_gybhjxsj=dw_1.getitemnumber(ll_1,"t_gybhjxsj")*10000
   ldb_dybhjxsj=dw_1.getitemnumber(ll_1,"t_dybhjxsj")*10000
   ldb_fsyzjxs=dw_1.getitemnumber(ll_1,"t_fsyzjxs")
   if  ll_find2=0 and ll_find1=0 then
    ll_row=dw_4.insertrow(0)
    dw_4.setitem(ll_row,"t_item",ls_item)
    dw_4.setitem(ll_row,"t_prid",ls_xh)
    dw_4.setitem(ll_row,"t_type",ls_type)
    dw_4.setitem(ll_row,"t_sale",ldb_xsj)
    dw_4.setitem(ll_row,"t_sale_a",ldb_gybhjxsj)
    dw_4.setitem(ll_row,"t_sale_b",ldb_dybhjxsj)
    dw_4.setitem(ll_row,"t_fsyzjxs",ldb_fsyzjxs)
    dw_4.setitem(ll_row,"t_udat",date(ls_gzsj+"-01-01"))  
   end if
    if ll_find4=0 and ll_find3=0 then
    ll_row2=dw_5.insertrow(0)
    dw_5.setitem(ll_row2,"t_item",ls_item)
    dw_5.setitem(ll_row2,"t_prid",ls_xh)
//    dw_5.setitem(ll_row,"t_type",ls_type)
    dw_5.setitem(ll_row2,"t_ppri",ldb_bhj)
    dw_5.setitem(ll_row2,"t_gssqj",ldb_sqj)
    dw_5.setitem(ll_row2,"t_tpri",ldb_qkthj)
//    dw_5.setitem(ll_row2,"t_fsyzjxs",ldb_fsyzjxs)
    dw_5.setitem(ll_row2,"t_udat",date(ls_gzsj+"-01-01"))  
   end if
 end if 
next

if dw_4.rowcount()>0 or dw_5.rowcount()>0 then
 messagebox("提示","部分机型提奖参数未设成,现根据订单导入表中信息自动生成,请确认!")
 open(w_policy3)
 return 0 
end if
return 1

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/75527/viewspace-720777/,如需转载,请注明出处,否则将追究法律责任。

上一篇: wf_check_order
下一篇: bdcd
请登录后发表评论 登录
全部评论

注册时间:2012-01-31

  • 博文量
    39
  • 访问量
    19587