feat:增加焊前管理,材料管理条码扫码接口,材料信息导入支持无炉批号/有炉批号 多种导入方式
This commit is contained in:
@@ -247,6 +247,12 @@ namespace BLL
|
||||
try
|
||||
{
|
||||
temeplateDtoIns = MiniExcel.Query<Tw_InputDataIn>(path, startCell: "A1").ToList();
|
||||
foreach (var item in temeplateDtoIns)
|
||||
{
|
||||
item.MaterialCode = item.MaterialCode.Trim();
|
||||
item.HeatNo = item.HeatNo.Trim();
|
||||
item.BatchNo = item.BatchNo.Trim();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -621,12 +627,12 @@ namespace BLL
|
||||
|
||||
private static string CleanImportText(string value)
|
||||
{
|
||||
return Convert.ToString(value).Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "").Trim();
|
||||
return (value ?? string.Empty).Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", "").Trim();
|
||||
}
|
||||
|
||||
private static string CleanImportDateText(string value)
|
||||
{
|
||||
return Convert.ToString(value).Replace("\n", "").Replace("\t", " ").Replace("\r", "").Trim();
|
||||
return (value ?? string.Empty).Replace("\n", "").Replace("\t", " ").Replace("\r", "").Trim();
|
||||
}
|
||||
|
||||
private static bool TryParseImportDate(string value, out DateTime date)
|
||||
|
||||
@@ -50,7 +50,9 @@ namespace BLL
|
||||
BatchNo = mat.BatchNo,
|
||||
MaterialName = mat.MaterialName,
|
||||
MaterialDef = mat.MaterialDef,
|
||||
BarCode = x.BarCode
|
||||
MaterialSpec = mat.MaterialSpec,
|
||||
MaterialUnit = mat.MaterialUnit,
|
||||
BarCode = x.MaterialCode
|
||||
};
|
||||
|
||||
return q.ToList();
|
||||
@@ -119,7 +121,7 @@ namespace BLL
|
||||
/// </summary>
|
||||
public static string BuildBarCode(Tw_InputMaster inputMaster, Tw_InputDetail inputDetail, string barCodeDetailId)
|
||||
{
|
||||
return "IB" + barCodeDetailId.Replace("-", string.Empty).ToUpperInvariant();
|
||||
return inputDetail == null ? string.Empty : inputDetail.MaterialCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user