|
|
|
@ -269,24 +269,24 @@ namespace PVDEMCS.Services.Repositories.Impl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取配置的设备的阈值
|
|
|
|
|
var balzersConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentType.Balzers).Content;
|
|
|
|
|
var cemeconConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentType.CemeCon).Content;
|
|
|
|
|
var ionbondConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentType.Ionbond).Content;
|
|
|
|
|
var balzers = 200;
|
|
|
|
|
var cemecon = 300;
|
|
|
|
|
var ionbond = 200;
|
|
|
|
|
if (balzersConfig != null && !balzersConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
var homegrownConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentType.Homegrown).Content;
|
|
|
|
|
var importConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentType.Import).Content;
|
|
|
|
|
//var ionbondConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentType.Ionbond).Content;
|
|
|
|
|
var homegrown = 200;
|
|
|
|
|
var import = 300;
|
|
|
|
|
//var ionbond = 200;
|
|
|
|
|
if (homegrownConfig != null && !homegrownConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
int.TryParse(balzersConfig.ConfigValue, out balzers);
|
|
|
|
|
int.TryParse(homegrownConfig.ConfigValue, out homegrown);
|
|
|
|
|
}
|
|
|
|
|
if (cemeconConfig != null && !cemeconConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
if (importConfig != null && !importConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
int.TryParse(cemeconConfig.ConfigValue, out cemecon);
|
|
|
|
|
}
|
|
|
|
|
if (ionbondConfig != null && !ionbondConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
int.TryParse(ionbondConfig.ConfigValue, out ionbond);
|
|
|
|
|
int.TryParse(importConfig.ConfigValue, out import);
|
|
|
|
|
}
|
|
|
|
|
//if (ionbondConfig != null && !ionbondConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
//{
|
|
|
|
|
// int.TryParse(ionbondConfig.ConfigValue, out ionbond);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dayTotals = context.EquipmentRecordDayTotals.Where(f => f.TotalDay >= begDate && f.TotalDay <= endDate).ToList();
|
|
|
|
@ -334,24 +334,24 @@ namespace PVDEMCS.Services.Repositories.Impl
|
|
|
|
|
var minutes = (furnace.EndTime - furnace.StartTime).TotalMinutes;
|
|
|
|
|
switch (furnace.EquipmentType)
|
|
|
|
|
{
|
|
|
|
|
case EquipmentType.Balzers:
|
|
|
|
|
if (minutes >= balzers)
|
|
|
|
|
{
|
|
|
|
|
value.FurnaceNum++;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case EquipmentType.Ionbond:
|
|
|
|
|
if (minutes >= ionbond)
|
|
|
|
|
case EquipmentType.Homegrown:
|
|
|
|
|
if (minutes >= homegrown)
|
|
|
|
|
{
|
|
|
|
|
value.FurnaceNum++;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case EquipmentType.CemeCon:
|
|
|
|
|
if (minutes >= cemecon)
|
|
|
|
|
case EquipmentType.Import:
|
|
|
|
|
if (minutes >= import)
|
|
|
|
|
{
|
|
|
|
|
value.FurnaceNum++;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
//case EquipmentType.CemeCon:
|
|
|
|
|
// if (minutes >= import)
|
|
|
|
|
// {
|
|
|
|
|
// value.FurnaceNum++;
|
|
|
|
|
// }
|
|
|
|
|
// break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -714,24 +714,24 @@ namespace PVDEMCS.Services.Repositories.Impl
|
|
|
|
|
|
|
|
|
|
//计算OEE
|
|
|
|
|
//获取配置的设备的初尝值
|
|
|
|
|
var balzersConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.BalzersOffset).Content;
|
|
|
|
|
var cemeconConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.CemeConOffset).Content;
|
|
|
|
|
var ionbondConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.IonbondOffset).Content;
|
|
|
|
|
var balzers = 0m;
|
|
|
|
|
var cemecon = 0m;
|
|
|
|
|
var ionbond = 0m;
|
|
|
|
|
if (balzersConfig != null && !balzersConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
var homegrownConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.HomegrownOffset).Content;
|
|
|
|
|
var importConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.ImportOffset).Content;
|
|
|
|
|
//var ionbondConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.IonbondOffset).Content;
|
|
|
|
|
var homegrown = 0m;
|
|
|
|
|
var import = 0m;
|
|
|
|
|
//var ionbond = 0m;
|
|
|
|
|
if (homegrownConfig != null && !homegrownConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
decimal.TryParse(balzersConfig.ConfigValue, out balzers);
|
|
|
|
|
decimal.TryParse(homegrownConfig.ConfigValue, out homegrown);
|
|
|
|
|
}
|
|
|
|
|
if (cemeconConfig != null && !cemeconConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
if (importConfig != null && !importConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
decimal.TryParse(cemeconConfig.ConfigValue, out cemecon);
|
|
|
|
|
}
|
|
|
|
|
if (ionbondConfig != null && !ionbondConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
decimal.TryParse(ionbondConfig.ConfigValue, out ionbond);
|
|
|
|
|
decimal.TryParse(importConfig.ConfigValue, out import);
|
|
|
|
|
}
|
|
|
|
|
//if (ionbondConfig != null && !ionbondConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
//{
|
|
|
|
|
// decimal.TryParse(ionbondConfig.ConfigValue, out ionbond);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
@ -759,15 +759,15 @@ namespace PVDEMCS.Services.Repositories.Impl
|
|
|
|
|
var value = 0m;
|
|
|
|
|
switch (item.EquipmentType)
|
|
|
|
|
{
|
|
|
|
|
case EquipmentType.Balzers:
|
|
|
|
|
value = days * balzers;
|
|
|
|
|
break;
|
|
|
|
|
case EquipmentType.Ionbond:
|
|
|
|
|
value = days * ionbond;
|
|
|
|
|
case EquipmentType.Homegrown:
|
|
|
|
|
value = days * homegrown;
|
|
|
|
|
break;
|
|
|
|
|
case EquipmentType.CemeCon:
|
|
|
|
|
value = days * cemecon;
|
|
|
|
|
case EquipmentType.Import:
|
|
|
|
|
value = days * import;
|
|
|
|
|
break;
|
|
|
|
|
//case EquipmentType.CemeCon:
|
|
|
|
|
// value = days * cemecon;
|
|
|
|
|
// break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -828,24 +828,24 @@ namespace PVDEMCS.Services.Repositories.Impl
|
|
|
|
|
var detail = list[0];
|
|
|
|
|
|
|
|
|
|
//获取配置的设备的初尝值
|
|
|
|
|
var balzersConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.BalzersOffset).Content;
|
|
|
|
|
var cemeconConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.CemeConOffset).Content;
|
|
|
|
|
var ionbondConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.IonbondOffset).Content;
|
|
|
|
|
var balzers = 0m;
|
|
|
|
|
var cemecon = 0m;
|
|
|
|
|
var ionbond = 0m;
|
|
|
|
|
if (balzersConfig != null && !balzersConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
var homegrownConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.HomegrownOffset).Content;
|
|
|
|
|
var importConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.ImportOffset).Content;
|
|
|
|
|
//var ionbondConfig = _configRepository.GetSysConfigDetailNameOrKey("", EquipmentTypeOffset.IonbondOffset).Content;
|
|
|
|
|
var homegrown = 0m;
|
|
|
|
|
var import = 0m;
|
|
|
|
|
//var ionbond = 0m;
|
|
|
|
|
if (homegrownConfig != null && !homegrownConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
decimal.TryParse(balzersConfig.ConfigValue, out balzers);
|
|
|
|
|
decimal.TryParse(homegrownConfig.ConfigValue, out homegrown);
|
|
|
|
|
}
|
|
|
|
|
if (cemeconConfig != null && !cemeconConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
if (importConfig != null && !importConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
decimal.TryParse(cemeconConfig.ConfigValue, out cemecon);
|
|
|
|
|
}
|
|
|
|
|
if (ionbondConfig != null && !ionbondConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
{
|
|
|
|
|
decimal.TryParse(ionbondConfig.ConfigValue, out ionbond);
|
|
|
|
|
decimal.TryParse(importConfig.ConfigValue, out import);
|
|
|
|
|
}
|
|
|
|
|
//if (ionbondConfig != null && !ionbondConfig.ConfigValue.IsNullOrEmpty())
|
|
|
|
|
//{
|
|
|
|
|
// decimal.TryParse(ionbondConfig.ConfigValue, out ionbond);
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
var now = DateTime.Now;
|
|
|
|
|
var minutes = 0m;
|
|
|
|
@ -871,15 +871,15 @@ namespace PVDEMCS.Services.Repositories.Impl
|
|
|
|
|
var value = 0m;
|
|
|
|
|
switch (detail.EquipmentType)
|
|
|
|
|
{
|
|
|
|
|
case EquipmentType.Balzers:
|
|
|
|
|
value = days * balzers;
|
|
|
|
|
break;
|
|
|
|
|
case EquipmentType.Ionbond:
|
|
|
|
|
value = days * ionbond;
|
|
|
|
|
case EquipmentType.Homegrown:
|
|
|
|
|
value = days * homegrown;
|
|
|
|
|
break;
|
|
|
|
|
case EquipmentType.CemeCon:
|
|
|
|
|
value = days * cemecon;
|
|
|
|
|
case EquipmentType.Import:
|
|
|
|
|
value = days * import;
|
|
|
|
|
break;
|
|
|
|
|
//case EquipmentType.CemeCon:
|
|
|
|
|
// value = days * import;
|
|
|
|
|
// break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|