GSP记录补充

WMS中先生成单据编号

--《--采购入库----》

--1、删除表

drop table temp_djbh

--2、创建表

create table temp_djbh as

select djbh,djbh_sj shdh,djbh_sj ysdh,djbh_sj cgddh from in_upload_m where 1=2;

--3、将生成的数据插入表 中

declare

v_shdh varchar2(20) :=‘JHGYMA00027196‘;--收货最大单据编号

v_ysdh varchar2(20) :=‘JYDYMA00026766‘;--验收最大单据编号

begin

for r_c in (select djbh,djbh_sj cgddh from in_upload_m where djbh_sj like ‘JHF%‘ and dwid <>‘QCRK‘) loop

v_shdh := substr(v_shdh||‘0000000000‘,1,9)||(substr(v_shdh,7,8) +1);

v_ysdh := substr(v_ysdh||‘0000000000‘,1,9)||(substr(v_ysdh,7,8) +1);

insert into temp_djbh (djbh,shdh,ysdh,cgddh) values(r_c.djbh,v_shdh,v_ysdh,r_c.cgddh);

end loop;

end;

--4、查询表中数据

select * from temp_djbh order by djbh

--《---销售退回单号----》

declare

v_shdh varchar2(20) :=‘XSSYMA00019474‘;--收货最大单据编号

v_ysdh varchar2(20) :=‘FHBYMA00019481‘;--验收最大单据编号

begin

for r_c in (select djbh,djbh_sj cgddh from in_upload_m where djbh_sj like ‘XST%‘ and dwid

<>‘QCRK‘) loop

v_shdh := substr(v_shdh||‘0000000000‘,1,9)||(substr(v_shdh,7,8) +1);

v_ysdh := substr(v_ysdh||‘0000000000‘,1,9)||(substr(v_ysdh,7,8) +1);

insert into temp_djbh (djbh,shdh,ysdh,cgddh) values(r_c.djbh,v_shdh,v_ysdh,r_c.cgddh);

end loop;

end;

--《--购退单号----》

declare

v_shdh varchar2(20) :=‘JYTYMA00004497‘;--收货最大单据编号

begin

for r_c in (select djbh from inf_gjtc_hz where djbh like ‘JHT%‘) loop

v_shdh := substr(v_shdh||‘0000000000‘,1,9)||(substr(v_shdh,7,8) +1);

insert into temp_djbh (djbh,shdh,ysdh,cgddh) values(r_c.djbh,v_shdh,‘‘,‘‘);

end loop;

end;

ERP中插入相关记录

select * from spkfk where spbh in (‘J000531‘,‘J000532‘,‘J000533‘,‘J000626‘,‘J000535‘,‘J000673‘)

update spkfk set spid=replace(spid,‘SPA‘,‘SPH‘) where spbh in (‘J000531‘,‘J000532‘,‘J000533‘,‘J000626‘,‘J000535‘,‘J000673‘)

--单据对应关系

select * from openquery ( ORACLE  , ‘SELECT * FROM temp_djbh‘)

select * from fr_tmp_wms_djdygx

--收货明细

truncate table fr_tmp_jh_djmx

insert into fr_tmp_jh_djmx (djbh,dj_sn,dj_sort,spid,xgdjbh,recnum,duiydjbh,duiydj_cn,shl,hshj,hsje,wkfs,ddwd,qywd,ddsj,jsshl,qysj)

select  a.shdh as djbh,a.dj_sort as dj_sn,a.dj_sort,a.spid,a.djbh_sj as xgdjbh,a.dj_sort_sj as recnum,a.djbh_rk as duiydjbh,a.dj_sort as duiydj_cn,a.sl as shl,b.hshj,b.hsje,isnull(a.wkfs,‘‘) wkfs,a.dhwd as ddwd,‘‘ as qywd,case when a.sf_lc=1 then CONVERT(varchar(20), a.dhsj, 24) else ‘‘ end as ddsj,0 as jsshl,case when sf_lc=1 then CONVERT(varchar(20), a.qysj, 24) else ‘‘ end qysj

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a,jxddmx b

where a.shdh like ‘JHG%‘ and a.djbh_sj=b.djbh and a.dj_sort_sj=b.dj_sn and a.spid=b.spid order by a.shdh

--更新拒收数量

update b set b.jsshl=a.sl from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys_js‘) a,fr_tmp_jh_djmx b

where a.shdh like ‘JHG%‘ and a.shdh=b.djbh and a.dj_sort=b.dj_sn and a.spid=b.spid

delete jh_djmx where djbh>‘JHGYMA00027196‘ and djbh like ‘JHG%‘

insert into jh_djmx

select * from fr_tmp_jh_djmx  order by djbh

--insert into fr_tmp_jh_djmx

--    select f.shdh as djbh,d.dj_sort as dj_sn,d.dj_sort,d.spid,d.cgddh as xgdjbh,d.cgdd_sort as recnum,d.djbh as duiydjbh,d.dj_sort as duiydj_cn,b.dw,‘‘ pihao,

--  ‘‘ as baozhiqi,‘‘ as sxrq,b.jlgg,‘‘ as hw,d.jiansh as baozhshl,d.lingsshl as lingsshl,d.shl,a.dj,a.hshj,100 as koul,round(d.shl*a.dj,2) as je,a.shlv,round(d.shl*a.hshj,2) -round(d.shl*a.dj,2) as she,

--  round(d.shl*a.hshj,2) as hsje,0 as lshj,0 as lshje,0 as chbdj,‘‘ as miejph,‘‘ as beihy,0 as ydj,0 as ndj,0 as yixsl,0 as weixsl,0 as picishl,‘‘ as songhr,‘否‘ as zengp,‘‘ as pici,‘‘ as fapiaoh,0 as bukccb,0 as yhshj,

--  0 as nhshj,0 as jiansh,0 as buckcb,‘‘ as beizhu,100 as koulv,100 as koulv1,100 as koulv2,100 as koulv3,0 as dj2,0 as je2,‘‘  as thyy,100 as koulv4,‘‘ as jwh,‘‘ as yssx,‘‘ as wkfs,‘‘ as ddwd,‘‘ as qywd,‘‘ as ddsj,0 as jsshl,0 as pckhdj,

--  ‘‘ as xsbmxz,‘‘ as qyrq,‘‘ as qysj,0 as pcxsxj,‘是‘ as is_zx,0 as yiwchsl,0 as quxsl

-- from jxddmx a (nolock) join jxddhz e on a.djbh=e.djbh

--  join spkfk b (nolock) on a.spid = b.spid

--  join int_wms_cgrk_bill_his d (nolock) on  a.dj_sn=d.cgdd_sort and a.djbh=d.cgddh

--   left join huoweizl c (nolock) on d.yspd = c.huowlb

--    left join fr_tmp_wms_djdygx f on left(shdh,3)=‘jhg‘ and f.djbh=d.djbh

-- where a.djbh like ‘jhf%‘  and d.yspd<>‘5‘

-- order by f.shdh

-- --冷藏明细

--update b set b.ddwd=a.dhwd,b.wkfs=a.wkfs,b.ddsj=CONVERT(varchar(20), dhsj, 24),b.qysj=CONVERT(varchar(20), a.qysj, 24) from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a left join fr_tmp_jh_djmx b on a.djbh_sj=b.xgdjbh and a.spid=b.spid and b.recnum=a.dj_sort_sj

--where a.sf_lc=1 and a.djbh_sj like ‘jhF%‘

--收货汇总

truncate table fr_tmp_jh_djhz

insert into fr_tmp_jh_djhz (djbh,djbs,djlx,bendian,rq,dwbh,kaiprq,ontime,yuansph,username,zhy)

select distinct a.shdh as djbh,‘JHG‘ as djbs,‘112‘ as djlx,‘YMA‘ as bendian,CONVERT(varchar(20),a.savedate, 23) rq,a.dwid as dwbh,CONVERT(varchar(20),a.savedate, 23) kaiprq,CONVERT(varchar(20),a.savedate, 24) ontime,a.djbh_sj as yuansph,a.ry_shy as username,‘进货票单‘ as zhy

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a

where a.shdh like ‘JHG%‘ order by a.shdh

--insert into fr_tmp_jh_djhz

--select distinct d.djbh as djbh,‘JHG‘ as djbs,‘112‘ as djlx,‘YMA‘ as bendian,‘‘ as rq,c.dwbh,a.bezzs,‘‘ as kaiprq,‘‘ ontime,‘‘ as pihao,a.bm,a.ywy,a.username,‘‘ as leth,c.djbh as yuansph,‘‘ as zph,‘‘ as kpman,‘否‘ as is_yckp,‘否‘ yishj,‘进货票单‘ as zhy,‘‘ as ywbmid,‘‘ as ywyid,‘‘ beizhu,a.fukfs,‘‘ fukqx,a.ydhrq,‘‘ as jingd,a.cyfs,a.cydw,a.is_wtys,‘‘ yssx,‘‘ as wkfs,‘‘ qysj,‘‘ is_jus,‘否‘ shenhe,‘‘ shenhr,

--‘‘ as shenhyj,‘‘ shenhrq,‘‘ as shenhe_cw,‘‘ as shenher_cw,‘‘ as shenheyj_cw,‘‘ as shenherq_cw,‘‘ fhdz,a.ywlxr,a.xszxshx,a.bmgs,a.rktype,‘是‘ is_zx

--from jxddhz a,mchk b,int_wms_cgrk_bill_his c,(select distinct djbh,duiydjbh from fr_tmp_jh_djmx) d

--where  a.dwbh=b.dwbh  and a.djbh=c.cgddh and c.djbh=d.duiydjbh

--order by d.djbh

delete jh_djhz where djbh>‘JHGYMA00027196‘ and djbh like ‘JHG%‘

insert into jh_djhz

select * from fr_tmp_jh_djhz  order by djbh

--收货更新汇总

--update b set b.rq=CONVERT(varchar(20), a.savedate, 23),b.ontime=CONVERT(varchar(20), a.savedate, 24),b.username=a.ry_shy from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a left join fr_tmp_jh_djhz b on a.djbh_rk=b.yuansph

--where a.sf_lc=1 and a.djbh_sj like ‘jhF%‘

--update b set b.rq=CONVERT(varchar(20), a.savedate, 23),b.ontime=CONVERT(varchar(20), a.savedate, 24),b.username=a.ry_shy from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a left join fr_tmp_jh_djhz b on a.djbh_rk=b.yuansph

--where a.djbh_sj like ‘jhF%‘

--采退出库复核明细

truncate table fr_tmp_jzorder_mx_ysd

insert into fr_tmp_jzorder_mx_ysd (djbh,dj_sn,dj_sort,spid,pihao,baozhiqi,sxrq,shl,xgdjbh,recnum,thyy)

select a.fudj as djbh,a.dj_sort as dj_sn,a.dj_sort,a.spid,a.ph as pihao,a.rq_sc as baozhiqi,a.yxqz as sxrq,a.sl as shl,a.djbh as xgdjbh,a.dj_sort_erp as recnum,a.thyy

from openquery ( ORACLE  , ‘SELECT * FROM v_ck_gjtc‘) a

where a.fudj like ‘JYT%‘ order by a.fudj

delete jzorder_mx_ysd where djbh>‘JYTYMA00004497‘ and djbh like ‘JYT%‘

insert into jzorder_mx_ysd

select * from fr_tmp_jzorder_mx_ysd where djbh like ‘JYT%‘ order by djbh

--采退出库复核汇总

truncate table fr_tmp_jzorder_hz_ysd

insert into fr_tmp_jzorder_hz_ysd ( djbh,djbs,djlx,bendian,rq,dwbh,yanshr,username,kaiprq,ontime,kpman,zhy,kaipiaodjbh )

select distinct a.fudj as djbh,‘JYT‘ as djbs,‘131‘ as djlx,‘YMA‘ as bendian,CONVERT(varchar(20), a.rq, 23) as rq,a.dwid as dwbh,a.ry_fuhy as yanshr,a.ry_fuhy as username,CONVERT(varchar(20), a.rq, 23) as kaiprq,CONVERT(varchar(20), a.rq, 24) as ontime,a.ry_fuhy as kpman,‘进货退出GSP复核‘ as zhy,a.djbh as kaipiaodjbh

from openquery ( ORACLE  , ‘SELECT * FROM v_ck_gjtc‘) a

where a.fudj like ‘JYT%‘ order by a.fudj

delete jzorder_hz_ysd where djbh>‘JYTYMA00004497‘ and djbh like ‘JYT%‘

insert into jzorder_hz_ysd

select * from   fr_tmp_jzorder_hz_ysd where djbh like ‘JYT%‘ order by djbh

--采购验收明细

truncate table fr_tmp_jzorder_mx_ysd

insert into fr_tmp_jzorder_mx_ysd (djbh,dj_sn,dj_sort,spid,pihao,baozhiqi,sxrq,shl,xgdjbh,recnum,dwbh)

select a.ysdh as djbh,a.dj_sort as dj_sn,a.dj_sort,a.spid,a.ph pihao,CONVERT(varchar(20),a.rq_sc, 23) baozhiqi,CONVERT(varchar(20), yxqz, 23) sxrq,a.sl as shl,a.djbh_sj as xgdjbh,dj_sort_sj recnum,a.dwid as dwbh

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a

where a.ysdh like ‘JYD%‘  order by a.ysdh

delete jzorder_mx_ysd where djbh>‘JYDYMA00026766‘ and djbh like ‘JYD%‘

insert into jzorder_mx_ysd

select * from fr_tmp_jzorder_mx_ysd where djbh like ‘JYD%‘ order by djbh

--采购验收汇总

truncate table fr_tmp_jzorder_hz_ysd

insert into fr_tmp_jzorder_hz_ysd ( djbh,djbs,djlx,bendian,rq,dwbh,yanshr,username,kaiprq,ontime,kpman,zhy,kaipiaodjbh )

select  distinct a.ysdh as djbh,‘JYD‘ as djbs,‘130‘ as djlx,‘YMA‘ as bendian,CONVERT(varchar(20), a.ysrq, 23) as rq,a.dwid as dwbh,a.ry_zjy as yanshr,a.ry_zjy as username,CONVERT(varchar(20), a.ysrq, 23) as kaiprq,CONVERT(varchar(20), a.ysrq, 24) as ontime,a.ry_zjy as kpman,‘进货入库GSP验收‘ as zhy,a.djbh_rk as kaipiaodjbh

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a

where a.ysdh like ‘JYD%‘  order by a.ysdh

delete jzorder_hz_ysd where djbh>‘JYDYMA00026766‘ and djbh like ‘JYD%‘

insert into jzorder_hz_ysd

select * from fr_tmp_jzorder_hz_ysd where djbh like ‘JYD%‘ order by djbh

--销退验收明细

select top 10 * from jzorder_mx_fhd where  djbh like ‘FHB%‘ order by djbh desc

truncate table fr_tmp_jzorder_mx_fhd

insert into fr_tmp_jzorder_mx_fhd (djbh,dj_sn,dj_sort,spid,pihao,baozhiqi,sxrq,hw,shl,xgdjbh,duiydjbh,duiydj_cn,thyy)

select a.ysdh as djbh,a.dj_sort as dj_sn,a.dj_sort,a.spid,a.ph as pihao,CONVERT(varchar(20),a.rq_sc, 23) baozhiqi,CONVERT(varchar(20), yxqz, 23) sxrq,b.hw,a.sl as shl,a.shdh as xgdjbh,a.djbh_sj as duiydjbh,a.dj_sort_sj as duiydj_cn,b.thyy

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a,pf_djmx b

where a.ysdh like ‘FHB%‘ and a.djbh_sj=b.djbh and a.dj_sort_sj=b.dj_sn and a.spid=b.spid order by a.ysdh

delete jzorder_mx_fhd where djbh>‘FHBYMA00019481‘ and djbh like ‘FHB%‘

--需要更新xh

insert into jzorder_mx_fhd (djbh,dj_sn,dj_sort,spid,pihao,baozhiqi,sxrq,hw,shl,xgdjbh,duiydjbh,duiydj_cn,thyy)

select a.ysdh as djbh,a.dj_sort as dj_sn,a.dj_sort,a.spid,a.ph as pihao,CONVERT(varchar(20),a.rq_sc, 23) baozhiqi,CONVERT(varchar(20), yxqz, 23) sxrq,b.hw,a.sl as shl,a.shdh as xgdjbh,a.djbh_sj as duiydjbh,a.dj_sort_sj as duiydj_cn,b.thyy

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a,pf_djmx b

where a.ysdh like ‘FHB%‘ and a.djbh_sj=b.djbh and a.dj_sort_sj=b.dj_sn and a.spid=b.spid order by a.ysdh

--select * from fr_tmp_jzorder_mx_fhd 

--销退验收汇总

truncate table fr_tmp_jzorder_hz_fhd

insert into fr_tmp_jzorder_hz_fhd (djbh,djbs,djlx,bendian,rq,dwbh,yanshr,username,kaiprq,ontime,kpman,kaipiaodjbh)

select distinct a.ysdh as djbh,‘FHB‘ as djbs,‘233‘ as djlx,‘YMA‘ as bendian,CONVERT(varchar(20),a.ysrq, 23) rq,a.dwid as dwbh,a.ry_zjy as yanshr,a.ry_zjy as username,CONVERT(varchar(20),a.ysrq, 23) kaiprq,CONVERT(varchar(20),a.ysrq, 24) ontime,a.ry_zjy as kpman,a.djbh_sj as duiydjbh

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a

where a.ysdh like ‘FHB%‘ order by a.ysdh

delete jzorder_hz_fhd where djbh>‘FHBYMA00019481‘ and djbh like ‘FHB%‘

insert into jzorder_hz_fhd

select * from fr_tmp_jzorder_hz_fhd

--销退收货明细

truncate table fr_tmp_pf_djmx

insert into fr_tmp_pf_djmx (djbh,dj_sn,spid,dj_sort,xgdjbh,recnum,duiydjbh,duiydj_cn,pihao,baozhiqi,hw,shl,hshj,hsje,sxrq,thyy,dwbh)

select  a.shdh as djbh,a.dj_sort as dj_sn,a.spid,a.dj_sort,a.djbh_sj as xgdjbh,a.dj_sort_sj as recnum,a.djbh_rk as duiydjbh,a.dj_sort as duiydj_cn,a.ph as pihao,CONVERT(varchar(20),a.rq_sc, 23) baozhiqi,b.hw,a.sl as shl,b.hshj,b.hsje,CONVERT(varchar(20), yxqz, 23) sxrq,b.thyy,a.dwid as dwbh

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a,pf_djmx b

where a.shdh like ‘XSS%‘ and a.djbh_sj=b.djbh and a.dj_sort_sj=b.dj_sn and a.spid=b.spid order by a.shdh

delete pf_djmx where djbh>‘XSSYMA00019474‘ and djbh like ‘XSS%‘

insert into pf_djmx

select * from fr_tmp_pf_djmx

--销退收货汇总

truncate table fr_tmp_pf_djhz

insert into fr_tmp_pf_djhz (djbh,djbs,djlx,bendian,rq,dwbh,kaiprq,ontime,yuansph,username,zhy)

select distinct a.shdh as djbh,‘XSS‘ as djbs,‘232‘ as djlx,‘YMA‘ as bendian,CONVERT(varchar(20),a.savedate, 23) rq,a.dwid as dwbh,CONVERT(varchar(20),a.savedate, 23) kaiprq,CONVERT(varchar(20),a.savedate, 24) ontime,a.djbh_sj as yuansph,a.ry_shy as username,‘销售退回收货单‘ as zhy

from openquery ( ORACLE  , ‘SELECT * FROM v_rk_lcys‘) a

where a.shdh like ‘XSS%‘  order by a.shdh

delete pf_djhz where djbh>‘XSSYMA00019474‘ and djbh like ‘XSS%‘

insert into pf_djhz

select * from fr_tmp_pf_djhz

--还原屏蔽商品

update spkfk set spid=replace(spid,‘SPH‘,‘SPA‘) where spbh in (‘J000531‘,‘J000532‘,‘J000533‘,‘J000626‘,‘J000535‘,‘J000673‘)

时间: 2024-10-27 06:55:06

GSP记录补充的相关文章

Java学习记录(补充八:Date类;Java流(Stream),文件(File)和IO)

Date类,Calendar类package Box1; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Random; //Date类 public class DateTest { public static void main(String[] args) { Date

Java学习记录(补充一(以习题为主:判断,循环语句))

习题1:取一个四位数,求各个位数数字的和package Day2; import java.util.Scanner; public class Demo01 { public static void main(String[] args){ Scanner in = new Scanner(System.in); System.out.println("请输入你的卡号"); int cardNum = in.nextInt(); // 1234 int i1 = cardNum %

Java学习记录(补充二:面对对象基础复习,习题)

求3(可调整)个学员成绩的和或平均分或两者都具package day5; import java.util.Scanner; public class Score { //构造函数 public Score(){ System.out.println("实例化对象调用了我"); } int sum; double avg; // 定义求和的方法 public int sum() { Scanner scanner = new Scanner(System.in); for (int i

Java学习记录(补充三:面向对象的封装和继承)

面向对象的封装package day7; //面向对象的封装 public class Employee { String name = "zhangsan"; private int age; //多个方法重载 public Employee(){ } public Employee(String name,int age){ } public Employee(int age,String name){ } //可以在方法里修改不能访问的属性 public int getAge()

Java学习记录(补充七:一些工具类)

Math类package Box; import java.util.ArrayList; import java.util.Collections; import java.util.List; public class TestBox { public static void main(String[] args) { //八个包装类 /*Integer i=5;//在栈里面开辟了一个内存空间(基本数据类型) Integer n = new Integer(5);//用new在堆里面开辟了一

ubuntu14.04中安装QuartusII9.1步骤

家里的计算机安装了WIN10,出于够用且安装文件小,想安装QuartusII9.1,按M$风格,驱动绝对是安不上的.正好是双系统ubuntu14.04 64位.安装过程不太顺利,记录下来,当作已经不灵光的大脑的备份. 按正常步骤安装好,并打好补丁SP1和SP2,基本顺利,这里注意的是,有的安装脚本中声明的SHELL是CSHELL,运行时有命令找不到,将声明中的CSH改为TCSH再安装即可. 接下来就是老大难的JTAG的USB BLASTER不能识别的问题. 由于ubuntu并不在官方支持的系统中

OpenCV在Linux(Fedora)下搭建开发环境简述

盼望了好久的Fedora21终于发行了.先来晒一张图: 默认桌面还是那么简洁: 好了,废话少说.来看看在Fedora下搭建opencv开发环境,因为我已经搭建好了(过程比较艰辛) 先注明参考文章,感谢这位博主: http://www.cnblogs.com/gala/archive/2011/10/10/2206529.html 下面是我写的了. 总叙:因为主要是参考的官方文档搭建的,所以呢如果没有什么问题我就直接带过. 1.各种依赖关系: GCC 4.4.x or later.(按照安装gcc

关于网络编程中MTU TCP UDP优化设置总结

首先要看TCP/IP协议,涉及到四层:链路层,网络层,传输层,应用层.  其中以太网(Ethernet)的数据帧在链路层 IP包在网络层 TCP或UDP包在传输层 TCP或UDP中的数据(Data)在应用层 它们的关系是 数据帧{IP包{TCP或UDP包{Data}}} --------------------------------------------------------------------------------- 在应用程序中我们用到的Data的长度最大是多少,直接取决于底层的

TCP/IP具体解释--TCP/UDP优化设置总结&amp;amp; MTU的相关介绍

首先要看TCP/IP协议,涉及到四层:链路层,网络层.传输层,应用层. 当中以太网(Ethernet)的数据帧在链路层 IP包在网络层 TCP或UDP包在传输层 TCP或UDP中的数据(Data)在应用层 它们的关系是 数据帧{IP包{TCP或UDP包{Data}}} --------------------------------------------------------------------------------- 在应用程序中我们用到的Data的长度最大是多少,直接取决于底层的限