20241213 Key Quantity
This commit is contained in:
@@ -158,6 +158,7 @@
|
||||
<Compile Include="BaseInfo\DepartService.cs" />
|
||||
<Compile Include="BaseInfo\DisciplinesWBSService.cs" />
|
||||
<Compile Include="BaseInfo\HyperLinkSetService.cs" />
|
||||
<Compile Include="BaseInfo\QuantityDesctiptionService.cs" />
|
||||
<Compile Include="Common\AttachFileService.cs" />
|
||||
<Compile Include="Common\ChartControlService.cs" />
|
||||
<Compile Include="Common\ConstValue.cs" />
|
||||
@@ -165,6 +166,7 @@
|
||||
<Compile Include="Common\HttpHelper.cs" />
|
||||
<Compile Include="Design\DesignInputService.cs" />
|
||||
<Compile Include="EditorManage\CMHTDService.cs" />
|
||||
<Compile Include="EditorManage\KeyQuantityService.cs" />
|
||||
<Compile Include="SyncFilePathHelper.cs" />
|
||||
<Compile Include="Common\HashtableHelper.cs" />
|
||||
<Compile Include="Common\JsonHelper.cs" />
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
public class QuantityDesctiptionService
|
||||
{
|
||||
public static Model.Base_QuantityDesctiption GetQuantityDesctiptionById(string keyId)
|
||||
{
|
||||
return Funs.DB.Base_QuantityDesctiption.FirstOrDefault(e => e.KeyId == keyId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加
|
||||
/// </summary>
|
||||
/// <param name="des"></param>
|
||||
public static void AddQuantityDesctiption(Model.Base_QuantityDesctiption des)
|
||||
{
|
||||
Model.Base_QuantityDesctiption newDes = new Model.Base_QuantityDesctiption();
|
||||
newDes.KeyId = des.KeyId;
|
||||
newDes.DepartId = des.DepartId;
|
||||
newDes.DisciplinesWBSId = des.DisciplinesWBSId;
|
||||
newDes.QuantityDesctiption = des.QuantityDesctiption;
|
||||
newDes.PlanMHRsUnit = des.PlanMHRsUnit;
|
||||
Funs.DB.Base_QuantityDesctiption.InsertOnSubmit(newDes);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改
|
||||
/// </summary>
|
||||
/// <param name="des"></param>
|
||||
public static void UpdateQuantityDesctiption(Model.Base_QuantityDesctiption des)
|
||||
{
|
||||
Model.Base_QuantityDesctiption newDes = Funs.DB.Base_QuantityDesctiption.FirstOrDefault(e => e.KeyId == des.KeyId);
|
||||
if (newDes != null)
|
||||
{
|
||||
newDes.DepartId = des.DepartId;
|
||||
newDes.DisciplinesWBSId = des.DisciplinesWBSId;
|
||||
newDes.QuantityDesctiption = des.QuantityDesctiption;
|
||||
newDes.PlanMHRsUnit = des.PlanMHRsUnit;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除
|
||||
/// </summary>
|
||||
/// <param name="keyId"></param>
|
||||
public static void DeleteQuantityDesctiptionById(string keyId)
|
||||
{
|
||||
Model.Base_QuantityDesctiption newDes = Funs.DB.Base_QuantityDesctiption.FirstOrDefault(e => e.KeyId == keyId);
|
||||
if (newDes != null)
|
||||
{
|
||||
Funs.DB.Base_QuantityDesctiption.DeleteOnSubmit(newDes);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证是否存在
|
||||
/// </summary>
|
||||
/// <param name="departId"></param>
|
||||
/// <param name="DisciplinesWBSId"></param>
|
||||
/// <param name="quantityDesctiption"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsExitQuantityDesctiption(string departId, string DisciplinesWBSId, string quantityDesctiption, string id)
|
||||
{
|
||||
var q = Funs.DB.Base_QuantityDesctiption.FirstOrDefault(x => x.DepartId == departId && x.DisciplinesWBSId == DisciplinesWBSId && x.QuantityDesctiption == quantityDesctiption && x.KeyId != id);
|
||||
if (q != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,6 +299,12 @@ namespace BLL
|
||||
/// 超链接设置
|
||||
/// </summary>
|
||||
public const string HyperLinkSetMenuId = "CE289C0B-7E32-4DD3-B02E-60368EE47CCB";
|
||||
|
||||
/// <summary>
|
||||
/// Key Quantity-QuantityDesctiption
|
||||
/// </summary>
|
||||
public const string QuantityDesctiptionMenuId = "17E4B346-13C4-4751-8C8A-8F8A3C7CF9DD";
|
||||
|
||||
#endregion
|
||||
|
||||
#region 编辑器
|
||||
@@ -356,6 +362,11 @@ namespace BLL
|
||||
/// 成本报告
|
||||
/// </summary>
|
||||
public const string CostReportMenuId = "02069175-4901-4325-8019-3442D409233E";
|
||||
|
||||
/// <summary>
|
||||
/// Key Quantity Editor
|
||||
/// </summary>
|
||||
public const string KeyQuantityMenuId = "070C3436-1408-430B-B8BD-C6D2CCB80103";
|
||||
#endregion
|
||||
|
||||
#region 资源计划
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// Key Quantity
|
||||
/// </summary>
|
||||
public class KeyQuantityService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取Key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantityId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Editor_KeyQuantity GetKeyQuantityById(string keyQuantityId)
|
||||
{
|
||||
return Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantityId);
|
||||
}
|
||||
|
||||
public static decimal? GetSumPlanMHRsByKeyId(string keyId)
|
||||
{
|
||||
decimal? sum = 0;
|
||||
sum = (from x in Funs.DB.Editor_KeyQuantity where x.KeyId == keyId select x.PlanMHRs).Sum();
|
||||
return sum;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加Key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantity"></param>
|
||||
public static void AddKeyQuantity(Model.Editor_KeyQuantity keyQuantity)
|
||||
{
|
||||
Model.Editor_KeyQuantity newKeyQuantity = new Model.Editor_KeyQuantity();
|
||||
newKeyQuantity.KeyQuantityId = keyQuantity.KeyQuantityId;
|
||||
newKeyQuantity.EProjectId = keyQuantity.EProjectId;
|
||||
newKeyQuantity.KeyId = keyQuantity.KeyId;
|
||||
newKeyQuantity.InputQuantity = keyQuantity.InputQuantity;
|
||||
newKeyQuantity.PlanMHRs = keyQuantity.PlanMHRs;
|
||||
Funs.DB.Editor_KeyQuantity.InsertOnSubmit(newKeyQuantity);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantity"></param>
|
||||
public static void UpdateKeyQuantity(Model.Editor_KeyQuantity keyQuantity)
|
||||
{
|
||||
Model.Editor_KeyQuantity newKeyQuantity = Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantity.KeyQuantityId);
|
||||
if (newKeyQuantity != null)
|
||||
{
|
||||
newKeyQuantity.KeyId = keyQuantity.KeyId;
|
||||
newKeyQuantity.InputQuantity = keyQuantity.InputQuantity;
|
||||
newKeyQuantity.PlanMHRs = keyQuantity.PlanMHRs;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除Key Quantity
|
||||
/// </summary>
|
||||
/// <param name="keyQuantityId"></param>
|
||||
public static void DeleteKeyQuantityById(string keyQuantityId)
|
||||
{
|
||||
Model.Editor_KeyQuantity keyQuantity = Funs.DB.Editor_KeyQuantity.FirstOrDefault(e => e.KeyQuantityId == keyQuantityId);
|
||||
if (keyQuantity != null)
|
||||
{
|
||||
Funs.DB.Editor_KeyQuantity.DeleteOnSubmit(keyQuantity);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -413,6 +413,15 @@ namespace BLL
|
||||
return (from x in Funs.DB.View_Sys_Users where x.IsPost == true orderby x.DepartName, x.UserName select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取所有用户列表信息
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<Model.View_Sys_Users> GetAllUserViewList()
|
||||
{
|
||||
return (from x in Funs.DB.View_Sys_Users orderby x.DepartName, x.UserName select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取CTE用户
|
||||
/// </summary>
|
||||
@@ -448,7 +457,7 @@ namespace BLL
|
||||
dropName.DataGroupField = "DepartName";
|
||||
dropName.DataValueField = "UserId";
|
||||
dropName.DataTextField = "UserName";
|
||||
dropName.DataSource = BLL.Sys_UserService.GetUserViewList();
|
||||
dropName.DataSource = BLL.Sys_UserService.GetAllUserViewList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user