29 Commits

Author SHA1 Message Date
15d510df3b エラー修正 2026-10-22 16:06:36 +09:00
43f91b4116 HTML一部修正 2026-10-22 15:16:01 +09:00
f091771efc コントローラー作成、HTML修正等 2026-10-22 11:22:10 +09:00
bb9fdcca5e エラー解消後編集 2026-10-21 13:23:51 +09:00
ba81a9b50f HTML追加 2026-10-20 16:49:09 +09:00
b6af343b77 no message 2026-10-20 15:00:18 +09:00
7e6bf7c80f 承認待ち書籍のコントローラー 2026-10-20 14:55:16 +09:00
d26d5c7b0b no message 2026-10-20 14:50:31 +09:00
d158c0aa17 Merge branch 'y-ogawa' 2026-10-20 14:48:48 +09:00
3b4ec1f78b 貸出承認確認の途中 2026-10-20 14:48:24 +09:00
s-ohasi
57a499dea3 Merge commit 'e9bc560cfa8d7b9298afe228391e8d28a8cb46d0' 2026-10-20 14:14:03 +09:00
s-ohasi
e9bc560cfa ログイン機能でログインHTML、ログインコントローラークラス、ログアウトコントローラークラス、ログインユーザーフォームクラス、エンプロイーレポジトリーのクラスを作成 2026-10-20 14:05:54 +09:00
5ab1abde4d Merge branch 'y-ogawa' 2026-10-20 13:05:07 +09:00
5f206740cc 書籍貸出承認のserviceです 2026-10-20 13:04:52 +09:00
s-ohasi
83ddd7d3d5 Merge branch 'main' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team1 into s-ohasi 2026-10-20 11:01:02 +09:00
00ca28736d Merge branch 'a-takayama' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team1 2026-10-20 10:24:25 +09:00
s-ohasi
a3aab8ab6b no message 2026-10-20 10:19:40 +09:00
s-ohasi
7871635ffe no message 2026-10-20 09:53:00 +09:00
d119c26b64 Book_collection追加 (length部分) 2026-10-20 09:48:14 +09:00
m-endo
1becc3b196 EmployeeEntity修正版 2026-10-20 09:35:14 +09:00
m-endo
101296640c Merge branch 'main' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team1 into m-endo 2026-10-19 17:38:12 +09:00
a26978a690 最修正です 2026-10-19 17:22:22 +09:00
580850be5a Merge remote-tracking branch 'origin/a-takayama' 2026-10-19 16:54:56 +09:00
2761953159 Merge branch 'main' of https://gitea.it-college.co.jp/2026_0910_AI_5G_Java_MUN/last-group-delevelopment-team1 into a-takayama 2026-10-19 16:53:36 +09:00
37e9cb3be1 Book_collectionEntity途中 2026-10-19 16:53:13 +09:00
b5a4317cba Merge branch 's-ikeda' 2026-10-19 16:53:07 +09:00
1b26da2ed4 book_collectionとborrow_bookのentity修正です 2026-10-19 16:45:55 +09:00
f5488495bc Merge branch 'a-takayama' 2026-10-19 15:37:17 +09:00
a3f2c47f89 Book_collectionentity 2026-10-19 15:35:57 +09:00
15 changed files with 332 additions and 131 deletions

11
.project Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>last-group-delevelopment-team1</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
</buildSpec>
<natures>
</natures>
</projectDescription>

View File

@@ -74,11 +74,6 @@
<artifactId>spring-boot-starter-webmvc-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.example</groupId>
<artifactId>HelloSpring</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
@@ -127,3 +122,5 @@
</build>
</project>

View File

@@ -0,0 +1,64 @@
//package com.example.demo.controller;
//
//import java.util.logging.Level;
//import java.util.logging.Logger;
//
//import jakarta.servlet.http.HttpSession;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Controller;
//import org.springframework.ui.Model;
//import org.springframework.web.bind.annotation.ModelAttribute;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//
//import com.example.demo.form.ApprovalForm;
//
///**
// * 書籍貸出承認確認用のコントローラ
// */
//@Controller
//public class ApprovalConfirmController {
//
// // ログ出力用インスタンス
// private final static Logger LOGGER = Logger.getLogger(ApprovalConfirmController.class.getName());
//
// // エラーメッセージ用の定数フィールド
// private final static String SEVERE_ERROR_MESSAGE = "エラーが発生しました!";
//
// HttpSession httpSession;
// ApprovalForm approvalform;
//
// @Autowired
// public ApprovalConfirmController(
// HttpSession httpSession,
// ApprovalForm approvalform) {
// this.httpSession = httpSession;
// this.approvalform = approvalform;
// }
//
// @ModelAttribute
// public ApprovalForm approvalForm() {
// return new ApprovalForm();
// }
//
// @RequestMapping(value = "/ApprovalConfirm", method = RequestMethod.POST)
// public String AprrvalForm(ApprovalForm ApprovalForm, Model model) {
//
// try {
//
//
// return;
// } catch (Exception e) {
// // ログイン情報の破棄
// httpSession.invalidate();
//
// e.printStackTrace();
//
// // エラーログ出力
// LOGGER.log(Level.SEVERE, SEVERE_ERROR_MESSAGE, e);
// // エラー画面遷移
// return "error";
// }
// }
//}

View File

@@ -1,35 +0,0 @@
package com.example.demo.controller;
import org.springframework.stereotype.Controller;
@Controller
public class LendingListController {
// @GetMapping("/lendingList")
// public String show(Model model) {
// List<X> x = xservice.getX();
// model.addAttribute("Y", x);
// return "Y";
// }
// HttpSession session;
//
// @Autowired
// public SelectListController(HttpSession session) {
// this.session=session;
// }
// @RequestMapping("/lendingList")
// public String lendList() {
// return "lendingList";
// }
// @RequestMapping(value = lendingList, method = RequestMethod.POST)
// public String select( , Model model) {
// model.addAttribute(
// );
// return lendingList;
//
// }
}

View File

@@ -1,5 +0,0 @@
package com.example.demo.controller;
public class a {
}

View File

@@ -1,5 +0,0 @@
package com.example.demo.entity;
public class a {
}

View File

@@ -1,5 +1,7 @@
package com.example.demo.repository;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@@ -8,4 +10,9 @@ import com.example.demo.entity.Borrow_booksEntity;
@Repository
public interface Borrow_BooksRepository extends JpaRepository<Borrow_booksEntity, Integer> {
/*
* 申請者IDで検索
* */
Optional<Borrow_booksEntity> findByIdApplicant(Integer idApplicant);
}

View File

@@ -1,5 +1,7 @@
package com.example.demo.repository;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@@ -7,5 +9,6 @@ import com.example.demo.entity.EmployeeEntity;
@Repository
public interface EmployeeRepository extends JpaRepository<EmployeeEntity, Integer> {
Optional<EmployeeEntity> findByMailAddressAndPassword(String mailAddress, String password);
}

View File

@@ -0,0 +1,31 @@
//package com.example.demo.service.Impl;
//
//import java.util.List;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Service;
//import org.springframework.transaction.annotation.Transactional;
//
//import com.example.demo.repository.Borrow_BooksRepository;
//import com.example.demo.service.ApprovalBorrowBooks;
//
//@Service
//@Transactional
//public class ApprovalBorrowBooksImpl implements ApprovalBorrowBooks {
//
// Borrow_BooksRepository borrowbooksRepository;
//
// @Autowired
// public ApprovalBorrowBooksImpl(Borrow_BooksRepository borrowbooksRepository) {
// this.borrowbooksRepository = borrowbooksRepository;
// }
//
// /* 申請情報から全件取得
// * @return 取得した情報すべて
// */
// public List<???> selectAll() {
// return ???Entity.create???List(???Repository.findAll());
// }
//
//
//}

View File

@@ -1,27 +0,0 @@
package com.example.demo.service;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.example.demo.entity.EmployeeEntity;
import com.example.demo.repository.Book_CollectionRepository;
import com.example.demo.repository.Borrow_BooksRepository;
@Service
@Transactional
public class LendingListService {
@Autowired
private Book_CollectionRepository collection;
@Autowired
private Borrow_BooksRepository borrow;
@Autowired
private EmployeeEntity employee;
public List<table> getcollectionWithborrow(){
return collection;
}
}

View File

@@ -1,5 +0,0 @@
package com.example.demo.service;
public class S {
}

View File

@@ -0,0 +1,69 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<!-- 外部のスクリプトファイルを読み込む -->
<script th:src="@{/js/common.js}"></script>
<!-- CSSの読み込み -->
<link rel="stylesheet" th:href="@{/css/all.css}">
<link rel=stylesheet th:href="@{/css/style.css}" type="text/css">
<title>検索</title>
</head>
<body>
<div class="rightSection">
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
<div class="header-spacing"></div>
<a href="showMenu">メニューに戻る</a>
<div class="header-spacing"></div>
<h1><span>検索結果</span></h1>
<div class="header-spacing"></div>
<th:block th:if="${employeeInfoFormList != null and employeeInfoFormList.size() > 0}">
<!-- 検索結果が1件以上ある場合 -->
<table class="table-grid table-striped table-hover">
<thead>
<tr>
<th style="width: 100px;">申請ID</th>
<th style="width: 100px;">申請者名</th>
<th style="width: 100px;">書籍名</th>
<th style="width: 100px;">申請日</th>
<th style="width: 100px;">貸出日</th>
<th style="width: 100px;">返却予定日</th>
<th style="width: 100px;">操作</th>
</tr>
</thead>
<tbody>
<tr th:each="employeeInfoForm : ${employeeInfoFormList}">
<td th:text="${employeeInfoForm.idRequest}"></td>
<td th:text="${employeeInfoForm.nmApplicant}"></td>
<td th:text="${employeeInfoForm.nmBook}"></td>
<td th:text="${employeeInfoForm.dateRequest}"></td>
<td th:text="${employeeInfoForm.dateBorrow}"></td>
<td th:text="${employeeInfoForm.dateReturn}"></td>
<td th:text="${employeeInfoForm.dateRequest}"></td>
<td>
<form action="/approve" method="get">
<input name="idRequest" th:value="${employeeInfoForm.idRequest}" type="hidden">
<input type="submit" value="承認">
</form>
</td>
</tr>
</tbody>
</table>
</th:block>
<th:block th:if="${employeeInfoFormList == null or employeeInfoFormList.size() == 0}">
<!-- 検索結果が0件の場合 -->
現在書籍貸出の申請はありません。
</th:block>
</body>
</html>

View File

@@ -0,0 +1,141 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<!-- 外部のスクリプトファイルを読み込む -->
<script th:src="@{/js/common.js}"></script>
<!-- CSSの読み込み -->
<link rel="stylesheet" th:href="@{/css/all.css}">
<link rel=stylesheet th:href="@{/css/style.css}" type="text/css">
<title>書籍貸出承認確認</title>
</head>
<body>
<h1>登録内容確認   
<div class="rightSection">
<span class="loginInfo">ログイン者名:<span th:text="${session.loginUser.nmEmployee}"></span></span>
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
</h1>
<!-- 変数名は変更したが、中身は変更していない -->
<!-- ボタンや遷移も手を付けていない -->
<form action="insertEmployee"
id="insertForm"
method="post"
th:object="${insertEmployeeForm}">
<div class="msgBox error" th:if="${messageError != null}">
<span class="error" th:each="message : ${messageError.message}" th:text="${message}"></span>
</div>
<table>
<tr>
<th class="header">申請ID</th>
<td>
<label>
<input class="readOnly"
name="idRquest"
readonly="readonly"
type="text"
value="自動で設定されます"/>
</label>
</td>
</tr>
<tr>
<th class="header">申請者名</th>
<td>
<label>
<input class="readOnly"
name="nmEmployee"
readonly="readonly"
th:value="*{nmEmployee}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">申請日</th>
<td>
<label>
<input class="readOnly"
name="dataRequest"
readonly="readonly"
th:value="*{dataRequest}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">ISBN</th>
<td>
<label>
<input class="readOnly"
name="isBn"
readonly="readonly"
th:value="*{isBn}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">書籍名</th>
<td>
<label>
<input class="readOnly"
name="nmBook"
readonly="readonly"
th:value="*{nmBook}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">出版社</th>
<td>
<label>
<input class="readOnly"
name="publisher"
readonly="readonly"
th:value="*{publisher}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">特記事項</th>
<td>
<label>
<input class="readOnly"
name="note"
readonly="readonly"
th:value="*{note}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">貸出日</th>
<td>
<label>
<input class="readOnly"
name="dateBorrow"
readonly="readonly"
th:value="*{dateBorrow}"
type="text"/>
</label>
</td>
</tr>
<tr>
<th class="header">返却予定日</th>
<td>
<label>
<input class="readOnly"
name="dateScheduledReturn"
readonly="readonly"
th:value="*{date_scheduled_return}"
type="text"/>
</label>
</td>
</tr>
</table>
</form>
</body>
</html>

View File

@@ -1,45 +0,0 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>貸出中書籍一覧</title>
</head>
<body>
<h1>
<div class="rightSection">
<button class="logoutButton" onclick="logoutSubmit()">ログアウト</button>
</div>
<a href="menu">メニューに戻る</a>
<h1><span>検索結果</span></h1>
</h1>
<thead>
<tr>
<th style="width: 100px;">申請ID</th>
<th style="width: 100px;">申請者名</th>
<th style="width: 100px;">書籍名</th>
<th style="width: 100px;">申請日</th>
<th style="width: 100px;">貸出日</th>
<th style="width: 100px;">返却予定日</th>
<th style="width: 100px;">操作</th>
</tr>
</thead>
<tbody>
<tr th:each="">
<td th:text="${.idRequest}"></td>
<td th:text="${.}"></td>
<td th:text="${.}"></td>
<td th:text="${.dateRequest}"></td>
<td th:text="${.dateBorrow}"></td>
<td th:text="${.dateScheduledReturn}"></td>
<td>
<form action="" method="post" style="display: inline;">
<input name="" th:value="${}" type="hidden">
<input type="submit" value="返却">
</form>
</td>
</tbody>
</body>
</html>