Store Stock Entry, Exit ve Transfer
This commit is contained in:
parent
09edf0ffed
commit
a637458352
19 changed files with 137 additions and 55 deletions
|
|
@ -5,6 +5,6 @@ namespace Erp.Platform.AiBots;
|
||||||
|
|
||||||
public class AiBotDto : FullAuditedEntityDto<Guid>
|
public class AiBotDto : FullAuditedEntityDto<Guid>
|
||||||
{
|
{
|
||||||
public string BotName { get; set; }
|
public string Name { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -272,7 +272,7 @@ public static class LookupQueryValues
|
||||||
$"\"Name\" AS \"Name\" " +
|
$"\"Name\" AS \"Name\" " +
|
||||||
$"FROM \"{FullNameTable(TableNameEnum.ReferenceType)}\" " +
|
$"FROM \"{FullNameTable(TableNameEnum.ReferenceType)}\" " +
|
||||||
$"WHERE " +
|
$"WHERE " +
|
||||||
$"(\"MovementTypeName\" = '{movementTypeName}') " +
|
$"(\"MovementTypeName\" = N'{movementTypeName}') " +
|
||||||
$"AND \"IsDeleted\" = 'false' " +
|
$"AND \"IsDeleted\" = 'false' " +
|
||||||
$"ORDER BY \"Name\";";
|
$"ORDER BY \"Name\";";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"AiBots": [
|
"AiBots": [
|
||||||
{
|
{
|
||||||
"BotName": "Chat Bot",
|
"Name": "Chat Bot",
|
||||||
"Description": "A general purpose chat bot that can answer questions and have conversations.",
|
"Description": "A general purpose chat bot that can answer questions and have conversations.",
|
||||||
"ApiUrl": "https://api.openai.com/v1/chat/completions",
|
"ApiUrl": "https://api.openai.com/v1/chat/completions",
|
||||||
"IsActive": true
|
"IsActive": true
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace Erp.Platform.Data.Seeds;
|
||||||
#region SeedDtos
|
#region SeedDtos
|
||||||
public class AiBotSeedDto
|
public class AiBotSeedDto
|
||||||
{
|
{
|
||||||
public string BotName { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string ApiUrl { get; set; }
|
public string ApiUrl { get; set; }
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
|
|
@ -670,13 +670,13 @@ public class HostDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
|
|
||||||
foreach (var item in items.AiBots)
|
foreach (var item in items.AiBots)
|
||||||
{
|
{
|
||||||
var exists = await _aiBotRepository.AnyAsync(x => x.BotName == item.BotName);
|
var exists = await _aiBotRepository.AnyAsync(x => x.Name == item.Name);
|
||||||
|
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
await _aiBotRepository.InsertAsync(new AiBot
|
await _aiBotRepository.InsertAsync(new AiBot
|
||||||
{
|
{
|
||||||
BotName = item.BotName,
|
Name = item.Name,
|
||||||
Description = item.Description,
|
Description = item.Description,
|
||||||
ApiUrl = item.ApiUrl,
|
ApiUrl = item.ApiUrl,
|
||||||
IsActive = item.IsActive
|
IsActive = item.IsActive
|
||||||
|
|
|
||||||
|
|
@ -9784,8 +9784,8 @@
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "App.Store.MovementItem",
|
"key": "App.Store.MovementItem",
|
||||||
"tr": "Stok Hareket Ürünleri",
|
"tr": "Stok Hareketleri",
|
||||||
"en": "Stock Movement Items"
|
"en": "Stock Movements"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
|
|
|
||||||
|
|
@ -1552,7 +1552,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>()
|
||||||
{
|
{
|
||||||
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [
|
new() { Order=1, ColCount=1, ColSpan=1, ItemType="group", Items = [
|
||||||
new EditingFormItemDto { Order=1, DataField="BotName", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=1, DataField="Name", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=2, DataField="Description", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextArea },
|
new EditingFormItemDto { Order=2, DataField="Description", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextArea },
|
||||||
new EditingFormItemDto { Order=3, DataField="ApiUrl", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
new EditingFormItemDto { Order=3, DataField="ApiUrl", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxTextBox },
|
||||||
new EditingFormItemDto { Order=4, DataField="IsActive", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxCheckBox }
|
new EditingFormItemDto { Order=4, DataField="IsActive", ColSpan=1, IsRequired=true, EditorType2=EditorTypes.dxCheckBox }
|
||||||
|
|
@ -1587,7 +1587,7 @@ public class ListFormSeeder_Saas : IDataSeedContributor, ITransientDependency
|
||||||
ListFormCode = listForm.ListFormCode,
|
ListFormCode = listForm.ListFormCode,
|
||||||
CultureName = LanguageCodes.En,
|
CultureName = LanguageCodes.En,
|
||||||
SourceDbType = DbType.String,
|
SourceDbType = DbType.String,
|
||||||
FieldName = "BotName",
|
FieldName = "Name",
|
||||||
Width = 100,
|
Width = 100,
|
||||||
ListOrderNo = 2,
|
ListOrderNo = 2,
|
||||||
Visible = true,
|
Visible = true,
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
{
|
{
|
||||||
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
var utils = new SeederUtils(_listFormRepository, _listFormFieldRepository);
|
||||||
var listFormName = String.Empty;
|
var listFormName = String.Empty;
|
||||||
var movementType = String.Empty;
|
|
||||||
|
|
||||||
#region Warehouse Type
|
#region Warehouse Type
|
||||||
listFormName = AppCodes.Store.WarehouseType;
|
listFormName = AppCodes.Store.WarehouseType;
|
||||||
|
|
@ -2645,6 +2644,21 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsTransfer",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 17,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
]);
|
]);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
@ -2652,7 +2666,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
|
|
||||||
#region Stock Entry
|
#region Stock Entry
|
||||||
listFormName = AppCodes.Store.Entry;
|
listFormName = AppCodes.Store.Entry;
|
||||||
movementType = "Giriş";
|
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
|
@ -2676,7 +2689,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement)),
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement)),
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = $"\"IsDeleted\" = 'false' AND \"MovementType\" = '{movementType}'",
|
DefaultFilter = $"\"IsDeleted\" = 'false' AND \"MovementType\" = N'Giriş'",
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
|
@ -2689,7 +2702,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = '{movementType}' WHERE \"Id\" = @Id;",
|
InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Giriş' WHERE \"Id\" = @Id;",
|
||||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() {
|
new() {
|
||||||
|
|
@ -2809,7 +2822,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = LookupQueryValues.ReferenceTypeValues(movementType),
|
LookupQuery = LookupQueryValues.ReferenceTypeValues("Giriş"),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -2846,6 +2859,21 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsTransfer",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
@ -3119,7 +3147,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
|
|
||||||
#region Stock Exit
|
#region Stock Exit
|
||||||
listFormName = AppCodes.Store.Exit;
|
listFormName = AppCodes.Store.Exit;
|
||||||
movementType = "Çıkış";
|
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
|
@ -3143,7 +3170,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement)),
|
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement)),
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = $"\"IsDeleted\" = 'false' AND \"MovementType\" = '{movementType}'",
|
DefaultFilter = $"\"IsDeleted\" = 'false' AND \"MovementType\" = N'Çıkış'",
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
|
@ -3156,7 +3183,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||||
PagerOptionJson = DefaultPagerOptionJson,
|
PagerOptionJson = DefaultPagerOptionJson,
|
||||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||||
InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = '{movementType}' WHERE \"Id\" = @Id;",
|
InsertAfterCommand = $"UPDATE {TableNameResolver.GetFullTableName(nameof(TableNameEnum.Movement))} SET \"MovementType\" = 'Çıkış' WHERE \"Id\" = @Id;",
|
||||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false),
|
EditingOptionJson = DefaultEditingOptionJson(listFormName, 600, 300, true, true, true, true, false),
|
||||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||||
new() {
|
new() {
|
||||||
|
|
@ -3276,7 +3303,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
DataSourceType = UiLookupDataSourceTypeEnum.Query,
|
||||||
DisplayExpr = "Name",
|
DisplayExpr = "Name",
|
||||||
ValueExpr = "Key",
|
ValueExpr = "Key",
|
||||||
LookupQuery = LookupQueryValues.ReferenceTypeValues(movementType),
|
LookupQuery = LookupQueryValues.ReferenceTypeValues("Çıkış"),
|
||||||
}),
|
}),
|
||||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
|
@ -3313,6 +3340,21 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
PivotSettingsJson = DefaultPivotSettingsJson
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
},
|
},
|
||||||
|
new() {
|
||||||
|
ListFormCode = listForm.ListFormCode,
|
||||||
|
CultureName = LanguageCodes.En,
|
||||||
|
SourceDbType = DbType.Boolean,
|
||||||
|
FieldName = "IsTransfer",
|
||||||
|
Width = 100,
|
||||||
|
ListOrderNo = 8,
|
||||||
|
Visible = true,
|
||||||
|
IsActive = true,
|
||||||
|
IsDeleted = false,
|
||||||
|
AllowSearch = true,
|
||||||
|
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||||
|
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||||
|
PivotSettingsJson = DefaultPivotSettingsJson
|
||||||
|
},
|
||||||
], autoSave: true);
|
], autoSave: true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
@ -3587,7 +3629,6 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
|
|
||||||
#region Stock Transfer
|
#region Stock Transfer
|
||||||
listFormName = AppCodes.Store.Transfer;
|
listFormName = AppCodes.Store.Transfer;
|
||||||
movementType = "Transfer";
|
|
||||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||||
{
|
{
|
||||||
var listForm = await _listFormRepository.InsertAsync(
|
var listForm = await _listFormRepository.InsertAsync(
|
||||||
|
|
@ -3611,7 +3652,7 @@ public class ListFormSeeder_Warehouse : IDataSeedContributor, ITransientDependen
|
||||||
SelectCommand = TableNameResolver.GetFullSpecialViewName(MenuPrefix.Store, TablePrefix.TenantPrefix, nameof(TableNameEnum.TransferItem)),
|
SelectCommand = TableNameResolver.GetFullSpecialViewName(MenuPrefix.Store, TablePrefix.TenantPrefix, nameof(TableNameEnum.TransferItem)),
|
||||||
KeyFieldName = "Id",
|
KeyFieldName = "Id",
|
||||||
KeyFieldDbSourceType = DbType.Guid,
|
KeyFieldDbSourceType = DbType.Guid,
|
||||||
DefaultFilter = $"\"IsDeleted\" = 'false' AND \"MovementType\" = '{movementType}'",
|
DefaultFilter = $"\"IsDeleted\" = 'false' AND \"IsTransfer\" = 'true'",
|
||||||
SortMode = GridOptions.SortModeSingle,
|
SortMode = GridOptions.SortModeSingle,
|
||||||
FilterRowJson = DefaultFilterRowJson,
|
FilterRowJson = DefaultFilterRowJson,
|
||||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ namespace Erp.Platform.Entities;
|
||||||
|
|
||||||
public class AiBot : Entity<Guid>
|
public class AiBot : Entity<Guid>
|
||||||
{
|
{
|
||||||
public string BotName { get; set; }
|
public string Name { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
public string ApiUrl { get; set; }
|
public string ApiUrl { get; set; }
|
||||||
public bool IsActive { get; set; }
|
public bool IsActive { get; set; }
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,7 @@ public class Movement : FullAuditedEntity<Guid>, IMultiTenant
|
||||||
public string ReferenceDocument { get; set; }
|
public string ReferenceDocument { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
|
||||||
|
public bool IsTransfer { get; set; }
|
||||||
|
|
||||||
public ICollection<MovementItem> MovementItems { get; set; }
|
public ICollection<MovementItem> MovementItems { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ public class PlatformDbContext :
|
||||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.AiBot)), Prefix.DbSchema);
|
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.AiBot)), Prefix.DbSchema);
|
||||||
b.ConfigureByConvention();
|
b.ConfigureByConvention();
|
||||||
|
|
||||||
b.Property(a => a.BotName).IsRequired().HasMaxLength(128);
|
b.Property(a => a.Name).IsRequired().HasMaxLength(128);
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.Entity<Branch>(b =>
|
builder.Entity<Branch>(b =>
|
||||||
|
|
@ -479,7 +479,7 @@ public class PlatformDbContext :
|
||||||
// Uzun JSON alanları için nvarchar(max)
|
// Uzun JSON alanları için nvarchar(max)
|
||||||
b.Property(a => a.SelectCommand).HasColumnType("text");
|
b.Property(a => a.SelectCommand).HasColumnType("text");
|
||||||
b.Property(a => a.SelectFieldsDefaultValueJson).HasColumnType("text");
|
b.Property(a => a.SelectFieldsDefaultValueJson).HasColumnType("text");
|
||||||
b.Property(a => a.DefaultFilter).HasColumnType("text");
|
b.Property(a => a.DefaultFilter).IsUnicode(true);
|
||||||
b.Property(a => a.ColumnOptionJson).HasColumnType("text");
|
b.Property(a => a.ColumnOptionJson).HasColumnType("text");
|
||||||
b.Property(a => a.PivotOptionJson).HasColumnType("text");
|
b.Property(a => a.PivotOptionJson).HasColumnType("text");
|
||||||
b.Property(a => a.FilterRowJson).HasColumnType("text");
|
b.Property(a => a.FilterRowJson).HasColumnType("text");
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
||||||
namespace Erp.Platform.Migrations
|
namespace Erp.Platform.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(PlatformDbContext))]
|
[DbContext(typeof(PlatformDbContext))]
|
||||||
[Migration("20251207201503_Initial")]
|
[Migration("20251208072106_Initial")]
|
||||||
partial class Initial
|
partial class Initial
|
||||||
{
|
{
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
|
|
@ -723,17 +723,17 @@ namespace Erp.Platform.Migrations
|
||||||
b.Property<string>("ApiUrl")
|
b.Property<string>("ApiUrl")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("BotName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(128)
|
|
||||||
.HasColumnType("nvarchar(128)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
b.Property<bool>("IsActive")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Plat_H_AiBot", (string)null);
|
b.ToTable("Plat_H_AiBot", (string)null);
|
||||||
|
|
@ -6232,7 +6232,8 @@ namespace Erp.Platform.Migrations
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("DefaultFilter")
|
b.Property<string>("DefaultFilter")
|
||||||
.HasColumnType("text");
|
.IsUnicode(true)
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteAfterCommand")
|
b.Property<string>("DeleteAfterCommand")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -7716,6 +7717,9 @@ namespace Erp.Platform.Migrations
|
||||||
.HasDefaultValue(false)
|
.HasDefaultValue(false)
|
||||||
.HasColumnName("IsDeleted");
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<bool>("IsTransfer")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("LastModificationTime");
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
@ -1667,7 +1667,7 @@ namespace Erp.Platform.Migrations
|
||||||
columns: table => new
|
columns: table => new
|
||||||
{
|
{
|
||||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
BotName = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
Name = table.Column<string>(type: "nvarchar(128)", maxLength: 128, nullable: false),
|
||||||
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
Description = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ApiUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
ApiUrl = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
IsActive = table.Column<bool>(type: "bit", nullable: false)
|
IsActive = table.Column<bool>(type: "bit", nullable: false)
|
||||||
|
|
@ -2267,7 +2267,7 @@ namespace Erp.Platform.Migrations
|
||||||
Width = table.Column<int>(type: "int", nullable: true),
|
Width = table.Column<int>(type: "int", nullable: true),
|
||||||
Height = table.Column<int>(type: "int", nullable: true),
|
Height = table.Column<int>(type: "int", nullable: true),
|
||||||
FullHeight = table.Column<bool>(type: "bit", nullable: false),
|
FullHeight = table.Column<bool>(type: "bit", nullable: false),
|
||||||
DefaultFilter = table.Column<string>(type: "text", nullable: true),
|
DefaultFilter = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
ColumnOptionJson = table.Column<string>(type: "text", nullable: true),
|
ColumnOptionJson = table.Column<string>(type: "text", nullable: true),
|
||||||
PivotOptionJson = table.Column<string>(type: "text", nullable: true),
|
PivotOptionJson = table.Column<string>(type: "text", nullable: true),
|
||||||
TreeOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
TreeOptionJson = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||||
|
|
@ -5411,6 +5411,7 @@ namespace Erp.Platform.Migrations
|
||||||
ReferenceTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
ReferenceTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||||
ReferenceDocument = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
ReferenceDocument = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||||
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
Description = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||||
|
IsTransfer = table.Column<bool>(type: "bit", nullable: false),
|
||||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||||
|
|
@ -720,17 +720,17 @@ namespace Erp.Platform.Migrations
|
||||||
b.Property<string>("ApiUrl")
|
b.Property<string>("ApiUrl")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("BotName")
|
|
||||||
.IsRequired()
|
|
||||||
.HasMaxLength(128)
|
|
||||||
.HasColumnType("nvarchar(128)");
|
|
||||||
|
|
||||||
b.Property<string>("Description")
|
b.Property<string>("Description")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<bool>("IsActive")
|
b.Property<bool>("IsActive")
|
||||||
.HasColumnType("bit");
|
.HasColumnType("bit");
|
||||||
|
|
||||||
|
b.Property<string>("Name")
|
||||||
|
.IsRequired()
|
||||||
|
.HasMaxLength(128)
|
||||||
|
.HasColumnType("nvarchar(128)");
|
||||||
|
|
||||||
b.HasKey("Id");
|
b.HasKey("Id");
|
||||||
|
|
||||||
b.ToTable("Plat_H_AiBot", (string)null);
|
b.ToTable("Plat_H_AiBot", (string)null);
|
||||||
|
|
@ -6229,7 +6229,8 @@ namespace Erp.Platform.Migrations
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<string>("DefaultFilter")
|
b.Property<string>("DefaultFilter")
|
||||||
.HasColumnType("text");
|
.IsUnicode(true)
|
||||||
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
||||||
b.Property<string>("DeleteAfterCommand")
|
b.Property<string>("DeleteAfterCommand")
|
||||||
.HasColumnType("nvarchar(max)");
|
.HasColumnType("nvarchar(max)");
|
||||||
|
|
@ -7713,6 +7714,9 @@ namespace Erp.Platform.Migrations
|
||||||
.HasDefaultValue(false)
|
.HasDefaultValue(false)
|
||||||
.HasColumnName("IsDeleted");
|
.HasColumnName("IsDeleted");
|
||||||
|
|
||||||
|
b.Property<bool>("IsTransfer")
|
||||||
|
.HasColumnType("bit");
|
||||||
|
|
||||||
b.Property<DateTime?>("LastModificationTime")
|
b.Property<DateTime?>("LastModificationTime")
|
||||||
.HasColumnType("datetime2")
|
.HasColumnType("datetime2")
|
||||||
.HasColumnName("LastModificationTime");
|
.HasColumnName("LastModificationTime");
|
||||||
|
|
|
||||||
|
|
@ -6545,11 +6545,6 @@
|
||||||
"name": "Çıkış",
|
"name": "Çıkış",
|
||||||
"description": "Envanterden malzeme çıkışı için kullanılan hareket türü",
|
"description": "Envanterden malzeme çıkışı için kullanılan hareket türü",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Transfer",
|
|
||||||
"description": "Malzemelerin bir depo veya lokasyondan diğerine transferi için kullanılan hareket türü",
|
|
||||||
"isActive": true
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"ReferenceTypes": [
|
"ReferenceTypes": [
|
||||||
|
|
@ -6572,8 +6567,14 @@
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Transfer Emri",
|
"name": "Transfer Giriş",
|
||||||
"movementTypeName": "Transfer",
|
"movementTypeName": "Giriş",
|
||||||
|
"description": "Transfer emirleri için kullanılan referans türü",
|
||||||
|
"isActive": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Transfer Çıkış",
|
||||||
|
"movementTypeName": "Çıkış",
|
||||||
"description": "Transfer emirleri için kullanılan referans türü",
|
"description": "Transfer emirleri için kullanılan referans türü",
|
||||||
"isActive": true
|
"isActive": true
|
||||||
},
|
},
|
||||||
|
|
@ -6604,7 +6605,8 @@
|
||||||
"movementType": "Giriş",
|
"movementType": "Giriş",
|
||||||
"referenceType": "Satın Alma Siparişi",
|
"referenceType": "Satın Alma Siparişi",
|
||||||
"referenceDocument": "PO-2024-001",
|
"referenceDocument": "PO-2024-001",
|
||||||
"description": "Satın Alma Siparişi"
|
"description": "Satın Alma Siparişi",
|
||||||
|
"isTransfer": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"movementNumber": "CI-2024-001",
|
"movementNumber": "CI-2024-001",
|
||||||
|
|
@ -6613,16 +6615,28 @@
|
||||||
"movementType": "Çıkış",
|
"movementType": "Çıkış",
|
||||||
"referenceType": "Satış Siparişi",
|
"referenceType": "Satış Siparişi",
|
||||||
"referenceDocument": "SO-2024-001",
|
"referenceDocument": "SO-2024-001",
|
||||||
"description": "Satış çıkışı"
|
"description": "Satış çıkışı",
|
||||||
|
"isTransfer": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"movementNumber": "TR-2024-001",
|
"movementNumber": "TR-2024-001",
|
||||||
"movementDate": "2024-01-17T10:30:00",
|
"movementDate": "2024-01-17T10:30:00",
|
||||||
"movementType": "Transfer",
|
"movementType": "Çıkış",
|
||||||
"partnerCode": null,
|
"partnerCode": null,
|
||||||
"referenceType": "Transfer Emri",
|
"referenceType": "Transfer Çıkış",
|
||||||
"referenceDocument": "TR-2024-001",
|
"referenceDocument": "TR-2024-001",
|
||||||
"description": "Depo transferi"
|
"description": "Depo transferi",
|
||||||
|
"isTransfer": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"movementNumber": "TR-2024-002",
|
||||||
|
"movementDate": "2024-01-17T10:30:00",
|
||||||
|
"movementType": "Giriş",
|
||||||
|
"partnerCode": null,
|
||||||
|
"referenceType": "Transfer Giriş",
|
||||||
|
"referenceDocument": "TR-2024-001",
|
||||||
|
"description": "Depo transferi",
|
||||||
|
"isTransfer": true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"MovementItems": [
|
"MovementItems": [
|
||||||
|
|
@ -6661,6 +6675,18 @@
|
||||||
"lotNumber": "LOT2024002",
|
"lotNumber": "LOT2024002",
|
||||||
"serialNumber": null,
|
"serialNumber": null,
|
||||||
"description": "Depo transferi"
|
"description": "Depo transferi"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"movementNumber": "TR-2024-002",
|
||||||
|
"materialCode": "PR001",
|
||||||
|
"warehouseCode": "WH-001",
|
||||||
|
"zoneCode": "Z002",
|
||||||
|
"locationCode": "A01-01-02",
|
||||||
|
"quantity": 10,
|
||||||
|
"uom": "m",
|
||||||
|
"lotNumber": "LOT2024002",
|
||||||
|
"serialNumber": null,
|
||||||
|
"description": "Depo transferi"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
@ -2813,7 +2813,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
||||||
ReferenceTypeId = referenceType?.Id,
|
ReferenceTypeId = referenceType?.Id,
|
||||||
PartnerId = partner?.Id,
|
PartnerId = partner?.Id,
|
||||||
ReferenceDocument = item.ReferenceDocument,
|
ReferenceDocument = item.ReferenceDocument,
|
||||||
Description = item.Description
|
Description = item.Description,
|
||||||
|
IsTransfer = item.IsTransfer
|
||||||
}, autoSave: true);
|
}, autoSave: true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,7 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency
|
||||||
m.PartnerId,
|
m.PartnerId,
|
||||||
m.ReferenceTypeId,
|
m.ReferenceTypeId,
|
||||||
m.ReferenceDocument,
|
m.ReferenceDocument,
|
||||||
|
m.IsTransfer,
|
||||||
m.Description AS MainDescription,
|
m.Description AS MainDescription,
|
||||||
|
|
||||||
mi.Id,
|
mi.Id,
|
||||||
|
|
@ -255,6 +256,7 @@ public class DatabaseViewSeeder : IDataSeedContributor, ITransientDependency
|
||||||
m.PartnerId,
|
m.PartnerId,
|
||||||
m.ReferenceTypeId,
|
m.ReferenceTypeId,
|
||||||
m.ReferenceDocument,
|
m.ReferenceDocument,
|
||||||
|
m.IsTransfer,
|
||||||
m.Description AS MainDescription,
|
m.Description AS MainDescription,
|
||||||
|
|
||||||
mi.Id,
|
mi.Id,
|
||||||
|
|
|
||||||
|
|
@ -158,6 +158,7 @@ public class MovementSeedDto
|
||||||
public string ReferenceType { get; set; }
|
public string ReferenceType { get; set; }
|
||||||
public string ReferenceDocument { get; set; }
|
public string ReferenceDocument { get; set; }
|
||||||
public string Description { get; set; }
|
public string Description { get; set; }
|
||||||
|
public bool IsTransfer { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MovementItemSeedDto
|
public class MovementItemSeedDto
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { FullAuditedEntityDto } from '../abp'
|
import { FullAuditedEntityDto } from '../abp'
|
||||||
|
|
||||||
export interface AiDto extends FullAuditedEntityDto<string> {
|
export interface AiDto extends FullAuditedEntityDto<string> {
|
||||||
botName: string
|
name: string
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,12 +63,12 @@ const Assistant = () => {
|
||||||
const result = await aiService.getList({
|
const result = await aiService.getList({
|
||||||
skipCount: 0,
|
skipCount: 0,
|
||||||
maxResultCount: 1000,
|
maxResultCount: 1000,
|
||||||
sorting: 'botName',
|
sorting: 'name',
|
||||||
})
|
})
|
||||||
const items =
|
const items =
|
||||||
result?.data?.items?.map((bot: AiDto) => ({
|
result?.data?.items?.map((bot: AiDto) => ({
|
||||||
key: bot.id!,
|
key: bot.id!,
|
||||||
name: bot.botName,
|
name: bot.name,
|
||||||
})) ?? []
|
})) ?? []
|
||||||
|
|
||||||
setBot(items)
|
setBot(items)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue