新增管道颜色标识导入功能及API控制器

更新了多个服务和页面,增加了导入管道颜色标识数据的功能,并实现了包装管理、车次管理、管道组件和焊口信息的API控制器。修正了文件路径错误,优化了分页和排序逻辑,删除了不再使用的API方法。
This commit is contained in:
2025-10-24 10:04:03 +08:00
parent 55b798135c
commit c23d113eae
55 changed files with 1502 additions and 817 deletions
@@ -35,7 +35,12 @@ namespace BLL
{ "预制散件" ,(int)TypeInt.},
{ "其他材料" ,(int)TypeInt.},
};
public static Dictionary<string, int> CategoryIntMap = new Dictionary<string, int>
{
{ "打捆" ,(int)CategoryInt.},
{ "装箱" ,(int)CategoryInt.},
{ "散装" ,(int)CategoryInt.},
};
#endregion Fields
#region Enums
@@ -46,6 +51,12 @@ namespace BLL
= 20,
= 30,
}
public enum CategoryInt : int
{
= 10,
= 20,
= 30,
}
#endregion Enums
@@ -73,6 +84,7 @@ namespace BLL
TrainNumber = newtable.TrainNumber,
TrainNumberId = newtable.TrainNumberId,
TypeInt = newtable.TypeInt,
CategoryInt = newtable.CategoryInt,
CompileMan = newtable.CompileMan,
CompileDate = newtable.CompileDate
};
@@ -227,7 +239,9 @@ namespace BLL
StackingPosition = x.StackingPosition,
State = x.State,
TypeInt = x.TypeInt,
CategoryInt = x.CategoryInt,
TypeString = GetTypeString(x.TypeInt),
CategoryString = GetCategoryString(x.CategoryInt),
ReceiveMan = train.ContactName,//t.PersonName,
ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "",
PlanStartDate = GetMinPlanStartDate(x.PackagingManageId),
@@ -261,7 +275,10 @@ namespace BLL
{
return TypeIntMap.FirstOrDefault(c => c.Value == TypeInt).Key;
}
public static string GetCategoryString(int? CategoryInt)
{
return CategoryIntMap.FirstOrDefault(c => c.Value == CategoryInt).Key;
}
/// <summary>
/// 管线下拉框
/// </summary>
@@ -313,6 +330,7 @@ namespace BLL
table.TrainNumber = newtable.TrainNumber;
table.TrainNumberId = newtable.TrainNumberId;
table.TypeInt = newtable.TypeInt;
table.CategoryInt = newtable.CategoryInt;
db1.SubmitChanges();
}
}
@@ -344,6 +362,9 @@ namespace BLL
public string TrainNumberOld { get; set; }
public int? TypeInt { get; set; }
public string TypeString { get; set; }
public int? CategoryInt { get; set; }
public string CategoryString { get; set; }
#endregion Properties
}