Compare commits
86 Commits
1.0.0
...
c6468122fd
| Author | SHA1 | Date | |
|---|---|---|---|
| c6468122fd | |||
| b29ff1f1a1 | |||
| 00ba9700e9 | |||
| b4a9d52fcd | |||
| d33f68f0cd | |||
| a674a7300e | |||
| e4f62fff86 | |||
| 3a26eaa335 | |||
| c0fdf241eb | |||
| 7110678c7d | |||
| 0649c85e76 | |||
| 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 |
162
.woodpecker.yml
Normal file
162
.woodpecker.yml
Normal file
@@ -0,0 +1,162 @@
|
||||
skip_clone: true
|
||||
|
||||
when:
|
||||
event: [push, tag, manual]
|
||||
branch: [master]
|
||||
|
||||
steps:
|
||||
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
|
||||
CODE_DIR="/woodpecker/src/localhost/git/FA/FA_WEB"
|
||||
cd "$CODE_DIR"
|
||||
echo "=== Restore wszystkich projektów ==="
|
||||
find . -name "*.csproj" -type f -exec dotnet restore "{}" \;
|
||||
|
||||
test:
|
||||
image: mcr.microsoft.com/dotnet/sdk:latest
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
CODE_DIR="/woodpecker/src/localhost/git/FA/FA_WEB"
|
||||
cd "$CODE_DIR"
|
||||
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
|
||||
echo "=== Instalacja MinVer CLI ==="
|
||||
dotnet tool install --tool-path /tmp/minver minver-cli
|
||||
CODE_DIR="/woodpecker/src/localhost/git/FA/FA_WEB"
|
||||
cd "$CODE_DIR"
|
||||
|
||||
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 "$CODE_DIR/nupkg" /p:PackageVersion=$MINVER_VERSION
|
||||
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
|
||||
CODE_DIR="/woodpecker/src/localhost/git/FA/FA_WEB"
|
||||
cd "$CODE_DIR"
|
||||
|
||||
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
|
||||
# environment:
|
||||
# DEPLOY_SSH_KEY:
|
||||
# from_secret: deploy_ssh_key
|
||||
commands:
|
||||
- |
|
||||
set -euf
|
||||
CODE_DIR="/woodpecker/src/localhost/git/FA/FA_WEB"
|
||||
cd "$CODE_DIR"
|
||||
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 "$CODE_DIR/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.0" />
|
||||
<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" />
|
||||
@@ -20,12 +22,11 @@
|
||||
<PackageReference Include="NSwag.AspNetCore" Version="14.2.0" />
|
||||
<PackageReference Include="Syncfusion.XlsIO.Net.Core" Version="29.2.4" />
|
||||
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="8.3.0" />
|
||||
<PackageReference Include="SytelineSaAppEfDataModel" Version="1.1.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FaKrosnoEfDataModel\FaKrosnoEfDataModel.csproj" />
|
||||
<ProjectReference Include="..\OrdersManagementDataModel\OrdersManagementDataModel.csproj" />
|
||||
<ProjectReference Include="..\SytelineSaAppEfDataModel\SytelineSaAppEfDataModel.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
<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>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -20,6 +26,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>
|
||||
@@ -20,12 +21,11 @@
|
||||
<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" />
|
||||
<PackageReference Include="SytelineSaAppEfDataModel" Version="2.0.1-alpha.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FaKrosnoEfDataModel\FaKrosnoEfDataModel.csproj" />
|
||||
<ProjectReference Include="..\OrdersManagementDataModel\OrdersManagementDataModel.csproj" />
|
||||
<ProjectReference Include="..\SytelineSaAppEfDataModel\SytelineSaAppEfDataModel.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ProjectType>DataModel</ProjectType>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -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,18 @@
|
||||
|
||||
<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>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.0">
|
||||
@@ -28,6 +28,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