| | |
| | | String partno, |
| | | String inventory, |
| | | String fac, |
| | | Number quantitiy |
| | | Number quantitiy, |
| | | String dtype |
| | | ) as InventoryInterfaceDataDetail |
| | | { |
| | | TextBody: |
| | |
| | | if( not isnull( product ) and exists( product.GetAllParent(), Elements, proparent, proparent.ID() = 'PL' ) ){ |
| | | quantitiy := floor( [Real]quantitiy / 4 ); |
| | | } |
| | | iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac ); |
| | | iidl := selectobject( iid, InventoryInterfaceDataDetail, detail, detail.InventoryPoint() = inventory and detail.Fac() = fac and detail.Dtype() = dtype ); |
| | | if( isnull( iidl ) ){ |
| | | iidl := iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy ); |
| | | iidl := iid.InventoryInterfaceDataDetail( relnew, Date := date, PartNumber := partno, InventoryPoint := inventory, Fac := fac, Quantity := quantitiy, Dtype := dtype ); |
| | | }else{ |
| | | iidl.Quantity( quantitiy ); |
| | | } |
| | |
| | | [* |
| | | // 甄兰鸽 Jul-26-2024 (created) |
| | | traverse( scenariomanager, ScenarioMP, smp ){ |
| | | MDSMacroPlan::Root( smp.DatasetMDSID() ) -> InventoryInterfaceData::Generate( interfaceDataset, date, partno, inventory, fac, quantitiy ); |
| | | MDSMacroPlan::Root( smp.DatasetMDSID() ) -> InventoryInterfaceData::Generate( interfaceDataset, date, partno, inventory, fac, quantitiy, '' ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | // 获取指定日期库存接口数据 |
| | | //发动机成品库存 |
| | | traverse( inventorys, Elements, inventory ){ |
| | | iidl := InventoryInterfaceData::Generate( macroplan, owner, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() ); |
| | | iidl.Dtype( inventory.DType() ); |
| | | InventoryInterfaceData::Generate( macroplan, owner, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total(), inventory.DType() ); |
| | | // iidl.Dtype( inventory.DType() ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | if( inventory.Fac() = 'DL' and inventory.Lgort() = 'All' ){ |
| | | inventoryname := inventory.LineType(); |
| | | } |
| | | InventoryInterfaceData::Generate( macroPlan, interfaceDataset, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total() ); |
| | | InventoryInterfaceData::Generate( macroPlan, interfaceDataset, inventory.DDay(), inventory.MaterialNo(), inventoryname, inventory.Fac(), [Number]inventory.Total(), '' ); |
| | | } |
| | | //发动机成品库存 |
| | | traverse( loginfo, FinishedEngineInventory, inventory ){ |
| | | InventoryInterfaceData::Generate( macroPlan, interfaceDataset, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total() ); |
| | | InventoryInterfaceData::Generate( macroPlan, interfaceDataset, inventory.DDay(), inventory.FourCode(), inventory.BIPlace(), inventory.Fac(), [Number]inventory.Total(), inventory.DType() ); |
| | | } |
| | | } |
| | | *] |