| | |
| | | using System.Linq.Expressions; |
| | | //using System.Linq.Expressions; |
| | | |
| | | namespace CMS.Plugin.HIAWms.Domain.WmsMaterials |
| | | { |
| | | /// <summary> |
| | | /// WmsMaterial瑙勭害 |
| | | /// </summary> |
| | | public class WmsMaterialSpecification : Volo.Abp.Specifications.Specification<WmsMaterial> |
| | | { |
| | | private readonly string _materialCode; |
| | | //namespace CMS.Plugin.HIAWms.Domain.WmsMaterials |
| | | //{ |
| | | // /// <summary> |
| | | // /// WmsMaterial瑙勭害 |
| | | // /// </summary> |
| | | // public class WmsMaterialSpecification : Volo.Abp.Specifications.Specification<WmsMaterial> |
| | | // { |
| | | // private readonly string _materialCode; |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialSpecification"/> class. |
| | | /// </summary> |
| | | public WmsMaterialSpecification() |
| | | { |
| | | } |
| | | // /// <summary> |
| | | // /// Initializes a new instance of the <see cref="WmsMaterialSpecification"/> class. |
| | | // /// </summary> |
| | | // public WmsMaterialSpecification() |
| | | // { |
| | | // } |
| | | |
| | | /// <summary> |
| | | /// Initializes a new instance of the <see cref="WmsMaterialSpecification"/> class. |
| | | /// </summary> |
| | | /// <param name="materialCode">The name.</param> |
| | | public WmsMaterialSpecification(string materialCode = null) |
| | | { |
| | | _materialCode = materialCode; |
| | | } |
| | | // /// <summary> |
| | | // /// Initializes a new instance of the <see cref="WmsMaterialSpecification"/> class. |
| | | // /// </summary> |
| | | // /// <param name="materialCode">The name.</param> |
| | | // public WmsMaterialSpecification(string materialCode = null) |
| | | // { |
| | | // _materialCode = materialCode; |
| | | // } |
| | | |
| | | /// <inheritdoc /> |
| | | public override Expression<Func<WmsMaterial, bool>> ToExpression() |
| | | { |
| | | Expression<Func<WmsMaterial, bool>> expression = c => 1 == 1; |
| | | // /// <inheritdoc /> |
| | | // public override Expression<Func<WmsMaterial, bool>> ToExpression() |
| | | // { |
| | | // Expression<Func<WmsMaterial, bool>> expression = c => 1 == 1; |
| | | |
| | | if (_materialCode != null) |
| | | { |
| | | expression = expression.And(c => c.MaterialCode == _materialCode); |
| | | } |
| | | // if (_materialCode != null) |
| | | // { |
| | | // expression = expression.And(c => c.MaterialCode == _materialCode); |
| | | // } |
| | | |
| | | return expression; |
| | | } |
| | | } |
| | | } |
| | | // return expression; |
| | | // } |
| | | // } |
| | | //} |