tangxu
2024-06-11 e08f18c84c96ca794407f4fcb737b26fa76c0a1f
DAL/IStation.DAL.Paras/历史调度方案/HistoryAnaPrjFileHelper.cs
@@ -21,7 +21,7 @@
            return SavePrjCore(settting, new IStation.CalcModel.AnaRequestBase(request), prj);
            return SavePrjCore(settting,  request , prj);
        }
        //淇濆瓨 
@@ -37,6 +37,7 @@
            return SavePrjCore(settting, requestBase, prj);
        }
        //
        private static bool SavePrjCore(CalcModel.AnaSetting settting, IStation.CalcModel.AnaRequestBase requestBase, IStation.CalcModel.AnaPrj prj)
        {
            var root_folder = System.IO.Path.Combine(IStation.DataFolderHelper.GetRootPath(), "History");
@@ -139,19 +140,24 @@
            nodeProject.AppendChild(nodeCalcSpaceMinute);
            if (prj.EndTimeOpenPumpStaus != null )
            {
                var node_LastTime_OpenPumpCount = xmlDoc.CreateElement("LastTime_OpenPumpCount");
                node_LastTime_OpenPumpCount.InnerText = prj.EndTimeOpenPumpStaus.Count.ToString();
                nodeProject.AppendChild(node_LastTime_OpenPumpCount);
                var node_LastTime_OpenPumpIndex = xmlDoc.CreateElement("LastTime_OpenPumpIndex");
                node_LastTime_OpenPumpIndex.InnerText = string.Join(",", prj.EndTimeOpenPumpStaus);
                nodeProject.AppendChild(node_LastTime_OpenPumpIndex);
                if(prj.EndTimeOpenPumpStaus.Count > 0)
                {
                    var node_LastTime_OpenPumpIndex = xmlDoc.CreateElement("LastTime_OpenPumpIndex");
                    node_LastTime_OpenPumpIndex.InnerText = string.Join(",", prj.EndTimeOpenPumpStaus);
                    nodeProject.AppendChild(node_LastTime_OpenPumpIndex);
                }
            }
            else
            {//琛ㄧず鍏ㄩ儴鍏虫満
@@ -366,21 +372,21 @@
                nodeSettting.AppendChild(node_SwitchPumpMinuteSpace);
                XmlNode node_OpenPumpIndexSequence = xmlDoc.CreateElement("OpenPumpIndexSequence");
                if (settting.OpenPumpIndexSequence != null)
                if (settting.OpenPumpIndexSequence != null && settting.OpenPumpIndexSequence.Count()>0)
                {
                    node_OpenPumpIndexSequence.InnerText = string.Join(",", settting.OpenPumpIndexSequence);
                    nodeSettting.AppendChild(node_OpenPumpIndexSequence);
                }
                XmlNode node_ClosePumpIndexSequence = xmlDoc.CreateElement("ClosePumpIndexSequence");
                if (settting.ClosePumpIndexSequence != null)
                if (settting.ClosePumpIndexSequence != null && settting.ClosePumpIndexSequence.Count() > 0)
                {
                    node_ClosePumpIndexSequence.InnerText = string.Join(",", settting.ClosePumpIndexSequence);
                    nodeSettting.AppendChild(node_ClosePumpIndexSequence);
                }
                XmlNode node_OptimalPumpIndexSequence = xmlDoc.CreateElement("OptimalPumpIndexSequence");
                if (settting.OptimalPumpIndexSequence != null)
                if (settting.OptimalPumpIndexSequence != null && settting.OptimalPumpIndexSequence.Count() > 0)
                {
                    node_OptimalPumpIndexSequence.InnerText = string.Join(",", settting.OptimalPumpIndexSequence);
                    nodeSettting.AppendChild(node_OptimalPumpIndexSequence);