Przeglądaj źródła

修改任务文件相关接口,新需求:以里程碑完成度来算还是按任务工时完成度

zhouyy 4 miesięcy temu
rodzic
commit
506a457430

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1600,7 +1600,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             int percentRes = 0;
                             if(tmpVO.getPlanHoursSum().compareTo(new BigDecimal(0)) > 0){
                                 percentRes = tmpVO.getRealHoursSum().multiply(new BigDecimal(100))
-                                        .divide(tmpVO.getPlanHoursSum(),RoundingMode.HALF_UP).intValue();
+                                        .divide(tmpVO.getPlanHoursSum(),0,RoundingMode.HALF_UP).intValue();
                             }
                             projectVO.setProgress(percentRes);
                         }
@@ -3297,7 +3297,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
                 int percentRes = 0;
                 if(planHourSum.compareTo(new BigDecimal(0)) > 0){
-                    percentRes = realHourSum.multiply(new BigDecimal(100)).divide(planHourSum,RoundingMode.HALF_UP).intValue();
+                    percentRes = realHourSum.multiply(new BigDecimal(100)).divide(planHourSum,0,RoundingMode.HALF_UP).intValue();
                 }
                 project.setProgress(percentRes);
             }