|
|
@@ -236,7 +236,7 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
/// <param name="recipeName"></param>
|
|
|
public void UpdateRecipeStepGroupThickness(string stepName, float thickness)
|
|
|
{
|
|
|
- if (string.IsNullOrEmpty(stepName) || thickness <= 0)
|
|
|
+ if (string.IsNullOrEmpty(stepName) )
|
|
|
return;
|
|
|
var stepNo = stepName.Split(':').FirstOrDefault();
|
|
|
var list = _dbRecords
|
|
|
@@ -251,8 +251,16 @@ namespace FurnaceRT.Equipments.PMs
|
|
|
{
|
|
|
if (item == null)
|
|
|
continue;
|
|
|
- Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, thickness);
|
|
|
|
|
|
+ var currentValue = Singleton<ScheduleMaintenanceDataManager>.Instance.GetItem(item.Item).CurrentValue;
|
|
|
+ if ((currentValue + thickness) <= 0)
|
|
|
+ {
|
|
|
+ Singleton<ScheduleMaintenanceDataManager>.Instance.SetValue(item.Item, 0);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ Singleton<ScheduleMaintenanceDataManager>.Instance.Increase(item.Item, thickness);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|