Skip to content

Выдачи вне нормы.#607

Open
SpaceTranquility wants to merge 42 commits into
masterfrom
feature/I-1289/T-1801
Open

Выдачи вне нормы.#607
SpaceTranquility wants to merge 42 commits into
masterfrom
feature/I-1289/T-1801

Conversation

@SpaceTranquility
Copy link
Copy Markdown
Contributor

На данный момент пока не оконченный результат.

gurynych and others added 18 commits April 8, 2024 13:13
# 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
…e/I-1289/T-1801

# Conflicts:
#	Workwear.Sql/Scripts/new_empty.sql
@gitguardian
Copy link
Copy Markdown

gitguardian Bot commented Mar 6, 2025

⚠️ GitGuardian has uncovered 7 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
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
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. 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


🦉 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.

Comment thread Workwear.Desktop/Domain/Stock.Documents/OverNormItem.cs Outdated
Comment thread Workwear.Sql/Scripts/2.8.18.sql
Comment thread Workwear.Sql/Scripts/2.8.18.sql
#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}";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У нас же для этого есть более простая функция GetEnumTitle

#region Propertires
private IObservableList<OverNormItem> items = new ObservableList<OverNormItem>();
[Display (Name = "Строки документа")]
public virtual IObservableList<OverNormItem>Items {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пробел

throw new ArgumentNullException(nameof(operation));
Items.Add(new OverNormItem(this, operation) { Param = param });
}
#endregion
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мне кажется закрытие региона должно быть в другом месте.

yield return new ValidationResult("Документ должен содержать хотя бы одну строку",
new[] { nameof(Items) });

if (Items.Any(x => x.Param == null))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Может быть все нормально, просто хочу понять, это точно пользовательская проблема? Как он ее может создать.

}

private OverNormOperation overNormOperation;
[Display(Name = "Оперерация")]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

опечатка

}

////1289 проверить коментарий
//Предворительно нужно загрузиоть все BarcodeOperation и связанные с ними операции иначе будет много запросов в базу
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

одни опечатки


HasMany<BarcodeOperation>(x => x.BarcodeOperations)
.KeyColumn("barcode_id").Inverse().LazyLoad();
.KeyColumn("barcode_id").Inverse();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мы точно в этом месте хотим убрать лейзи? Ну типа получится что мы в любом случае для штрихкода будем получать все его операции, Зачем?

return StockDocumentType.Completion;
if(InspectionId.HasValue)
return StockDocumentType.InspectionDoc;
if(BarcodingId.HasValue)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут точно ничего не перепутано? Мне очень странно почему здесь внесе документ BarcodingId но не внесен документ сверх нормы. когда логиченее наоборот. я не понимаю где может понадобится ссылка на документ баркодинга, так как он не создает складских операций.... Зачем это здесь, при это выдача сверх нормы такие операции создает.

}

public int CountAllBarcodes(IUnitOfWork unitOfWork, StockPosition stockPosition)
//public int CountAllBarcodes(IUnitOfWork unitOfWork, Nomenclature nomenclature, Size size = null, Size height = null)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мусор?


var query = UoW.Session.QueryOver(() => overNormOperationAlias)
.Where(e => e.Employee.Id == Entity.Id);
/*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мусор?

.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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мусор?


if(Entity.Id == 0) {
Entity.CreatedbyUser = userService.GetCurrentUser();
logger.Info($"Создание Нового документа маркировки");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нового с маленькой буквы

using Workwear.Tools.Permissions;
using Workwear.Tools.Sizes;
using Workwear.Tools.OverNorms;
using Workwear.Tools.OverNorms.Impl;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Мне не нравится Impl. давай уберем

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Этот файл точно лишний.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants