Compare commits
150 Commits
1.0.0
...
42f5ef38c8
| Author | SHA1 | Date | |
|---|---|---|---|
| 42f5ef38c8 | |||
| ed93202fd4 | |||
| 7842696a34 | |||
| fe49432d0c | |||
| 865211131e | |||
| ad2268d642 | |||
| f2686188e0 | |||
| 048a2097c3 | |||
| 2fd327e3b8 | |||
| cb71d6abed | |||
| 9cedf4402e | |||
| 94c5c8c436 | |||
| 8cc1981305 | |||
| 8e9a2a0975 | |||
| 51a96f6c6a | |||
| 7d37b7744c | |||
| a26a52b078 | |||
| 2f80dbc13c | |||
| 929e41e312 | |||
| 1e7c6a6694 | |||
| 6297ae92eb | |||
| 14b83bf9d2 | |||
| 8ea4a4139e | |||
| d04e2ec56d | |||
| f9ffdb7126 | |||
| c50560566c | |||
| cf0428dd53 | |||
| 2da07b6da9 | |||
| 55f2c1b862 | |||
| fffbd811ce | |||
| 30b3eb6450 | |||
| 2c97c5054e | |||
| dfc5c52003 | |||
| 6fed42ee64 | |||
| 64390c5430 | |||
| 794e30154b | |||
| 1321c88a31 | |||
| 2b3e36f9b9 | |||
| 38ff2c1673 | |||
| c6468122fd | |||
| b29ff1f1a1 | |||
| 070b538cb2 | |||
| 00ba9700e9 | |||
| b4a9d52fcd | |||
| d832f1b960 | |||
| d33f68f0cd | |||
| db03b35292 | |||
| a674a7300e | |||
| 6f9b94a97c | |||
| c4a99e3c35 | |||
| 1e796e2c13 | |||
| 26d00213d2 | |||
| 03b28eed6e | |||
| 0baee2be8b | |||
| a49efec313 | |||
| 96bfccdd55 | |||
| 1f3a29b293 | |||
| 49f685f109 | |||
| 2c196c68d7 | |||
| f0c4fef3cb | |||
| 2b3bc03049 | |||
| 913a1ce49d | |||
| eb8dc3cd4f | |||
| 4368129802 | |||
| 5d64abace3 | |||
| 1f9ae3998c | |||
| 3c62579a49 | |||
| e4f62fff86 | |||
| 3a26eaa335 | |||
| c0fdf241eb | |||
| 9f0f0d703e | |||
| dae2a08390 | |||
| 7110678c7d | |||
| 0649c85e76 | |||
| 4f40f33666 | |||
| 724fba4177 | |||
| bb44162bd6 | |||
| f1d2ec2083 | |||
| 6fe6625892 | |||
| 61ba728f35 | |||
| df6b0d56b7 | |||
| 22779715b9 | |||
| e96d6fc2f9 | |||
| 55edcd2a2d | |||
| 606de33d41 | |||
| 41bd905bd2 | |||
| bb4be4885d | |||
| e8f0871230 | |||
| 09d131b89b | |||
| 9aa427aef8 | |||
| 397e13d865 | |||
| ac565e7703 | |||
| 2167003ffd | |||
| 7d6c3d9fd6 | |||
| 0407205b5d | |||
| 212a1feafc | |||
| c8b300336e | |||
| 653ab748e7 | |||
| e354881309 | |||
| 107f5b173c | |||
| 4788830d72 | |||
| aa1bd5167e | |||
| 398e0d5796 | |||
| 21d6c76f37 | |||
| 21336e8dc6 | |||
| b87b574b7d | |||
| cfbaaf85ac | |||
| ac8213ff04 | |||
| b290ff47f2 | |||
| bc968a1a0f | |||
| fc72354331 | |||
| 8defd33651 | |||
| dfeecd59d8 | |||
| ae982f59e3 | |||
| be8102c777 | |||
| c9217867df | |||
| e7e5e7fbb0 | |||
| 568d2d3918 | |||
| a301ca1ecc | |||
| 4c3397f5c5 | |||
| f3977428ef | |||
| e04f133b49 | |||
| 6770e41a6e | |||
| 04a43d6f04 | |||
| b336dfe483 | |||
| 4e94cccc88 | |||
| 06491eea1f | |||
| ea018f2da3 | |||
| c17387acde | |||
| 9a4fb30d07 | |||
| 9294b538da | |||
| e844cbfb02 | |||
| d40caafce2 | |||
| 890ab7a67f | |||
| a50e202786 | |||
| 9cc874322a | |||
| 8d8099f9e2 | |||
| 1d8c709910 | |||
| d62212d3ed | |||
| df9ec74142 | |||
| 96a61f306f | |||
| c35060f4d3 | |||
| 1e889f6e9a | |||
| e9a3e91082 | |||
| c4b1561cbc | |||
| 6f477ee174 | |||
| be26bf9b6e | |||
| e57713fabc | |||
| 166eec9181 | |||
| edc4aef0db |
192
.gitea/workflows/build-and-publish.yml
Normal file
192
.gitea/workflows/build-and-publish.yml
Normal file
@@ -0,0 +1,192 @@
|
||||
name: Build, Test & Publish DataModels + Apps
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
create: # nowe tagi
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, closed]
|
||||
workflow_dispatch: # ręczne uruchomienie
|
||||
|
||||
jobs:
|
||||
restore-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # potrzebne do MinVer i git describe
|
||||
repository: FA/FA_WEB # ← nazwa repozytorium (organizacja/repo)
|
||||
ref: ${{ github.ref }} # lub ${{ gitea.ref }} – w Gitea obie działają
|
||||
# Najważniejsze – nadpisz domyślny URL
|
||||
url: http://srv51.mikr.us:20120/git/FA/FA_WEB.git
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x' # zmień na swoją wersję jeśli inna
|
||||
|
||||
- name: Restore all projects
|
||||
run: |
|
||||
echo "=== Restore wszystkich projektów ==="
|
||||
find . -name "*.csproj" -type f -exec dotnet restore "{}" \;
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
echo "=== Uruchamianie testów ==="
|
||||
dotnet test --no-restore --configuration Release --logger "trx"
|
||||
|
||||
pack-datamodels:
|
||||
runs-on: ubuntu-latest
|
||||
needs: restore-and-test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Install MinVer CLI
|
||||
run: dotnet tool install --global minver-cli
|
||||
|
||||
- name: Pack DataModel projects
|
||||
env:
|
||||
MINVER_AUTO_INCREMENT: patch
|
||||
MINVER_MINIMUM_MAJOR_MINOR: 2.0
|
||||
MINVER_DEFAULT_PRE_RELEASE_IDENTIFIERS: alpha.0
|
||||
run: |
|
||||
echo "=== Obliczona wersja przez MinVer ==="
|
||||
MINVER_VERSION=$(minver --verbosity detailed)
|
||||
echo "Wersja: $MINVER_VERSION"
|
||||
|
||||
mkdir -p nupkg
|
||||
|
||||
echo "=== Pełniejsze fetch git (tags) ==="
|
||||
git fetch --prune --tags --force
|
||||
|
||||
echo "=== Dostępne tagi ==="
|
||||
git tag -l
|
||||
|
||||
echo "=== Aktualny opis commitu ==="
|
||||
git describe --tags --always --dirty || echo "Brak tagów"
|
||||
|
||||
echo "=== Pakowanie projektów z PackageId ==="
|
||||
find . -name "*.csproj" -type f | while read -r csproj; do
|
||||
if grep -q '<PackageId>' "$csproj"; then
|
||||
PROJECT_NAME=$(basename "$csproj" .csproj)
|
||||
echo "→ Pakuję $PROJECT_NAME"
|
||||
dotnet pack "$csproj" \
|
||||
--no-restore \
|
||||
--configuration Release \
|
||||
-o "./nupkg" \
|
||||
/p:PackageVersion="$MINVER_VERSION"
|
||||
else
|
||||
echo "→ Pomijam $(basename "$csproj" .csproj) – brak PackageId"
|
||||
fi
|
||||
done
|
||||
|
||||
ls -la nupkg/ || echo "Brak wygenerowanych pakietów"
|
||||
|
||||
- name: Upload NuGet packages as artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: nuget-packages
|
||||
path: nupkg/*.nupkg
|
||||
retention-days: 3
|
||||
|
||||
publish-to-baget:
|
||||
runs-on: ubuntu-latest
|
||||
needs: pack-datamodels
|
||||
steps:
|
||||
- uses: actions/checkout@v4 # potrzebne tylko jeśli chcesz logować coś z repo
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Download built packages
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: nuget-packages
|
||||
path: nupkg/
|
||||
|
||||
- name: Create custom NuGet.config (allow HTTP)
|
||||
run: |
|
||||
cat > NuGet.Config <<EOF
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="BaGet" value="http://baget:80/v3/index.json" protocolVersion="3" allowInsecureConnections="true" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
EOF
|
||||
|
||||
- name: Publish packages to BaGet
|
||||
env:
|
||||
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
|
||||
run: |
|
||||
echo "=== Publikacja do BaGet ==="
|
||||
find nupkg -name "*.nupkg" -type f | while read -r pkg; do
|
||||
echo "→ Push $(basename "$pkg")"
|
||||
dotnet nuget push "$pkg" \
|
||||
--source "BaGet" \
|
||||
--api-key "$BAGET_API_KEY" \
|
||||
--skip-duplicate
|
||||
done
|
||||
|
||||
build-and-publish-apps:
|
||||
runs-on: ubuntu-latest
|
||||
needs: publish-to-baget
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Restore (with latest DataModels)
|
||||
run: |
|
||||
echo "=== Restore z najnowszymi pakietami z BaGet ==="
|
||||
dotnet restore
|
||||
|
||||
- name: Publish selected applications
|
||||
run: |
|
||||
echo "=== Publish aplikacji z DeployToCentral ==="
|
||||
find . -name "*.csproj" -type f | while read -r csproj; do
|
||||
PROJECT_NAME=$(basename "$csproj" .csproj)
|
||||
PROJECT_DIR=$(dirname "$csproj")
|
||||
|
||||
if [[ "$PROJECT_NAME" == *"Api"* ]] || [[ "$PROJECT_NAME" == *"Blazor"* ]] || \
|
||||
[[ "$PROJECT_DIR" == *"/Api/"* ]] || [[ "$PROJECT_DIR" == *"/Blazor/"* ]]; then
|
||||
|
||||
DEPLOY_TO_CENTRAL=$(dotnet msbuild "$csproj" -getProperty:DeployToCentral -nologo 2>/dev/null || echo "false")
|
||||
|
||||
if [ "$DEPLOY_TO_CENTRAL" != "true" ]; then
|
||||
echo "Pomijam $PROJECT_NAME (DeployToCentral ≠ true)"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "→ Publishing $PROJECT_NAME"
|
||||
dotnet publish "$csproj" \
|
||||
--no-restore \
|
||||
--configuration Release \
|
||||
-o "./publish-$PROJECT_NAME"
|
||||
|
||||
# Tutaj możesz dodać deployment (np. rsync, scp, docker build+push itp.)
|
||||
# Przykład (zakomentowany):
|
||||
# rsync -avz --delete ./publish-$PROJECT_NAME/ user@server:/path/to/app/
|
||||
else
|
||||
echo "Pomijam $PROJECT_NAME (nie Api/Blazor)"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Pipeline zakończony"
|
||||
154
.woodpecker.yml
Normal file
154
.woodpecker.yml
Normal file
@@ -0,0 +1,154 @@
|
||||
skip_clone: true
|
||||
|
||||
when:
|
||||
event: pull_request
|
||||
action:
|
||||
- merge
|
||||
branch: master
|
||||
|
||||
steps:
|
||||
debug-location:
|
||||
image: alpine
|
||||
commands:
|
||||
- pwd # gdzie aktualnie jesteśmy
|
||||
- ls -la # co jest w bieżącym katalogu
|
||||
- find /woodpecker -maxdepth 4 -type d 2>/dev/null
|
||||
clone-manual:
|
||||
image: woodpeckerci/plugin-git
|
||||
settings:
|
||||
remote: http://gitea:3000/FA/FA_WEB.git
|
||||
branch: master
|
||||
depth: 1
|
||||
|
||||
restore:
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
cd "${CI_WORKSPACE}"
|
||||
echo "Aktualna ścieżka: $(pwd)"
|
||||
echo "=== Restore wszystkich projektów ==="
|
||||
find . -name "*.csproj" -type f -exec dotnet restore "{}" \;
|
||||
|
||||
test:
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
cd "${CI_WORKSPACE}"
|
||||
echo "=== Uruchamianie testów ==="
|
||||
dotnet test --no-restore --configuration Release --logger "trx"
|
||||
depends_on: [restore]
|
||||
|
||||
pack-datamodels:
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
cd "${CI_WORKSPACE}"
|
||||
echo "=== Instalacja MinVer CLI ==="
|
||||
dotnet tool install --tool-path /tmp/minver minver-cli
|
||||
echo "=== Obliczona wersja przez MinVer ==="
|
||||
MINVER_VERSION=$(/tmp/minver/minver \
|
||||
--auto-increment patch \
|
||||
--minimum-major-minor 2.0 \
|
||||
--default-pre-release-identifiers alpha.0 \
|
||||
--verbosity info)
|
||||
|
||||
echo "Wersja: $MINVER_VERSION"
|
||||
|
||||
mkdir -p nupkg
|
||||
echo "=== Pełniejsze fetch git (unshallow + tags) ==="
|
||||
git fetch --prune --unshallow || echo "Już full clone – OK"
|
||||
git fetch --tags
|
||||
|
||||
# Diagnostyka – sprawdź czy tag jest widoczny
|
||||
echo "=== Dostępne tagi ==="
|
||||
git tag -l
|
||||
echo "=== Aktualny commit i opis ==="
|
||||
git describe --tags --always --dirty
|
||||
echo "=== Diagnostyka projektów ==="
|
||||
find . -name "*.csproj" -type f | sort
|
||||
mkdir -p nupkg
|
||||
echo "=== Pakowanie projektów DataModel (wykrywane po obecności <PackageId>) ==="
|
||||
find . -name "*.csproj" -type f | while read csproj; do
|
||||
if grep -q '<PackageId>' "$csproj"; then
|
||||
PROJECT_NAME=$(basename "$csproj" .csproj)
|
||||
echo "→ Pakuję $PROJECT_NAME ($csproj)"
|
||||
dotnet pack "$csproj" \
|
||||
--configuration Release \
|
||||
-o "./nupkg" \
|
||||
/p:PackageVersion=$MINVER_VERSION
|
||||
else
|
||||
PROJECT_NAME=$(basename "$csproj" .csproj)
|
||||
echo "→ Pomijam $PROJECT_NAME – brak <PackageId> (nie jest to biblioteka NuGet)"
|
||||
fi
|
||||
done
|
||||
echo "=== Spakowane pakiety (.nupkg) ==="
|
||||
ls -la nupkg/ || echo "Brak spakowanych pakietów!"
|
||||
depends_on: [test]
|
||||
|
||||
publish-datamodels-to-baget:
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
environment:
|
||||
BAGETTER_API_KEY:
|
||||
from_secret: baget_api_key
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
cd "${CI_WORKSPACE}"
|
||||
echo "=== Test połączenia z BaGetter ==="
|
||||
curl -f http://baget:80/v3/index.json || echo "Nie można połączyć się z BaGetter!"
|
||||
# Tworzymy minimalny NuGet.Config tylko po to, żeby odblokować HTTP dla nazwanego źródła
|
||||
cat <<EOF > NuGet.Config
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="BaGet" value="http://baget:80/v3/index.json" allowInsecureConnections="true" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
EOF
|
||||
echo "=== Użyty NuGet.Config (tylko do odblokowania HTTP) ==="
|
||||
cat NuGet.Config
|
||||
echo "=== Publikacja pakietów do BaGetter ==="
|
||||
find ./nupkg -name "*.nupkg" -type f | while read pkg; do
|
||||
echo "→ Push $(basename "$pkg")"
|
||||
dotnet nuget push "$pkg" \
|
||||
--source "BaGet" \
|
||||
--api-key "$BAGETTER_API_KEY" \
|
||||
--skip-duplicate
|
||||
done
|
||||
echo "Wszystkie pakiety DataModel opublikowane w BaGetter!"
|
||||
depends_on: [pack-datamodels]
|
||||
|
||||
build-and-publish-apps:
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
cd "${CI_WORKSPACE}"
|
||||
echo "=== Ponowny restore aplikacji (z najnowszymi pakietami z BaGetter) ==="
|
||||
find . -name "*.csproj" -type f -exec dotnet restore "{}" \;
|
||||
echo "=== Publish aplikacji ==="
|
||||
find . -name "*.csproj" -type f | while read csproj; do
|
||||
PROJECT_NAME=$(basename "$csproj" .csproj)
|
||||
PROJECT_DIR=$(dirname "$csproj")
|
||||
if [[ "$PROJECT_NAME" == *"Api"* ]] || [[ "$PROJECT_NAME" == *"Blazor"* ]] || [[ "$PROJECT_DIR" == *"/Api/"* ]] || [[ "$PROJECT_DIR" == *"/Blazor/"* ]]; then
|
||||
DEPLOY_TO_CENTRAL=$(dotnet msbuild "$csproj" -getProperty:DeployToCentral -noLogo 2>/dev/null || echo "false")
|
||||
if [ "$DEPLOY_TO_CENTRAL" != "true" ]; then
|
||||
echo "Pomijam $PROJECT_NAME (DeployToCentral ≠ true)"
|
||||
continue
|
||||
fi
|
||||
echo "→ Publish $PROJECT_NAME ($csproj)"
|
||||
dotnet publish "$csproj" --no-restore -c Release -o "./publish-$PROJECT_NAME"
|
||||
# ←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←
|
||||
# Tu wstaw swój kod deployu (rsync/ssh itp.)
|
||||
# ←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←
|
||||
else
|
||||
echo "Pomijam $PROJECT_NAME (nie jest to Api ani Blazor)"
|
||||
fi
|
||||
done
|
||||
echo "Pipeline zakończony pomyślnie!"
|
||||
depends_on: [publish-datamodels-to-baget]
|
||||
@@ -55,6 +55,13 @@ namespace FaKrosnoApi.Controllers
|
||||
await service.GetByCustomerAndPo(customerNumber, customerSequence, poNumber);
|
||||
return customerOrder != null ? Ok(customerOrder) : NotFound();
|
||||
}
|
||||
|
||||
[HttpGet("by-po")]
|
||||
public async Task<ActionResult<CustomerOrderDto?>> GetByPo([FromQuery] string poNumber)
|
||||
{
|
||||
CustomerOrderDto? customerOrder = await service.GetByPo(poNumber);
|
||||
return customerOrder != null ? Ok(customerOrder) : NotFound();
|
||||
}
|
||||
|
||||
[HttpGet("list-by-customer-and-po")]
|
||||
public async Task<ActionResult<IList<CustomerOrderDto?>>> GetListByCustomerAndPo(
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ProjectType>Api</ProjectType>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BCrypt.Net-Core" Version="1.6.0" />
|
||||
<PackageReference Include="FaKrosnoEfDataModel" Version="2.0.1-alpha.0.65" />
|
||||
<PackageReference Include="Hangfire" Version="1.8.17" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.11" />
|
||||
@@ -18,14 +20,10 @@
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
|
||||
<PackageReference Include="NSwag.AspNetCore" Version="14.2.0" />
|
||||
<PackageReference Include="OrdersManagementDataModel" Version="2.0.0-alpha.0" />
|
||||
<PackageReference Include="Syncfusion.XlsIO.Net.Core" Version="29.2.4" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FaKrosnoEfDataModel\FaKrosnoEfDataModel.csproj" />
|
||||
<ProjectReference Include="..\OrdersManagementDataModel\OrdersManagementDataModel.csproj" />
|
||||
<ProjectReference Include="..\SytelineSaAppEfDataModel\SytelineSaAppEfDataModel.csproj" />
|
||||
<PackageReference Include="SytelineSaAppEfDataModel" Version="2.0.1-alpha.0.65" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<PackageId>FaKrosnoEfDataModel</PackageId>
|
||||
<Authors>Piotr Kus</Authors>
|
||||
<Description>FaKrosno Entity Framework Data Model</Description>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ProjectType>DataModel</ProjectType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<MinVerAutoIncrement>patch</MinVerAutoIncrement>
|
||||
<MinVerMinimumMajorMinor>1.0</MinVerMinimumMajorMinor>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -20,6 +27,10 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
|
||||
<PackageReference Include="MinVer" Version="6.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ProjectType>Blazor</ProjectType>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
@@ -9,9 +10,11 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BCrypt.Net-Core" Version="1.6.0" />
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
|
||||
<PackageReference Include="FaKrosnoEfDataModel" Version="2.0.1-alpha.0.65" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.11" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Protocols" Version="8.6.1" />
|
||||
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.6.1" />
|
||||
<PackageReference Include="OrdersManagementDataModel" Version="2.0.0-alpha.0" />
|
||||
<PackageReference Include="Syncfusion.Blazor.Buttons" Version="28.2.3" />
|
||||
<PackageReference Include="Syncfusion.Blazor.Cards" Version="28.2.3" />
|
||||
<PackageReference Include="Syncfusion.Blazor.Core" Version="28.2.3" />
|
||||
@@ -20,12 +23,7 @@
|
||||
<PackageReference Include="Syncfusion.Blazor.SplitButtons" Version="28.2.3" />
|
||||
<PackageReference Include="Syncfusion.Blazor.Themes" Version="28.2.3" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.6.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FaKrosnoEfDataModel\FaKrosnoEfDataModel.csproj" />
|
||||
<ProjectReference Include="..\OrdersManagementDataModel\OrdersManagementDataModel.csproj" />
|
||||
<ProjectReference Include="..\SytelineSaAppEfDataModel\SytelineSaAppEfDataModel.csproj" />
|
||||
<PackageReference Include="SytelineSaAppEfDataModel" Version="2.0.1-alpha.0.65" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,8 +2,16 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ProjectType>DataModel</ProjectType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<PackageId>OrdersManagementDataModel</PackageId>
|
||||
<Authors>Piotr Kus</Authors>
|
||||
<Description>OrdersManagement Entity Framework Data Model</Description>
|
||||
<MinVerAutoIncrement>patch</MinVerAutoIncrement>
|
||||
<MinVerMinimumMajorMinor>1.0</MinVerMinimumMajorMinor>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace SytelineSaAppEfDataModel
|
||||
CreateMap<VatCodeAssociation, VatCodeAssociationDto>().ReverseMap();
|
||||
CreateMap<ItemCustPriceAll, ItemCustPriceAllDto>().ReverseMap();
|
||||
CreateMap<EdiLog, EdiLogDto>().ReverseMap();
|
||||
CreateMap<WzRowMarelli, WzRowMarelliDto>().ReverseMap();
|
||||
CreateMap<WzRowMarelli, WzRowMarelliDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,13 @@ namespace SytelineSaAppEfDataModel.Services
|
||||
.Where(x => x.CustNum == customerNumber && x.CustSeq == customerSequence && x.CustPo == poNumber)
|
||||
.Select(x => mapper.Map<CustomerOrderDto>(x)).FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<CustomerOrderDto?> GetByPo(string poNumber)
|
||||
{
|
||||
return await context.CustomerOrders.Where(x => x.CustPo == poNumber && x.Stat == "O")
|
||||
.OrderByDescending(x => x.CreateDate).Select(x => mapper.Map<CustomerOrderDto>(x))
|
||||
.FirstOrDefaultAsync();
|
||||
}
|
||||
|
||||
public async Task<IList<CustomerOrderDto>> GetListByCustomerAndPo(string customerNumber, int customerSequence,
|
||||
string poNumber)
|
||||
|
||||
@@ -17,6 +17,7 @@ namespace SytelineSaAppEfDataModel.Services
|
||||
Task<IList<CustomerOrderDto>> GetListByCustomerAndPo(string customerNumber, int customerSequence,
|
||||
string poNumber);
|
||||
|
||||
Task<CustomerOrderDto?> GetByPo(string poNumber);
|
||||
Task<List<CustomerOrderDto>> GetListByCustomer(string customerNumber, int customerSequence);
|
||||
Task<IEnumerable<CustomerOrderLineDto>?> GetLinesByCoNumber(string customerOrderNumber);
|
||||
Task<IEnumerable<CustomerOrderLineItemDto>?> GetItemsByCoNumber(string customerOrderNumber);
|
||||
|
||||
@@ -2,18 +2,19 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ProjectType>DataModel</ProjectType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
|
||||
<PackageId>SytelineSaAppEfDataModel</PackageId>
|
||||
<Version>1.1.2</Version>
|
||||
<Authors>PK</Authors>
|
||||
<Description>Data Manager for SYTELINE_SA_APP database</Description>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\NuGet</PackageOutputPath>
|
||||
<Authors>Piotr Kus</Authors>
|
||||
<Description>Syteline Entity Framework Data Model</Description>
|
||||
<MinVerAutoIncrement>patch</MinVerAutoIncrement>
|
||||
<MinVerMinimumMajorMinor>1.0</MinVerMinimumMajorMinor>
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
|
||||
@@ -28,6 +29,10 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="9.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="9.0.0" />
|
||||
<PackageReference Include="MinVer" Version="6.0.0">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user