修改进度模块

This commit is contained in:
2023-08-30 14:52:34 +08:00
parent 1a38e3c935
commit 991eb07f0b
22 changed files with 862 additions and 95 deletions
+1
View File
@@ -41,6 +41,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Apache.NMS.ActiveMQ">
+9 -9
View File
@@ -245,7 +245,7 @@ namespace BLL
/// 获取模拟树表格
/// </summary>
/// <returns></returns>
public static DataTable GetAllTreeDataTable(string projectId, string IsOut)
public static DataTable GetAllTreeDataTable(string projectId, string IsOut, string startTime, string endTime)
{
using (var db = new Model.SGGLDB(Funs.ConnString))
{
@@ -308,11 +308,11 @@ namespace BLL
newList.Add(item);
if (string.IsNullOrEmpty(IsOut))
{
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString());
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), startTime, endTime);
}
else
{
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty);
AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty, startTime, endTime);
}
a++;
}
@@ -427,29 +427,29 @@ namespace BLL
}
}
private static void AddDetail(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode)
private static void AddDetail(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, string startTime, string endTime)
{
var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code);
var items = oldList.Where(x => x.SupId == id && (x.PlanStartDate <= Funs.GetNewDateTime(startTime) || string.IsNullOrEmpty(startTime)) && (x.PlanEndDate >= Funs.GetNewDateTime(endTime) || string.IsNullOrEmpty(endTime))).OrderBy(x => x.WBSCode);
int b = 1;
foreach (var item in items)
{
item.Code = preCode + "." + b.ToString();
newList.Add(item);
AddDetail(newList, oldList, item.Id, item.Code);
AddDetail(newList, oldList, item.Id, item.Code, startTime, endTime);
b++;
}
}
private static void AddDetail(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, string prefix)
private static void AddDetail(List<Model.View_WBS> newList, List<Model.View_WBS> oldList, string id, string preCode, string prefix, string startTime, string endTime)
{
var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code);
var items = oldList.Where(x => x.SupId == id && (x.PlanStartDate <= Funs.GetNewDateTime(startTime) || string.IsNullOrEmpty(startTime)) && (x.PlanEndDate >= Funs.GetNewDateTime(endTime) || string.IsNullOrEmpty(endTime))).OrderBy(x => x.WBSCode);
int b = 1;
foreach (var item in items)
{
item.Code = preCode + "." + b.ToString();
item.Name = prefix + "...." + item.Name;
newList.Add(item);
AddDetail(newList, oldList, item.Id, item.Code, prefix + "....");
AddDetail(newList, oldList, item.Id, item.Code, prefix + "....", startTime, endTime);
b++;
}
}
+4
View File
@@ -3290,6 +3290,10 @@ namespace BLL
/// </summary>
public const string WBSWorkPackageTemplateUrl = "File\\Excel\\DataIn\\WBS定制导入模板.xls";
/// <summary>
/// WBS编码规则
/// </summary>
public const string WBSCodeTemplateUrl = "File\\Excel\\DataIn\\WBS编码规则.xlsx";
/// <summary>
/// 管道等级导入模板
/// </summary>
public const string PipingClassTemplateUrl = "File\\Excel\\DataIn\\管道等级导入模板.xls";