Skip to content

Commit

Permalink
Merge pull request #4636 from hmislk/Issue#4618
Browse files Browse the repository at this point in the history
closes #4618 Closes #4618
  • Loading branch information
DeshaniPubudu authored Apr 18, 2024
2 parents a7b64eb + 5197934 commit 4c4dd1b
Show file tree
Hide file tree
Showing 5 changed files with 165 additions and 160 deletions.
12 changes: 12 additions & 0 deletions src/main/java/com/divudi/bean/common/BillController.java
Original file line number Diff line number Diff line change
Expand Up @@ -2527,6 +2527,18 @@ public List<Bill> listBills(
List<Bill> lst = getBillFacade().findByJpql(sql, temMap, TemporalType.TIMESTAMP);
return lst;
}

public Bill findBillbyID( Long id){
if (id == null) {
return null;
}
Bill tb = getBillFacade().find(id);
if (tb == null) {
return null;
}
//System.out.println("tb = " + tb);
return tb;
}

public ServiceSessionFunctions getServiceSessionBean() {
return serviceSessionBean;
Expand Down
14 changes: 8 additions & 6 deletions src/main/java/com/divudi/bean/common/SearchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -6168,12 +6168,12 @@ public void fillClients(BillType billType) {
public void createTableByKeyword(BillType billType) {
fillBills(billType, null, null);
}

public void fillBills(BillType billType, Institution ins, Department dep) {
bills = null;
String sql;
Map temMap = new HashMap();
sql = "select bill"
sql = "select new com.divudi.light.common.BillLight(bill.id, bill.insId, bill.createdAt, bill.institution.name, bill.toDepartment.name, bill.creater.name, bill.patient.person.name, bill.patient.person.phone, bill.total, bill.discount, bill.netTotal, bill.patient.id) "
+ " from BilledBill bill "
+ " where bill.billType = :billType "
+ " and bill.createdAt between :fromDate and :toDate "
Expand Down Expand Up @@ -6215,11 +6215,11 @@ public void fillBills(BillType billType, Institution ins, Department dep) {
sql += " order by bill.createdAt desc ";

temMap.put("billType", billType);
temMap.put("toDate", getToDate());
temMap.put("fromDate", getFromDate());

bills = getBillFacade().findLightsByJpql(sql, temMap, TemporalType.TIMESTAMP);
temMap.put("toDate", toDate);
temMap.put("fromDate", fromDate);

billLights = getBillFacade().findLightsByJpql(sql, temMap, TemporalType.TIMESTAMP);

}

public List<Bill> fillBills(BillType billType, Institution ins, Department dep, Patient patient) {
Expand Down Expand Up @@ -6490,7 +6490,9 @@ public String viewOPDBillById(Long billId) {
if (tb == null) {
return null;
}
//System.out.println("tb = " + tb);
bill = tb;
//System.out.println("bill = " + bill);
return "/opd/bill_reprint?faces-redirect=true";
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>

<persistence version="2.2" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hmisPU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
Expand Down Expand Up @@ -31,3 +30,4 @@
</properties>
</persistence-unit>
</persistence>

2 changes: 1 addition & 1 deletion src/main/resources/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0.20240417.7
3.0.0.20240417.12
Loading

0 comments on commit 4c4dd1b

Please sign in to comment.