Выдачи вне нормы.#607
Conversation
# Conflicts: # Workwear/Workwear.csproj # Workwear/gtk-gui/gui.stetic
# Conflicts: # Workwear.Sql/Scripts/2.8.18.sql # Workwear.Sql/Scripts/new_empty.sql # Workwear/Journal/ViewModels/Stock/StockBalanceJournalViewModel.cs # Workwear/gtk-gui/gui.stetic
…eature/I-1289/T-1801
…e/I-1289/T-1801 # Conflicts: # Workwear.Sql/Scripts/new_empty.sql
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 10089779 | Triggered | ODBC Connection String | 90f3591 | Workwear/Reports/Statements/ReturnStatementHorizontal.rdl | View secret |
| 11031117 | Triggered | Generic Password | 361a50a | Workwear/Reports/Employee/IssuedSheet.rdl | View secret |
| - | - | MySQL Credentials | 90f3591 | Workwear/Reports/Statements/ReturnStatementHorizontal.rdl | View secret |
| 8637697 | Triggered | Generic Password | 361a50a | Workwear/Reports/Documents/PostomatIssueStickers.rdl | View secret |
| - | - | MySQL Credentials | 90f3591 | Workwear/Reports/RequestSheet.rdl | View secret |
| 28810788 | Triggered | MySQL Credentials | 2a783f3 | Workwear/Reports/DutyNorms/AmountIssuedDutyNormsFlat.rdl | View secret |
| 28810789 | Triggered | ODBC Connection String | 2a783f3 | Workwear/Reports/DutyNorms/AmountIssuedDutyNormsFlat.rdl | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
| #endregion | ||
|
|
||
| #region Not Mapped Propertis | ||
| public virtual string Title => $"Выдача вне нормы ({Type.GetAttribute<DisplayAttribute>().Name}) №{(string.IsNullOrEmpty(DocNumber) ? Id.ToString() : DocNumber)} ({Type.GetAttribute<DisplayAttribute>().Name}) от {Date:d}"; |
There was a problem hiding this comment.
У нас же для этого есть более простая функция GetEnumTitle
| #region Propertires | ||
| private IObservableList<OverNormItem> items = new ObservableList<OverNormItem>(); | ||
| [Display (Name = "Строки документа")] | ||
| public virtual IObservableList<OverNormItem>Items { |
| throw new ArgumentNullException(nameof(operation)); | ||
| Items.Add(new OverNormItem(this, operation) { Param = param }); | ||
| } | ||
| #endregion |
There was a problem hiding this comment.
мне кажется закрытие региона должно быть в другом месте.
| yield return new ValidationResult("Документ должен содержать хотя бы одну строку", | ||
| new[] { nameof(Items) }); | ||
|
|
||
| if (Items.Any(x => x.Param == null)) |
There was a problem hiding this comment.
Может быть все нормально, просто хочу понять, это точно пользовательская проблема? Как он ее может создать.
| } | ||
|
|
||
| private OverNormOperation overNormOperation; | ||
| [Display(Name = "Оперерация")] |
| } | ||
|
|
||
| ////1289 проверить коментарий | ||
| //Предворительно нужно загрузиоть все BarcodeOperation и связанные с ними операции иначе будет много запросов в базу |
|
|
||
| HasMany<BarcodeOperation>(x => x.BarcodeOperations) | ||
| .KeyColumn("barcode_id").Inverse().LazyLoad(); | ||
| .KeyColumn("barcode_id").Inverse(); |
There was a problem hiding this comment.
Мы точно в этом месте хотим убрать лейзи? Ну типа получится что мы в любом случае для штрихкода будем получать все его операции, Зачем?
| return StockDocumentType.Completion; | ||
| if(InspectionId.HasValue) | ||
| return StockDocumentType.InspectionDoc; | ||
| if(BarcodingId.HasValue) |
There was a problem hiding this comment.
Тут точно ничего не перепутано? Мне очень странно почему здесь внесе документ BarcodingId но не внесен документ сверх нормы. когда логиченее наоборот. я не понимаю где может понадобится ссылка на документ баркодинга, так как он не создает складских операций.... Зачем это здесь, при это выдача сверх нормы такие операции создает.
| } | ||
|
|
||
| public int CountAllBarcodes(IUnitOfWork unitOfWork, StockPosition stockPosition) | ||
| //public int CountAllBarcodes(IUnitOfWork unitOfWork, Nomenclature nomenclature, Size size = null, Size height = null) |
|
|
||
| var query = UoW.Session.QueryOver(() => overNormOperationAlias) | ||
| .Where(e => e.Employee.Id == Entity.Id); | ||
| /* |
| .JoinAlias(() => warehouseOperationAlias.Height, () => heightAlias, JoinType.LeftOuterJoin) | ||
| .JoinAlias(() => nomenclatureAlias.Type, () => nomenclatureItemTypesAlias, JoinType.LeftOuterJoin) | ||
| .JoinAlias(() => nomenclatureItemTypesAlias.Units, () => nomenclatureUnitsAlias, JoinType.LeftOuterJoin) | ||
| //.Where (e => e.AutoWriteoffDate == null || e.AutoWriteoffDate > DateTime.Today) |
|
|
||
| if(Entity.Id == 0) { | ||
| Entity.CreatedbyUser = userService.GetCurrentUser(); | ||
| logger.Info($"Создание Нового документа маркировки"); |
| using Workwear.Tools.Permissions; | ||
| using Workwear.Tools.Sizes; | ||
| using Workwear.Tools.OverNorms; | ||
| using Workwear.Tools.OverNorms.Impl; |
There was a problem hiding this comment.
Мне не нравится Impl. давай уберем
На данный момент пока не оконченный результат.