diff --git a/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml b/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml index 2879b04..ab66d9a 100644 --- a/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml +++ b/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml @@ -24,13 +24,13 @@ case when mod(@rownum,2) = 0 then ( 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 end ) else ( 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 end ) @@ -52,23 +52,23 @@ ifnull( CASE 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 where tn1.dn_no = b.dn_no ) 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 where tn1.dn_no = b.dn_no ) 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 left outer join tbl_db_nutrient tn on tn1.db_dn_no = tn.dn_no where tn1.dn_no = b.dn_no ) 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 where tn1.dn_no = b.dn_no ) @@ -85,13 +85,13 @@ where tn1.dn_no = b.dn_no ) 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 left outer join tbl_db_home_bf tb on tn1.db_dhb_no = tb.dhb_no where tn1.dn_no = b.dn_no ) 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 left outer join tbl_db_bf_commerce tc on tc.dbc_no = tn1.db_dbc_no where tn1.dn_no = b.dn_no diff --git a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl index e47fecf..28250b8 100644 --- a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl +++ b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl @@ -76,9 +76,9 @@ <#assign pre_date = model['dayList']['day1'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -86,9 +86,9 @@ <#assign pre_date = model['dayList']['day2'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -96,9 +96,9 @@ <#assign pre_date = model['dayList']['day3'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -106,9 +106,9 @@ <#assign pre_date = model['dayList']['day4'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -116,9 +116,9 @@ <#assign pre_date = model['dayList']['day5'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -126,9 +126,9 @@ <#assign pre_date = model['dayList']['day6'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -136,9 +136,9 @@ <#assign pre_date = model['dayList']['day7'] + ''> <#list model['time_list'] as item> <#if item['day'] == pre_date> - <#assign topP = item['hour']> + <#assign topP = item['hour']?string("0.####")> <#assign pre_hour = item['hour'] + ''> - + @@ -306,21 +306,25 @@ function moveTimeLine(event) { let y = event.clientY; let num = y - 270; - let hour = Math.floor((num + 10) / (43/3)); - let minute = Math.floor((((num + 10) % (43/3))/(43/3.001)*60)%60); - if (num < -9) { - num = -9; + if (num < 0) num = 0; + console.log("num: ", num); + let hour = Math.floor(num / 15); + console.log("hour: ", hour); + let minute = Math.floor((num % 15)*4); + if (num < 0) { + num = 0; hour = 0; minute = 00; } - if (num > 331) { - num = 331; + if (num > 360) { + num = 360; hour = 24; minute = 00; } 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); } diff --git a/src/main/webapp/m/css/style.css b/src/main/webapp/m/css/style.css index 90e77a8..ff4249e 100644 --- a/src/main/webapp/m/css/style.css +++ b/src/main/webapp/m/css/style.css @@ -14544,7 +14544,7 @@ main.sona_cont_measurement { .gray_box_div .gray_box li{ width: 12%; - height: 340px; + height: 360px; background: #F3F3F3; position:relative; } @@ -14572,35 +14572,35 @@ main.sona_cont_measurement { } .gray_box_div .border_box li:nth-child(1){ - top:43px; + top:45px; } .gray_box_div .border_box li:nth-child(2){ - top:86px; + top:90px; } .gray_box_div .border_box li:nth-child(3){ - top:129px; + top:135px; } .gray_box_div .border_box li:nth-child(4){ - top:172px; + top:180px; } .gray_box_div .border_box li:nth-child(5){ - top:215px; + top:225px; } .gray_box_div .border_box li:nth-child(6){ - top:258px; + top:270px; } .gray_box_div .border_box li:nth-child(7){ - top:301px; + top:315px; } .gray_box_div .border_box li:nth-child(8){ - top:344px; + top:360px; } .week_chart .number_bottom{ @@ -14626,7 +14626,7 @@ main.sona_cont_measurement { .week_chart .number_right{ position: absolute; - top:0; + top: -5px; right:17px; display: flex; flex-flow: column; @@ -14637,7 +14637,7 @@ main.sona_cont_measurement { color: #000000; opacity: 0.3; text-align: center; - height: 42px; + height: 45px; } .week_chart .time_bar{