@Transactional(readOnly=true) public class BudgetDetailsHibernateDAO extends Object implements BudgetDetailsDAO
| Modifier and Type | Field and Description |
|---|---|
protected org.egov.infra.script.service.ScriptService |
scriptService |
protected org.egov.infra.persistence.utils.ApplicationSequenceNumberGenerator |
sequenceGenerator |
| Constructor and Description |
|---|
BudgetDetailsHibernateDAO() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
budgetaryCheck(Map<String,Object> paramMap)
This API is handling the budget checking
|
boolean |
budgetaryCheckForBill(Map<String,Object> paramMap)
This API is handling the budget checking
|
boolean |
consumeEncumbranceBudget(Long financialyearid,
Integer moduleid,
String referencenumber,
Integer departmentid,
Long functionid,
Integer functionaryid,
Integer schemeid,
Integer subschemeid,
Integer boundaryid,
List<Long> budgetheadid,
Integer fundid,
double amount,
String appropriationnumber) |
boolean |
consumeEncumbranceBudget(Map<String,Object> detailsMap)
This API is to check whether the planning budget is available or not.For the amount passed if there is sufficient budget
available API will return TRUE.
|
BudgetUsage |
consumeEncumbranceBudget(String appropriationnumber,
Long financialyearid,
Integer moduleid,
String referencenumber,
Integer departmentid,
Long functionid,
Integer functionaryid,
Integer schemeid,
Integer subschemeid,
Integer boundaryid,
List<Long> budgetheadid,
Integer fundid,
double amount)
Deprecated.
|
BudgetDetail |
create(BudgetDetail entity) |
void |
delete(BudgetDetail entity) |
List<BudgetDetail> |
findAll() |
BudgetDetail |
findById(Number id,
boolean lock) |
BigDecimal |
getActualBudgetUtilized(Map<String,Object> paramMap)
API to load the budget consumed for the previous year/current year.
|
BigDecimal |
getActualBudgetUtilizedForBudgetaryCheck(Map<String,Object> paramMap)
API to load the budget consumed for the previous year/current year.
|
Map<String,BigDecimal> |
getAggregateBudgetedAmtForYear(Map<String,Object> paramMap)
This parameter HashMap contains deptid,functionid, functionaryid,schemeid,
subschemeid,boundaryid,budgetheadid,financialyearid it'll get the budgeted amount based on the parameters.
|
org.egov.infra.admin.master.service.AppConfigValueService |
getAppConfigValuesService() |
BigDecimal |
getBillAmountForBudgetCheck(Map<String,Object> paramMap) |
String |
getBudgetApprNumber(Map<String,Object> paramMap) |
List<BudgetDetail> |
getBudgetDetailsByBudgetGroupId(Long budgetGroupId) |
List<BudgetDetail> |
getBudgetDetailsByBudgetId(Long budgetId) |
BigDecimal |
getBudgetedAmtForYear(Map<String,Object> paramMap)
This parameter HashMap contains deptid,functionid, functionaryid,schemeid,
subschemeid,boundaryid,budgetheadid,financialyearid it'll get the budgeted amount based on the parameters.
|
BigDecimal |
getBudgetedAmtForYearAsOnDate(Map<String,Object> paramMap,
Date asOnDate)
This parameter HashMap contains deptid,functionid, functionaryid,schemeid,
subschemeid,boundaryid,budgetheadid,financialyearid it'll get the budgeted amount based on the parameters.
|
BigDecimal |
getBudgetedAmtForYearRegardingBEorRE(Map<String,Object> paramMap,
String typeBeRe)
This parameter HashMap contains deptid,functionid, functionaryid,schemeid,
subschemeid,boundaryid,budgetheadid,financialyearid,typeBeRe it'll get the budgeted amount based on the parameters.
|
List<BudgetGroup> |
getBudgetHeadByGlcode(org.egov.commons.CChartOfAccounts coa)
To get the Budgetgroup for the glcode at detailcode level or minorcode level or major code level.
|
List<BudgetGroup> |
getBudgetHeadForGlcodeList(List<org.egov.commons.CChartOfAccounts> coa)
To get the Budgetgroup for the glcode at detailcode level for a list of COA codes
|
org.hibernate.Session |
getCurrentSession() |
protected List<String> |
getFieldConfigValues() |
List<org.egov.commons.CFunction> |
getFunctionsByFundAndDepartment(Integer fund,
Long department)
Returns a list of Functions having entry in budget detail with the given fund and department .
|
List<BudgetUsage> |
getListBudgetUsage(Map<String,Object> queryParamMap) |
org.egov.infstr.services.PersistenceService |
getPersistenceService() |
BigDecimal |
getPlannigBudgetBy(Integer fundId,
Integer deptId,
Date asOnDate1)
returns sum(approved BE/RE amount + appropriated (addition-deduction) amount)* mutliplicationFactor if budget and
reappropriation both doesnot exist it will return zero
|
BigDecimal |
getPlanningBudgetAvailable(Long financialyearid,
Integer departmentid,
Long functionid,
Integer functionaryid,
Integer schemeid,
Integer subschemeid,
Integer boundaryid,
List<Long> budgetheadid,
Integer fundid)
To get the planning budget available amount
|
BigDecimal |
getPlanningBudgetUsage(BudgetDetail bd) |
BigDecimal |
getPlanningPercentForYear(Map<String,Object> paramMap) |
String |
getQuery(Class clazz,
Serializable id,
String queryString) |
BigDecimal |
getSanctionedPlanningBudget(Map<String,Object> paramMap) |
org.egov.infra.persistence.utils.ApplicationSequenceNumberGenerator |
getSequenceGenerator() |
void |
releaseEncumbranceBudget(Long financialyearid,
Integer moduleid,
String referencenumber,
Integer departmentid,
Long functionid,
Integer functionaryid,
Integer schemeid,
Integer subschemeid,
Integer boundaryid,
List<Long> budgetheadid,
Integer fundid,
double amount,
String appropriationnumber)
Deprecated.
|
boolean |
releaseEncumbranceBudget(Map<String,Object> detailsMap)
This API will be called for releasing the budget that was already allocated to some estimate or purchase order.
|
BudgetUsage |
releaseEncumbranceBudget(String appropriationnumber,
Long financialyearid,
Integer moduleid,
String referencenumber,
Integer departmentid,
Long functionid,
Integer functionaryid,
Integer schemeid,
Integer subschemeid,
Integer boundaryid,
List<Long> budgetheadid,
Integer fundid,
double amount)
This does the same as the above API except this returns the BudgetUsage object that is modified.
|
void |
setAppConfigValuesService(org.egov.infra.admin.master.service.AppConfigValueService appConfigValuesService) |
void |
setBudgetService(BudgetService budgetService) |
void |
setPersistenceService(org.egov.infstr.services.PersistenceService persistenceService) |
void |
setSequenceGenerator(org.egov.infra.persistence.utils.ApplicationSequenceNumberGenerator sequenceGenerator) |
BudgetDetail |
update(BudgetDetail entity) |
@Autowired protected org.egov.infra.script.service.ScriptService scriptService
@Autowired protected org.egov.infra.persistence.utils.ApplicationSequenceNumberGenerator sequenceGenerator
@Transactional public BudgetDetail update(BudgetDetail entity)
update in interface BudgetDetailsDAO@Transactional public BudgetDetail create(BudgetDetail entity)
create in interface BudgetDetailsDAO@Transactional public void delete(BudgetDetail entity)
delete in interface BudgetDetailsDAOpublic List<BudgetDetail> findAll()
findAll in interface BudgetDetailsDAOpublic org.hibernate.Session getCurrentSession()
public boolean consumeEncumbranceBudget(Map<String,Object> detailsMap)
Assumptions- 1) on load of the budget there will be budgetavailable amount loaded using the multiplier factor. 2) on load of supplementary budget budget available is recalculated and updated.
For the sake of audit we should be updating the budgetusage object with the reference object and the moduleid and amount for any budget consumed. This will be used for reporting as to which object consumed how much and when.
financialyearid - This is the id from the financial year objectmoduleid - This is the id of the module, say for payroll 7 and for stores 8 and for PTIS it is 2referencenumber - This is the module object reference number, say purchase order number or estimate numberdepartmentid - This is the id of the department objectfunctionid - This is the id of the function objectfunctionaryid - This is the id of the functionary objectschemeid - This is the id of the scheme objectsubschemeid - This is the id of the sub scheme objectboundaryid - This is the id of the boundary objectbudgetheadid - This is the id of budgegroup objectamount - This is the amount of which budget needs to be allocatedExceptionpublic boolean consumeEncumbranceBudget(Long financialyearid, Integer moduleid, String referencenumber, Integer departmentid, Long functionid, Integer functionaryid, Integer schemeid, Integer subschemeid, Integer boundaryid, List<Long> budgetheadid, Integer fundid, double amount, String appropriationnumber)
consumeEncumbranceBudget in interface BudgetDetailsDAO@Deprecated public BudgetUsage consumeEncumbranceBudget(String appropriationnumber, Long financialyearid, Integer moduleid, String referencenumber, Integer departmentid, Long functionid, Integer functionaryid, Integer schemeid, Integer subschemeid, Integer boundaryid, List<Long> budgetheadid, Integer fundid, double amount)
consumeEncumbranceBudget in interface BudgetDetailsDAOappropriationnumber - financialyearid - moduleid - referencenumber - departmentid - functionid - functionaryid - schemeid - subschemeid - boundaryid - budgetheadid - fundid - amount - public boolean releaseEncumbranceBudget(Map<String,Object> detailsMap)
On modify of any entity they should first call the release budget and then call the consume budget. The budget usage table needs to be updated anytime this is invoked with the date and reference object number.
detailsMap - is the map containig following fields financialyearid This is the id from the financial year object
moduleid This is the id of the module, say for payroll 7 and for stores 8 and for PTIS it is 2 referencenumber This is the
module object reference number, say purchase order number or estimate number departmentid This is the id of the department
object functionid This is the id of the function object functionaryid This is the id of the functionary object schemeid
This is the id of the scheme object subschemeid This is the id of the sub scheme object fieldid This is the id of the
boundary object budgetheadid This is the id of budgegroup object amount This is the amount of which budget needs to be
allocatedException@Deprecated public void releaseEncumbranceBudget(Long financialyearid, Integer moduleid, String referencenumber, Integer departmentid, Long functionid, Integer functionaryid, Integer schemeid, Integer subschemeid, Integer boundaryid, List<Long> budgetheadid, Integer fundid, double amount, String appropriationnumber)
releaseEncumbranceBudget in interface BudgetDetailsDAO@Transactional public BudgetUsage releaseEncumbranceBudget(String appropriationnumber, Long financialyearid, Integer moduleid, String referencenumber, Integer departmentid, Long functionid, Integer functionaryid, Integer schemeid, Integer subschemeid, Integer boundaryid, List<Long> budgetheadid, Integer fundid, double amount)
releaseEncumbranceBudget in interface BudgetDetailsDAOappropriationnumber - financialyearid - moduleid - referencenumber - departmentid - functionid - functionaryid - schemeid - subschemeid - boundaryid - budgetheadid - fundid - amount - public BigDecimal getPlanningBudgetAvailable(Long financialyearid, Integer departmentid, Long functionid, Integer functionaryid, Integer schemeid, Integer subschemeid, Integer boundaryid, List<Long> budgetheadid, Integer fundid)
getPlanningBudgetAvailable in interface BudgetDetailsDAOfinancialyearid - departmentid - functionid - functionaryid - schemeid - subschemeid - boundaryid - budgetheadid - public BigDecimal getActualBudgetUtilized(Map<String,Object> paramMap)
getActualBudgetUtilized in interface BudgetDetailsDAOfunctionid - (optional) -id for Function objectfunctionaryid - (optional) - id for functionary objectdepartmentid - (optional) - id for department objectschemeid - (optional) - id for scheme objectsubschemeid - (optional) - id for subscheme objectboundaryid - (optional) - id for boundary objectbudgetHead - (mandatory) - budget head object, which having the major code/ minor code/ detailcode/ range of
minor/detail codes (based on appconfig values)asOnDate - (mandatory)-public BigDecimal getActualBudgetUtilizedForBudgetaryCheck(Map<String,Object> paramMap)
getActualBudgetUtilizedForBudgetaryCheck in interface BudgetDetailsDAOfunctionid - (optional) -id for Function objectfunctionaryid - (optional) - id for functionary objectdepartmentid - (optional) - id for department objectschemeid - (optional) - id for scheme objectsubschemeid - (optional) - id for subscheme objectboundaryid - (optional) - id for boundary objectbudgetHead - (mandatory) - budget head object, which having the major code/ minor code/ detailcode/ range of
minor/detail codes (based on appconfig values)asOnDate - (mandatory)-public BigDecimal getPlanningBudgetUsage(BudgetDetail bd)
getPlanningBudgetUsage in interface BudgetDetailsDAOpublic BigDecimal getBudgetedAmtForYear(Map<String,Object> paramMap)
getBudgetedAmtForYear in interface BudgetDetailsDAOparamMap - public BigDecimal getBudgetedAmtForYearAsOnDate(Map<String,Object> paramMap, Date asOnDate)
getBudgetedAmtForYearAsOnDate in interface BudgetDetailsDAOparamMap - public BigDecimal getPlanningPercentForYear(Map<String,Object> paramMap)
getPlanningPercentForYear in interface BudgetDetailsDAOpublic Map<String,BigDecimal> getAggregateBudgetedAmtForYear(Map<String,Object> paramMap)
getAggregateBudgetedAmtForYear in interface BudgetDetailsDAOparamMap - public boolean budgetaryCheck(Map<String,Object> paramMap)
budgetaryCheck in interface BudgetDetailsDAOparamMap - paramMap contains 1. debitAmt (mandatory) 2. creditAmt (mandatory) 3. deptid (optional) 4. functionid
(optional) 5. functionaryid (optional) 6. schemeid (optional) 7. subschemeid (optional) 8. boundaryid (optional) 9. glcode
(mandatory) - based on the glcode, we can get the budgetheadid 10. asondate (manadtory) - to get the actuals, we need
asondate 11. mis.budgetcheckreq-Boolean- (optional) to skip budget check if set to false.Default is true Budget checking
will be enabled or disabled by these levels and in the order a. Application - uses set up "Budget Control Type" b.
Voucherlevel - uses budgetcheckreq column of vouchermis table for perticular voucher c. Debit or Credit level - uses
Budgetgroup.budgetting type for debit side only ,credit side or both d. Glcode level - Uses chartofaccounts.budgetcheckreq
fieled to decide budget checking .public String getBudgetApprNumber(Map<String,Object> paramMap)
paramMap - public List<BudgetGroup> getBudgetHeadByGlcode(org.egov.commons.CChartOfAccounts coa)
getBudgetHeadByGlcode in interface BudgetDetailsDAOcoa - paramMap - public List<BudgetGroup> getBudgetHeadForGlcodeList(List<org.egov.commons.CChartOfAccounts> coa)
getBudgetHeadForGlcodeList in interface BudgetDetailsDAOcoa - paramMap - public String getQuery(Class clazz, Serializable id, String queryString)
public boolean budgetaryCheckForBill(Map<String,Object> paramMap)
budgetaryCheckForBill in interface BudgetDetailsDAOparamMap - paramMap contains 1. debitAmt (mandatory) 2. creditAmt (mandatory) 3. deptid (optional) 4. functionid
(optional) 5. functionaryid (optional) 6. schemeid (optional) 7. subschemeid (optional) 8. boundaryid (optional) 9. glcode
(mandatory) - based on the glcode, we can get the budgetheadid 10. asondate (manadtory) - to get the actuals, we need
asondate 11.mis.budgetcheckreq-Boolean-(optional) set to false if budget check not to be done for this bill default is
True.public BigDecimal getBillAmountForBudgetCheck(Map<String,Object> paramMap)
getBillAmountForBudgetCheck in interface BudgetDetailsDAOpublic BigDecimal getBudgetedAmtForYearRegardingBEorRE(Map<String,Object> paramMap, String typeBeRe)
getBudgetedAmtForYearRegardingBEorRE in interface BudgetDetailsDAOparamMap - public BigDecimal getSanctionedPlanningBudget(Map<String,Object> paramMap)
getSanctionedPlanningBudget in interface BudgetDetailsDAOparameter - Map contains deptid,functionid, functionaryid,schemeid,
subschemeid,boundaryid,budgetheadid,financialyearid,fundid it'll get the budgeted amount based on the parameters.public List<BudgetUsage> getListBudgetUsage(Map<String,Object> queryParamMap)
getListBudgetUsage in interface BudgetDetailsDAOqueryParamMap - - HashMappublic BigDecimal getPlannigBudgetBy(Integer fundId, Integer deptId, Date asOnDate1)
getPlannigBudgetBy in interface BudgetDetailsDAOfundId - deptId - asOnDate - public List<org.egov.commons.CFunction> getFunctionsByFundAndDepartment(Integer fund, Long department)
getFunctionsByFundAndDepartment in interface BudgetDetailsDAOfund,function,department - and account typepublic List<BudgetDetail> getBudgetDetailsByBudgetGroupId(Long budgetGroupId)
public List<BudgetDetail> getBudgetDetailsByBudgetId(Long budgetId)
public org.egov.infra.persistence.utils.ApplicationSequenceNumberGenerator getSequenceGenerator()
public void setSequenceGenerator(org.egov.infra.persistence.utils.ApplicationSequenceNumberGenerator sequenceGenerator)
public org.egov.infstr.services.PersistenceService getPersistenceService()
public void setPersistenceService(org.egov.infstr.services.PersistenceService persistenceService)
public void setBudgetService(BudgetService budgetService)
public org.egov.infra.admin.master.service.AppConfigValueService getAppConfigValuesService()
public void setAppConfigValuesService(org.egov.infra.admin.master.service.AppConfigValueService appConfigValuesService)
public BudgetDetail findById(Number id, boolean lock)
findById in interface BudgetDetailsDAOCopyright © 2015–2017 eGovernments Foundation. All rights reserved.