Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LaMartin-Webomagic
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Pratik Shrivastava
LaMartin-Webomagic
Commits
7cc22160
Commit
7cc22160
authored
Jul 16, 2024
by
Pratik Shrivastava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: initialize admission interview
parent
b1c2378b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
326 additions
and
2 deletions
+326
-2
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
...aMartin/admission/controller/AdmissionFormController.java
+40
-0
lamartinBackend/src/main/java/com/example/LaMartin/admission/dao/repository/AdmissionFormDataRepository.java
...admission/dao/repository/AdmissionFormDataRepository.java
+2
-1
lamartinBackend/src/main/java/com/example/LaMartin/admission/mapper/AdmissionFormPreviewMapper.java
...LaMartin/admission/mapper/AdmissionFormPreviewMapper.java
+30
-0
lamartinBackend/src/main/java/com/example/LaMartin/common/service/TemplateService.java
.../com/example/LaMartin/common/service/TemplateService.java
+17
-0
lamartinBackend/src/main/resources/templates/AdmissionConfimationFormListTemplate.html
...urces/templates/AdmissionConfimationFormListTemplate.html
+233
-0
lamartinDashboard/dashboard.html
lamartinDashboard/dashboard.html
+4
-1
No files found.
lamartinBackend/src/main/java/com/example/LaMartin/admission/controller/AdmissionFormController.java
View file @
7cc22160
...
@@ -199,6 +199,46 @@ public class AdmissionFormController {
...
@@ -199,6 +199,46 @@ public class AdmissionFormController {
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename=admission-form-list.pdf"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename=admission-form-list.pdf"
);
IOUtils
.
copy
(
pdfStream
,
response
.
getOutputStream
());
IOUtils
.
copy
(
pdfStream
,
response
.
getOutputStream
());
}
}
@GetMapping
(
value
=
"/admission-confirmation-form/download-form"
)
@ApiResponses
(
value
=
{
@ApiResponse
(
code
=
200
,
message
=
"SUCCESS"
),
@ApiResponse
(
code
=
400
,
message
=
"FAILED"
),
@ApiResponse
(
code
=
500
,
message
=
"Exception Occurred"
)
})
@ApiOperation
(
value
=
""
)
public
void
downloadAdmissionConfirmationForm
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestParam
(
"apikey"
)
String
apiKey
,
@RequestParam
(
"formIds"
)
String
formIds
)
throws
Exception
{
// TODO: validation of api key using redis
List
<
Long
>
formIdList
=
Stream
.
of
(
formIds
.
split
(
","
))
.
map
(
Long:
:
valueOf
)
.
collect
(
Collectors
.
toList
());
if
(
formIdList
.
isEmpty
())
{
throw
new
Exception
(
"Provide formIds to download"
);
}
List
<
AdmissionFormData
>
admissionFormDataList
=
this
.
admissionFormDAOController
.
getAdmissionFormDataListByIds
(
formIdList
);
if
(
admissionFormDataList
.
isEmpty
())
{
throw
new
Exception
(
"No Admission Data Found"
);
}
String
output
=
templateService
.
generateAdmissionConfirmationFormListTemplate
(
admissionFormDataList
);
ByteArrayInputStream
pdfStream
=
pdfService
.
convertHtmlToPdf
(
output
);
response
.
setContentType
(
MediaType
.
APPLICATION_OCTET_STREAM_VALUE
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename=admission-confirmation-form-list.pdf"
);
IOUtils
.
copy
(
pdfStream
,
response
.
getOutputStream
());
}
@GetMapping
(
@GetMapping
(
value
=
"/admission-form/download-counsellor-scoring-template"
value
=
"/admission-form/download-counsellor-scoring-template"
...
...
lamartinBackend/src/main/java/com/example/LaMartin/admission/dao/repository/AdmissionFormDataRepository.java
View file @
7cc22160
...
@@ -2,6 +2,7 @@ package com.example.LaMartin.admission.dao.repository;
...
@@ -2,6 +2,7 @@ package com.example.LaMartin.admission.dao.repository;
import
com.example.LaMartin.admission.mapper.AdmissionFormCountMapper
;
import
com.example.LaMartin.admission.mapper.AdmissionFormCountMapper
;
import
com.example.LaMartin.admission.mapper.AdmissionFormMapper
;
import
com.example.LaMartin.admission.mapper.AdmissionFormMapper
;
import
com.example.LaMartin.admission.mapper.AdmissionFormPreviewMapper
;
import
com.example.LaMartin.admission.model.AdmissionFormData
;
import
com.example.LaMartin.admission.model.AdmissionFormData
;
import
com.example.LaMartin.admission.pojo.AdmissionFormCount
;
import
com.example.LaMartin.admission.pojo.AdmissionFormCount
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -199,7 +200,7 @@ public class AdmissionFormDataRepository {
...
@@ -199,7 +200,7 @@ public class AdmissionFormDataRepository {
parameters
.
addValue
(
"correspondenceEmail"
,
correspondenceEmail
);
parameters
.
addValue
(
"correspondenceEmail"
,
correspondenceEmail
);
}
}
return
namedParameterJdbcTemplate
return
namedParameterJdbcTemplate
.
query
(
sql
.
toString
(),
parameters
,
new
AdmissionFormMapper
());
.
query
(
sql
.
toString
(),
parameters
,
new
AdmissionForm
Preview
Mapper
());
}
}
public
List
<
AdmissionFormData
>
getAdmissionFormDataListByIds
(
List
<
Long
>
ids
)
{
public
List
<
AdmissionFormData
>
getAdmissionFormDataListByIds
(
List
<
Long
>
ids
)
{
...
...
lamartinBackend/src/main/java/com/example/LaMartin/admission/mapper/AdmissionFormPreviewMapper.java
0 → 100644
View file @
7cc22160
package
com
.
example
.
LaMartin
.
admission
.
mapper
;
import
com.example.LaMartin.admission.model.AdmissionFormData
;
import
com.example.LaMartin.common.utils.RowMapperUtil
;
import
org.jetbrains.annotations.NotNull
;
import
org.springframework.jdbc.core.RowMapper
;
import
org.springframework.stereotype.Component
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
@Component
public
class
AdmissionFormPreviewMapper
implements
RowMapper
<
AdmissionFormData
>
{
@Override
public
AdmissionFormData
mapRow
(
@NotNull
ResultSet
rs
,
int
rowNum
)
throws
SQLException
{
AdmissionFormData
formData
=
new
AdmissionFormData
();
formData
.
setFullName
(
RowMapperUtil
.
getString
(
rs
,
"full_name"
));
formData
.
setFatherName
(
RowMapperUtil
.
getString
(
rs
,
"father_name"
));
formData
.
setFatherEmail
(
RowMapperUtil
.
getString
(
rs
,
"father_email"
));
formData
.
setMotherName
(
RowMapperUtil
.
getString
(
rs
,
"mother_name"
));
formData
.
setInteractionDate
(
RowMapperUtil
.
getString
(
rs
,
"interaction_date"
));
formData
.
setInteractionTime
(
RowMapperUtil
.
getString
(
rs
,
"interaction_time"
));
return
formData
;
}
}
lamartinBackend/src/main/java/com/example/LaMartin/common/service/TemplateService.java
View file @
7cc22160
...
@@ -27,6 +27,23 @@ public class TemplateService {
...
@@ -27,6 +27,23 @@ public class TemplateService {
return
templateEngine
.
process
(
"AdmissionFormListTemplate"
,
context
);
return
templateEngine
.
process
(
"AdmissionFormListTemplate"
,
context
);
}
}
public
String
generateAdmissionConfirmationFormListTemplate
(
List
<
AdmissionFormData
>
admissionFormDataList
)
{
// for (AdmissionFormData admissionFormData: admissionFormDataList)
// {
// String originalDate = "2024-07-04";
// LocalDate date = LocalDate.parse(admissionFormData.getInteractionDate());
// DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy");
// admissionFormData.setInteractionDate(date.format(formatter));
// }
Context
context
=
new
Context
();
context
.
setVariable
(
"admissionFormList"
,
admissionFormDataList
);
context
.
setVariable
(
"serverPath"
,
settings
.
getStaticServerPath
());
return
templateEngine
.
process
(
"AdmissionConfimationFormListTemplate"
,
context
);
}
public
String
generateAdmissionInterviewTemplate
(
@NotNull
AdmissionFormData
admissionFormData
)
{
public
String
generateAdmissionInterviewTemplate
(
@NotNull
AdmissionFormData
admissionFormData
)
{
String
originalDate
=
"2024-07-04"
;
// Example date string
String
originalDate
=
"2024-07-04"
;
// Example date string
...
...
lamartinBackend/src/main/resources/templates/AdmissionConfimationFormListTemplate.html
0 → 100644
View file @
7cc22160
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
lang=
"en"
>
<head>
<title>
Intimation for Admission
</title>
<style>
*
{
font-family
:
Arial
,
sans-serif
;
margin
:
0
;
padding
:
0
;
font-size
:
12px
;
}
body
{
margin
:
0px
20px
;
}
.header
,
.content
,
.footer
{
text-align
:
center
;
position
:
relative
;
width
:
100%
;
}
.content
{
text-align
:
justify
;
}
.left
,
.center
,
.right
{
display
:
inline-block
;
}
.left
{
position
:
absolute
;
left
:
0
;
}
.right
{
position
:
absolute
;
right
:
0
;
}
.middle
{
margin
:
0
auto
;
text-align
:
center
;
}
.header
img
{
height
:
80px
;
}
.content
{
margin-top
:
10px
;
}
.content
p
{
margin
:
5px
0
;
}
.content
b
{
font-weight
:
bold
;
}
.account-details
,
.fee-details
{
width
:
100%
;
margin-top
:
20px
;
border-collapse
:
collapse
;
}
.account-details
td
,
.fee-details
td
,
.fee-details
th
{
border
:
1px
solid
black
;
padding
:
5px
;
text-align
:
left
;
}
.fee-details
th
{
text-align
:
center
;
}
.signature
{
margin-top
:
40px
;
text-align
:
left
;
}
.signature
img
{
width
:
18%
;
height
:
18%
;
}
</style>
</head>
<body>
<div
class=
"container"
th:each=
"admissionForm : ${admissionFormList}"
>
<div
class=
"header"
>
<div
class=
"left"
>
<h4>
Supriyo Dhar, HRM, MBA, LLB
<br
/>
Secretary
</h4>
</div>
<div
class=
"center"
>
<img
th:src=
"@{${serverPath + 'static/la-martin-logo.png'}}"
alt=
"Logo"
height=
"80px"
/>
<!-- <img src="la-martin-logo copy.png" alt="Logo" height="80px" /> -->
</div>
<div
class=
"right"
>
<h2>
La Martiniere
</h2>
</div>
</div>
<div
class=
"content"
>
<div
class=
"left"
>
<p><b>
To,
</b><br
/>
<b
th:text=
"${admissionForm.fatherName}"
>
Pratik Shrivastava
</b>
</p>
</div>
<div
class=
"right"
>
<p><b
th:text=
"${admissionForm.interactionDate}"
>
17/07/2024
</b></p>
</div>
<br/>
<br/>
<br/>
<div
class=
"middle"
>
<strong>
Sub:
<u>
Intimation for Admission
</u></strong>
</div>
<p>
Dear Parent/s,
</p>
<br
/>
<p>
We are pleased to inform you that your son
<b
th:text=
"${admissionForm.fullName}"
></b>
has been
granted admission to
<b
th:text=
"${admissionForm.admissionClass}"
></b>
for the year
2024-2025.
</p>
<p>
Please contact the
<b>
Principal's office of La Martiniere for Boys, 11 Dr. U.N. Brahmachari Street,
Kolkata 700 017
</b>
, in person, along with a printout of this letter on
<b>
05/04/2024 at 10:00am
</b>
for necessary formalities.
</p>
<p>
Parents willing to pay the full year fee may do so, or pay quarterly by way of Pay Order favouring
<b>
“La
Martiniere Calcutta”
</b>
or bank transfer, at the time of admission.
</p>
<p>
For the
<b>
1
<sup>
st
</sup>
Quarter (April to June 2024)
</b>
, parents are to pay
<b>
Rs. 1,69,500/- (Rupees
One Lacs Sixty Nine Thousand Five Hundred only)
</b>
towards Tuition Fees, Session Fees,
Infrastructure Development Fees, Admission Fees, Building Development Fees and Security Deposit
(refundable). The amount may be transferred directly to the following account.
</p>
<br
/>
<p><b><u>
Penalty of Rs.5000/- will be levied if fees not paid on the due date.
</u></b></p>
<table
class=
"account-details"
>
<tr>
<td>
Account Name
</td>
<td>
: La Martiniere, Calcutta
</td>
</tr>
<tr>
<td>
Account Number
</td>
<td>
: 031201001229
</td>
</tr>
<tr>
<td>
Bank Name
</td>
<td>
: ICICI Bank, Gorky Terrace
</td>
</tr>
<tr>
<td>
Account Type
</td>
<td>
: Savings
</td>
</tr>
<tr>
<td>
RTGS/NEFT/IFS Code
</td>
<td>
: ICIC0000312
</td>
</tr>
</table>
<br
/>
<p>
Please email the enclosed format to
<b>
lmcao@rediffmail.com
</b>
for confirmation of your payment and also
bring a hard copy while visiting Principal’s Office.
</p>
<table
class=
"fee-details"
>
<tr>
<th>
Quarters
</th>
<th>
Amount
</th>
<th>
Date of Payment
</th>
</tr>
<tr>
<td>
1
<sup>
st
</sup>
Quarter (April to June 2024)
</td>
<td>
Rs. 1,69,500.00
</td>
<td>
On the date of admission
</td>
</tr>
<tr>
<td>
2
<sup>
nd
</sup>
Quarter (July to Sept. 2024)
</td>
<td>
Rs. 1,24,500.00
</td>
<td>
1
<sup>
st
</sup>
to 5
<sup>
th
</sup>
July, 2024
</td>
</tr>
<tr>
<td>
3
<sup>
rd
</sup>
Quarter (Oct to Dec. 2024)
</td>
<td>
Rs. 1,24,500.00
</td>
<td>
1
<sup>
st
</sup>
to 5
<sup>
th
</sup>
Oct. 2024
</td>
</tr>
<tr>
<td>
4
<sup>
th
</sup>
Quarter (Jan to March 2025)
</td>
<td>
Rs. 1,24,500.00
</td>
<td>
6
<sup>
th
</sup>
to 11
<sup>
th
</sup>
Jan 2025
</td>
</tr>
<tr>
<td><b>
Total
</b></td>
<td
colspan=
"2"
><b>
Rs 5,43,000.00
</b></td>
</tr>
</table>
<div
class=
"signature"
>
<p>
Yours faithfully,
</p>
<!-- <img th:src="@{${serverPath + 'static/signature.png'}}" alt="Logo" height="80px" /> -->
<img
src=
"signature.png"
alt=
"Logo"
height=
"80px"
/>
<p><b>
SUPRIYO DHAR
</b><br
/>
Secretary
<br
/>
La Martiniere, Kolkata
</p>
</div>
<div
class=
"footer"
>
<div
class=
"left"
>
<p>
11 Dr. U.N. Brahmachari Street
<br
/>
Kolkata - 700 017 (INDIA)
</p>
</div>
<div
class=
"center"
>
<p>
+91-33-4040-6600/01
<br
/>
22890112(D)
</p>
</div>
<div
class=
"right"
>
<p>
secretary@lamartiniere.co
<br
/>
lamartiniere.co
</p>
</div>
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
lamartinDashboard/dashboard.html
View file @
7cc22160
...
@@ -55,7 +55,10 @@
...
@@ -55,7 +55,10 @@
<button
id=
"summary-popup-btn"
class=
"btn btn-success btn-sm"
>
Download Score Sheets
</button>
<button
id=
"summary-popup-btn"
class=
"btn btn-success btn-sm"
>
Download Score Sheets
</button>
<button
id=
"download-admission-data-btn"
class=
"btn btn-success btn-sm"
>
Download Admission Data
</button>
<button
id=
"download-admission-data-btn"
class=
"btn btn-success btn-sm"
>
Download Admission Data
</button>
</div>
</div>
<button
id=
"bookAppointmentBtn"
class=
"btn btn-primary btn-sm"
>
Schedule Appointment
</button>
<div>
<button
id=
"bookAppointmentBtn"
class=
"btn btn-primary btn-sm"
>
Schedule Admission
</button>
<button
id=
"bookAppointmentBtn"
class=
"btn btn-primary btn-sm"
>
Schedule Appointment
</button>
</div>
</div>
</div>
</div>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment