Mrp Production Orders
This commit is contained in:
parent
582765aa0f
commit
db0b19d919
21 changed files with 2446 additions and 171 deletions
|
|
@ -10129,12 +10129,30 @@
|
|||
"tr": "Ürün Ağaçları Operasyonları",
|
||||
"en": "Bill of Materials Operations"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.ProductionOrderType",
|
||||
"tr": "Sipariş Türleri",
|
||||
"en": "Order Types"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.ProductionOrderStatus",
|
||||
"tr": "Sipariş Durumları",
|
||||
"en": "Order Statuses"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.ProductionOrder",
|
||||
"tr": "Üretim Emirleri",
|
||||
"en": "Production Orders"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.ProductionOrderItem",
|
||||
"tr": "Üretim Emri Ürünleri",
|
||||
"en": "Production Order Items"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.WorkOrder",
|
||||
|
|
|
|||
|
|
@ -2455,8 +2455,8 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
new EditingFormItemDto { Order = 1, DataField="OrderNumber", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxTextBox, EditorOptions = EditorOptionValues.Disabled },
|
||||
new EditingFormItemDto { Order = 2, DataField="OrderDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||
new EditingFormItemDto { Order = 3, DataField="CustomerId", ColSpan = 2, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField="RequestedDeliveryDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||
new EditingFormItemDto { Order = 5, DataField="ConfirmedDeliveryDate", ColSpan = 1, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||
new EditingFormItemDto { Order = 4, DataField="RequestedDeliveryDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||
new EditingFormItemDto { Order = 5, DataField="ConfirmedDeliveryDate", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxDateBox, EditorOptions = EditorOptionValues.DateFormat },
|
||||
new EditingFormItemDto { Order = 6, DataField="Status", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 7, DataField="Currency", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 8, DataField="PaymentTermId", ColSpan = 1, IsRequired = true, EditorType2 = EditorTypes.dxSelectBox },
|
||||
|
|
@ -2574,6 +2574,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
@ -2589,6 +2590,7 @@ public class ListFormSeeder_Crm : IDataSeedContributor, ITransientDependency
|
|||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -175,7 +176,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -404,7 +406,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -714,7 +717,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -836,7 +840,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -1057,7 +1062,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -1302,7 +1308,8 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List, ExportJson = DefaultExportJson,
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
|
|
@ -1566,6 +1573,888 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#region Order Type
|
||||
listFormName = AppCodes.Mrp.ProductionOrderType;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderType)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrderType)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
#region Production Order Type Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 500,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Production Order Status
|
||||
listFormName = AppCodes.Mrp.ProductionOrderStatus;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.OrderStatus)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.OrderStatus)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 250, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "Name", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "Description", ColSpan = 1, EditorType2=EditorTypes.dxTextArea },
|
||||
new EditingFormItemDto { Order = 3, DataField = "IsActive", ColSpan = 1, EditorType2=EditorTypes.dxCheckBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "IsActive", FieldDbType = DbType.Boolean, Value = "true", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}
|
||||
);
|
||||
|
||||
#region Production Order Status Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Name",
|
||||
Width = 350,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderAsc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Description",
|
||||
Width = 500,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Boolean,
|
||||
FieldName = "IsActive",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
]);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Production Order
|
||||
listFormName = AppCodes.Mrp.ProductionOrder;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrder)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrder)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 800, 450, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=2, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "OrderNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "OrderTypeId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "StatusId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 4, DataField = "Priority", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "PlannedStartDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 6, DataField = "PlannedEndDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 7, DataField = "ActualStartDate", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 8, DataField = "ActualEndDate", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 9, DataField = "PlannedQuantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 10, DataField = "ConfirmedQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 11, DataField = "RequiredQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 12, DataField = "ScrapQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 13, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 14, DataField = "Currency", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 15, DataField = "PlannedCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 16, DataField = "ActualCost", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 17, DataField = "CustomerRequirement", ColSpan = 2, EditorType2=EditorTypes.dxTextArea },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "OrderNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() { FieldName = "Priority", FieldDbType = DbType.String, Value = "Low", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "PlannedStartDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() { FieldName = "PlannedEndDate", FieldDbType = DbType.Date, Value = "@DATE", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() { FieldName = "PlannedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ConfirmedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "RequiredQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ScrapQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "PlannedCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ActualCost", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "Currency", FieldDbType = DbType.String, Value = "TRY", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] {
|
||||
new() {
|
||||
Hint = "Items",
|
||||
Text ="Items",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true
|
||||
},
|
||||
new() {
|
||||
Hint = "Work Orders",
|
||||
Text ="Work Orders",
|
||||
UrlTarget="_blank",
|
||||
AuthName = listFormName,
|
||||
Url=$"/admin/form/{SeederUtils.GetDefaultFormCodes(listFormName)}/@Id",
|
||||
IsVisible = true,
|
||||
VisibleExpression = "(e) => e.row.data.ConfirmedQuantity == 0"
|
||||
},
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Production Order Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "OrderNumber",
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
SortIndex = 1,
|
||||
SortDirection = GridColumnOptions.SortOrderDesc,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "OrderTypeId",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ProductionOrderType), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "StatusId",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ProductionOrderStatus), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Priority",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = JsonSerializer.Serialize(new LookupDto
|
||||
{
|
||||
DataSourceType = UiLookupDataSourceTypeEnum.StaticData,
|
||||
ValueExpr = "key",
|
||||
DisplayExpr = "name",
|
||||
LookupQuery = JsonSerializer.Serialize(new LookupDataDto[] {
|
||||
new () { Key = "Low", Name = "Low" },
|
||||
new () { Key = "Medium", Name = "Medium" },
|
||||
new () { Key = "High", Name = "High" },
|
||||
new () { Key = "Urgent", Name = "Urgent" },
|
||||
}),
|
||||
}),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.DateTime,
|
||||
FieldName = "PlannedStartDate",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.DateTime,
|
||||
FieldName = "PlannedEndDate",
|
||||
Width = 150,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.DateTime,
|
||||
FieldName = "ActualStartDate",
|
||||
Width = 150,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.DateTime,
|
||||
FieldName = "ActualEndDate",
|
||||
Width = 150,
|
||||
ListOrderNo = 9,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "PlannedQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 10,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "ConfirmedQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 11,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "RequiredQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 12,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "ScrapQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 13,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Uom",
|
||||
Width = 100,
|
||||
ListOrderNo = 14,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "PlannedCost",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 15,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "ActualCost",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 16,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Currency",
|
||||
Width = 100,
|
||||
ListOrderNo = 17,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Currency), "Code", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "CustomerRequirement",
|
||||
Width = 100,
|
||||
ListOrderNo = 18,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Production Order Items
|
||||
listFormName = AppCodes.Mrp.ProductionOrderItem;
|
||||
if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == listFormName))
|
||||
{
|
||||
var listForm = await _listFormRepository.InsertAsync(
|
||||
new ListForm()
|
||||
{
|
||||
ListFormType = ListFormTypeEnum.List,
|
||||
ExportJson = DefaultExportJson,
|
||||
IsSubForm = false,
|
||||
ShowNote = true,
|
||||
LayoutJson = DefaultLayoutJson(),
|
||||
CultureName = LanguageCodes.En,
|
||||
ListFormCode = listFormName,
|
||||
Name = listFormName,
|
||||
Title = listFormName,
|
||||
DataSourceCode = SeedConsts.DataSources.DefaultCode,
|
||||
IsTenant = true,
|
||||
IsBranch = false,
|
||||
IsOrganizationUnit = false,
|
||||
Description = listFormName,
|
||||
SelectCommandType = SelectCommandTypeEnum.Table,
|
||||
SelectCommand = TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderItem)),
|
||||
KeyFieldName = "Id",
|
||||
KeyFieldDbSourceType = DbType.Guid,
|
||||
DefaultFilter = DefaultFilterJson,
|
||||
SortMode = GridOptions.SortModeSingle,
|
||||
FilterRowJson = DefaultFilterRowJson,
|
||||
HeaderFilterJson = DefaultHeaderFilterJson,
|
||||
SearchPanelJson = DefaultSearchPanelJson,
|
||||
GroupPanelJson = DefaultGroupPanelJson,
|
||||
SelectionJson = DefaultSelectionSingleJson,
|
||||
ColumnOptionJson = DefaultColumnOptionJson,
|
||||
PermissionJson = DefaultPermissionJson(listFormName),
|
||||
DeleteCommand = DefaultDeleteCommand(nameof(TableNameEnum.ProductionOrderItem)),
|
||||
DeleteFieldsDefaultValueJson = DefaultDeleteFieldsDefaultValueJson,
|
||||
PagerOptionJson = DefaultPagerOptionJson,
|
||||
InsertFieldsDefaultValueJson = DefaultInsertFieldsDefaultValueJson,
|
||||
EditingOptionJson = DefaultEditingOptionJson(listFormName, 500, 400, true, true, true, true, false),
|
||||
EditingFormJson = JsonSerializer.Serialize(new List<EditingFormDto>() {
|
||||
new() {
|
||||
Order=1, ColCount=1, ColSpan=1, ItemType="group", Items= [
|
||||
new EditingFormItemDto { Order = 1, DataField = "SalesOrderId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 2, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "Uom", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox },
|
||||
new EditingFormItemDto { Order = 4, DataField = "PlannedQuantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 5, DataField = "ConfirmedQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 6, DataField = "RequiredQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 7, DataField = "ScrapQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "Uom", FieldDbType = DbType.String, Value = "Adet", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "PlannedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ConfirmedQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "RequiredQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ScrapQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value }
|
||||
})
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Production Order Items Fields
|
||||
await _listFormFieldRepository.InsertManyAsync([
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "Id",
|
||||
Width = 100,
|
||||
ListOrderNo = 1,
|
||||
Visible = false,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "SalesOrderId",
|
||||
Width = 150,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.SalesOrder), "Id", "OrderNumber"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "MaterialId",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Material), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.String,
|
||||
FieldName = "Uom",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Uom), "Name", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "PlannedQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 5,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "ConfirmedQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "RequiredQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Decimal,
|
||||
FieldName = "ScrapQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
}
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
// Production Order ve Production Order Item Sub Forms ilişkisinin kurulması
|
||||
await utils.CloneFormLayoutAsync(
|
||||
AppCodes.Mrp.ProductionOrder,
|
||||
JsonSerializer.Serialize(new List<dynamic>() {
|
||||
new {
|
||||
TabType = ListFormTabTypeEnum.List,
|
||||
TabTitle = AppCodes.Mrp.ProductionOrderItem,
|
||||
Code = AppCodes.Mrp.ProductionOrderItem,
|
||||
Relation = new List<dynamic>() {
|
||||
new {
|
||||
ParentFieldName = "Id",
|
||||
DbType = DbType.Guid,
|
||||
ChildFieldName = "ProductionOrderId"
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,18 +152,14 @@
|
|||
"path": "/admin/menuManager",
|
||||
"componentPath": "@/views/menu/MenuManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Menus.Manager"
|
||||
]
|
||||
"authority": ["App.Menus.Manager"]
|
||||
},
|
||||
{
|
||||
"key": "admin.listFormManagement.wizard",
|
||||
"path": "/admin/listform/wizard",
|
||||
"componentPath": "@/views/admin/listForm/Wizard",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Listforms.Wizard"
|
||||
]
|
||||
"authority": ["App.Listforms.Wizard"]
|
||||
},
|
||||
{
|
||||
"key": "admin.listFormManagement.edit",
|
||||
|
|
@ -177,18 +173,14 @@
|
|||
"path": "/admin/forumManagement",
|
||||
"componentPath": "@/views/forum/Management",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.ForumManagement"
|
||||
]
|
||||
"authority": ["App.ForumManagement"]
|
||||
},
|
||||
{
|
||||
"key": "admin.ai",
|
||||
"path": "/admin/ai",
|
||||
"componentPath": "@/views/ai/Assistant",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"Abp.Identity.Ai"
|
||||
]
|
||||
"authority": ["Abp.Identity.Ai"]
|
||||
},
|
||||
{
|
||||
"key": "admin.profile.general",
|
||||
|
|
@ -230,36 +222,28 @@
|
|||
"path": "/admin/settings",
|
||||
"componentPath": "@/views/settings/Settings",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Setting"
|
||||
]
|
||||
"authority": ["App.Setting"]
|
||||
},
|
||||
{
|
||||
"key": "admin.identity.user.detail",
|
||||
"path": "/admin/users/detail/:userId",
|
||||
"componentPath": "@/views/admin/user-management/Details",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"AbpIdentity.Users.Update"
|
||||
]
|
||||
"authority": ["AbpIdentity.Users.Update"]
|
||||
},
|
||||
{
|
||||
"key": "admin.identity.ous",
|
||||
"path": "/admin/ous",
|
||||
"componentPath": "@/views/admin/organization-unit/OrganizationUnits",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"Abp.Identity.OrganizationUnits"
|
||||
]
|
||||
"authority": ["Abp.Identity.OrganizationUnits"]
|
||||
},
|
||||
{
|
||||
"key": "admin.forum",
|
||||
"path": "/admin/forum",
|
||||
"componentPath": "@/views/forum/Forum",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.ForumManagement.Publish"
|
||||
]
|
||||
"authority": ["App.ForumManagement.Publish"]
|
||||
},
|
||||
{
|
||||
"key": "admin.list",
|
||||
|
|
@ -301,225 +285,175 @@
|
|||
"path": "/admin/sqlQueryManager",
|
||||
"componentPath": "@/views/sqlQueryManager/SqlQueryManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.SqlQueryManager"
|
||||
]
|
||||
"authority": ["App.SqlQueryManager"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit",
|
||||
"path": "/admin/developerkit",
|
||||
"componentPath": "@/views/developerKit/DashboardPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit"
|
||||
]
|
||||
"authority": ["App.DeveloperKit"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities",
|
||||
"path": "/admin/developerkit/entities",
|
||||
"componentPath": "@/views/developerKit/EntityPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities.new",
|
||||
"path": "/admin/developerkit/entities/new",
|
||||
"componentPath": "@/views/developerKit/EntityDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.entities.edit",
|
||||
"path": "/admin/developerkit/entities/edit/:id",
|
||||
"componentPath": "@/views/developerKit/EntityDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Entity"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Entity"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.migrations",
|
||||
"path": "/admin/developerkit/migrations",
|
||||
"componentPath": "@/views/developerKit/MigrationPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Migrations"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Migrations"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.endpoints",
|
||||
"path": "/admin/developerkit/endpoints",
|
||||
"componentPath": "@/views/developerKit/CrudEndpointPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.CrudEndpoints"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.CrudEndpoints"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.dynamic-services",
|
||||
"path": "/admin/developerkit/dynamic-services",
|
||||
"componentPath": "@/views/developerKit/DynamicServicePage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.DynamicServices"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.DynamicServices"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components",
|
||||
"path": "/admin/developerkit/components",
|
||||
"componentPath": "@/views/developerKit/ComponentPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.new",
|
||||
"path": "/admin/developerkit/components/new",
|
||||
"componentPath": "@/views/developerKit/ComponentDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.view",
|
||||
"path": "/admin/developerkit/components/view/:id",
|
||||
"componentPath": "@/views/developerKit/ComponentDetailPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.developerkit.components.edit",
|
||||
"path": "/admin/developerkit/components/edit/:id",
|
||||
"componentPath": "@/views/developerKit/CodePage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.DeveloperKit.Components"
|
||||
]
|
||||
"authority": ["App.DeveloperKit.Components"]
|
||||
},
|
||||
{
|
||||
"key": "admin.reportManagement",
|
||||
"path": "/admin/reports/management",
|
||||
"componentPath": "@/views/report/DashboardPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Reports.Management"
|
||||
]
|
||||
"authority": ["App.Reports.Management"]
|
||||
},
|
||||
{
|
||||
"key": "admin.reports.view",
|
||||
"path": "/admin/reports/:id",
|
||||
"componentPath": "@/views/report/ReportViewerPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Reports.Categories"
|
||||
]
|
||||
"authority": ["App.Reports.Categories"]
|
||||
},
|
||||
{
|
||||
"key": "admin.fileManagement",
|
||||
"path": "/admin/files",
|
||||
"componentPath": "@/views/admin/files/FileManager",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Files"
|
||||
]
|
||||
"authority": ["App.Files"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.dashboard",
|
||||
"path": "/admin/coordinator/classroom/dashboard",
|
||||
"componentPath": "@/views/coordinator/Classroom/Dashboard",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.Dashboard"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.Dashboard"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.classes",
|
||||
"path": "/admin/coordinator/classroom/classes",
|
||||
"componentPath": "@/views/coordinator/Classroom/ClassList",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.List"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.List"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.classroom",
|
||||
"path": "/admin/coordinator/classroom/room/:id",
|
||||
"componentPath": "@/views/coordinator/Classroom/RoomDetail",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.RoomDetail"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.RoomDetail"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.classroom.planning",
|
||||
"path": "/admin/coordinator/classroom/planning/:id",
|
||||
"componentPath": "@/views/coordinator/Classroom/PlanningPage",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Classroom.Planning"
|
||||
]
|
||||
"authority": ["App.Coordinator.Classroom.Planning"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.exams",
|
||||
"path": "/admin/coordinator/exams",
|
||||
"componentPath": "@/views/coordinator/Exams",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Exams"
|
||||
]
|
||||
"authority": ["App.Coordinator.Exams"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.examDetail",
|
||||
"path": "/admin/coordinator/exam/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Exams"
|
||||
]
|
||||
"authority": ["App.Coordinator.Exams"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.assignments",
|
||||
"path": "/admin/coordinator/assignments",
|
||||
"componentPath": "@/views/coordinator/Assignments",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Assignments"
|
||||
]
|
||||
"authority": ["App.Coordinator.Assignments"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.assignmentDetail",
|
||||
"path": "/admin/coordinator/assignment/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/ExamInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Assignments"
|
||||
]
|
||||
"authority": ["App.Coordinator.Assignments"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.tests",
|
||||
"path": "/admin/coordinator/tests",
|
||||
"componentPath": "@/views/coordinator/Tests",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Tests"
|
||||
]
|
||||
"authority": ["App.Coordinator.Tests"]
|
||||
},
|
||||
{
|
||||
"key": "admin.coordinator.testDetail",
|
||||
"path": "/admin/coordinator/test/:id",
|
||||
"componentPath": "@/views/coordinator/ExamInterface/PDFTestInterface",
|
||||
"routeType": "protected",
|
||||
"authority": [
|
||||
"App.Coordinator.Tests"
|
||||
]
|
||||
"authority": ["App.Coordinator.Tests"]
|
||||
},
|
||||
{
|
||||
"key": "admin.supplychain.requests",
|
||||
|
|
@ -3063,7 +2997,7 @@
|
|||
"DisplayName": "App.Mrp.OperationCategory",
|
||||
"Order": 1,
|
||||
"Url": "/admin/list/App.Mrp.OperationCategory",
|
||||
"Icon": "FcEngineering",
|
||||
"Icon": "FcDepartment",
|
||||
"RequiredPermissionName": "App.Mrp.OperationCategory",
|
||||
"IsDisabled": false
|
||||
},
|
||||
|
|
@ -3073,7 +3007,7 @@
|
|||
"DisplayName": "App.Mrp.OperationType",
|
||||
"Order": 2,
|
||||
"Url": "/admin/list/App.Mrp.OperationType",
|
||||
"Icon": "FcAutomatic",
|
||||
"Icon": "FcTemplate",
|
||||
"RequiredPermissionName": "App.Mrp.OperationType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
|
|
@ -3093,7 +3027,7 @@
|
|||
"DisplayName": "App.Mrp.WorkcenterType",
|
||||
"Order": 4,
|
||||
"Url": "/admin/list/App.Mrp.WorkcenterType",
|
||||
"Icon": "FcOrganization",
|
||||
"Icon": "FcTreeStructure",
|
||||
"RequiredPermissionName": "App.Mrp.WorkcenterType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
|
|
@ -3113,7 +3047,7 @@
|
|||
"DisplayName": "App.Mrp.Workcenter",
|
||||
"Order": 6,
|
||||
"Url": "/admin/list/App.Mrp.Workcenter",
|
||||
"Icon": "FcWorkflow",
|
||||
"Icon": "FcFactory",
|
||||
"RequiredPermissionName": "App.Mrp.Workcenter",
|
||||
"IsDisabled": false
|
||||
},
|
||||
|
|
@ -3127,12 +3061,32 @@
|
|||
"RequiredPermissionName": "App.Mrp.Bom",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp.Definitions",
|
||||
"Code": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "App.Mrp.ProductionOrderType",
|
||||
"Order": 8,
|
||||
"Url": "/admin/list/App.Mrp.ProductionOrderType",
|
||||
"Icon": "FcSettings",
|
||||
"RequiredPermissionName": "App.Mrp.ProductionOrderType",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp.Definitions",
|
||||
"Code": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "App.Mrp.ProductionOrderStatus",
|
||||
"Order": 9,
|
||||
"Url": "/admin/list/App.Mrp.ProductionOrderStatus",
|
||||
"Icon": "FcApproval",
|
||||
"RequiredPermissionName": "App.Mrp.ProductionOrderStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.ProductionOrder",
|
||||
"DisplayName": "App.Mrp.ProductionOrder",
|
||||
"Order": 2,
|
||||
"Url": "/admin/mrp/production-orders",
|
||||
"Url": "/admin/list/App.Mrp.ProductionOrder",
|
||||
"Icon": "FcFactory",
|
||||
"RequiredPermissionName": "App.Mrp.ProductionOrder",
|
||||
"IsDisabled": false
|
||||
|
|
@ -3147,31 +3101,11 @@
|
|||
"RequiredPermissionName": "App.Mrp.WorkOrder",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.DemandPlanning",
|
||||
"DisplayName": "App.Mrp.DemandPlanning",
|
||||
"Order": 4,
|
||||
"Url": "/admin/mrp/demand-planning",
|
||||
"Icon": "FcPlanner",
|
||||
"RequiredPermissionName": "App.Mrp.DemandPlanning",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.MaterialRequirement",
|
||||
"DisplayName": "App.Mrp.MaterialRequirement",
|
||||
"Order": 5,
|
||||
"Url": "/admin/mrp/material-requirements",
|
||||
"Icon": "FcDataSheet",
|
||||
"RequiredPermissionName": "App.Mrp.MaterialRequirement",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.PlanningGantt",
|
||||
"DisplayName": "App.Mrp.PlanningGantt",
|
||||
"Order": 6,
|
||||
"Order": 4,
|
||||
"Url": "/admin/mrp/planning-gantt",
|
||||
"Icon": "FcTimeline",
|
||||
"RequiredPermissionName": "App.Mrp.PlanningGantt",
|
||||
|
|
@ -3328,4 +3262,4 @@
|
|||
"IsDisabled": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12865,6 +12865,199 @@
|
|||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.ProductionOrderType",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType.Create",
|
||||
"ParentName": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType.Update",
|
||||
"ParentName": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType.Delete",
|
||||
"ParentName": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType.Export",
|
||||
"ParentName": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType.Import",
|
||||
"ParentName": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderType.Note",
|
||||
"ParentName": "App.Mrp.ProductionOrderType",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.ProductionOrderStatus",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus.Create",
|
||||
"ParentName": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus.Update",
|
||||
"ParentName": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus.Delete",
|
||||
"ParentName": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus.Export",
|
||||
"ParentName": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus.Import",
|
||||
"ParentName": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderStatus.Note",
|
||||
"ParentName": "App.Mrp.ProductionOrderStatus",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.ProductionOrderItem",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem.Create",
|
||||
"ParentName": "App.Mrp.ProductionOrderItem",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem.Update",
|
||||
"ParentName": "App.Mrp.ProductionOrderItem",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem.Delete",
|
||||
"ParentName": "App.Mrp.ProductionOrderItem",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem.Export",
|
||||
"ParentName": "App.Mrp.ProductionOrderItem",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem.Import",
|
||||
"ParentName": "App.Mrp.ProductionOrderItem",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem.Note",
|
||||
"ParentName": "App.Mrp.ProductionOrderItem",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder",
|
||||
|
|
|
|||
|
|
@ -229,5 +229,9 @@ public enum TableNameEnum
|
|||
InvoiceItem,
|
||||
CheckStatus,
|
||||
CheckType,
|
||||
CheckNote
|
||||
CheckNote,
|
||||
ProductionOrderType,
|
||||
ProductionOrderStatus,
|
||||
ProductionOrder,
|
||||
ProductionOrderItem
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,6 +254,10 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.Bom), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.BomOperation), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.BomComponent), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionOrderType), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionOrderStatus), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionOrder), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionOrderItem), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
|
||||
// 🔹 R&D
|
||||
{ nameof(TableNameEnum.Type), (TablePrefix.TenantByName, MenuPrefix.Project) },
|
||||
|
|
|
|||
|
|
@ -636,6 +636,10 @@ public static class SeedConsts
|
|||
public const string Bom = Default + ".Bom";
|
||||
public const string BomComponent = Default + ".BomComponent";
|
||||
public const string BomOperation = Default + ".BomOperation";
|
||||
public const string ProductionOrderType = Default + ".ProductionOrderType";
|
||||
public const string ProductionOrderStatus = Default + ".ProductionOrderStatus";
|
||||
public const string ProductionOrder = Default + ".ProductionOrder";
|
||||
public const string ProductionOrderItem = Default + ".ProductionOrderItem";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,36 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ProductionOrder : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string OrderNumber { get; set; }
|
||||
public Guid OrderTypeId { get; set; }
|
||||
public ProductionOrderType OrderType { get; set; }
|
||||
|
||||
public Guid StatusId { get; set; }
|
||||
public ProductionOrderStatus Status { get; set; }
|
||||
public string Priority { get; set; }
|
||||
|
||||
public DateTime PlannedStartDate { get; set; }
|
||||
public DateTime PlannedEndDate { get; set; }
|
||||
public DateTime? ActualStartDate { get; set; }
|
||||
public DateTime? ActualEndDate { get; set; }
|
||||
|
||||
public decimal PlannedQuantity { get; set; } //Planlanan miktar
|
||||
public decimal ConfirmedQuantity { get; set; } //Onaylanan miktar
|
||||
public decimal RequiredQuantity { get; set; } //Gereken miktar
|
||||
public decimal ScrapQuantity { get; set; } // Hurda miktarı
|
||||
public string Uom { get; set; }
|
||||
public decimal PlannedCost { get; set; } //Planlanan maliyet
|
||||
public decimal ActualCost { get; set; } //Gerçekleşen maliyet
|
||||
public string Currency { get; set; } //Para birimi
|
||||
public string CustomerRequirement { get; set; }
|
||||
|
||||
public ICollection<ProductionOrderItem> Items { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ProductionOrderItem : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public Guid ProductionOrderId { get; set; }
|
||||
public ProductionOrder ProductionOrder { get; set; }
|
||||
|
||||
public Guid? SalesOrderId { get; set; }
|
||||
public SalesOrder? SalesOrder { get; set; }
|
||||
|
||||
public Guid MaterialId { get; set; }
|
||||
public Material Material { get; set; }
|
||||
|
||||
public string Uom { get; set; }
|
||||
|
||||
public decimal PlannedQuantity { get; set; }
|
||||
public decimal ConfirmedQuantity { get; set; }
|
||||
public decimal RequiredQuantity { get; set; }
|
||||
public decimal ScrapQuantity { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ProductionOrderStatus : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<ProductionOrder> ProductionOrders { get; set; }
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ProductionOrderType : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<ProductionOrder> ProductionOrders { get; set; }
|
||||
}
|
||||
|
|
@ -39,5 +39,6 @@ public class Material : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public List<MovementItem> MovementItems { get; set; }
|
||||
public List<WaybillItem> WaybillItems { get; set; }
|
||||
public List<InvoiceItem> InvoiceItems { get; set; }
|
||||
public List<ProductionOrderItem> ProductionOrderItems { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -268,16 +268,6 @@ public class PlatformDbContext :
|
|||
public DbSet<WorkorderActivity> WorkorderActivities { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Mrp
|
||||
public DbSet<OperationCategory> OperationCategories { get; set; }
|
||||
public DbSet<OperationType> OperationTypes { get; set; }
|
||||
public DbSet<Operation> Operations { get; set; }
|
||||
public DbSet<BomType> BomTypes { get; set; }
|
||||
public DbSet<Bom> Boms { get; set; }
|
||||
public DbSet<BomOperation> BomOperations { get; set; }
|
||||
public DbSet<BomComponent> BomComponents { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Project
|
||||
public DbSet<Entities.Type> Types { get; set; }
|
||||
public DbSet<Status> Statuses { get; set; }
|
||||
|
|
@ -311,6 +301,20 @@ public class PlatformDbContext :
|
|||
public DbSet<InvoiceItem> InvoiceItems { get; set; }
|
||||
#endregion
|
||||
|
||||
#region Mrp
|
||||
public DbSet<OperationCategory> OperationCategories { get; set; }
|
||||
public DbSet<OperationType> OperationTypes { get; set; }
|
||||
public DbSet<Operation> Operations { get; set; }
|
||||
public DbSet<BomType> BomTypes { get; set; }
|
||||
public DbSet<Bom> Boms { get; set; }
|
||||
public DbSet<BomOperation> BomOperations { get; set; }
|
||||
public DbSet<BomComponent> BomComponents { get; set; }
|
||||
public DbSet<ProductionOrderType> ProductionOrderTypes { get; set; }
|
||||
public DbSet<ProductionOrderStatus> ProductionOrderStatuses { get; set; }
|
||||
public DbSet<ProductionOrder> ProductionOrders { get; set; }
|
||||
public DbSet<ProductionOrderItem> ProductionOrderItems { get; set; }
|
||||
#endregion
|
||||
|
||||
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
|
||||
: base(options)
|
||||
{
|
||||
|
|
@ -4146,5 +4150,80 @@ public class PlatformDbContext :
|
|||
.HasForeignKey(x => x.TypeId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<ProductionOrderType>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderType)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||
});
|
||||
|
||||
builder.Entity<ProductionOrderStatus>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderStatus)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.Name).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.Description).HasMaxLength(500);
|
||||
b.Property(x => x.IsActive).HasDefaultValue(true);
|
||||
});
|
||||
|
||||
builder.Entity<ProductionOrder>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrder)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.OrderNumber).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.OrderTypeId).IsRequired();
|
||||
b.Property(x => x.StatusId).IsRequired();
|
||||
b.Property(x => x.Priority).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.Uom).HasMaxLength(64);
|
||||
b.Property(x => x.Currency).HasMaxLength(10);
|
||||
b.Property(x => x.CustomerRequirement).HasMaxLength(1000);
|
||||
b.Property(x => x.PlannedQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.ConfirmedQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.RequiredQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.ScrapQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.PlannedCost).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.ActualCost).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
|
||||
b.HasOne(x => x.OrderType)
|
||||
.WithMany(po => po.ProductionOrders)
|
||||
.HasForeignKey(x => x.OrderTypeId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Status)
|
||||
.WithMany(po => po.ProductionOrders)
|
||||
.HasForeignKey(x => x.StatusId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<ProductionOrderItem>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionOrderItem)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.ProductionOrderId).IsRequired();
|
||||
b.Property(x => x.SalesOrderId).IsRequired();
|
||||
b.Property(x => x.MaterialId).IsRequired();
|
||||
b.Property(x => x.Uom).IsRequired().HasMaxLength(64);
|
||||
b.Property(x => x.PlannedQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.ConfirmedQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.RequiredQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
b.Property(x => x.ScrapQuantity).HasPrecision(18, 2).HasDefaultValue(0);
|
||||
|
||||
b.HasOne(x => x.ProductionOrder)
|
||||
.WithMany(po => po.Items)
|
||||
.HasForeignKey(x => x.ProductionOrderId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Material)
|
||||
.WithMany(po => po.ProductionOrderItems)
|
||||
.HasForeignKey(x => x.MaterialId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251210070936_Initial")]
|
||||
[Migration("20251210103609_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -10515,6 +10515,334 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Adm_T_Product", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ActualCost")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime?>("ActualEndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("ActualStartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<decimal>("ConfirmedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("CustomerRequirement")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("OrderNumber")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid>("OrderTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("PlannedCost")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("PlannedEndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<decimal>("PlannedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("PlannedStartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Priority")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<decimal>("RequiredQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<decimal>("ScrapQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Uom")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrderTypeId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrder", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ConfirmedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<Guid>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("PlannedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid>("ProductionOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("RequiredQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid>("SalesOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ScrapQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Uom")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("ProductionOrderId");
|
||||
|
||||
b.HasIndex("SalesOrderId");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrderItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrderStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrderType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Program", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -20619,6 +20947,52 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("PlanWizard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrderType", "OrderType")
|
||||
.WithMany("ProductionOrders")
|
||||
.HasForeignKey("OrderTypeId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrderStatus", "Status")
|
||||
.WithMany("ProductionOrders")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderType");
|
||||
|
||||
b.Navigation("Status");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany("ProductionOrderItems")
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrder", "ProductionOrder")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("ProductionOrderId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.SalesOrder", "SalesOrder")
|
||||
.WithMany()
|
||||
.HasForeignKey("SalesOrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("ProductionOrder");
|
||||
|
||||
b.Navigation("SalesOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Partner", "Customer")
|
||||
|
|
@ -21954,6 +22328,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("MovementItems");
|
||||
|
||||
b.Navigation("ProductionOrderItems");
|
||||
|
||||
b.Navigation("PurchaseOrderItems");
|
||||
|
||||
b.Navigation("QuotationItems");
|
||||
|
|
@ -22061,6 +22437,21 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b =>
|
||||
{
|
||||
b.Navigation("ProductionOrders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderType", b =>
|
||||
{
|
||||
b.Navigation("ProductionOrders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
|
||||
{
|
||||
b.Navigation("Phases");
|
||||
|
|
@ -1655,6 +1655,50 @@ namespace Erp.Platform.Migrations
|
|||
table.PrimaryKey("PK_Mrp_T_OperationCategory", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mrp_T_ProductionOrderStatus",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Mrp_T_ProductionOrderStatus", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mrp_T_ProductionOrderType",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
Description = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
IsActive = table.Column<bool>(type: "bit", nullable: false, defaultValue: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Mrp_T_ProductionOrderType", x => x.Id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Net_T_EventCategory",
|
||||
columns: table => new
|
||||
|
|
@ -3938,6 +3982,54 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mrp_T_ProductionOrder",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
OrderNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
OrderTypeId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
StatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Priority = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
PlannedStartDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
PlannedEndDate = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
ActualStartDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
ActualEndDate = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
PlannedQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
ConfirmedQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
RequiredQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
ScrapQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: true),
|
||||
PlannedCost = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
ActualCost = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
Currency = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: true),
|
||||
CustomerRequirement = table.Column<string>(type: "nvarchar(1000)", maxLength: 1000, nullable: true),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Mrp_T_ProductionOrder", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionOrder_Mrp_T_ProductionOrderStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "Mrp_T_ProductionOrderStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionOrder_Mrp_T_ProductionOrderType_OrderTypeId",
|
||||
column: x => x.OrderTypeId,
|
||||
principalTable: "Mrp_T_ProductionOrderType",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "OpenIddictAuthorizations",
|
||||
columns: table => new
|
||||
|
|
@ -5888,6 +5980,51 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mrp_T_ProductionOrderItem",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
ProductionOrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
SalesOrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Uom = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
|
||||
PlannedQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
ConfirmedQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
RequiredQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
ScrapQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
|
||||
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Mrp_T_ProductionOrderItem", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionOrderItem_Crm_T_SalesOrder_SalesOrderId",
|
||||
column: x => x.SalesOrderId,
|
||||
principalTable: "Crm_T_SalesOrder",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionOrderItem_Mrp_T_ProductionOrder_ProductionOrderId",
|
||||
column: x => x.ProductionOrderId,
|
||||
principalTable: "Mrp_T_ProductionOrder",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionOrderItem_Scp_T_Material_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Scp_T_Material",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Crm_T_Activity",
|
||||
columns: table => new
|
||||
|
|
@ -9104,6 +9241,31 @@ namespace Erp.Platform.Migrations
|
|||
table: "Mrp_T_OperationType",
|
||||
column: "CategoryId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionOrder_OrderTypeId",
|
||||
table: "Mrp_T_ProductionOrder",
|
||||
column: "OrderTypeId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionOrder_StatusId",
|
||||
table: "Mrp_T_ProductionOrder",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionOrderItem_MaterialId",
|
||||
table: "Mrp_T_ProductionOrderItem",
|
||||
column: "MaterialId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionOrderItem_ProductionOrderId",
|
||||
table: "Mrp_T_ProductionOrderItem",
|
||||
column: "ProductionOrderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionOrderItem_SalesOrderId",
|
||||
table: "Mrp_T_ProductionOrderItem",
|
||||
column: "SalesOrderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Net_B_Meal_BranchId",
|
||||
table: "Net_B_Meal",
|
||||
|
|
@ -10186,6 +10348,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_BomOperation");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrderItem");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Net_B_Meal");
|
||||
|
||||
|
|
@ -10435,9 +10600,6 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_Opportunity");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_SalesOrder");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Hr_T_Payroll");
|
||||
|
||||
|
|
@ -10465,6 +10627,12 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_Operation");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_SalesOrder");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrder");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Net_T_Training");
|
||||
|
||||
|
|
@ -10561,9 +10729,6 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Prt_T_Source");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_SalesOrderStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Hr_T_Survey");
|
||||
|
||||
|
|
@ -10582,6 +10747,15 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_OperationType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_SalesOrderStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrderStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrderType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Net_T_EventCategory");
|
||||
|
||||
|
|
@ -10512,6 +10512,334 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Adm_T_Product", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ActualCost")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime?>("ActualEndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime?>("ActualStartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<decimal>("ConfirmedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<string>("Currency")
|
||||
.HasMaxLength(10)
|
||||
.HasColumnType("nvarchar(10)");
|
||||
|
||||
b.Property<string>("CustomerRequirement")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("nvarchar(1000)");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("OrderNumber")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid>("OrderTypeId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("PlannedCost")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("PlannedEndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<decimal>("PlannedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("PlannedStartDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Priority")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<decimal>("RequiredQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<decimal>("ScrapQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Uom")
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("OrderTypeId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrder", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderItem", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ConfirmedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<Guid>("MaterialId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("PlannedQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid>("ProductionOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("RequiredQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid>("SalesOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ScrapQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<string>("Uom")
|
||||
.IsRequired()
|
||||
.HasMaxLength(64)
|
||||
.HasColumnType("nvarchar(64)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("ProductionOrderId");
|
||||
|
||||
b.HasIndex("SalesOrderId");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrderItem", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrderStatus", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderType", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime>("CreationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("CreationTime");
|
||||
|
||||
b.Property<Guid?>("CreatorId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("CreatorId");
|
||||
|
||||
b.Property<Guid?>("DeleterId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("DeleterId");
|
||||
|
||||
b.Property<DateTime?>("DeletionTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("DeletionTime");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IsActive")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(true);
|
||||
|
||||
b.Property<bool>("IsDeleted")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("bit")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("IsDeleted");
|
||||
|
||||
b.Property<DateTime?>("LastModificationTime")
|
||||
.HasColumnType("datetime2")
|
||||
.HasColumnName("LastModificationTime");
|
||||
|
||||
b.Property<Guid?>("LastModifierId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("LastModifierId");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionOrderType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Program", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -20616,6 +20944,52 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("PlanWizard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrderType", "OrderType")
|
||||
.WithMany("ProductionOrders")
|
||||
.HasForeignKey("OrderTypeId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrderStatus", "Status")
|
||||
.WithMany("ProductionOrders")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderType");
|
||||
|
||||
b.Navigation("Status");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderItem", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany("ProductionOrderItems")
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrder", "ProductionOrder")
|
||||
.WithMany("Items")
|
||||
.HasForeignKey("ProductionOrderId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.SalesOrder", "SalesOrder")
|
||||
.WithMany()
|
||||
.HasForeignKey("SalesOrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("ProductionOrder");
|
||||
|
||||
b.Navigation("SalesOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Partner", "Customer")
|
||||
|
|
@ -21951,6 +22325,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("MovementItems");
|
||||
|
||||
b.Navigation("ProductionOrderItems");
|
||||
|
||||
b.Navigation("PurchaseOrderItems");
|
||||
|
||||
b.Navigation("QuotationItems");
|
||||
|
|
@ -22058,6 +22434,21 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("Materials");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b =>
|
||||
{
|
||||
b.Navigation("ProductionOrders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderType", b =>
|
||||
{
|
||||
b.Navigation("ProductionOrders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
|
||||
{
|
||||
b.Navigation("Phases");
|
||||
|
|
|
|||
|
|
@ -100,9 +100,7 @@
|
|||
"props": null,
|
||||
"description": null,
|
||||
"isActive": true,
|
||||
"dependencies": [
|
||||
"DynamicEntityComponent"
|
||||
]
|
||||
"dependencies": ["DynamicEntityComponent"]
|
||||
}
|
||||
],
|
||||
"ReportCategories": [
|
||||
|
|
@ -2431,12 +2429,7 @@
|
|||
"minSalary": 80000,
|
||||
"maxSalary": 120000,
|
||||
"currency": "USD",
|
||||
"requiredSkills": [
|
||||
"JavaScript",
|
||||
"TypeScript",
|
||||
"React",
|
||||
"Node.js"
|
||||
],
|
||||
"requiredSkills": ["JavaScript", "TypeScript", "React", "Node.js"],
|
||||
"responsibilities": [
|
||||
"Develop frontend and backend applications",
|
||||
"Write clean and maintainable code",
|
||||
|
|
@ -4131,9 +4124,7 @@
|
|||
{
|
||||
"postContent": "CI/CD pipeline güncellememiz tamamlandı! Deployment süremiz %40 azaldı. Otomasyonun gücü 💪",
|
||||
"type": "video",
|
||||
"urls": [
|
||||
"https://www.w3schools.com/html/mov_bbb.mp4"
|
||||
]
|
||||
"urls": ["https://www.w3schools.com/html/mov_bbb.mp4"]
|
||||
}
|
||||
],
|
||||
"SocialPollOptions": [
|
||||
|
|
@ -6847,5 +6838,59 @@
|
|||
"description": "Verilen çekler",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ProductionOrderTypes": [
|
||||
{
|
||||
"name": "Standart",
|
||||
"description": "Standart üretim siparişi türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Tamir",
|
||||
"description": "Tamir üretim siparişi türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Bakım Emri",
|
||||
"description": "Bakım emri üretim siparişi türü",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Numune",
|
||||
"description": "Numune üretim siparişi türü",
|
||||
"isActive": true
|
||||
}
|
||||
],
|
||||
"ProductionOrderStatuses": [
|
||||
{
|
||||
"name": "Oluşturuldu",
|
||||
"description": "Üretim siparişi oluşturuldu",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Serbest bırakıldı",
|
||||
"description": "Üretim siparişi serbest bırakıldı",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "İşlemde",
|
||||
"description": "Üretim siparişi işlemde",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Tamamlandı",
|
||||
"description": "Üretim siparişi tamamlandı",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "İptal edildi",
|
||||
"description": "Üretim siparişi iptal edildi",
|
||||
"isActive": true
|
||||
},
|
||||
{
|
||||
"name": "Beklemede",
|
||||
"description": "Üretim siparişi beklemede",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
private readonly IRepository<PaymentStatus, Guid> _paymentStatusRepository;
|
||||
private readonly IRepository<CheckStatus, Guid> _checkStatusRepository;
|
||||
private readonly IRepository<CheckType, Guid> _checkTypeRepository;
|
||||
private readonly IRepository<ProductionOrderType, Guid> _productionOrderTypeRepository;
|
||||
private readonly IRepository<ProductionOrderStatus, Guid> _productionOrderStatusRepository;
|
||||
|
||||
public TenantDataSeeder(
|
||||
IClock clock,
|
||||
|
|
@ -289,7 +291,9 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IRepository<InvoiceStatus, Guid> invoiceStatusRepository,
|
||||
IRepository<PaymentStatus, Guid> paymentStatusRepository,
|
||||
IRepository<CheckStatus, Guid> checkStatusRepository,
|
||||
IRepository<CheckType, Guid> checkTypeRepository
|
||||
IRepository<CheckType, Guid> checkTypeRepository,
|
||||
IRepository<ProductionOrderType, Guid> productionOrderTypeRepository,
|
||||
IRepository<ProductionOrderStatus, Guid> productionOrderStatusRepository
|
||||
)
|
||||
{
|
||||
_clock = clock;
|
||||
|
|
@ -427,6 +431,8 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
_paymentStatusRepository = paymentStatusRepository;
|
||||
_checkStatusRepository = checkStatusRepository;
|
||||
_checkTypeRepository = checkTypeRepository;
|
||||
_productionOrderTypeRepository = productionOrderTypeRepository;
|
||||
_productionOrderStatusRepository = productionOrderStatusRepository;
|
||||
}
|
||||
|
||||
private static IConfigurationRoot BuildConfiguration()
|
||||
|
|
@ -2963,6 +2969,35 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.ProductionOrderTypes)
|
||||
{
|
||||
var exists = await _productionOrderTypeRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _productionOrderTypeRepository.InsertAsync(new ProductionOrderType
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
foreach (var item in items.ProductionOrderStatuses)
|
||||
{
|
||||
var exists = await _productionOrderStatusRepository.AnyAsync(x => x.Name == item.Name);
|
||||
if (exists)
|
||||
continue;
|
||||
|
||||
await _productionOrderStatusRepository.InsertAsync(new ProductionOrderStatus
|
||||
{
|
||||
Name = item.Name,
|
||||
Description = item.Description,
|
||||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,6 +156,22 @@ public class TenantSeederDto
|
|||
public List<PaymentStatusSeedDto> PaymentStatuses { get; set; }
|
||||
public List<CheckStatusSeedDto> CheckStatuses { get; set; }
|
||||
public List<CheckTypeSeedDto> CheckTypes { get; set; }
|
||||
public List<ProductionOrderTypeSeedDto> ProductionOrderTypes { get; set; }
|
||||
public List<ProductionOrderStatusSeedDto> ProductionOrderStatuses { get; set; }
|
||||
}
|
||||
|
||||
public class ProductionOrderStatusSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class ProductionOrderTypeSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class CheckTypeSeedDto
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ import {
|
|||
} from 'react-icons/fa'
|
||||
import classNames from 'classnames'
|
||||
import { ProductionOrderStatusEnum, ProductionOrderTypeEnum } from '../../../types/mrp'
|
||||
import dayjs from 'dayjs'
|
||||
import { mockProductionOrders } from '../../../mocks/mockProductionOrders'
|
||||
import { mockSalesOrders } from '../../../mocks/mockSalesOrders'
|
||||
import { mockBOMs } from '../../../mocks/mockBOMs'
|
||||
|
|
|
|||
Loading…
Reference in a new issue