diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index 1f68ea67..f9872d04 100644 Binary files a/Libs/CMS_CORE_Library.dll and b/Libs/CMS_CORE_Library.dll differ diff --git a/Step.Config/Config/serverConfig.xml b/Step.Config/Config/serverConfig.xml index d1d81b8a..952abcf0 100644 --- a/Step.Config/Config/serverConfig.xml +++ b/Step.Config/Config/serverConfig.xml @@ -8,6 +8,7 @@ Ares 37 OF C:\PartPrg\ //PARTPRG:/ + 01/01/2019 9000 diff --git a/Step.Config/Config/serverConfigValidator.xsd b/Step.Config/Config/serverConfigValidator.xsd index a3dd243b..11372657 100644 --- a/Step.Config/Config/serverConfigValidator.xsd +++ b/Step.Config/Config/serverConfigValidator.xsd @@ -13,6 +13,7 @@ + diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index d34c1b43..d603c0c8 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -230,6 +230,7 @@ namespace Step.Config NcName = x.Element("machineModel").Value, SharedPath = x.Element("sharedPath").Value, SharedName = x.Element("sharedName").Value, + InstallationDate = x.Element("installationDate").Value }).FirstOrDefault(); // Read server config with LINQ and save into static config diff --git a/Step.Model/ConfigModels/NcConfigModel.cs b/Step.Model/ConfigModels/NcConfigModel.cs index cbbc5fe1..9b1692ad 100644 --- a/Step.Model/ConfigModels/NcConfigModel.cs +++ b/Step.Model/ConfigModels/NcConfigModel.cs @@ -16,5 +16,6 @@ namespace Step.Model.ConfigModels public string NcName { get; set; } public string SharedPath { get; set; } public string SharedName { get; set; } + public string InstallationDate { get; set; } } } diff --git a/Step.NC/NcHandler.cs b/Step.NC/NcHandler.cs index 06718906..01fc9cbd 100644 --- a/Step.NC/NcHandler.cs +++ b/Step.NC/NcHandler.cs @@ -722,7 +722,7 @@ namespace Step.NC // Max process number genericData.ProcessNumber = procNum; // Get Installation Date - genericData.InstallationDate = DateTime.Now; + genericData.InstallationDate = DateTime.Parse(NcConfig.InstallationDate); // Get PLC version genericData.PlcVersion = "1.0.0"; // Get PLC version diff --git a/Step/Controllers/WebApi/ReportController.cs b/Step/Controllers/WebApi/ReportController.cs index 3834438e..d7991172 100644 --- a/Step/Controllers/WebApi/ReportController.cs +++ b/Step/Controllers/WebApi/ReportController.cs @@ -42,6 +42,16 @@ namespace Step.Controllers.WebApi return Ok(schema); } + [Route("programs"), HttpPost] + public IHttpActionResult GetProgramHistoryData(DTONameFilter filter) + { + StreamReader sr = new StreamReader("./Report/Programs.xml"); + XmlSerializer xmlSerializer = new XmlSerializer(typeof(DTOHistogramModel)); + DTOHistogramModel schema = xmlSerializer.Deserialize(sr) as DTOHistogramModel; + + return Ok(schema); + } + public class DTODateFilter { public DateTime StartDate { get; set; } @@ -135,11 +145,12 @@ namespace Step.Controllers.WebApi // Histogram + [XmlRoot("root")] public class DTOHistogramModel { [XmlArray("programs")] - [XmlArrayItem("program", typeof(DTOTimelineDateElement))] + [XmlArrayItem("program", typeof(DTOHistogramItemModel))] public List Occurrences { get; set; } } @@ -152,10 +163,10 @@ namespace Step.Controllers.WebApi public int Quantity { get; set; } [XmlElement("startDate")] - public DateTime StartDate { get; set; } + public string StartDate { get; set; } [XmlElement("endDate")] - public DateTime EndDate { get; set; } + public string EndDate { get; set; } [XmlElement("actualT")] public string ActualT { get; set; } diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts index 698678d7..f7daf946 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.ts @@ -96,7 +96,8 @@ export default class toolingEquipment extends Vue { public selectedTool: any = null; public copySelectedTool: any = null; - public selectedEquipment: any = null; + public selectedEquipment: any = null; // Equipment = offset + public copySelectedEquipment: any = null; // Equipment = offset public get categories(): string[] { let cat: Set = new Set(); @@ -385,6 +386,7 @@ export default class toolingEquipment extends Vue { this.toolsConfiguration = (this.$store.state as AppModel).tooling.toolsConfiguration; this.edgeConfiguration = (this.$store.state as AppModel).tooling.edgesConfiguration; this.selectedEquipment = elem; + this.copySelectedEquipment = Object.assign({}, elem) this.enableEquipment = true; this.enableParameters = false; this.enableModify = false; @@ -413,13 +415,13 @@ export default class toolingEquipment extends Vue { else { if(this.isSiemens){ if (this.copySelectedTool) { - this.selectedTool = this.copySelectedTool; + this.selectedTool = Object.assign({},this.copySelectedTool); toolingActions.updateTool(store, this.copySelectedTool); } } else{ if (this.copySelectedTool) { - this.selectedTool = this.copySelectedTool; + this.selectedTool = Object.assign({},this.copySelectedTool); toolingActions.updateNcTool(store, this.copySelectedTool); } } @@ -438,23 +440,28 @@ export default class toolingEquipment extends Vue { this.disableList = false; this.$forceUpdate(); - } +public isEquipmentSelected(offset){ + if(!this.selectedEquipment || !offset) + return false + + if(offset.id = this.selectedEquipment.id) + return true + + return false +} + public cancelNc = function () { if(this.copySelectedTool && this.selectedTool.id > 0){ - this.selectedTool = this.copySelectedTool; - toolingActions.updateNcTool(store, this.copySelectedTool); + this.selectedTool = Object.assign({},this.copySelectedTool); + toolingActions.updateNcTool(store, this.selectedTool); } - // if (this.copySelectedTool) { - // this.selectedTool = this.copySelectedTool; - // toolingActions.updateNcTool(store, this.selectedTool); - // } + if (this.selectedTool.id == null || this.selectedTool.id == 0) { this.selectedTool = null; } else { - for (let l in this.selectedTool.offsetData) { if (this.selectedTool.offsetData[l] && this.selectedTool.offsetData[l].id <= 0) { this.selectedTool.offsetData.splice(l, 1); @@ -465,12 +472,15 @@ export default class toolingEquipment extends Vue { } } + for (const key in this.selectedEquipment) { + this.selectedEquipment[key] = this.copySelectedEquipment[key] + } + this.enableAddOffsetToTool = false; this.enableModify = false; this.disableList = false; this.$forceUpdate(); - } // Controllo se l'utensile รจ un utensile montato nel mandrino diff --git a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue index 8b0b8540..4202412f 100644 --- a/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue +++ b/Step/wwwroot/src/app_modules/tooling/components/tooling-equipment.vue @@ -159,7 +159,7 @@
{{'tooling_edgesdata_label_edit' | localize("Modifica Tagliente n. %d",selectedEquipment.id)}}
-
+
{{'tooling_equipment_list_category_' + ce | localize(ce)}}
+ :readonly="readOnly" @blur="outFocus">