Skip to content

Commit

Permalink
print report updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sasankavikum committed May 4, 2022
1 parent 021cc0a commit 241b86d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 72 deletions.
29 changes: 5 additions & 24 deletions WebContent/VaccineDetails/vaccineprint.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6J

<%
IVaccineDetailsService vaccineService = new VaccineDetailsServiceImpl();
ArrayList<VaccineDetails> vaccineList = vaccineService.getVaccineDetails();
ArrayList<VaccineReport> vaccineList = vaccineService.getVaccinePrintDetails();
%>

<div class="A4" style="border:1px solid black; height:40.0cm;">
Expand All @@ -58,33 +58,17 @@ integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6J
<table class="table mt-3">
<thead>
<tr>
<th>Batch Number</th>
<th>Vaccine Name</th>
<th>Received Date</th>
<th>Country From</th>
<th>Expire Date</th>
<th>Quantity</th>
<th>Current Quantity</th>
</tr>
</thead>
<tbody>
<%
for(VaccineDetails vaccine : vaccineList){
for(VaccineReport vaccine : vaccineList){
%>
<tr>
<<<<<<< Updated upstream
<td class="text-uppercase"><%= vaccine.getBatch_number() %></td>
<td class="text-uppercase"><%= vaccine.getVaccine_name() %></td>
<td class="text-uppercase"><%= vaccine.getReceive_date() %></td>
<td class="text-uppercase"><%= vaccine.getCountry() %></td>
<td class="text-uppercase"><%= vaccine.getExpire_date() %></td>
=======
<td class="text-uppercase"><%= vaccine.getBatchNo() %></td>
<td class="text-uppercase"><%= vaccine.getVaccineName() %></td>
<td class="text-uppercase"><%= vaccine.getVaccineReceive() %></td>
<td class="text-uppercase"><%= vaccine.getVaccineCountry() %></td>
<td class="text-uppercase"><%= vaccine.getVaccineExpire() %></td>
>>>>>>> Stashed changes
<td class="text-uppercase"><%= vaccine.getQuantity() %></td>
<td class="text-uppercase p-1 text-dark h5"><%= vaccine.getCount() %></td>
</tr>
<% } %>
</tbody>
Expand All @@ -97,9 +81,8 @@ integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6J
<div class="row mt-5">
<div class="col-md-12">

<<<<<<< Updated upstream

<p class="font-weight-bold m-0 p-0 mt-1 ml-5">Generetaed by: ................................................ </p><br>
=======
<p class="font-weight-bold m-0 p-0 mt-1 ml-5" id="paragraph1"> </p><br>

<p class="font-weight-bold m-0 p-0 mt-1 ml-5" id="paragraph2"> </p>
Expand All @@ -112,8 +95,6 @@ integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6J
var date = today.getFullYear()+'-'+(today.getMonth()+1)+'-'+today.getDate();
document.getElementById("paragraph2").innerHTML="Prepaired Date : "+date
>>>>>>> Stashed changes
</script>

</div>
Expand Down
2 changes: 1 addition & 1 deletion WebContent/WEB-INF/Query.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

<query id="print_vaccinedetails">
<![CDATA[
select vaccineName, COUNT(*) as count
select vaccineName, SUM(quantity) as count
from vaccine_details
group by vaccineName
]]>
Expand Down
49 changes: 8 additions & 41 deletions src/com/rcss/model/VaccineReport.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,27 @@

public class VaccineReport {
private String vaccineName;
private String batchNo;
private String vaccineReceive;
private String vaccineCountry;
private String vaccineExpire;
private int quantity;
private int count;

public VaccineReport() {
super();
}
public VaccineReport(String vaccineName, String batchNo, String vaccineReceive, String vaccineCountry,
String vaccineExpire, int quantity) {

public VaccineReport(String vaccineName, int count) {
super();
this.vaccineName = vaccineName;
this.batchNo = batchNo;
this.vaccineReceive = vaccineReceive;
this.vaccineCountry = vaccineCountry;
this.vaccineExpire = vaccineExpire;
this.quantity = quantity;
this.count = count;
}

public String getVaccineName() {
return vaccineName;
}
public String getBatchNo() {
return batchNo;
}
public String getVaccineReceive() {
return vaccineReceive;
}
public String getVaccineCountry() {
return vaccineCountry;
}
public String getVaccineExpire() {
return vaccineExpire;
}
public int getQuantity() {
return quantity;
}
public void setVaccineName(String vaccineName) {
this.vaccineName = vaccineName;
}
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public void setVaccineReceive(String vaccineReceive) {
this.vaccineReceive = vaccineReceive;
}
public void setVaccineCountry(String vaccineCountry) {
this.vaccineCountry = vaccineCountry;
}
public void setVaccineExpire(String vaccineExpire) {
this.vaccineExpire = vaccineExpire;
public int getCount() {
return count;
}
public void setQuantity(int quantity) {
this.quantity = quantity;
public void setCount(int count) {
this.count = count;
}
}
6 changes: 1 addition & 5 deletions src/com/rcss/service/VaccineDetailsServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,7 @@ public ArrayList<VaccineReport> getVaccinePrintDetails() {
while (resultSet.next()) {
VaccineReport vaccine = new VaccineReport();
vaccine.setVaccineName(resultSet.getString(CommonConstants.COLUMN_INDEX_ONE));
vaccine.setBatchNo(resultSet.getString(CommonConstants.COLUMN_INDEX_TWO));
vaccine.setVaccineReceive(resultSet.getString(CommonConstants.COLUMN_INDEX_THREE));
vaccine.setVaccineCountry(resultSet.getString(CommonConstants.COLUMN_INDEX_FOUR));
vaccine.setVaccineExpire(resultSet.getString(CommonConstants.COLUMN_INDEX_FIVE));
vaccine.setQuantity(resultSet.getInt(CommonConstants.COLUMN_INDEX_SIX));
vaccine.setCount(resultSet.getInt(CommonConstants.COLUMN_INDEX_TWO));
vaccineList.add(vaccine);
}

Expand Down
2 changes: 1 addition & 1 deletion src/com/rcss/util/CommonConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class CommonConstants {
public static final String PASSWORD = "password";
public static final String DRIVER_NAME = "driverName";

public static final String COMPANY_NAME = "Red Cross Support Service";
public static final String COMPANY_NAME = "Vaccination Support Service System";
public static final String COMPANY_ADDRESS = "Red Cross, Weera Madduma Bandara Mawatha, Kandy";
public static final String CONTACT_NO = "0812 222 100";

Expand Down

0 comments on commit 241b86d

Please sign in to comment.