123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593 |
- $PBExportHeader$f_init_cttbinfo.srf
- global type f_init_cttbinfo from function_object
- end type
- forward prototypes
- global function integer f_init_cttbinfo (datetime arg_ctdt, long arg_bg_int, long arg_ed_int, ref s_yfct s_ctmx[])
- end prototypes
- global function integer f_init_cttbinfo (datetime arg_ctdt, long arg_bg_int, long arg_ed_int, ref s_yfct s_ctmx[]);//s_ctmx[].etbname :表英文名
- //s_ctmx[].ctbname :表中文名
- //s_ctmx[].wherestr :截数串
- //s_ctmx[].checkstr :检查串
- //s_ctmx[].delstr :删除串
- //s_ctmx[].fromstr :
- //s_ctmx[].linkstr :关联串
- //s_ctmx[].delid:删除id
- //***删除工资月
- Long ls_del_wagemth,ls_pdint
- Date ls_del_date
- DateTime ls_del_wagemth_date
- ls_pdint = long(String(arg_ctdt,'yyyymmdd'))
- //**工资删除前月*****************************
- ls_del_date = Date(String(arg_ctdt,'yyyy-mm-dd'))
- IF Month(ls_del_date) = 1 THEN
- ls_del_wagemth = (Year(ls_del_date) - 1) * 100 + 12
- ELSE
- ls_del_wagemth = Year(ls_del_date) * 100 + Month(ls_del_date) - 1
- END IF
- ls_del_wagemth_date = DateTime(Date(Left(String(ls_del_wagemth),4)+'-'+Right(String(ls_del_wagemth),2)+'-01'),Time(0))
- //*********************************************
- s_ctmx[1].etbname = 'u_buytaskmx'
- s_ctmx[1].ctbname = '采购订单明细表'
- s_ctmx[1].wherestr= " where (u_buytask.status = 3 or u_buytask.status = 5 or u_buytask.status = 6) and u_buytask.ctmint = 0 and u_buytask.requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[1].checkstr= " where (u_buytask.status <> 3 and u_buytask.status <> 5 and u_buytask.status <> 6) and u_buytask.ctmint = 0 and u_buytask.requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[1].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[1].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[1].delid = "taskid"
- s_ctmx[1].fromstr = " from u_buytaskmx,u_buytask"
- s_ctmx[1].linkstr = " and u_buytask.scid = u_buytaskmx.scid and u_buytask.taskid = u_buytaskmx.taskid"
- s_ctmx[2].etbname = 'u_buytask'
- s_ctmx[2].ctbname = '采购订单表'
- s_ctmx[2].wherestr= " where (status = 3 or status = 5 or status = 6) and ctmint = 0 and requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[2].checkstr= " where (status<>3 and status <> 5 and status <> 6) and ctmint = 0 and requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[2].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[2].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[2].delid = "taskid"
- s_ctmx[2].fromstr = " from u_buytask"
- s_ctmx[2].linkstr = ""
- s_ctmx[3].etbname = 'u_saleRqMtrl_scll'
- s_ctmx[3].ctbname = '销售订单明细物料需求表'
- s_ctmx[3].wherestr= " where (u_saletask.status = 3 or u_saletask.status = 5) and u_saletask.ctmint = 0 and u_saletask.taskdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[3].checkstr= " where (u_saletask.status <> 3 and u_saletask.status <> 5) and u_saletask.ctmint = 0 and u_saletask.taskdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[3].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[3].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[3].delid = "taskid"
- s_ctmx[3].fromstr = " from u_saleRqMtrl_scll,u_saletask"
- s_ctmx[3].linkstr = " and u_saletask.scid = u_saleRqMtrl_scll.scid and u_saletask.taskid = u_saleRqMtrl_scll.taskid"
- s_ctmx[4].etbname = 'u_saletaskmx'
- s_ctmx[4].ctbname = '销售订单明细表'
- s_ctmx[4].wherestr= " where (u_saletask.status = 3 or u_saletask.status = 5) and u_saletask.ctmint = 0 and u_saletask.taskdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[4].checkstr= " where (u_saletask.status <> 3 and u_saletask.status <> 5) and u_saletask.ctmint = 0 and u_saletask.taskdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[4].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[4].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[4].delid = "taskid"
- s_ctmx[4].fromstr = " from u_saletaskmx,u_saletask"
- s_ctmx[4].linkstr = " and u_saletask.scid = u_saletaskmx.scid and u_saletask.taskid = u_saletaskmx.taskid"
- s_ctmx[5].etbname = 'u_saletask'
- s_ctmx[5].ctbname = '销售订单表'
- s_ctmx[5].wherestr = " where (status = 3 or status = 5) and ctmint = 0 and taskdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[5].checkstr = " where (status<>3 and status <> 5) and ctmint = 0 and taskdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[5].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[5].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[5].delid = "taskid"
- s_ctmx[5].fromstr = " from u_saletask"
- s_ctmx[5].linkstr = ""
- s_ctmx[7].etbname = 'u_inwaremx'
- s_ctmx[7].ctbname = '进仓单明细表{非采购,加工}'
- s_ctmx[7].wherestr = " where billtype <> 1 and billtype <> 4 and u_inware.ctmint = 0 and u_inware.balcflag = 1 and u_inware.flag=1 and u_inware.indate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[7].checkstr = " where billtype <> 1 and billtype <> 4 and (u_inware.balcflag = 0 or u_inware.flag = 0) and u_inware.ctmint = 0 and u_inware.indate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[7].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[7].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[7].delid = "inwareid"
- s_ctmx[7].fromstr = " from u_inwaremx,u_inware"
- s_ctmx[7].linkstr = " and u_inwaremx.scid = u_inware.scid and u_inwaremx.inwareid = u_inware.inwareid"
- s_ctmx[8].etbname = 'u_inware'
- s_ctmx[8].ctbname = '进仓单表{非采购,加工}'
- s_ctmx[8].wherestr = " where billtype <> 1 and billtype <> 4 and ctmint = 0 and balcflag = 1 and flag=1 and indate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[8].checkstr = " where billtype <> 1 and billtype <> 4 and (balcflag = 0 or flag = 0) and ctmint = 0 and indate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[8].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[8].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[8].delid = "inwareid"
- s_ctmx[8].fromstr = " from u_inware"
- s_ctmx[8].linkstr = ""
- s_ctmx[9].etbname = 'u_outwaremx'
- s_ctmx[9].ctbname = '出仓单明细表{非销售,非扣费,非领料}'
- s_ctmx[9].wherestr = " where u_outware.billtype <> 10 and u_outware.billtype <> 3 and u_outware.billtype <> 1 and u_outware.ctmint = 0 and u_outware.balcflag = 1 and u_outware.flag = 1 and u_outware.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[9].checkstr = " where u_outware.billtype <> 10 and u_outware.billtype <> 3 and u_outware.billtype <> 1 and (u_outware.balcflag = 0 or u_outware.flag = 0) and u_outware.ctmint = 0 and u_outware.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[9].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[9].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[9].delid = "outwareid"
- s_ctmx[9].fromstr = " from u_outwaremx,u_outware"
- s_ctmx[9].linkstr = " and u_outwaremx.scid = u_outware.scid and u_outwaremx.outwareid = u_outware.outwareid"
- s_ctmx[10].etbname = 'u_outware'
- s_ctmx[10].ctbname = '出仓单表{非销售,非扣费,非领料}'
- s_ctmx[10].wherestr = " where billtype <> 10 and u_outware.billtype <> 3 and billtype <> 1 and ctmint = 0 and balcflag = 1 and flag = 1 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[10].checkstr = " where billtype <> 10 and u_outware.billtype <> 3 and billtype <> 1 and (balcflag = 0 or flag = 0) and ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[10].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[10].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[10].delid = "outwareid"
- s_ctmx[10].fromstr = " from u_outware"
- s_ctmx[10].linkstr = ""
- s_ctmx[11].etbname = 'u_outwaremx'
- s_ctmx[11].ctbname = '出仓单明细表{扣费}'
- s_ctmx[11].wherestr = " where u_outware.billtype = 10 and u_outware.ctmint = 0 and u_outware.balcflag = 1 and u_outware.flag = 1 and u_outware.secflag = 1 and u_outware.wagemth > 0 and u_outware.wagemth< " + String(ls_del_wagemth)
- s_ctmx[11].checkstr = " where u_outware.billtype = 10 and (u_outware.balcflag = 0 or u_outware.flag = 0 or u_outware.secflag = 0) and u_outware.ctmint = 0 and u_outware.wagemth > 0 and u_outware.wagemth< " + String(ls_del_wagemth)
- s_ctmx[11].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[11].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[11].delid = "outwareid"
- s_ctmx[11].fromstr = " from u_outwaremx,u_outware"
- s_ctmx[11].linkstr = " and u_outwaremx.scid = u_outware.scid and u_outwaremx.outwareid = u_outware.outwareid"
- s_ctmx[12].etbname = 'u_outware'
- s_ctmx[12].ctbname = '出仓单表{扣费}'
- s_ctmx[12].wherestr = " where billtype = 10 and ctmint = 0 and balcflag = 1 and flag = 1 and secflag = 1 and wagemth > 0 and wagemth< " + String(ls_del_wagemth)
- s_ctmx[12].checkstr = " where billtype = 10 and (balcflag = 0 or flag = 0 or secflag = 0) and ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[12].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[12].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[12].delid = "outwareid"
- s_ctmx[12].fromstr = " from u_outware"
- s_ctmx[12].linkstr = ""
- s_ctmx[13].etbname = 'u_outwaremx'
- s_ctmx[13].ctbname = '出仓单明细表{销售}'
- if sys_option_use_msttake = 1 then
- s_ctmx[13].wherestr = " where u_outware.billtype =1 and u_outware.ctmint = 0 and u_outware.balcflag = 1 and u_outware.flag = 1 and u_outware.secflag = 1 and u_outware.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[13].checkstr = " where u_outware.billtype =1 and (u_outware.balcflag = 0 or u_outware.flag = 0 or u_outware.secflag = 0 ) and u_outware.ctmint = 0 and u_outware.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- else
- s_ctmx[13].wherestr = " where u_outware.billtype =1 and u_outware.ctmint = 0 and u_outware.balcflag = 1 and u_outware.flag = 1 and u_outware.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[13].checkstr = " where u_outware.billtype =1 and (u_outware.balcflag = 0 or u_outware.flag = 0) and u_outware.ctmint = 0 and u_outware.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- end if
- s_ctmx[13].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[13].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[13].delid = "outwareid"
- s_ctmx[13].fromstr = " from u_outwaremx,u_outware"
- s_ctmx[13].linkstr = " and u_outwaremx.scid = u_outware.scid and u_outwaremx.outwareid = u_outware.outwareid"
- s_ctmx[14].etbname = 'u_outware'
- s_ctmx[14].ctbname = '出仓单表{销售}'
- if sys_option_use_msttake = 1 then
- s_ctmx[14].wherestr = " where billtype =1 and ctmint = 0 and balcflag = 1 and flag = 1 and secflag = 1 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[14].checkstr = " where billtype =1 and (balcflag = 0 or flag = 0 or secflag = 0 ) and ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- else
- s_ctmx[14].wherestr = " where billtype =1 and ctmint = 0 and balcflag = 1 and flag = 1 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[14].checkstr = " where billtype =1 and (balcflag = 0 or flag = 0 ) and ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- end if
- s_ctmx[14].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[14].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[14].delid = "outwareid"
- s_ctmx[14].fromstr = " from u_outware"
- s_ctmx[14].linkstr = ""
- //**应收应付****************************
- s_ctmx[15].etbname = 'u_bmstpaymx'
- s_ctmx[15].ctbname = '应付帐明细表'
- s_ctmx[15].wherestr = " where ctmint = 0 and paydate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[15].checkstr = " where ctmint = 0 and paydate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[15].delstr = " where ctmint <= " + String(arg_ed_int)+" and delflag = 1 and ctmint > 0 "
- s_ctmx[15].ctstr = " where ctmint <= " + String(arg_ed_int)+" and ctmint > 0 "
- s_ctmx[15].delid = "payid"
- s_ctmx[15].fromstr = " from u_bmstpaymx"
- s_ctmx[15].linkstr = ""
- s_ctmx[16].etbname = 'u_bmstpay'
- s_ctmx[16].ctbname = '应付帐表'
- s_ctmx[16].wherestr = " where ctmint = 0 and paydate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[16].checkstr = " where ctmint = 0 and paydate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[16].delstr = " where ctmint <= " + String(arg_ed_int)+" and deflag = 1 and ctmint > 0 "
- s_ctmx[16].ctstr = " where ctmint <= " + String(arg_ed_int)+" and ctmint > 0 "
- s_ctmx[16].delid = "payid"
- s_ctmx[16].fromstr = " from u_bmstpay"
- s_ctmx[16].linkstr = ""
- s_ctmx[17].etbname = 'u_bmsttakemx'
- s_ctmx[17].ctbname = '应收帐表明细'
- s_ctmx[17].wherestr = " where ctmint = 0 and takedate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[17].checkstr = " where ctmint = 0 and takedate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[17].delstr = " where ctmint <= " + String(arg_ed_int)+" and delflag = 1 and ctmint > 0 "
- s_ctmx[17].ctstr = " where ctmint <= " + String(arg_ed_int)+" and ctmint > 0 "
- s_ctmx[17].delid = "takeid"
- s_ctmx[17].fromstr = " from u_bmsttakemx"
- s_ctmx[17].linkstr = ""
- s_ctmx[18].etbname = 'u_bmsttake'
- s_ctmx[18].ctbname = '应收帐表'
- s_ctmx[18].wherestr = " where ctmint = 0 and takedate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[18].checkstr = " where ctmint = 0 and takedate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[18].delstr = " where ctmint <= " + String(arg_ed_int)+" and delflag = 1"
- s_ctmx[18].ctstr = " where ctmint <= " + String(arg_ed_int)+" and ctmint > 0 "
- s_ctmx[18].delid = "takeid"
- s_ctmx[18].fromstr = " from u_bmsttake"
- s_ctmx[18].linkstr = ""
- //**************************************
- //**结存要后5天*************************
- DateTime ll_datetime
- Date ll_date
- ll_date = RelativeDate (Date(String(arg_ctdt,'yyyy-mm-dd')),5)
- ll_datetime = DateTime(ll_date,Time('24:61'))
- s_ctmx[19].etbname = 'u_warebalc'
- s_ctmx[19].ctbname = '仓库结存表'
- s_ctmx[19].wherestr = " where balcdate<='" + String(ll_datetime,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[19].checkstr = " where balcdate<='" + String(ll_datetime,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[19].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[19].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[19].delid = "mtrlid"
- s_ctmx[19].fromstr = " from u_warebalc"
- s_ctmx[19].linkstr = ""
- //**************************************
- s_ctmx[20].etbname = 'u_order_wfjgmx'
- s_ctmx[20].ctbname = '外加工计划明细表'
- s_ctmx[20].wherestr = " where (u_order_wfjg.status = 3 or u_order_wfjg.status = 5 or u_order_wfjg.status = 6) and u_order_wfjg.ctmint = 0 and u_order_wfjg.requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[20].checkstr = " where (u_order_wfjg.status <> 3 and u_order_wfjg.status <> 5 and u_order_wfjg.status <> 6) and u_order_wfjg.ctmint = 0 and u_order_wfjg.requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[20].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[20].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[20].delid = "wfjgid"
- s_ctmx[20].fromstr = " from u_order_wfjgmx,u_order_wfjg"
- s_ctmx[20].linkstr = " and u_order_wfjgmx.scid = u_order_wfjg.scid and u_order_wfjgmx.wfjgid = u_order_wfjg.wfjgid"
- s_ctmx[21].etbname = 'u_order_wfjgmx_out'
- s_ctmx[21].ctbname = '外加工计划发出明细表'
- s_ctmx[21].wherestr = " where (u_order_wfjg.status = 3 or u_order_wfjg.status = 5 or u_order_wfjg.status = 6) and u_order_wfjg.ctmint = 0 and u_order_wfjg.requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[21].checkstr = " where (u_order_wfjg.status <> 3 and u_order_wfjg.status <> 5 and u_order_wfjg.status <> 6) and u_order_wfjg.ctmint = 0 and u_order_wfjg.requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[21].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[21].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[21].delid = "wfjgid"
- s_ctmx[21].fromstr = " from u_order_wfjgmx_out,u_order_wfjg"
- s_ctmx[21].linkstr = " and u_order_wfjgmx_out.scid = u_order_wfjg.scid and u_order_wfjgmx_out.wfjgid = u_order_wfjg.wfjgid"
- s_ctmx[22].etbname = 'u_order_wfjg'
- s_ctmx[22].ctbname = '外加工计划表'
- s_ctmx[22].wherestr = " where (status = 3 or status = 5 or status = 6) and ctmint = 0 and requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[22].checkstr = " where (status<>3 and status <> 5 and status <> 6) and ctmint = 0 and requiredate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[22].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[22].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[22].delid = "wfjgid"
- s_ctmx[22].fromstr = " from u_order_wfjg"
- s_ctmx[22].linkstr = ""
- s_ctmx[23].etbname = 'u_outwaremovemx'
- s_ctmx[23].ctbname = '调仓单明细表'
- s_ctmx[23].wherestr = " where u_outware_move.flag = 1 and u_outware_move.ctmint = 0 and u_outware_move.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[23].checkstr = " where u_outware_move.flag = 0 and u_outware_move.ctmint = 0 and u_outware_move.outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[23].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[23].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[23].delid = "outwareid"
- s_ctmx[23].fromstr = " from u_outwaremovemx,u_outware_move"
- s_ctmx[23].linkstr = " and u_outwaremovemx.outwareid = u_outware_move.outwareid"
- s_ctmx[24].etbname = 'u_outware_move'
- s_ctmx[24].ctbname = '调仓单表'
- s_ctmx[24].wherestr = " where flag = 1 and ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[24].checkstr = " where flag = 0 and ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[24].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[24].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[24].delid = "outwareid"
- s_ctmx[24].fromstr = " from u_outware_move"
- s_ctmx[24].linkstr = ""
- //s_ctmx[23].etbname='u_OrderMtrl_workgroup'
- //s_ctmx[23].ctbname='生产计划工组明细表'
- //s_ctmx[23].wherestr=" where (u_order_ml.status = 3 or u_order_ml.status = 5 or u_order_ml.status = 6) and u_order_ml.jjfinishflag = 1 and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[23].checkstr=" where (u_order_ml.status <> 3 and u_order_ml.status <> 5 and u_order_ml.status <> 6) and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[23].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[23].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[23].delid="orderid"
- //s_ctmx[23].fromstr=" from u_order_ml,u_OrderMtrl_workgroup"
- //s_ctmx[23].linkstr=" and u_order_ml.scid = u_OrderMtrl_workgroup.scid and u_order_ml.orderid = u_OrderMtrl_workgroup.orderid"
- //
- //s_ctmx[24].etbname='u_orderrqmtrl'
- //s_ctmx[24].ctbname='生产计划用料需求明细表'
- //s_ctmx[24].wherestr=" where (u_order_ml.status = 3 or u_order_ml.status = 5 or u_order_ml.status = 6) and u_order_ml.jjfinishflag = 1 and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[24].checkstr=" where (u_order_ml.status <> 3 and u_order_ml.status <> 5 and u_order_ml.status <> 6) and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[24].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[24].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[24].delid="orderid"
- //s_ctmx[24].fromstr=" from u_order_ml,u_orderrqmtrl"
- //s_ctmx[24].linkstr=" and u_order_ml.scid = u_orderrqmtrl.scid and u_order_ml.orderid = u_orderrqmtrl.orderid"
- //
- //s_ctmx[25].etbname='u_orderrqmtrl_middle'
- //s_ctmx[25].ctbname='生产计划中间明细表'
- //s_ctmx[25].wherestr=" where (u_order_ml.status = 3 or u_order_ml.status = 5 or u_order_ml.status = 6) and u_order_ml.jjfinishflag = 1 and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[25].checkstr=" where (u_order_ml.status <> 3 and u_order_ml.status <> 5 and u_order_ml.status <> 6) and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[25].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[25].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[25].delid="orderid"
- //s_ctmx[25].fromstr=" from u_order_ml,u_orderrqmtrl_middle"
- //s_ctmx[25].linkstr=" and u_order_ml.scid = u_orderrqmtrl_middle.scid and u_order_ml.orderid = u_orderrqmtrl_middle.orderid"
- //
- //s_ctmx[26].etbname='u_orderrqwp'
- //s_ctmx[26].ctbname='生产计划工序明细表'
- //s_ctmx[26].wherestr=" where (u_order_ml.status = 3 or u_order_ml.status = 5 or u_order_ml.status = 6) and u_order_ml.jjfinishflag = 1 and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[26].checkstr=" where (u_order_ml.status <> 3 and u_order_ml.status <> 5 and u_order_ml.status <> 6) and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[26].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[26].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[26].delid="orderid"
- //s_ctmx[26].fromstr=" from u_order_ml,u_orderrqwp"
- //s_ctmx[26].linkstr=" and u_order_ml.scid = u_orderrqwp.scid and u_order_ml.orderid = u_orderrqwp.orderid"
- //
- //s_ctmx[27].etbname='U_OrderRqwp_safa'
- //s_ctmx[27].ctbname='生产计划工序[safa]明细表'
- //s_ctmx[27].wherestr=" where (u_order_ml.status = 3 or u_order_ml.status = 5 or u_order_ml.status = 6) and u_order_ml.jjfinishflag = 1 and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[27].checkstr=" where (u_order_ml.status <> 3 and u_order_ml.status <> 5 and u_order_ml.status <> 6) and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[27].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[27].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[27].delid="orderid"
- //s_ctmx[27].fromstr=" from u_order_ml,U_OrderRqwp_safa"
- //s_ctmx[27].linkstr=" and u_order_ml.scid = U_OrderRqwp_safa.scid and u_order_ml.orderid = U_OrderRqwp_safa.orderid"
- //
- //s_ctmx[28].etbname='u_order_ml_mx'
- //s_ctmx[28].ctbname='生产计划明细表'
- //s_ctmx[28].wherestr=" where (u_order_ml.status = 3 or u_order_ml.status = 5 or u_order_ml.status = 6) and u_order_ml.jjfinishflag = 1 and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[28].checkstr=" where (u_order_ml.status <> 3 and u_order_ml.status <> 5 and u_order_ml.status <> 6) and u_order_ml.ctmint = 0 and u_order_ml.orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[28].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[28].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[28].delid="orderid"
- //s_ctmx[28].fromstr=" from u_order_ml,u_order_ml_mx"
- //s_ctmx[28].linkstr=" and u_order_ml.scid = u_order_ml_mx.scid and u_order_ml.orderid = u_order_ml_mx.orderid"
- //
- //s_ctmx[29].etbname='u_order_ml'
- //s_ctmx[29].ctbname='生产计划表'
- //s_ctmx[29].wherestr=" where (status = 3 or status = 5 or status = 6) and jjfinishflag = 1 and ctmint = 0 and orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[29].checkstr=" where (status <> 3 and status <> 5 and status <> 6) and ctmint = 0 and orderdate<='" + string(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[29].delstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[29].ctstr=" where ctmint >= " + string(arg_bg_int) + " and ctmint <= " + string(arg_ed_int)+" "
- //s_ctmx[29].delid="orderid"
- //s_ctmx[29].fromstr=" from u_order_ml"
- //s_ctmx[29].linkstr=""
- //
- //**工资**************************************
- s_ctmx[30].etbname = 'u_gz_wagemx'
- s_ctmx[30].ctbname = '工资明细表'
- s_ctmx[30].wherestr = " where u_gz_wage.auditingflag = 1 and u_gz_wage.ctmint = 0 and u_gz_wage.wagemth < '" + String(ls_del_wagemth) + "'"
- s_ctmx[30].checkstr = " where u_gz_wage.auditingflag = 0 and u_gz_wage.ctmint = 0 and u_gz_wage.wagemth < '" + String(ls_del_wagemth) + "'"
- s_ctmx[30].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[30].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[30].delid = "wagemth"
- s_ctmx[30].fromstr = " from u_gz_wage,u_gz_wagemx"
- s_ctmx[30].linkstr = " and u_gz_wage.empid = u_gz_wagemx.empid and u_gz_wage.wagemth = u_gz_wagemx.wagemth"
- s_ctmx[31].etbname = 'u_gz_wage'
- s_ctmx[31].ctbname = '工资表'
- s_ctmx[31].wherestr = " where auditingflag = 1 and ctmint = 0 and wagemth < '" + String(ls_del_wagemth) + "'"
- s_ctmx[31].checkstr = " where auditingflag = 0 and ctmint = 0 and wagemth < '" + String(ls_del_wagemth) + "'"
- s_ctmx[31].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[31].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[31].delid = "wagemth"
- s_ctmx[31].fromstr = " from u_gz_wage"
- s_ctmx[31].linkstr = ""
- s_ctmx[32].etbname = 'u_sc_taskworkmx'
- s_ctmx[32].ctbname = '计件明细表'
- s_ctmx[32].wherestr = " where u_sc_taskwork.auditingflag = 1 and u_sc_taskwork.ctmint = 0 and u_sc_taskwork.wagemth > 0 and u_sc_taskwork.wagemth < " + String(ls_del_wagemth)
- s_ctmx[32].checkstr = " where u_sc_taskwork.auditingflag = 0 and u_sc_taskwork.ctmint = 0 and u_sc_taskwork.billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[32].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[32].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[32].delid = "billid"
- s_ctmx[32].fromstr = " from u_sc_taskwork,u_sc_taskworkmx"
- s_ctmx[32].linkstr = " and u_sc_taskwork.billid = u_sc_taskworkmx.billid"
- s_ctmx[33].etbname = 'u_sc_taskwork'
- s_ctmx[33].ctbname = '计件表'
- s_ctmx[33].wherestr = " where auditingflag = 1 and ctmint = 0 and wagemth > 0 and wagemth < " + String(ls_del_wagemth)
- s_ctmx[33].checkstr = " where auditingflag = 0 and ctmint = 0 and billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[33].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[33].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[33].delid = "billid"
- s_ctmx[33].fromstr = " from u_sc_taskwork"
- s_ctmx[33].linkstr = ""
- s_ctmx[34].etbname = 'u_sc_abnormitymx'
- s_ctmx[34].ctbname = '个人工序计件单明细表'
- s_ctmx[34].wherestr = " where u_sc_abnormity.auditingflag = 1 and u_sc_abnormity.ctmint = 0 and u_sc_abnormity.wagemth > 0 and u_sc_abnormity.wagemth < " + String(ls_del_wagemth)
- s_ctmx[34].checkstr = " where u_sc_abnormity.auditingflag = 0 and u_sc_abnormity.ctmint = 0 and u_sc_abnormity.billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[34].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[34].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[34].delid = "billid"
- s_ctmx[34].fromstr = " from u_sc_abnormity,u_sc_abnormitymx"
- s_ctmx[34].linkstr = " and u_sc_abnormity.billid = u_sc_abnormitymx.billid"
- s_ctmx[35].etbname = 'u_sc_abnormity'
- s_ctmx[35].ctbname = '个人工序计件单表'
- s_ctmx[35].wherestr = " where auditingflag = 1 and ctmint = 0 and wagemth > 0 and wagemth < " + String(ls_del_wagemth)
- s_ctmx[35].checkstr = " where auditingflag = 0 and ctmint = 0 and billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[35].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[35].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[35].delid = "billid"
- s_ctmx[35].fromstr = " from u_sc_abnormity"
- s_ctmx[35].linkstr = ""
- s_ctmx[36].etbname = 'u_gz_loanwage'
- s_ctmx[36].ctbname = '借支单表'
- s_ctmx[36].wherestr = " where flag = 1 and ctmint = 0 and wagemth > 0 and wagemth < " + String(ls_del_wagemth)
- s_ctmx[36].checkstr = " where flag = 0 and ctmint = 0 and billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[36].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[36].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[36].delid = "billid"
- s_ctmx[36].fromstr = " from u_gz_loanwage"
- s_ctmx[36].linkstr = ""
- s_ctmx[37].etbname = 'u_gz_award_punish'
- s_ctmx[37].ctbname = '奖罚单表'
- s_ctmx[37].wherestr = " where flag = 1 and ctmint = 0 and wagemth > 0 and wagemth < " + String(ls_del_wagemth)
- s_ctmx[37].checkstr = " where flag = 0 and ctmint = 0 and billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[37].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[37].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[37].delid = "billid"
- s_ctmx[37].fromstr = " from u_gz_award_punish"
- s_ctmx[37].linkstr = ""
- s_ctmx[38].etbname = 'u_gz_cwork'
- s_ctmx[38].ctbname = '考勤单表'
- s_ctmx[38].wherestr = " where flag = 1 and ctmint = 0 and wagemth > 0 and wagemth < " + String(ls_del_wagemth)
- s_ctmx[38].checkstr = " where flag = 0 and ctmint = 0 and billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[38].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[38].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[38].delid = "billid"
- s_ctmx[38].fromstr = " from u_gz_cwork"
- s_ctmx[38].linkstr = ""
- //s_ctmx[39].etbname = 'u_sc_abnormity_bill'
- //s_ctmx[39].ctbname = '返工返修赔偿单表'
- //s_ctmx[39].wherestr = " where billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[39].checkstr = " where billdate<='" + String(ls_del_wagemth_date,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[39].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[39].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[39].delid = "billid"
- //s_ctmx[39].fromstr = " from u_sc_abnormity_bill"
- //s_ctmx[39].linkstr = ""
- //**出纳帐****************************
- string tmp_wherestr
- tmp_wherestr = ''
- tmp_wherestr = " where ctmint = 0 and takedate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- tmp_wherestr = tmp_wherestr + " and printid not in (select printid from v_max_rapid)"
- s_ctmx[40].etbname = 'u_rap_money'
- s_ctmx[40].ctbname = '出纳帐表'
- s_ctmx[40].wherestr = tmp_wherestr
- s_ctmx[40].checkstr = " where ctmint = 0 and takedate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[40].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[40].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[40].delid = "rapmoneyid"
- s_ctmx[40].fromstr = " from u_rap_money"
- s_ctmx[40].linkstr = ""
- s_ctmx[41].etbname = 'u_iteminput'
- s_ctmx[41].ctbname = '收入支出帐'
- s_ctmx[41].wherestr = " where ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[41].checkstr = " where ctmint = 0 and outdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[41].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[41].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[41].delid = "dateint"
- s_ctmx[41].fromstr = " from u_iteminput"
- s_ctmx[41].linkstr = ""
- //**************************************
- //s_ctmx[42].etbname = 'u_opposemx_dept'
- //s_ctmx[42].ctbname = '投诉单部门明细表'
- //s_ctmx[42].wherestr = " where u_oppose.ctmint = 0 and u_oppose.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[42].checkstr = " where u_oppose.ctmint = 0 and u_oppose.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[42].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[42].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[42].delid = "billid"
- //s_ctmx[42].fromstr = " from u_oppose,u_opposemx_dept"
- //s_ctmx[42].linkstr = " and u_oppose.billid = u_opposemx_dept.billid"
- //
- //s_ctmx[43].etbname = 'u_opposemx_mtrl'
- //s_ctmx[43].ctbname = '投诉单物料明细表'
- //s_ctmx[43].wherestr = " where u_oppose.ctmint = 0 and u_oppose.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[43].checkstr = " where u_oppose.ctmint = 0 and u_oppose.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[43].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[43].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[43].delid = "billid"
- //s_ctmx[43].fromstr = " from u_oppose,u_opposemx_mtrl"
- //s_ctmx[43].linkstr = " and u_oppose.billid = u_opposemx_mtrl.billid"
- //
- //s_ctmx[44].etbname = 'u_oppose'
- //s_ctmx[44].ctbname = '投诉单表'
- //s_ctmx[44].wherestr = " where ctmint = 0 and billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[44].checkstr = " where ctmint = 0 and billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[44].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[44].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[44].delid = "billid"
- //s_ctmx[44].fromstr = " from u_oppose"
- //s_ctmx[44].linkstr = ""
- s_ctmx[45].etbname = 'u_cusamt'
- s_ctmx[45].ctbname = '客户收款单'
- s_ctmx[45].wherestr = " where ctmint = 0 and cusdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[45].checkstr = " where ctmint = 0 and cusdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[45].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[45].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[45].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[45].delid = "billid"
- s_ctmx[45].fromstr = " from u_cusamt"
- s_ctmx[45].linkstr = ""
- //*******************************
- s_ctmx[46].etbname = 'u_dismantle_installmx'
- s_ctmx[46].ctbname = '拆装单明细表'
- s_ctmx[46].wherestr = " where u_dismantle_install.Auditingflag = 1 and u_dismantle_install.ctmint = 0 and u_dismantle_install.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[46].checkstr = " where u_dismantle_install.Auditingflag = 0 and u_dismantle_install.ctmint = 0 and u_dismantle_install.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[46].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[46].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[46].delid = "billid"
- s_ctmx[46].fromstr = " from u_dismantle_install,u_dismantle_installmx"
- s_ctmx[46].linkstr = " and u_dismantle_install.billid = u_dismantle_installmx.billid"
- s_ctmx[47].etbname = 'u_dismantle_install'
- s_ctmx[47].ctbname = '拆装单表'
- s_ctmx[47].wherestr = " where Auditingflag = 1 and ctmint = 0 and billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[47].checkstr = " where Auditingflag = 0 and ctmint = 0 and billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- s_ctmx[47].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[47].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- s_ctmx[47].delid = "billid"
- s_ctmx[47].fromstr = " from u_dismantle_install"
- s_ctmx[47].linkstr = ""
- //s_ctmx[48].etbname = 'u_orderworkgroup_nummx'
- //s_ctmx[48].ctbname = '工组调拨单明细表'
- //s_ctmx[48].wherestr = " where u_orderworkgroup_num.flag = 1 and u_orderworkgroup_num.ctmint = 0 and u_orderworkgroup_num.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[48].checkstr = " where u_orderworkgroup_num.flag = 0 and u_orderworkgroup_num.ctmint = 0 and u_orderworkgroup_num.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[48].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[48].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[48].delid = "billid"
- //s_ctmx[48].fromstr = " from u_orderworkgroup_num,u_orderworkgroup_nummx"
- //s_ctmx[48].linkstr = " and u_orderworkgroup_num.billid = u_orderworkgroup_nummx.billid"
- //
- //s_ctmx[49].etbname = 'u_orderworkgroup_num'
- //s_ctmx[49].ctbname = '工组调拨单表'
- //s_ctmx[49].wherestr = " where flag = 1 and ctmint = 0 and billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[49].checkstr = " where flag = 0 and ctmint = 0 and billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[49].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[49].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[49].delid = "billid"
- //s_ctmx[49].fromstr = " from u_orderworkgroup_num"
- //s_ctmx[49].linkstr = ""
- //
- //s_ctmx[50].etbname = 'u_orderworkgroup_timemx'
- //s_ctmx[50].ctbname = '工组调整时间明细表'
- //s_ctmx[50].wherestr = " where u_orderworkgroup_time.flag = 1 and u_orderworkgroup_time.ctmint = 0 and u_orderworkgroup_time.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[50].checkstr = " where u_orderworkgroup_time.flag = 0 and u_orderworkgroup_time.ctmint = 0 and u_orderworkgroup_time.billdate<='" + String(arg_ctdt,'yyyy-mm-dd hh:mm') + "'"
- //s_ctmx[50].delstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[50].ctstr = " where ctmint >= " + String(arg_bg_int) + " and ctmint <= " + String(arg_ed_int)+" "
- //s_ctmx[50].delid = "billid"
- //s_ctmx[50].fromstr = " from u_orderworkgroup_time,u_orderworkgroup_timemx"
- //s_ctmx[50].linkstr = " and u_orderworkgroup_time.billid = u_orderworkgroup_timemx.billid"
- //
- f_init_cttbinfo_2(arg_ctdt,arg_bg_int,arg_ed_int,s_ctmx[])
- RETURN 1
- end function
|