using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEA_DTO.Basic { public class MaterialWithUnits { public string MaterialCode { get; set; } public string IssueUnit { get; set; } public string PurchaseUnit { get; set; } public string StockUnit { get; set; } public List UnitConversions { get; set; } = new List(); } public class UnitConversion { public string FromUom { get; set; } public string ToUom { get; set; } public decimal Ratio { get; set; } } public class MaterialWithUnitConversionResult { public decimal Quantity { get; set; } public string Unit { get; set; } public bool Converted { get; set; } // 标记是否实际进行了转换 public MaterialWithUnitConversionResult(decimal quantity, string unit, bool converted = true) { Quantity = quantity; Unit = unit; Converted = converted; } public override string ToString() { return $"{Quantity} {Unit}"; } } public class BatchConversionRequest { public string RequestId { get; set; } public string MaterialCode { get; set; } public decimal Quantity { get; set; } public string FromUnit { get; set; } public string ToUnit { get; set; } } }