diff --git a/src/main/java/com/backoffice/logic/FoodScoreCalculation.java b/src/main/java/com/backoffice/logic/FoodScoreCalculation.java index 6126d26..922bef5 100644 --- a/src/main/java/com/backoffice/logic/FoodScoreCalculation.java +++ b/src/main/java/com/backoffice/logic/FoodScoreCalculation.java @@ -150,7 +150,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food1(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(dqi_food_1>0 && dqi_food_2>0) return 5; else if(dqi_food_1>0) return 15; else return 0; @@ -166,7 +168,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food2(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(dqi_food_2>0) return 5; else return 0; }if(label==1) { @@ -205,7 +209,9 @@ public class FoodScoreCalculation { private double get_dqi_food4(double x) { // 0~5M은 곡물, 통곡물을 곡류로 합쳐 계산 // 둘 중 하나라도 섭취하면 5점 배점 - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0 || dqi_food_5>0) return 0; else return 5; }else if(label==1) { @@ -238,7 +244,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food5(double x) { - if(label==1) { + if( x ==0 ) + return 0; + else if(label==1) { if(x<=29.56) return 2.5; else if(x<=59.15) return 1.25; else return 0; @@ -264,7 +272,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food6(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { @@ -297,7 +307,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food7(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { @@ -326,7 +338,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food8(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { @@ -355,7 +369,10 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food9(double x) { - if(label==0) { + + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { @@ -384,7 +401,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food10(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { @@ -413,7 +432,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food11(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { @@ -442,7 +463,9 @@ public class FoodScoreCalculation { * @return */ private double get_dqi_food12(double x) { - if(label==0) { + if( x ==0 ) + return 0; + else if(label==0) { if(x>0) return 0; else return 5; }else if(label==1) { diff --git a/src/main/java/com/backoffice/logic/NutrientScoreCalculation.java b/src/main/java/com/backoffice/logic/NutrientScoreCalculation.java index 6027aad..13934a4 100644 --- a/src/main/java/com/backoffice/logic/NutrientScoreCalculation.java +++ b/src/main/java/com/backoffice/logic/NutrientScoreCalculation.java @@ -417,7 +417,8 @@ public class NutrientScoreCalculation { */ private double getSugarValue(double x, double from) { double result = 0; - if(x<=from) + //if(x<=from) + if(x>=from) result = 100; else if (from=from) result = 100; else if (from
+ <#if (model['rm_child']['m']>5)&&(model['rm_child']['m']<60)> - 자세히 보기 > +

오늘의 식품군

자세히 보기 >
  • diff --git a/src/main/webapp/WEB-INF/views/ftl/m/bf_growth/nutrient_balance.ftl b/src/main/webapp/WEB-INF/views/ftl/m/bf_growth/nutrient_balance.ftl index b6e9006..c49286f 100644 --- a/src/main/webapp/WEB-INF/views/ftl/m/bf_growth/nutrient_balance.ftl +++ b/src/main/webapp/WEB-INF/views/ftl/m/bf_growth/nutrient_balance.ftl @@ -71,7 +71,7 @@
    <#if (model['rm_child']['m']<60)> - 자세히 보기 > +

    오늘의 영양소

    자세히 보기 >