Exemple #1
0
 public ApplicationServerProcesses(ProcessCommands processCommands, ProcessQueries processQueries,
                                   IFullSerializer fullSerializer,
                                   ProcessExternalDataCommands processExternalDataCommands,
                                   ProcessActivityQueries processActivityQueries,
                                   ProcessStepQueries processStepQueries
                                   )
 {
     _processCommands             = processCommands;
     _processQueries              = processQueries;
     _fullSerializer              = fullSerializer;
     _processExternalDataCommands = processExternalDataCommands;
     _processActivityQueries      = processActivityQueries;
     _processStepQueries          = processStepQueries;
 }
Exemple #2
0
        private void UpdateFromCommands()
        {
            ToolpathObjectIds = ProcessCommands.Select((command, index) => new { command, index })
                                .Where(p => p.command.ToolpathObjectId.HasValue)
                                .GroupBy(p => p.command.ToolpathObjectId.Value)
                                .ToDictionary(p => p.Key, p => p.Min(k => k.index));
            ToolpathObjectsGroup = ProcessCommands.Select(p => p.ToolpathObjectId).CreateGroup();
            Caption = GetCaption(Caption, ProcessCommands.Sum(p => p.Duration));
            foreach (var group in ProcessCommands.GroupBy(p => p.Owner))
            {
                if (group.Key is TechOperation techOperation)
                {
                    techOperation.ToolpathObjectsGroup = group.Select(p => p.ToolpathObjectId).CreateGroup();
                    techOperation.Caption = GetCaption(techOperation.Caption, group.Sum(p => p.Duration));
                }
            }

            string GetCaption(string caption, double duration)
            {
                var ind = caption.IndexOf('(');

                return($"{(ind > 0 ? caption.Substring(0, ind).Trim() : caption)} ({new TimeSpan(0, 0, 0, (int)duration)})");
            }
        }
Exemple #3
0
        public void FormattedProcessProgramRequestEvent(FormattedProcessProgramRequest formattedProcessProgramRequest, bool needReply = true)
        {
            AddLog(formattedProcessProgramRequest.ToString());
            if (!needReply)
            {
                return;
            }
            FormattedProcessProgramReport report = new FormattedProcessProgramReport();

            report.PPID               = formattedProcessProgramRequest.PPID;
            report.PPTYPE             = formattedProcessProgramRequest.PPTYPE;
            report.EquipmentBaseInfo  = _equipmentInfo.EquipmentBase;
            report.LCTIME             = DateTime.Now.ToString("yyyyMMddHHmmss");
            report.ProcessCommandList = new ProcessCommands();

            #region process Command List1
            ProcessCommands processCommands = new ProcessCommands();
            processCommands.CCODE         = "1";
            processCommands.RCPSTEP       = "VacTR.PR2";
            processCommands.UNITID        = "Unit1";
            processCommands.SUNITID       = "SUnit1";
            processCommands.ParameterList = new Parameters();
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param1",
                PPARMVALUE = "value1",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param2",
                PPARMVALUE = "value2",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param3",
                PPARMVALUE = "value3",
            });
            report.ProcessCommandList.Add(processCommands);

            processCommands               = new ProcessCommands();
            processCommands.CCODE         = "2";
            processCommands.RCPSTEP       = "VacTR.PR2";
            processCommands.UNITID        = "Unit1";
            processCommands.SUNITID       = "SUnit1";
            processCommands.ParameterList = new Parameters();
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param1",
                PPARMVALUE = "value1",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param2",
                PPARMVALUE = "value2",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param3",
                PPARMVALUE = "value3",
            });
            report.ProcessCommandList.Add(processCommands);
            #endregion

            cimClient?.LaunchFormattedProcessProgramReport(report);
        }
Exemple #4
0
        private void btn_rc_rcr_Click(object sender, EventArgs e)
        {
            RecipeChangeReport recipeChangeReport = new RecipeChangeReport();

            recipeChangeReport.EquipmentStatus = _equipmentInfo.EquipmentStatus;
            recipeChangeReport.PPID            = "Test Recipe";
            recipeChangeReport.PPTYPE          = PPTYPE.U;
            recipeChangeReport.PPCINFO         = PPCINFO.Created;
            recipeChangeReport.LCTIME          = DateTime.Now.ToString("yyyyMMddHHmmss");

            recipeChangeReport.ProcessCommandList = new ProcessCommands();

            #region process Command List1
            ProcessCommands processCommands = new ProcessCommands();
            processCommands.CCODE         = "1";
            processCommands.RCPSTEP       = "VacTR.PR2";
            processCommands.UNITID        = "Unit1";
            processCommands.SUNITID       = "SUnit1";
            processCommands.ParameterList = new Parameters();
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param1",
                PPARMVALUE = "value1",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param2",
                PPARMVALUE = "value2",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param3",
                PPARMVALUE = "value3",
            });
            recipeChangeReport.ProcessCommandList.Add(processCommands);

            processCommands               = new ProcessCommands();
            processCommands.CCODE         = "2";
            processCommands.RCPSTEP       = "VacTR.PR2";
            processCommands.UNITID        = "Unit1";
            processCommands.SUNITID       = "SUnit1";
            processCommands.ParameterList = new Parameters();
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param1",
                PPARMVALUE = "value1",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param2",
                PPARMVALUE = "value2",
            });
            processCommands.ParameterList.Add(new Parameters()
            {
                PPARMNAME  = "param3",
                PPARMVALUE = "value3",
            });
            recipeChangeReport.ProcessCommandList.Add(processCommands);
            #endregion

            cimClient?.LaunchRecipeChangeProcess(recipeChangeReport);
        }