result:= nil;
index:= -1;
index:= self.fJXTBIndexList.IndexOf(JXBianHao);
if Index>=0 then
begin
JXTBIndexPointer:= pJXTBIndex(self.fJXTBIndexList.Objects[index]);
//读取机械台班的含量流
//打开机械台班含量流
MyOleStream:= self.OpenStream(c_JXTBContent);
MyOleStream.Position := JXTBIndexPointer.Offset;
Setlength(Buffer,JXTBIndexPointer.BlockSize);
MyOlestream.ReadBuffer(Buffer[0],JXTBIndexPointer.BlockSize);
MyOleStream.Free;
MyOlestream:= nil;
MyMemStream:= TMemoryStream.Create;
MyMemStream.WriteBuffer(Buffer[0],JXTBIndexPointer.BlockSize);
//从MyMemStream中读取数据
MyMemStream.Position := 0;
MyMemStream.ReadBuffer(rJXTBContent,sizeOf(JXTBContent));
result:= TSimplexMachine.Create(nil);
result.BianHao := JXTBIndexPointer.JXBianHao;
result.MingCheng := JXTBIndexPointer.JXMingCheng;
result.DEDanJia := rJXTBContent.DEDanJia;
result.DQDanJia := self.fJXTBGLJAreaPrice[index];
//读取机械台班的构成含量
rGeshu.Count := 0;
MyMemStream.ReadBuffer(rGeShu,SizeOf(GeShu));
index:= -1;
for index:= 0 to rGeShu.Count-1do
begin
//读取含量
MyMemStream.ReadBuffer(rGLJContent,SizeOf(GLJContent));
aSimplexPrice:= TSimplexPrice.Create(result);
aSimplexPrice.BianHao:= rGLJContent.BianHao;
if rGlJContent.LeiBei = 'R' then
aSimplexPrice.ObjCostType := ctRenGong
else
if rGlJContent.LeiBei = 'C' then
aSimplexPrice.ObjCostType := ctCaiLiao
else
if rGlJContent.LeiBei = 'J' then
aSimplexPrice.ObjCostType := ctJiXie
else
aSimplexPrice.ObjCostType := ctOther;
aSimplexPrice.MingCheng := rGLJContent.MingCheng;
aSimplexPrice.DanWei := rGLJContent.DanWei;
aSimplexPrice.DEDanJia := rGLJContent.DEDanJia;
end;