Commit 18fadc8b authored by thanawat's avatar thanawat
Browse files

Monthly-Bonus-RoundDown

Showing with 14 additions and 19 deletions
+14 -19
......@@ -311,12 +311,12 @@ public class MonthlyBonusService {
+ concatSingleQuote(agent.getBenefitCode().toString()) + ","
+ agent.getPersistencyRate() + ","
+ agent.getPercistencyController() + ","
+ roundingDownScale(agent.getFycAmount()) + ","
+ roundingDownScale(agent.getFycProduction()) + ","
+ jbpmService.roundingDecimalScale(agent.getFycAmount()) + ","
+ jbpmService.roundingDecimalScale(agent.getFycProduction()) + ","
+ agent.getBonusRate() + ","
+ roundingDownScale(agent.getBonus()) + ","
+ roundingDownScale(agent.getIncomeTax()) + ","
+ roundingDownScale(agent.getDeductTax()) + ","
+ jbpmService.roundingDecimalScale(agent.getBonus()) + ","
+ jbpmService.roundingDecimalScale(agent.getIncomeTax()) + ","
+ jbpmService.roundingDecimalScale(agent.getDeductTax()) + ","
+ concatSingleQuote(agent.getCalculationDate()) + ","
+ concatSingleQuote(agent.getDescription())
......@@ -333,12 +333,12 @@ public class MonthlyBonusService {
+ agent.getBenefitCode() + ","
+ agent.getPersistencyRate() + ","
+ agent.getPercistencyController() + ","
+ roundingDownScale(agent.getFycAmount()) + ","
+ roundingDownScale(agent.getFycProduction()) + ","
+ jbpmService.roundingDecimalScale(agent.getFycAmount()) + ","
+ jbpmService.roundingDecimalScale(agent.getFycProduction()) + ","
+ agent.getBonusRate() + ","
+ roundingDownScale(agent.getBonus()) + ","
+ roundingDownScale(agent.getIncomeTax()) + ","
+ roundingDownScale(agent.getDeductTax()) + ","
+ jbpmService.roundingDecimalScale(agent.getBonus()) + ","
+ jbpmService.roundingDecimalScale(agent.getIncomeTax()) + ","
+ jbpmService.roundingDecimalScale(agent.getDeductTax()) + ","
+ agent.getCalculationDate() + ","
+ concatSingleQuote(agent.getDescription())
+ "),";
......@@ -409,8 +409,8 @@ public class MonthlyBonusService {
+ concatSingleQuote(detail.getTransactionType()) + ","
+ concatSingleQuote(detail.getAgentCode().toString()) + ","
+ concatSingleQuote(detail.getDetailPolicyNo()) + ","
+ roundingDownScale(detail.getDetailFycAmount()) + ","
+ roundingDownScale(detail.getDetailFycProduction()) + ","
+ jbpmService.roundingDecimalScale(detail.getDetailFycAmount()) + ","
+ jbpmService.roundingDecimalScale(detail.getDetailFycProduction()) + ","
+ concatSingleQuote(benefitId)
+ "),";
......@@ -427,8 +427,8 @@ public class MonthlyBonusService {
+ concatSingleQuote(detail.getTransactionType()) + ","
+ concatSingleQuote(detail.getAgentCode().toString()) + ","
+ concatSingleQuote(detail.getDetailPolicyNo()) + ","
+ roundingDownScale(detail.getDetailFycAmount()) + ","
+ roundingDownScale(detail.getDetailFycProduction()) + ","
+ jbpmService.roundingDecimalScale(detail.getDetailFycAmount()) + ","
+ jbpmService.roundingDecimalScale(detail.getDetailFycProduction()) + ","
+ concatSingleQuote(benefitId)
+ "),";
}
......@@ -482,11 +482,6 @@ public class MonthlyBonusService {
}
public Double roundingDownScale(Double number) {
BigDecimal bigDecimal = number != null ? new BigDecimal(Double.toString(number)) : new BigDecimal(Double.toString(0));
BigDecimal roundedBigDecimal = bigDecimal.setScale(2, RoundingMode.DOWN);
return roundedBigDecimal.doubleValue();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment