[수정] 가온앤 모유 업데이트

dev_bert
Unknown 3 years ago
parent 127db85455
commit 1bb8f0252e

@ -122,13 +122,13 @@ public class NutrientScoreCalculation {
public static void main(String[] args) {
DataMap data = new DataMap();
data.put("month", 24);
data.put("month", 11);
data.put("enerc", 855.44);
data.put("chotdf", 110.99);
data.put("procnp", 27.25);
data.put("fat", 32.7);
data.put("sugar", 53.8);
data.put("fibtg", 0.68);
data.put("fibtg", 40.68);
data.put("na", 227.31);
data.put("vitaminb1", 0.45);
data.put("vitaminb2", 1.18);
@ -398,8 +398,8 @@ public class NutrientScoreCalculation {
* @return
*/
private double getFibtgValue(double x, double from, double to) {
// 12개월 미만 아이에게는 식이섬유 판정 없음
if(this.label<3) return 0;
// 12개월 미만 아이에게는 식이섬유 판정 없음
if(this.label<2) return 0;
double result = 0;
if(from*0.5>x)
@ -412,7 +412,6 @@ public class NutrientScoreCalculation {
result = -100/(to*1.5-to)*x + 100/(to*1.5-to)*to*1.5;
else if(to*1.5<x)
result = 0;
return Math.round(result*100)/100.0;
};
@ -710,7 +709,12 @@ public class NutrientScoreCalculation {
}
private long getBasicNutrientsAvg() {
double basicAvg = getBasicNutrientsScore()/7;
double basicAvg = 0;
if(label < 2) {
basicAvg = getBasicNutrientsScore()/6;
}else {
basicAvg = getBasicNutrientsScore()/7;
}
return Math.round(basicAvg);
}

@ -334,8 +334,9 @@ public class M_Bf_daily_nutritionController extends AbstractControllerManager{
if("N".equals(fdv)) { // 유축기 미사용
cal.estimateHuman(blm, bls, brm, brs);
}else{
cal.estimateHuman(srv, rem, 0, 0);
cal.estimateHuman(blm, bls, brm, brs);
}
paramMap.put("eat_qty", cal.gettot_weight()*100f); // 가중치 수유량 원복
paramMap.put("weight", cal.gettot_weight());
}

@ -69,7 +69,7 @@
<!-- //수유시간 -->
<!-- 수유량 -->
<div class="take_amount w_div">
<div class="take_amount w_div" style="display: none">
<div class="amount_div">
<p class="record_title">수유량</p>

Loading…
Cancel
Save