private void FillReferDetail(ExtendedDataEntity[] entityDataes, DynamicObject billTypePara)
        {
            FormMetadata metadata    = (FormMetadata)Kingdee.K3.MFG.App.AppServiceContext.MetadataService.Load(base.Context, "QM_InspectBill", true);
            EntryEntity  entryEntity = metadata.BusinessInfo.GetEntryEntity("FReferDetail");
            List <long>  srcEntryIds = (from s in entityDataes
                                        from ss in s.DataEntity["FEntity_Link"] as DynamicObjectCollection
                                        select ss.GetDynamicObjectItemValue <long>("SId", 0L)).Distinct <long>().ToList <long>();
            string businessType         = billTypePara.GetDynamicObjectItemValue <string>("FInspectType", null);
            DynamicObjectCollection col = this.GetSrcInfo(base.Context, srcEntryIds, businessType);

            if (!col.IsEmpty <DynamicObject>())
            {
                foreach (ExtendedDataEntity entity2 in entityDataes)
                {
                    DynamicObject           dataEntity = entity2.DataEntity;
                    DynamicObjectCollection objects2   = entity2.DataEntity.GetDynamicObjectItemValue <DynamicObjectCollection>("ReferDetail", null);
                    objects2.Clear();
                    DynamicObjectCollection objects3 = entity2.DataEntity.GetDynamicObjectItemValue <DynamicObjectCollection>("FEntity_Link", null);
                    int num = 1;
                    foreach (DynamicObject obj2 in objects3)
                    {
                        InspectBillView.FEntity_Link link = obj2;
                        foreach (DynamicObject obj3 in (from w in col
                                                        where w.GetDynamicObjectItemValue <string>("FTEID", null) == link.SId
                                                        select w).ToList <DynamicObject>())
                        {
                            InspectBillView.ReferDetail detail = new Kingdee.K3.MFG.Common.BusinessEntity.QM.InspectBillView.ReferDetail(new DynamicObject(entryEntity.DynamicObjectType))
                            {
                                Seq           = num++,
                                SrcBillType   = obj3.GetDynamicObjectItemValue <string>("FSRCBILLTYPE", null),
                                SrcBillNo     = obj3.GetDynamicObjectItemValue <string>("FSRCBILLNO", null),
                                SrcInterId    = Convert.ToInt64(link.SBillId),
                                SrcEntryId    = Convert.ToInt64(link.SId),
                                SrcEntrySeq   = (long)obj3.GetDynamicObjectItemValue <int>("FSRCENTRYSEQ", 0),
                                OrderType_Id  = obj3.GetDynamicObjectItemValue <string>("FORDERBILLTYPE", null),
                                OrderBillNo   = obj3.GetDynamicObjectItemValue <string>("FORDERBILLNO", null),
                                OrderId       = obj3.GetDynamicObjectItemValue <long>("FORDERID", 0L),
                                OrderEntryId  = obj3.GetDynamicObjectItemValue <long>("FORDERENTRYID", 0L),
                                OrderEntrySeq = (long)obj3.GetDynamicObjectItemValue <int>("FORDERENTRYSEQ", 0)
                            };
                            objects2.Add((DynamicObject)detail);
                        }
                    }
                }
            }
        }