diff --git a/src/main/java/com/backoffice/m/memory/M_MemoryController.java b/src/main/java/com/backoffice/m/memory/M_MemoryController.java index 38b4ed2..b6bc722 100644 --- a/src/main/java/com/backoffice/m/memory/M_MemoryController.java +++ b/src/main/java/com/backoffice/m/memory/M_MemoryController.java @@ -75,8 +75,19 @@ public class M_MemoryController extends AbstractControllerManager{ HttpSession session = request.getSession(false); DataMap rm_mem = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_MEMBER); - List music_list = memoryBO.select_timeline(paramMap); - DataMap.putToModel(model, "music_list", music_list); + DataMap rm_child = (DataMap) session.getAttribute(ConstantSystem.SESSION_RM_CHILD); + //세션에 선택된 아이정보가 있을 경우 + if(rm_child != null) { + paramMap.put("smc_no", rm_child.get("smc_no")); + } else { + ra.addFlashAttribute("script_msg", "아이를 선택하세요"); + redirect_url = "redirect:/m/index.do"; + + return redirect_url; + } + + List time_list = memoryBO.select_timeline(paramMap); + DataMap.putToModel(model, "time_list", time_list); DataMap.putToModel(model, "rm_mem", rm_mem); } }catch(Exception ex1){ redirect_url = gmUtil.redirectError(true, ex1, request, paramMap, ra, ""); ex1.printStackTrace();} diff --git a/src/main/resources/datasource/sql_map_config_mysql.xml b/src/main/resources/datasource/sql_map_config_mysql.xml index 7bbd8d7..1741475 100644 --- a/src/main/resources/datasource/sql_map_config_mysql.xml +++ b/src/main/resources/datasource/sql_map_config_mysql.xml @@ -128,4 +128,5 @@ + diff --git a/src/main/resources/sqlmap/m/memory/memory.xml b/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml similarity index 84% rename from src/main/resources/sqlmap/m/memory/memory.xml rename to src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml index 72e629a..e8b682c 100644 --- a/src/main/resources/sqlmap/m/memory/memory.xml +++ b/src/main/resources/sqlmap/m/memory/com.backoffice.m.memory.memory.xml @@ -3,100 +3,103 @@ diff --git a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.html b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.ftl similarity index 96% rename from src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.html rename to src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.ftl index ad51c9e..f48ac14 100644 --- a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.html +++ b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_daily.ftl @@ -31,17 +31,17 @@
  • - + 일간
  • - + 주간
  • - + 타임라인
  • diff --git a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_timeline.ftl b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_timeline.ftl new file mode 100644 index 0000000..8ac55d7 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_timeline.ftl @@ -0,0 +1,110 @@ + + +<#include "/m/include/index_top.ftl"> + + + +
    + + +
    + +

    메모리

    + +
    + + + + + + + +
    + + + + + + +
    + + + +
    + <#assign pre_date = ''> + +
    + <#list model['time_list'] as item> + + <#if item['reg_date'] != pre_date> + <#assign pre_date = item['reg_date']> +
    +
    +
    ${item['reg_date']!}
    + + +
    +
    + +
      + <#if item['day_diff'] != '0'> +
      +

      ${item['day_diff']!}d

      +
      + + + <#if item['day_diff'] == '0' && item['time_diff'] != '00:00'> +
      +

      ${item['time_diff']!}

      +
      + + +
    • +
      + ${item['hour_min']!} + +
      + +
      +

      ${item['title']!}

      + ${item['time_val']!} +
      +
    • + +
    +
    +
    + + +
    + + +
    + + +
    + + +
    +
    + + + +<#include "/m/include/index_bottom.ftl"> + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_timeline.html b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_timeline.html deleted file mode 100644 index 9da9ec4..0000000 --- a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_timeline.html +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - 메모리 - - - - - - - - -
    - - -
    -

    메모리

    - -
    - - - - - - - -
    - - - - - - -
    - - - -
    - -
    -
    2022.01.02(일)
    - -
    -
    -
    -

    26d

    -
    - -
      -
    • -
      - 01:45 PM - -
      - -
      -

      Water

      - 0ml -
      -
    • - -
    • -
      - 01:45 PM - -
      - -
      -

      Water

      - 0ml -
      -
    • - -
    • -
      - 01:45 PM - -
      - -
      -

      Water

      - 0ml -
      -
    • -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - -
    - - -
    - - -
    - - -
    -
    - - - - - - - - - diff --git a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.html b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl similarity index 97% rename from src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.html rename to src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl index 8972fe2..82427e8 100644 --- a/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.html +++ b/src/main/webapp/WEB-INF/views/ftl/m/memory/memory_week.ftl @@ -26,17 +26,17 @@
    • - + 일간
    • - + 주간
    • - + 타임라인
    • diff --git a/src/main/webapp/m/css/style.css b/src/main/webapp/m/css/style.css index 74b02f3..2680209 100644 --- a/src/main/webapp/m/css/style.css +++ b/src/main/webapp/m/css/style.css @@ -13866,6 +13866,7 @@ main.sona_cont_measurement { content: ''; width: 2px; height: 80px; + z-index:0; background: #F4F5F5 ; } diff --git a/개발참고.sql b/개발참고.sql index e3476b1..d3c8ffa 100644 --- a/개발참고.sql +++ b/개발참고.sql @@ -62,8 +62,10 @@ order by DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H') asc; -- 메모리 - 타임라인(모유, 각 카테고리별 수치 및 시간간격 계산해야됨.) SELECT - DATE_FORMAT(b.reg_dt, '%Y-%m-%d %H:%i:%s') as reg_date, - TIMEDIFF(b.reg_dt, LAG(b.reg_dt) OVER (ORDER BY b.reg_dt) ) AS time_diff, + DATE_FORMAT(b.reg_dt, '%Y-%m-%d') as reg_date, + DATE_FORMAT(b.reg_dt, '%H:%i %p') as hour_min, + ifnull(DATEDIFF(b.reg_dt, LAG(b.reg_dt) OVER (ORDER BY b.reg_dt)),'') as day_diff, + ifnull(DATE_FORMAT(TIMEDIFF(b.reg_dt, LAG(b.reg_dt) OVER (ORDER BY b.reg_dt) ), '%H:%i'), '00:00'), d.title, b.dn_no, d.cd_no,