Skip to content

Commit

Permalink
Merge pull request apache#17 from awaleram/phase+23/12/2014
Browse files Browse the repository at this point in the history
phaPhase+23/12/2014
  • Loading branch information
shahrahul1985 committed Dec 23, 2015
2 parents fe20c11 + 62e9e64 commit a5110a5
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ public List<Long> insertInvestmentStatus(List<InvestmentBatchJobData> data, Stri
Date investmentDistributionDate = new Date();
InvestmentBatchJobData earningStatus = this.investmentBatchJobReadPlatformService.getInvestmentStatus(loanId);

if(earningStatus==null){
if(earningStatus == null || earningStatus.getEarningStatus().isEmpty()){

String insertSql = " INSERT INTO `ct_investment_status` (`loan_id`, `earning_status`, `status_date`) VALUES ";

Expand All @@ -1470,6 +1470,8 @@ public List<Long> insertInvestmentStatus(List<InvestmentBatchJobData> data, Stri
investmentId.add(loanId);
}else if(loanMaturityDate.after(investmentDistributionDate)){
sb.append("Not Matured");
}else if(loanStatusId == 300 && loanMaturityDate.before(investmentDistributionDate)){
sb.append("Due For Realization");
}
sb.append("'");
sb.append(",");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
CREATE TABLE `m_investment` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,

DROP TABLE IF EXISTS m_investment;

CREATE TABLE `m_investment` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`saving_id` BIGINT(20) NOT NULL,
`loan_id` BIGINT(20) NOT NULL,
`start_date` DATE NULL DEFAULT NULL,
`close_date` DATE NULL DEFAULT NULL,
`invested_amount` DECIMAL(10,0) NULL DEFAULT NULL,
PRIMARY KEY (`id`, `saving_id`, `loan_id`),
PRIMARY KEY (`id`,`saving_id`, `loan_id`),
INDEX `FK__m_savings_account` (`saving_id`),
INDEX `FK__m_loan` (`loan_id`),
CONSTRAINT `FK__m_loan` FOREIGN KEY (`loan_id`) REFERENCES `m_loan` (`id`),
Expand All @@ -16,32 +19,6 @@ ENGINE=InnoDB
;


INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'CREATE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'UPDATE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'DELETE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_LOANINVESTMENT', 'LOANINVESTMENT', 'DELETE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_LOANINVESTMENT', 'LOANINVESTMENT', 'UPDATE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_LOANINVESTMENT', 'LOANINVESTMENT', 'CREATE', 0);


INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CLOSE_LOANINVESTMENT', 'LOANINVESTMENT', 'CLOSE', 0);



INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CLOSE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'CLOSE', 0);


INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'UPDATE', 0);

INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_LOANINVESTMENT', 'LOANINVESTMENT', 'UPDATE', 0);

INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('report', 'RUNBATCHJOB_INVESTMENT', 'INVESTMENT', 'RUNBATCHJOB', 0);




Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
CREATE TABLE `officedetails` (
`office_id` BIGINT(20) NOT NULL,
`sms_enabled` BIT(1) NOT NULL,
PRIMARY KEY (`office_id`),
CONSTRAINT `fk_officedetails_office_id` FOREIGN KEY (`office_id`) REFERENCES `m_office` (`id`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB;

INSERT INTO `x_registered_table` (`registered_table_name`, `application_table_name`, `category`) VALUES ('OfficeDetails', 'm_office', 100);

INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'CREATE_OfficeDetails', 'OfficeDetails', 'CREATE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'CREATE_OfficeDetails_CHECKER', 'OfficeDetails', 'CREATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'READ_OfficeDetails', 'OfficeDetails', 'READ', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'UPDATE_OfficeDetails', 'OfficeDetails', 'UPDATE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'UPDATE_OfficeDetails_CHECKER', 'OfficeDetails', 'UPDATE', 0);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'DELETE_OfficeDetails', 'OfficeDetails', 'DELETE', 1);
INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('datatable', 'DELETE_OfficeDetails_CHECKER', 'OfficeDetails', 'DELETE', 0);
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
INSERT INTO `job` (`name`, `display_name`, `cron_expression`, `create_time`, `task_priority`, `group_name`, `previous_run_start_time`, `next_run_time`, `job_key`, `initializing_errorlog`, `is_active`, `currently_running`, `updates_allowed`, `scheduler_group`, `is_misfired`) VALUES ('Distribute Investment Earning', 'Distribute Investment Earning', '0 0 12 1/1 * ? *', '2015-08-17 19:01:31', 5, NULL, NULL, '2015-12-23 12:00:00', 'Distribute Investment EarningJobDetail1 _ DEFAULT', NULL, 1, 0, 1, 0, 0);





INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'CREATE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'DELETE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'DELETE_LOANINVESTMENT', 'LOANINVESTMENT', 'DELETE', 0);

INSERT INTO m_permission (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CREATE_LOANINVESTMENT', 'LOANINVESTMENT', 'CREATE', 0);


INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CLOSE_LOANINVESTMENT', 'LOANINVESTMENT', 'CLOSE', 0);



INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'CLOSE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'CLOSE', 0);


INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_SAVINGINVESTMENT', 'SAVINGINVESTMENT', 'UPDATE', 0);

INSERT INTO `m_permission` (`grouping`, `code`, `entity_name`, `action_name`, `can_maker_checker`) VALUES ('portfolio', 'UPDATE_LOANINVESTMENT', 'LOANINVESTMENT', 'UPDATE', 0);
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CREATE TABLE `m_ext_txn` (
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=6;


CREATE TABLE `m_ext_unmapped_txn` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
Expand All @@ -33,4 +33,3 @@ CREATE TABLE `m_ext_unmapped_txn` (
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2;

0 comments on commit a5110a5

Please sign in to comment.