11
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,178 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
#region Identifier下拉值加载
|
||||
public static void InitIdentifierDropDownList(FineUIPro.DropDownList dropName,string type, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "DisciplinesWBSCode";
|
||||
dropName.DataTextField = "DisciplinesWBSCode";
|
||||
dropName.DataSource = GetDisciplinesWBSCodeList(type);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName,"-请选择-");
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> GetDisciplinesWBSCodeList(string type)
|
||||
{
|
||||
return (from x in Funs.DB.Base_QuantityDesctiption
|
||||
join y in Funs.DB.Base_DisciplinesWBS on x.DisciplinesWBSId equals y.DisciplinesWBSId
|
||||
where x.DepartId == type
|
||||
orderby y.DisciplinesWBSCode
|
||||
select y.DisciplinesWBSCode).Distinct().ToList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Descipline下拉值加载
|
||||
public static void InitDesciplineDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string type, string disciplinesWBSCode)
|
||||
{
|
||||
dropName.DataValueField = "DisciplinesWBSName";
|
||||
dropName.DataTextField = "DisciplinesWBSName";
|
||||
dropName.DataSource = GetDesciplineList(type,disciplinesWBSCode);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, "-请选择-");
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> GetDesciplineList(string type,string disciplinesWBSCode)
|
||||
{
|
||||
return (from x in Funs.DB.Base_QuantityDesctiption
|
||||
join y in Funs.DB.Base_DisciplinesWBS on x.DisciplinesWBSId equals y.DisciplinesWBSId
|
||||
where y.DisciplinesWBSCode == disciplinesWBSCode && x.DepartId == type
|
||||
orderby y.DisciplinesWBSName
|
||||
select y.DisciplinesWBSName).Distinct().ToList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Quantity Desctiption 下拉值加载
|
||||
public static void InitQuantityDesctiptionDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string type, string disciplinesWBSCode, string disciplinesWBSName)
|
||||
{
|
||||
dropName.DataValueField = "QuantityDesctiption";
|
||||
dropName.DataTextField = "QuantityDesctiption";
|
||||
dropName.DataSource = GetQuantityDesctiptionList(type,disciplinesWBSCode, disciplinesWBSName);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, "-请选择-");
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> GetQuantityDesctiptionList(string type, string disciplinesWBSCode, string disciplinesWBSName)
|
||||
{
|
||||
return (from x in Funs.DB.Base_QuantityDesctiption
|
||||
join y in Funs.DB.Base_DisciplinesWBS on x.DisciplinesWBSId equals y.DisciplinesWBSId
|
||||
where x.DepartId == type && y.DisciplinesWBSCode == disciplinesWBSCode && y.DisciplinesWBSName == disciplinesWBSName
|
||||
orderby x.QuantityDesctiption
|
||||
select x.QuantityDesctiption).Distinct().ToList();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PlanMHRsUnit 下拉值加载
|
||||
public static void InitPlanMHRsUnitDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease,string type, string disciplinesWBSCode, string disciplinesWBSName, string quantityDesctiption)
|
||||
{
|
||||
dropName.DataValueField = "PlanMHRsUnit";
|
||||
dropName.DataTextField = "PlanMHRsUnit";
|
||||
dropName.DataSource = GetPlanMHRsUnitList(type,disciplinesWBSCode, disciplinesWBSName, quantityDesctiption);
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName, "-请选择-");
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> GetPlanMHRsUnitList(string type, string disciplinesWBSCode, string disciplinesWBSName, string quantityDesctiption)
|
||||
{
|
||||
return (from x in Funs.DB.Base_QuantityDesctiption
|
||||
join y in Funs.DB.Base_DisciplinesWBS on x.DisciplinesWBSId equals y.DisciplinesWBSId
|
||||
where x.DepartId == type && y.DisciplinesWBSCode == disciplinesWBSCode && y.DisciplinesWBSName == disciplinesWBSName
|
||||
&& x.QuantityDesctiption == quantityDesctiption
|
||||
orderby x.PlanMHRsUnit
|
||||
select x.PlanMHRsUnit.ToString()).Distinct().ToList();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -293,7 +293,10 @@ namespace BLL
|
||||
if (user.UserId == Const.GlyId) //// 如果是管理员或者本部人员返回所有菜单
|
||||
{
|
||||
var sysMenu = from x in Funs.DB.Sys_Menu orderby x.SortIndex select x;
|
||||
reMenuList = sysMenu.ToList();
|
||||
if (sysMenu.Count() > 0)
|
||||
{
|
||||
reMenuList = sysMenu.ToList();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -302,7 +305,10 @@ namespace BLL
|
||||
where y.RoleId == user.RoleId
|
||||
orderby x.SortIndex
|
||||
select x;
|
||||
reMenuList = sysMenuRole.ToList();
|
||||
if (sysMenuRole.Count() > 0)
|
||||
{
|
||||
reMenuList = sysMenuRole.ToList();
|
||||
}
|
||||
|
||||
// PM,EM,CM权限特殊处理
|
||||
List<string> pm = (from x in Funs.DB.Editor_EProject select x.ProjectControl_ProjectManagerId).ToList();
|
||||
@@ -312,13 +318,19 @@ namespace BLL
|
||||
{
|
||||
Model.Sys_Menu addSupMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == "1FA19FE4-D8B9-4D1B-8EB0-CAC05B71AFBB" select x).First();
|
||||
Model.Sys_Menu addMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == Const.PMEditorMenuId select x).First();
|
||||
reMenuList.Add(addMenu);
|
||||
if (addMenu != null)
|
||||
{
|
||||
reMenuList.Add(addMenu);
|
||||
}
|
||||
}
|
||||
if (cm.Contains(user.UserId))
|
||||
{
|
||||
Model.Sys_Menu addSupMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == "1FA19FE4-D8B9-4D1B-8EB0-CAC05B71AFBB" select x).First();
|
||||
Model.Sys_Menu addMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == Const.CMEditorMenuId select x).First();
|
||||
reMenuList.Add(addMenu);
|
||||
if (addMenu != null)
|
||||
{
|
||||
reMenuList.Add(addMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// 对资源模块的特殊处理:CTE/M具有RP权限
|
||||
@@ -326,8 +338,14 @@ namespace BLL
|
||||
{
|
||||
Model.Sys_Menu addSupMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == "72CDB9E2-F44B-4F96-A578-3271211FDC15" select x).First();
|
||||
Model.Sys_Menu addMenu = (from x in Funs.DB.Sys_Menu where x.MenuId == Const.ResourcePlanMenuId select x).First();
|
||||
reMenuList.Add(addSupMenu);
|
||||
reMenuList.Add(addMenu);
|
||||
if (addSupMenu != null)
|
||||
{
|
||||
reMenuList.Add(addSupMenu);
|
||||
}
|
||||
if (addMenu != null)
|
||||
{
|
||||
reMenuList.Add(addMenu);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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 资源计划
|
||||
@@ -736,6 +747,11 @@ namespace BLL
|
||||
/// </summary>
|
||||
public const string CMTDCString = "CMTDC";
|
||||
|
||||
/// <summary>
|
||||
/// 设计输入策划
|
||||
/// </summary>
|
||||
public const string DesignPlanString = "DesignPlan";
|
||||
|
||||
/// <summary>
|
||||
/// 设计输入提醒
|
||||
/// </summary>
|
||||
|
||||
@@ -122,6 +122,7 @@ namespace BLL
|
||||
newEProject.StudyWo = eProject.StudyWo;
|
||||
newEProject.CreateDate = eProject.CreateDate;
|
||||
newEProject.CreatePerson = eProject.CreatePerson;
|
||||
newEProject.ProjectControl_RFSU_CloseDate = eProject.ProjectControl_RFSU_CloseDate;
|
||||
|
||||
db.Editor_EProject.InsertOnSubmit(newEProject);
|
||||
db.SubmitChanges();
|
||||
@@ -211,6 +212,7 @@ namespace BLL
|
||||
newEProject.StudyWo = eProject.StudyWo;
|
||||
newEProject.CreateDate = eProject.CreateDate;
|
||||
newEProject.CreatePerson = eProject.CreatePerson;
|
||||
newEProject.ProjectControl_RFSU_CloseDate = eProject.ProjectControl_RFSU_CloseDate;
|
||||
//if (eProject.ProjectControl_JobStatus != "Hold")
|
||||
//{
|
||||
// newEProject.Job_Hold =null;
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
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 eprojectId, string identifier, string descipline)
|
||||
{
|
||||
decimal? sum = 0;
|
||||
sum = (from x in Funs.DB.Editor_KeyQuantity where x.EProjectId == eprojectId && x.Identifier == identifier && x.Descipline == descipline 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;
|
||||
newKeyQuantity.Identifier = keyQuantity.Identifier;
|
||||
newKeyQuantity.Descipline = keyQuantity.Descipline;
|
||||
newKeyQuantity.QuantityDesctiption = keyQuantity.QuantityDesctiption;
|
||||
newKeyQuantity.PlanMHRsUnit = keyQuantity.PlanMHRsUnit;
|
||||
newKeyQuantity.Type = keyQuantity.Type;
|
||||
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;
|
||||
newKeyQuantity.Identifier = keyQuantity.Identifier;
|
||||
newKeyQuantity.Descipline = keyQuantity.Descipline;
|
||||
newKeyQuantity.QuantityDesctiption = keyQuantity.QuantityDesctiption;
|
||||
newKeyQuantity.PlanMHRsUnit = keyQuantity.PlanMHRsUnit;
|
||||
newKeyQuantity.Type = keyQuantity.Type;
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,7 @@ namespace BLL
|
||||
newPlan.ManHours = plan.ManHours;
|
||||
newPlan.AccountDisabled = plan.AccountDisabled;
|
||||
newPlan.IsClose = plan.IsClose;
|
||||
newPlan.Phase = plan.Phase;
|
||||
Funs.DB.ManHours_Plan.InsertOnSubmit(newPlan);
|
||||
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