This commit is contained in:
2023-10-24 17:29:36 +08:00
13 changed files with 163 additions and 112 deletions
@@ -62,10 +62,11 @@ namespace BLL
x.SettledQuantity.Contains(table.SettledQuantity)) &&
(string.IsNullOrEmpty(table.ContractId) ||
x.ContractId.Contains(table.ContractId))
select x
;
return q.ToList();
var model = q.ToList().OrderBy(x => x.SerialNumber, new CustomComparer()).ToList();
return model;
}
/// <summary>
@@ -156,6 +157,7 @@ namespace BLL
SettledAmount = newtable.SettledAmount,
ContractId = newtable.ContractId,
ProjectId = newtable.ProjectId,
SerialNumber = newtable.SerialNumber
};
Funs.DB.PHTGL_ContractTrack.InsertOnSubmit(table);
Funs.DB.SubmitChanges();
@@ -198,20 +200,23 @@ namespace BLL
table.SettledAmount = newtable.SettledAmount;
table.ContractId = newtable.ContractId;
table.ProjectId = newtable.ProjectId;
table.SerialNumber=newtable.SerialNumber;
Funs.DB.SubmitChanges();
}
}
public static void DeletePHTGL_ContractTrackById(string id)
{
PhtglContracttrackprogressService.DeleteModleByContractTrackId(id);
PhtglContracttrackmatchwbsService.DeleteModelByContractTrackId(id);
ConstructionLogWorkEfficiencyService.DeleteConstructionLogWorkEfficiencysByContractTrackId(id);
var table = Funs.DB.PHTGL_ContractTrack.FirstOrDefault(x => x.Id == id);
if (table != null)
{
Funs.DB.PHTGL_ContractTrack.DeleteOnSubmit(table);
Funs.DB.SubmitChanges();
}
PhtglContracttrackprogressService.DeleteModleByContractTrackId(id);
PhtglContracttrackmatchwbsService.DeleteModelByContractTrackId(id);
}
/// <summary>
@@ -293,13 +298,14 @@ namespace BLL
{
item.ContractId = contractid;
item.ProjectId = projectid;
if (string.IsNullOrEmpty(item.ProjectCode)) continue;
var phtglContractTrack = new PHTGL_ContractTrack
{
MainItemCode=item.MainItemCode,
ProjectCode = item.ProjectCode,
ContractId = contractid,
ProjectId = projectid,
};
if (string.IsNullOrEmpty(item.ProjectCode)) continue;
var resultModel = GetPHTGL_ContractTrackByModle(phtglContractTrack);
item.ContractNum = ContractService.GetContractById(contractid)?.ContractNum;
if (!string.IsNullOrEmpty(item.ProjectCode) && !item.ProjectCode.Contains("-"))
@@ -1051,6 +1057,10 @@ namespace BLL
}
public class PHTGL_ContractTrackDtoIn
{
/// <summary>
/// 序号
/// </summary>
[ExcelColumnIndex("A")] public string SerialNumber { get; set; }
/// <summary>
/// 主项号
/// </summary>
@@ -1068,48 +1078,56 @@ namespace BLL
/// </summary>
[ExcelColumnIndex("E")] public string MajorName { get; set; }
/// <summary>
/// 分部工程
/// </summary>
[ExcelColumnIndex("F")] public string SubProject { get; set; }
/// <summary>
/// 分项工程
/// </summary>
[ExcelColumnIndex("G")] public string SubItemProject { get; set; }
/// <summary>
/// 项目编码
/// </summary>
[ExcelColumnIndex("F")] public string ProjectCode { get; set; }
[ExcelColumnIndex("H")] public string ProjectCode { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[ExcelColumnIndex("G")] public string ProjectName { get; set; }
[ExcelColumnIndex("I")] public string ProjectName { get; set; }
/// <summary>
/// 项目特征描述
/// </summary>
[ExcelColumnIndex("H")] public string ProjectDescription { get; set; }
[ExcelColumnIndex("J")] public string ProjectDescription { get; set; }
/// <summary>
/// 计量单位
/// </summary>
[ExcelColumnIndex("I")] public string UnitOfMeasurement { get; set; }
[ExcelColumnIndex("K")] public string UnitOfMeasurement { get; set; }
/// <summary>
/// 工程量
/// </summary>
[ExcelColumnIndex("J")] public string Quantity { get; set; }
[ExcelColumnIndex("L")] public string Quantity { get; set; }
/// <summary>
/// 全费用固定综合单价
/// </summary>
[ExcelColumnIndex("K")] public string TotalCostFixedComprehensiveUnitPrice { get; set; }
[ExcelColumnIndex("M")] public string TotalCostFixedComprehensiveUnitPrice { get; set; }
/// <summary>
/// 其中:主材费
/// </summary>
[ExcelColumnIndex("L")] public string MainMaterialCost { get; set; }
[ExcelColumnIndex("N")] public string MainMaterialCost { get; set; }
/// <summary>
/// 合价/元
/// </summary>
[ExcelColumnIndex("M")] public string TotalPrice { get; set; }
[ExcelColumnIndex("O")] public string TotalPrice { get; set; }
/// <summary>
/// 计算规则
/// </summary>
[ExcelColumnIndex("N")] public string CalculationRule { get; set; }
[ExcelColumnIndex("P")] public string CalculationRule { get; set; }
/// <summary>
/// 工作内容
/// </summary>
[ExcelColumnIndex("O")] public string WorkContent { get; set; }
[ExcelColumnIndex("Q")] public string WorkContent { get; set; }
/// <summary>
/// 备注
/// </summary>
[ExcelColumnIndex("P")] public string Remarks { get; set; }
[ExcelColumnIndex("R")] public string Remarks { get; set; }
}
}