Compare commits
	
		
			2 Commits 
		
	
	
		
			9b881fa370
			...
			73603777d2
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								
								 | 
						73603777d2 | |
| 
							
							
								
								 | 
						f37338d40a | 
| 
						 | 
				
			
			@ -50,11 +50,96 @@ public class Materials  : EntityTenant
 | 
			
		|||
    [Required]
 | 
			
		||||
    [SugarColumn(ColumnName = "IsEnable", ColumnDescription = "可用状态")]
 | 
			
		||||
    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>
 | 
			
		||||
    [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 32)]
 | 
			
		||||
    public string? Remarks { get; set; }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,7 +98,6 @@ public class SysUnitService : IDynamicApiController, ITransient
 | 
			
		|||
    /// <summary>
 | 
			
		||||
    /// 获取单位列表
 | 
			
		||||
    /// </summary>
 | 
			
		||||
    /// <param name="input"></param>
 | 
			
		||||
    /// <returns></returns>
 | 
			
		||||
    [HttpGet]
 | 
			
		||||
    [ApiDescriptionSettings(Name = "List")]
 | 
			
		||||
| 
						 | 
				
			
			@ -107,7 +106,17 @@ public class SysUnitService : IDynamicApiController, ITransient
 | 
			
		|||
        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();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue