TP302.1101832001312011DCOMERPTheGeneralDesignofTheEnterpriseResourcePlanningSystemBaseOnDCOM20021120044---------------DCOMERPITDCOMERPBOMDCOMERPDCOMERPERPERPBOMERPDCOMBOMDelphiCOM---------------DCOMERPDCOM2.12.2DNA2.3DCOMDelphiDCOMDCOMERP3.13.23.33.44.14.2BOM4.34.4---------------DCOMERP21WTOERPEnterpriseResourcePlanningBPRSCMERPERPERP---------------DCOMERPERPERPERPDCOMERPCOMSQLSERVER2000---------------DCOMERPDCOMERPERPDCOMERPDCOMCOMDCOMDCOMERPBOM---------------DCOMERPDCOM21C/S(/)PCOraclesybaseDB2//C/S---------------DCOMERP.exe.dllWindowsC/SC/S---------------DCOMERPERP/MRPC/S---------------DCOMERPC/SDCOM:CORBACommonObjectRequestBrokerArchitectureSunEJB(EnterpriseJavaBeans)2.2DNAWindowsDNA(WindowsDistributedinternetApplicationArchitecture)WindowsClientServerWebBusinessLogicWindowsDNAIEWebServerNTIISSQLServerTransactionServerWindowsDNACOMDCOMWeb---------------DCOMERP2.3DCOMDelphiDCOM2.3.1DCOM(DistributedComponentObjectModel)MicrosoftCOMCOM(DCOM)COM,COMInternetDCOM2.3.2DCOMDCOMCOMCOM1COMCOM2COM/DCOM---------------DCOMERP2COMDCOM3DCOMCOMRPCDCOM3DCOM:COM2.3.3DelphiDCOM1.DCOMDELPHIDCOM---------------DCOMERPDELPHINEWApplicationOtherNewItemsMultitierRemoteDataModule---------------DCOMERPOKCoClassNameMyDComInstancingMultipleInstanceThreadingModelApartmentRDMOK---------------DCOMERP2.DCOM1)DCOMDELPHIDCOMDELPHITDCOMConnectionTDataModuleDataSnapDCOMTDataModuleDCOMDCOMConnectionComputerNameServerNameDCOMDCOMTDataModuleOnCreateDataModuleCreateDCOMConnection3DCOMOnCreateprocedureTDataModule1.DataModuleCreate(Sender:TObject);VarPOSIni:TIniFile;begintryApplication.Initialize;showmessage(ExtractFilePath(Application.ExeName));POSIni:=TIniFile.Create(ExtractFilePath(Application.ExeName)+'ConfigurePos.ini');DCOMConnection1.ComputerName:=PosIni.ReadString('ServerMessage','ComputerName','');DCOMConnection1.ServerName:=---------------DCOMERPPosIni.ReadString('ServerMessage','ServerProgramName','');exceptMessageDlg('ConfigurePos.ini',mtInformation,[mbok],0);Application.Terminate;exit;end;end;2)WindowsAPI(VisualCDelphiVisualBasic)WindowsAPICoCreateInstanceCOMDCOM(MSSQLServer)COMDCOMWindowsAPIIClassFactoryDCOMDCOMIClassFactoryDCOMIClassFactoryCoGetClassObjectAPIMicrosoftAPISTDAPICoGetClassObject(REFCLSIDrclsid,DWORDdwClsContext,COSERVERINFOpServerInfo,REFIIDriid,LPVOIDppv)---------------DCOMERPtypedefenumtagCLSCTX{CLSCTX_INPROC_SERVER_=1,InProcServerCOMCLSCTX_INPROC_HANDLER=2,OutProcServerCOMCLSCTX_LOCAL__SERVER=4,CLSCTX_REMOTE_SERVER=16DCOMOutProcServerCOM}CLSCTXCLSCTXCoGetClassObjectCLSCTX_REMOTE_SERVERCOMCOMCoGetClassObjectCoGetClassObjectOLE1.XMicrosoftNULLOLE2XDCOMtypedefstruct_COSERVERINFO{DWORDdwReserved1;LPWSTRpwszName;COAUTHINFOpAuthInfo;DWORDdwReserved2;COSERVERINFO}CoGetClassObjectCOM---------------DCOMERPLJSERVERCOMVarClassFactory:IclassFactory;WideCharBuffer:array[..256]ofWideChar;Info:TcoServerInfo;SwMachineName:WideString;BeginClassFactory:=nil;StringToWideChar(LJSERVER,PwideChar(swMachineName),256);Info.PwszName:=PwideChat(sqMachineName);OleCheck(CoGetClassObject(ClassIDCLSCTX_REMOTE_SERVER,@Info,IID_IclassFactory,ClassFactory);IfclassFactory=nilthenShowMessage(!IclassFactory)ElseClassFactory.CreateInstance(nil,IID_Iunknown,Unknown);TryResult:=Unknow;FinallyClassFactory.Release;Unknown.Release;End;CLSCTX_REMOTE_SERVERTcoServerInfoLJSERVERCOM---------------DCOMERPIclassFactoryTcoServerInfoWideChar,NTLJSERVERClassFactoryCOMClassFactoryCOMIunknownIunknownCOMIunknownResultResult:=VarFromInterface(Unknown)2.3.4DCOMWindowsDCOMDCOMDCOMCNFG.EXE(Windows95/98SystemWindowsNTSystem32)DCOMDCOMCNFGAutomationServer(Domain)---------------DCOMERPDCOMERP31ERPDCOMERP123DCOM4XML567---------------DCOMERPDCOMCOMSQLServer2000XMLDCOM321.2.---------------DCOMERP3DCOM---------------DCOMERP4SQLServer2000ADO3.3DCOMERP1BOMBOMBOM2ERPERPERP---------------DCOMERPERP3---------------DCOMERP4---------------DCOMERP5---------------DCOMERP---------------DCOMERP678---------------DCOMERP9EXECLODBCTXT10---------------DCOMERP3.4---------------DCOMERPSQLServer2000SQLServer2000:---------------DCOMERP41ERP42BOMBOM---BillOfMaterials4-1B1ABAB1C3D2E3F2G1E1H2I1F1---------------DCOMERPBOMERPBOMBOMBOMMaterialRequirementPlanning,MRPBOMBOMBOMBOMBOMBOMBOMBOM-12BOMBOM-BOM12SQLBOMSQLBOMBOMBOMBOMBOMBOM---------------DCOMERP1BOMBOM2SQLSERVER2000BOMBOM4-1A4-14-1L_PIDIDL_ParentIDL_ChildIDL_NumL_LevelL_IsLastLevel(10)4-1ABOMIDL_PIDIDL_ParentIDIDL_ChildIDIDL_NumL_LevelL_IsLastLevel1AAB1102AAC3103AAD2104ABE3215ABF2216ACG1217ADH2218ADF1219ADI121---------------DCOMERPBOMBOMBOMBOM1BOMBOMBOM2BOMBOMBOM3BOML_IsLastLevelSQLASQL.SelectL_Childfrom4-1whereL_IsLastLevel=1andL_PdctID=‘A’ASQL.SelectL_Child,l_Numfrom4-1whereL_PID=‘A’andL_level=1BOMBOMBOMBOMBOM4.3---------------DCOMERPA2007140201060451531(7)23451560-45BalanceAmount=AVGAmountBalanceAmount---------------DCOMERPAVGAmountNSumAmount=N441=/22345---------------DCOMERP67=-*EOQ2000101---------------DCOMERP1DQKKcTC=D/Q=Q/2=K*D/Q=Kc*Q/2TC=K*D/Q+Kc*Q/24242200kg200200kgQD/QQ/2Q/2*KcDK/Q400kg5200kg20050250200kg10100kg100100200100kg2050kg50200