|
@@ -29,7 +29,7 @@ import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
-import java.time.Year;
|
|
|
+
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.CompletableFuture;
|
|
|
|
|
@@ -94,16 +94,16 @@ public class IndexServiceImpl implements IndexService {
|
|
|
|
|
|
/*合同额一层*/
|
|
|
@Override
|
|
|
- public IncomeDataInfoVo getTotalIncome(HttpServletRequest request) {
|
|
|
+ public IndexTotalVo getTotalIncome(HttpServletRequest request) {
|
|
|
//首页收入渲染对象
|
|
|
BigDecimal initValue = BigDecimal.valueOf(0);
|
|
|
- IncomeDataInfoVo incomeDataInfoVO = new IncomeDataInfoVo();
|
|
|
- incomeDataInfoVO.setIncomeYearTotal(initValue);
|
|
|
- incomeDataInfoVO.setIncomeYearTq(initValue);
|
|
|
- incomeDataInfoVO.setIncomeYearTb(initValue);
|
|
|
- incomeDataInfoVO.setIncomeMonthTotal(initValue);
|
|
|
- incomeDataInfoVO.setIncomeMonthHb(initValue);
|
|
|
- incomeDataInfoVO.setIncomeMonthTb(initValue);
|
|
|
+ IndexTotalVo incomeDataInfoVO = new IndexTotalVo();
|
|
|
+ incomeDataInfoVO.setYearTotal(initValue);
|
|
|
+ incomeDataInfoVO.setYearTq(initValue);
|
|
|
+ incomeDataInfoVO.setYearTb(initValue);
|
|
|
+ incomeDataInfoVO.setMonthTotal(initValue);
|
|
|
+ incomeDataInfoVO.setMonthHb(initValue);
|
|
|
+ incomeDataInfoVO.setMonthTb(initValue);
|
|
|
|
|
|
String userNameByToken = JwtUtil.getUserNameByToken(request);
|
|
|
LoginUser sysUser = sysBaseApi.getUserByName(userNameByToken);
|
|
@@ -116,7 +116,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
stringBuilder.append(departName).append("|");
|
|
|
}
|
|
|
String depart = stringBuilder.toString();
|
|
|
- IncomeDataInfoVo cacheObject = (IncomeDataInfoVo) redisUtil.get(INCOME_DATA_REDIS_KEY + depart);
|
|
|
+ IndexTotalVo cacheObject = (IndexTotalVo) redisUtil.get(INCOME_DATA_REDIS_KEY + depart);
|
|
|
if (ObjectUtils.isNotEmpty(cacheObject)) {
|
|
|
incomeDataInfoVO = cacheObject;
|
|
|
return incomeDataInfoVO;
|
|
@@ -137,12 +137,12 @@ public class IndexServiceImpl implements IndexService {
|
|
|
Date currentYearBeginDate = instance.getTime();
|
|
|
|
|
|
List<BigDecimal> currentYearIncomeList = new ArrayList<>();
|
|
|
- IncomeDataInfoVo finalIncomeDataInfoVo = incomeDataInfoVO;
|
|
|
+ IndexTotalVo finalIncomeDataInfoVo = incomeDataInfoVO;
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
//根据年份和当前部门对应的任务号查询,部门当前年的年收入
|
|
|
BigDecimal currentYearTotal = exchangeMapper.getIncomeYearTotalByTasknoListAndByQsrqRange(tasknoList, currentYearBeginDate, currentYearEndDate);
|
|
|
if (ObjectUtils.isEmpty(currentYearTotal)) currentYearTotal = BigDecimal.valueOf(0);
|
|
|
- finalIncomeDataInfoVo.setIncomeYearTotal(currentYearTotal);
|
|
|
+ finalIncomeDataInfoVo.setYearTotal(currentYearTotal);
|
|
|
currentYearIncomeList.add(currentYearTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -158,7 +158,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
BigDecimal lastYearTqTotal = exchangeMapper.getIncomeYearTotalByTasknoListAndByQsrqRange(tasknoList, LastYearBeginDate, LastTqEndDate);
|
|
|
if (ObjectUtils.isEmpty(lastYearTqTotal)) lastYearTqTotal = BigDecimal.valueOf(0);
|
|
|
- finalIncomeDataInfoVo.setIncomeYearTq(lastYearTqTotal);
|
|
|
+ finalIncomeDataInfoVo.setYearTq(lastYearTqTotal);
|
|
|
lastYearTqIncomeList.add(lastYearTqTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -173,7 +173,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
BigDecimal currentMonthTotal = exchangeMapper.getIncomeYearTotalByTasknoListAndByQsrqRange(tasknoList, currentMothBginDate, currentMothEndDate);
|
|
|
if (ObjectUtils.isEmpty(currentMonthTotal)) currentMonthTotal = BigDecimal.valueOf(0);
|
|
|
- finalIncomeDataInfoVo.setIncomeMonthTotal(currentMonthTotal);
|
|
|
+ finalIncomeDataInfoVo.setMonthTotal(currentMonthTotal);
|
|
|
currentMonthTotalList.add(currentMonthTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -214,7 +214,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal incomeYearTb = BigDecimal.valueOf(1);
|
|
|
if (lastYearTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
incomeYearTb = YearDifference.divide(lastYearTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalIncomeDataInfoVo.setIncomeYearTb(incomeYearTb);
|
|
|
+ finalIncomeDataInfoVo.setYearTb(incomeYearTb);
|
|
|
}).join();
|
|
|
|
|
|
CompletableFuture.runAsync(() -> {
|
|
@@ -224,7 +224,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal incomeMothHb = BigDecimal.valueOf(1);
|
|
|
if (lastMothTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
incomeMothHb = MothDifference.divide(lastMothTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalIncomeDataInfoVo.setIncomeMonthHb(incomeMothHb);
|
|
|
+ finalIncomeDataInfoVo.setMonthHb(incomeMothHb);
|
|
|
}).join();
|
|
|
|
|
|
CompletableFuture.runAsync(() -> {
|
|
@@ -234,7 +234,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal incomeYearMothTb = BigDecimal.valueOf(1);
|
|
|
if (lastYearMonthTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
incomeYearMothTb = yearMothDifference.divide(lastYearMonthTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalIncomeDataInfoVo.setIncomeMonthTb(incomeYearMothTb);
|
|
|
+ finalIncomeDataInfoVo.setMonthTb(incomeYearMothTb);
|
|
|
}).join();
|
|
|
|
|
|
redisUtil.set(INCOME_DATA_REDIS_KEY + depart, finalIncomeDataInfoVo, 1000L * 60 * 60 * 2);
|
|
@@ -245,16 +245,16 @@ public class IndexServiceImpl implements IndexService {
|
|
|
|
|
|
/*合同数量一层*/
|
|
|
@Override
|
|
|
- public ContractDataInfoVo getTotalContract(HttpServletRequest request) {
|
|
|
+ public IndexTotalVo getTotalContract(HttpServletRequest request) {
|
|
|
//首页合同渲染对象
|
|
|
BigDecimal initValue = BigDecimal.valueOf(0);
|
|
|
- ContractDataInfoVo contractDataInfoVo = new ContractDataInfoVo();
|
|
|
- contractDataInfoVo.setContractYearTotal(initValue);
|
|
|
- contractDataInfoVo.setContractYearTq(initValue);
|
|
|
- contractDataInfoVo.setContractYearTb(initValue);
|
|
|
- contractDataInfoVo.setContractMonthTotal(initValue);
|
|
|
- contractDataInfoVo.setContractMonthHb(initValue);
|
|
|
- contractDataInfoVo.setContractMonthTb(initValue);
|
|
|
+ IndexTotalVo contractDataInfoVo = new IndexTotalVo();
|
|
|
+ contractDataInfoVo.setYearTotal(initValue);
|
|
|
+ contractDataInfoVo.setYearTq(initValue);
|
|
|
+ contractDataInfoVo.setYearTb(initValue);
|
|
|
+ contractDataInfoVo.setMonthTotal(initValue);
|
|
|
+ contractDataInfoVo.setMonthHb(initValue);
|
|
|
+ contractDataInfoVo.setMonthTb(initValue);
|
|
|
|
|
|
String userNameByToken = JwtUtil.getUserNameByToken(request);
|
|
|
LoginUser sysUser = sysBaseApi.getUserByName(userNameByToken);
|
|
@@ -267,7 +267,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
stringBuilder.append(departName).append("|");
|
|
|
}
|
|
|
String depart = stringBuilder.toString();
|
|
|
- ContractDataInfoVo cacheObject = (ContractDataInfoVo) redisUtil.get(CONTRACT_DATA_REDIS_KEY + depart);
|
|
|
+ IndexTotalVo cacheObject = (IndexTotalVo) redisUtil.get(CONTRACT_DATA_REDIS_KEY + depart);
|
|
|
if (ObjectUtils.isNotEmpty(cacheObject)) {
|
|
|
contractDataInfoVo = cacheObject;
|
|
|
return contractDataInfoVo;
|
|
@@ -287,12 +287,12 @@ public class IndexServiceImpl implements IndexService {
|
|
|
Date currentYearBeginDate = instance.getTime();
|
|
|
|
|
|
List<BigDecimal> currentYearIncomeList = new ArrayList<>();
|
|
|
- ContractDataInfoVo finalContractDataInfoVo = contractDataInfoVo;
|
|
|
+ IndexTotalVo finalContractDataInfoVo = contractDataInfoVo;
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
//根据年份和当前部门对应的任务号查询,部门当前年的年收入
|
|
|
BigDecimal currentYearTotal = exchangeMapper.getContractNumYearTotalByTasknoListAndByQsrqRange(tasknoList, currentYearBeginDate, currentYearEndDate);
|
|
|
if (ObjectUtils.isEmpty(currentYearTotal)) currentYearTotal = BigDecimal.valueOf(0);
|
|
|
- finalContractDataInfoVo.setContractYearTotal(currentYearTotal);
|
|
|
+ finalContractDataInfoVo.setYearTotal(currentYearTotal);
|
|
|
currentYearIncomeList.add(currentYearTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -308,7 +308,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
BigDecimal lastYearTqTotal = exchangeMapper.getContractNumYearTotalByTasknoListAndByQsrqRange(tasknoList, LastYearBeginDate, LastTqEndDate);
|
|
|
if (ObjectUtils.isEmpty(lastYearTqTotal)) lastYearTqTotal = BigDecimal.valueOf(0);
|
|
|
- finalContractDataInfoVo.setContractYearTq(lastYearTqTotal);
|
|
|
+ finalContractDataInfoVo.setYearTq(lastYearTqTotal);
|
|
|
lastYearTqIncomeList.add(lastYearTqTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -322,7 +322,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
BigDecimal currentMonthTotal = exchangeMapper.getContractNumYearTotalByTasknoListAndByQsrqRange(tasknoList, currentMothBginDate, currentMothEndDate);
|
|
|
if (ObjectUtils.isEmpty(currentMonthTotal)) currentMonthTotal = BigDecimal.valueOf(0);
|
|
|
- finalContractDataInfoVo.setContractMonthTotal(currentMonthTotal);
|
|
|
+ finalContractDataInfoVo.setMonthTotal(currentMonthTotal);
|
|
|
currentMonthTotalList.add(currentMonthTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -362,7 +362,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal contractYearTb = BigDecimal.valueOf(1);
|
|
|
if (lastYearTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
contractYearTb = YearDifference.divide(lastYearTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalContractDataInfoVo.setContractYearTb(contractYearTb);
|
|
|
+ finalContractDataInfoVo.setYearTb(contractYearTb);
|
|
|
}).join();
|
|
|
|
|
|
CompletableFuture.runAsync(() -> {
|
|
@@ -372,7 +372,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal contractMothHb = BigDecimal.valueOf(1);
|
|
|
if (lastMothTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
contractMothHb = MothDifference.divide(lastMothTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalContractDataInfoVo.setContractMonthHb(contractMothHb);
|
|
|
+ finalContractDataInfoVo.setMonthHb(contractMothHb);
|
|
|
}).join();
|
|
|
|
|
|
CompletableFuture.runAsync(() -> {
|
|
@@ -382,7 +382,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal contractYearMothTb = BigDecimal.valueOf(1);
|
|
|
if (lastYearMonthTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
contractYearMothTb = yearMothDifference.divide(lastYearMonthTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalContractDataInfoVo.setContractMonthTb(contractYearMothTb);
|
|
|
+ finalContractDataInfoVo.setMonthTb(contractYearMothTb);
|
|
|
}).join();
|
|
|
|
|
|
redisUtil.set(CONTRACT_DATA_REDIS_KEY + depart, finalContractDataInfoVo, 1000L * 60 * 60 * 2);
|
|
@@ -392,17 +392,17 @@ public class IndexServiceImpl implements IndexService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- /*已收款*/
|
|
|
+ /*已收款一层*/
|
|
|
@Override
|
|
|
- public ReceivedDataInfoVo getTotalReceived(HttpServletRequest request) {
|
|
|
+ public IndexTotalVo getTotalReceived(HttpServletRequest request) {
|
|
|
BigDecimal initValue = BigDecimal.valueOf(0);
|
|
|
- ReceivedDataInfoVo receivedDataInfoVo = new ReceivedDataInfoVo();
|
|
|
- receivedDataInfoVo.setReceivedYearTotal(initValue);
|
|
|
- receivedDataInfoVo.setReceivedYearTq(initValue);
|
|
|
- receivedDataInfoVo.setReceivedYearTb(initValue);
|
|
|
- receivedDataInfoVo.setReceivedMonthTotal(initValue);
|
|
|
- receivedDataInfoVo.setReceivedMonthHb(initValue);
|
|
|
- receivedDataInfoVo.setReceivedMonthTb(initValue);
|
|
|
+ IndexTotalVo receivedDataInfoVo = new IndexTotalVo();
|
|
|
+ receivedDataInfoVo.setYearTotal(initValue);
|
|
|
+ receivedDataInfoVo.setYearTq(initValue);
|
|
|
+ receivedDataInfoVo.setYearTb(initValue);
|
|
|
+ receivedDataInfoVo.setMonthTotal(initValue);
|
|
|
+ receivedDataInfoVo.setMonthHb(initValue);
|
|
|
+ receivedDataInfoVo.setMonthTb(initValue);
|
|
|
|
|
|
String userNameByToken = JwtUtil.getUserNameByToken(request);
|
|
|
LoginUser sysUser = sysBaseApi.getUserByName(userNameByToken);
|
|
@@ -415,7 +415,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
stringBuilder.append(departName).append("|");
|
|
|
}
|
|
|
String depart = stringBuilder.toString();
|
|
|
- ReceivedDataInfoVo cacheObject = (ReceivedDataInfoVo) redisUtil.get(RECEIVED_DATA_REDIS_KEY + depart);
|
|
|
+ IndexTotalVo cacheObject = (IndexTotalVo) redisUtil.get(RECEIVED_DATA_REDIS_KEY + depart);
|
|
|
if (ObjectUtils.isNotEmpty(cacheObject)) {
|
|
|
receivedDataInfoVo = cacheObject;
|
|
|
return receivedDataInfoVo;
|
|
@@ -436,12 +436,12 @@ public class IndexServiceImpl implements IndexService {
|
|
|
Date currentYearBeginDate = instance.getTime();
|
|
|
|
|
|
List<BigDecimal> currentYearIncomeList = new ArrayList<>();
|
|
|
- ReceivedDataInfoVo finalIncomeDataInfoVo = receivedDataInfoVo;
|
|
|
+ IndexTotalVo finalIncomeDataInfoVo = receivedDataInfoVo;
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
//根据年份和当前部门对应的任务号查询,部门当前年的年收入
|
|
|
BigDecimal currentYearTotal = exchangeMapper.getReceivedYearTotalByTasknoListAndByQsrqRange(tasknoList, currentYearBeginDate, currentYearEndDate);
|
|
|
if (ObjectUtils.isEmpty(currentYearTotal)) currentYearTotal = BigDecimal.valueOf(0);
|
|
|
- finalIncomeDataInfoVo.setReceivedYearTotal(currentYearTotal);
|
|
|
+ finalIncomeDataInfoVo.setYearTotal(currentYearTotal);
|
|
|
currentYearIncomeList.add(currentYearTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -457,7 +457,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
BigDecimal lastYearTqTotal = exchangeMapper.getReceivedYearTotalByTasknoListAndByQsrqRange(tasknoList, LastYearBeginDate, LastTqEndDate);
|
|
|
if (ObjectUtils.isEmpty(lastYearTqTotal)) lastYearTqTotal = BigDecimal.valueOf(0);
|
|
|
- finalIncomeDataInfoVo.setReceivedYearTq(lastYearTqTotal);
|
|
|
+ finalIncomeDataInfoVo.setYearTq(lastYearTqTotal);
|
|
|
lastYearTqIncomeList.add(lastYearTqTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -472,7 +472,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
CompletableFuture.runAsync(() -> {
|
|
|
BigDecimal currentMonthTotal = exchangeMapper.getReceivedYearTotalByTasknoListAndByQsrqRange(tasknoList, currentMothBginDate, currentMothEndDate);
|
|
|
if (ObjectUtils.isEmpty(currentMonthTotal)) currentMonthTotal = BigDecimal.valueOf(0);
|
|
|
- finalIncomeDataInfoVo.setReceivedMonthTotal(currentMonthTotal);
|
|
|
+ finalIncomeDataInfoVo.setMonthTotal(currentMonthTotal);
|
|
|
currentMonthTotalList.add(currentMonthTotal);
|
|
|
}).join();
|
|
|
|
|
@@ -513,7 +513,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal incomeYearTb = BigDecimal.valueOf(1);
|
|
|
if (lastYearTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
incomeYearTb = YearDifference.divide(lastYearTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalIncomeDataInfoVo.setReceivedYearTb(incomeYearTb);
|
|
|
+ finalIncomeDataInfoVo.setYearTb(incomeYearTb);
|
|
|
}).join();
|
|
|
|
|
|
CompletableFuture.runAsync(() -> {
|
|
@@ -523,7 +523,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal incomeMothHb = BigDecimal.valueOf(1);
|
|
|
if (lastMothTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
incomeMothHb = MothDifference.divide(lastMothTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalIncomeDataInfoVo.setReceivedMonthHb(incomeMothHb);
|
|
|
+ finalIncomeDataInfoVo.setMonthHb(incomeMothHb);
|
|
|
}).join();
|
|
|
|
|
|
CompletableFuture.runAsync(() -> {
|
|
@@ -533,7 +533,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal incomeYearMothTb = BigDecimal.valueOf(1);
|
|
|
if (lastYearMonthTqTotal.compareTo(BigDecimal.valueOf(0)) != 0)
|
|
|
incomeYearMothTb = yearMothDifference.divide(lastYearMonthTqTotal, 2, RoundingMode.HALF_UP);
|
|
|
- finalIncomeDataInfoVo.setReceivedMonthTb(incomeYearMothTb);
|
|
|
+ finalIncomeDataInfoVo.setMonthTb(incomeYearMothTb);
|
|
|
}).join();
|
|
|
|
|
|
redisUtil.set(RECEIVED_DATA_REDIS_KEY + depart, finalIncomeDataInfoVo, 1000L * 60 * 60 * 2);
|
|
@@ -633,7 +633,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
tasknoList.addAll(XdbmTasknoList);
|
|
|
if (tasknoList.isEmpty()) return resVo;
|
|
|
|
|
|
- List<ContractAmount> contractAmountList = null;
|
|
|
+ List<ContractAmount> contractAmountList;
|
|
|
if (YEAR.equals(Time)) {
|
|
|
contractAmountList = exchangeMapper.getContractAmountandNumByYear(tasknoList, beginDate, endDate);
|
|
|
}else {
|
|
@@ -902,15 +902,15 @@ public class IndexServiceImpl implements IndexService {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
- public Result<LreDataInfoVo> countLre() {
|
|
|
+ public IndexTotalVo countLre() {
|
|
|
BigDecimal initValue = BigDecimal.valueOf(0);
|
|
|
- LreDataInfoVo lreDataInfoVO = new LreDataInfoVo();
|
|
|
- lreDataInfoVO.setLreYearTotal(initValue);
|
|
|
- lreDataInfoVO.setLreYearTq(initValue);
|
|
|
- lreDataInfoVO.setLreYearTb(initValue);
|
|
|
- lreDataInfoVO.setLreMonthTotal(initValue);
|
|
|
- lreDataInfoVO.setLreMonthTb(initValue);
|
|
|
- lreDataInfoVO.setLreMonthHb(initValue);
|
|
|
+ IndexTotalVo lreDataInfoVo = new IndexTotalVo();
|
|
|
+ lreDataInfoVo.setYearTotal(initValue);
|
|
|
+ lreDataInfoVo.setYearTq(initValue);
|
|
|
+ lreDataInfoVo.setYearTb(initValue);
|
|
|
+ lreDataInfoVo.setMonthTotal(initValue);
|
|
|
+ lreDataInfoVo.setMonthTb(initValue);
|
|
|
+ lreDataInfoVo.setMonthHb(initValue);
|
|
|
|
|
|
BigDecimal eValue = new BigDecimal("1");
|
|
|
|
|
@@ -923,7 +923,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal sumLreYear = countLre(taskNoListNew);
|
|
|
System.out.println("当年的利润额为:");
|
|
|
System.out.println(sumLreYear);
|
|
|
- lreDataInfoVO.setLreYearTotal(sumLreYear);
|
|
|
+ lreDataInfoVo.setYearTotal(sumLreYear);
|
|
|
System.out.println("----------------------------------------------------");
|
|
|
|
|
|
//2.计算上一年的总利润额
|
|
@@ -933,18 +933,18 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal sumLreLastYear = countLre(taskNoListNew2);
|
|
|
System.out.println("上一年的利润额为:");
|
|
|
System.out.println(sumLreLastYear);
|
|
|
- lreDataInfoVO.setLreYearTq(sumLreLastYear);
|
|
|
+ lreDataInfoVo.setYearTq(sumLreLastYear);
|
|
|
System.out.println("----------------------------------------------------");
|
|
|
|
|
|
//2.计算年同比增长率
|
|
|
try {
|
|
|
BigDecimal tbGrowthYear = ((sumLreYear.subtract(sumLreLastYear)).divide(sumLreLastYear, 2, RoundingMode.HALF_UP));
|
|
|
- lreDataInfoVO.setLreYearTb(tbGrowthYear);
|
|
|
+ lreDataInfoVo.setYearTb(tbGrowthYear);
|
|
|
System.out.println("年利润同比增长率为:");
|
|
|
System.out.println(tbGrowthYear);
|
|
|
System.out.println("----------------------------------------------------");
|
|
|
} catch (Exception e) {
|
|
|
- lreDataInfoVO.setLreYearTb(eValue);
|
|
|
+ lreDataInfoVo.setYearTb(eValue);
|
|
|
}
|
|
|
|
|
|
//2.计算当月的总利润额
|
|
@@ -954,7 +954,7 @@ public class IndexServiceImpl implements IndexService {
|
|
|
BigDecimal sumLreCurrMonth = countLre(taskNoListNew3);
|
|
|
System.out.println("当月的利润额为:");
|
|
|
System.out.println(sumLreCurrMonth);
|
|
|
- lreDataInfoVO.setLreMonthTotal(sumLreCurrMonth);
|
|
|
+ lreDataInfoVo.setMonthTotal(sumLreCurrMonth);
|
|
|
System.out.println("----------------------------------------------------");
|
|
|
|
|
|
//2.计算上个月的总利润额
|
|
@@ -969,12 +969,12 @@ public class IndexServiceImpl implements IndexService {
|
|
|
//2.计算月环比增长率
|
|
|
try {
|
|
|
BigDecimal hbGrowthMonth = ((sumLreCurrMonth.subtract(sumLreLastMonth)).divide(sumLreLastMonth, 2, RoundingMode.HALF_UP));
|
|
|
- lreDataInfoVO.setLreMonthHb(hbGrowthMonth);
|
|
|
+ lreDataInfoVo.setMonthHb(hbGrowthMonth);
|
|
|
System.out.println("月环比为:");
|
|
|
System.out.println(hbGrowthMonth);
|
|
|
System.out.println("----------------------------------------------------");
|
|
|
} catch (Exception e) {
|
|
|
- lreDataInfoVO.setLreMonthHb(eValue);
|
|
|
+ lreDataInfoVo.setMonthHb(eValue);
|
|
|
}
|
|
|
|
|
|
//2.计算去年同期月份的总利润额
|
|
@@ -989,14 +989,14 @@ public class IndexServiceImpl implements IndexService {
|
|
|
//2.计算月同比增长率
|
|
|
try {
|
|
|
BigDecimal tbGrowthMonth = ((sumLreCurrMonth.subtract(sumLreTqMonth)).divide(sumLreTqMonth, 2, RoundingMode.HALF_UP));
|
|
|
- lreDataInfoVO.setLreMonthTb(tbGrowthMonth);
|
|
|
+ lreDataInfoVo.setMonthTb(tbGrowthMonth);
|
|
|
System.out.println("月同比为:");
|
|
|
System.out.println(tbGrowthMonth);
|
|
|
System.out.println("----------------------------------------------------");
|
|
|
} catch (Exception e) {
|
|
|
- lreDataInfoVO.setLreMonthTb(eValue);
|
|
|
+ lreDataInfoVo.setMonthTb(eValue);
|
|
|
}
|
|
|
- return Result.OK(lreDataInfoVO);
|
|
|
+ return lreDataInfoVo;
|
|
|
}
|
|
|
|
|
|
/**
|