代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -1,11 +1,11 @@
using System;
using FineUIPro;
using MiniExcelLibs;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using FineUIPro;
using MiniExcelLibs;
using Model;
namespace BLL
{
@@ -78,27 +78,27 @@ namespace BLL
querytable.IsTemplate = false;
querytable.ParentId = item.MainProjectQuantityId;
var tb = PHTGL_QuantityService.GetPHTGL_QuantityByModle(querytable);
var exportmodel = (from x in tb
select new
{
= x.Major,
= x.SubProject,
= x.SubItemProject,
= x.ProjectCode,
=x.ProjectName,
= x.ProjectDescription,
= x.UnitOfMeasurement,
=x.Quantity,
=x.TotalCostFixedComprehensiveUnitPrice,
=x.MainMaterialCost,
=x.TotalPrice,
=x.CalculationRule,
=x.WorkContent,
=x.Remarks,
}).ToList();
sheets.Add(item.MainProjectQuantityName,exportmodel);
var exportmodel = (from x in tb
select new
{
= x.Major,
= x.SubProject,
= x.SubItemProject,
= x.ProjectCode,
= x.ProjectName,
= x.ProjectDescription,
= x.UnitOfMeasurement,
= x.Quantity,
= x.TotalCostFixedComprehensiveUnitPrice,
= x.MainMaterialCost,
= x.TotalPrice,
= x.CalculationRule,
= x.WorkContent,
= x.Remarks,
}).ToList();
sheets.Add(item.MainProjectQuantityName, exportmodel);
}
string path = Funs.RootPath + @"File\Excel\Temp\招标工作清单-"+ bidProjectQuantity.BidProjectCode+ ".xlsx";
string path = Funs.RootPath + @"File\Excel\Temp\招标工作清单-" + bidProjectQuantity.BidProjectCode + ".xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
MiniExcel.SaveAs(path, sheets);
string fileName = "招标工作清单-" + bidProjectQuantity.BidProjectCode + ".xlsx";
@@ -117,7 +117,7 @@ namespace BLL
{
var sheets = new Dictionary<string, object>();
var mainProjectList = PHTGL_MainProjectQuantityService.GetPHTGL_MainProjectQuantityById(mainProjectQuantityId);//获取主项
if (mainProjectList==null)
if (mainProjectList == null)
{
return;
}
@@ -126,25 +126,25 @@ namespace BLL
querytable.ParentId = mainProjectQuantityId;
var tb = PHTGL_QuantityService.GetPHTGL_QuantityByModle(querytable);
var exportmodel = (from x in tb
select new
{
= x.Major,
= x.SubProject,
= x.SubItemProject,
= x.ProjectCode,
= x.ProjectName,
= x.ProjectDescription,
= x.UnitOfMeasurement,
= x.Quantity,
= x.TotalCostFixedComprehensiveUnitPrice,
= x.MainMaterialCost,
= x.TotalPrice,
= x.CalculationRule,
= x.WorkContent,
= x.Remarks,
}).ToList();
select new
{
= x.Major,
= x.SubProject,
= x.SubItemProject,
= x.ProjectCode,
= x.ProjectName,
= x.ProjectDescription,
= x.UnitOfMeasurement,
= x.Quantity,
= x.TotalCostFixedComprehensiveUnitPrice,
= x.MainMaterialCost,
= x.TotalPrice,
= x.CalculationRule,
= x.WorkContent,
= x.Remarks,
}).ToList();
sheets.Add(mainProjectList.MainProjectQuantityName, exportmodel);
string path = Funs.RootPath + @"File\Excel\Temp\招标工作清单-" + mainProjectList.MainProjectQuantityCode + ".xlsx";
path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx");
MiniExcel.SaveAs(path, sheets);
@@ -202,16 +202,16 @@ namespace BLL
q = q.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize).ToList();
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.BidProjectQuantityId,
x.LotNumber,
x.BidProjectCode,
x.IsMainProject,
x.ProjectId,
x.CreatorId,
x.CreateDate
};
select new
{
x.BidProjectQuantityId,
x.LotNumber,
x.BidProjectCode,
x.IsMainProject,
x.ProjectId,
x.CreatorId,
x.CreateDate
};
}
#endregion
@@ -1,8 +1,8 @@
using System.Collections;
using FineUIPro;
using Model;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using FineUIPro;
using Model;
namespace BLL
{
@@ -105,13 +105,13 @@ namespace BLL
q = q.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize).ToList();
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.MainProjectQuantityId,
x.MainProjectQuantityCode,
x.MainProjectQuantityName,
x.QuantityId
};
select new
{
x.MainProjectQuantityId,
x.MainProjectQuantityCode,
x.MainProjectQuantityName,
x.QuantityId
};
}
#endregion
@@ -1,12 +1,12 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using EmitMapper;
using EmitMapper;
using FineUIPro;
using MiniExcelLibs;
using MiniExcelLibs.Attributes;
using Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
namespace BLL
{
@@ -17,9 +17,9 @@ namespace BLL
return Funs.DB.PHTGL_Quantity.FirstOrDefault(x => x.Id == Id);
}
public static PHTGL_Quantity GetPHTGL_QuantityByNumBer(string serialNumber,string marjor)
public static PHTGL_Quantity GetPHTGL_QuantityByNumBer(string serialNumber, string marjor)
{
return Funs.DB.PHTGL_Quantity.FirstOrDefault(x => x.SerialNumber == serialNumber && x.Major==marjor);
return Funs.DB.PHTGL_Quantity.FirstOrDefault(x => x.SerialNumber == serialNumber && x.Major == marjor);
}
public static void AddPHTGL_Quantity(PHTGL_Quantity newtable)
@@ -136,24 +136,24 @@ namespace BLL
public static ResponeData ImportData(string path, string majortype)
{
var responeData = new ResponeData();
List<PHTGL_QuantityDtoIn> rows= new List<PHTGL_QuantityDtoIn>();
List<dynamic> remarkQuery=new List<dynamic>();
List<PHTGL_QuantityDtoIn> rows = new List<PHTGL_QuantityDtoIn>();
List<dynamic> remarkQuery = new List<dynamic>();
string Major = "";
try
{
var sheetNames = MiniExcel.GetSheetNames(path);
foreach (var item in sheetNames)
{
if (item=="编制说明")
if (item == "编制说明")
{
remarkQuery = MiniExcel.Query(path, sheetName: item).ToList();
remarkQuery = MiniExcel.Query(path, sheetName: item).ToList();
}
else
{
rows = MiniExcel.Query<PHTGL_QuantityDtoIn>(path, sheetName: item).ToList();
}
}
}
catch (Exception e)
{
@@ -174,7 +174,7 @@ namespace BLL
Major = GetMajorItems().Where(x => x.Text == majortype).Select(x => x.Value).FirstOrDefault() ??
"";
List<Model.Sys_Const> consts=new List<Model.Sys_Const>();
List<Model.Sys_Const> consts = new List<Model.Sys_Const>();
int SortIndex = 0;
foreach (var item in remarkQuery)
{
@@ -184,14 +184,14 @@ namespace BLL
ID = SQLHelper.GetNewID(),
ConstValue = item.A?.ToString(),
SortIndex = SortIndex,
GroupId = "工程量清单-"+ Major
GroupId = "工程量清单-" + Major
};
consts.Add(model);
SortIndex++;
}
var old = ConstValue.drpConstItemList("工程量清单-" + Major);
if (old.Count>0)
if (old.Count > 0)
{
Funs.DB.Sys_Const.DeleteAllOnSubmit(old);
Funs.DB.SubmitChanges();
@@ -203,8 +203,8 @@ namespace BLL
{
item.Major = Major;
if (string.IsNullOrEmpty(Major)) break;
if (string .IsNullOrEmpty(item.ProjectName)) continue;
if (item.ProjectName== "项目名称") continue;
if (string.IsNullOrEmpty(item.ProjectName)) continue;
if (item.ProjectName == "项目名称") continue;
var queryPhtglQuantity = new PHTGL_Quantity
{
Major = item.Major,
@@ -401,36 +401,36 @@ namespace BLL
public static List<PHTGL_Quantity> GetPHTGL_QuantityByModle(PHTGL_Quantity table)
{
var q = from x in Funs.DB.PHTGL_Quantity
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.Major) || x.Major.Contains(table.Major)) &&
(string.IsNullOrEmpty(table.SubProject) || x.SubProject.Contains(table.SubProject)) &&
(string.IsNullOrEmpty(table.SubItemProject) ||
x.SubItemProject.Contains(table.SubItemProject)) &&
(string.IsNullOrEmpty(table.ProjectCode) || x.ProjectCode.Contains(table.ProjectCode)) &&
(string.IsNullOrEmpty(table.ProjectName) || x.ProjectName.Contains(table.ProjectName)) &&
(string.IsNullOrEmpty(table.ProjectDescription) ||
x.ProjectDescription.Contains(table.ProjectDescription)) &&
(string.IsNullOrEmpty(table.UnitOfMeasurement) ||
x.UnitOfMeasurement.Contains(table.UnitOfMeasurement)) &&
(string.IsNullOrEmpty(table.Quantity) || x.Quantity.Contains(table.Quantity)) &&
(string.IsNullOrEmpty(table.TotalCostFixedComprehensiveUnitPrice) ||
x.TotalCostFixedComprehensiveUnitPrice.Contains(table.TotalCostFixedComprehensiveUnitPrice)) &&
(string.IsNullOrEmpty(table.MainMaterialCost) ||
x.MainMaterialCost.Contains(table.MainMaterialCost)) &&
(string.IsNullOrEmpty(table.TotalPrice) || x.TotalPrice.Contains(table.TotalPrice)) &&
(string.IsNullOrEmpty(table.CalculationRule) ||
x.CalculationRule.Contains(table.CalculationRule)) &&
(string.IsNullOrEmpty(table.WorkContent) || x.WorkContent.Contains(table.WorkContent)) &&
(string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) &&
x.IsTemplate == table.IsTemplate &&
(string.IsNullOrEmpty(table.ParentId) || x.ParentId.Contains(table.ParentId))
where
(string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) &&
(string.IsNullOrEmpty(table.Major) || x.Major.Contains(table.Major)) &&
(string.IsNullOrEmpty(table.SubProject) || x.SubProject.Contains(table.SubProject)) &&
(string.IsNullOrEmpty(table.SubItemProject) ||
x.SubItemProject.Contains(table.SubItemProject)) &&
(string.IsNullOrEmpty(table.ProjectCode) || x.ProjectCode.Contains(table.ProjectCode)) &&
(string.IsNullOrEmpty(table.ProjectName) || x.ProjectName.Contains(table.ProjectName)) &&
(string.IsNullOrEmpty(table.ProjectDescription) ||
x.ProjectDescription.Contains(table.ProjectDescription)) &&
(string.IsNullOrEmpty(table.UnitOfMeasurement) ||
x.UnitOfMeasurement.Contains(table.UnitOfMeasurement)) &&
(string.IsNullOrEmpty(table.Quantity) || x.Quantity.Contains(table.Quantity)) &&
(string.IsNullOrEmpty(table.TotalCostFixedComprehensiveUnitPrice) ||
x.TotalCostFixedComprehensiveUnitPrice.Contains(table.TotalCostFixedComprehensiveUnitPrice)) &&
(string.IsNullOrEmpty(table.MainMaterialCost) ||
x.MainMaterialCost.Contains(table.MainMaterialCost)) &&
(string.IsNullOrEmpty(table.TotalPrice) || x.TotalPrice.Contains(table.TotalPrice)) &&
(string.IsNullOrEmpty(table.CalculationRule) ||
x.CalculationRule.Contains(table.CalculationRule)) &&
(string.IsNullOrEmpty(table.WorkContent) || x.WorkContent.Contains(table.WorkContent)) &&
(string.IsNullOrEmpty(table.Remarks) || x.Remarks.Contains(table.Remarks)) &&
x.IsTemplate == table.IsTemplate &&
(string.IsNullOrEmpty(table.ParentId) || x.ParentId.Contains(table.ParentId))
select x;
//select new { x ,IntSerialNumber= Funs.GetNewIntOrZero(x.SerialNumber.Replace(".", ""))
// }
select x;
//select new { x ,IntSerialNumber= Funs.GetNewIntOrZero(x.SerialNumber.Replace(".", ""))
// }
;
;
//var model = q.ToList().OrderBy(x => x.IntSerialNumber).Select(itemx => itemx.x).ToList();
var model = q.ToList().OrderBy(x => x.SerialNumber, new CustomComparer()).ToList();
return model;
@@ -449,27 +449,27 @@ namespace BLL
q = q.Skip(Grid1.PageSize * Grid1.PageIndex).Take(Grid1.PageSize).ToList();
// q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize);
return from x in q
select new
{
x.Id,
x.SerialNumber,
x.Major,
x.SubProject,
x.SubItemProject,
x.ProjectCode,
x.ProjectName,
x.ProjectDescription,
x.UnitOfMeasurement,
x.Quantity,
x.TotalCostFixedComprehensiveUnitPrice,
x.MainMaterialCost,
x.TotalPrice,
x.CalculationRule,
x.WorkContent,
x.Remarks,
x.IsTemplate,
x.ParentId
};
select new
{
x.Id,
x.SerialNumber,
x.Major,
x.SubProject,
x.SubItemProject,
x.ProjectCode,
x.ProjectName,
x.ProjectDescription,
x.UnitOfMeasurement,
x.Quantity,
x.TotalCostFixedComprehensiveUnitPrice,
x.MainMaterialCost,
x.TotalPrice,
x.CalculationRule,
x.WorkContent,
x.Remarks,
x.IsTemplate,
x.ParentId
};
}
public static void CheckSubProjectName(List<PHTGL_Quantity> list)
@@ -479,7 +479,7 @@ namespace BLL
var SubProject = "";
var SubItemProject = "";
var SerialNumberArry = item.SerialNumber?.Split('.');
if (SerialNumberArry.Length==2)
if (SerialNumberArry.Length == 2)
{
item.SubProject = GetPHTGL_QuantityByNumBer(SerialNumberArry[0], item.Major).ProjectName;
UpdatePHTGL_Quantity(item);
@@ -488,10 +488,10 @@ namespace BLL
else if (SerialNumberArry.Length == 3)
{
item.SubProject = GetPHTGL_QuantityByNumBer(SerialNumberArry[0], item.Major).ProjectName;
item.SubItemProject= GetPHTGL_QuantityByNumBer(SerialNumberArry[0]+"."+ SerialNumberArry[1], item.Major).ProjectName;
item.SubItemProject = GetPHTGL_QuantityByNumBer(SerialNumberArry[0] + "." + SerialNumberArry[1], item.Major).ProjectName;
UpdatePHTGL_Quantity(item);
}
}
}
@@ -501,7 +501,7 @@ namespace BLL
{
public int Compare(string x, string y)
{
if (string.IsNullOrEmpty(x)||string.IsNullOrEmpty(y))
if (string.IsNullOrEmpty(x) || string.IsNullOrEmpty(y))
{
return 0;
}