-
Notifications
You must be signed in to change notification settings - Fork 0
Выдачи вне нормы. #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SpaceTranquility
wants to merge
42
commits into
master
Choose a base branch
from
feature/I-1289/T-1801
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+11,774
−706
Open
Выдачи вне нормы. #607
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
87ec09e
Добавлена возможность маркировки на складе
gurynych d2fbe3b
Merge branch 'feature/I-1289/T-1794' into feature/I-1289/I-1289
gurynych 3312cdf
Merge branch 'release/2.8' into feature/I-1289/I-1289
gurynych d3391d1
Добавлена печать созданных на складе штрихкодов
gurynych eaf7524
Добавлен журнал подменной выдачи. Не конечные изменения
gurynych 361a50a
Merge branch 'refs/heads/release/2.8' into feature/I-1289/T-1801
gurynych 90f3591
Merge remote-tracking branch 'refs/remotes/origin/release/2.8' into f…
gurynych cc798d5
Merge branch 'refs/heads/release/2.8' into feature/I-1289/T-1801
gurynych 94f5b0e
Merge remote-tracking branch 'refs/remotes/origin/master' into featur…
gurynych cf1c216
Добавлен рабочий журнал операций сверх нормы
gurynych 2e442a0
Исправление выводимых названий
gurynych 08ad5ae
Добавлено отображение штрихкодов в таблице документа
gurynych 33bc929
Добавлена возможность добалять и удалять конкретные штрихкоды в докум…
gurynych fddec9a
Merge branch 'master' into feature/I-1289/T-1801
SpaceTranquility 27a3d8d
Правка интерфейса
SpaceTranquility d60b270
Механиизм выдачи штрихкодов
SpaceTranquility 1a20b77
Переименования
SpaceTranquility 820c4a9
Сравнение параметров, правки привязок
SpaceTranquility e0e1542
Исправление запуска
SpaceTranquility ef288b1
Фильтр
SpaceTranquility 548b33a
Дополнение к фильтру
SpaceTranquility 007d0b2
Скилет документа маркировки
SpaceTranquility e64b289
Маркировка. Журналы, открытие, загрузка, удаление, сохранение, правки.
SpaceTranquility c4c9436
Фильтр и создание из журнала остатков
SpaceTranquility aecbaa6
Печать
SpaceTranquility bdaa70b
Переименовал файл верменно, чтобы не конфликтовал уже выложенным в релиз
Gankov 63fa5a0
Доделка фильтра
SpaceTranquility 06c9d72
Merge remote-tracking branch 'origin/feature/I-1289/T-1801' into feat…
SpaceTranquility 5c1fa87
Изменения в базе, переименования, вкладка, коллекции
SpaceTranquility a02528b
Потерянная вьюшка
SpaceTranquility 504edcc
Фильтры в журналах, доделка разовой выдачи
SpaceTranquility 36d7afd
Мерж из мастера
SpaceTranquility 55da7d4
Фикс конфликтов
SpaceTranquility 30a676c
Исправление маркировки
SpaceTranquility b8f3c83
Вывод количества промаркированного
SpaceTranquility 105b1e8
Лог и права
SpaceTranquility 4f14b32
Исправление гостевой
SpaceTranquility e1b3043
Исправил гостевую
SpaceTranquility 87b1ca6
Улучшил фильтрацию
SpaceTranquility b31a15b
Исправил счёт промаркированного
SpaceTranquility 2a783f3
Merge remote-tracking branch 'origin/master' into feature/I-1289/T-1801
SpaceTranquility 8872d5c
Правка графики
SpaceTranquility File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -146,7 +146,10 @@ public static void ConfigureDeletion () | |
| .AddDeleteDependence<InspectionItem>(x => x.OperationIssue) | ||
| .AddDeleteDependence<ReturnItem>(x => x.ReturnFromEmployeeOperation) | ||
| .AddDeleteDependence<WriteoffItem>(x => x.EmployeeWriteoffOperation) | ||
| ; | ||
| .AddDeleteDependence<BarcodeOperation>(x => x.EmployeeIssueOperation) | ||
| .AddClearDependence<IssuanceSheetItem>(x => x.IssueOperation) | ||
| .AddDeleteDependence<InspectionItem>(x => x.OperationIssue) | ||
| .AddDeleteDependence<InspectionItem>(x => x.NewOperationIssue); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<DutyNormIssueOperation>() | ||
| .RequiredCascadeDeletion() | ||
|
|
@@ -171,8 +174,13 @@ public static void ConfigureDeletion () | |
| .AddDeleteDependence<DutyNormIssueOperation>(x => x.WarehouseOperation) | ||
| .AddDeleteDependence<CompletionResultItem>(x => x.WarehouseOperation) | ||
| .AddDeleteDependence<CompletionSourceItem>(x => x.WarehouseOperation) | ||
| .AddDeleteDependence<BarcodeOperation>(x => x.WarehouseOperation); | ||
| .AddDeleteDependence<BarcodeOperation>(x => x.WarehouseOperation) | ||
| .AddDeleteDependence<OverNormOperation>(x => x.WarehouseOperation); | ||
| //.AddDeleteDependence<OverNormItem>(x => x.OverNormOperation.WarehouseOperation); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Мусор? |
||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<OverNormOperation>() | ||
| .AddDeleteCascadeDependence(x => x.WarehouseOperation) | ||
| .AddDeleteDependence<BarcodeOperation>(x => x.OverNormOperation); | ||
| #endregion | ||
| #region Постаматы | ||
| DeleteConfig.AddHibernateDeleteInfo<PostomatDocument>() | ||
|
|
@@ -306,21 +314,15 @@ public static void ConfigureDeletion () | |
| .AddClearDependence<Subdivision>(x => x.Warehouse) | ||
| .AddClearDependence<UserSettings>(x => x.DefaultWarehouse) | ||
| .AddDeleteDependence<Completion>(x => x.ResultWarehouse) | ||
| .AddDeleteDependence<Completion>(x => x.SourceWarehouse); | ||
| .AddDeleteDependence<Completion>(x => x.SourceWarehouse) | ||
| .AddDeleteDependence<OverNorm>(x => x.Warehouse); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<MeasurementUnits>() | ||
| .AddClearDependence<ItemsType>(x => x.Units); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<Nomenclature> () | ||
| .AddDeleteDependence<ProtectionToolsNomenclature>(x => x.Nomenclature) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Почему это удаляется из номеклатуры? Думаю это какая то ошибка. |
||
| .AddDeleteDependence<EmployeeSelectedNomenclature>(x => x.Nomenclature) | ||
| .AddClearDependence<ProtectionTools>(x => x.SupplyNomenclatureFemale) | ||
| .AddClearDependence<ProtectionTools>(x => x.SupplyNomenclatureMale) | ||
| .AddClearDependence<ProtectionTools>(x => x.SupplyNomenclatureUnisex) | ||
| .AddRemoveFromDependence<Service>(x => x.Nomenclatures) | ||
| .AddDeleteDependence<Barcode>(x => x.Nomenclature) | ||
| .AddDeleteDependence<CollectiveExpenseItem> (x => x.Nomenclature) | ||
| .AddDeleteDependence<DutyNormIssueOperation>(x => x.Nomenclature) | ||
| .AddDeleteDependence<EmployeeIssueOperation>(x => x.Nomenclature) | ||
| .AddDeleteDependence<ExpenseItem> (x => x.Nomenclature) | ||
| .AddDeleteDependence<IncomeItem> (x => x.Nomenclature) | ||
|
|
@@ -419,6 +421,19 @@ public static void ConfigureDeletion () | |
| DeleteConfig.AddHibernateDeleteInfo<CausesWriteOff>() | ||
| .AddClearDependence<WriteoffItem>(x => x.CausesWriteOff); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<OverNorm>() | ||
| .AddDeleteDependence<OverNormItem>(x => x.Document); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<OverNormItem>() | ||
| .AddDeleteCascadeDependence(x => x.OverNormOperation); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<Barcoding>() | ||
| .AddDeleteDependence<BarcodingItem>(x => x.Document); | ||
|
|
||
| DeleteConfig.AddHibernateDeleteInfo<BarcodingItem>() | ||
| .AddDeleteCascadeDependence(x => x.OperationExpence) | ||
| .AddDeleteCascadeDependence(x => x.OperationReceipt); | ||
|
|
||
| #endregion | ||
| #region Поставка | ||
| DeleteConfig.AddHibernateDeleteInfo<Shipment>() | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
144 changes: 144 additions & 0 deletions
144
Workwear.Desktop/Domain/Operations/OverNormOperation.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,144 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel.DataAnnotations; | ||
| using Gamma.Utilities; | ||
| using QS.DomainModel.Entity; | ||
| using QS.HistoryLog; | ||
| using QS.Utilities.Numeric; | ||
| using Workwear.Domain.Company; | ||
| using Workwear.Domain.Sizes; | ||
| using Workwear.Domain.Stock; | ||
|
|
||
| namespace Workwear.Domain.Operations { | ||
| [Appellative(Gender = GrammaticalGender.Feminine, | ||
| NominativePlural = "операции выдачи вне нормы", | ||
| Nominative = "операция выдачи вне нормы" | ||
| )] | ||
| [HistoryTrace] | ||
| public class OverNormOperation : PropertyChangedBase, IDomainObject | ||
| { | ||
| #region Properties | ||
| public virtual int Id { get; set; } | ||
|
|
||
| DateTime operationTime = DateTime.Now; | ||
| [Display(Name = "Время операции")] | ||
| public virtual DateTime OperationTime | ||
| { | ||
| get => operationTime; | ||
| set => SetField(ref operationTime, value); | ||
| } | ||
|
|
||
| DateTime lastUpdate = DateTime.Now; | ||
| [Display(Name = "Время последнего обновления операции")] | ||
| public virtual DateTime LastUpdate | ||
| { | ||
| get => lastUpdate; | ||
| set => SetField(ref lastUpdate, value); | ||
| } | ||
|
|
||
| private OverNormType type; | ||
| [Display(Name = "Тип операции выдачи вне нормы")] | ||
| public virtual OverNormType Type | ||
| { | ||
| get => type; | ||
| set => SetField(ref type, value); | ||
| } | ||
|
|
||
| private EmployeeCard employee; | ||
| [Display(Name = "Сотрудник")] | ||
| public virtual EmployeeCard Employee | ||
| { | ||
| get => employee; | ||
| set => SetField(ref employee, value); | ||
| } | ||
|
|
||
| private Nomenclature nomenclature; | ||
| [Display(Name = "Номенклатура")] | ||
| public virtual Nomenclature Nomenclature { | ||
| get => nomenclature; | ||
| set => SetField(ref nomenclature, value); | ||
| } | ||
|
|
||
| private Size wearSize; | ||
| [Display(Name = "Размер")] | ||
| public virtual Size WearSize { | ||
| get => wearSize; | ||
| set => SetField(ref wearSize, value); | ||
| } | ||
|
|
||
| private Size height; | ||
| [Display(Name = "Рост одежды")] | ||
| public virtual Size Height { | ||
| get => height; | ||
| set => SetField(ref height, value); | ||
| } | ||
|
|
||
| private decimal wearPercent; | ||
| /// <summary> | ||
| /// Процент износа не может быть меньше нуля. | ||
| /// Процент хранится в виде коэффициента, то есть значение 1 = 100% | ||
| /// И в базе ограничение на 3 хранимых символа поэтому максимальное значение 9.99 | ||
| /// </summary> | ||
| /// <value>The wear percent.</value> | ||
| [Display(Name = "Процент износа")] | ||
| public virtual decimal WearPercent { | ||
| get => wearPercent; | ||
| set => SetField(ref wearPercent, value.Clamp(0m, 9.99m)); | ||
| } | ||
|
|
||
| private WarehouseOperation warehouseOperation; | ||
| [Display(Name = "Операция на складе")] | ||
| public virtual WarehouseOperation WarehouseOperation | ||
| { | ||
| get => warehouseOperation; | ||
| set => SetField(ref warehouseOperation, value); | ||
| } | ||
|
|
||
| private EmployeeIssueOperation substitutedIssueOperation; | ||
| [Display(Name = "Заменяемая выдача у сотрудника")] | ||
| public virtual EmployeeIssueOperation SubstitutedIssueOperation | ||
| { | ||
| get => substitutedIssueOperation; | ||
| set => SetField(ref substitutedIssueOperation, value); | ||
| } | ||
|
|
||
| private OverNormOperation returnFromOperation; | ||
| [Display(Name = "Списываемая операция выдачи вне нормы")] | ||
| public virtual OverNormOperation ReturnFromOperation | ||
| { | ||
| get => returnFromOperation; | ||
| set => SetField(ref returnFromOperation, value); | ||
| } | ||
|
|
||
| private IList<BarcodeOperation> barcodeOperations = new List<BarcodeOperation>(); | ||
| [Display(Name = "Операции со штрихкодами")] | ||
| public virtual IList<BarcodeOperation> BarcodeOperations | ||
| { | ||
| get => barcodeOperations; | ||
| set => SetField(ref barcodeOperations, value); | ||
| } | ||
|
|
||
| private IList<Barcode> barcodes = new List<Barcode>(); | ||
| [Display(Name = "Штрихкоды")] | ||
| public virtual IList<Barcode> Barcodes | ||
| { | ||
| get => barcodes; | ||
| set => SetField(ref barcodes, value); | ||
| } | ||
| #endregion | ||
|
|
||
| #region Not Mapped Propertis | ||
| public virtual string Title => $"Операция выдачи выдачи вне нормы ({Type.GetAttribute<DisplayAttribute>().Name}) {WarehouseOperation.Nomenclature.Name} в количестве {WarehouseOperation.Amount}"; | ||
| #endregion | ||
| } | ||
|
|
||
| public enum OverNormType | ||
| { | ||
| [Display(Name = "Разовая")] | ||
| Simple, | ||
| [Display(Name = "Подменная")] | ||
| Substitute, | ||
| [Display(Name = "Гостевая")] | ||
| Guest | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.ComponentModel.DataAnnotations; | ||
| using QS.DomainModel.Entity; | ||
| using QS.Extensions.Observable.Collections.List; | ||
| using Workwear.Domain.Operations; | ||
|
|
||
| namespace Workwear.Domain.Stock.Documents { | ||
| [Appellative(Gender = GrammaticalGender.Masculine, | ||
| NominativePlural = "документы маркировки", | ||
| Nominative = "документ маркировки", | ||
| Genitive = "документа маркировки", | ||
| PrepositionalPlural = "документах маркировки" | ||
| )] | ||
|
|
||
| public class Barcoding : StockDocument, IValidatableObject { | ||
|
|
||
| #region Свойства | ||
| public virtual string Title{ | ||
| get{ return String.Format ("Документ маркировки №{0} от {1:d}", DocNumberText, Date);} | ||
| } | ||
|
|
||
| private Warehouse warehouse; | ||
| [Display(Name = "Склад")] | ||
| [Required(ErrorMessage = "Склад должен быть указан.")] | ||
| public virtual Warehouse Warehouse { | ||
| get => warehouse; | ||
| set { SetField(ref warehouse, value, () => Warehouse); } | ||
| } | ||
|
|
||
| private IObservableList<BarcodingItem> items = new ObservableList<BarcodingItem>(); | ||
| [Display (Name = "Строки документа")] | ||
| public virtual IObservableList<BarcodingItem> Items { | ||
| get { return items; } | ||
| set { SetField (ref items, value, () => Items); } | ||
| } | ||
|
|
||
| #endregion | ||
|
|
||
| #region Методы | ||
| public virtual void RemoveItem(BarcodingItem item) { | ||
| Items.Remove (item); | ||
| } | ||
| public virtual void AddItem(StockPosition stockPosition, Warehouse warehouse, int amount) { | ||
| var item = (new BarcodingItem() { | ||
| Document = this, | ||
| OperationExpence = new WarehouseOperation() { | ||
| OperationTime = Date, | ||
| ExpenseWarehouse = warehouse, | ||
| Amount = amount, | ||
| StockPosition = stockPosition }, | ||
| OperationReceipt = new WarehouseOperation() { | ||
| OperationTime = Date, | ||
| ReceiptWarehouse = warehouse, | ||
| Amount = amount, | ||
| StockPosition = stockPosition }, | ||
| }); | ||
| Items.Add(item); | ||
| UoW.Save(item); | ||
| } | ||
|
|
||
| #endregion | ||
|
|
||
| public virtual IEnumerable<ValidationResult> Validate(ValidationContext validationContext) { | ||
| if(false) //затычка | ||
| yield return new ValidationResult (""); | ||
|
|
||
| } | ||
|
|
||
| public virtual BarcodingItem AddItem(WarehouseOperation operationExpance, WarehouseOperation operationReceipt, IEnumerable<Barcode> barcodes) { | ||
| var item = (new BarcodingItem() { | ||
| Document = this, | ||
| OperationExpence = operationExpance, | ||
| OperationReceipt = operationReceipt, | ||
| Barcodes = barcodes | ||
| }); | ||
| Items.Add(item); | ||
| return item; | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Зачем это добавлено если оно все есть выше?