307 changed files with 10033 additions and 7943 deletions
@ -0,0 +1,8 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBase.CreateUpdateBaseDto; |
||||
|
|
||||
|
public class CreateUpdateBaseDto : EntityDto<Guid> |
||||
|
{ |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase.Filters; |
||||
|
|
||||
|
public class Condition |
||||
|
{ |
||||
|
public ICollection<Filter> Filters { get; set; } = new List<Filter>(); |
||||
|
} |
@ -0,0 +1,62 @@ |
|||||
|
using System.ComponentModel; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBase.Filters; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 过滤条件
|
||||
|
/// </summary>
|
||||
|
public enum EnumFilterAction |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// equal
|
||||
|
/// </summary>
|
||||
|
[Description("等于")] Equal = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Not equal
|
||||
|
/// </summary>
|
||||
|
[Description("不等于")] NotEqual = 1, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Bigger
|
||||
|
/// </summary>
|
||||
|
[Description("大于")] BiggerThan = 2, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Smaller
|
||||
|
/// </summary>
|
||||
|
[Description("小于")] SmallThan = 3, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Bigger or equal
|
||||
|
/// </summary>
|
||||
|
[Description("大于等于")] BiggerThanOrEqual = 4, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Small or equal
|
||||
|
/// </summary>
|
||||
|
[Description("小于等于")] SmallThanOrEqual = 5, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Like
|
||||
|
/// </summary>
|
||||
|
[Description("类似于")] Like = 6, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Not like
|
||||
|
/// </summary>
|
||||
|
[Description("不类似于")] NotLike = 7, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Contained in
|
||||
|
/// List<string > items = new List<string>();
|
||||
|
/// string value = JsonSerializer.Serialize(items);//转成Json字符串
|
||||
|
/// FilterCondition filterCondition = new FilterCondition() { Column = "Name", Value = value, Action = EnumFilterAction.In, Logic = EnumFilterLogic.And };
|
||||
|
/// </summary>
|
||||
|
[Description("包含于")] In = 8, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Not contained in
|
||||
|
/// </summary>
|
||||
|
[Description("不包含于")] NotIn = 9, |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
namespace WinIn.FasterZ.Wms.AppBase.Filters; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 过滤逻辑
|
||||
|
/// </summary>
|
||||
|
public enum EnumFilterLogic |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 与
|
||||
|
/// </summary>
|
||||
|
And = 0, |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 或
|
||||
|
/// </summary>
|
||||
|
Or = 1 |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
namespace WinIn.FasterZ.Wms.AppBase.Filters; |
||||
|
|
||||
|
public class Filter |
||||
|
{ |
||||
|
public Filter() |
||||
|
{ |
||||
|
Logic = "And"; |
||||
|
} |
||||
|
|
||||
|
public Filter(string column, string value, |
||||
|
string action = "==", |
||||
|
string logic = "And") |
||||
|
{ |
||||
|
Column = column; |
||||
|
Action = action; |
||||
|
Value = value; |
||||
|
Logic = logic; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 过滤条件之间的逻辑关系:AND和OR
|
||||
|
/// </summary>
|
||||
|
public string? Logic { get; set; } = "And"; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 过滤条件中使用的数据列
|
||||
|
/// </summary>
|
||||
|
public string? Column { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 过滤条件中的操作:==,!=,>,<,>=,<=,In,NotIn,Like,NotLike
|
||||
|
/// Equal、NotEqual、BiggerThan、SmallThan、BiggerThanOrEqual、SmallThanOrEqual、In、NotIn
|
||||
|
/// </summary>
|
||||
|
public string? Action { get; set; } = "=="; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 过滤条件中的操作的值
|
||||
|
/// </summary>
|
||||
|
public string? Value { get; set; } |
||||
|
} |
@ -0,0 +1,371 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Globalization; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Text.Json; |
||||
|
using Volo.Abp; |
||||
|
using WinIn.FasterZ.Wms.AppBase.Filters; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase.Filters; |
||||
|
|
||||
|
public static class FilterExtensions |
||||
|
{ |
||||
|
public static Expression<Func<T, bool>> ToLambda<T>(this string jsonFilter) |
||||
|
{ |
||||
|
if (string.IsNullOrWhiteSpace(jsonFilter)) |
||||
|
{ |
||||
|
return p => true; |
||||
|
} |
||||
|
|
||||
|
var filterConditions = JsonSerializer.Deserialize<List<Filter>>(jsonFilter); |
||||
|
return filterConditions.ToLambda<T>(); |
||||
|
} |
||||
|
|
||||
|
public static Expression<Func<T, bool>> ToLambda<T>(this Filter filter) |
||||
|
{ |
||||
|
var filterConditions = new List<Filter> { filter }; |
||||
|
return filterConditions.ToLambda<T>(); |
||||
|
} |
||||
|
|
||||
|
public static Expression<Func<T, bool>> ToLambda<T>(this ICollection<Filter> filterConditionList) |
||||
|
{ |
||||
|
Expression<Func<T, bool>> condition = null; |
||||
|
try |
||||
|
{ |
||||
|
if (!filterConditionList.Any()) |
||||
|
{ |
||||
|
//创建默认表达式
|
||||
|
return p => true; |
||||
|
} |
||||
|
|
||||
|
foreach (var filterCondition in filterConditionList) |
||||
|
{ |
||||
|
var tempCondition = CreateLambda<T>(filterCondition); |
||||
|
if (condition == null) |
||||
|
{ |
||||
|
condition = tempCondition; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
condition = filterCondition.Logic switch |
||||
|
{ |
||||
|
"And" => condition.And(tempCondition), |
||||
|
"Or" => condition.Or(tempCondition), |
||||
|
_ => condition |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw new Exception($"获取筛选条件异常:{ex.Message}"); |
||||
|
} |
||||
|
|
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
private static Expression<Func<T, bool>> CreateLambda<T>(Filter filter) |
||||
|
{ |
||||
|
Expression<Func<T, bool>> expression = p => false; |
||||
|
try |
||||
|
{ |
||||
|
var parameter = Expression.Parameter(typeof(T), "p"); //创建参数p
|
||||
|
var member = Expression.PropertyOrField(parameter, filter.Column); //创建表达式中的属性或字段
|
||||
|
|
||||
|
ConstantExpression constant = null; |
||||
|
//var propertyType = member.Type; //取属性类型,常量constant按此类型进行转换
|
||||
|
//constant = Expression.Constant(filterCondition.Value);//创建常数
|
||||
|
|
||||
|
if (filter.Action != "In" && filter.Action != "NotIn") |
||||
|
{ |
||||
|
constant = CreateConstantExpression(member.Type, filter.Value); |
||||
|
} |
||||
|
|
||||
|
switch (filter.Action.ToLower()) |
||||
|
{ |
||||
|
case "==": |
||||
|
expression = Expression.Lambda<Func<T, bool>>(Expression.Equal(member, constant), parameter); |
||||
|
break; |
||||
|
|
||||
|
case "!=": |
||||
|
expression = Expression.Lambda<Func<T, bool>>(Expression.NotEqual(member, constant), parameter); |
||||
|
break; |
||||
|
|
||||
|
case ">": |
||||
|
expression = Expression.Lambda<Func<T, bool>>(Expression.GreaterThan(member, constant), parameter); |
||||
|
break; |
||||
|
|
||||
|
case "<": |
||||
|
expression = Expression.Lambda<Func<T, bool>>(Expression.LessThan(member, constant), parameter); |
||||
|
break; |
||||
|
|
||||
|
case ">=": |
||||
|
expression = |
||||
|
Expression.Lambda<Func<T, bool>>(Expression.GreaterThanOrEqual(member, constant), parameter); |
||||
|
break; |
||||
|
|
||||
|
case "<=": |
||||
|
expression = |
||||
|
Expression.Lambda<Func<T, bool>>(Expression.LessThanOrEqual(member, constant), parameter); |
||||
|
break; |
||||
|
|
||||
|
case "like": |
||||
|
expression = GetExpressionLikeMethod<T>("Contains", filter); |
||||
|
break; |
||||
|
|
||||
|
case "notlike": |
||||
|
expression = GetExpressionNotLikeMethod<T>("Contains", filter); |
||||
|
break; |
||||
|
|
||||
|
case "in": |
||||
|
expression = GetExpressionInMethod<T>("Contains", member.Type, filter); |
||||
|
break; |
||||
|
|
||||
|
case "notin": |
||||
|
expression = GetExpressionNotInMethod<T>("Contains", member.Type, filter); |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw new UserFriendlyException(ex.Message); |
||||
|
} |
||||
|
|
||||
|
return expression; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// </summary>
|
||||
|
/// <param name="propertyType"></param>
|
||||
|
/// <param name="value"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static ConstantExpression CreateConstantExpression(Type propertyType, string value) |
||||
|
{ |
||||
|
ConstantExpression constant = null; |
||||
|
try |
||||
|
{ |
||||
|
if (propertyType.IsGenericType && |
||||
|
propertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) |
||||
|
{ |
||||
|
|
||||
|
var objValue = Convert.ChangeType(ChangeTypeReturnValue(value, propertyType.GetGenericArguments()[0]), |
||||
|
propertyType.GetGenericArguments()[0], |
||||
|
CultureInfo.InvariantCulture); |
||||
|
|
||||
|
constant = Expression.Constant(objValue, propertyType); |
||||
|
} |
||||
|
else if (propertyType.IsEnum) |
||||
|
{ |
||||
|
var enumValue = (Enum)Enum.Parse(propertyType, value, true); |
||||
|
constant = Expression.Constant(enumValue, propertyType); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
constant = propertyType.Name switch |
||||
|
{ |
||||
|
"Guid" => Expression.Constant(Guid.Parse(value)), |
||||
|
_ => Expression.Constant(Convert.ChangeType(value, propertyType, CultureInfo.InvariantCulture)) |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw new Exception($"获取ConstantExpression异常:{ex.Message}"); |
||||
|
} |
||||
|
|
||||
|
return constant; |
||||
|
} |
||||
|
|
||||
|
private static Expression<Func<T, bool>> GetExpressionLikeMethod<T>(string methodName, Filter filter) |
||||
|
{ |
||||
|
var parameterExpression = Expression.Parameter(typeof(T), "p"); |
||||
|
// MethodCallExpression methodExpression = GetMethodExpression(methodName, filterCondition.Column, filterCondition.Value, parameterExpression);
|
||||
|
var methodExpression = GetMethodExpression(methodName, filter.Column, filter.Value, |
||||
|
parameterExpression); |
||||
|
return Expression.Lambda<Func<T, bool>>(methodExpression, parameterExpression); |
||||
|
} |
||||
|
|
||||
|
private static Expression<Func<T, bool>> GetExpressionNotLikeMethod<T>(string methodName, Filter filter) |
||||
|
{ |
||||
|
var parameterExpression = Expression.Parameter(typeof(T), "p"); |
||||
|
var methodExpression = GetMethodExpression(methodName, filter.Column, filter.Value, |
||||
|
parameterExpression); |
||||
|
var notMethodExpression = Expression.Not(methodExpression); |
||||
|
return Expression.Lambda<Func<T, bool>>(notMethodExpression, parameterExpression); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生成guidList.Contains(p=>p.GUId);
|
||||
|
/// 除String类型,其他类型涉及到类型转换.如GUID
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <param name="methodName">Contains</param>
|
||||
|
/// <param name="propertyType">PropertyType/typeof(GUId)</param>
|
||||
|
/// <param name="filter">PropertyName/PropertyValue</param>
|
||||
|
/// <returns></returns>
|
||||
|
private static Expression<Func<T, bool>> GetExpressionInMethod<T>(string methodName, Type propertyType, |
||||
|
Filter filter) |
||||
|
{ |
||||
|
var parameterExpression = Expression.Parameter(typeof(T), "p"); |
||||
|
var lstType = typeof(List<>).MakeGenericType(propertyType); |
||||
|
|
||||
|
//转换枚举
|
||||
|
//if (propertyType.IsEnum)
|
||||
|
//{
|
||||
|
// var valueArrayStrings = JsonSerializer.Deserialize<List<string>>(filter.Value);
|
||||
|
// List<object> newValues = new List<object>();
|
||||
|
|
||||
|
// var enumValues = propertyType.GetEnumValues();
|
||||
|
|
||||
|
// foreach (var valueArray in valueArrayStrings)
|
||||
|
// {
|
||||
|
// foreach (var enumValue in enumValues)
|
||||
|
// {
|
||||
|
// if (enumValue.ToString() == valueArray)
|
||||
|
// {
|
||||
|
// newValues.Add(enumValue);
|
||||
|
// break;
|
||||
|
// }
|
||||
|
// }
|
||||
|
// }
|
||||
|
// var newValue = JsonSerializer.Serialize(newValues);
|
||||
|
// filter.Value = newValue;
|
||||
|
//}
|
||||
|
|
||||
|
var propertyValue = JsonSerializer.Deserialize($"{filter.Value}", lstType); |
||||
|
if (propertyValue != null) |
||||
|
{ |
||||
|
var methodExpression = GetListMethodExpression(methodName, propertyType, filter.Column, propertyValue, |
||||
|
parameterExpression); |
||||
|
var expression = Expression.Lambda<Func<T, bool>>(methodExpression, parameterExpression); |
||||
|
return expression; |
||||
|
} |
||||
|
|
||||
|
return p => false; |
||||
|
} |
||||
|
|
||||
|
private static Expression<Func<T, bool>> GetExpressionNotInMethod<T>(string methodName, Type propertyType, |
||||
|
Filter filter) |
||||
|
{ |
||||
|
var parameterExpression = Expression.Parameter(typeof(T), "p"); |
||||
|
var lstType = typeof(List<>).MakeGenericType(propertyType); |
||||
|
var propertyValue = JsonSerializer.Deserialize(filter.Value, lstType); |
||||
|
if (propertyValue != null) |
||||
|
{ |
||||
|
var methodExpression = GetListMethodExpression(methodName, propertyType, filter.Column, propertyValue, |
||||
|
parameterExpression); |
||||
|
var notMethodExpression = Expression.Not(methodExpression); |
||||
|
return Expression.Lambda<Func<T, bool>>(notMethodExpression, parameterExpression); |
||||
|
} |
||||
|
|
||||
|
return p => false; |
||||
|
} |
||||
|
|
||||
|
private static MethodCallExpression GetListMethodExpression(string methodName, Type propertyType, |
||||
|
string propertyName, object propertyValue, ParameterExpression parameterExpression) |
||||
|
{ |
||||
|
var propertyExpression = Expression.Property(parameterExpression, propertyName); //p.GUID
|
||||
|
var type = typeof(List<>).MakeGenericType(propertyType); |
||||
|
var method = type.GetMethod(methodName); //获取 List.Contains()
|
||||
|
var someValue = Expression.Constant(propertyValue); //Value
|
||||
|
return Expression.Call(someValue, method, propertyExpression); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 生成类似于p=>p.Code.Contains("xxx");的lambda表达式
|
||||
|
/// parameterExpression标识p,propertyName表示values,propertyValue表示"Code",methodName表示Contains
|
||||
|
/// 仅处理p的属性类型为string这种情况
|
||||
|
/// </summary>
|
||||
|
/// <param name="methodName"></param>
|
||||
|
/// <param name="propertyName"></param>
|
||||
|
/// <param name="propertyValue"></param>
|
||||
|
/// <param name="parameterExpression"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static MethodCallExpression GetMethodExpression(string methodName, string propertyName, |
||||
|
string propertyValue, ParameterExpression parameterExpression) |
||||
|
{ |
||||
|
var propertyExpression = Expression.Property(parameterExpression, propertyName); |
||||
|
var method = typeof(string).GetMethod(methodName, new[] { typeof(string) }); |
||||
|
var someValue = Expression.Constant(propertyValue, typeof(string)); |
||||
|
return Expression.Call(propertyExpression, method, someValue); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 默认True条件
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <returns></returns>
|
||||
|
public static Expression<Func<T, bool>> True<T>() |
||||
|
{ |
||||
|
return f => true; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 默认False条件
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <returns></returns>
|
||||
|
public static Expression<Func<T, bool>> False<T>() |
||||
|
{ |
||||
|
return f => false; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 拼接 OR 条件
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <param name="exp"></param>
|
||||
|
/// <param name="condition"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static Expression<Func<T, bool>> Or<T>(this Expression<Func<T, bool>> exp, |
||||
|
Expression<Func<T, bool>> condition) |
||||
|
{ |
||||
|
var inv = Expression.Invoke(condition, exp.Parameters); |
||||
|
return Expression.Lambda<Func<T, bool>>(Expression.Or(exp.Body, inv), exp.Parameters); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 拼接And条件
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <param name="exp"></param>
|
||||
|
/// <param name="condition"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static Expression<Func<T, bool>> And<T>(this Expression<Func<T, bool>> exp, |
||||
|
Expression<Func<T, bool>> condition) |
||||
|
{ |
||||
|
var inv = Expression.Invoke(condition, exp.Parameters); |
||||
|
return Expression.Lambda<Func<T, bool>>(Expression.And(exp.Body, inv), exp.Parameters); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 转换传入的值,并将正确的值传出(解决 enum,guid)
|
||||
|
/// </summary>
|
||||
|
/// <param name="value"></param>
|
||||
|
/// <param name="type"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static object ChangeTypeReturnValue(object value, Type type) |
||||
|
{ |
||||
|
if (value == null && type.IsGenericType) return Activator.CreateInstance(type); |
||||
|
if (value == null) return null; |
||||
|
if (type == value.GetType()) return value; |
||||
|
if (type.IsEnum) |
||||
|
{ |
||||
|
if (value is string) |
||||
|
return Enum.Parse(type, value as string); |
||||
|
else |
||||
|
return Enum.ToObject(type, value); |
||||
|
} |
||||
|
if (!type.IsInterface && type.IsGenericType) |
||||
|
{ |
||||
|
Type innerType = type.GetGenericArguments()[0]; |
||||
|
object innerValue = ChangeTypeReturnValue(value, innerType); |
||||
|
return Activator.CreateInstance(type, new object[] { innerValue }); |
||||
|
} |
||||
|
if (value is string && type == typeof(Guid)) return new Guid(value as string); |
||||
|
if (value is string && type == typeof(Version)) return new Version(value as string); |
||||
|
if (!(value is IConvertible)) return value; |
||||
|
return Convert.ChangeType(value, type); |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using WinIn.FasterZ.Store.AppBase.Filters; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase; |
||||
|
|
||||
|
public interface ISfsRequest : IPagedAndSortedResultRequest |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 条件
|
||||
|
/// </summary>
|
||||
|
public Condition Condition { get; set; } |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
using System; |
||||
|
using System.Threading; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase |
||||
|
{ |
||||
|
public interface IZbxBase<TEntity, TEntityDto, TPagedAndSortedResultRequestDto, TKey, TCreateInput, TUpdateInput> |
||||
|
{ |
||||
|
Task<PagedResultDto<TEntityDto>> GetPageListByFilterAsync(SfsRequestInputBase sfsRequestInputBase, |
||||
|
bool includeDetails = false, CancellationToken cancellationToken = default); |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【导出Excel】【有筛选条件】
|
||||
|
/// </summary>
|
||||
|
/// <param name="sfsRequestInputBase">查询条件</param>
|
||||
|
/// <param name="isRedundance">是否冗余主表数据</param>
|
||||
|
/// <param name="isDetailExport">是否导出子表</param>
|
||||
|
/// <param name="userId">用户ID</param>
|
||||
|
/// <returns></returns>
|
||||
|
Task<IActionResult> ExportToExcelAsync(SfsRequestInputBase sfsRequestInputBase,bool isRedundance, Guid userId,bool isDetailExport = true); |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using WinIn.FasterZ.Store.AppBase.Filters; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase; |
||||
|
|
||||
|
public class SfsRequestInputBase : PagedAndSortedResultRequestDto, ISfsRequest |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 条件
|
||||
|
/// </summary>
|
||||
|
public Condition Condition { get; set; } = new(); |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
using System.Collections.Generic; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase.TableColumnTypeDto |
||||
|
{ |
||||
|
public class AllTableColumnTypeDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 列属性类别
|
||||
|
/// </summary>
|
||||
|
public List<ColumnType> ColumnsTypes { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// C R U S G
|
||||
|
/// </summary>
|
||||
|
public string DtoType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// Dto名称
|
||||
|
/// </summary>
|
||||
|
public string? DtoName { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase.TableColumnTypeDto |
||||
|
{ |
||||
|
public class ColumnType |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "列名")] |
||||
|
public string Z_ColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 后端类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "后端类型")] |
||||
|
public string Z_ColumnType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 基础类型
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "基础类型")] |
||||
|
public string Z_ColumnBaseType { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 是否是枚举
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "是否是枚举")] |
||||
|
public bool IsEnum { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,33 @@ |
|||||
|
using System; |
||||
|
using WinIn.FasterZ.Store.Enums; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
|
||||
|
[Serializable] |
||||
|
public class CreateUpdateExportCustomUserSettingDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
public Guid? ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
public string? ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
public string? ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
public string? ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; } |
||||
|
} |
@ -0,0 +1,38 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using WinIn.FasterZ.Store.Enums; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
[Serializable] |
||||
|
public class ExportCustomUserSettingDto : AuditedEntityDto<Guid> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
public Guid? ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
public string? ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
public string? ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
public string? ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,36 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using WinIn.FasterZ.Store.Enums; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos |
||||
|
{ |
||||
|
[Serializable] |
||||
|
public class ExportCustomUserSettingGetListInput : PagedAndSortedResultRequestDto |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
public Guid? ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
public string? ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
public string? ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
public string? ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
public Enum_ExportCustomUserSetting? CustomUserSetting { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,26 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public interface IExportCustomUserSettingAppService : |
||||
|
ICrudAppService< |
||||
|
ExportCustomUserSettingDto, |
||||
|
Guid, |
||||
|
ExportCustomUserSettingGetListInput, |
||||
|
CreateUpdateExportCustomUserSettingDto, |
||||
|
CreateUpdateExportCustomUserSettingDto> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 根据用户和表名获取个性化导出
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
Task<List<ExportCustomUserSettingDto>> GetByUserIdAndExportTableNameAsync(Guid userId, string exportTableName); |
||||
|
} |
||||
|
} |
@ -1,16 +1,25 @@ |
|||||
namespace WinIn.FasterZ.Wms.Permissions; |
namespace WinIn.FasterZ.Wms.Permissions |
||||
|
|
||||
public static class WmsPermissions |
|
||||
{ |
{ |
||||
public const string GroupName = "Wms"; |
public static class WmsPermissions |
||||
|
|
||||
//Add your own permission names. Example:
|
|
||||
//public const string MyPermission1 = GroupName + ".MyPermission1";
|
|
||||
public class AuthDepartment |
|
||||
{ |
{ |
||||
public const string Default = GroupName + ".AuthDepartment"; |
public const string GroupName = "Wms"; |
||||
public const string Update = Default + ".Update"; |
|
||||
public const string Create = Default + ".Create"; |
//Add your own permission names. Example:
|
||||
public const string Delete = Default + ".Delete"; |
//public const string MyPermission1 = GroupName + ".MyPermission1";
|
||||
|
public class AuthDepartment |
||||
|
{ |
||||
|
public const string Default = GroupName + ".AuthDepartment"; |
||||
|
public const string Update = Default + ".Update"; |
||||
|
public const string Create = Default + ".Create"; |
||||
|
public const string Delete = Default + ".Delete"; |
||||
|
} |
||||
|
|
||||
|
public class ExportCustomUserSetting |
||||
|
{ |
||||
|
public const string Default = GroupName + ".ExportCustomUserSetting"; |
||||
|
public const string Update = Default + ".Update"; |
||||
|
public const string Create = Default + ".Create"; |
||||
|
public const string Delete = Default + ".Delete"; |
||||
|
} |
||||
} |
} |
||||
} |
} |
||||
|
@ -1,19 +1,20 @@ |
|||||
using System; |
using System; |
||||
|
|
||||
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos; |
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment.Dtos |
||||
|
|
||||
[Serializable] |
|
||||
public class CreateUpdateAuthDepartmentDto |
|
||||
{ |
{ |
||||
public string Code { get; set; } |
[Serializable] |
||||
|
public class CreateUpdateAuthDepartmentDto |
||||
|
{ |
||||
|
public string Code { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public Guid Id { get; set; } |
public Guid Id { get; set; } |
||||
|
|
||||
public bool? IsActive { get; set; } |
public bool? IsActive { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -0,0 +1,27 @@ |
|||||
|
using System.Linq.Expressions; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBase.Extensions |
||||
|
{ |
||||
|
public static class ExpressionExtensions |
||||
|
{ |
||||
|
public static string GetMemberName(Expression expression) |
||||
|
{ |
||||
|
if (expression is MemberExpression member) |
||||
|
{ |
||||
|
return member.Member.Name; |
||||
|
} |
||||
|
|
||||
|
if (expression is MethodCallExpression method) |
||||
|
{ |
||||
|
return method.Method.Name; |
||||
|
} |
||||
|
|
||||
|
if (expression is UnaryExpression unary) |
||||
|
{ |
||||
|
return GetMemberName(unary); |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Dynamic.Core; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Reflection; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBase.Extensions |
||||
|
{ |
||||
|
public static class ObjectExpressionExtensions |
||||
|
{ |
||||
|
public static IQueryable<TEntity> WhereByKey<TEntity, TModel>(this IQueryable<TEntity> source, TModel model) |
||||
|
{ |
||||
|
if (model == null) |
||||
|
{ |
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
var modelType = model.GetType(); |
||||
|
var properties = modelType.GetProperties().Where(o => o.GetCustomAttribute<KeyAttribute>() != null).ToList(); |
||||
|
if (properties.Any()) |
||||
|
{ |
||||
|
foreach (var property in properties) |
||||
|
{ |
||||
|
var propertyName = property.Name; |
||||
|
var propertyValue = property.GetValue(model, null); |
||||
|
source = source.Where($"{propertyName} == @0", propertyValue); |
||||
|
} |
||||
|
|
||||
|
return source; |
||||
|
} |
||||
|
|
||||
|
return null; |
||||
|
} |
||||
|
|
||||
|
public static List<IGrouping<object, T>> GroupByKey<T>(this IQueryable<T> source) |
||||
|
{ |
||||
|
var properties = typeof(T).GetProperties().Where(o => o.GetCustomAttribute<KeyAttribute>() != null).ToList(); |
||||
|
var names = string.Join(",", properties.Select(o => o.Name)); |
||||
|
return source.AsQueryable().GroupBy($"new ({names})").ToDynamicList<IGrouping<object, T>>(); |
||||
|
} |
||||
|
|
||||
|
public static Expression<Func<TEntity, bool>> GetExpressionByProperty<TEntity>(this Type type, string propertyName, |
||||
|
string propertyValue) |
||||
|
{ |
||||
|
var o = Expression.Parameter(type, "p"); |
||||
|
var memberExpression = Expression.Property(o, propertyName); |
||||
|
var body = Expression.Call(typeof(string).GetMethod("Contains", new[] { typeof(string) }), memberExpression); |
||||
|
var predicate = Expression.Lambda<Func<TEntity, bool>>(body, o); |
||||
|
return predicate; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,119 @@ |
|||||
|
using System; |
||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Reflection; |
||||
|
using Omu.ValueInjecter; |
||||
|
using Omu.ValueInjecter.Injections; |
||||
|
using Volo.Abp; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBase.Extensions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 对象映射
|
||||
|
/// </summary>
|
||||
|
public static class ObjectMapperExtensions |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 从模型更新实体
|
||||
|
/// </summary>
|
||||
|
public static T FromObject<T>(this T to, object from) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
to.InjectFrom<DeepInjectionForUpdate>(from); |
||||
|
return to; |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw new UserFriendlyException($"{from.GetType().FullName}映射到${typeof(T).FullName}时失败:{ex.Message},{ex}"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 从实体创建模型
|
||||
|
/// </summary>
|
||||
|
/// <typeparam name="T"></typeparam>
|
||||
|
/// <param name="from"></param>
|
||||
|
/// <returns></returns>
|
||||
|
public static T ToObject<T>(this object from) |
||||
|
{ |
||||
|
try |
||||
|
{ |
||||
|
if (typeof(T).IsGenericType && typeof(T).IsAssignableTo(typeof(IList)) && from is IList list) |
||||
|
{ |
||||
|
var toListType = typeof(T); |
||||
|
var elementType = typeof(T).GetGenericArguments()[0]; |
||||
|
var toList = (IList)Activator.CreateInstance(typeof(T))!; |
||||
|
var fromList = list; |
||||
|
foreach (var item in fromList) |
||||
|
{ |
||||
|
toList.Add(Activator.CreateInstance(elementType).InjectFrom<DeepInjection>(item)); |
||||
|
} |
||||
|
|
||||
|
return (T)toList; |
||||
|
} |
||||
|
|
||||
|
return (T)Activator.CreateInstance<T>().InjectFrom<DeepInjection>(from); |
||||
|
} |
||||
|
catch (Exception ex) |
||||
|
{ |
||||
|
throw new UserFriendlyException($"{from.GetType().FullName}映射到${typeof(T).FullName}时失败:{ex.Message},{ex}"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private class DeepInjection : LoopInjection |
||||
|
{ |
||||
|
protected override bool MatchTypes(Type sourceType, Type targetType) |
||||
|
{ |
||||
|
if (sourceType != typeof(string) && |
||||
|
targetType != typeof(string) && |
||||
|
sourceType.IsGenericType && |
||||
|
targetType.IsGenericType && |
||||
|
sourceType.IsAssignableTo(typeof(IEnumerable)) && |
||||
|
sourceType.IsAssignableTo(typeof(IEnumerable)) |
||||
|
) |
||||
|
{ |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
return base.MatchTypes(sourceType, targetType); |
||||
|
} |
||||
|
|
||||
|
protected override void SetValue(object source, object target, PropertyInfo sp, PropertyInfo tp) |
||||
|
{ |
||||
|
if (sp.PropertyType != typeof(string) && |
||||
|
sp.PropertyType != typeof(string) && |
||||
|
sp.PropertyType.IsAssignableTo(typeof(IList)) && |
||||
|
tp.PropertyType.IsAssignableTo(typeof(IList))) |
||||
|
{ |
||||
|
var targetGenericType = tp.PropertyType.GetGenericArguments()[0]; |
||||
|
var listType = typeof(List<>).MakeGenericType(targetGenericType); |
||||
|
var addMethod = listType.GetMethod("Add"); |
||||
|
var list = Activator.CreateInstance(listType); |
||||
|
var sourceList = (IList)sp.GetValue(source); |
||||
|
foreach (var item in sourceList) |
||||
|
{ |
||||
|
addMethod.Invoke(list, new[] { Activator.CreateInstance(targetGenericType).FromObject(item) }); |
||||
|
} |
||||
|
|
||||
|
tp.SetValue(target, list); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
base.SetValue(source, target, sp, tp); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
private class DeepInjectionForUpdate : DeepInjection |
||||
|
{ |
||||
|
protected override void SetValue(object source, object target, PropertyInfo sp, PropertyInfo tp) |
||||
|
{ |
||||
|
//if (tp.GetCustomAttribute<IgnoreUpdateAttribute>() != null)
|
||||
|
//{
|
||||
|
// return;
|
||||
|
//}
|
||||
|
base.SetValue(source, target, sp, tp); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
using System; |
||||
|
using System.Security.Cryptography; |
||||
|
using System.Text; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBase.Extensions |
||||
|
{ |
||||
|
public static class StringExtensions |
||||
|
{ |
||||
|
public static string Md5(this string input) |
||||
|
{ |
||||
|
using (var md5 = MD5.Create()) |
||||
|
{ |
||||
|
return BitConverter.ToString(md5.ComputeHash(Encoding.ASCII.GetBytes(input))).Replace("-", ""); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,711 @@ |
|||||
|
using System; |
||||
|
using System.Collections; |
||||
|
using System.Collections.Generic; |
||||
|
using System.IO; |
||||
|
using System.Linq; |
||||
|
using System.Linq.Dynamic.Core; |
||||
|
using System.Linq.Expressions; |
||||
|
using System.Threading; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Authorization; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using Microsoft.EntityFrameworkCore; |
||||
|
using Microsoft.Extensions.Localization; |
||||
|
using NPOI.SS.UserModel; |
||||
|
using NPOI.XSSF.UserModel; |
||||
|
using Volo.Abp.Application.Dtos; |
||||
|
using Volo.Abp.Application.Services; |
||||
|
using Volo.Abp.Domain.Entities; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
using WinIn.FasterZ.Store.AppBase.Filters; |
||||
|
using WinIn.FasterZ.Store.AppBase.TableColumnTypeDto; |
||||
|
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
using WinIn.FasterZ.Store.Enums; |
||||
|
using WinIn.FasterZ.Wms.AppBase.Extensions; |
||||
|
using WinIn.FasterZ.Wms.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBase; |
||||
|
|
||||
|
using WinIn.FasterZ.Wms.Localization; |
||||
|
|
||||
|
public class ZbxBase<TEntity, TEntityDto, TKey, TPagedAndSortedResultRequestDto, TCreateInput, TUpdateInput> : |
||||
|
CrudAppService<TEntity, TEntityDto, TKey, |
||||
|
TPagedAndSortedResultRequestDto, TCreateInput, TUpdateInput>, |
||||
|
IZbxBase<TEntity, TEntityDto, TKey, TPagedAndSortedResultRequestDto, TCreateInput, TUpdateInput> |
||||
|
where TEntity : class, IEntity<TKey> |
||||
|
where TEntityDto : IEntityDto<TKey> |
||||
|
{ |
||||
|
private readonly IRepository<TEntity, TKey> _repository; |
||||
|
|
||||
|
public ZbxBase(IRepository<TEntity, TKey> repository) : base(repository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
} |
||||
|
|
||||
|
protected IStringLocalizer<WmsResource> Localizer => |
||||
|
LazyServiceProvider.LazyGetRequiredService<IStringLocalizer<WmsResource>>(); |
||||
|
|
||||
|
protected ExportCustomUserSettingAppService ExportCustomUserSettingAppService => |
||||
|
LazyServiceProvider.LazyGetRequiredService<ExportCustomUserSettingAppService>(); |
||||
|
|
||||
|
#region 公开接口
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【分页查询】【有筛选条件】
|
||||
|
/// </summary>
|
||||
|
/// <param name="sfsRequestInputBase"></param>
|
||||
|
/// <param name="includeDetails"></param>
|
||||
|
/// <param name="cancellationToken"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("api/[controller]/base/get-list-page-by-filter")]
|
||||
|
[Authorize] |
||||
|
public async Task<PagedResultDto<TEntityDto>> GetPageListByFilterAsync(SfsRequestInputBase sfsRequestInputBase, |
||||
|
bool includeDetails = false, CancellationToken cancellationToken = default) |
||||
|
{ |
||||
|
await CheckGetListPolicyAsync(); |
||||
|
|
||||
|
var expression = sfsRequestInputBase.Condition.Filters?.Count > 0 |
||||
|
? sfsRequestInputBase.Condition.Filters.ToLambda<TEntity>() |
||||
|
: p => true; |
||||
|
|
||||
|
var resultEntities = await GetQueryListAsync(expression, sfsRequestInputBase.SkipCount, |
||||
|
sfsRequestInputBase.MaxResultCount, |
||||
|
sfsRequestInputBase.Sorting, includeDetails, cancellationToken); |
||||
|
|
||||
|
var resultDtos = ObjectMapper.Map<List<TEntity>, List<TEntityDto>>(resultEntities); |
||||
|
|
||||
|
//获取总数
|
||||
|
var totalCount = await GetCountAsync(expression, cancellationToken); |
||||
|
|
||||
|
return new PagedResultDto<TEntityDto>(totalCount, resultDtos); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【新增】
|
||||
|
/// </summary>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("api/[controller]/base/create")]
|
||||
|
public override async Task<TEntityDto> CreateAsync(TCreateInput input) |
||||
|
{ |
||||
|
await CheckCreatePolicyAsync(); |
||||
|
|
||||
|
var entity = input!.ToObject<TEntity>(); |
||||
|
|
||||
|
//判断id是否是00000-0000 如果是则赋值
|
||||
|
var mainId = (Guid)entity.GetType().GetProperty("Id")?.GetValue(entity)!; |
||||
|
if (mainId == Guid.Empty) |
||||
|
{ |
||||
|
mainId = Guid.NewGuid(); |
||||
|
entity.GetType().GetProperty("Id")?.SetValue(entity, mainId); |
||||
|
} |
||||
|
|
||||
|
#region 给所有字表的 Id和MasterId赋值 否则默认的会是000000-000-....的id 插入时会报错
|
||||
|
|
||||
|
var propertyInfos = entity.GetType().GetProperties(); |
||||
|
foreach (var propertyInfo in propertyInfos) |
||||
|
{ |
||||
|
//判断是否是List集合
|
||||
|
if (propertyInfo.Name == "Details" |
||||
|
&& propertyInfo.PropertyType.IsGenericType |
||||
|
&& propertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(List<>)) |
||||
|
{ |
||||
|
var listProperty = typeof(TEntity).GetProperty("Details"); |
||||
|
|
||||
|
// 获取 List 的元素类型
|
||||
|
if (listProperty != null) |
||||
|
{ |
||||
|
var listItemType = listProperty.PropertyType.GetGenericArguments()[0]; |
||||
|
|
||||
|
// 获取元素类型的 ID 属性
|
||||
|
var detailIdProperty = listItemType.GetProperty("Id"); |
||||
|
var masterIdProperty = listItemType.GetProperty("MasterId"); |
||||
|
|
||||
|
if (detailIdProperty != null) |
||||
|
{ |
||||
|
// 获取 List 属性的值
|
||||
|
var list = (IList)listProperty.GetValue(entity); |
||||
|
|
||||
|
// 遍历 List 集合中的每个元素,给 ID 属性赋值
|
||||
|
if (list != null) |
||||
|
{ |
||||
|
foreach (var item in list) |
||||
|
{ |
||||
|
if ((Guid)detailIdProperty.GetValue(item)! == Guid.Empty) |
||||
|
{ |
||||
|
detailIdProperty.SetValue(item, Guid.NewGuid()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (masterIdProperty != null) |
||||
|
{ |
||||
|
// 获取 List 属性的值
|
||||
|
var list = (IList)listProperty.GetValue(entity); |
||||
|
|
||||
|
// 遍历 List 集合中的每个元素,给 ID 属性赋值
|
||||
|
if (list != null) |
||||
|
{ |
||||
|
foreach (var item in list) |
||||
|
{ |
||||
|
masterIdProperty.SetValue(item, mainId); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
TryToSetTenantId(entity); |
||||
|
await Repository.InsertAsync(entity, true); |
||||
|
return await MapToGetOutputDtoAsync(entity); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【删除】
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpDelete("api/[controller]/base/delete-by-id")]
|
||||
|
public override async Task DeleteAsync(TKey id) |
||||
|
{ |
||||
|
await base.DeleteAsync(id); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【修改】
|
||||
|
/// </summary>
|
||||
|
/// <param name="id"></param>
|
||||
|
/// <param name="input"></param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPut("api/[controller]/base/update-by-id")]
|
||||
|
public override async Task<TEntityDto> UpdateAsync(TKey id, TUpdateInput input) |
||||
|
{ |
||||
|
//return base.UpdateAsync(id, input);
|
||||
|
|
||||
|
await CheckUpdatePolicyAsync().ConfigureAwait(false); |
||||
|
var entity = await GetEntityByIdAsync(id).ConfigureAwait(false); |
||||
|
entity.FromObject(input!); |
||||
|
|
||||
|
#region 给所有字表的 Id和MasterId赋值 否则默认的会是000000-000-....的id 插入时会报错
|
||||
|
|
||||
|
var propertyInfos = entity.GetType().GetProperties(); |
||||
|
foreach (var propertyInfo in propertyInfos) |
||||
|
{ |
||||
|
//判断是否是List集合
|
||||
|
if (propertyInfo.Name == "Details" |
||||
|
&& propertyInfo.PropertyType.IsGenericType |
||||
|
&& propertyInfo.PropertyType.GetGenericTypeDefinition() == typeof(List<>)) |
||||
|
{ |
||||
|
var listProperty = typeof(TEntity).GetProperty("Details"); |
||||
|
|
||||
|
// 获取 List 的元素类型
|
||||
|
if (listProperty != null) |
||||
|
{ |
||||
|
var listItemType = listProperty.PropertyType.GetGenericArguments()[0]; |
||||
|
|
||||
|
// 获取元素类型的 ID 属性
|
||||
|
var detailIdProperty = listItemType.GetProperty("Id"); |
||||
|
var masterIdProperty = listItemType.GetProperty("MasterId"); |
||||
|
|
||||
|
if (detailIdProperty != null) |
||||
|
{ |
||||
|
// 获取 List 属性的值
|
||||
|
var list = (IList)listProperty.GetValue(entity); |
||||
|
|
||||
|
// 遍历 List 集合中的每个元素,给 ID 属性赋值
|
||||
|
if (list != null) |
||||
|
{ |
||||
|
foreach (var item in list) |
||||
|
{ |
||||
|
if ((Guid)detailIdProperty.GetValue(item)! == Guid.Empty) |
||||
|
{ |
||||
|
detailIdProperty.SetValue(item, Guid.NewGuid()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
if (masterIdProperty != null) |
||||
|
{ |
||||
|
// 获取 List 属性的值
|
||||
|
var list = (IList)listProperty.GetValue(entity); |
||||
|
|
||||
|
// 遍历 List 集合中的每个元素,给 ID 属性赋值
|
||||
|
if (list != null) |
||||
|
{ |
||||
|
foreach (var item in list) |
||||
|
{ |
||||
|
masterIdProperty.SetValue(item, id); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
await Repository.UpdateAsync(entity, true); |
||||
|
|
||||
|
return await MapToGetOutputDtoAsync(entity); |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【导出Excel】【有筛选条件】
|
||||
|
/// </summary>
|
||||
|
/// <param name="sfsRequestInputBase">查询条件</param>
|
||||
|
/// <param name="isRedundance">是否冗余主表数据</param>
|
||||
|
/// <param name="isDetailExport">是否导出子表</param>
|
||||
|
/// <param name="userId">用户ID</param>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("api/[controller]/base/export-to-excel")]
|
||||
|
public virtual async Task<IActionResult> ExportToExcelAsync(SfsRequestInputBase sfsRequestInputBase, |
||||
|
bool isRedundance, Guid userId, bool isDetailExport = true) |
||||
|
{ |
||||
|
var isHasDetail = false; //是否包含从表
|
||||
|
|
||||
|
var data = (await GetPageListByFilterAsync(sfsRequestInputBase, true)).Items; |
||||
|
|
||||
|
var fileStream = new MemoryStream(); //文件流
|
||||
|
IWorkbook workbook = new XSSFWorkbook(); |
||||
|
var sheet = workbook.CreateSheet(Localizer[typeof(TEntity).Name]); |
||||
|
var splitDetailsColumnNumber = 1; //分割主表和从表的列数量
|
||||
|
var excelDetailsCellStyle = SetExcelDetailsCellStyle(workbook); //子表单元格样式
|
||||
|
var excelSplitCellStyle = SetSplitCellStyle(workbook); //分割单元格样式
|
||||
|
var excelOnlyMainCellStyle = SetExcelOnlyMainCellStyle(workbook); |
||||
|
var excelHeadCellStyle = SetExcelHeadCellStyle(workbook); |
||||
|
|
||||
|
// 获取主表的属性 创建主表 表头
|
||||
|
var mainAllProperties = typeof(TEntityDto).GetProperties(); |
||||
|
var mainProperties = mainAllProperties.Where(p => p.Name != "Details").ToArray(); //去除details属性否则导出时会带出来
|
||||
|
|
||||
|
#region 用户个性导出 主表
|
||||
|
|
||||
|
//获取个性导出的字段
|
||||
|
var mainUserColumn = |
||||
|
await ExportCustomUserSettingAppService.GetByUserIdAndExportTableNameAsync(userId, typeof(TEntity).Name); |
||||
|
|
||||
|
if (mainUserColumn.Any(p => p.CustomUserSetting == Enum_ExportCustomUserSetting.Yes)) |
||||
|
{ |
||||
|
var showUserColumn = mainUserColumn.Where(p => p.CustomUserSetting == Enum_ExportCustomUserSetting.Yes) |
||||
|
.Select(p => p.ExportColumnName?.ToLower()).Aggregate((a, b) => a + " " + b)?.Split(' ').ToList(); |
||||
|
|
||||
|
mainProperties = mainProperties.Where(p => showUserColumn.Contains(p.Name.ToLower())).ToArray(); |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
var headerRow = sheet.CreateRow(0); //标头列
|
||||
|
for (var i = 0; i < mainProperties.Length; i++) |
||||
|
{ |
||||
|
var englishName = mainProperties[i].Name; |
||||
|
//本地化
|
||||
|
var localizerName = Localizer[typeof(TEntity).Name + englishName]; |
||||
|
var headCell = headerRow.CreateCell(i); |
||||
|
headCell.SetCellValue(localizerName); |
||||
|
headCell.CellStyle = excelHeadCellStyle; |
||||
|
} |
||||
|
|
||||
|
// 获取从表的属性 创建从表 表头
|
||||
|
var detailProperties = typeof(TEntityDto).GetProperty("Details")?.PropertyType.GetGenericArguments()[0] |
||||
|
.GetProperties(); |
||||
|
|
||||
|
if (detailProperties != null) |
||||
|
{ |
||||
|
isHasDetail = true; |
||||
|
if (!isDetailExport) //是否要导出子表
|
||||
|
{ |
||||
|
isHasDetail = false; |
||||
|
} |
||||
|
|
||||
|
if (isHasDetail) |
||||
|
{ |
||||
|
headerRow.CreateCell(mainProperties.Length).SetCellValue("---【分割】---"); |
||||
|
|
||||
|
#region 用户个性导出 从表
|
||||
|
|
||||
|
//获取个性导出的字段
|
||||
|
var detailDtoName = mainAllProperties.First(p => p.Name == "Details"); |
||||
|
var detailUserColumn = await ExportCustomUserSettingAppService.GetByUserIdAndExportTableNameAsync( |
||||
|
userId, detailDtoName.PropertyType.GenericTypeArguments.First().Name.Replace("Dto", "")); |
||||
|
var detailNotShowUserColumn = detailUserColumn |
||||
|
.Where(p => p.CustomUserSetting == Enum_ExportCustomUserSetting.No).Select(p => p.ExportColumnName) |
||||
|
.ToList(); |
||||
|
if (detailUserColumn.Any()) |
||||
|
{ |
||||
|
detailProperties = detailProperties.Where(p => !detailNotShowUserColumn.Contains(p.Name)).ToArray(); |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
for (var i = 0; i < detailProperties.Length; i++) |
||||
|
{ |
||||
|
headerRow.CreateCell(mainProperties.Length + splitDetailsColumnNumber + i) |
||||
|
.SetCellValue(detailProperties[i].Name); |
||||
|
var headCell = headerRow.GetCell(mainProperties.Length + splitDetailsColumnNumber + i); |
||||
|
headCell.CellStyle = excelHeadCellStyle; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
// 填充数据行
|
||||
|
var rowIndex = 1; |
||||
|
foreach (var mainDto in data) |
||||
|
{ |
||||
|
if (isHasDetail) |
||||
|
{ |
||||
|
// 获取从表数据
|
||||
|
var detailsIndex = mainAllProperties.FindIndex(p => p.Name == "Details"); |
||||
|
// 子表
|
||||
|
var detailList = (IEnumerable<object>)mainAllProperties[detailsIndex].GetValue(mainDto); |
||||
|
var startMainRowIndex = rowIndex; |
||||
|
for (var datailCount = 0; datailCount < detailList.Count(); datailCount++) |
||||
|
{ |
||||
|
var dataRow = sheet.CreateRow(rowIndex); |
||||
|
|
||||
|
if (isRedundance) |
||||
|
{ |
||||
|
// 填充主表数据
|
||||
|
for (var i = 0; i < mainProperties.Length; i++) |
||||
|
{ |
||||
|
var value = mainProperties[i].GetValue(mainDto); |
||||
|
dataRow.CreateCell(i).SetCellValue(value?.ToString()); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
if (datailCount == 0) |
||||
|
{ |
||||
|
// 填充主表数据
|
||||
|
for (var i = 0; i < mainProperties.Length; i++) |
||||
|
{ |
||||
|
var value = mainProperties[i].GetValue(mainDto); |
||||
|
dataRow.CreateCell(i).SetCellValue(value?.ToString()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
rowIndex++; |
||||
|
} |
||||
|
|
||||
|
var overMainRowIndex = rowIndex; |
||||
|
foreach (var detail in detailList) |
||||
|
{ |
||||
|
if (startMainRowIndex <= overMainRowIndex) |
||||
|
{ |
||||
|
//填充子表数据
|
||||
|
var detailRow = sheet.GetRow(startMainRowIndex); |
||||
|
|
||||
|
var splitCell = detailRow.CreateCell(mainProperties.Length); |
||||
|
splitCell.CellStyle = excelSplitCellStyle; |
||||
|
|
||||
|
for (var i = 0; i < detailProperties.Length; i++) |
||||
|
{ |
||||
|
var value = detailProperties[i].GetValue(detail); |
||||
|
detailRow.CreateCell(mainProperties.Length + splitDetailsColumnNumber + i) |
||||
|
.SetCellValue(value?.ToString()); |
||||
|
var detailCell = detailRow.GetCell(mainProperties.Length + splitDetailsColumnNumber + i); |
||||
|
detailCell.CellStyle = excelDetailsCellStyle; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
startMainRowIndex++; |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var dataRow = sheet.CreateRow(rowIndex); |
||||
|
// 填充主表数据
|
||||
|
for (var i = 0; i < mainProperties.Length; i++) |
||||
|
{ |
||||
|
var value = mainProperties[i].GetValue(mainDto); |
||||
|
dataRow.CreateCell(i).SetCellValue(value?.ToString()); |
||||
|
} |
||||
|
|
||||
|
if (rowIndex % 2 == 0) |
||||
|
{ |
||||
|
dataRow.RowStyle = excelOnlyMainCellStyle; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//添加1个空行将2条数据分割开
|
||||
|
rowIndex++; |
||||
|
} |
||||
|
|
||||
|
#region 自动调整列宽
|
||||
|
|
||||
|
// 自动调整列宽 注意:这个影响性能 会遍历所有行 并且找出宽度最大值
|
||||
|
//sheet.AutoSizeColumn(i);
|
||||
|
if (isHasDetail) |
||||
|
{ |
||||
|
for (var i = 0; i < mainProperties.Length + splitDetailsColumnNumber + detailProperties.Length; i++) |
||||
|
{ |
||||
|
var colWidth = Math.Max(sheet.GetColumnWidth(i) + 150, 265 * 15); |
||||
|
if (colWidth > 255 * 256)//excel列有最大宽度限制
|
||||
|
{ |
||||
|
colWidth = 6000; |
||||
|
} |
||||
|
|
||||
|
sheet.SetColumnWidth(i, colWidth); |
||||
|
sheet.SetColumnWidth(mainProperties.Length, 3600); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
for (var i = 0; i < mainProperties.Length; i++) |
||||
|
{ |
||||
|
var colWidth = Math.Max(sheet.GetColumnWidth(i) + 150, 265 * 15); |
||||
|
if (colWidth > 255 * 256)//excel列有最大宽度限制
|
||||
|
{ |
||||
|
colWidth = 6000; |
||||
|
} |
||||
|
|
||||
|
sheet.SetColumnWidth(i, colWidth); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
// 保存Excel文件到MemoryStream
|
||||
|
workbook.Write(fileStream, true); |
||||
|
fileStream.Position = 0; |
||||
|
|
||||
|
// 创建FileContentResult返回Excel文件
|
||||
|
var fileContentResult = new FileContentResult(fileStream.ToArray(), |
||||
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") |
||||
|
{ |
||||
|
FileDownloadName = Localizer[typeof(TEntity).Name] + ".xlsx" |
||||
|
}; |
||||
|
|
||||
|
await Task.CompletedTask; |
||||
|
|
||||
|
return fileContentResult; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【基础】-【获取 增 改 查基础的Dto数据类型】
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("api/[controller]/base/get-dto-column-type")]
|
||||
|
public virtual async Task<List<AllTableColumnTypeDto>> GetDtoColumnTypeAsync() |
||||
|
{ |
||||
|
var tableColumnTypeDtos = new List<AllTableColumnTypeDto> |
||||
|
{ |
||||
|
GetTableColumnTypeByTable(typeof(TEntity), "S"), |
||||
|
GetTableColumnTypeByTable(typeof(TCreateInput), "C"), |
||||
|
GetTableColumnTypeByTable(typeof(TUpdateInput), "U"), |
||||
|
GetTableColumnTypeByTable(typeof(TEntity), "G") |
||||
|
}; |
||||
|
|
||||
|
await Task.CompletedTask; |
||||
|
return tableColumnTypeDtos; |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#region 私有处理
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 按表达式条件获取分页列表
|
||||
|
/// </summary>
|
||||
|
/// <param name="expression"></param>
|
||||
|
/// <param name="skipCount"></param>
|
||||
|
/// <param name="maxResultCount"></param>
|
||||
|
/// <param name="sorting"></param>
|
||||
|
/// <param name="includeDetails"></param>
|
||||
|
/// <param name="cancellationToken"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private async Task<List<TEntity>> GetQueryListAsync(Expression<Func<TEntity, bool>> expression, |
||||
|
int skipCount, int maxResultCount, string sorting, |
||||
|
bool includeDetails = false, CancellationToken cancellationToken = default) |
||||
|
{ |
||||
|
var query = await Repository.WithDetailsAsync(); |
||||
|
//var query = await Repository.GetQueryableAsync();
|
||||
|
|
||||
|
var entities = query.Where(expression); |
||||
|
entities = GetSortingQueryable(entities, sorting); |
||||
|
var str = entities.ToQueryString(); |
||||
|
|
||||
|
Console.WriteLine("---------查询开始---------"); |
||||
|
Console.WriteLine(); |
||||
|
Console.WriteLine(str); |
||||
|
Console.WriteLine(); |
||||
|
Console.WriteLine("---------查询结束---------"); |
||||
|
|
||||
|
var result = await entities.PageBy(skipCount, maxResultCount).ToListAsync(cancellationToken) |
||||
|
.ConfigureAwait(false); |
||||
|
|
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置排序
|
||||
|
/// </summary>
|
||||
|
/// <param name="entities"></param>
|
||||
|
/// <param name="sorting"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private IQueryable<TEntity> GetSortingQueryable(IQueryable<TEntity> entities, string sorting) |
||||
|
{ |
||||
|
if (string.IsNullOrEmpty(sorting)) |
||||
|
{ |
||||
|
var createTimePropertyInfo = typeof(TEntity).GetProperty("CreationTime"); |
||||
|
if (createTimePropertyInfo != null) |
||||
|
{ |
||||
|
entities = entities.OrderBy("CreationTime DESC"); |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
entities = entities.OrderBy("Id"); |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
var sortParams = sorting?.Split(' '); |
||||
|
var sortName = sortParams[0]; |
||||
|
var ascOrDesc = string.Empty; |
||||
|
if (sortParams.Length > 1) |
||||
|
{ |
||||
|
var sortDirection = sortParams[1]; |
||||
|
if (sortDirection.Equals("DESC", StringComparison.OrdinalIgnoreCase)) |
||||
|
{ |
||||
|
ascOrDesc = " DESC "; |
||||
|
} |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
ascOrDesc = " DESC "; |
||||
|
} |
||||
|
|
||||
|
entities = entities.OrderBy(sortName + ascOrDesc); |
||||
|
} |
||||
|
|
||||
|
return entities; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 获取Dto的属性名字和数据类型
|
||||
|
/// </summary>
|
||||
|
/// <param name="dtoType"></param>
|
||||
|
/// <param name="strDtoType"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private AllTableColumnTypeDto GetTableColumnTypeByTable(Type dtoType, string strDtoType) |
||||
|
{ |
||||
|
var gDto = new AllTableColumnTypeDto |
||||
|
{ |
||||
|
DtoType = strDtoType, |
||||
|
DtoName = dtoType.FullName, |
||||
|
ColumnsTypes = new List<ColumnType>() |
||||
|
}; |
||||
|
var propertyInfos = dtoType.GetProperties(); |
||||
|
foreach (var propertyInfo in propertyInfos) |
||||
|
{ |
||||
|
var columnType = new ColumnType(); |
||||
|
columnType.IsEnum = false; |
||||
|
if (propertyInfo.PropertyType.GenericTypeArguments.Length > 0) |
||||
|
{ |
||||
|
if (propertyInfo.PropertyType.GenericTypeArguments[0].IsEnum) |
||||
|
{ |
||||
|
columnType.IsEnum = true; |
||||
|
} |
||||
|
|
||||
|
columnType.Z_ColumnBaseType = propertyInfo.PropertyType.GenericTypeArguments[0].FullName!; |
||||
|
} |
||||
|
else |
||||
|
{ |
||||
|
columnType.Z_ColumnBaseType = propertyInfo.PropertyType.FullName!; |
||||
|
} |
||||
|
|
||||
|
columnType.Z_ColumnName = propertyInfo.Name; |
||||
|
columnType.Z_ColumnType = propertyInfo.PropertyType.Name; |
||||
|
|
||||
|
|
||||
|
gDto.ColumnsTypes.Add(columnType); |
||||
|
} |
||||
|
|
||||
|
return gDto; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 【记录数量查询】【有筛选条件】
|
||||
|
/// </summary>
|
||||
|
/// <param name="expression"></param>
|
||||
|
/// <param name="cancellationToken"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private async Task<long> GetCountAsync(Expression<Func<TEntity, bool>> expression, |
||||
|
CancellationToken cancellationToken = default) |
||||
|
{ |
||||
|
var count = await _repository.LongCountAsync(expression, cancellationToken); |
||||
|
|
||||
|
return count; |
||||
|
} |
||||
|
|
||||
|
#region Excel导出的样式设置
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置子表单元格样式
|
||||
|
/// </summary>
|
||||
|
/// <param name="workbook"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static ICellStyle SetExcelDetailsCellStyle(IWorkbook workbook) |
||||
|
{ |
||||
|
var cellStyle = workbook.CreateCellStyle(); |
||||
|
cellStyle.FillBackgroundColor = IndexedColors.Grey25Percent.Index; |
||||
|
cellStyle.FillForegroundColor = IndexedColors.Grey25Percent.Index; |
||||
|
cellStyle.FillPattern = FillPattern.SolidForeground; |
||||
|
return cellStyle; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置只有主表时的交替行 单元格样式
|
||||
|
/// </summary>
|
||||
|
/// <param name="workbook"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static ICellStyle SetExcelOnlyMainCellStyle(IWorkbook workbook) |
||||
|
{ |
||||
|
var cellStyle = workbook.CreateCellStyle(); |
||||
|
cellStyle.FillBackgroundColor = IndexedColors.Grey25Percent.Index; |
||||
|
cellStyle.FillForegroundColor = IndexedColors.Grey25Percent.Index; |
||||
|
cellStyle.FillPattern = FillPattern.SolidForeground; |
||||
|
return cellStyle; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 设置分割单元格的样式
|
||||
|
/// </summary>
|
||||
|
/// <param name="workbook"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static ICellStyle SetSplitCellStyle(IWorkbook workbook) |
||||
|
{ |
||||
|
var cellStyle = workbook.CreateCellStyle(); |
||||
|
cellStyle.BorderLeft = BorderStyle.MediumDashed; |
||||
|
cellStyle.BorderRight = BorderStyle.MediumDashed; |
||||
|
cellStyle.LeftBorderColor = IndexedColors.BrightGreen.Index; |
||||
|
cellStyle.RightBorderColor = IndexedColors.Grey25Percent.Index; |
||||
|
cellStyle.FillBackgroundColor = IndexedColors.White.Index; |
||||
|
cellStyle.FillForegroundColor = IndexedColors.White.Index; |
||||
|
cellStyle.FillPattern = FillPattern.ThickVerticalBands; |
||||
|
return cellStyle; |
||||
|
} |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置表头单元格样式
|
||||
|
/// </summary>
|
||||
|
/// <param name="workbook"></param>
|
||||
|
/// <returns></returns>
|
||||
|
private static ICellStyle SetExcelHeadCellStyle(IWorkbook workbook) |
||||
|
{ |
||||
|
var cellStyle = workbook.CreateCellStyle(); |
||||
|
cellStyle.FillBackgroundColor = IndexedColors.LightOrange.Index; |
||||
|
cellStyle.FillForegroundColor = IndexedColors.LightOrange.Index; |
||||
|
cellStyle.FillPattern = FillPattern.SolidForeground; |
||||
|
return cellStyle; |
||||
|
} |
||||
|
|
||||
|
#endregion
|
||||
|
|
||||
|
#endregion
|
||||
|
} |
@ -0,0 +1,63 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Threading.Tasks; |
||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using WinIn.FasterZ.Store.AppBase; |
||||
|
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting; |
||||
|
using WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting.Dtos; |
||||
|
using WinIn.FasterZ.Wms.Permissions; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Wms.AppBaseBusiness.ExportCustomUserSetting |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public class ExportCustomUserSettingAppService : ZbxBase<Store.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting, ExportCustomUserSettingDto, Guid, |
||||
|
ExportCustomUserSettingGetListInput, CreateUpdateExportCustomUserSettingDto, |
||||
|
CreateUpdateExportCustomUserSettingDto>, |
||||
|
IExportCustomUserSettingAppService |
||||
|
{ |
||||
|
private readonly IExportCustomUserSettingRepository _repository; |
||||
|
|
||||
|
public ExportCustomUserSettingAppService(IExportCustomUserSettingRepository repository) : base(repository) |
||||
|
{ |
||||
|
_repository = repository; |
||||
|
} |
||||
|
|
||||
|
protected override string GetPolicyName { get; set; } =WmsPermissions.ExportCustomUserSetting.Default; |
||||
|
protected override string GetListPolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Default; |
||||
|
protected override string CreatePolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Create; |
||||
|
protected override string UpdatePolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Update; |
||||
|
protected override string DeletePolicyName { get; set; } = WmsPermissions.ExportCustomUserSetting.Delete; |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 根据用户和表名获取个性化导出
|
||||
|
/// </summary>
|
||||
|
/// <returns></returns>
|
||||
|
[HttpPost("get-by-user-and-table-name")] |
||||
|
public virtual async Task<List<ExportCustomUserSettingDto>> GetByUserIdAndExportTableNameAsync(Guid userId, |
||||
|
string exportTableName) |
||||
|
{ |
||||
|
var entitys = |
||||
|
await _repository.GetListAsync(p => p.ExportUserId == userId && p.ExportTableName == exportTableName); |
||||
|
|
||||
|
return ObjectMapper.Map<List<Store.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting>, List<ExportCustomUserSettingDto>>(entitys); |
||||
|
} |
||||
|
|
||||
|
protected override async Task<IQueryable<Store.AppBaseBusiness.ExportCustomUserSetting.ExportCustomUserSetting>> CreateFilteredQueryAsync( |
||||
|
ExportCustomUserSettingGetListInput input) |
||||
|
{ |
||||
|
// TODO: AbpHelper generated
|
||||
|
return (await base.CreateFilteredQueryAsync(input)) |
||||
|
.WhereIf(input.ExportUserId != null, x => x.ExportUserId == input.ExportUserId) |
||||
|
.WhereIf(!input.ExportUserName.IsNullOrWhiteSpace(), x => x.ExportUserName.Contains(input.ExportUserName)) |
||||
|
.WhereIf(!input.ExportColumnName.IsNullOrWhiteSpace(), |
||||
|
x => x.ExportColumnName.Contains(input.ExportColumnName)) |
||||
|
.WhereIf(!input.ExportTableName.IsNullOrWhiteSpace(), |
||||
|
x => x.ExportTableName.Contains(input.ExportTableName)) |
||||
|
.WhereIf(input.CustomUserSetting != null, x => x.CustomUserSetting == input.CustomUserSetting) |
||||
|
; |
||||
|
} |
||||
|
} |
||||
|
} |
@ -1,10 +1,11 @@ |
|||||
using Volo.Abp.Ui.Branding; |
using Volo.Abp.Ui.Branding; |
||||
using Volo.Abp.DependencyInjection; |
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
namespace WinIn.FasterZ.Wms; |
namespace WinIn.FasterZ.Wms |
||||
|
|
||||
[Dependency(ReplaceServices = true)] |
|
||||
public class WmsBrandingProvider : DefaultBrandingProvider |
|
||||
{ |
{ |
||||
public override string AppName => "Wms"; |
[Dependency(ReplaceServices = true)] |
||||
|
public class WmsBrandingProvider : DefaultBrandingProvider |
||||
|
{ |
||||
|
public override string AppName => "Wms"; |
||||
|
} |
||||
} |
} |
||||
|
@ -0,0 +1,14 @@ |
|||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.Enums |
||||
|
{ |
||||
|
public enum Enum_ExportCustomUserSetting |
||||
|
{ |
||||
|
[Display(Name = "未定义")] |
||||
|
None=0, |
||||
|
[Display(Name = "导出")] |
||||
|
Yes=1, |
||||
|
[Display(Name = "不导出")] |
||||
|
No = 2 |
||||
|
} |
||||
|
} |
@ -1,9 +1,10 @@ |
|||||
using Volo.Abp.Localization; |
using Volo.Abp.Localization; |
||||
|
|
||||
namespace WinIn.FasterZ.Wms.Localization; |
namespace WinIn.FasterZ.Wms.Localization |
||||
|
|
||||
[LocalizationResourceName("Wms")] |
|
||||
public class WmsResource |
|
||||
{ |
{ |
||||
|
[LocalizationResourceName("Wms")] |
||||
|
public class WmsResource |
||||
|
{ |
||||
|
|
||||
|
} |
||||
} |
} |
||||
|
@ -1,10 +1,11 @@ |
|||||
namespace WinIn.FasterZ.Wms.MultiTenancy; |
namespace WinIn.FasterZ.Wms.MultiTenancy |
||||
|
|
||||
public static class MultiTenancyConsts |
|
||||
{ |
{ |
||||
/* Enable/disable multi-tenancy easily in a single point. |
public static class MultiTenancyConsts |
||||
* If you will never need to multi-tenancy, you can remove |
{ |
||||
* related modules and code parts, including this file. |
/* Enable/disable multi-tenancy easily in a single point. |
||||
*/ |
* If you will never need to multi-tenancy, you can remove |
||||
public const bool IsEnabled = true; |
* related modules and code parts, including this file. |
||||
|
*/ |
||||
|
public const bool IsEnabled = true; |
||||
|
} |
||||
} |
} |
||||
|
@ -1,6 +1,7 @@ |
|||||
namespace WinIn.FasterZ.Wms; |
namespace WinIn.FasterZ.Wms |
||||
|
|
||||
public static class WmsDomainErrorCodes |
|
||||
{ |
{ |
||||
/* You can add your business exception error codes here, as constants */ |
public static class WmsDomainErrorCodes |
||||
|
{ |
||||
|
/* You can add your business exception error codes here, as constants */ |
||||
|
} |
||||
} |
} |
||||
|
@ -0,0 +1,43 @@ |
|||||
|
using System; |
||||
|
using System.ComponentModel.DataAnnotations; |
||||
|
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
using WinIn.FasterZ.Store.Enums; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public class ExportCustomUserSetting : AuditedAggregateRoot<Guid> |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户ID
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "用户ID")] |
||||
|
public Guid? ExportUserId { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 用户姓名
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "用户姓名")] |
||||
|
public string? ExportUserName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 列名
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "列名")] |
||||
|
public string? ExportColumnName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 表名
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "表名")] |
||||
|
public string? ExportTableName { get; set; } |
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 导出设置项
|
||||
|
/// </summary>
|
||||
|
[Display(Name = "导出设置项")] |
||||
|
public Enum_ExportCustomUserSetting CustomUserSetting { get; set; } |
||||
|
} |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
using System; |
||||
|
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
|
namespace WinIn.FasterZ.Store.AppBaseBusiness.ExportCustomUserSetting |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// 用户个型导出配置
|
||||
|
/// </summary>
|
||||
|
public interface IExportCustomUserSettingRepository : IRepository<ExportCustomUserSetting, Guid> |
||||
|
{ |
||||
|
} |
||||
|
} |
@ -1,8 +1,9 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
|
|
||||
namespace WinIn.FasterZ.Wms.Data; |
namespace WinIn.FasterZ.Wms.Data |
||||
|
|
||||
public interface IWmsDbSchemaMigrator |
|
||||
{ |
{ |
||||
Task MigrateAsync(); |
public interface IWmsDbSchemaMigrator |
||||
|
{ |
||||
|
Task MigrateAsync(); |
||||
|
} |
||||
} |
} |
||||
|
@ -1,15 +1,16 @@ |
|||||
using System.Threading.Tasks; |
using System.Threading.Tasks; |
||||
using Volo.Abp.DependencyInjection; |
using Volo.Abp.DependencyInjection; |
||||
|
|
||||
namespace WinIn.FasterZ.Wms.Data; |
namespace WinIn.FasterZ.Wms.Data |
||||
|
|
||||
/* This is used if database provider does't define |
|
||||
* IWmsDbSchemaMigrator implementation. |
|
||||
*/ |
|
||||
public class NullWmsDbSchemaMigrator : IWmsDbSchemaMigrator, ITransientDependency |
|
||||
{ |
{ |
||||
public Task MigrateAsync() |
/* This is used if database provider does't define |
||||
|
* IWmsDbSchemaMigrator implementation. |
||||
|
*/ |
||||
|
public class NullWmsDbSchemaMigrator : IWmsDbSchemaMigrator, ITransientDependency |
||||
{ |
{ |
||||
return Task.CompletedTask; |
public Task MigrateAsync() |
||||
|
{ |
||||
|
return Task.CompletedTask; |
||||
|
} |
||||
} |
} |
||||
} |
} |
||||
|
@ -1,12 +1,13 @@ |
|||||
using Volo.Abp.Settings; |
using Volo.Abp.Settings; |
||||
|
|
||||
namespace WinIn.FasterZ.Wms.Settings; |
namespace WinIn.FasterZ.Wms.Settings |
||||
|
|
||||
public class WmsSettingDefinitionProvider : SettingDefinitionProvider |
|
||||
{ |
{ |
||||
public override void Define(ISettingDefinitionContext context) |
public class WmsSettingDefinitionProvider : SettingDefinitionProvider |
||||
{ |
{ |
||||
//Define your own settings here. Example:
|
public override void Define(ISettingDefinitionContext context) |
||||
//context.Add(new SettingDefinition(WmsSettings.MySetting1));
|
{ |
||||
|
//Define your own settings here. Example:
|
||||
|
//context.Add(new SettingDefinition(WmsSettings.MySetting1));
|
||||
|
} |
||||
} |
} |
||||
} |
} |
||||
|
@ -1,8 +1,9 @@ |
|||||
namespace WinIn.FasterZ.Wms; |
namespace WinIn.FasterZ.Wms |
||||
|
|
||||
public static class WmsConsts |
|
||||
{ |
{ |
||||
public const string DbTablePrefix = null; |
public static class WmsConsts |
||||
|
{ |
||||
|
public const string DbTablePrefix = null; |
||||
|
|
||||
public const string DbSchema = null; |
public const string DbSchema = null; |
||||
|
} |
||||
} |
} |
||||
|
@ -1,18 +1,19 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class AuthDepartment : AuditedAggregateRoot<Guid> |
public class AuthDepartment : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool? IsActive { get; set; } |
public bool? IsActive { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,9 +1,10 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment; |
namespace WinIn.FasterZ.Wms.Z_Business.AuthDepartment |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Repositories; |
using Volo.Abp.Domain.Repositories; |
||||
|
|
||||
public interface IAuthDepartmentRepository : IRepository<AuthDepartment, Guid> |
public interface IAuthDepartmentRepository : IRepository<AuthDepartment, Guid> |
||||
{ |
{ |
||||
|
} |
||||
} |
} |
@ -1,38 +1,39 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.AuthMenu; |
namespace WinIn.FasterZ.Wms.Z_Business.AuthMenu |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class AuthMenu : AuditedAggregateRoot<Guid> |
public class AuthMenu : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Component { get; set; } |
public string? Component { get; set; } |
||||
|
|
||||
public string? CountUrl { get; set; } |
public string? CountUrl { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? GroupName { get; set; } |
public string? GroupName { get; set; } |
||||
|
|
||||
public int GroupSort { get; set; } |
public int GroupSort { get; set; } |
||||
|
|
||||
public string? Icon { get; set; } |
public string? Icon { get; set; } |
||||
|
|
||||
public string Name { get; set; } = null!; |
public string Name { get; set; } = null!; |
||||
|
|
||||
public string? ParentCode { get; set; } |
public string? ParentCode { get; set; } |
||||
|
|
||||
public string? Permission { get; set; } |
public string? Permission { get; set; } |
||||
|
|
||||
public string Portal { get; set; } = null!; |
public string Portal { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? Route { get; set; } |
public string? Route { get; set; } |
||||
|
|
||||
public int Sort { get; set; } |
public int Sort { get; set; } |
||||
|
|
||||
public string Status { get; set; } = null!; |
public string Status { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,14 +1,15 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserMenu; |
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserMenu |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class AuthUserMenu : AuditedAggregateRoot<Guid> |
public class AuthUserMenu : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string MenuCode { get; set; } = null!; |
public string MenuCode { get; set; } = null!; |
||||
|
|
||||
public string Portal { get; set; } = null!; |
public string Portal { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,12 +1,13 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserWorkGroup; |
namespace WinIn.FasterZ.Wms.Z_Business.AuthUserWorkGroup |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class AuthUserWorkGroup : AuditedAggregateRoot<Guid> |
public class AuthUserWorkGroup : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string WorkGroupCode { get; set; } = null!; |
public string WorkGroupCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,26 +1,27 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataAql; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataAql |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataAql : AuditedAggregateRoot<Guid> |
public class BasedataAql : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? AbcClass { get; set; } |
public string? AbcClass { get; set; } |
||||
|
|
||||
public decimal CeilingQty { get; set; } |
public decimal CeilingQty { get; set; } |
||||
|
|
||||
public decimal FloorQty { get; set; } |
public decimal FloorQty { get; set; } |
||||
|
|
||||
public bool IsUsePercent { get; set; } |
public bool IsUsePercent { get; set; } |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public decimal SamplePercent { get; set; } |
public decimal SamplePercent { get; set; } |
||||
|
|
||||
public decimal SampleQty { get; set; } |
public decimal SampleQty { get; set; } |
||||
|
|
||||
public string SupplierCode { get; set; } = null!; |
public string SupplierCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,22 +1,23 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataArea; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataArea |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataArea : AuditedAggregateRoot<Guid> |
public class BasedataArea : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string AreaType { get; set; } = null!; |
public string AreaType { get; set; } = null!; |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool IsFunctional { get; set; } |
public bool IsFunctional { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,34 +1,35 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataBom; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataBom |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataBom : AuditedAggregateRoot<Guid> |
public class BasedataBom : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public DateTime? BeginTime { get; set; } |
public DateTime? BeginTime { get; set; } |
||||
|
|
||||
public string Component { get; set; } = null!; |
public string Component { get; set; } = null!; |
||||
|
|
||||
public decimal ComponentQty { get; set; } |
public decimal ComponentQty { get; set; } |
||||
|
|
||||
public string? ComponentUom { get; set; } |
public string? ComponentUom { get; set; } |
||||
|
|
||||
public string DistributionType { get; set; } = null!; |
public string DistributionType { get; set; } = null!; |
||||
|
|
||||
public DateTime? EndTime { get; set; } |
public DateTime? EndTime { get; set; } |
||||
|
|
||||
public string? Erpop { get; set; } |
public string? Erpop { get; set; } |
||||
|
|
||||
public int Layer { get; set; } |
public int Layer { get; set; } |
||||
|
|
||||
public string? Mfgop { get; set; } |
public string? Mfgop { get; set; } |
||||
|
|
||||
public string PlannedSplitRule { get; set; } = null!; |
public string PlannedSplitRule { get; set; } = null!; |
||||
|
|
||||
public string Product { get; set; } = null!; |
public string Product { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string TruncType { get; set; } = null!; |
public string TruncType { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,18 +1,19 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCalendar; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCalendar |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCalendar : AuditedAggregateRoot<Guid> |
public class BasedataCalendar : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public DateTime? BeginTime { get; set; } |
public DateTime? BeginTime { get; set; } |
||||
|
|
||||
public DateTime? EndTime { get; set; } |
public DateTime? EndTime { get; set; } |
||||
|
|
||||
public string? Module { get; set; } |
public string? Module { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Status { get; set; } = null!; |
public string Status { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,16 +1,17 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCategory; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCategory |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCategory : AuditedAggregateRoot<Guid> |
public class BasedataCategory : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,18 +1,19 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrency; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrency |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCurrency : AuditedAggregateRoot<Guid> |
public class BasedataCurrency : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool IsBasicCurrency { get; set; } |
public bool IsBasicCurrency { get; set; } |
||||
|
|
||||
public string Name { get; set; } = null!; |
public string Name { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrencyExchange; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCurrencyExchange |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCurrencyExchange : AuditedAggregateRoot<Guid> |
public class BasedataCurrencyExchange : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public Guid BasicCurrencyId { get; set; } |
public Guid BasicCurrencyId { get; set; } |
||||
|
|
||||
public Guid CurrencyId { get; set; } |
public Guid CurrencyId { get; set; } |
||||
|
|
||||
public DateTime EfficetiveTime { get; set; } |
public DateTime EfficetiveTime { get; set; } |
||||
|
|
||||
public DateTime ExpireTime { get; set; } |
public DateTime ExpireTime { get; set; } |
||||
|
|
||||
public decimal Rate { get; set; } |
public decimal Rate { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,36 +1,37 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomer; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomer |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCustomer : AuditedAggregateRoot<Guid> |
public class BasedataCustomer : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Address { get; set; } |
public string? Address { get; set; } |
||||
|
|
||||
public string? City { get; set; } |
public string? City { get; set; } |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Contacts { get; set; } |
public string? Contacts { get; set; } |
||||
|
|
||||
public string? Country { get; set; } |
public string? Country { get; set; } |
||||
|
|
||||
public string? Currency { get; set; } |
public string? Currency { get; set; } |
||||
|
|
||||
public string? Fax { get; set; } |
public string? Fax { get; set; } |
||||
|
|
||||
public bool IsActive { get; set; } |
public bool IsActive { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Phone { get; set; } |
public string? Phone { get; set; } |
||||
|
|
||||
public string? PostId { get; set; } |
public string? PostId { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? ShortName { get; set; } |
public string? ShortName { get; set; } |
||||
|
|
||||
public string Type { get; set; } = null!; |
public string Type { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,28 +1,29 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerAddress; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerAddress |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCustomerAddress : AuditedAggregateRoot<Guid> |
public class BasedataCustomerAddress : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Address { get; set; } |
public string? Address { get; set; } |
||||
|
|
||||
public string? City { get; set; } |
public string? City { get; set; } |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Contact { get; set; } |
public string? Contact { get; set; } |
||||
|
|
||||
public string CustomerCode { get; set; } = null!; |
public string CustomerCode { get; set; } = null!; |
||||
|
|
||||
public string? Desc { get; set; } |
public string? Desc { get; set; } |
||||
|
|
||||
public string LocationCode { get; set; } = null!; |
public string LocationCode { get; set; } = null!; |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,26 +1,27 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerItem; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataCustomerItem |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataCustomerItem : AuditedAggregateRoot<Guid> |
public class BasedataCustomerItem : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public DateTime? BeginTime { get; set; } |
public DateTime? BeginTime { get; set; } |
||||
|
|
||||
public string CustomerCode { get; set; } = null!; |
public string CustomerCode { get; set; } = null!; |
||||
|
|
||||
public string CustomerItemCode { get; set; } = null!; |
public string CustomerItemCode { get; set; } = null!; |
||||
|
|
||||
public decimal CustomerPackQty { get; set; } |
public decimal CustomerPackQty { get; set; } |
||||
|
|
||||
public string? CustomerPackUom { get; set; } |
public string? CustomerPackUom { get; set; } |
||||
|
|
||||
public DateTime? EndTime { get; set; } |
public DateTime? EndTime { get; set; } |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? Version { get; set; } |
public string? Version { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,21 +1,22 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDict; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDict |
||||
|
{ |
||||
using System; |
using System; |
||||
using System.Collections.Generic; |
using System.Collections.Generic; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
using WinIn.FasterZ.Wms.Z_Business.BasedataDictItem; |
using WinIn.FasterZ.Wms.Z_Business.BasedataDictItem; |
||||
|
|
||||
public class BasedataDict : AuditedAggregateRoot<Guid> |
public class BasedataDict : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public virtual ICollection<BasedataDictItem> BasedataDictItems { get; set; } = new List<BasedataDictItem>(); |
public virtual ICollection<BasedataDictItem> BasedataDictItems { get; set; } = new List<BasedataDictItem>(); |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,26 +1,27 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDictItem; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDictItem |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
using WinIn.FasterZ.Wms.Z_Business.BasedataDict; |
using WinIn.FasterZ.Wms.Z_Business.BasedataDict; |
||||
|
|
||||
public class BasedataDictItem : AuditedAggregateRoot<Guid> |
public class BasedataDictItem : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool Enabled { get; set; } |
public bool Enabled { get; set; } |
||||
|
|
||||
public virtual BasedataDict Master { get; set; } = null!; |
public virtual BasedataDict Master { get; set; } = null!; |
||||
|
|
||||
public Guid MasterId { get; set; } |
public Guid MasterId { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? Value { get; set; } |
public string? Value { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDock; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDock |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataDock : AuditedAggregateRoot<Guid> |
public class BasedataDock : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? DefaultLocationCode { get; set; } |
public string? DefaultLocationCode { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? WarehouseCode { get; set; } |
public string? WarehouseCode { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,26 +1,27 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDocumentSetting; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataDocumentSetting |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataDocumentSetting : AuditedAggregateRoot<Guid> |
public class BasedataDocumentSetting : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? NumberFormat { get; set; } |
public string? NumberFormat { get; set; } |
||||
|
|
||||
public string? NumberPrefix { get; set; } |
public string? NumberPrefix { get; set; } |
||||
|
|
||||
public string? NumberSeparator { get; set; } |
public string? NumberSeparator { get; set; } |
||||
|
|
||||
public int NumberSerialLength { get; set; } |
public int NumberSerialLength { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? TransactionType { get; set; } |
public string? TransactionType { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataErpLocation; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataErpLocation |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataErpLocation : AuditedAggregateRoot<Guid> |
public class BasedataErpLocation : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? Type { get; set; } |
public string? Type { get; set; } |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,26 +1,27 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataInterfaceCalendar; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataInterfaceCalendar |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataInterfaceCalendar : AuditedAggregateRoot<Guid> |
public class BasedataInterfaceCalendar : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public DateTime BeginTime { get; set; } |
public DateTime BeginTime { get; set; } |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public DateTime ConvertToTime { get; set; } |
public DateTime ConvertToTime { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public DateTime EndTime { get; set; } |
public DateTime EndTime { get; set; } |
||||
|
|
||||
public string Month { get; set; } = null!; |
public string Month { get; set; } = null!; |
||||
|
|
||||
public string Name { get; set; } = null!; |
public string Name { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Year { get; set; } = null!; |
public string Year { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,16 +1,17 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemCategory; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemCategory |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataItemCategory : AuditedAggregateRoot<Guid> |
public class BasedataItemCategory : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string CategoryCode { get; set; } = null!; |
public string CategoryCode { get; set; } = null!; |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Value { get; set; } = null!; |
public string Value { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,22 +1,23 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemGuideBook; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemGuideBook |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataItemGuideBook : AuditedAggregateRoot<Guid> |
public class BasedataItemGuideBook : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Desc1 { get; set; } |
public string? Desc1 { get; set; } |
||||
|
|
||||
public string? Desc2 { get; set; } |
public string? Desc2 { get; set; } |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? PictureBlobName { get; set; } |
public string? PictureBlobName { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? Step { get; set; } |
public string? Step { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,22 +1,23 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemPack; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemPack |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataItemPack : AuditedAggregateRoot<Guid> |
public class BasedataItemPack : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? BasicUom { get; set; } |
public string? BasicUom { get; set; } |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string PackCode { get; set; } = null!; |
public string PackCode { get; set; } = null!; |
||||
|
|
||||
public string? PackName { get; set; } |
public string? PackName { get; set; } |
||||
|
|
||||
public string? PackType { get; set; } |
public string? PackType { get; set; } |
||||
|
|
||||
public decimal Qty { get; set; } |
public decimal Qty { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemQuality; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemQuality |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataItemQuality : AuditedAggregateRoot<Guid> |
public class BasedataItemQuality : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string InspectType { get; set; } = null!; |
public string InspectType { get; set; } = null!; |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Status { get; set; } = null!; |
public string Status { get; set; } = null!; |
||||
|
|
||||
public string SupplierCode { get; set; } = null!; |
public string SupplierCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,30 +1,31 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemSafetyStock; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemSafetyStock |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataItemSafetyStock : AuditedAggregateRoot<Guid> |
public class BasedataItemSafetyStock : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public decimal FeedLine { get; set; } |
public decimal FeedLine { get; set; } |
||||
|
|
||||
public decimal FeedQty { get; set; } |
public decimal FeedQty { get; set; } |
||||
|
|
||||
public string? FeedUm { get; set; } |
public string? FeedUm { get; set; } |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public decimal MaxStock { get; set; } |
public decimal MaxStock { get; set; } |
||||
|
|
||||
public decimal MinStock { get; set; } |
public decimal MinStock { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public decimal SafetyStock { get; set; } |
public decimal SafetyStock { get; set; } |
||||
|
|
||||
public string StoreRelationType { get; set; } = null!; |
public string StoreRelationType { get; set; } = null!; |
||||
|
|
||||
public string? StoreValue { get; set; } |
public string? StoreValue { get; set; } |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,34 +1,35 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemStoreRelation; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataItemStoreRelation |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataItemStoreRelation : AuditedAggregateRoot<Guid> |
public class BasedataItemStoreRelation : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? AltUm { get; set; } |
public string? AltUm { get; set; } |
||||
|
|
||||
public decimal AltUmQty { get; set; } |
public decimal AltUmQty { get; set; } |
||||
|
|
||||
public bool Enabled { get; set; } |
public bool Enabled { get; set; } |
||||
|
|
||||
public bool IsFixed { get; set; } |
public bool IsFixed { get; set; } |
||||
|
|
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public int MultiLoc { get; set; } |
public int MultiLoc { get; set; } |
||||
|
|
||||
public string PramaryUm { get; set; } = null!; |
public string PramaryUm { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string StoreRelationType { get; set; } = null!; |
public string StoreRelationType { get; set; } = null!; |
||||
|
|
||||
public string? StoreUm { get; set; } |
public string? StoreUm { get; set; } |
||||
|
|
||||
public string? StoreValue { get; set; } |
public string? StoreValue { get; set; } |
||||
|
|
||||
public decimal UmQty { get; set; } |
public decimal UmQty { get; set; } |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,72 +1,73 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocation; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocation |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataLocation : AuditedAggregateRoot<Guid> |
public class BasedataLocation : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string AreaCode { get; set; } = null!; |
public string AreaCode { get; set; } = null!; |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public int ColumnCode { get; set; } |
public int ColumnCode { get; set; } |
||||
|
|
||||
public string DefaultInventoryStatus { get; set; } = null!; |
public string DefaultInventoryStatus { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool? EnableBreakStore { get; set; } |
public bool? EnableBreakStore { get; set; } |
||||
|
|
||||
public bool? EnableKeepZero { get; set; } |
public bool? EnableKeepZero { get; set; } |
||||
|
|
||||
public bool? EnableMixItem { get; set; } |
public bool? EnableMixItem { get; set; } |
||||
|
|
||||
public bool? EnableMixLot { get; set; } |
public bool? EnableMixLot { get; set; } |
||||
|
|
||||
public bool? EnableMixStatus { get; set; } |
public bool? EnableMixStatus { get; set; } |
||||
|
|
||||
public bool? EnableNegative { get; set; } |
public bool? EnableNegative { get; set; } |
||||
|
|
||||
public bool? EnableOpportunityCount { get; set; } |
public bool? EnableOpportunityCount { get; set; } |
||||
|
|
||||
public bool? EnableOverPick { get; set; } |
public bool? EnableOverPick { get; set; } |
||||
|
|
||||
public bool? EnablePick { get; set; } |
public bool? EnablePick { get; set; } |
||||
|
|
||||
public bool? EnableReceive { get; set; } |
public bool? EnableReceive { get; set; } |
||||
|
|
||||
public bool? EnableReturnFromCustomer { get; set; } |
public bool? EnableReturnFromCustomer { get; set; } |
||||
|
|
||||
public bool? EnableReturnToSupplier { get; set; } |
public bool? EnableReturnToSupplier { get; set; } |
||||
|
|
||||
public bool? EnableShip { get; set; } |
public bool? EnableShip { get; set; } |
||||
|
|
||||
public bool? EnableSplitBox { get; set; } |
public bool? EnableSplitBox { get; set; } |
||||
|
|
||||
public bool? EnableSplitPallet { get; set; } |
public bool? EnableSplitPallet { get; set; } |
||||
|
|
||||
public bool? EnableWholeStore { get; set; } |
public bool? EnableWholeStore { get; set; } |
||||
|
|
||||
public string ErpLocationCode { get; set; } = null!; |
public string ErpLocationCode { get; set; } = null!; |
||||
|
|
||||
public string LocationGroupCode { get; set; } = null!; |
public string LocationGroupCode { get; set; } = null!; |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public int PickOrder { get; set; } |
public int PickOrder { get; set; } |
||||
|
|
||||
public int PickPriority { get; set; } |
public int PickPriority { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public int RowCode { get; set; } |
public int RowCode { get; set; } |
||||
|
|
||||
public string? ShelfCode { get; set; } |
public string? ShelfCode { get; set; } |
||||
|
|
||||
public string Type { get; set; } = null!; |
public string Type { get; set; } = null!; |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
|
||||
public string WorkGroupCode { get; set; } = null!; |
public string WorkGroupCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,60 +1,61 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocationGroup; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataLocationGroup |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataLocationGroup : AuditedAggregateRoot<Guid> |
public class BasedataLocationGroup : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string AreaCode { get; set; } = null!; |
public string AreaCode { get; set; } = null!; |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string DefaultInventoryStatus { get; set; } = null!; |
public string DefaultInventoryStatus { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool? EnableBreakStore { get; set; } |
public bool? EnableBreakStore { get; set; } |
||||
|
|
||||
public bool? EnableKeepZero { get; set; } |
public bool? EnableKeepZero { get; set; } |
||||
|
|
||||
public bool? EnableMixItem { get; set; } |
public bool? EnableMixItem { get; set; } |
||||
|
|
||||
public bool? EnableMixLot { get; set; } |
public bool? EnableMixLot { get; set; } |
||||
|
|
||||
public bool? EnableMixStatus { get; set; } |
public bool? EnableMixStatus { get; set; } |
||||
|
|
||||
public bool? EnableNegative { get; set; } |
public bool? EnableNegative { get; set; } |
||||
|
|
||||
public bool? EnableOpportunityCount { get; set; } |
public bool? EnableOpportunityCount { get; set; } |
||||
|
|
||||
public bool? EnableOverPick { get; set; } |
public bool? EnableOverPick { get; set; } |
||||
|
|
||||
public bool? EnablePick { get; set; } |
public bool? EnablePick { get; set; } |
||||
|
|
||||
public bool? EnableReceive { get; set; } |
public bool? EnableReceive { get; set; } |
||||
|
|
||||
public bool? EnableReturnFromCustomer { get; set; } |
public bool? EnableReturnFromCustomer { get; set; } |
||||
|
|
||||
public bool? EnableReturnToSupplier { get; set; } |
public bool? EnableReturnToSupplier { get; set; } |
||||
|
|
||||
public bool? EnableShip { get; set; } |
public bool? EnableShip { get; set; } |
||||
|
|
||||
public bool? EnableSplitBox { get; set; } |
public bool? EnableSplitBox { get; set; } |
||||
|
|
||||
public bool? EnableSplitPallet { get; set; } |
public bool? EnableSplitPallet { get; set; } |
||||
|
|
||||
public bool? EnableWholeStore { get; set; } |
public bool? EnableWholeStore { get; set; } |
||||
|
|
||||
public string GroupType { get; set; } = null!; |
public string GroupType { get; set; } = null!; |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? OverflowLocationGroup { get; set; } |
public string? OverflowLocationGroup { get; set; } |
||||
|
|
||||
public int PickPriority { get; set; } |
public int PickPriority { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string WarehouseCode { get; set; } = null!; |
public string WarehouseCode { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,22 +1,23 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataMachine; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataMachine |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataMachine : AuditedAggregateRoot<Guid> |
public class BasedataMachine : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string Name { get; set; } = null!; |
public string Name { get; set; } = null!; |
||||
|
|
||||
public Guid ProdLineId { get; set; } |
public Guid ProdLineId { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Type { get; set; } = null!; |
public string Type { get; set; } = null!; |
||||
|
|
||||
public Guid WorkStationId { get; set; } |
public Guid WorkStationId { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,26 +1,27 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLine; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLine |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataProductionLine : AuditedAggregateRoot<Guid> |
public class BasedataProductionLine : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? ProductLocationCode { get; set; } |
public string? ProductLocationCode { get; set; } |
||||
|
|
||||
public string? RawLocationCode { get; set; } |
public string? RawLocationCode { get; set; } |
||||
|
|
||||
public string? RawLocationGroupCode { get; set; } |
public string? RawLocationGroupCode { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Type { get; set; } = null!; |
public string Type { get; set; } = null!; |
||||
|
|
||||
public string? WorkshopCode { get; set; } |
public string? WorkshopCode { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,14 +1,15 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLineItem; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProductionLineItem |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataProductionLineItem : AuditedAggregateRoot<Guid> |
public class BasedataProductionLineItem : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string ProdLineCode { get; set; } = null!; |
public string ProdLineCode { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,22 +1,23 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProject; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataProject |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataProject : AuditedAggregateRoot<Guid> |
public class BasedataProject : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public DateTime? BeginTime { get; set; } |
public DateTime? BeginTime { get; set; } |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? CustomerCode { get; set; } |
public string? CustomerCode { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public DateTime? EndTime { get; set; } |
public DateTime? EndTime { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataPurchasePriceSheet; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataPurchasePriceSheet |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataPurchasePriceSheet : AuditedAggregateRoot<Guid> |
public class BasedataPurchasePriceSheet : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public Guid CurrencyId { get; set; } |
public Guid CurrencyId { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public Guid SupplierId { get; set; } |
public Guid SupplierId { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSalePriceSheet; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSalePriceSheet |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataSalePriceSheet : AuditedAggregateRoot<Guid> |
public class BasedataSalePriceSheet : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public Guid CurrencyId { get; set; } |
public Guid CurrencyId { get; set; } |
||||
|
|
||||
public Guid CustomerId { get; set; } |
public Guid CustomerId { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,22 +1,23 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataShift; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataShift |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataShift : AuditedAggregateRoot<Guid> |
public class BasedataShift : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public DateTime? BeginTime { get; set; } |
public DateTime? BeginTime { get; set; } |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public bool EndAtNextDay { get; set; } |
public bool EndAtNextDay { get; set; } |
||||
|
|
||||
public DateTime? EndTime { get; set; } |
public DateTime? EndTime { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,20 +1,21 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataStdCostPriceSheet; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataStdCostPriceSheet |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataStdCostPriceSheet : AuditedAggregateRoot<Guid> |
public class BasedataStdCostPriceSheet : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public Guid CurrencyId { get; set; } |
public Guid CurrencyId { get; set; } |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string Name { get; set; } = null!; |
public string Name { get; set; } = null!; |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public Guid SupplierId { get; set; } |
public Guid SupplierId { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,40 +1,41 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplier; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplier |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataSupplier : AuditedAggregateRoot<Guid> |
public class BasedataSupplier : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Address { get; set; } |
public string? Address { get; set; } |
||||
|
|
||||
public string? Bank { get; set; } |
public string? Bank { get; set; } |
||||
|
|
||||
public string? City { get; set; } |
public string? City { get; set; } |
||||
|
|
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Contacts { get; set; } |
public string? Contacts { get; set; } |
||||
|
|
||||
public string? Country { get; set; } |
public string? Country { get; set; } |
||||
|
|
||||
public string? Currency { get; set; } |
public string? Currency { get; set; } |
||||
|
|
||||
public string? Fax { get; set; } |
public string? Fax { get; set; } |
||||
|
|
||||
public bool? IsActive { get; set; } |
public bool? IsActive { get; set; } |
||||
|
|
||||
public string Name { get; set; } = null!; |
public string Name { get; set; } = null!; |
||||
|
|
||||
public string? Phone { get; set; } |
public string? Phone { get; set; } |
||||
|
|
||||
public string? PostId { get; set; } |
public string? PostId { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string? ShortName { get; set; } |
public string? ShortName { get; set; } |
||||
|
|
||||
public decimal TaxRate { get; set; } |
public decimal TaxRate { get; set; } |
||||
|
|
||||
public string Type { get; set; } = null!; |
public string Type { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,28 +1,29 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierItem; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierItem |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataSupplierItem : AuditedAggregateRoot<Guid> |
public class BasedataSupplierItem : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string ItemCode { get; set; } = null!; |
public string ItemCode { get; set; } = null!; |
||||
|
|
||||
public string? ItemName { get; set; } |
public string? ItemName { get; set; } |
||||
|
|
||||
public decimal QtyPerPallet { get; set; } |
public decimal QtyPerPallet { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string SupplierCode { get; set; } = null!; |
public string SupplierCode { get; set; } = null!; |
||||
|
|
||||
public string SupplierItemCode { get; set; } = null!; |
public string SupplierItemCode { get; set; } = null!; |
||||
|
|
||||
public decimal SupplierPackQty { get; set; } |
public decimal SupplierPackQty { get; set; } |
||||
|
|
||||
public string? SupplierPackUom { get; set; } |
public string? SupplierPackUom { get; set; } |
||||
|
|
||||
public string? SupplierSimpleName { get; set; } |
public string? SupplierSimpleName { get; set; } |
||||
|
|
||||
public string? Version { get; set; } |
public string? Version { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,18 +1,19 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierTimeWindow; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataSupplierTimeWindow |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataSupplierTimeWindow : AuditedAggregateRoot<Guid> |
public class BasedataSupplierTimeWindow : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string SupplierCode { get; set; } = null!; |
public string SupplierCode { get; set; } = null!; |
||||
|
|
||||
public string SupplierName { get; set; } = null!; |
public string SupplierName { get; set; } = null!; |
||||
|
|
||||
public string TimeSlot { get; set; } = null!; |
public string TimeSlot { get; set; } = null!; |
||||
|
|
||||
public string Week { get; set; } = null!; |
public string Week { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,18 +1,19 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTeam; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTeam |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataTeam : AuditedAggregateRoot<Guid> |
public class BasedataTeam : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Members { get; set; } |
public string? Members { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
@ -1,44 +1,45 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTransactionType; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataTransactionType |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataTransactionType : AuditedAggregateRoot<Guid> |
public class BasedataTransactionType : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public bool AutoAgreeRequest { get; set; } |
public bool AutoAgreeRequest { get; set; } |
||||
|
|
||||
public bool AutoCompleteJob { get; set; } |
public bool AutoCompleteJob { get; set; } |
||||
|
|
||||
public bool AutoHandleRequest { get; set; } |
public bool AutoHandleRequest { get; set; } |
||||
|
|
||||
public bool AutoSubmitRequest { get; set; } |
public bool AutoSubmitRequest { get; set; } |
||||
|
|
||||
public string Description { get; set; } = null!; |
public string Description { get; set; } = null!; |
||||
|
|
||||
public bool DirectCreateNote { get; set; } |
public bool DirectCreateNote { get; set; } |
||||
|
|
||||
public bool Enabled { get; set; } |
public bool Enabled { get; set; } |
||||
|
|
||||
public string? InInventoryStatuses { get; set; } |
public string? InInventoryStatuses { get; set; } |
||||
|
|
||||
public string? InLocationAreas { get; set; } |
public string? InLocationAreas { get; set; } |
||||
|
|
||||
public string? InLocationTypes { get; set; } |
public string? InLocationTypes { get; set; } |
||||
|
|
||||
public string? ItemStatuses { get; set; } |
public string? ItemStatuses { get; set; } |
||||
|
|
||||
public string? ItemTypes { get; set; } |
public string? ItemTypes { get; set; } |
||||
|
|
||||
public string? OutInventoryStatuses { get; set; } |
public string? OutInventoryStatuses { get; set; } |
||||
|
|
||||
public string? OutLocationAreas { get; set; } |
public string? OutLocationAreas { get; set; } |
||||
|
|
||||
public string? OutLocationTypes { get; set; } |
public string? OutLocationTypes { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string TransSubType { get; set; } = null!; |
public string TransSubType { get; set; } = null!; |
||||
|
|
||||
public string TransType { get; set; } = null!; |
public string TransType { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,18 +1,19 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataUom; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataUom |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataUom : AuditedAggregateRoot<Guid> |
public class BasedataUom : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
|
||||
public string Type { get; set; } = null!; |
public string Type { get; set; } = null!; |
||||
|
} |
||||
} |
} |
@ -1,16 +1,17 @@ |
|||||
namespace WinIn.FasterZ.Wms.Z_Business.BasedataWarehouse; |
namespace WinIn.FasterZ.Wms.Z_Business.BasedataWarehouse |
||||
|
{ |
||||
using System; |
using System; |
||||
|
|
||||
using Volo.Abp.Domain.Entities.Auditing; |
using Volo.Abp.Domain.Entities.Auditing; |
||||
|
|
||||
public class BasedataWarehouse : AuditedAggregateRoot<Guid> |
public class BasedataWarehouse : AuditedAggregateRoot<Guid> |
||||
{ |
{ |
||||
public string Code { get; set; } = null!; |
public string Code { get; set; } = null!; |
||||
|
|
||||
public string? Description { get; set; } |
public string? Description { get; set; } |
||||
|
|
||||
public string? Name { get; set; } |
public string? Name { get; set; } |
||||
|
|
||||
public string? Remark { get; set; } |
public string? Remark { get; set; } |
||||
|
} |
||||
} |
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue