|
|
|
@ -684,5 +684,48 @@ namespace Admin.Core.Service
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 小料上位机同步插入物料信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="planDate"></param>
|
|
|
|
|
/// <param name="recipeGUID"></param>
|
|
|
|
|
/// <param name="batch"></param>
|
|
|
|
|
/// <param name="productName"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public async Task<bool> xlInsertMaterial(string ID, string materialCode, string materialName, DateTime CreateDateTime)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
xl_material xl_m = new xl_material()
|
|
|
|
|
{
|
|
|
|
|
ID = ID,
|
|
|
|
|
Material_code = materialCode,
|
|
|
|
|
Material_name = materialName,
|
|
|
|
|
CreateDateTime = CreateDateTime,
|
|
|
|
|
Remark = null,
|
|
|
|
|
Batch_number = null,
|
|
|
|
|
Barcode1 = null,
|
|
|
|
|
Barcode2 = null,
|
|
|
|
|
Barcode3 = null,
|
|
|
|
|
IsEnable = "是"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var result = await _xl_materialRepository.Add(xl_m);
|
|
|
|
|
if (result == 1)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|