9 Commits

Author SHA1 Message Date
760d3cc709 добавил стату по стоимости заказа 2025-11-07 18:03:57 +04:00
aa66e43e67 lab3 2025-10-25 00:38:37 +04:00
19c7ea79a9 lab2 done 2025-10-14 14:51:22 +04:00
63fb0a92d7 lab2 done 2025-10-10 19:23:10 +04:00
3bf26f7c2d допил =)) 2025-09-27 10:55:11 +04:00
caa18f8b62 lab1 =) 2025-09-26 20:34:36 +04:00
eaddca9831 отчеты 2025-05-23 19:27:05 +04:00
a7caa70b07 чюпеп 2025-05-22 22:55:35 +04:00
e9ee33ffe3 lab_5 2025-05-15 01:59:58 +04:00
152 changed files with 8283 additions and 10 deletions

24
.gitignore vendored Normal file
View File

@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

Binary file not shown.

View File

@@ -0,0 +1,2 @@
#Fri Sep 26 20:26:20 SAMT 2025
gradle.version=8.14.3

Binary file not shown.

BIN
.gradle/file-system.probe Normal file

Binary file not shown.

View File

BIN
.gradle/workspace-id.txt Normal file

Binary file not shown.

Binary file not shown.

22
HELP.md Normal file
View File

@@ -0,0 +1,22 @@
# Getting Started
### Reference Documentation
For further reference, please consider the following sections:
* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/3.5.5/gradle-plugin)
* [Create an OCI image](https://docs.spring.io/spring-boot/3.5.5/gradle-plugin/packaging-oci-image.html)
* [Spring Web](https://docs.spring.io/spring-boot/3.5.5/reference/web/servlet.html)
### Guides
The following guides illustrate how to use some features concretely:
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/rest/)
### Additional Links
These additional references should also help you:
* [Gradle Build Scans insights for your project's build](https://scans.gradle.com#gradle)

35
build.gradle Normal file
View File

@@ -0,0 +1,35 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.5.5'
id 'io.spring.dependency-management' version '1.1.7'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
description = 'Demo project for Spring Boot'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0'
runtimeOnly 'com.h2database:h2'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
tasks.named('test') {
useJUnitPlatform()
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - CustomerServiceTest</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>CustomerServiceTest</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/com.example.service.html">com.example.service</a> &gt; CustomerServiceTest</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">2</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.518s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div class="tab-container">
<ul class="tabLinks">
<li>
<a href="#">Tests</a>
</li>
<li>
<a href="#">Standard error</a>
</li>
</ul>
<div class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="success">create_WhenValidData_ShouldCreateCustomer()</td>
<td class="success">0.515s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">findById_WhenCustomerExists_ShouldReturnCustomer()</td>
<td class="success">0.003s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
<div class="tab">
<h2>Standard error</h2>
<span class="code">
<pre>Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
WARNING: A Java agent has been loaded dynamically (/Users/floom/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.17.7/fbf3d6d649ed37fc9e9c59480a05be0a26e3c2da/byte-buddy-agent-1.17.7.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
</pre>
</span>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="https://www.gradle.org">Gradle 8.14.3</a> at 25 окт. 2025г., 00:35:22</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - DeliveryServiceTest</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>DeliveryServiceTest</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/com.example.service.html">com.example.service</a> &gt; DeliveryServiceTest</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">6</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.045s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div class="tab-container">
<ul class="tabLinks">
<li>
<a href="#">Tests</a>
</li>
</ul>
<div class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="success">create_WhenValidData_ShouldCreateDelivery()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">delete_WhenDeliveryExists_ShouldDeleteDelivery()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">delete_WhenDeliveryNotExists_ShouldReturnFalse()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">findAll_ShouldReturnAllDeliveries()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">findById_WhenDeliveryExists_ShouldReturnDelivery()</td>
<td class="success">0.040s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">update_WhenDeliveryExists_ShouldUpdateDelivery()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="https://www.gradle.org">Gradle 8.14.3</a> at 25 окт. 2025г., 00:35:22</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,126 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - OrderServiceTest</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>OrderServiceTest</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt;
<a href="../packages/com.example.service.html">com.example.service</a> &gt; OrderServiceTest</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">7</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.048s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div class="tab-container">
<ul class="tabLinks">
<li>
<a href="#">Tests</a>
</li>
</ul>
<div class="tab">
<h2>Tests</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Duration</th>
<th>Result</th>
</tr>
</thead>
<tr>
<td class="success">create_WhenCustomerNotFound_ShouldThrowException()</td>
<td class="success">0.003s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">create_WhenValidData_ShouldCreateOrder()</td>
<td class="success">0.038s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">delete_WhenOrderExists_ShouldDeleteOrder()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">delete_WhenOrderNotExists_ShouldReturnFalse()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">findAll_ShouldReturnAllOrders()</td>
<td class="success">0.002s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">findById_WhenOrderExists_ShouldReturnOrder()</td>
<td class="success">0.001s</td>
<td class="success">passed</td>
</tr>
<tr>
<td class="success">update_WhenOrderExists_ShouldUpdateOrder()</td>
<td class="success">0.002s</td>
<td class="success">passed</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="https://www.gradle.org">Gradle 8.14.3</a> at 25 окт. 2025г., 00:35:22</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,174 @@
body {
margin: 0;
padding: 0;
font-family: sans-serif;
font-size: 12pt;
}
body, a, a:visited {
color: #303030;
}
#content {
padding: 30px 50px;
}
#content h1 {
font-size: 160%;
margin-bottom: 10px;
}
#footer {
margin-top: 100px;
font-size: 80%;
white-space: nowrap;
}
#footer, #footer a {
color: #a0a0a0;
}
#line-wrapping-toggle {
vertical-align: middle;
}
#label-for-line-wrapping-toggle {
vertical-align: middle;
}
ul {
margin-left: 0;
}
h1, h2, h3 {
white-space: nowrap;
}
h2 {
font-size: 120%;
}
.tab-container .tab-container {
margin-left: 8px;
}
ul.tabLinks {
padding: 0;
margin-bottom: 0;
overflow: auto;
min-width: 800px;
width: auto;
border-bottom: solid 1px #aaa;
}
ul.tabLinks li {
float: left;
height: 100%;
list-style: none;
padding: 5px 10px;
border-radius: 7px 7px 0 0;
border: solid 1px transparent;
border-bottom: none;
margin-right: 6px;
background-color: #f0f0f0;
}
ul.tabLinks li.deselected > a {
color: #6d6d6d;
}
ul.tabLinks li:hover {
background-color: #fafafa;
}
ul.tabLinks li.selected {
background-color: #c5f0f5;
border-color: #aaa;
}
ul.tabLinks a {
font-size: 120%;
display: block;
outline: none;
text-decoration: none;
margin: 0;
padding: 0;
}
ul.tabLinks li h2 {
margin: 0;
padding: 0;
}
div.tab {
}
div.selected {
display: block;
}
div.deselected {
display: none;
}
div.tab table {
min-width: 350px;
width: auto;
border-collapse: collapse;
}
div.tab th, div.tab table {
border-bottom: solid 1px #d0d0d0;
}
div.tab th {
text-align: left;
white-space: nowrap;
padding-left: 6em;
}
div.tab th:first-child {
padding-left: 0;
}
div.tab td {
white-space: nowrap;
padding-left: 6em;
padding-top: 5px;
padding-bottom: 5px;
}
div.tab td:first-child {
padding-left: 0;
}
div.tab td.numeric, div.tab th.numeric {
text-align: right;
}
span.code {
display: inline-block;
margin-top: 0;
margin-bottom: 1em;
}
span.code pre {
font-size: 11pt;
padding: 10px;
margin: 0;
background-color: #f7f7f7;
border: solid 1px #d0d0d0;
min-width: 700px;
width: auto;
}
span.wrapped pre {
word-wrap: break-word;
white-space: pre-wrap;
word-break: break-all;
}
label.hidden {
display: none;
}

View File

@@ -0,0 +1,84 @@
#summary {
margin-top: 30px;
margin-bottom: 40px;
}
#summary table {
border-collapse: collapse;
}
#summary td {
vertical-align: top;
}
.breadcrumbs, .breadcrumbs a {
color: #606060;
}
.infoBox {
width: 110px;
padding-top: 15px;
padding-bottom: 15px;
text-align: center;
}
.infoBox p {
margin: 0;
}
.counter, .percent {
font-size: 120%;
font-weight: bold;
margin-bottom: 8px;
}
#duration {
width: 125px;
}
#successRate, .summaryGroup {
border: solid 2px #d0d0d0;
-moz-border-radius: 10px;
border-radius: 10px;
}
#successRate {
width: 140px;
margin-left: 35px;
}
#successRate .percent {
font-size: 180%;
}
.success, .success a {
color: #008000;
}
div.success, #successRate.success {
background-color: #bbd9bb;
border-color: #008000;
}
.failures, .failures a {
color: #b60808;
}
.skipped, .skipped a {
color: #c09853;
}
div.failures, #successRate.failures {
background-color: #ecdada;
border-color: #b60808;
}
ul.linkList {
padding-left: 0;
}
ul.linkList li {
list-style: none;
margin-bottom: 5px;
}

View File

@@ -0,0 +1,153 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Test Summary</title>
<link href="css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
<script src="js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Test Summary</h1>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">15</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.611s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div class="tab-container">
<ul class="tabLinks">
<li>
<a href="#">Packages</a>
</li>
<li>
<a href="#">Classes</a>
</li>
</ul>
<div class="tab">
<h2>Packages</h2>
<table>
<thead>
<tr>
<th>Package</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="success">
<a href="packages/com.example.service.html">com.example.service</a>
</td>
<td>15</td>
<td>0</td>
<td>0</td>
<td>0.611s</td>
<td class="success">100%</td>
</tr>
</tbody>
</table>
</div>
<div class="tab">
<h2>Classes</h2>
<table>
<thead>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tbody>
<tr>
<td class="success">
<a href="classes/com.example.service.CustomerServiceTest.html">com.example.service.CustomerServiceTest</a>
</td>
<td>2</td>
<td>0</td>
<td>0</td>
<td>0.518s</td>
<td class="success">100%</td>
</tr>
<tr>
<td class="success">
<a href="classes/com.example.service.DeliveryServiceTest.html">com.example.service.DeliveryServiceTest</a>
</td>
<td>6</td>
<td>0</td>
<td>0</td>
<td>0.045s</td>
<td class="success">100%</td>
</tr>
<tr>
<td class="success">
<a href="classes/com.example.service.OrderServiceTest.html">com.example.service.OrderServiceTest</a>
</td>
<td>7</td>
<td>0</td>
<td>0</td>
<td>0.048s</td>
<td class="success">100%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="https://www.gradle.org">Gradle 8.14.3</a> at 25 окт. 2025г., 00:35:22</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,218 @@
(function (window, document) {
"use strict";
function changeElementClass(element, classValue) {
if (element.getAttribute("className")) {
element.setAttribute("className", classValue);
} else {
element.setAttribute("class", classValue);
}
}
function getClassAttribute(element) {
if (element.getAttribute("className")) {
return element.getAttribute("className");
} else {
return element.getAttribute("class");
}
}
function addClass(element, classValue) {
changeElementClass(element, getClassAttribute(element) + " " + classValue);
}
function removeClass(element, classValue) {
changeElementClass(element, getClassAttribute(element).replace(classValue, ""));
}
function getCheckBox() {
return document.getElementById("line-wrapping-toggle");
}
function getLabelForCheckBox() {
return document.getElementById("label-for-line-wrapping-toggle");
}
function findCodeBlocks() {
const codeBlocks = [];
const tabContainers = getTabContainers();
for (let i = 0; i < tabContainers.length; i++) {
const spans = tabContainers[i].getElementsByTagName("span");
for (let i = 0; i < spans.length; ++i) {
if (spans[i].className.indexOf("code") >= 0) {
codeBlocks.push(spans[i]);
}
}
}
return codeBlocks;
}
function forAllCodeBlocks(operation) {
const codeBlocks = findCodeBlocks();
for (let i = 0; i < codeBlocks.length; ++i) {
operation(codeBlocks[i], "wrapped");
}
}
function toggleLineWrapping() {
const checkBox = getCheckBox();
if (checkBox.checked) {
forAllCodeBlocks(addClass);
} else {
forAllCodeBlocks(removeClass);
}
}
function initControls() {
if (findCodeBlocks().length > 0) {
const checkBox = getCheckBox();
const label = getLabelForCheckBox();
checkBox.onclick = toggleLineWrapping;
checkBox.checked = false;
removeClass(label, "hidden");
}
}
class TabManager {
baseId;
tabs;
titles;
headers;
constructor(baseId, tabs, titles, headers) {
this.baseId = baseId;
this.tabs = tabs;
this.titles = titles;
this.headers = headers;
}
select(i) {
this.deselectAll();
changeElementClass(this.tabs[i], "tab selected");
changeElementClass(this.headers[i], "selected");
while (this.headers[i].firstChild) {
this.headers[i].removeChild(this.headers[i].firstChild);
}
const a = document.createElement("a");
a.appendChild(document.createTextNode(this.titles[i]));
this.headers[i].appendChild(a);
}
deselectAll() {
for (let i = 0; i < this.tabs.length; i++) {
changeElementClass(this.tabs[i], "tab deselected");
changeElementClass(this.headers[i], "deselected");
while (this.headers[i].firstChild) {
this.headers[i].removeChild(this.headers[i].firstChild);
}
const a = document.createElement("a");
const id = this.baseId + "-tab" + i;
a.setAttribute("id", id);
a.setAttribute("href", "#tab" + i);
a.onclick = () => {
this.select(i);
return false;
};
a.appendChild(document.createTextNode(this.titles[i]));
this.headers[i].appendChild(a);
}
}
}
function getTabContainers() {
const tabContainers = Array.from(document.getElementsByClassName("tab-container"));
// Used by existing TabbedPageRenderer users, which have not adjusted to use TabsRenderer yet.
const legacyContainer = document.getElementById("tabs");
if (legacyContainer) {
tabContainers.push(legacyContainer);
}
return tabContainers;
}
function initTabs() {
let tabGroups = 0;
function createTab(num, container) {
const tabElems = findTabs(container);
const tabManager = new TabManager("tabs" + num, tabElems, findTitles(tabElems), findHeaders(container));
tabManager.select(0);
}
const tabContainers = getTabContainers();
for (let i = 0; i < tabContainers.length; i++) {
createTab(tabGroups, tabContainers[i]);
tabGroups++;
}
return true;
}
function findTabs(container) {
return findChildElements(container, "DIV", "tab");
}
function findHeaders(container) {
const owner = findChildElements(container, "UL", "tabLinks");
return findChildElements(owner[0], "LI", null);
}
function findTitles(tabs) {
const titles = [];
for (let i = 0; i < tabs.length; i++) {
const tab = tabs[i];
const header = findChildElements(tab, "H2", null)[0];
header.parentNode.removeChild(header);
if (header.innerText) {
titles.push(header.innerText);
} else {
titles.push(header.textContent);
}
}
return titles;
}
function findChildElements(container, name, targetClass) {
const elements = [];
const children = container.childNodes;
for (let i = 0; i < children.length; i++) {
const child = children.item(i);
if (child.nodeType === 1 && child.nodeName === name) {
if (targetClass && child.className.indexOf(targetClass) < 0) {
continue;
}
elements.push(child);
}
}
return elements;
}
// Entry point.
window.onload = function() {
initTabs();
initControls();
};
} (window, window.document));

View File

@@ -0,0 +1,123 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="x-ua-compatible" content="IE=edge"/>
<title>Test results - Package com.example.service</title>
<link href="../css/base-style.css" rel="stylesheet" type="text/css"/>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
<script src="../js/report.js" type="text/javascript"></script>
</head>
<body>
<div id="content">
<h1>Package com.example.service</h1>
<div class="breadcrumbs">
<a href="../index.html">all</a> &gt; com.example.service</div>
<div id="summary">
<table>
<tr>
<td>
<div class="summaryGroup">
<table>
<tr>
<td>
<div class="infoBox" id="tests">
<div class="counter">15</div>
<p>tests</p>
</div>
</td>
<td>
<div class="infoBox" id="failures">
<div class="counter">0</div>
<p>failures</p>
</div>
</td>
<td>
<div class="infoBox" id="ignored">
<div class="counter">0</div>
<p>ignored</p>
</div>
</td>
<td>
<div class="infoBox" id="duration">
<div class="counter">0.611s</div>
<p>duration</p>
</div>
</td>
</tr>
</table>
</div>
</td>
<td>
<div class="infoBox success" id="successRate">
<div class="percent">100%</div>
<p>successful</p>
</div>
</td>
</tr>
</table>
</div>
<div class="tab-container">
<ul class="tabLinks">
<li>
<a href="#">Classes</a>
</li>
</ul>
<div class="tab">
<h2>Classes</h2>
<table>
<thead>
<tr>
<th>Class</th>
<th>Tests</th>
<th>Failures</th>
<th>Ignored</th>
<th>Duration</th>
<th>Success rate</th>
</tr>
</thead>
<tr>
<td class="success">
<a href="../classes/com.example.service.CustomerServiceTest.html">CustomerServiceTest</a>
</td>
<td>2</td>
<td>0</td>
<td>0</td>
<td>0.518s</td>
<td class="success">100%</td>
</tr>
<tr>
<td class="success">
<a href="../classes/com.example.service.DeliveryServiceTest.html">DeliveryServiceTest</a>
</td>
<td>6</td>
<td>0</td>
<td>0</td>
<td>0.045s</td>
<td class="success">100%</td>
</tr>
<tr>
<td class="success">
<a href="../classes/com.example.service.OrderServiceTest.html">OrderServiceTest</a>
</td>
<td>7</td>
<td>0</td>
<td>0</td>
<td>0.048s</td>
<td class="success">100%</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<p>
<div>
<label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
<input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
</label>
</div>Generated by
<a href="https://www.gradle.org">Gradle 8.14.3</a> at 25 окт. 2025г., 00:35:22</p>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
com.example.DemoApplication

View File

@@ -0,0 +1,22 @@
# H2 Database Configuration
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
# JPA Configuration
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.format_sql=true
# H2 Console (для просмотра базы в браузере)
spring.h2.console.enabled=true
spring.h2.console.path=/h2-console
# Включить инициализацию данных
spring.sql.init.mode=always
spring.jpa.defer-datasource-initialization=true
# Server Configuration
server.port=8080

View File

@@ -0,0 +1,13 @@
INSERT INTO customers (id, name, email, created_at, updated_at)
VALUES
(1, 'Иван Иванов', 'ivan@mail.ru', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(2, 'Петр Петров', 'petr@mail.ru', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(3, 'Мария Сидорова', 'maria@mail.ru', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(4, 'Алексей Козлов', 'alex@mail.ru', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(5, 'Ольга Новикова', 'olga@mail.ru', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);
INSERT INTO deliveries (id, tracking_number, destination, status, customer_name, created_at, updated_at)
VALUES
(1, 'IVN777777', 'гоголя 34', 'В пути', 'Иван Иванов', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP),
(2, 'IVN012021', 'Москва', 'Принято', 'Петр Петров', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP);

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.example.service.CustomerServiceTest" tests="2" skipped="0" failures="0" errors="0" timestamp="2025-10-24T20:35:22.024Z" hostname="MacBook-Air-Oleg.local" time="0.52">
<properties/>
<testcase name="create_WhenValidData_ShouldCreateCustomer()" classname="com.example.service.CustomerServiceTest" time="0.515"/>
<testcase name="findById_WhenCustomerExists_ShouldReturnCustomer()" classname="com.example.service.CustomerServiceTest" time="0.003"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3
WARNING: A Java agent has been loaded dynamically (/Users/floom/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy-agent/1.17.7/fbf3d6d649ed37fc9e9c59480a05be0a26e3c2da/byte-buddy-agent-1.17.7.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
]]></system-err>
</testsuite>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.example.service.DeliveryServiceTest" tests="6" skipped="0" failures="0" errors="0" timestamp="2025-10-24T20:35:22.547Z" hostname="MacBook-Air-Oleg.local" time="0.049">
<properties/>
<testcase name="findById_WhenDeliveryExists_ShouldReturnDelivery()" classname="com.example.service.DeliveryServiceTest" time="0.04"/>
<testcase name="create_WhenValidData_ShouldCreateDelivery()" classname="com.example.service.DeliveryServiceTest" time="0.001"/>
<testcase name="delete_WhenDeliveryNotExists_ShouldReturnFalse()" classname="com.example.service.DeliveryServiceTest" time="0.001"/>
<testcase name="update_WhenDeliveryExists_ShouldUpdateDelivery()" classname="com.example.service.DeliveryServiceTest" time="0.001"/>
<testcase name="delete_WhenDeliveryExists_ShouldDeleteDelivery()" classname="com.example.service.DeliveryServiceTest" time="0.001"/>
<testcase name="findAll_ShouldReturnAllDeliveries()" classname="com.example.service.DeliveryServiceTest" time="0.001"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="com.example.service.OrderServiceTest" tests="7" skipped="0" failures="0" errors="0" timestamp="2025-10-24T20:35:22.598Z" hostname="MacBook-Air-Oleg.local" time="0.048">
<properties/>
<testcase name="create_WhenValidData_ShouldCreateOrder()" classname="com.example.service.OrderServiceTest" time="0.038"/>
<testcase name="create_WhenCustomerNotFound_ShouldThrowException()" classname="com.example.service.OrderServiceTest" time="0.003"/>
<testcase name="findById_WhenOrderExists_ShouldReturnOrder()" classname="com.example.service.OrderServiceTest" time="0.001"/>
<testcase name="findAll_ShouldReturnAllOrders()" classname="com.example.service.OrderServiceTest" time="0.002"/>
<testcase name="delete_WhenOrderNotExists_ShouldReturnFalse()" classname="com.example.service.OrderServiceTest" time="0.001"/>
<testcase name="delete_WhenOrderExists_ShouldDeleteOrder()" classname="com.example.service.OrderServiceTest" time="0.001"/>
<testcase name="update_WhenOrderExists_ShouldUpdateOrder()" classname="com.example.service.OrderServiceTest" time="0.002"/>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

12
front/README.md Normal file
View File

@@ -0,0 +1,12 @@
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project.

18
front/db.json Normal file
View File

@@ -0,0 +1,18 @@
{
"deliveries": [
{
"id": "578a",
"trackingNumber": "IVN012021",
"destination": "гоголя10",
"status": "Доставлено",
"customer": "Парт петрович wwww"
},
{
"id": "0e0f",
"trackingNumber": "IVN123456",
"destination": "Москва",
"status": "В пути",
"customer": "1Иванов Иван"
}
]
}

33
front/eslint.config.js Normal file
View File

@@ -0,0 +1,33 @@
import js from '@eslint/js'
import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
plugins: {
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...reactHooks.configs.recommended.rules,
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]

13
front/index.html Normal file
View File

@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Ivanich Logistics Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

BIN
front/lab1.docx Normal file

Binary file not shown.

BIN
front/lab2.docx Normal file

Binary file not shown.

BIN
front/lab3.docx Normal file

Binary file not shown.

BIN
front/lab4.docx Normal file

Binary file not shown.

BIN
front/lab5.docx Normal file

Binary file not shown.

BIN
front/lab6.docx Normal file

Binary file not shown.

2851
front/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

29
front/package.json Normal file
View File

@@ -0,0 +1,29 @@
{
"name": "pibd-21-kudrinsky-o-s-lab5",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview",
"server": "json-server --watch db.json --port 3001"
},
"dependencies": {
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react-router-dom": "^7.6.0"
},
"devDependencies": {
"@eslint/js": "^9.25.0",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@vitejs/plugin-react": "^4.4.1",
"eslint": "^9.25.0",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^16.0.0",
"vite": "^6.4.1"
}
}

1
front/public/vite.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

274
front/src/App.css Normal file
View File

@@ -0,0 +1,274 @@
.app {
font-family: Arial, sans-serif;
max-width: 1200px;
margin: 0 auto;
padding: 20px;
color: #6aa1d1;
}
.header {
background-color: #646cff;
color: white;
padding: 20px;
text-align: center;
margin-bottom: 30px;
border-radius: 8px;
}
.container {
padding: 0 20px;
}
.delivery-list {
margin-bottom: 30px;
}
.deliveries {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 20px;
margin-top: 20px;
}
.delivery-item {
border: 1px solid #ddd;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
background-color: #f9f9f9;
text-align: left;
}
.delivery-info h3 {
margin-top: 0;
color: #646cff;
}
.status-принято {
color: #2e7d32;
}
.status-в-пути {
color: #ed6c02;
}
.status-доставлено {
color: #2e7d32;
font-weight: bold;
}
.status-отменено {
color: #d32f2f;
text-decoration: line-through;
}
.delivery-actions {
margin-top: 15px;
display: flex;
gap: 10px;
}
.delivery-actions button {
padding: 5px 10px;
cursor: pointer;
border-radius: 4px;
border: 1px solid transparent;
background-color: #646cff;
color: white;
transition: background-color 0.25s;
}
.delivery-actions button:hover {
background-color: #747bff;
}
.delivery-form {
background-color: #f5f5f5;
padding: 20px;
border-radius: 8px;
margin-bottom: 30px;
text-align: left;
}
.delivery-form h3 {
margin-top: 0;
color: #646cff;
}
.delivery-form label {
display: block;
margin-bottom: 10px;
}
.delivery-form input,
.delivery-form select {
width: 100%;
padding: 8px;
margin-top: 5px;
box-sizing: border-box;
border-radius: 4px;
border: 1px solid #ddd;
}
.form-actions {
margin-top: 15px;
display: flex;
gap: 10px;
}
.form-actions button {
padding: 8px 15px;
cursor: pointer;
border-radius: 4px;
border: 1px solid transparent;
background-color: #646cff;
color: white;
transition: background-color 0.25s;
}
.form-actions button:hover {
background-color: #747bff;
}
.form-actions button[type="button"] {
background-color: #f44336;
}
.form-actions button[type="button"]:hover {
background-color: #d32f2f;
}
.list-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
}
.stats-link, .back-link {
padding: 8px 16px;
background: #4CAF50;
color: white;
text-decoration: none;
border-radius: 4px;
transition: background 0.3s;
}
.stats-link:hover, .back-link:hover {
background: #45a049;
}
.deliveries-container {
margin-top: 20px;
}
.no-deliveries {
text-align: center;
color: #666;
font-style: italic;
}
.loading, .error {
text-align: center;
padding: 20px;
font-size: 1.2em;
}
.error {
color: #f44336;
}
/* Стили для статистики */
.stats-container {
max-width: 800px;
margin: 0 auto;
}
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 20px;
margin-top: 30px;
}
.stat-card {
background: #f5f5f5;
padding: 20px;
border-radius: 8px;
text-align: center;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.stat-card h3 {
margin-top: 0;
color: #333;
}
.stat-card p {
font-size: 24px;
font-weight: bold;
margin: 10px 0 0;
}
.delivery-item {
border: 1px solid #e0e0e0;
padding: 20px;
border-radius: 8px;
margin-bottom: 20px;
background-color: white;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.delivery-number {
color: #646cff;
margin-top: 0;
margin-bottom: 15px;
font-size: 1.3em;
border-bottom: 1px solid #eee;
padding-bottom: 10px;
}
.delivery-details {
margin-bottom: 15px;
}
.delivery-details h4 {
margin: 8px 0;
font-size: 1.1em;
color: #555;
}
.delivery-customer h4 {
margin: 8px 0;
font-size: 1.1em;
color: #555;
}
.status {
font-weight: normal;
margin: 8px 0;
}
.delivery-actions {
margin-top: 20px;
display: flex;
gap: 10px;
border-top: 1px solid #eee;
padding-top: 15px;
}
.delivery-actions button {
padding: 8px 15px;
cursor: pointer;
border-radius: 4px;
border: none;
background-color: #646cff;
color: white;
font-size: 0.9em;
transition: background-color 0.2s;
}
.delivery-actions button:last-child {
background-color: #f44336;
}
.delivery-actions button:hover {
opacity: 0.9;
}

24
front/src/App.jsx Normal file
View File

@@ -0,0 +1,24 @@
import { useState } from 'react';
import Header from './components/Header';
import Footer from './components/Footer';
import DeliveryList from './components/DeliveryList';
import OrderList from './components/OrderList';
import './App.css';
function App() {
const [currentView, setCurrentView] = useState('orders');
return (
<div className="App">
<Header onViewChange={setCurrentView} currentView={currentView} />
<main style={{ padding: '20px', minHeight: '80vh' }}>
{currentView === 'orders' ? <OrderList /> : <DeliveryList />}
</main>
<Footer />
</div>
);
}
export default App;

Some files were not shown because too many files have changed in this diff Show More