Pharmacy_09_03_18
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.bestray.healthcarepharmacy.controller;
import com.bestray.healthcarecommonutil.exception.ProcessingException;
import com.bestray.healthcarecommonutil.service.InventoryMasterService;
import com.bestray.healthcarecommonutil.service.PatientService;
import com.bestray.healthcarecommonutil.vo.TInventoryMaster;
import com.bestray.healthcarecommonutil.vo.TPatient;
import com.bestray.healthcarecommonutil.vo.TPharmacySales;
import com.bestray.healthcarepharmacy.service.SalesBillingService;
import java.util.Date;
import java.util.List;
import org.hibernate.exception.ConstraintViolationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException;
import org.springframework.stereotype.Controller;
/**
*
* @author user3
*/
@Controller
public class SalesBillingController {
@Autowired
private SalesBillingService salesBillingService;
@Autowired
private InventoryMasterService inventoryMasterService ;
@Autowired
private PatientService patientService;
public List<TPharmacySales> saveSalesDetails(List<TPharmacySales> sales)throws ProcessingException {
try{
return salesBillingService.saveSalesDetails(sales);
}catch(Exception e){
throw e;
}
}
public String getSalesBillingNo(String s)throws ProcessingException{
try{
return salesBillingService.getSalesBillingNo(s);
}catch(ProcessingException e){
throw e;
}
}
public void updateInventoryQuantity(TInventoryMaster inventory)throws ProcessingException{
try{
inventoryMasterService.updateInventoryMaster(inventory);
}catch(ProcessingException e){
e.printStackTrace();
throw e;
}
}
public void savePatient(TPatient patient)throws ProcessingException,ConstraintViolationException,HibernateOptimisticLockingFailureException {
try{
patientService.savePatientRegistration(patient);
}catch( HibernateOptimisticLockingFailureException | ProcessingException | ConstraintViolationException e){
throw e;
}
}
public String getPatientId()throws ProcessingException{
try{
return patientService.getPatientId();
}catch(ProcessingException e){
throw e;
}
}
public List<TPharmacySales> getSalesDetailBeforeGivenDate(TInventoryMaster inventoryMaster, Date fromDate)throws ProcessingException {
try{
return salesBillingService.getSalesDetailBeforeGivenDate(inventoryMaster,fromDate);
}catch(Exception e){
throw e;
}
}
public List<TPharmacySales> getSalesDetailBetweenTwoDate(TInventoryMaster inventoryMaster, Date fromDate,Date toDate)throws ProcessingException {
try{
return salesBillingService.getSalesDetailBetweenTwoDate(inventoryMaster,fromDate,toDate);
}catch(Exception e){
throw e;
}
}
}
|
Revision |
Author |
Commited |
Message |
1
|
girijabapi
|
Fri 27 Jul, 2018 07:30:57 +0000 |
|