Compare commits
5 Commits
0a48649741
...
7de868d37b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7de868d37b | ||
|
|
d7d6b9b3f5 | ||
|
|
19615ef3f4 | ||
|
|
f059dc9f53 | ||
|
|
0ce3d392a9 |
@@ -9,6 +9,7 @@ import jakarta.persistence.GenerationType;
|
|||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
import jakarta.persistence.JoinColumn;
|
import jakarta.persistence.JoinColumn;
|
||||||
import jakarta.persistence.ManyToOne;
|
import jakarta.persistence.ManyToOne;
|
||||||
|
import jakarta.persistence.OneToOne;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -88,4 +89,7 @@ public class Book {
|
|||||||
@Column(name = "book_approval", nullable = false)
|
@Column(name = "book_approval", nullable = false)
|
||||||
private Integer bookApproval;
|
private Integer bookApproval;
|
||||||
|
|
||||||
|
@OneToOne(mappedBy = "book")
|
||||||
|
private BookLend bookLends;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import jakarta.persistence.Entity;
|
|||||||
import jakarta.persistence.GeneratedValue;
|
import jakarta.persistence.GeneratedValue;
|
||||||
import jakarta.persistence.GenerationType;
|
import jakarta.persistence.GenerationType;
|
||||||
import jakarta.persistence.Id;
|
import jakarta.persistence.Id;
|
||||||
|
import jakarta.persistence.JoinColumn;
|
||||||
|
import jakarta.persistence.OneToOne;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -22,8 +24,9 @@ public class BookLend {
|
|||||||
private int lendId;
|
private int lendId;
|
||||||
|
|
||||||
// 図書管理ID(BK-1など)
|
// 図書管理ID(BK-1など)
|
||||||
@Column(name = "book_manage_id", nullable = false)
|
@OneToOne
|
||||||
private String bookManageId;
|
@JoinColumn(name = "book_manage_id", referencedColumnName = "book_manage_id",nullable = false)
|
||||||
|
private Book book;
|
||||||
|
|
||||||
// 図書管理ID(BK-1など)
|
// 図書管理ID(BK-1など)
|
||||||
@Column(name = "employee_id", nullable = false)
|
@Column(name = "employee_id", nullable = false)
|
||||||
|
|||||||
@@ -1,25 +1,100 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>社内図書一覧</title>
|
<title>社内図書一覧</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<form method="post" action="bookLend">
|
<div class="container">
|
||||||
|
<h1>社内図書一覧</h1>
|
||||||
|
<div class="float-end">
|
||||||
|
</div>
|
||||||
|
<form method="get" action="bookLend">
|
||||||
|
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>図書ID</th>
|
||||||
|
<th>ISBN</th>
|
||||||
|
<th>タイトル</th>
|
||||||
|
<th>著者名</th>
|
||||||
|
<th>出版社</th>
|
||||||
|
<th>出版日</th>
|
||||||
|
<th>カテゴリー名</th>
|
||||||
|
<th>サブカテゴリー名</th>
|
||||||
|
<th>保管場所</th>
|
||||||
|
<th>本の状態</th>
|
||||||
|
<th>登録日時</th>
|
||||||
|
<th>更新日時</th>
|
||||||
|
<th>寄贈者</th>
|
||||||
|
<th>貸出状態??</th>
|
||||||
|
<th>操作??</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<tr th:each="book : ${book}">
|
||||||
|
|
||||||
|
<td th:text="*{book.bookManageId}"></td>
|
||||||
|
<td th:text="*{book.isbn}"></td>
|
||||||
|
<td th:text="*{book.title}"></td>
|
||||||
|
<td th:text="*{book.author}"></td>
|
||||||
|
<td th:text="*{book.publisher}"></td>
|
||||||
|
<td th:text="*{book.publicationDate}"></td>
|
||||||
|
<td th:text="*{book.bookSubcategory.bookCategory.bookCategoryName}"></td>
|
||||||
|
<td th:text="*{book.bookSubcategory.bookSubcategoryName}"></td>
|
||||||
|
<td th:text="*{book.storageLocation.locationName}"></td>
|
||||||
|
<td th:text="*{book.condition}"></td>
|
||||||
|
<td th:text="*{book.createdAt}"></td>
|
||||||
|
<td th:text="*{book.updatedAt}"></td>
|
||||||
|
<td th:text="*{book.employee != null ? book.employee.employeeId : '-'}"></td>
|
||||||
|
<td th:text="*{book.bookLends != null ? book.bookLends.bookStatus : '-'}"></td>
|
||||||
|
|
||||||
|
|
||||||
<button type="submit" class="btn-login">
|
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
|
|
||||||
貸出
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<form method="post" action="update">
|
</tr>
|
||||||
<button type="submit" class="btn-login">
|
</tbody>
|
||||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg>
|
</table>
|
||||||
更新
|
|
||||||
</button>
|
|
||||||
</form>
|
<button type="submit" class="btn-login">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round">
|
||||||
|
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
|
||||||
|
<polyline points="10 17 15 12 10 7" />
|
||||||
|
<line x1="15" y1="12" x2="3" y2="12" />
|
||||||
|
</svg>
|
||||||
|
貸出
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<button type="submit" class="btn-login">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round">
|
||||||
|
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
|
||||||
|
<polyline points="10 17 15 12 10 7" />
|
||||||
|
<line x1="15" y1="12" x2="3" y2="12" />
|
||||||
|
</svg>
|
||||||
|
貸出
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<form method="post" action="update">
|
||||||
|
<button type="submit" class="btn-login">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"
|
||||||
|
stroke-linejoin="round">
|
||||||
|
<path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />
|
||||||
|
<polyline points="10 17 15 12 10 7" />
|
||||||
|
<line x1="15" y1="12" x2="3" y2="12" />
|
||||||
|
</svg>
|
||||||
|
更新
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
@@ -35,17 +35,16 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- ===== 共通:社内図書一覧 ===== -->
|
<!-- ===== 共通:社内図書一覧 ===== -->
|
||||||
<form method="post" name="社内図書一覧" action="book">
|
|
||||||
<a href="javascript:form1.submit()">リンク名</a>
|
|
||||||
<button type="submit" class="btn-book">
|
|
||||||
|
|
||||||
<h3>社内図書一覧</h3>
|
<a class="card" href="/book">
|
||||||
|
|
||||||
|
<h3>社内図書一覧</h3>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
登録されている図書の<br> 一覧を表示します。
|
||||||
|
</p>
|
||||||
|
</a>
|
||||||
|
|
||||||
<p>
|
|
||||||
登録されている図書の<br> 一覧を表示します。
|
|
||||||
</p>
|
|
||||||
</button>
|
|
||||||
</form>
|
|
||||||
<hr> <!--区切り線-->
|
<hr> <!--区切り線-->
|
||||||
|
|
||||||
<!-- ===== 共通:寄贈申請 ===== -->
|
<!-- ===== 共通:寄贈申請 ===== -->
|
||||||
|
|||||||
Reference in New Issue
Block a user