Forráskód Böngészése

项目导出-环比与超前滞后

qianxb 1 éve
szülő
commit
4c8f1abdf8

+ 3 - 3
src/main/java/org/springblade/modules/project/service/impl/ProjectInfoServiceImpl.java

@@ -2051,8 +2051,8 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
         if (currentLastQuarterFinished.compareTo(BigDecimal.ZERO) == 0 || currentQuarterFinished.compareTo(BigDecimal.ZERO) == 0){
             vo1.setQuarterCompare(BigDecimal.ZERO);
         }else {
-            vo1.setQuarterCompare(currentLastQuarterFinished.multiply(new BigDecimal(100))
-                            .divide(currentQuarterFinished,2, RoundingMode.HALF_UP));
+            vo1.setQuarterCompare( currentQuarterFinished.multiply(new BigDecimal(100))
+                            .divide(currentLastQuarterFinished,2, RoundingMode.HALF_UP));
         }
         vo1.setQuarterFinishedRatio(currentQuarterFinishedRatio);
         vo1.setQuarterAddFinishedInvest(frontQuarterFinished);
@@ -2062,7 +2062,7 @@ public class ProjectInfoServiceImpl extends BaseServiceImpl<ProjectInfoMapper, P
             vo1.setLeadOrLag(BigDecimal.ZERO);
         }else {
             if (frontQuarterPlanInvest.compareTo(frontQuarterFinished) == 0){
-                vo1.setLeadOrLag(new BigDecimal(100));
+                vo1.setLeadOrLag(new BigDecimal(0));
             }else {
                 vo1.setLeadOrLag(frontQuarterFinished.subtract(frontQuarterPlanInvest).multiply(new BigDecimal(100)).divide(frontQuarterPlanInvest,2,RoundingMode.HALF_UP));
             }