K3与CRM接口文档_第1页
K3与CRM接口文档_第2页
K3与CRM接口文档_第3页
K3与CRM接口文档_第4页
K3与CRM接口文档_第5页
已阅读5页,还剩14页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、精选优质文档-倾情为你奉上K3与CRM接口文档物料l K3存储过程icitem_crm01 不设置输入条件,直接输出所有在使用状态的物料l 输出字段:物料代码,名称,规格型号,基本计量单位, 类别,系列l 定时同步时间相隔一天,执行时间:1:00分开始,定时作业crm01客户l 中间库MiddleDB表k3_Account触发器account_inserted 新增或更新客户资料CRM传到中间库表,输出创建客户资料到金蝶K3两个表T_Item和t_Organizationl 输出创建字段:客户代码,客户名称,联系人,地址,状态,区域,电话,移动,传真,邮编,邮件地址,开户银行,银行账号,税务登

2、记号,销售模式,分管专员,业务员,海关注册码,保税监管类,国别地区,收款条件l 实时同步销售订单l K3存储过程seorder_crm02 新增或更新销售订单,反审核,重审核l 输出字段:合同等级,销售范围,销售方式,订单类型,客户代码,摘要,日期,销售订单编号,币别,付款方式,汇率,销售年份,批次,出货省份,来源,区域,地市,审核人,审核日期,部门,员工工号,制单人,订单IDl 反审核与重审核开发触发器字段:当前审核级别为0就同步对应一个值到中间表,中间表字段:记录状态recordStatus(0:创建 1:更新 2:反审核 3:重审核)l 定时同步时间相隔一天,执行时间:1:00分开始,定

3、时作业crm01销售订单明细表l K3存储过程update_seorder_crm03 订单变更,l 输出字段:序号,物料代码,单位,数量,单价(含税),金额(含税),税率,建议交货日期,合同编号,签约时间,体系,办事处,实际业务员,类别,订单ID,系列l 定时同步时间相隔一天,执行时间:1:00分开始,定时作业crm01销售出库单l K3存储过程icstockbill_crm04 新增或更新销售出库单;l 输出字段:订单类型,销售业务类型,客户代码,具体地址,源单类型,送货费,联系人,摘要,联系电话,销售方式,日期(出库日期),出库单编号,货运单号,物流公司,发货人,部门,员工工号,制单人,

4、审核,审核日期l 定时同步时间相隔一天,执行时间:1:00分开始,定时作业crm01销售出库单明细表l K3存储过程icstockbill_crm04 新增或更新销售出库单明细;l 输出字段:序号,产品代码,单位,应发数量,实发数量,备注,销售单价,销售金额,合同编号,订单编号,箱数,体系,办事处,实际业务员,类别,系列l 定时同步时间相隔一天,执行时间:1:00分开始,定时作业crm01销售发票l K3存储过程ICSale_insert_crm05,新增或更新;l 输出字段:客户代码,销售方式,源单类型,结算方式,收款日期,开户银行,日期,纳税登记号,地址,往来科目,摘要,发票号码,汇率类型

5、,币别,汇率,部门,员工工号,记账,开票人,审核人,审核日期l 定时同步时间相隔一天,执行时间:1:10分开始,定时作业crm02发票明细l K3存储过程ICSale_insert_crm05,新增或更新;l 输出字段:序号,产品代码,单位,数量,单价(含税),金额,税率,订单编号,发票ID,出库单号,合同编号l 定时同步时间相隔一天,执行时间:1:10分开始,定时作业crm02收款单l K3存储过程t_RP_NewReceiveBill_insert_crm06,新增或更新l 输出字段:收款类型,收款银行,收款日期,付款单位,结算方式,币种,备注(合同号),审核人,制单人,金额,日期,收款单

6、IDl 定时同步时间相隔一天,执行时间:1:10分开始,定时作业crm02收款单明细l K3存储过程t_RP_NewReceiveBill_insert_crm06,新增或更新l 输出字段:序号,产品代码,单位,数量,单价(含税),金额,收款单ID,合同编号l 定时同步时间相隔一天,执行时间:1:10分开始,定时作业crm02核销日志l K3存储过程t_rp_newcheckinfo_insert_crm07,新增或更新l 特殊业务场景:存在跨月核销以及跨月反核销,存储过程语句将在执行判断全表与中间表数据匹配,如果中间表数据存在,不插入;不存在的数据进行插入。l 输出字段:核销日期,关联ID,

7、核销类型,核销金额,核销序号,核销日志ID,核销人,记录类型,状态,记录状态l 定时同步时间相隔一个月,执行时间每个月第二个周日零晨:2:00分开始,定时作业crm04中间数据库MiddleDB中间表l 物料 k3_Materiall 客户 k3_Accountl 销售订单k3_orderl 订单明细k3_Orderdetaill 销售出库k3_Deliveryl 出库明细k3_DeliveryDetaill 销售发票k3_Invoicel 发票明细k3_InvoiceDetaill 收款单k3_Cashl 收款明细k3_CashDetaill 核销日志k3_VerifilogK3与CRM开发

8、源代码创建、更新、审核l 物料-创建insert into middledb.dbo.k3_materialselect a.FNumber as productCode,a.FName as name,a.FModel as model,b.FName as unit,d.FName as series,c.FName as type,0,0,1, a.Fitemid as materialID,getdate()from t_ICItem a join t_MeasureUnit bon a.FStoreUnitID=b.FMeasureUnitID left join t_SubMess

9、age c on a.F_112=c.FInterID and c.ftypeid=10013left join t_SubMessage d on a.F_113=d.FInterID and d.ftypeid=10014left join t_BaseProperty e on a.FitemID = e.FitemIDleft join t_item f on f.FitemID = a.Fitemid where f.FNumber like '1.%'or f.FNumber like '2.%' andf.FchkuserID is not nul

10、l and f.FNumber not like '1.%' or f.FNumber not like '2.%'and DateDiff(dd,e.FCreateDate,getdate()=0l 物料-修改insert into middledb.dbo.k3_materialselect a.FNumber as productCode,a.FName as name,a.FModel as model,b.FName as unit,d.FName as series,c.FName as type,1,0,1,a.Fitemid,getdate()f

11、rom t_ICItem a join t_MeasureUnit bon a.FStoreUnitID=b.FMeasureUnitID left join t_SubMessage c on a.F_112=c.FInterID and c.ftypeid=10013left join t_SubMessage d on a.F_113=d.FInterID and d.ftypeid=10014left join t_BaseProperty e on a.FitemID = e.FitemIDleft join t_item f on f.FitemID = a.Fitemid whe

12、re DateDiff(dd,e.FLastmodDate,getdate()=0 and DATEDIFF(dd,e.FCreateDate,GETDATE() !=0 andf.FchkuserID is not nulll 客户创建ALTER TRIGGER dbo.account_insertedon dbo.k3_Accountfor insertasbegininsert into AIS251.dbo.t_Organization(FItemID,FNumber,FName,FPaycondition) select (select max(FItemID)+1 from AIS

13、251.dbo.t_Item),inserted.accountNumber , ,inserted.gatheringCodition from MiddleDB.dbo.k3_Account as khzjbinner join inserted on inserted.accountid=khzjb.accountidand inserted.recordType=0;insert into AIS251.dbo.t_Item (FItemID,FNumber,FName,FItemClassID,FParentID,FDetail) select (selec

14、t max(FItemID)+1 from AIS251.dbo.t_Item), inserted.accountNumber,,1,46462,1 from MiddleDB.dbo.k3_Account as khzjbinner join inserted on inserted.accountid=khzjb.accountidand inserted.recordType=0;update AIS251.dbo.t_Organizationset FName=,FPaycondition=inserted.gatheringCod

15、itionfrom AIS251.dbo.t_Organization inner join inserted on inserted.accountNumber=AIS251.dbo.t_Organization.FNumberand inserted.recordType=1;update AIS251.dbo.t_Itemset FName=from AIS251.dbo.t_Item inner join inserted on inserted.accountNumber=AIS251.dbo.t_Item.FNumberand inserted.recor

16、dType=1;update MiddleDB.dbo.k3_Accountset statecode=1from MiddleDB.dbo.k3_Account khzjbinner join inserted on khzjb.accountid=inserted.accountid;Endl 订单创建insert into middledb.dbo.k3_orderselect p.FName 合同等级,v.FName 购货单位,l.FName 销售范围,k.FName 订单类型,v.Fnumber 客户代码,Fexplanation 摘要,Fdate 日期,fbillno 销售订单编号

17、,f.FName 币别,Fpaystyle 付款方式,a.FExchangeRate 汇率,i.FName 销售年份,h.FName 批次,n.FName 出货省份, j.FName 来源,m.FName 区域,FHeadselfs0174 市,b.FName 审核人,fcheckdate as 审核日期,c.FName 部门,d.FNumber 员工工号,e.FName 制单人,a.FInterID 订单ID,0,0,1,getdate()from SEOrder aleft join t_user b on a.FCheckerID=b.FUserIDleft join t_Departm

18、ent c on a.FDeptID=c.FItemIDleft join t_Emp d on a.FEmpID=d.FItemIDleft join t_user e on a.FBillerID=e.FUserIDleft join t_Currency f on a.FCurrencyID=f.FCurrencyIDleft join T_SubMessage n on a.FHeadselfs0173=n.FInterIDleft join T_SubMessage m on a.FHeadselfs0169=m.FInterIDleft join T_SubMessage j on

19、 a.FHeadselfs0172=j.FInterIDleft join T_SubMessage h on a.FHeadselfs0171=h.FInterIDleft join T_SubMessage i on a.FHeadselfs0170=i.FInterIDleft join T_SubMessage k on a.Fsalestyle=k.FInterIDleft join T_SubMessage l on a.FAreaPS=l.FInterIDleft join t_Organization v on a.FCustID=v.FItemIDleft join t_Po

20、Degree p on a.FHeadselfs0167=p.FIDwhere a.Fstatus != 0 and a.FCancellation = 0and DateDiff(dd,Fcheckdate,getdate()= 0l 订单-变更insert into middledb.dbo.k3_orderselect p.FName 合同等级,v.FName 购货单位,l.FName 销售范围,k.FName 订单类型,v.Fnumber 客户代码,Fexplanation 摘要,Fdate 日期,fbillno 销售订单编号,f.FName 币别,Fpaystyle 付款方式,a.F

21、ExchangeRate 汇率,i.FName 销售年份,h.FName 批次,n.FName 出货省份, j.FName 来源,m.FName 区域,FHeadselfs0174 市,b.FName 审核人,fcheckdate as 审核日期,c.FName 部门,d.FNumber 员工工号,e.FName 制单人,a.FInterID 订单ID,1,0,1,getdate()from SEOrder aleft join t_user b on a.FCheckerID=b.FUserIDleft join t_Department c on a.FDeptID=c.FItemIDle

22、ft join t_Emp d on a.FEmpID=d.FItemIDleft join t_user e on a.FBillerID=e.FUserIDleft join t_Currency f on a.FCurrencyID=f.FCurrencyIDleft join T_SubMessage n on a.FHeadselfs0173=n.FInterIDleft join T_SubMessage m on a.FHeadselfs0169=m.FInterIDleft join T_SubMessage j on a.FHeadselfs0172=j.FInterIDle

23、ft join T_SubMessage h on a.FHeadselfs0171=h.FInterIDleft join T_SubMessage i on a.FHeadselfs0170=i.FInterIDleft join T_SubMessage k on a.Fsalestyle=k.FInterIDleft join T_SubMessage l on a.FAreaPS=l.FInterIDleft join t_Organization v on a.FCustID=v.FItemIDleft join t_PoDegree p on a.FHeadselfs0167=p

24、.FID-FchangeDate as 变更日期where DateDiff(dd,a.FchangeDate,getdate()=0 and DateDiff(dd,a.FcheckDate,getdate() != 0and a.Fstatus != 0 and FCancellation=0-mingxiinsert into middledb.dbo.k3_orderdetailselect b.FEntryID 序号,b.FItemID 产品ID,c.Fname 单位,b.FAuxQty 数量,b.FAuxTaxPrice 含税单价,b.FAllstdAmount 金额,b.FCES

25、S 税率,b.FAdviceConsignDate 建议交货日期,b.FEntrySelfS0162 合同编号,b.FEntrySelfS0168 签约时间,d.FName 体系,e.FName 办事处,f.FName 实际业务员,b.FEntrySelfS0178 类别,b.FInterID 订单ID,b.FEntrySelfS0179 系列,b.Fdetailid 订单明细ID,0,0,1,a.Fbillno,getdate()from SEOrderEntry b left join t_MeasureUnit c on b.FUnitID=c.FItemID left join SEO

26、rder a on a.finterid=b.finteridleft join t_Department d on b.FEntrySelfS0176=d.FItemIDleft join t_Department e on b.FEntrySelfS0174=e.FItemIDleft join t_Emp f on b.FEntrySelfS0175=f.FItemIDwhere a.Fstatus != 0 and a.FCancellation=0and DateDiff(dd,a.FchangeDate,getdate()=0 and DateDiff(dd,a.FcheckDat

27、e,getdate() != 0l 订单明细-创建insert into middledb.dbo.k3_orderdetailselect b.FEntryID 序号,b.FItemID 产品ID,c.Fname 单位,b.FAuxQty 数量,b.FAuxTaxPrice 含税单价,b.FAllstdAmount 金额,b.FCESS 税率,b.FAdviceConsignDate 建议交货日期,b.FEntrySelfS0162 合同编号,b.FEntrySelfS0168 签约时间,d.FName 体系,e.FName 办事处,f.FName 实际业务员,b.FEntrySelfS01

28、78 类别,b.FInterID 订单ID,b.FEntrySelfS0179 系列,b.Fdetailid 订单明细ID,0,0,1,a.Fbillno,getdate()from SEOrderEntry b left join t_MeasureUnit c on b.FUnitID=c.FItemID left join SEOrder a on a.finterid=b.finteridleft join t_Department d on b.FEntrySelfS0176=d.FItemIDleft join t_Department e on b.FEntrySelfS0174

29、=e.FItemIDleft join t_Emp f on b.FEntrySelfS0175=f.FItemIDwhere a.Fstatus != 0 and a.FCancellation=0and DateDiff(dd,a.fcheckdate,getdate() = 0l 出库单-创建insert into middledb.dbo.k3_deliveryselect n.FName 订单类型,m.FName 销售业务类型,b.FNumber 客户代码,FHeadSelfB0162 具体地址,o.FName 源单类型,FHeadSelfB0172 送货费,FHeadSelfB01

30、63 联系人,Fexplanation 摘要,FHeadSelfB0164 联系电话,c.FName 销售方式,Fdate 出库日期,fbillno 出库单编号,d.FName 发货人,f.FName 部门,e.FNumber 员工工号,g.FName 制单人,h.FName 审核人,FcheckDate 审核日期,a.FInterID 出库单ID,0,0,1,getdate()from ICStockBill aleft join t_Organization b on a.FSupplyID=b.FItemIDleft join t_SubMessage c on a.Fsalestyle

31、=c.finteridleft join t_Emp d on a.FFmanagerID=d.FItemIDleft join t_Emp e on a.FEmpID=e.FItemIDleft join t_Department f on a.FDeptID=f.FItemIDleft join t_user g on a.FBillerID=g.FUserID left join t_user h on a.Fcheckerid=h.FUserIDleft join ICTransactionType o on a.FSelTranType=o.FIDleft join t_Item n

32、 on a.FHeadSelfB0169=n.FItemIDleft join t_SubMessage m on a.FMarketingStyle=m.FInterID -where a.FBillNo='XOUT'where a.FTranType=21 and a.FROB=1 and a.fstatus != 0 and a.FCancellation = 0 and a.FHeadSelfB0169 is not nulland DateDiff(dd,a.Fcheckdate,getdate() = 0l 出库单明细insert into MiddleDB.dbo

33、.k3_deliverydetailselect a.FEntryID,a.FitemID materialID,i.Fname unit,a.FqtyMust qtyMust,a.Fqty qty,a.Fnote note,a.Fprice price, a.Famount allHookAmount,a.FEntryselfB0162 客户合同编号,h.finterid orderNo,a.FEntryselfB0168 箱数,j.FName 体系,k.FName 办事处,l.FName 实际业务员,a.FEntryselfB0171 类别,a.FEntryselfB0172 系列,b.F

34、Interid,a.FdetailID,h.FDetailID,0,0,1,getdate()from icstockbillEntry aleft join ICStockBill b on a.FInterID = b.FInterIDleft join (select c.FentryID,d.FbillNO,c.FOrderEntryID,c.FOrderBillNo from SEOutStockEntry c left join SEoutStock d on c.finterid = d.finterid where d.fstatus != 0 and d.FCancellat

35、ion = 0 ) eon a.FSEOutbillNo = e.fbillno and a.FSEOutEntryID =e.FEntryIDleft join (select f.FDetailID,f.FEntryID,g.FBillNo,g.finterid from SEOrderEntry f left join SEOrder g on f.finterid = g.finterid where g.fstatus != 0 and g.FCancellation = 0 )hon e.FOrderBillNo = h.FBillNo and e.FOrderEntryID =

36、h.FEntryIDleft join t_MeasureUnit i on a.FUnitID = i.FItemIDleft join t_Department j on j.Fitemid = a.FEntryselfB0189left join t_Department k on k.Fitemid = a.FEntryselfB0187left join t_Emp l on l.Fitemid = a.FEntryselfB0188 where a.FSourcebillno != '' and b.ftrantype =21 and b.fstatus != 0

37、and b.FCancellation = 0 and DateDiff(dd,b.Fcheckdate,getdate() = 0l 发票创建insert into middledb.dbo.k3_invoiceselect h.FNumber 客户代码,b.FName 销售方式,j.fname 源单类型,c.FName 结算方式,a.FSettleDate 收款日期,a.Fbank 开户银行,a.Fdate 日期,a.FTaxNum 纳税登记号,a.FAddress 地址,d.FName 往来科目,a.Fexplanation 摘要,a.FBillNo 发票号码,k.Fname 汇率类型,

38、i.Fname 币别,convert(varchar,a.FExchangeRate) 汇率,e.FName 部门,f.FNumber 业务员工号,g.FName 记账,o.FName 开票人,g.FName 审核人,Fcheckdate 审核日期,a.FInterID 发票ID,0,0,1,getdate()from ICSale aleft join t_SubMessage b on a.FSaleStyle=b.Finteridleft join t_settle c on a.FSettleID=c.FItemIDleft join t_Account d on a.FCussent

39、AcctID=d.FAccountIDleft join t_Department e on a.FDeptID=e.FItemIDleft join t_Emp f on a.FEmpID=f.FItemID left join t_Emp o on a.Finvoicer=o.FItemIDleft join t_user g on a.FPosterID=g.FUserID and a.FCheckerID=g.FUserIDleft join t_organization h on a.FCustID = h.fitemidleft join t_Currency i on a.FCu

40、rrencyID=i.FCurrencyIDleft join ICTransactionType j on a.fseltrantype = j.Fidleft join t_ExchangeRate k on k.fid = a.FExchangeRateType where a.fstatus != 0 and a.FCancellation = 0 and DateDiff(dd,a.Fcheckdate,getdate() = 0l 发票明细insert into MiddleDB.dbo.k3_invoicedetailselectcs.FentryID 序号,cs.FItemID

41、 产品ID,c.Fname 单位,cs.FAuxQty 数量,cs.FAuxTaxPrice 含税单价,cs.Famountincludetax 金额,cs.FTaxRate 税率,cs.FOrderinterID 订单ID,cs.FInterID 发票ID,cs.FdetailID 发票明细ID,cs.FSourceInterID 出库单ID,cs.FContractBillNo 合同编号,st.fdetailid 出库单明细ID,0,0,1,getdate()fromICSaleentry CSleft join ICStockBillEntry ST on cs.FSourceInter

42、ID = st.Finterid and cs.FSourceEntryID = st.Fentryidleft join icsale csa on csa.Finterid = cs.finteridleft join t_MeasureUnit c on cs.FUnitID=c.FItemID where csa.fstatus != 0 and csa.FCancellation = 0and DateDiff(dd,csa.Fcheckdate,getdate() = 0l 收款单创建insert into MiddleDB.dbo.k3_cashselect f.FName 收款

43、类型,FRPBank 收款银行,e.FName 结算方式,d.FName 币种,FContractNo 备注合同号,b.FName 审核人,c.FName 制单人,FAmount 金额,FDate 日期,FBillID 收款单ID,0,0,1,a.FNumber 收款单编号,getdate()fromt_RP_NewReceiveBill aleft join t_user b on a.Fchecker=b.FUserIDleft join t_user c on a.Fpreparer=c.FUserIDleft join t_Currency d on a.FCurrencyID=d.F

44、CurrencyIDleft join t_settle e on a.Fsettle=e.FItemIDleft join t_RP_SystemEnum f on a.Fbilltype=f.Fitemidwhere a.FRP=1 and a.fstatus != 0 and DateDiff(dd,a.Fcheckdate,getdate() =0l 收款单明细insert into MiddleDB.dbo.k3_cashdetail select Findex 序号,a.Fitemid 产品ID,FName 单位,FQuantity 数量,FTaxPrice 含税单价,a.FSet

45、tleAmount 金额,a.FBillID 收款单ID,FEntryID 收款明细ID,a.FContractNo 合同编号,a.FEntryID_SRC 源单单号,0,0,1,getdate()fromt_rp_ARBillOfSH aleft join t_RP_NewReceiveBill b on a.FBillID=b.FBillIDleft join t_MeasureUnit c on a.FUnitID=c.FItemID -left join (select FinterID,Fbillno from ICSale where Fbillno != '' a

46、nd FCancellation = 0) d on a.Fbillno_src = d.Fbillno where b.FRP=1and b.fstatus != 0 and DateDiff(dd,b.Fcheckdate,getdate() =0l 核销日志insert into middledb.dbo.k3_verifilogselect a.FInterID, a.Fid, b.Ftype, b.FNumber, a.FcheckAmount, u.Fname, a.FcheckDate, 0,0,1,getdate() from t_rp_newcheckinfo a join

47、t_rp_contact b on a.FContactID=b.FID left join t_item i on a.FCustomer=i.FItemID left join t_item ii on a.Fdepartment=ii.FItemID left join t_item iii on a.Femployee=iii.FItemID left join t_currency cur on a.FCurrencyID=cur.FCurrencyID left join t_User u on a.FChecker=u.FUserID where a.FRP=1 and a.FI

48、sBad=0 -and DateDiff(dd,a.FcheckDate,getdate() =0 and(a.FCheckManer=1 or (a.FCheckType>0 and a.FCheckManer=3)and FInterID not in (select checkLogID from middledb.dbo.k3_verifilog) union all select a.FInterID, a.Fid, b.Ftype, b.FNumber, a.FcheckAmount, u.Fname, a.FcheckDate, 0,0,1,getdate() from (

49、select FInterID,FID,FBillID,FType,FIsinit,FEntryID,FItemID,FUnitID,FContractNo,FOrderNo,sum(FCheckQuantity)FCheckQty,sum(FRemainQuantity)FRemainQty, sum(FCheckAmount)FCheckAmount,sum(FCheckAmountFor)FCheckAmountFor, sum(FRemainAmount)FRemainAmount,sum(FRemainAmountFor)FRemainAmountFor from t_rp_chec

50、kEntry group by FInterID,FID,FBillID,FType,FIsinit,FEntryID,FItemID,FUnitID,FContractNo,FOrderNo)c left join (select FInterID,FBillID,FType,FIsinit,FEntryID,Max(FRemainQuantity) FRemainQuantity,Max(FRemainAmount) FRemainAmount,Max(FRemainAmountFor) FRemainAmountFor from t_rp_checkEntry where FCheckA

51、mountFor<0 group by FInterID,FBillID,FType,FIsinit,FEntryID)x on c.FInterID=x.FInterID and c.FBillID=x.FBillID and c.FType=x.FType and c.FIsinit=x.FIsinit and c.FEntryID=x.FEntryID left join (select FInterID,FBillID,FType,FIsinit,FEntryID,Min(FRemainQuantity)FRemainQuantity,Min(FRemainAmount) FRe

52、mainAmount,Min(FRemainAmountFor) FRemainAmountFor from t_rp_checkEntry where FCheckAmountFor>=0 group by FInterID,FBillID,FType,FIsinit,FEntryID)y on c.FInterID=y.FInterID and c.FBillID=y.FBillID and c.FType=y.FType and c.FIsinit=y.FIsinit and c.FEntryID=y.FEntryID join t_rp_newcheckinfo a on c.F

53、InterID=a.FInterID join t_rp_contact b on a.FContactID=b.FID left join t_item i on a.FCustomer=i.FItemID left join t_item ii on a.Fdepartment=ii.FItemID left join t_item iii on a.Femployee=iii.FItemID left join t_currency cur on a.FCurrencyID=cur.FCurrencyID left join t_User u on a.FChecker=u.FUserI

54、D left join t_icItem p on c.FItemID=p.FItemID left join t_MeasureUnit q on c.FUnitID=q.FMeasureUnitID where a.FRP=1 and a.FIsBad=0 -and DateDiff(dd,a.FcheckDate,getdate() =0 and a.FCheckManer=2and a.FInterID not in (select checkLogID from middledb.dbo.k3_verifilog) union all select a.FInterID, a.Fid

55、, b.Ftype, b.FNumber, a.FcheckAmount, u.Fname, a.FcheckDate, 0,0,1,getdate() from t_rp_checkEntry c join t_rp_newcheckinfo a on c.FInterID=a.FInterID join t_rp_contact b on a.FContactID=b.FID left join t_item i on a.FCustomer=i.FItemID left join t_item ii on a.Fdepartment=ii.FItemID left join t_item iii on a.Femployee=iii.FItemID left join t_currency cur on a.FCurrencyID=cur.FCurrencyID left join t_User u on a.FChecker=u.FUserID left join t_icItem p on c.FItemID=p.FItemID left join t_MeasureUnit q on c.

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论