Compare commits

..

No commits in common. "73603777d2367e9560c122e58e8ae91da56043c5" and "9b881fa370010edf9fbc3cb5827e419d51fb6669" have entirely different histories.

2 changed files with 3 additions and 97 deletions

View File

@ -51,95 +51,10 @@ public class Materials : EntityTenant
[SugarColumn(ColumnName = "IsEnable", ColumnDescription = "可用状态")] [SugarColumn(ColumnName = "IsEnable", ColumnDescription = "可用状态")]
public bool IsEnable { get; set; } public bool IsEnable { get; set; }
/// <summary>
/// 品牌
/// </summary>
[SugarColumn(ColumnName = "Brand", ColumnDescription = "品牌", Length = 32)]
public string? Brand { get; set; }
/// <summary>
/// 保质期
/// </summary>
[SugarColumn(ColumnName = "ShelfLife", ColumnDescription = "保质期", Length = 32)]
public int? ShelfLife { get; set; }
/// <summary>
/// 保质期单位
/// </summary>
[SugarColumn(ColumnName = "ShelfLifeUnit", ColumnDescription = "保质期单位", Length = 32)]
public string? ShelfLifeUnit { get; set; }
/// <summary>
/// 统一零售价
/// </summary>
[SugarColumn(ColumnName = "Price", ColumnDescription = "统一零售价")]
public decimal? Price { get; set; }
/// <summary>
/// 条形码
/// </summary>
[SugarColumn(ColumnName = "BarCode", ColumnDescription = "条形码", Length = 32)]
public string? BarCode { get; set; }
/// <summary>
/// 单位组ID
/// </summary>
[SugarColumn(ColumnName = "UnitGroupId", ColumnDescription = "单位组ID")]
public long? UnitGroupId { get; set; }
/// <summary>
/// 基本单位
/// </summary>
[SugarColumn(ColumnName = "Unit", ColumnDescription = "基本单位", Length = 32)]
public string? Unit { get; set; }
/// <summary>
/// 生产单位
/// </summary>
[SugarColumn(ColumnName = "ProductUnit", ColumnDescription = "生产单位", Length = 32)]
public string? ProductUnit { get; set; }
/// <summary>
/// 采购单位
/// </summary>
[SugarColumn(ColumnName = "ProcureUnit", ColumnDescription = "采购单位", Length = 32)]
public string? ProcureUnit { get; set; }
/// <summary>
/// 库存单位
/// </summary>
[SugarColumn(ColumnName = "InventoryUnit", ColumnDescription = "库存单位", Length = 32)]
public string? InventoryUnit { get; set; }
/// <summary>
/// 销售单位
/// </summary>
[SugarColumn(ColumnName = "SaleUnit", ColumnDescription = "销售单位", Length = 32)]
public string? SaleUnit { get; set; }
/// <summary>
/// 分销单位
/// </summary>
[SugarColumn(ColumnName = "RetailStoreUnit", ColumnDescription = "分销单位", Length = 32)]
public string? RetailStoreUnit { get; set; }
/// <summary>
/// 包装关系ID
/// </summary>
[SugarColumn(ColumnName = "PackagId", ColumnDescription = "包装关系ID")]
public long? PackagId { get; set; }
/// <summary>
/// 推广ID
/// </summary>
[SugarColumn(ColumnName = "PromotionId", ColumnDescription = "推广ID")]
public long? PromotionId { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
/// </summary> /// </summary>
[SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)] [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)]
public string? Remarks { get; set; } public string? Remarks { get; set; }
} }

View File

@ -98,6 +98,7 @@ public class SysUnitService : IDynamicApiController, ITransient
/// <summary> /// <summary>
/// 获取单位列表 /// 获取单位列表
/// </summary> /// </summary>
/// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
[HttpGet] [HttpGet]
[ApiDescriptionSettings(Name = "List")] [ApiDescriptionSettings(Name = "List")]
@ -106,17 +107,7 @@ public class SysUnitService : IDynamicApiController, ITransient
return await _rep.AsQueryable().Select<SysUnitOutput>().ToListAsync(); return await _rep.AsQueryable().Select<SysUnitOutput>().ToListAsync();
} }
/// <summary>
/// 获取单位列表
/// </summary>
/// <param name="unitGroupId"></param>
/// <returns></returns>
[HttpGet]
[ApiDescriptionSettings(Name = "List")]
public async Task<List<SysUnitOutput>> ListByGroupId(long unitGroupId)
{
return await _rep.AsQueryable().WhereIF(unitGroupId > 0, u => u.GroupUnitId == unitGroupId).Select<SysUnitOutput>().ToListAsync();
}