U811.1接口EAI系列之二--生成销售出库单调用U8的EAI通用处理方法--PowerBuilder语言
1.销售系统销售出库,更新U811.1材料库存的EAI的XML生成.
2.主要根据U8配置会生成出库单和同时是否更新库存量,还是更新现存量等等。
3.具体参考代码如下:
作者:王春天 2013-11-06
地址:http://www.cnblogs.com/spring_wang/p/3409925.html
代码中调用的通用方法在:http://www.cnblogs.com/spring_wang/p/3406230.html
//==================================================================== // 函数: gf_voucher_xml.gf_storeout_xml( ) //-------------------------------------------------------------------- // 描述:生成材料出库XML文件 //-------------------------------------------------------------------- // 参数: // value datawindow adw_head 主表数据所在数据窗口 // value datawindow adw_detail 细表数据所在数据窗口 // value datawindow adw_batch 条码表数据所在数据窗口 // value string as_proc 操作类型:Add(新增),Edit(修改),Delete(删除),Query(查询) // value string as_exportneedexch 导出时是否要根据对照表替换 Y/N // value string as_codeexchanged 编码是否已转换 Y/N // value string as_renewproofno 是否重新编码Y/N //-------------------------------------------------------------------- // 返回: integer //-------------------------------------------------------------------- // 日期: 2013年10月10日 Thursday 09:45:31 //-------------------------------------------------------------------- // 修改历史: // //==================================================================== string ls_sender,ls_xml string ls_data,ls_detail_pkid long ll_i,ll_find decimal ldc_price,ldc_num string ls_financial_sort datawindow ldw_temp string ls_key ls_sender = '002'//需要在数据库中配置 //固定表头 ls_xml = "<?xml version='1.0' encoding='UTF-8'?>" + "~r~n" //数据的表头格式 ls_xml = ls_xml + "<ufinterface sender='" + ls_sender + "' receiver='u8' roottag='storeout' docid='' proc='" + as_proc + "' renewproofno = '" + as_renewproofno + "' codeexchanged='" + as_codeexchanged + "' exportneedexch='" + as_exportneedexch + "' display='' family='' timestamp=''>" + "~r~n" //增加文件中数据项信息 header ls_xml = ls_xml + "<storeout>" + "~r~n" ls_xml = ls_xml + "<header>" + "~r~n" ls_data = "0" ls_xml = ls_xml + "<receiveflag>" + ls_data + "</receiveflag>" + "~r~n" //收发标志 入库单-收 1,出库单-发 0 ls_data = "32" ls_xml = ls_xml + "<vouchtype>" + ls_data + "</vouchtype>" + "~r~n" //单据类型 09:其他出库单 11:材料出库单 32:销售出库单 ls_data = "普通销售" ls_xml = ls_xml + "<businesstype>" + ls_data + "</businesstype>" + "~r~n" //业务类型 ls_data = "库存" ls_xml = ls_xml + "<source>" + ls_data + "</source>" + "~r~n" //单据来源 采购、销售、库存、存货 ls_data = "" ls_xml = ls_xml + "<businesscode>" + ls_data + "</businesscode>" + "~r~n" //对应业务单号 ls_data = adw_batch.Object.stock_code[1]//"0001" 仓库号需要从条码表获取 ls_xml = ls_xml + "<warehousecode>" + ls_data + "</warehousecode>" + "~r~n" //仓库编码 ls_data = string(date(adw_head.Object.out_date[1]),'yyyy-mm-dd')//"2013-10-17" ls_xml = ls_xml + "<date>" + ls_data + "</date>" + "~r~n" //单据日期 ls_data = adw_head.Object.delivery_code[1]//"002" ls_xml = ls_xml + "<code>" + ls_data + "</code>" + "~r~n" //单据号 ls_data = "" //根据出库类别基本档案表 ls_xml = ls_xml + "<receivecode>" + ls_data + "</receivecode>" + "~r~n" //收发类别编码 //获取事务所对应的成本中心 传入U8做为部门 前一个为合同大类,后一个为事务所 ls_data = gf_get_costcentre('收入',adw_detail.Object.business_type[1],adw_detail.Object.office_code[1]) if gf_str_isnull(ls_data) then MessageBox("系统提示","未获取到事务所对应的成本中心!") return 0 end if ls_xml = ls_xml + "<departmentcode>" + ls_data + "</departmentcode>" + "~r~n" //部门编码 ls_data = "" ls_xml = ls_xml + "<personcode>" + ls_data + "</personcode>" + "~r~n" //职员编码 业务员 ls_data = "" ls_xml = ls_xml + "<purchasetypecode>" + ls_data + "</purchasetypecode>" + "~r~n" //采购类型编码 采购入库用 ls_data = adw_detail.Object.pact_sort[1]// 合同类型 SELECT sms_pact_type.pact_area_type INTO :ls_data FROM sms_pact_type Where sms_pact_type.pk_id = :ls_data;//根据合同类型获取 if gf_str_isnull(ls_data) then MessageBox("系统提示","未获取到合同类型对应的编码!") Return 0 end if ls_xml = ls_xml + "<saletypecode>" + ls_data + "</saletypecode>" + "~r~n" //销售类型编码 销售出库用 ls_data = adw_head.Object.buddy_code[1]//"00001" ls_xml = ls_xml + "<customercode>" + ls_data + "</customercode>" + "~r~n" //客户编码 销售出库单、其他出库单用 ls_data = "" ls_xml = ls_xml + "<customerccode>" + ls_data + "</customerccode>" + "~r~n" //客户分类 ls_data = "" ls_xml = ls_xml + "<cacauthcode>" + ls_data + "</cacauthcode>" + "~r~n" //不清楚做什么用的 ls_data = "" ls_xml = ls_xml + "<vendorcode>" + ls_data + "</vendorcode>" + "~r~n" //供应商编码 采购入库单、其他入库单用 ls_data = "" ls_xml = ls_xml + "<ordercode>" + ls_data + "</ordercode>" + "~r~n" //订单号 ls_data = "" ls_xml = ls_xml + "<quantity>" + ls_data + "</quantity>" + "~r~n" //产量 ls_data = "" ls_xml = ls_xml + "<arrivecode>" + ls_data + "</arrivecode>" + "~r~n" //到货单号 采购入库单用 ls_data = "" ls_xml = ls_xml + "<billcode>" + ls_data + "</billcode>" + "~r~n" //发票号 采购入库单、销售出库单用 ls_data = "" ls_xml = ls_xml + "<consignmentcode>" + ls_data + "</consignmentcode>" + "~r~n" //发货单号 销售出库单用 ls_data = "" ls_xml = ls_xml + "<arrivedate>" + ls_data + "</arrivedate>" + "~r~n" //到货日期 ls_data = "" ls_xml = ls_xml + "<checkcode>" + ls_data + "</checkcode>" + "~r~n" //检验单号 ls_data = "" ls_xml = ls_xml + "<checkdate>" + ls_data + "</checkdate>" + "~r~n" //检验日期 ls_data = "" ls_xml = ls_xml + "<checkperson>" + ls_data + "</checkperson>" + "~r~n" //检验员 编码 ls_data = "" ls_xml = ls_xml + "<templatenumber>" + ls_data + "</templatenumber>" + "~r~n" //模版号 ls_data = "" ls_xml = ls_xml + "<serial>" + ls_data + "</serial>" + "~r~n" //生产批号 产成品入库单、材料出库单用 ls_data = "" ls_xml = ls_xml + "<handler>" + ls_data + "</handler>" + "~r~n" //经手人 编码 ls_data = "" ls_xml = ls_xml + "<memory>" + ls_data + "</memory>" + "~r~n" //备注 ls_data = user.user_name ls_xml = ls_xml + "<maker>" + ls_data + "</maker>" + "~r~n" //制单人 ls_data = "" ls_xml = ls_xml + "<chandler>" + ls_data + "</chandler>" + "~r~n" //审核人 ls_data = adw_detail.Object.pact_code[1]//自定义字段1,传输合同编号 ls_xml = ls_xml + "<define1>" + ls_data + "</define1>" + "~r~n" //自定义字段1 ls_data = "" ls_xml = ls_xml + "<define2>" + ls_data + "</define2>" + "~r~n" //自定义字段2 ls_data = "" ls_xml = ls_xml + "<define3>" + ls_data + "</define3>" + "~r~n" //自定义字段3 ls_data = "" ls_xml = ls_xml + "<define4>" + ls_data + "</define4>" + "~r~n" //自定义字段4 ls_data = "" ls_xml = ls_xml + "<define5>" + ls_data + "</define5>" + "~r~n" //自定义字段5 ls_data = "" ls_xml = ls_xml + "<define6>" + ls_data + "</define6>" + "~r~n" //自定义字段6 ls_data = "" ls_xml = ls_xml + "<define7>" + ls_data + "</define7>" + "~r~n" //自定义字段7 ls_data = "" ls_xml = ls_xml + "<define8>" + ls_data + "</define8>" + "~r~n" //自定义字段8 ls_data = "" ls_xml = ls_xml + "<define9>" + ls_data + "</define9>" + "~r~n" //自定义字段9 ls_data = "" ls_xml = ls_xml + "<define10>" + ls_data + "</define10>" + "~r~n" //自定义字段10 ls_data = "" ls_xml = ls_xml + "<define11>" + ls_data + "</define11>" + "~r~n" //自定义字段11 ls_data = "" ls_xml = ls_xml + "<define12>" + ls_data + "</define12>" + "~r~n" //自定义字段12 ls_data = "" ls_xml = ls_xml + "<define13>" + ls_data + "</define13>" + "~r~n" //自定义字段13 ls_data = "" ls_xml = ls_xml + "<define14>" + ls_data + "</define14>" + "~r~n" //自定义字段14 ls_data = "" ls_xml = ls_xml + "<define15>" + ls_data + "</define15>" + "~r~n" //自定义字段15 ls_data = "" ls_xml = ls_xml + "<define16>" + ls_data + "</define16>" + "~r~n" //自定义字段16 ls_data = "" ls_xml = ls_xml + "<auditdate>" + ls_data + "</auditdate>" + "~r~n" //审核日期 ls_data = "" ls_xml = ls_xml + "<taxrate>" + ls_data + "</taxrate>" + "~r~n" //税率 ls_data = adw_detail.describe("Evaluate('Lookupdisplay(money_sort)',1)") ls_xml = ls_xml + "<exchname>" + ls_data + "</exchname>" + "~r~n" //币种名称 ls_data = "" ls_xml = ls_xml + "<exchrate>" + ls_data + "</exchrate>" + "~r~n" //汇率 ls_data = "" ls_xml = ls_xml + "<discounttaxtype>" + ls_data + "</discounttaxtype>" + "~r~n" //扣税类别 ls_data = "" ls_xml = ls_xml + "<contact>" + ls_data + "</contact>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<phone>" + ls_data + "</phone>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<mobile>" + ls_data + "</mobile>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<address>" + ls_data + "</address>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<conphone>" + ls_data + "</conphone>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<conmobile>" + ls_data + "</conmobile>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<deliverunit>" + ls_data + "</deliverunit>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<contactname>" + ls_data + "</contactname>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<officephone>" + ls_data + "</officephone>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<mobilephone>" + ls_data + "</mobilephone>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<psnophone>" + ls_data + "</psnophone>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<psnmobilephone>" + ls_data + "</psnmobilephone>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<shipaddress>" + ls_data + "</shipaddress>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<addcode>" + ls_data + "</addcode>" + "~r~n" //不清楚XML中含义 ls_data = "" ls_xml = ls_xml + "<iscomplement>" + ls_data + "</iscomplement>" + "~r~n" //补料标志 ls_xml = ls_xml + "</header>" + "~r~n" //body ls_xml = ls_xml + "<body>" + "~r~n" For ll_i = 1 To adw_batch.RowCount() ls_detail_pkid = adw_batch.Object.stock_out_detail_pkid[ll_i] ll_find = adw_detail.Find("pk_id = '" + ls_detail_pkid + "'",1,adw_detail.RowCount()) ls_xml = ls_xml + "<entry>" + "~r~n" ls_data = "" ls_xml = ls_xml + "<barcode>" + ls_data + "</barcode>" + "~r~n" //条形码 ls_data = adw_batch.Object.special_prot_code[ll_i]//"0002" ls_xml = ls_xml + "<inventorycode>" + ls_data + "</inventorycode>" + "~r~n" //存货编码 ls_data = "" ls_xml = ls_xml + "<free1>" + ls_data + "</free1>" + "~r~n" //自由项1 ls_data = "" ls_xml = ls_xml + "<free2>" + ls_data + "</free2>" + "~r~n" //自由项2 ls_data = "" ls_xml = ls_xml + "<free3>" + ls_data + "</free3>" + "~r~n" //自由项3 ls_data = "" ls_xml = ls_xml + "<free4>" + ls_data + "</free4>" + "~r~n" //自由项4 ls_data = "" ls_xml = ls_xml + "<free5>" + ls_data + "</free5>" + "~r~n" //自由项5 ls_data = "" ls_xml = ls_xml + "<free6>" + ls_data + "</free6>" + "~r~n" //自由项6 ls_data = "" ls_xml = ls_xml + "<free7>" + ls_data + "</free7>" + "~r~n" //自由项7 ls_data = "" ls_xml = ls_xml + "<free8>" + ls_data + "</free8>" + "~r~n" //自由项8 ls_data = "" ls_xml = ls_xml + "<free9>" + ls_data + "</free9>" + "~r~n" //自由项9 ls_data = "" ls_xml = ls_xml + "<free10>" + ls_data + "</free10>" + "~r~n" //自由项10 ls_data = "" ls_xml = ls_xml + "<shouldquantity>" + ls_data + "</shouldquantity>" + "~r~n" //应收(发)数量 ls_data = "" ls_xml = ls_xml + "<shouldnumber>" + ls_data + "</shouldnumber>" + "~r~n" //应收(发)件数 ldc_num = adw_batch.Object.prot_num[ll_i] ls_data = string(ldc_num) ls_xml = ls_xml + "<quantity>" + ls_data + "</quantity>" + "~r~n" //数量(主记量数量) 应收(发)数量和数量不能同时为空。 ls_data = adw_batch.describe("Evaluate('Lookupdisplay(prot_unit)'," + string(ll_i) + ")") ls_xml = ls_xml + "<cmassunitname>" + ls_data + "</cmassunitname>" + "~r~n" //主记量单位名称? ls_data = "" ls_xml = ls_xml + "<assitantunit>" + ls_data + "</assitantunit>" + "~r~n" //辅记量单位 ls_data = "" ls_xml = ls_xml + "<assitantunitname>" + ls_data + "</assitantunitname>" + "~r~n" //辅记量单位名称 ls_data = "" ls_xml = ls_xml + "<irate>" + ls_data + "</irate>" + "~r~n" //换算率? ls_data = "" ls_xml = ls_xml + "<number>" + ls_data + "</number>" + "~r~n" //件数 ldc_price = adw_detail.object.sale_price[ll_find] ls_data = string(ldc_price)//销售单价 ls_xml = ls_xml + "<price>" + ls_data + "</price>" + "~r~n" //单价 ls_data = string(round(ldc_num * ldc_price,2)) ls_xml = ls_xml + "<cost>" + ls_data + "</cost>" + "~r~n" //金额 ls_data = "" ls_xml = ls_xml + "<plancost>" + ls_data + "</plancost>" + "~r~n" //计划单价? ls_data = "" ls_xml = ls_xml + "<planprice>" + ls_data + "</planprice>" + "~r~n" //计划金额? ls_data = "" ls_xml = ls_xml + "<serial>" + ls_data + "</serial>" + "~r~n" //批号 ls_data = "" ls_xml = ls_xml + "<makedate>" + ls_data + "</makedate>" + "~r~n" //生产日期 ls_data = "" ls_xml = ls_xml + "<validdate>" + ls_data + "</validdate>" + "~r~n" //失效日期) ls_data = "" ls_xml = ls_xml + "<transitionid>" + ls_data + "</transitionid>" + "~r~n" //调拨单子表ID号 ls_data = "" ls_xml = ls_xml + "<subbillcode>" + ls_data + "</subbillcode>" + "~r~n" //发票子表ID号 ls_data = "" ls_xml = ls_xml + "<subpurchaseid>" + ls_data + "</subpurchaseid>" + "~r~n" //采购订单子表ID号 ls_data = adw_batch.Object.stack_code[ll_i] ls_xml = ls_xml + "<position>" + ls_data + "</position>" + "~r~n" //货位 ls_data = "" ls_xml = ls_xml + "<itemclasscode>" + ls_data + "</itemclasscode>" + "~r~n" //项目大类编码 ls_data = "00"//项目大类编码固定为00 ls_xml = ls_xml + "<itemclassname>" + ls_data + "</itemclassname>" + "~r~n" //项目大类名称 ls_financial_sort = adw_detail.Object.financial_sort[ll_find] if gf_get_sanyoerp_encode("SMS",'SAP',ls_financial_sort,ls_data,'09') = 0 then MessageBox("系统提示","获取财务类别:" + ls_financial_sort + "对应业务范围失败!") Return 0 end if ls_xml = ls_xml + "<itemcode>" + ls_data + "</itemcode>" + "~r~n" //项目编码 ls_data = "" ls_xml = ls_xml + "<itemname>" + ls_data + "</itemname>" + "~r~n" //项目名称 ls_data = "" ls_xml = ls_xml + "<define22>" + ls_data + "</define22>" + "~r~n" //表体自定义项22 ls_data = "" ls_xml = ls_xml + "<define23>" + ls_data + "</define23>" + "~r~n" //表体自定义项23 ls_data = "" ls_xml = ls_xml + "<define24>" + ls_data + "</define24>" + "~r~n" //表体自定义项24 ls_data = "" ls_xml = ls_xml + "<define25>" + ls_data + "</define25>" + "~r~n" //表体自定义项25 ls_data = "" ls_xml = ls_xml + "<define26>" + ls_data + "</define26>" + "~r~n" //表体自定义项26 ls_data = "" ls_xml = ls_xml + "<define27>" + ls_data + "</define27>" + "~r~n" //表体自定义项27 ls_data = "" ls_xml = ls_xml + "<define28>" + ls_data + "</define28>" + "~r~n" //表体自定义项28 ls_data = "" ls_xml = ls_xml + "<define29>" + ls_data + "</define29>" + "~r~n" //表体自定义项29 ls_data = "" ls_xml = ls_xml + "<define30>" + ls_data + "</define30>" + "~r~n" //表体自定义项30 ls_data = "" ls_xml = ls_xml + "<define31>" + ls_data + "</define31>" + "~r~n" //表体自定义项31 ls_data = "" ls_xml = ls_xml + "<define32>" + ls_data + "</define32>" + "~r~n" //表体自定义项32 ls_data = "" ls_xml = ls_xml + "<define33>" + ls_data + "</define33>" + "~r~n" //表体自定义项33 ls_data = "" ls_xml = ls_xml + "<define34>" + ls_data + "</define34>" + "~r~n" //表体自定义项34 ls_data = "" ls_xml = ls_xml + "<define35>" + ls_data + "</define35>" + "~r~n" //表体自定义项35 ls_data = "" ls_xml = ls_xml + "<define36>" + ls_data + "</define36>" + "~r~n" //表体自定义项36 ls_data = "" ls_xml = ls_xml + "<define37>" + ls_data + "</define37>" + "~r~n" //表体自定义项37 ls_data = "" ls_xml = ls_xml + "<subconsignmentid>" + ls_data + "</subconsignmentid>" + "~r~n" //发货单子表ID ls_data = "" ls_xml = ls_xml + "<delegateconsignmentid>" + ls_data + "</delegateconsignmentid>" + "~r~n" //委托代销发货单子表 ls_data = "" ls_xml = ls_xml + "<subproducingid>" + ls_data + "</subproducingid>" + "~r~n" //生产订单子表ID ls_data = "" ls_xml = ls_xml + "<subcheckid>" + ls_data + "</subcheckid>" + "~r~n" //检验单子表ID ls_data = "" ls_xml = ls_xml + "<cRejectCode>" + ls_data + "</cRejectCode>" + "~r~n" //不良品处理单号 ls_data = "" ls_xml = ls_xml + "<iRejectIds>" + ls_data + "</iRejectIds>" + "~r~n" //不良品处理单ID ls_data = "" ls_xml = ls_xml + "<cCheckPersonCode>" + ls_data + "</cCheckPersonCode>" + "~r~n" //检验员 ls_data = "" ls_xml = ls_xml + "<dCheckDate>" + ls_data + "</dCheckDate>" + "~r~n" //检验日期 ls_data = "" ls_xml = ls_xml + "<cCheckCode>" + ls_data + "</cCheckCode>" + "~r~n" //检验单号 ls_data = "" ls_xml = ls_xml + "<iMassDate>" + ls_data + "</iMassDate>" + "~r~n" //保质期天数 ls_data = "" ls_xml = ls_xml + "<ioritaxcost>" + ls_data + "</ioritaxcost>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<ioricost>" + ls_data + "</ioricost>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<iorimoney>" + ls_data + "</iorimoney>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<ioritaxprice>" + ls_data + "</ioritaxprice>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<iorisum>" + ls_data + "</iorisum>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<taxrate>" + ls_data + "</taxrate>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<taxprice>" + ls_data + "</taxprice>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<isum>" + ls_data + "</isum>" + "~r~n" //不清楚XML中具体含义 ls_data = "" ls_xml = ls_xml + "<massunit>" + ls_data + "</massunit>" + "~r~n" //保质期单位 ls_data = "" ls_xml = ls_xml + "<vmivencode>" + ls_data + "</vmivencode>" + "~r~n" //代管商编码 ls_data = "" ls_xml = ls_xml + "<whpersoncode>" + ls_data + "</whpersoncode>" + "~r~n" //库管员编码 ls_data = "" ls_xml = ls_xml + "<whpersonname>" + ls_data + "</whpersonname>" + "~r~n" //库管员名称 ls_data = "" ls_xml = ls_xml + "<batchproperty1>" + ls_data + "</batchproperty1>" + "~r~n" //属性1 ls_data = "" ls_xml = ls_xml + "<batchproperty2>" + ls_data + "</batchproperty2>" + "~r~n" //属性2 ls_data = "" ls_xml = ls_xml + "<batchproperty3>" + ls_data + "</batchproperty3>" + "~r~n" //属性3 ls_data = "" ls_xml = ls_xml + "<batchproperty4>" + ls_data + "</batchproperty4>" + "~r~n" //属性4 ls_data = "" ls_xml = ls_xml + "<batchproperty5>" + ls_data + "</batchproperty5>" + "~r~n" //属性5 ls_data = "" ls_xml = ls_xml + "<batchproperty6>" + ls_data + "</batchproperty6>" + "~r~n" //属性6 ls_data = "" ls_xml = ls_xml + "<batchproperty7>" + ls_data + "</batchproperty7>" + "~r~n" //属性7 ls_data = "" ls_xml = ls_xml + "<batchproperty8>" + ls_data + "</batchproperty8>" + "~r~n" //属性8 ls_data = "" ls_xml = ls_xml + "<batchproperty9>" + ls_data + "</batchproperty9>" + "~r~n" //属性9 ls_data = "" ls_xml = ls_xml + "<batchproperty10>" + ls_data + "</batchproperty10>" + "~r~n" //属性10 ls_data = "" ls_xml = ls_xml + "<iexpiratdatecalcu>" + ls_data + "</iexpiratdatecalcu>" + "~r~n" //有效期推算方式 ls_data = "" ls_xml = ls_xml + "<dexpirationdate>" + ls_data + "</dexpirationdate>" + "~r~n" //有效期计算项 ls_data = "" ls_xml = ls_xml + "<cexpirationdate>" + ls_data + "</cexpirationdate>" + "~r~n" //有效期至 ls_data = "" ls_xml = ls_xml + "<memory>" + ls_data + "</memory>" + "~r~n" //备注 ls_xml = ls_xml + "</entry>" + "~r~n" Next ls_xml = ls_xml + "</body>" + "~r~n" //增加文件尾相关信息 ls_xml = ls_xml + "</storeout>" + "~r~n" ls_xml = ls_xml + "</ufinterface>" + "~r~n" //此段代码生成一个XML文件,可用于查看生成的数据 //oleobject ixmldom //long ll_return //ixmldom = CREATE OLEObject //ll_return = ixmldom.connecttonewobject( "microsoft.xmldom")//创建DOM对象 //if ll_return <> 0 then // destroy ixmldom // messagebox("","创建DOM对象失败!") // Return 0 //end if //iXMLDOM.loadXML(ls_xml) //iXMLDOM.save("d:\temp.xml") //destroy ixmldom if gf_interface_eai(ldw_temp,ls_xml,as_proc,ls_key) = 0 then Return 0 end if MessageBox("系统提示","上传成功!") Return 1
作者: 王春天 出处: http://www.cnblogs.com/spring_wang/ Email: spring_best@yeah.net QQ交流:903639067
QQ群:322581894 关于作者: 大连天翼信息科技有限公司 技术总监。 SNF快速开发平台 创始人。应用平台架构师、IT规划咨询专家、业务流程设计专家。 专注于快速开发平台的开发、代码生成器。同时专注于微软平台项目架构、管理和企业解决方案,多年项目开发与管理经验,精通DotNet系列技术Vue、.NetCore、MVC、Webapi、C#、WinForm等,DB(SqlServer、Oracle等)技术,移动端开发。熟悉Java、VB及PB开发语言。在面向对象、面向服务以及数据库领域有一定的造诣。现从事项目实施、开发、架构等工作。并从事用友软件产品U8、U9、PLM 客开工作。 如有问题或建议,请多多赐教! 本文版权归作者和CNBLOGS博客共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,如有问题,可以通过邮箱或QQ 联系我,非常感谢。