Pārlūkot izejas kodu

盯盘-环比修改

yangzian 3 gadi atpakaļ
vecāks
revīzija
92e3af2e0d

+ 2 - 2
jeecg-boot-material-view/src/main/java/org/jeecg/ctop/material/service/impl/MaterialStareServiceImpl.java

@@ -447,7 +447,7 @@ public class MaterialStareServiceImpl implements MaterialStareService {
                 String projectId = projectInfo.getProjectId();
                 List<KuaiShouOperateProjectVo> projectYearOnYearInfo = materialStareMapper.getKuaiShouOperateProjectInfo(lastTimeStart,lastTimeEnd,projectId,operatorUserIds);
                 //环比 = (当前 - 上阶段 ) / 上阶段
-                String yearOnYear = null;
+                String yearOnYear = "0";
                 if (!Check.isNull(projectYearOnYearInfo)){
                     Double yearOnYearD = (projectInfo.getTotalCost() - projectYearOnYearInfo.get(0).getTotalCost()) / projectYearOnYearInfo.get(0).getTotalCost();
                     yearOnYear = decimalFormat.format(yearOnYearD);
@@ -521,7 +521,7 @@ public class MaterialStareServiceImpl implements MaterialStareService {
                 long accountId = accountInfo.getAccountId();
                 List<KuaiShouOperateAccountVo> accountYearOnYearInfo = materialStareMapper.getKuaiShouOperateAccountInfo(lastTimeStart,lastTimeEnd,projectId,accountId,operatorUserIds);
                 //环比 = (当前 - 上阶段 ) / 上阶段
-                String yearOnYear = null;
+                String yearOnYear = "0";
                 if (!Check.isNull(accountYearOnYearInfo)){
                     Double yearOnYearD = (accountInfo.getTotalCost() - accountYearOnYearInfo.get(0).getTotalCost()) / accountYearOnYearInfo.get(0).getTotalCost();
                     yearOnYear = decimalFormat.format(yearOnYearD);