Little4 Restaurant
Restaurant Booking System of TEAM4
Check on the website
(If the web server is shut down, the connection will not be established.)
Kyonggi University Department of AI and Computer Engineering
Professor Kihyun Kwon 2021-1 Software Engineering Article 4
Team4 Developers
- Song Seong-ho (201713866)
github@ssh10032
- Joohyun Yoon (201713919)
github@gabrielyoon7
- Kim Woo-jung (201912039)
github@Kimwoojung11
- Choi Ye-seul (201912149)
github@yeseul9231
- Subin Heo (201912161)
github@heo5620
History
- 2021.06.06
- [Joohyun Yoon] Created part of TEST class, fixed waiting list bug discovered
- [Heo Soo-bin] Design improvement
- [Choi Ye-seul] Design modification
- [Kim Woo-joong] Reservation modification bug fixed, TEST class completed
- 2021.06.05
- [Song Seong-ho] Modification of reservation completion deletion function
- [Heo Soo-bin] Design modification
- [Choi Ye-seul] Design modification
- [Kim Woo-joong] Fix bugs in schedule-related functions
- [Joohyun Yoon] Solved the problem of not being able to check arrival records in customerManager
- 2021.06.04
- [Woojoong Kim] Added point function
- [Joohyun Yoon] Added weekly statistics check function, limited duplicate membership registration, fixed related bugs
- 2021.06.03
- [Heo Soo-bin] Improved design, added guidelines
- [Song Seong-ho] Table DAO, add DTO, delete table, implement additional functions
- [Joohyun Yoon] Added arrival function, added temperature input, linked table-related functions, and added COVID-19 questionnaire inquiry (store management)
- 2021.06.02
- [Kim Woo-jung] Convert waitlist to modal, add walk-in, reservation edit and delete functions
- [Song Seong-ho] CovidLogDTO, DAO added Modal window body temperature input field added
- [Joohyun Yoon] Linking DB to statistics (daily sales), improving table errors, resolving date errors that occur when linking to servers
- 2021.06.01
- [Kim Woo-jung] Add waiting list table and implement table function
- [Choi Ye-seul] Edit menu bar, draft statistics page
- [Heo Soo-bin] Design improvement, statistics page layout creation
- [Joohyun Yoon] Change the modal to respond when clicking on the contents of the schedule table
- 2021.05.31
- [Kim Woo-joong] Waitlist DB additional function
- 2021.05.30
- [Joohyun Yoon] Connecting various information to userReservationInfo
- 2021.05.29
- [Heo Soo-bin] Improved design and improved userReservationInfo layout
- [Joohyun Yoon] Completely fixed DB connection and reservationRequest bugs on userManager page
- 2021.05.28
- [Choi Ye-seul] Added beverage DB, improved page classification when ordering
- [Heo Soo-bin] Edit header for guests, add reservation inquiry page layout
- [Kim Woo-jung] Added WalkIn data output and WalkIn, Reservation duplication prevention function
- [Joohyun Yoon] Completely corrected bootstrap table bugs, added reservation table automatic assignment function
- 2021.05.27
- [Heo Soo-bin] Improved warning notifications
- [Kim Woo-jung] CustomerManager page table output
- [Joohyun Yoon] Activate the menu view button (implementation of printing a single page of menu information), add print function by menu type, add schedule print function by date
- 2021.05.26
- [Song Seong-ho] Edit ReservationDAO addReservation method date passing
- [Joohyun Yoon] BootstrapTable bug fix and function activation
- 2021.05.25
- [Heo Soo-bin] Completely revamped various designs
- [Kim Woo-jung] Implementation of walkIn button on customerManager page
- 2021.05.23
- [Choi Ye-seul] Link modal to WalkIn page, link image to Packing page
- [Joohyun Yoon] Modal bug fixes and layout, reservation request related functions restrict access to non-logged in users
- 2021.05.22
- [Kim Woo-joong] Successfully completed and connected layout to receive request list from customerManager
- [Joohyun Yoon] Improved layout so that schedule table is automatically drawn in customerManager, fixed errors related to ReservationRequest
- [Song Seong-ho] Implemented a function (completeReservationRequest) that sends reservation request data from jsp to Ajaxaction, added case statement reservationRequest case to AjaxAction
- 2021.05.21
- [Joohyun Yoon] Added the ability to pass information and display login information to Reservation
- [Song Seong-ho] Modify ReservationRequest DB table (delete table_id, arrivalTime, add message, modify reservationinfo layout
- [Choi Ye-seul] Edit reservationinfo
- 2021.05.20
- [All] Project name changed to Little4 Restaurant
- [Song Seong-ho] Added ReservationDTO, added ReservationDAO method to send customer reservation data to DB (addReservationRequest), added DB customer reservation request (ReservationRequest) TABLE
- 2021.05.19
- [Kim Woo-joong] Table management page creation
- 2021.05.16
- [Heo Soo-bin] Menu DB and image overhaul
- [Joohyun Yoon] Added the ability to skip dates on the reservation page, implemented some click functions (needs improvement)
- [Kim Woo-joong] Production of payment completion page and pickup management page (including DB linkage)
- 2021.05.15
- [Choi Ye-seul] Added schedule inquiry page layout
- [Joohyun Yoon] Linking images to the menu screen
- 2021.05.14
- [Kim Woo-joong] Creating a payment completion page
- [Heo Soo-bin] Creating a footer that moves from the Packing to the Basket page, creating an order/payment page, fixing the bottom bar, and editing the top post
- [Choi Ye-seul] Reservation page layout and reservation completion screen added
- [Joohyun Yoon] Added shopping cart function in Packing (implementation of total output from payment screen by passing DB), created process of passing DB from shopping cart to payment completion screen, added error page and logic to prevent errors
- 2021.05.13
- [Song Seong-ho] Reservation page integration
- [Kim Woo-joong] Linking Packing and Basket pages
- 2021.05.12
- [Choi Ye-seul] Brand page creation
- [All] Menu page creation and DB linkage / Improvement of some DB structures / Addition of blacklist management function
- 2021.05.11
- [Joohyun Yoon] After building an environment with ubuntu20.04 LTS, Tomcat9.0, mariaDB, and openJDK14 on the server PC, server upload was completed. (To be used during presentation and evaluation period)
- 2021.05.10
- [Joohyun Yoon] Added membership registration function / Added administrator page and functions
- 2021.05.08
- [Choi Ye-seul] Improved header design/Added footer/Added image slider
- [Joohyun Yoon] Added logout function/Introduced bootstrap
- 2021.05.07
- [Joohyun Yoon] Added login function/added User table, created temporary header
- 2021.05.06
- [Song Seong-ho] DB structure update according to meeting results
- 2021.05.05
- [All] Change from Spring to JSP
- [Joohyun Yoon] Build a JSP project with Java ee and Tomcat, input basic structure, draft README
Rules of Project development
- Pull first when using Github
- Write down comments and commit messages carefully
- Write variable names in as much detail as possible.
- Handle variables as much as possible
- If you don’t know or are stuck, discuss
- Be interested and participate outside of your field
- Try modifying it first (if it doesn't work, you can use the Rollback function)
What else could there be?
Project Structure
Project structure analysis video
https://drive.google.com/file/d/1lWJpXaAh7shmv10t9AoQUbhHaI2ocUy0/view?usp=sharing
.idea
IntelliJ related settings
Since each computer's environment is different, it is often corrected automatically. If possible, do not push to github.
lib
This is a folder containing external libraries (*.jar) used in Java projects. To use a specific class, the corresponding library is required, and if added, it must be registered with the compiler.
out
This is IntelliJ's exclusive executable folder created during compilation. It is initialized every time you run the server. It is possible that the error occurred on another computer. When compiling, all files are sent to the out folder and will operate from this folder.
Never send to Github. Errors may occur.
src
Responsible for web server. Written in Java.
- com.se.team4
- application
This package was designed to be applied in a structure as similar as possible to the booksys program given by the professor.
domain
This is the Controller part. Typically, a Controller is requested from JSP, and DAO is called from it.
The part requesting the Controller is mentioned again in WEB-INF.
//domain 코드 예시
public class TestAction implements Action {
@ Override
public String execute ( HttpServletRequest request , HttpServletResponse response ) throws Exception {
Gson gson = new Gson ();
request . setAttribute ( "getSomething" , gson . toJson ( TestDAO . getInstance (). getSomething ( 1 )));
return "RequestDispatcher:test.jsp" ;
}
}
- main
This is a Controller related to the main homepage.
persistency
This is the Model part. Contains classes for communicating with MariaDB.
- D.A.O.
These are classes that directly write query statements.
I think I need to think about whether to send a query to the Database class like the file the professor gave me.
>() {
}.getType());
return result;
}
}">
//DAO클래스 예시
public class TestDAO {
public static TestDAO it ;
public static TestDAO getInstance () { //인스턴스 생성
if ( it == null )
it = new TestDAO ();
return it ;
}
//테스트 메소드
public ArrayList < TestDTO > getSomething ( int num ) {
ArrayList < TestDTO > result = null ;
List < Map < String , Object >> list = null ;
Connection conn = Config . getInstance (). sqlLogin ();
try {
QueryRunner queryRunner = new QueryRunner ();
list = queryRunner . query ( conn , "SELECT * FROM customer WHERE oid=?" , new MapListHandler (), num );
} catch ( SQLException e ) {
e . printStackTrace ();
} finally {
DbUtils . closeQuietly ( conn );
}
Gson gson = new Gson ();
result = gson . fromJson ( gson . toJson ( list ), new TypeToken < List < TestDTO >>() {
}. getType ());
return result ;
}
}
- DTO
This is a class to load the DB received from mariaDB into a Java class.
It is convenient to think that there is one DTO per DB table.
public class TestDTO {
private String oid ;
private String name ;
private String phoneNumber ;
public String getOid () { return oid ;}
public void setOid ( String oid ) { this . oid = oid ;}
public String getName () { return name ;}
public void setName ( String name ) { this . name = name ;}
public String getPhoneNumber () { return phoneNumber ; }
public void setPhoneNumber ( String phoneNumber ) { this . phoneNumber = phoneNumber ;}
}
- common
These are the classes that form the framework of this project. Please never edit it.
When making changes, be sure to share the reason for the revision.
- controller
- filter
- index
- sql
web
Responsible for View. Written in JSP.
- css
This is a folder containing CSS to be used in JSP. (Bootstrap 5.0 included)
- js
This is a folder containing js to be used in JSP. (Bootstrap 5.0, JQuery included)
- WEB-INF
jsp
JSP requests the domain class in *.do format.
The path in *.do format can be found in booksys.properties.
The DB defined in the previous domain class is received, processed into JS, and then inserted into HTML.
//앞선 설정으로 setAttribute 된 자바 변수를 JSP에서 받는 예시 (JQuery와 JSP문법을 사용하여 데이터를 가공한 후, id에 넘겨서 삽입함.)
< script >
$ ( document ) . ready ( function ( ) {
makeinfo1 ( ) ;
} )
function makeinfo1 ( ) {
var data = < %= getSomething % > ;
var list = $('#testDataPrinter');
var text = '';
text+= ' < div > '+'oid : '+data[0].oid+'/ name : '+data[0].name+'/ phoneNumber : '+data[0].phoneNumber+' div > ';
list.append(text);
}
script >
- common
We have collected commonly used JSPs. ex) header, footer
- page
A collection of various basic pages.
lib
I came across this while making a project, but I don't know what it is.
How To Deploy
- How to install IntelliJ
https://leirbag.tistory.com/50
- How to install Tomcat
See section 1 of https://leirbag.tistory.com/52
- How to install mariaDB
https://leirbag.tistory.com/46
- How to apply db
https://leirbag.tistory.com/47
- When a db error occurs in the compiler
https://leirbag.tistory.com/48
- How to install clones and projects
https://leirbag.tistory.com/56
Tools
- IntelliJ 2021.1
- Tomcat 9.0.45
- JSP
- MariaDB (forgot version)
- DBUtils
- Java EE
- Bootstrap
- JQuery
- Ajax
References
- Create JSP project with IntelliJ
https://velog.io/@ruddms936/IntelliJ%EB%A1%9C-JSP-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EC%83 %9D%EC%84%B1
- History of *.do
https://withthisclue.tistory.com/entry/JSP-%EC%9B%B9%ED%8E%98%EC%9D%B4%EC%A7%80%EC%97%90%EC% 84%9C-%EA%B6%81%EA%B8%88%ED%96%88%EB%8D%98-do-%ED%8C%8C%EC%9D%BC%EC%9D%98- %EC%9D%98%EB%AF%B8
- Action class
https://m.blog.naver.com/PostView.nhn?blogId=eroicaplus&logNo=90029919122&proxyReferer=http:%2F%2F210.217.72.119%2F
- Servlet
https://themach.tistory.com/68
- Comparison between Servlet and JSP
https://m.blog.naver.com/acornedu/221128616501