[수정] 메모리 월간 값 보정

dev_bert
정이솔 3 years ago
parent 37e736d627
commit 183d377014

@ -24,13 +24,13 @@
case case
when mod(@rownum,2) = 0 then ( when mod(@rownum,2) = 0 then (
case case
when (XA.hour+((XA.add_degree/340)*100)) > 100 then (340 * (((XA.hour+((XA.add_degree/340)*100))-100)/100)) when (XA.hour+((XA.add_degree/360)*100)) > 100 then (360 * (((XA.hour+((XA.add_degree/360)*100))-100)/100))
else 0 else 0
end end
) )
else ( else (
case case
when (XA.hour+((XA.add_degree/340)*100)) > 100 then 340 - (340 * (XA.hour/100)) when (XA.hour+((XA.add_degree/360)*100)) > 100 then 360 - (360 * (XA.hour/100))
else XA.add_degree else XA.add_degree
end end
) )
@ -52,23 +52,23 @@
ifnull( ifnull(
CASE CASE
when c.cd_no = 'BF_NU_TP_1' THEN when c.cd_no = 'BF_NU_TP_1' THEN
(select (blm + brm) * 0.233 (select (blm + brm) * 0.25
from tbl_bf_daily_nutrition_1 tn1 from tbl_bf_daily_nutrition_1 tn1
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no
) )
when c.cd_no = 'BF_NU_TP_2' THEN when c.cd_no = 'BF_NU_TP_2' THEN
(select (bm + bs) * 0.233 (select (bm + bs) * 0.25
from tbl_bf_daily_nutrition_2 tn1 from tbl_bf_daily_nutrition_2 tn1
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no
) )
when c.cd_no = 'BF_NU_TP_3' THEN when c.cd_no = 'BF_NU_TP_3' THEN
(select (bm + bs) * 0.233 (select (bm + bs) * 0.25
from tbl_bf_daily_nutrition_3 tn1 from tbl_bf_daily_nutrition_3 tn1
left outer join tbl_db_nutrient tn on tn1.db_dn_no = tn.dn_no left outer join tbl_db_nutrient tn on tn1.db_dn_no = tn.dn_no
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no
) )
when c.cd_no = 'BF_NU_TP_5' THEN when c.cd_no = 'BF_NU_TP_5' THEN
(select (sleep_h * 60 + sleep_m) * 0.233 (select (sleep_h * 60 + sleep_m) * 0.25
from tbl_bf_daily_nutrition_5 tn1 from tbl_bf_daily_nutrition_5 tn1
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no
) )
@ -85,13 +85,13 @@
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no
) )
when c.cd_no = 'BF_NU_TP_9' THEN when c.cd_no = 'BF_NU_TP_9' THEN
(select (bm + bs) * 0.233 (select (bm + bs) * 0.25
from tbl_bf_daily_nutrition_9 tn1 from tbl_bf_daily_nutrition_9 tn1
left outer join tbl_db_home_bf tb on tn1.db_dhb_no = tb.dhb_no left outer join tbl_db_home_bf tb on tn1.db_dhb_no = tb.dhb_no
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no
) )
when c.cd_no = 'BF_NU_TP_10' THEN when c.cd_no = 'BF_NU_TP_10' THEN
(select (bm + bs) * 0.233 (select (bm + bs) * 0.25
from tbl_bf_daily_nutrition_10 tn1 from tbl_bf_daily_nutrition_10 tn1
left outer join tbl_db_bf_commerce tc on tc.dbc_no = tn1.db_dbc_no left outer join tbl_db_bf_commerce tc on tc.dbc_no = tn1.db_dbc_no
where tn1.dn_no = b.dn_no where tn1.dn_no = b.dn_no

@ -76,9 +76,9 @@
<#assign pre_date = model['dayList']['day1'] + ''> <#assign pre_date = model['dayList']['day1'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?float!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -86,9 +86,9 @@
<#assign pre_date = model['dayList']['day2'] + ''> <#assign pre_date = model['dayList']['day2'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?float!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -96,9 +96,9 @@
<#assign pre_date = model['dayList']['day3'] + ''> <#assign pre_date = model['dayList']['day3'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?string("0.####")!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -106,9 +106,9 @@
<#assign pre_date = model['dayList']['day4'] + ''> <#assign pre_date = model['dayList']['day4'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?string("0.####")!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -116,9 +116,9 @@
<#assign pre_date = model['dayList']['day5'] + ''> <#assign pre_date = model['dayList']['day5'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?string("0.####")!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -126,9 +126,9 @@
<#assign pre_date = model['dayList']['day6'] + ''> <#assign pre_date = model['dayList']['day6'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?string("0.####")!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -136,9 +136,9 @@
<#assign pre_date = model['dayList']['day7'] + ''> <#assign pre_date = model['dayList']['day7'] + ''>
<#list model['time_list'] as item> <#list model['time_list'] as item>
<#if item['day'] == pre_date> <#if item['day'] == pre_date>
<#assign topP = item['hour']> <#assign topP = item['hour']?string("0.####")>
<#assign pre_hour = item['hour'] + ''> <#assign pre_hour = item['hour'] + ''>
<span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']!}px;background-color: ${item['color_cd']};z-index:2;"></span> <span key="${item['color_cd']?replace("#", "")}" name="p_timeline_color" title="${item.title}" style="top:${topP}%;height:${item['add_degree']?string("0.####")!}px;background-color: ${item['color_cd']};z-index:2;"></span>
</#if> </#if>
</#list> </#list>
</li> </li>
@ -306,21 +306,25 @@
function moveTimeLine(event) { function moveTimeLine(event) {
let y = event.clientY; let y = event.clientY;
let num = y - 270; let num = y - 270;
let hour = Math.floor((num + 10) / (43/3)); if (num < 0) num = 0;
let minute = Math.floor((((num + 10) % (43/3))/(43/3.001)*60)%60); console.log("num: ", num);
if (num < -9) { let hour = Math.floor(num / 15);
num = -9; console.log("hour: ", hour);
let minute = Math.floor((num % 15)*4);
if (num < 0) {
num = 0;
hour = 0; hour = 0;
minute = 00; minute = 00;
} }
if (num > 331) { if (num > 360) {
num = 331; num = 360;
hour = 24; hour = 24;
minute = 00; minute = 00;
} }
let coords = "num: " + num + " hour: " + hour + " min: " + minute; let coords = "num: " + num + " hour: " + hour + " min: " + minute;
// console.log(coords);
$(".time_bar").css("top", num + "px"); $(".time_bar").css("top", num-10 + "px");
$(".time_bar_number > p").text(hour+":"+(minute<10?"0":"")+minute); $(".time_bar_number > p").text(hour+":"+(minute<10?"0":"")+minute);
} }
</script> </script>

@ -14544,7 +14544,7 @@ main.sona_cont_measurement {
.gray_box_div .gray_box li{ .gray_box_div .gray_box li{
width: 12%; width: 12%;
height: 340px; height: 360px;
background: #F3F3F3; background: #F3F3F3;
position:relative; position:relative;
} }
@ -14572,35 +14572,35 @@ main.sona_cont_measurement {
} }
.gray_box_div .border_box li:nth-child(1){ .gray_box_div .border_box li:nth-child(1){
top:43px; top:45px;
} }
.gray_box_div .border_box li:nth-child(2){ .gray_box_div .border_box li:nth-child(2){
top:86px; top:90px;
} }
.gray_box_div .border_box li:nth-child(3){ .gray_box_div .border_box li:nth-child(3){
top:129px; top:135px;
} }
.gray_box_div .border_box li:nth-child(4){ .gray_box_div .border_box li:nth-child(4){
top:172px; top:180px;
} }
.gray_box_div .border_box li:nth-child(5){ .gray_box_div .border_box li:nth-child(5){
top:215px; top:225px;
} }
.gray_box_div .border_box li:nth-child(6){ .gray_box_div .border_box li:nth-child(6){
top:258px; top:270px;
} }
.gray_box_div .border_box li:nth-child(7){ .gray_box_div .border_box li:nth-child(7){
top:301px; top:315px;
} }
.gray_box_div .border_box li:nth-child(8){ .gray_box_div .border_box li:nth-child(8){
top:344px; top:360px;
} }
.week_chart .number_bottom{ .week_chart .number_bottom{
@ -14626,7 +14626,7 @@ main.sona_cont_measurement {
.week_chart .number_right{ .week_chart .number_right{
position: absolute; position: absolute;
top:0; top: -5px;
right:17px; right:17px;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
@ -14637,7 +14637,7 @@ main.sona_cont_measurement {
color: #000000; color: #000000;
opacity: 0.3; opacity: 0.3;
text-align: center; text-align: center;
height: 42px; height: 45px;
} }
.week_chart .time_bar{ .week_chart .time_bar{

Loading…
Cancel
Save