추천홈메이드이유식 수정

dev_bert
jonghwan76 3 years ago
parent 91915f2640
commit 289cfe54d0

@ -9,12 +9,11 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="4099ff18-820b-4e43-a4c5-6159d58dccc4" name="변경" comment="한글파일명 음악파일 업로드이슈 수정">
<list default="true" id="4099ff18-820b-4e43-a4c5-6159d58dccc4" name="변경" comment="이유식레시피, 시판이유식 자동검색 적용">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/sqlmap/m/bf_daily_nutrition/com.backoffice.m.bf_daily_nutrition.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/sqlmap/m/bf_daily_nutrition/com.backoffice.m.bf_daily_nutrition.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/bf_food/list_bf_commerce_popup.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/bf_food/list_bf_commerce_popup.ftl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/bf_food/list_bf_homemade_popup.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/bf_food/list_bf_homemade_popup.ftl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/backoffice/m/bf_growth/M_Bf_growthController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/backoffice/m/bf_growth/M_Bf_growthController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/java/com/backoffice/m/index/M_IndexController.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/backoffice/m/index/M_IndexController.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/resources/sqlmap/admin/bf/com.backoffice.admin.bf.bf_recommend.xml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/sqlmap/admin/bf/com.backoffice.admin.bf.bf_recommend.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/index/index.ftl" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.ftl" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.ftl" afterDir="false" />
</list>
@ -190,7 +189,8 @@
<workItem from="1648351480256" duration="22180000" />
<workItem from="1648430275073" duration="49000" />
<workItem from="1648430348136" duration="702000" />
<workItem from="1648431787209" duration="7761000" />
<workItem from="1648431787209" duration="14235000" />
<workItem from="1648451792083" duration="1343000" />
</task>
<task id="LOCAL-00001" summary="최초 커밋">
<created>1645354476031</created>
@ -234,7 +234,14 @@
<option name="project" value="LOCAL" />
<updated>1648391088065</updated>
</task>
<option name="localTasksCounter" value="7" />
<task id="LOCAL-00007" summary="이유식레시피, 시판이유식 자동검색 적용">
<created>1648440207179</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1648440207179</updated>
</task>
<option name="localTasksCounter" value="8" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -260,6 +267,7 @@
<MESSAGE value="아이 사진 업로드 오류" />
<MESSAGE value="SNS 탈퇴 로그인 불가 처리 메시지" />
<MESSAGE value="한글파일명 음악파일 업로드이슈 수정" />
<option name="LAST_COMMIT_MESSAGE" value="한글파일명 음악파일 업로드이슈 수정" />
<MESSAGE value="이유식레시피, 시판이유식 자동검색 적용" />
<option name="LAST_COMMIT_MESSAGE" value="이유식레시피, 시판이유식 자동검색 적용" />
</component>
</project>

@ -256,6 +256,7 @@ public class M_Bf_growthController extends AbstractControllerManager{
}
}
// m>5 && m<60 때만 추천
// 60개월 미만 인경우만
if(m>5 && m<60 ) {

@ -1,6 +1,8 @@
package com.backoffice.m.index;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
@ -8,6 +10,9 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import com.backoffice.admin.bf.bf_score.A_Bf_scoreBO;
import com.backoffice.logic.FoodScoreCalculation;
import com.backoffice.logic.NutrientScoreCalculation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -50,6 +55,7 @@ public class M_IndexController extends AbstractControllerManager{
@Autowired M_Bf_family_babyBO bf_family_babyBO;
@Autowired M_Bf_growth_bodyBO bf_growth_bodyBO;
@Autowired M_Bf_daily_nutritionBO bf_daily_nutritionBO;
@Autowired A_Bf_scoreBO scoreBO;
// paging info
int ROW_COUNT = 20;
@ -157,7 +163,6 @@ public class M_IndexController extends AbstractControllerManager{
DataMap rm_mem = init_member(model, request, paramMap);
// 아이
DataMap rm_child = init_child(model, request, paramMap);
DataMap.putToModel(model, "rm_child", rm_child);
// log.info("아이정보 ----- ");
// log.info(rm_child);
@ -182,8 +187,40 @@ public class M_IndexController extends AbstractControllerManager{
//마지막 식사, 수면, 대소변 현황
List<DataMap> lm_last = bf_daily_nutritionBO.select_bf_last_status(paramMap);
DataMap.putToModel(model, "lm_last", lm_last);
// 60개월 미만 인경우만 영양점수 계산
int m = rm_child.getInt("m");
DataMap today = new DataMap();
List<DataMap> daily = new ArrayList<DataMap>();
if(m>5 && m<60 ) {
// 당일 균형 판정
Calendar cal = Calendar.getInstance();
SimpleDateFormat format = new SimpleDateFormat ("yyyy-MM-dd");
paramMap.put("scope", "day");
paramMap.put("reg_dt", format.format(cal.getTime()));
DataMap today_dm = scoreBO.select_day_total(paramMap);
if(today_dm == null) {
today_dm = new DataMap();
today_dm.put("month", rm_child.get("m"));
}
// 일일 균형 판정
List<DataMap> day_lm = scoreBO.select_daily_list_for_graph(paramMap);
DataMap tot = scoreBO.select_day_total(day_lm.get(0));
NutrientScoreCalculation nut = new NutrientScoreCalculation(tot);
DataMap nut_score = nut.getScore();
FoodScoreCalculation food = new FoodScoreCalculation(tot);
DataMap food_score = food.getScore();
rm_child.put("totalNutrition", Math.round(nut_score.getLong("totalNutrition")));
rm_child.put("totalFood", Math.round(food_score.getLong("totalFood")));
}
}
DataMap.putToModel(model, "rm_child", rm_child);
gmUtil.redirectParam(model, paramMap);
}
}catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();}

@ -85,7 +85,8 @@
<isNotEmpty property="dqi_food_7">+IF(dqi_food_7 <![CDATA[>=]]> 1, #dqi_food_7#, 0)</isNotEmpty>
<isNotEmpty property="dqi_food_8">+IF(dqi_food_8 <![CDATA[>=]]> 1, #dqi_food_8#, 0)</isNotEmpty>
) AS total
FROM tbl_db_bf_ingre
FROM tbl_db_bf_ingre a
INNER JOIN tbl_db_home_bf_ingre b on a.name_real = b.di_name
GROUP BY dbi_no
)x
LEFT JOIN tbl_log_bf_ingre lbi ON x.dbi_no = lbi.dbi_no

@ -139,21 +139,30 @@
<!-- main_pofile_info -->
<div class="main_pofile_info main_pofile_info02">
<!-- main_pofile_info_txt -->
<div class="main_pofile_info_txt txt01 active">
<div class="main_pofile_info_txt01"><img src="${URL_STATIC_ROOT}/m/img/main/main_pofile_info_ico02.png" alt="영양 아이콘" /></div>
<div class="main_pofile_info_txt02"><strong>-</strong></div>
<#if model['rm_child']['totalNutrition']?exists == true>
<div class="main_pofile_info_txt02"><strong>${model['rm_child']['totalNutrition']}%</strong></div>
</#if>
<#if model['rm_child']['totalNutrition']?exists == false>
<div class="main_pofile_info_txt02"><strong>-</strong></div>
</#if>
</div>
<!-- main_pofile_info_txt -->
<div class="main_pofile_info_txt txt02">
<div class="main_pofile_info_txt01"><img src="${URL_STATIC_ROOT}/m/img/main/main_pofile_info_ico02.png" alt="영양 아이콘" /></div>
<div class="main_pofile_info_txt02"><strong>-</strong></div>
<#if model['rm_child']['totalFood']?exists == true>
<div class="main_pofile_info_txt02"><strong>${model['rm_child']['totalFood']}%</strong></div>
</#if>
<#if model['rm_child']['totalFood']?exists == false>
<div class="main_pofile_info_txt02"><strong>-</strong></div>
</#if>
</div>
<div class="main_pofile_info_tit">
<span class="txt01 active">영양</span>
<span class="txt02">DQI</span>
<span class="txt02">식품</span>
</div>
</div>

@ -58,11 +58,9 @@
<div class="chart memory_daily_chart" data-percent="62.5">
<div class="container">
<#assign idx = 0>
<!-- conic-gradient(from 시작각도deg, 색상, 범위각도deg, 배경색(투명) 0) -->
<#list model['time_list'] as item>
<#assign idx = idx + 1>
<div class="data" title="${item.title}" style="z-index:${idx};background: conic-gradient(from ${item['start_degree']!}deg,#${item['category']!} ${item['add_degree']!}deg, #00ff0000 0)"></div>
<div class="data" title="${item.title}" style="background: conic-gradient(from ${item['start_degree']!}deg,#${item['category']!} ${item['add_degree']!}deg, #00ff0000 0)"></div>
</#list>
<span class="center"></span>
</div>

Loading…
Cancel
Save