/// <summary> /// 发送制样计划 /// </summary> /// <param name="rCSamplingId">采样单Id</param> /// <param name="infactoryBatchId">批次Id</param> /// <returns></returns> private bool SendMakePlan(string rCSamplingId) { CmcsRCSampling rCSampling = commonDAO.SelfDber.Get <CmcsRCSampling>(rCSamplingId); CmcsRCMake rcMake = AutoMakerDAO.GetInstance().GetRCMakeBySampleId(rCSamplingId); if (rcMake != null) { string fuelKindName = string.Empty; CmcsInFactoryBatch inFactoryBatch = commonDAO.GetBatchByRCSamplingId(rCSamplingId); if (inFactoryBatch != null) { CmcsFuelKind fuelKind = commonDAO.SelfDber.Get <CmcsFuelKind>(inFactoryBatch.FuelKindId); if (fuelKind != null) { fuelKindName = fuelKind.FuelName; } } // 需调整:发送的制样计划中煤种、颗粒度、水分等相关信息视接口而定 InfMakerPlan makerPlan = new InfMakerPlan() { InterfaceType = commonDAO.GetMachineInterfaceTypeByCode(this.CurrentmakerMachineCode), MachineCode = this.CurrentmakerMachineCode, InFactoryBatchId = rCSampling != null ? rCSampling.InFactoryBatchId : "", MakeCode = rcMake.MakeCode, FuelKindName = fuelKindName, //Mt = "湿煤", MakeType = "在线制样", //CoalSize = "小粒度", SyncFlag = 0 }; AutoMakerDAO.GetInstance().SaveMakerPlanAndStartCmd(makerPlan, out currentMessage); rTxtOutputer.Output(currentMessage, eOutputType.Normal); return(true); } else { rTxtOutputer.Output("制样计划发送失败:未找到制样主记录信息", eOutputType.Error); } return(false); }