/// <summary> /// 发送制样计划 /// </summary> /// <param name="rCSamplingId">采样单Id</param> /// <param name="infactoryBatchId">批次Id</param> /// <returns></returns> private bool SendMakePlan(string rCSamplingCode, string infactoryBatchId) { CmcsRCMake rcMake = AutoMakerDAO.GetInstance().GetRCMakeBySampleCode(rCSamplingCode); if (rcMake != null) { string fuelKindName = string.Empty; CmcsInFactoryBatch inFactoryBatch = commonDAO.GetBatchByRCSamplingCode(rCSamplingCode); 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.CurrentMaker), MachineCode = this.CurrentMaker, InFactoryBatchId = 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); }