Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
rbl-cms
cms-backend
Commits
4833ab19
Commit
4833ab19
authored
11 months ago
by
bunchaP
Browse files
Options
Download
Plain Diff
Merge branch 'dev' into feature/excel
parents
a155cadc
23b5d6b2
main
Add-Field-Account
CareerAgentBenefit
Monthly-Bonus
Quarterly-Bonus
Yearly-Bonus
dev
feature/active-agent
feature/convert-object
feature/director-recuiting
feature/download-50tawi
feature/excel
feature/individual-tax
feature/merge-service
feature/prod_fix_refresh_expired
feature/reload-jbpm
feature/report
feature/upload-data
individual-tax
uat
PROD_20240801_V1
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
src/main/java/com/b3/rbl/compensation/db/entity/AgBenefit.java
+13
-12
...ain/java/com/b3/rbl/compensation/db/entity/AgBenefit.java
src/main/java/com/b3/rbl/compensation/db/entity/AgCustomer.java
+8
-8
...in/java/com/b3/rbl/compensation/db/entity/AgCustomer.java
src/main/java/com/b3/rbl/compensation/db/entity/AgFinancialTransaction.java
+9
-9
...b3/rbl/compensation/db/entity/AgFinancialTransaction.java
src/main/java/com/b3/rbl/compensation/model/salesforce/AgBenefitDto.java
+1
-1
...om/b3/rbl/compensation/model/salesforce/AgBenefitDto.java
src/main/java/com/b3/rbl/compensation/model/salesforce/AgFinancialTransactionDto.java
+2
-2
...pensation/model/salesforce/AgFinancialTransactionDto.java
src/main/java/com/b3/rbl/compensation/rest/DataInRestApi.java
+20
-20
...main/java/com/b3/rbl/compensation/rest/DataInRestApi.java
src/main/java/com/b3/rbl/compensation/service/DatainService.java
+62
-15
...n/java/com/b3/rbl/compensation/service/DatainService.java
with
115 additions
and
67 deletions
+115
-67
src/main/java/com/b3/rbl/compensation/db/entity/AgBenefit.java
View file @
4833ab19
...
...
@@ -16,7 +16,7 @@ import javax.persistence.*;
*/
@Entity
@Table
(
name
=
"ag_benefit"
,
catalog
=
""
,
schema
=
""
,
uniqueConstraints
=
{
@UniqueConstraint
(
columnNames
=
{
"recordid"
})
})
@UniqueConstraint
(
columnNames
=
{
"record
_
id"
})
})
public
class
AgBenefit
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -58,9 +58,9 @@ public class AgBenefit implements Serializable {
private
Date
createddate
;
@Column
(
name
=
"fyp"
)
private
BigDecimal
fyp
;
@Basic
(
optional
=
false
)
@Column
(
name
=
"recordid"
)
private
String
recordid
;
//
@Basic(optional = false)
//
@Column(name = "recordid")
//
private String recordid;
@Basic
(
optional
=
false
)
@Column
(
name
=
"isdeleted"
)
private
boolean
isdeleted
;
...
...
@@ -116,12 +116,13 @@ public class AgBenefit implements Serializable {
}
public
AgBenefit
(
String
id
,
boolean
agentProducingVisibility
,
boolean
agentServicingVisibility
,
Date
createddate
,
String
recordid
,
boolean
isdeleted
,
Date
lastmodifieddate
,
String
name
,
Date
systemmodstamp
)
{
// String recordid,
boolean
isdeleted
,
Date
lastmodifieddate
,
String
name
,
Date
systemmodstamp
)
{
this
.
id
=
id
;
this
.
agentProducingVisibility
=
agentProducingVisibility
;
this
.
agentServicingVisibility
=
agentServicingVisibility
;
this
.
createddate
=
createddate
;
this
.
recordid
=
recordid
;
//
this.recordid = recordid;
this
.
isdeleted
=
isdeleted
;
this
.
lastmodifieddate
=
lastmodifieddate
;
this
.
name
=
name
;
...
...
@@ -248,13 +249,13 @@ public class AgBenefit implements Serializable {
this
.
fyp
=
fyp
;
}
public
String
getRecordid
()
{
return
recordid
;
}
//
public String getRecordid() {
//
return recordid;
//
}
public
void
setRecordid
(
String
recordid
)
{
this
.
recordid
=
recordid
;
}
//
public void setRecordid(String recordid) {
//
this.recordid = recordid;
//
}
public
boolean
getIsdeleted
()
{
return
isdeleted
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/b3/rbl/compensation/db/entity/AgCustomer.java
View file @
4833ab19
...
...
@@ -122,8 +122,8 @@ public class AgCustomer implements Serializable {
@Column
(
name
=
"systemmodstamp"
,
nullable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Date
systemmodstamp
;
@Column
(
name
=
"customer_address__c"
,
length
=
512
)
private
String
customerAddressC
;
//
@Column(name = "customer_address__c", length = 512)
//
private String customerAddressC;
public
AgCustomer
()
{
}
...
...
@@ -429,13 +429,13 @@ public class AgCustomer implements Serializable {
this
.
systemmodstamp
=
systemmodstamp
;
}
public
String
getCustomerAddressC
()
{
return
customerAddressC
;
}
//
public String getCustomerAddressC() {
//
return customerAddressC;
//
}
public
void
setCustomerAddressC
(
String
customerAddressC
)
{
this
.
customerAddressC
=
customerAddressC
;
}
//
public void setCustomerAddressC(String customerAddressC) {
//
this.customerAddressC = customerAddressC;
//
}
@Override
public
int
hashCode
()
{
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/b3/rbl/compensation/db/entity/AgFinancialTransaction.java
View file @
4833ab19
...
...
@@ -88,9 +88,9 @@ public class AgFinancialTransaction implements Serializable {
@Column
(
name
=
"lastmodifiedbyid"
,
nullable
=
false
,
length
=
18
)
private
String
lastmodifiedbyid
;
// @Basic(optional = false)
//
@Column(name = "lastmodifieddate", nullable = false)
//
@Temporal(TemporalType.TIMESTAMP)
//
private Date lastmodifieddate;
@Column
(
name
=
"lastmodifieddate"
,
nullable
=
false
)
@Temporal
(
TemporalType
.
TIMESTAMP
)
private
Date
lastmodifieddate
;
// @Column(name = "lastreferenceddate")
// @Temporal(TemporalType.TIMESTAMP)
// private Date lastreferenceddate;
...
...
@@ -356,13 +356,13 @@ public class AgFinancialTransaction implements Serializable {
this
.
lastmodifiedbyid
=
lastmodifiedbyid
;
}
//
public Date getLastmodifieddate() {
//
return lastmodifieddate;
//
}
public
Date
getLastmodifieddate
()
{
return
lastmodifieddate
;
}
//
public void setLastmodifieddate(Date lastmodifieddate) {
//
this.lastmodifieddate = lastmodifieddate;
//
}
public
void
setLastmodifieddate
(
Date
lastmodifieddate
)
{
this
.
lastmodifieddate
=
lastmodifieddate
;
}
// public Date getLastreferenceddate() {
// return lastreferenceddate;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/b3/rbl/compensation/model/salesforce/AgBenefitDto.java
View file @
4833ab19
...
...
@@ -58,7 +58,7 @@ public class AgBenefitDto {
private
BigDecimal
fyp
;
@JsonProperty
(
"Record_Id__c"
)
private
String
record
i
d
;
private
String
record
I
d
;
@JsonProperty
(
"IsDeleted"
)
private
boolean
isdeleted
;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/b3/rbl/compensation/model/salesforce/AgFinancialTransactionDto.java
View file @
4833ab19
...
...
@@ -68,8 +68,8 @@ public class AgFinancialTransactionDto {
@JsonProperty
(
"LastModifiedById"
)
private
String
lastmodifiedbyid
;
//
@JsonProperty("LastModifiedDate")
//
private Date lastmodifieddate;
@JsonProperty
(
"LastModifiedDate"
)
private
Date
lastmodifieddate
;
// @JsonProperty("LastReferencedDate")
// private Date lastreferenceddate;
...
...
This diff is collapsed.
Click to expand it.
src/main/java/com/b3/rbl/compensation/rest/DataInRestApi.java
View file @
4833ab19
...
...
@@ -47,9 +47,9 @@ public class DataInRestApi {
}
@PostMapping
(
"upsert-account"
)
public
ResponseEntity
<
Object
>
upsertAccount
(
@RequestBody
List
<
SfdcObject
<
AccountDto
>>
datain
)
{
public
ResponseEntity
<
DatainService
.
WebserviceRespone
>
upsertAccount
(
@RequestBody
List
<
SfdcObject
<
AccountDto
>>
datain
)
{
log
.
info
(
datain
);
DatainService
.
WebserviceRespone
res
=
null
;
List
<
Account
>
accountList
=
new
ArrayList
<>();
try
{
int
i
=
0
;
...
...
@@ -60,17 +60,17 @@ public class DataInRestApi {
log
.
info
(
acc
);
accountList
.
add
(
acc
);
}
datainService
.
upsertAccount
(
accountList
);
res
=
datainService
.
upsertAccount
(
accountList
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
}
return
ResponseEntity
.
ok
().
b
uild
(
);
return
ResponseEntity
.
ok
().
b
ody
(
res
);
}
@PostMapping
(
"upsert-customer"
)
public
ResponseEntity
<
Object
>
upsertCustomer
(
@RequestBody
List
<
SfdcObject
<
AgCustomerDto
>>
datain
)
{
public
ResponseEntity
<
DatainService
.
WebserviceRespone
>
upsertCustomer
(
@RequestBody
List
<
SfdcObject
<
AgCustomerDto
>>
datain
)
{
log
.
info
(
datain
);
DatainService
.
WebserviceRespone
res
=
null
;
List
<
AgCustomer
>
customerList
=
new
ArrayList
<>();
try
{
int
i
=
0
;
...
...
@@ -81,16 +81,16 @@ public class DataInRestApi {
log
.
info
(
customer
);
customerList
.
add
(
customer
);
}
datainService
.
upsertCustomer
(
customerList
);
res
=
datainService
.
upsertCustomer
(
customerList
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
}
return
ResponseEntity
.
ok
().
b
uild
(
);
return
ResponseEntity
.
ok
().
b
ody
(
res
);
}
@PostMapping
(
"upsert-financial"
)
public
ResponseEntity
<
Object
>
upsertFinancial
(
@RequestBody
List
<
SfdcObject
<
AgFinancialTransactionDto
>>
datain
)
{
public
ResponseEntity
<
DatainService
.
WebserviceRespone
>
upsertFinancial
(
@RequestBody
List
<
SfdcObject
<
AgFinancialTransactionDto
>>
datain
)
{
log
.
info
(
datain
);
DatainService
.
WebserviceRespone
res
=
null
;
List
<
AgFinancialTransaction
>
financialList
=
new
ArrayList
<>();
try
{
int
i
=
0
;
...
...
@@ -102,16 +102,16 @@ public class DataInRestApi {
log
.
info
(
finance
);
financialList
.
add
(
finance
);
}
datainService
.
upsertFinancial
(
financialList
);
res
=
datainService
.
upsertFinancial
(
financialList
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
}
return
ResponseEntity
.
ok
().
b
uild
(
);
return
ResponseEntity
.
ok
().
b
ody
(
res
);
}
@PostMapping
(
"upsert-policy"
)
public
ResponseEntity
<
Object
>
upsertPolicy
(
@RequestBody
List
<
SfdcObject
<
AgPolicyMasterDto
>>
datain
)
{
public
ResponseEntity
<
DatainService
.
WebserviceRespone
>
upsertPolicy
(
@RequestBody
List
<
SfdcObject
<
AgPolicyMasterDto
>>
datain
)
{
log
.
info
(
datain
);
DatainService
.
WebserviceRespone
res
=
null
;
List
<
AgPolicyMaster
>
policyList
=
new
ArrayList
<>();
try
{
int
i
=
0
;
...
...
@@ -122,16 +122,16 @@ public class DataInRestApi {
log
.
info
(
policy
);
policyList
.
add
(
policy
);
}
datainService
.
upsertPolicy
(
policyList
);
res
=
datainService
.
upsertPolicy
(
policyList
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
}
return
ResponseEntity
.
ok
().
b
uild
(
);
return
ResponseEntity
.
ok
().
b
ody
(
res
);
}
@PostMapping
(
"upsert-benefit"
)
public
ResponseEntity
<
Object
>
upsertBenefit
(
@RequestBody
List
<
SfdcObject
<
AgBenefitDto
>>
datain
)
{
public
ResponseEntity
<
DatainService
.
WebserviceRespone
>
upsertBenefit
(
@RequestBody
List
<
SfdcObject
<
AgBenefitDto
>>
datain
)
{
log
.
info
(
datain
);
DatainService
.
WebserviceRespone
res
=
null
;
List
<
AgBenefit
>
benefitList
=
new
ArrayList
<>();
try
{
int
i
=
0
;
...
...
@@ -142,11 +142,11 @@ public class DataInRestApi {
log
.
info
(
benefit
);
benefitList
.
add
(
benefit
);
}
datainService
.
upsertBenefit
(
benefitList
);
res
=
datainService
.
upsertBenefit
(
benefitList
);
}
catch
(
Exception
ex
)
{
log
.
error
(
ex
);
}
return
ResponseEntity
.
ok
().
b
uild
(
);
return
ResponseEntity
.
ok
().
b
ody
(
res
);
}
}
This diff is collapsed.
Click to expand it.
src/main/java/com/b3/rbl/compensation/service/DatainService.java
View file @
4833ab19
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
javax.transaction.Transactional
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.stereotype.Service
;
import
com.b3.rbl.compensation.db.entity.Account
;
...
...
@@ -31,52 +32,98 @@ public class DatainService {
private
AgPolicyMasterRepository
policyMasterRepository
;
@Transactional
public
void
upsertAccount
(
List
<
Account
>
accountList
)
{
public
DatainService
.
WebserviceRespone
upsertAccount
(
List
<
Account
>
accountList
)
{
Iterable
<
Account
>
res
;
DatainService
.
WebserviceRespone
respone
=
new
DatainService
.
WebserviceRespone
();
try
{
accountRepository
.
saveAll
(
accountList
);
res
=
accountRepository
.
saveAll
(
accountList
);
log
.
info
(
res
);
respone
.
message
=
"Process Success"
;
respone
.
status
=
"Success"
;
respone
.
data
=
res
.
toString
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
respone
.
message
=
"Process Fail"
;
respone
.
status
=
"Fail"
;
}
return
respone
;
}
@Transactional
public
void
upsertBenefit
(
List
<
AgBenefit
>
benfitList
)
{
public
DatainService
.
WebserviceRespone
upsertBenefit
(
List
<
AgBenefit
>
benfitList
)
{
Iterable
<
AgBenefit
>
res
;
DatainService
.
WebserviceRespone
respone
=
new
DatainService
.
WebserviceRespone
();
try
{
benefitRepository
.
saveAll
(
benfitList
);
res
=
benefitRepository
.
saveAll
(
benfitList
);
log
.
info
(
res
);
respone
.
message
=
"Process Success"
;
respone
.
status
=
"Success"
;
respone
.
data
=
res
.
toString
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
respone
.
message
=
"Process Fail"
;
respone
.
status
=
"Fail"
;
}
return
respone
;
}
@Transactional
public
void
upsertCustomer
(
List
<
AgCustomer
>
customers
)
{
public
DatainService
.
WebserviceRespone
upsertCustomer
(
List
<
AgCustomer
>
customers
)
{
Iterable
<
AgCustomer
>
res
;
DatainService
.
WebserviceRespone
respone
=
new
DatainService
.
WebserviceRespone
();
try
{
customerRepository
.
saveAll
(
customers
);
res
=
customerRepository
.
saveAll
(
customers
);
log
.
info
(
res
);
respone
.
message
=
"Process Success"
;
respone
.
status
=
"Success"
;
respone
.
data
=
res
.
toString
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
respone
.
message
=
"Process Fail"
;
respone
.
status
=
"Fail"
;
}
return
respone
;
}
@Transactional
public
void
upsertFinancial
(
List
<
AgFinancialTransaction
>
financialTransactions
)
{
public
DatainService
.
WebserviceRespone
upsertFinancial
(
List
<
AgFinancialTransaction
>
financialTransactions
)
{
Iterable
<
AgFinancialTransaction
>
res
;
DatainService
.
WebserviceRespone
respone
=
new
DatainService
.
WebserviceRespone
();
try
{
financialTransactionRepository
.
saveAll
(
financialTransactions
);
res
=
financialTransactionRepository
.
saveAll
(
financialTransactions
);
log
.
info
(
res
);
respone
.
message
=
"Process Success"
;
respone
.
status
=
"Success"
;
respone
.
data
=
res
.
toString
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
respone
.
message
=
"Process Fail"
;
respone
.
status
=
"Fail"
;
}
return
respone
;
}
@Transactional
public
void
upsertPolicy
(
List
<
AgPolicyMaster
>
policyMasters
)
{
public
DatainService
.
WebserviceRespone
upsertPolicy
(
List
<
AgPolicyMaster
>
policyMasters
)
{
Iterable
<
AgPolicyMaster
>
res
;
DatainService
.
WebserviceRespone
respone
=
new
DatainService
.
WebserviceRespone
();
try
{
policyMasterRepository
.
saveAll
(
policyMasters
);
res
=
policyMasterRepository
.
saveAll
(
policyMasters
);
log
.
info
(
res
);
respone
.
message
=
"Process Success"
;
respone
.
status
=
"Success"
;
respone
.
data
=
res
.
toString
();
}
catch
(
Exception
e
)
{
log
.
error
(
e
);
respone
.
message
=
"Process Fail"
;
respone
.
status
=
"Fail"
;
// respone.data = res.toString();
}
return
respone
;
}
public
class
WebserviceRespone
{
public
String
status
;
public
String
message
;
public
String
data
;
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help