20250116 key Quantity、项目状态修改

This commit is contained in:
2025-01-16 17:02:02 +08:00
parent d02ac75d48
commit 4c28c0514b
10 changed files with 461 additions and 213 deletions
@@ -23,10 +23,10 @@ namespace BLL
return Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantityId);
}
public static decimal? GetSumPlanMHRsByKeyId(string keyId)
public static decimal? GetSumPlanMHRsByKeyId(string eprojectId, string identifier, string descipline)
{
decimal? sum = 0;
sum = (from x in Funs.DB.Editor_KeyQuantity where x.KeyId == keyId select x.PlanMHRs).Sum();
sum = (from x in Funs.DB.Editor_KeyQuantity where x.EProjectId == eprojectId && x.Identifier == identifier && x.Descipline == descipline select x.PlanMHRs).Sum();
return sum;
}
@@ -42,6 +42,10 @@ namespace BLL
newKeyQuantity.KeyId = keyQuantity.KeyId;
newKeyQuantity.InputQuantity = keyQuantity.InputQuantity;
newKeyQuantity.PlanMHRs = keyQuantity.PlanMHRs;
newKeyQuantity.Identifier = keyQuantity.Identifier;
newKeyQuantity.Descipline = keyQuantity.Descipline;
newKeyQuantity.QuantityDesctiption = keyQuantity.QuantityDesctiption;
newKeyQuantity.PlanMHRsUnit = keyQuantity.PlanMHRsUnit;
Funs.DB.Editor_KeyQuantity.InsertOnSubmit(newKeyQuantity);
Funs.DB.SubmitChanges();
}
@@ -58,6 +62,10 @@ namespace BLL
newKeyQuantity.KeyId = keyQuantity.KeyId;
newKeyQuantity.InputQuantity = keyQuantity.InputQuantity;
newKeyQuantity.PlanMHRs = keyQuantity.PlanMHRs;
newKeyQuantity.Identifier = keyQuantity.Identifier;
newKeyQuantity.Descipline = keyQuantity.Descipline;
newKeyQuantity.QuantityDesctiption = keyQuantity.QuantityDesctiption;
newKeyQuantity.PlanMHRsUnit = keyQuantity.PlanMHRsUnit;
Funs.DB.SubmitChanges();
}
}