Mrp Production Work order
This commit is contained in:
parent
db0b19d919
commit
83165cbc9f
23 changed files with 1090 additions and 51 deletions
|
|
@ -55,8 +55,6 @@ public class DatabaseResourceLocalizer : IDatabaseResourceLocalizer, ISingletonD
|
|||
|
||||
protected virtual LanguageTextCacheItem CreateCacheItem(LocalizationResourceBase resource, string cultureName)
|
||||
{
|
||||
//TODO VT'den textleri alip cache'e dolduran kismi yazalim
|
||||
//TODO:SÖ
|
||||
var task = languageTextRepository.GetListAsync(a => a.ResourceName == resource.ResourceName && a.CultureName == cultureName);
|
||||
var texts = AsyncHelper.RunSync(() => task);
|
||||
|
||||
|
|
|
|||
|
|
@ -10132,14 +10132,20 @@
|
|||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.ProductionOrderType",
|
||||
"tr": "Sipariş Türleri",
|
||||
"en": "Order Types"
|
||||
"tr": "Üretim Sipariş Türleri",
|
||||
"en": "Production Order Types"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.ProductionOrderStatus",
|
||||
"tr": "Sipariş Durumları",
|
||||
"en": "Order Statuses"
|
||||
"tr": "Üretim Sipariş Durumları",
|
||||
"en": "Production Order Statuses"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.WorkorderStatus",
|
||||
"tr": "İş Emri Durumları",
|
||||
"en": "Work Order Statuses"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
@ -10155,7 +10161,7 @@
|
|||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "App.Mrp.WorkOrder",
|
||||
"key": "App.Mrp.Workorder",
|
||||
"tr": "İş Emirleri",
|
||||
"en": "Work Orders"
|
||||
},
|
||||
|
|
@ -11048,4 +11054,4 @@
|
|||
"en": "Delete"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2316,7 +2316,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "SalesOrderId",
|
||||
Width = 150,
|
||||
Width = 200,
|
||||
ListOrderNo = 2,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
@ -2333,7 +2333,7 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "MaterialId",
|
||||
Width = 150,
|
||||
Width = 350,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
|
|
@ -2454,7 +2454,405 @@ public class ListFormSeeder_Mrp : IDataSeedContributor, ITransientDependency
|
|||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Clone Maintenance Forms to MRP Forms
|
||||
await utils.CloneListFormWithFieldsAsync(AppCodes.Maintenance.WorkorderStatus, AppCodes.Mrp.WorkorderStatus);
|
||||
|
||||
#region Production Workorder
|
||||
listFormName = AppCodes.Mrp.Workorder;
|
||||
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.ProductionWorkorder)),
|
||||
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.ProductionWorkorder)),
|
||||
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 = "WorkorderNumber", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxTextBox },
|
||||
new EditingFormItemDto { Order = 2, DataField = "ProductionOrderId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 3, DataField = "OperationId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 4, DataField = "MaterialId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 5, DataField = "WorkcenterId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 6, DataField = "StatusId", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=EditorOptionValues.ShowClearButton },
|
||||
new EditingFormItemDto { Order = 7, DataField = "Sequence", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 8, DataField = "PlannedStartDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 9, DataField = "PlannedEndDate", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 10, DataField = "ActualStartDate", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 11, DataField = "ActualEndDate", ColSpan = 1, EditorType2=EditorTypes.dxDateBox, EditorOptions=EditorOptionValues.DateTimeFormat },
|
||||
new EditingFormItemDto { Order = 12, DataField = "PlannedQuantity", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 13, DataField = "ConfirmedQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 14, DataField = "ScrapQuantity", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox, EditorOptions=EditorOptionValues.NumberStandartFormat },
|
||||
new EditingFormItemDto { Order = 15, DataField = "SetupTime", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 16, DataField = "ProcessTime", ColSpan = 1, IsRequired = true, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 17, DataField = "ActualSetupTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||
new EditingFormItemDto { Order = 18, DataField = "ActualProcessTime", ColSpan = 1, EditorType2=EditorTypes.dxNumberBox },
|
||||
]}
|
||||
}),
|
||||
FormFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] {
|
||||
new() { FieldName = "WorkorderNumber", FieldDbType = DbType.String, Value = "@AUTONUMBER", CustomValueType = FieldCustomValueTypeEnum.CustomKey },
|
||||
new() { FieldName = "Sequence", FieldDbType = DbType.Int32, Value = "1", 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 = "ScrapQuantity", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "SetupTime", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ProcessTime", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ActualSetupTime", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
new() { FieldName = "ActualProcessTime", FieldDbType = DbType.Decimal, Value = "0", CustomValueType = FieldCustomValueTypeEnum.Value },
|
||||
}),
|
||||
}, autoSave: true
|
||||
);
|
||||
|
||||
#region Production Workorder 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 = "WorkorderNumber",
|
||||
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 = "ProductionOrderId",
|
||||
Width = 150,
|
||||
ListOrderNo = 3,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.ProductionOrder), "Id", "OrderNumber"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "OperationId",
|
||||
Width = 100,
|
||||
ListOrderNo = 4,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Operation), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Guid,
|
||||
FieldName = "MaterialId",
|
||||
Width = 250,
|
||||
ListOrderNo = 5,
|
||||
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.Guid,
|
||||
FieldName = "WorkcenterId",
|
||||
Width = 150,
|
||||
ListOrderNo = 6,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.Workcenter), "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 = 150,
|
||||
ListOrderNo = 7,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
LookupJson = LookupQueryValues.DefaultLookupQueryJson(nameof(TableNameEnum.WorkorderStatus), "Id", "Name"),
|
||||
ValidationRuleJson = DefaultValidationRuleRequiredJson,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
new() {
|
||||
ListFormCode = listForm.ListFormCode,
|
||||
CultureName = LanguageCodes.En,
|
||||
SourceDbType = DbType.Int32,
|
||||
FieldName = "Sequence",
|
||||
Width = 100,
|
||||
ListOrderNo = 8,
|
||||
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 = "PlannedStartDate",
|
||||
Width = 150,
|
||||
ListOrderNo = 9,
|
||||
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 = 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.DateTime,
|
||||
FieldName = "ActualStartDate",
|
||||
Width = 150,
|
||||
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.DateTime,
|
||||
FieldName = "ActualEndDate",
|
||||
Width = 150,
|
||||
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 = "PlannedQuantity",
|
||||
Format = "fixedPoint",
|
||||
Alignment = "right",
|
||||
Width = 100,
|
||||
ListOrderNo = 13,
|
||||
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 = 14,
|
||||
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 = 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.Int32,
|
||||
FieldName = "SetupTime",
|
||||
Width = 100,
|
||||
ListOrderNo = 16,
|
||||
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.Int32,
|
||||
FieldName = "ProcessTime",
|
||||
Width = 100,
|
||||
ListOrderNo = 17,
|
||||
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.Int32,
|
||||
FieldName = "ActualSetupTime",
|
||||
Width = 100,
|
||||
ListOrderNo = 18,
|
||||
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.Int32,
|
||||
FieldName = "ActualProcessTime",
|
||||
Width = 100,
|
||||
ListOrderNo = 19,
|
||||
Visible = true,
|
||||
IsActive = true,
|
||||
IsDeleted = false,
|
||||
AllowSearch = true,
|
||||
ColumnCustomizationJson = DefaultColumnCustomizationJson,
|
||||
PermissionJson = DefaultFieldPermissionJson(listForm.Name),
|
||||
PivotSettingsJson = DefaultPivotSettingsJson
|
||||
},
|
||||
], autoSave: true);
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3081,6 +3081,16 @@
|
|||
"RequiredPermissionName": "App.Mrp.ProductionOrderStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp.Definitions",
|
||||
"Code": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "App.Mrp.WorkorderStatus",
|
||||
"Order": 10,
|
||||
"Url": "/admin/list/App.Mrp.WorkorderStatus",
|
||||
"Icon": "FcOk",
|
||||
"RequiredPermissionName": "App.Mrp.WorkorderStatus",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.ProductionOrder",
|
||||
|
|
@ -3093,12 +3103,12 @@
|
|||
},
|
||||
{
|
||||
"ParentCode": "App.Mrp",
|
||||
"Code": "App.Mrp.WorkOrder",
|
||||
"DisplayName": "App.Mrp.WorkOrder",
|
||||
"Code": "App.Mrp.Workorder",
|
||||
"DisplayName": "App.Mrp.Workorder",
|
||||
"Order": 3,
|
||||
"Url": "/admin/mrp/work-orders",
|
||||
"Url": "/admin/list/App.Mrp.Workorder",
|
||||
"Icon": "FcList",
|
||||
"RequiredPermissionName": "App.Mrp.WorkOrder",
|
||||
"RequiredPermissionName": "App.Mrp.Workorder",
|
||||
"IsDisabled": false
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12994,6 +12994,70 @@
|
|||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.WorkorderStatus",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus.Create",
|
||||
"ParentName": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus.Update",
|
||||
"ParentName": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus.Delete",
|
||||
"ParentName": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus.Export",
|
||||
"ParentName": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus.Import",
|
||||
"ParentName": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkorderStatus.Note",
|
||||
"ParentName": "App.Mrp.WorkorderStatus",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.ProductionOrderItem",
|
||||
|
|
@ -13060,17 +13124,17 @@
|
|||
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder",
|
||||
"ParentName": null,
|
||||
"DisplayName": "App.Mrp.WorkOrder",
|
||||
"DisplayName": "App.Mrp.Workorder",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
"MenuGroup": "Erp"
|
||||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder.Create",
|
||||
"ParentName": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder.Create",
|
||||
"ParentName": "App.Mrp.Workorder",
|
||||
"DisplayName": "Create",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -13078,8 +13142,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder.Update",
|
||||
"ParentName": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder.Update",
|
||||
"ParentName": "App.Mrp.Workorder",
|
||||
"DisplayName": "Update",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -13087,8 +13151,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder.Delete",
|
||||
"ParentName": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder.Delete",
|
||||
"ParentName": "App.Mrp.Workorder",
|
||||
"DisplayName": "Delete",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -13096,8 +13160,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder.Export",
|
||||
"ParentName": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder.Export",
|
||||
"ParentName": "App.Mrp.Workorder",
|
||||
"DisplayName": "Export",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -13105,8 +13169,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder.Import",
|
||||
"ParentName": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder.Import",
|
||||
"ParentName": "App.Mrp.Workorder",
|
||||
"DisplayName": "Import",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
@ -13114,8 +13178,8 @@
|
|||
},
|
||||
{
|
||||
"GroupName": "App.Mrp",
|
||||
"Name": "App.Mrp.WorkOrder.Note",
|
||||
"ParentName": "App.Mrp.WorkOrder",
|
||||
"Name": "App.Mrp.Workorder.Note",
|
||||
"ParentName": "App.Mrp.Workorder",
|
||||
"DisplayName": "Note",
|
||||
"IsEnabled": true,
|
||||
"MultiTenancySide": 3,
|
||||
|
|
|
|||
|
|
@ -233,5 +233,6 @@ public enum TableNameEnum
|
|||
ProductionOrderType,
|
||||
ProductionOrderStatus,
|
||||
ProductionOrder,
|
||||
ProductionOrderItem
|
||||
ProductionOrderItem,
|
||||
ProductionWorkorder,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ public static class TableNameResolver
|
|||
{ nameof(TableNameEnum.ProductionOrderStatus), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionOrder), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionOrderItem), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
{ nameof(TableNameEnum.ProductionWorkorder), (TablePrefix.TenantByName, MenuPrefix.Mrp) },
|
||||
|
||||
// 🔹 R&D
|
||||
{ nameof(TableNameEnum.Type), (TablePrefix.TenantByName, MenuPrefix.Project) },
|
||||
|
|
|
|||
|
|
@ -640,6 +640,8 @@ public static class SeedConsts
|
|||
public const string ProductionOrderStatus = Default + ".ProductionOrderStatus";
|
||||
public const string ProductionOrder = Default + ".ProductionOrder";
|
||||
public const string ProductionOrderItem = Default + ".ProductionOrderItem";
|
||||
public const string WorkorderStatus = Default + ".WorkorderStatus";
|
||||
public const string Workorder = Default + ".Workorder";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ public class Fault : FullAuditedEntity<Guid>, IMultiTenant
|
|||
|
||||
public string AssignedTo { get; set; }
|
||||
public int? ActualRepairTime { get; set; }
|
||||
public Guid WorkOrderId { get; set; }
|
||||
public Guid WorkorderId { get; set; }
|
||||
public string ResolutionNotes { get; set; }
|
||||
public string ClosedBy { get; set; }
|
||||
public DateTime? ClosedAt { get; set; }
|
||||
|
|
|
|||
|
|
@ -37,5 +37,5 @@ public class Workcenter : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public ICollection<Operation> Operations { get; set; }
|
||||
public virtual ICollection<PlanWizard> PlanWizards { get; set; }
|
||||
public virtual ICollection<Workorder> Workorders { get; set; }
|
||||
// public virtual ICollection<PmDownTimeRecord> DownTimeHistory { get; set; }
|
||||
public virtual ICollection<ProductionWorkorder> ProductionWorkorders { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,5 +14,6 @@ public class WorkorderStatus : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<Workorder> Workorders { get; set; }
|
||||
public ICollection<ProductionWorkorder> ProductionWorkorders { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,4 +30,5 @@ public class Operation : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public bool IsActive { get; set; }
|
||||
|
||||
public ICollection<BomOperation> BomOperations { get; set; }
|
||||
public ICollection<ProductionWorkorder> Workorders { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@ public class ProductionOrder : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public string CustomerRequirement { get; set; }
|
||||
|
||||
public ICollection<ProductionOrderItem> Items { get; set; }
|
||||
public ICollection<ProductionWorkorder> Workorders { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
namespace Erp.Platform.Entities;
|
||||
|
||||
public class ProductionWorkorder : FullAuditedEntity<Guid>, IMultiTenant
|
||||
{
|
||||
public Guid? TenantId { get; set; }
|
||||
|
||||
public string WorkorderNumber { get; set; }
|
||||
|
||||
public Guid ProductionOrderId { get; set; }
|
||||
public ProductionOrder ProductionOrder { get; set; }
|
||||
|
||||
public Guid OperationId { get; set; }
|
||||
public Operation Operation { get; set; }
|
||||
|
||||
public Guid MaterialId { get; set; }
|
||||
public Material Material { get; set; }
|
||||
|
||||
public Guid WorkcenterId { get; set; }
|
||||
public Workcenter Workcenter { get; set; }
|
||||
|
||||
public Guid StatusId { get; set; }
|
||||
public WorkorderStatus Status { get; set; }
|
||||
|
||||
public int Sequence { 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; }
|
||||
public decimal ConfirmedQuantity { get; set; }
|
||||
public decimal ScrapQuantity { get; set; }
|
||||
|
||||
public int SetupTime { get; set; } // Kurulum süresi
|
||||
public int ProcessTime { get; set; } // İşlem süresi
|
||||
public int? ActualSetupTime { get; set; } // Gerçekleşen kurulum süresi
|
||||
public int? ActualProcessTime { get; set; } // Gerçekleşen işlem süresi
|
||||
}
|
||||
|
|
@ -40,5 +40,6 @@ public class Material : FullAuditedEntity<Guid>, IMultiTenant
|
|||
public List<WaybillItem> WaybillItems { get; set; }
|
||||
public List<InvoiceItem> InvoiceItems { get; set; }
|
||||
public List<ProductionOrderItem> ProductionOrderItems { get; set; }
|
||||
public List<ProductionWorkorder> ProductionWorkorders { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Volo.Abp.Domain.Entities.Auditing;
|
||||
using Volo.Abp.MultiTenancy;
|
||||
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ public class PlatformDbContext :
|
|||
public DbSet<ProductionOrderStatus> ProductionOrderStatuses { get; set; }
|
||||
public DbSet<ProductionOrder> ProductionOrders { get; set; }
|
||||
public DbSet<ProductionOrderItem> ProductionOrderItems { get; set; }
|
||||
public DbSet<ProductionWorkorder> ProductionWorkorders { get; set; }
|
||||
#endregion
|
||||
|
||||
public PlatformDbContext(DbContextOptions<PlatformDbContext> options)
|
||||
|
|
@ -2930,7 +2931,7 @@ public class PlatformDbContext :
|
|||
b.Property(x => x.Status).IsRequired().HasMaxLength(20);
|
||||
b.Property(x => x.ResolutionNotes);
|
||||
b.Property(x => x.ClosedBy).HasMaxLength(150);
|
||||
b.Property(x => x.WorkOrderId).HasMaxLength(100);
|
||||
b.Property(x => x.WorkorderId).HasMaxLength(100);
|
||||
});
|
||||
|
||||
builder.Entity<FaultStatus>(b =>
|
||||
|
|
@ -4225,5 +4226,51 @@ public class PlatformDbContext :
|
|||
.HasForeignKey(x => x.MaterialId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
|
||||
builder.Entity<ProductionWorkorder>(b =>
|
||||
{
|
||||
b.ToTable(TableNameResolver.GetFullTableName(nameof(TableNameEnum.ProductionWorkorder)), Prefix.DbSchema);
|
||||
b.ConfigureByConvention();
|
||||
|
||||
b.Property(x => x.WorkorderNumber).IsRequired().HasMaxLength(50);
|
||||
b.Property(x => x.ProductionOrderId).IsRequired();
|
||||
b.Property(x => x.OperationId).IsRequired();
|
||||
b.Property(x => x.MaterialId).IsRequired();
|
||||
b.Property(x => x.Sequence).IsRequired().HasDefaultValue(1);
|
||||
b.Property(x => x.PlannedQuantity).HasDefaultValue(0).HasPrecision(18, 2);
|
||||
b.Property(x => x.ConfirmedQuantity).HasDefaultValue(0).HasPrecision(18, 2);
|
||||
b.Property(x => x.ScrapQuantity).HasDefaultValue(0).HasPrecision(18, 2);
|
||||
b.Property(x => x.WorkcenterId).IsRequired();
|
||||
b.Property(x => x.SetupTime).HasDefaultValue(0);
|
||||
b.Property(x => x.ProcessTime).HasDefaultValue(0);
|
||||
b.Property(x => x.ActualSetupTime).HasDefaultValue(0);
|
||||
b.Property(x => x.ActualProcessTime).HasDefaultValue(0);
|
||||
b.Property(x => x.StatusId).IsRequired();
|
||||
|
||||
b.HasOne(x => x.ProductionOrder)
|
||||
.WithMany(po => po.Workorders)
|
||||
.HasForeignKey(x => x.ProductionOrderId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Operation)
|
||||
.WithMany(po => po.Workorders)
|
||||
.HasForeignKey(x => x.OperationId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Material)
|
||||
.WithMany(po => po.ProductionWorkorders)
|
||||
.HasForeignKey(x => x.MaterialId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Workcenter)
|
||||
.WithMany(po => po.ProductionWorkorders)
|
||||
.HasForeignKey(x => x.WorkcenterId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne(x => x.Status)
|
||||
.WithMany(po => po.ProductionWorkorders)
|
||||
.HasForeignKey(x => x.StatusId)
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore;
|
|||
namespace Erp.Platform.Migrations
|
||||
{
|
||||
[DbContext(typeof(PlatformDbContext))]
|
||||
[Migration("20251210103609_Initial")]
|
||||
[Migration("20251210125522_Initial")]
|
||||
partial class Initial
|
||||
{
|
||||
/// <inheritdoc />
|
||||
|
|
@ -5539,14 +5539,14 @@ namespace Erp.Platform.Migrations
|
|||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("WorkOrderId")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WorkcenterId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WorkorderId")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FaultStatusId");
|
||||
|
|
@ -10843,6 +10843,135 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Mrp_T_ProductionOrderType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionWorkorder", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("ActualEndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("ActualProcessTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<int?>("ActualSetupTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
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<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<Guid>("OperationId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<int>("ProcessTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("ProductionOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ScrapQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<int>("Sequence")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<int>("SetupTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("WorkcenterId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("WorkorderNumber")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("OperationId");
|
||||
|
||||
b.HasIndex("ProductionOrderId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.HasIndex("WorkcenterId");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionWorkorder", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Program", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -20993,6 +21122,49 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("SalesOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionWorkorder", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany("ProductionWorkorders")
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Operation", "Operation")
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("OperationId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrder", "ProductionOrder")
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("ProductionOrderId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WorkorderStatus", "Status")
|
||||
.WithMany("ProductionWorkorders")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter")
|
||||
.WithMany("ProductionWorkorders")
|
||||
.HasForeignKey("WorkcenterId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("Operation");
|
||||
|
||||
b.Navigation("ProductionOrder");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("Workcenter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Partner", "Customer")
|
||||
|
|
@ -22330,6 +22502,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("ProductionOrderItems");
|
||||
|
||||
b.Navigation("ProductionWorkorders");
|
||||
|
||||
b.Navigation("PurchaseOrderItems");
|
||||
|
||||
b.Navigation("QuotationItems");
|
||||
|
|
@ -22369,6 +22543,8 @@ namespace Erp.Platform.Migrations
|
|||
modelBuilder.Entity("Erp.Platform.Entities.Operation", b =>
|
||||
{
|
||||
b.Navigation("BomOperations");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.OperationCategory", b =>
|
||||
|
|
@ -22440,6 +22616,8 @@ namespace Erp.Platform.Migrations
|
|||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b =>
|
||||
|
|
@ -22687,6 +22865,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("PlanWizards");
|
||||
|
||||
b.Navigation("ProductionWorkorders");
|
||||
|
||||
b.Navigation("Specifications");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
|
|
@ -22711,6 +22891,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WorkorderStatus", b =>
|
||||
{
|
||||
b.Navigation("ProductionWorkorders");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
|
|
@ -6472,7 +6472,7 @@ namespace Erp.Platform.Migrations
|
|||
IsActive = table.Column<bool>(type: "bit", nullable: false),
|
||||
AssignedTo = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
|
||||
ActualRepairTime = table.Column<int>(type: "int", nullable: true),
|
||||
WorkOrderId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 100, nullable: false),
|
||||
WorkorderId = table.Column<Guid>(type: "uniqueidentifier", maxLength: 100, nullable: false),
|
||||
ResolutionNotes = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
ClosedBy = table.Column<string>(type: "nvarchar(150)", maxLength: 150, nullable: true),
|
||||
ClosedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
|
|
@ -7418,6 +7418,73 @@ namespace Erp.Platform.Migrations
|
|||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Mrp_T_ProductionWorkorder",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
WorkorderNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
|
||||
ProductionOrderId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
OperationId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
MaterialId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
WorkcenterId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
StatusId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
Sequence = table.Column<int>(type: "int", nullable: false, defaultValue: 1),
|
||||
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),
|
||||
ScrapQuantity = table.Column<decimal>(type: "decimal(18,2)", precision: 18, scale: 2, nullable: false, defaultValue: 0m),
|
||||
SetupTime = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
ProcessTime = table.Column<int>(type: "int", nullable: false, defaultValue: 0),
|
||||
ActualSetupTime = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
||||
ActualProcessTime = table.Column<int>(type: "int", nullable: true, defaultValue: 0),
|
||||
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_ProductionWorkorder", x => x.Id);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionWorkorder_Mnt_T_Workcenter_WorkcenterId",
|
||||
column: x => x.WorkcenterId,
|
||||
principalTable: "Mnt_T_Workcenter",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionWorkorder_Mnt_T_WorkorderStatus_StatusId",
|
||||
column: x => x.StatusId,
|
||||
principalTable: "Mnt_T_WorkorderStatus",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionWorkorder_Mrp_T_Operation_OperationId",
|
||||
column: x => x.OperationId,
|
||||
principalTable: "Mrp_T_Operation",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionWorkorder_Mrp_T_ProductionOrder_ProductionOrderId",
|
||||
column: x => x.ProductionOrderId,
|
||||
principalTable: "Mrp_T_ProductionOrder",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_Mrp_T_ProductionWorkorder_Scp_T_Material_MaterialId",
|
||||
column: x => x.MaterialId,
|
||||
principalTable: "Scp_T_Material",
|
||||
principalColumn: "Id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Hr_T_SurveyAnswer",
|
||||
columns: table => new
|
||||
|
|
@ -9266,6 +9333,31 @@ namespace Erp.Platform.Migrations
|
|||
table: "Mrp_T_ProductionOrderItem",
|
||||
column: "SalesOrderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionWorkorder_MaterialId",
|
||||
table: "Mrp_T_ProductionWorkorder",
|
||||
column: "MaterialId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionWorkorder_OperationId",
|
||||
table: "Mrp_T_ProductionWorkorder",
|
||||
column: "OperationId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionWorkorder_ProductionOrderId",
|
||||
table: "Mrp_T_ProductionWorkorder",
|
||||
column: "ProductionOrderId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionWorkorder_StatusId",
|
||||
table: "Mrp_T_ProductionWorkorder",
|
||||
column: "StatusId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Mrp_T_ProductionWorkorder_WorkcenterId",
|
||||
table: "Mrp_T_ProductionWorkorder",
|
||||
column: "WorkcenterId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Net_B_Meal_BranchId",
|
||||
table: "Net_B_Meal",
|
||||
|
|
@ -10351,6 +10443,9 @@ namespace Erp.Platform.Migrations
|
|||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrderItem");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionWorkorder");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Net_B_Meal");
|
||||
|
||||
|
|
@ -10625,10 +10720,10 @@ namespace Erp.Platform.Migrations
|
|||
name: "Mrp_T_Bom");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_Operation");
|
||||
name: "Crm_T_SalesOrder");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_SalesOrder");
|
||||
name: "Mrp_T_Operation");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrder");
|
||||
|
|
@ -10745,10 +10840,10 @@ namespace Erp.Platform.Migrations
|
|||
name: "Mrp_T_BomType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_OperationType");
|
||||
name: "Crm_T_SalesOrderStatus");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Crm_T_SalesOrderStatus");
|
||||
name: "Mrp_T_OperationType");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "Mrp_T_ProductionOrderStatus");
|
||||
|
|
@ -5536,14 +5536,14 @@ namespace Erp.Platform.Migrations
|
|||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<Guid>("WorkOrderId")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WorkcenterId")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("WorkorderId")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("FaultStatusId");
|
||||
|
|
@ -10840,6 +10840,135 @@ namespace Erp.Platform.Migrations
|
|||
b.ToTable("Mrp_T_ProductionOrderType", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionWorkorder", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("ActualEndDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int?>("ActualProcessTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<int?>("ActualSetupTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
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<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<Guid>("OperationId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<int>("ProcessTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("ProductionOrderId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal>("ScrapQuantity")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasPrecision(18, 2)
|
||||
.HasColumnType("decimal(18,2)")
|
||||
.HasDefaultValue(0m);
|
||||
|
||||
b.Property<int>("Sequence")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(1);
|
||||
|
||||
b.Property<int>("SetupTime")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int")
|
||||
.HasDefaultValue(0);
|
||||
|
||||
b.Property<Guid>("StatusId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("TenantId")
|
||||
.HasColumnType("uniqueidentifier")
|
||||
.HasColumnName("TenantId");
|
||||
|
||||
b.Property<Guid>("WorkcenterId")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("WorkorderNumber")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("MaterialId");
|
||||
|
||||
b.HasIndex("OperationId");
|
||||
|
||||
b.HasIndex("ProductionOrderId");
|
||||
|
||||
b.HasIndex("StatusId");
|
||||
|
||||
b.HasIndex("WorkcenterId");
|
||||
|
||||
b.ToTable("Mrp_T_ProductionWorkorder", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Program", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
|
@ -20990,6 +21119,49 @@ namespace Erp.Platform.Migrations
|
|||
b.Navigation("SalesOrder");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionWorkorder", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Material", "Material")
|
||||
.WithMany("ProductionWorkorders")
|
||||
.HasForeignKey("MaterialId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Operation", "Operation")
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("OperationId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.ProductionOrder", "ProductionOrder")
|
||||
.WithMany("Workorders")
|
||||
.HasForeignKey("ProductionOrderId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.WorkorderStatus", "Status")
|
||||
.WithMany("ProductionWorkorders")
|
||||
.HasForeignKey("StatusId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("Erp.Platform.Entities.Workcenter", "Workcenter")
|
||||
.WithMany("ProductionWorkorders")
|
||||
.HasForeignKey("WorkcenterId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Material");
|
||||
|
||||
b.Navigation("Operation");
|
||||
|
||||
b.Navigation("ProductionOrder");
|
||||
|
||||
b.Navigation("Status");
|
||||
|
||||
b.Navigation("Workcenter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.Project", b =>
|
||||
{
|
||||
b.HasOne("Erp.Platform.Entities.Partner", "Customer")
|
||||
|
|
@ -22327,6 +22499,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("ProductionOrderItems");
|
||||
|
||||
b.Navigation("ProductionWorkorders");
|
||||
|
||||
b.Navigation("PurchaseOrderItems");
|
||||
|
||||
b.Navigation("QuotationItems");
|
||||
|
|
@ -22366,6 +22540,8 @@ namespace Erp.Platform.Migrations
|
|||
modelBuilder.Entity("Erp.Platform.Entities.Operation", b =>
|
||||
{
|
||||
b.Navigation("BomOperations");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.OperationCategory", b =>
|
||||
|
|
@ -22437,6 +22613,8 @@ namespace Erp.Platform.Migrations
|
|||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrder", b =>
|
||||
{
|
||||
b.Navigation("Items");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.ProductionOrderStatus", b =>
|
||||
|
|
@ -22684,6 +22862,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
b.Navigation("PlanWizards");
|
||||
|
||||
b.Navigation("ProductionWorkorders");
|
||||
|
||||
b.Navigation("Specifications");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
|
|
@ -22708,6 +22888,8 @@ namespace Erp.Platform.Migrations
|
|||
|
||||
modelBuilder.Entity("Erp.Platform.Entities.WorkorderStatus", b =>
|
||||
{
|
||||
b.Navigation("ProductionWorkorders");
|
||||
|
||||
b.Navigation("Workorders");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -6892,5 +6892,5 @@
|
|||
"description": "Üretim siparişi beklemede",
|
||||
"isActive": true
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2997,7 +2997,6 @@ public class TenantDataSeeder : IDataSeedContributor, ITransientDependency
|
|||
IsActive = item.IsActive
|
||||
}, autoSave: true);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -158,6 +158,14 @@ public class TenantSeederDto
|
|||
public List<CheckTypeSeedDto> CheckTypes { get; set; }
|
||||
public List<ProductionOrderTypeSeedDto> ProductionOrderTypes { get; set; }
|
||||
public List<ProductionOrderStatusSeedDto> ProductionOrderStatuses { get; set; }
|
||||
public List<ProductionWorkorderStatusSeedDto> ProductionWorkorderStatuses { get; set; }
|
||||
}
|
||||
|
||||
public class ProductionWorkorderStatusSeedDto
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
||||
public class ProductionOrderStatusSeedDto
|
||||
|
|
|
|||
Loading…
Reference in a new issue