박정하 박정하 2023-10-31
231031 박정하 캘린더 수정
@2945e1bf2ced4ff5937a00e8c29b9e2292f0e336
client/resources/css/common.css
--- client/resources/css/common.css
+++ client/resources/css/common.css
@@ -27,7 +27,7 @@
 }
 .sub-grid-government{
   display: grid;
-  grid-template-columns: repeat(5, 1fr);
+  grid-template-columns: repeat(4, 1fr);
   grid-template-rows: 0.1fr;
   grid-column: 1/5;
   gap: 1rem;
@@ -47,7 +47,7 @@
 }
 .main-grid-agency {
   display: grid;
-  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
+  grid-template-columns: 1fr 1fr 1fr 1fr;
   grid-template-rows: 0.1fr;
   gap: 3rem;
 }
client/resources/css/layout.css
--- client/resources/css/layout.css
+++ client/resources/css/layout.css
@@ -16,11 +16,12 @@
   grid-template-columns: 315px 1fr;
   grid-template-rows: 0.1fr 2.9fr;
 }
+
 header {
   padding: 1rem 3rem;
   background-color: white;
   grid-area: header;
-  height: 87px;  
+  height: 87px;
   z-index: 10;
   width: 100%;
 }
@@ -28,10 +29,15 @@
 .page-title-span {
   font-size: 2.5rem;
   font-weight: bold;
-
 }
 
-nav{
+.page-title-inner-span {
+  margin-left: 1rem;
+  font-size: 1.5rem;
+  font-weight: normal;
+}
+
+nav {
   height: 100%;
   width: 310px;
   background-color: #f2f0eb;
@@ -39,15 +45,16 @@
   position: fixed;
   z-index: 10;
   background: #ffffff;
-  box-shadow: 1px 0px 6px 2px rgb(0 0 0 / 20%); 
+  box-shadow: 1px 0px 6px 2px rgb(0 0 0 / 20%);
 }
 
-.logo {  
+.logo {
   padding: 3rem 1rem;
   font-size: large;
   text-align: center;
   font-weight: bold;
 }
+
 /* 네비게이션 */
 
 
@@ -56,13 +63,14 @@
   font-weight: bold;
   margin: 0 3rem;
   padding: 1rem 3.2rem;
-  
+
 }
 
 /* mui icon */
 .MuiSvgIcon-root {
   display: block;
 }
+
 .sidebar-title {
   margin: 0 3rem;
   padding: 1rem 3.2rem;
@@ -70,38 +78,70 @@
 
 .sidebar-title span {
   font-weight: bold;
-  color: #333333;  
-  font-family:"KoPubDotumLight";  
+  color: #333333;
+  font-family: "KoPubDotumLight";
 }
 
 .sidebar-title .toggle {
   transition: transform .3s;
 }
+
 .sidebar-item.open .toggle {
   transform: rotate(180deg);
-  
+
 }
-nav li{cursor: pointer;}
-.sidebar-item{font-size: 1.8rem;}
+
+nav li {
+  cursor: pointer;
+}
+
+.sidebar-item {
+  font-size: 1.8rem;
+}
+
 .sidebar-item.active,
-.sidebar-item:hover{background: #f25430; color: #ffffff; width: 90%; border-top-right-radius: 50px; border-bottom-right-radius: 50px; }
+.sidebar-item:hover {
+  background: #f25430;
+  color: #ffffff;
+  width: 90%;
+  border-top-right-radius: 50px;
+  border-bottom-right-radius: 50px;
+}
+
 .sidebar-item.active a,
-.sidebar-item:hover a{color: #ffffff;}
-.sidebar-item.active span, .sidebar-item.active .toggle,
-.sidebar-item:hover span, .sidebar-item:hover .toggle{color: #ffffff;}
-.sidebar-item.active span, .sidebar-item.active .MuiSvgIcon-root,
-.sidebar-item:hover span, .sidebar-item:hover .MuiSvgIcon-root{color: #ffffff;}
+.sidebar-item:hover a {
+  color: #ffffff;
+}
+
+.sidebar-item.active span,
+.sidebar-item.active .toggle,
+.sidebar-item:hover span,
+.sidebar-item:hover .toggle {
+  color: #ffffff;
+}
+
+.sidebar-item.active span,
+.sidebar-item.active .MuiSvgIcon-root,
+.sidebar-item:hover span,
+.sidebar-item:hover .MuiSvgIcon-root {
+  color: #ffffff;
+}
+
 .sidebar-content {
   display: none;
   color: #ffffff;
 }
-.sidebar-content a{padding: 1rem 0 1rem 5rem;}
+
+.sidebar-content a {
+  padding: 1rem 0 1rem 5rem;
+}
+
 .sidebar-item.open>.sidebar-content {
   height: auto;
   display: block;
 }
 
-.sidebar-content .sidebar-item:hover  {
+.sidebar-content .sidebar-item:hover {
   background: #f1bdb1;
   color: #ffffff;
 }
@@ -111,10 +151,29 @@
   background: #f1bdb1;
   color: #ffffff;
 }
-.info-wrap .usericon{width: 5rem; height: 5rem; border: 1px solid #f25430; border-radius: 50px; margin-right: 2rem;}
-.header-info-id{font-size: 1.6rem; margin-right: 2rem; color: #733c1d; font-weight: 600;}
-.header-info-id::after{content: "님"; font-size: 1.6rem;}
-.info-id, .logout {
+
+.info-wrap .usericon {
+  width: 5rem;
+  height: 5rem;
+  border: 1px solid #f25430;
+  border-radius: 50px;
+  margin-right: 2rem;
+}
+
+.header-info-id {
+  font-size: 1.6rem;
+  margin-right: 2rem;
+  color: #733c1d;
+  font-weight: 600;
+}
+
+.header-info-id::after {
+  content: "님";
+  font-size: 1.6rem;
+}
+
+.info-id,
+.logout {
   width: 123px;
   height: 40px;
   background: #f25430;
@@ -127,17 +186,28 @@
   margin: 0 1rem;
   cursor: pointer;
 }
-.info-id span, .logout span{
+
+.info-id span,
+.logout span {
   margin: 0 auto;
 }
-.bottom-section{position: absolute; padding: 0 1.6rem; bottom: 5rem;}
-.logout{background: #f26e50;}
+
+.bottom-section {
+  position: absolute;
+  padding: 0 1.6rem;
+  bottom: 5rem;
+}
+
+.logout {
+  background: #f26e50;
+}
+
 #pages {
   max-width: 100%;
   padding: 3rem;
   background-color: #f4f4f2;
   grid-area: main;
- height: inherit;
+  height: inherit;
 }
 
 
@@ -151,7 +221,8 @@
   padding: 4rem 5rem;
   background-color: #ffffff;
 }
-.userlist{
+
+.userlist {
   box-shadow: 1px 1px 5px 1px rgb(0 0 0 / 20%);
   width: 100%;
   padding: 4.5rem 2rem;
@@ -166,12 +237,13 @@
   width: 100%;
   padding: 1rem 0 0 3rem;
 }
-.hierarchy-menu a { 
+
+.hierarchy-menu a {
   color: #333333;
   text-decoration: none;
 }
 
-.hierarchy-menu a span{
+.hierarchy-menu a span {
   font-size: 1.6rem;
 }
 
@@ -182,6 +254,7 @@
   padding: 10px 0 0 0;
   position: relative;
 }
+
 .hierarchy-menu ul ul:before {
   content: '';
   position: absolute;
@@ -190,7 +263,8 @@
   left: 6px;
   border-left: 1px dashed #373E4B;
 }
-.hierarchy-menu > ul ul {
+
+.hierarchy-menu>ul ul {
   padding-left: 16px;
 }
 
@@ -199,7 +273,8 @@
   display: block;
   position: relative;
 }
-.hierarchy-menu > ul ul li:before {
+
+.hierarchy-menu>ul ul li:before {
   content: '';
   display: block;
   height: 0px;
@@ -209,7 +284,8 @@
   left: -10px;
   top: 16px;
 }
-.hierarchy-menu > ul ul li:after {
+
+.hierarchy-menu>ul ul li:after {
   content: '';
   display: block;
   height: 43px;
@@ -219,24 +295,29 @@
   left: -10px;
   top: -27px;
 }
-.hierarchy-menu > ul ul li.group-lvl:before {
+
+.hierarchy-menu>ul ul li.group-lvl:before {
   width: 50px;
 }
-.hierarchy-menu > ul ul li:first-child:after { 
+
+.hierarchy-menu>ul ul li:first-child:after {
   height: 28px;
   top: -12px;
 }
 
 /* Links */
-.hierarchy-menu ul .max-agency{
+.hierarchy-menu ul .max-agency {
   margin-left: 0px;
 }
-.hierarchy-menu ul .top-agency{
+
+.hierarchy-menu ul .top-agency {
   margin-left: 49px;
 }
-.hierarchy-menu .low-agency{
+
+.hierarchy-menu .low-agency {
   margin-left: 50px;
 }
+
 .hierarchy-menu ul a {
   display: block;
   padding: 6px 0 0 5rem;
@@ -245,15 +326,17 @@
   color: #333333;
   transition: 100ms;
 }
+
 .hierarchy-menu ul a:hover {
   color: #7e9d9c;
 }
+
 .hierarchy-menu ul a.active {
   color: #333333;
   font-weight: bold;
 }
 
-.hierarchy-menu li.sub-nav > a:before {
+.hierarchy-menu li.sub-nav>a:before {
   position: absolute;
   left: 4px;
   top: 19px;
@@ -266,17 +349,21 @@
   -webkit-transform: rotate(-45deg);
   transform: rotate(-45deg);
 }
-.hierarchy-menu li.sub-nav.open > a:before {
+
+.hierarchy-menu li.sub-nav.open>a:before {
   -ms-transform: rotate(45deg);
   -webkit-transform: rotate(45deg);
   transform: rotate(45deg);
 }
-.hierarchy-menu li.sub-nav.open > a {
+
+.hierarchy-menu li.sub-nav.open>a {
   color: #333333;
 }
-.hierarchy-menu li.sub-nav > ul {
+
+.hierarchy-menu li.sub-nav>ul {
   display: block;
 }
-.hierarchy-menu li.sub-nav.open > ul {
+
+.hierarchy-menu li.sub-nav.open>ul {
   display: block;
-}
+}
(No newline at end of file)
client/resources/css/main.css
--- client/resources/css/main.css
+++ client/resources/css/main.css
@@ -70,9 +70,14 @@
   padding: 1rem 0;
 }
 
+.point {
+  color: #f25430;
+  font-weight: 900;
+  border-bottom: 1px solid #f25430 !important;
+}
+
 .react-calendar__month-view__days__day--neighboringMonth {
   color: #f0f0f0;
-  ;
 }
 
 /* .agency-calendar .react-calendar__month-view__days{overflow: hidden;} */
@@ -469,12 +474,15 @@
 }
 
 .statistics-govern li p:nth-of-type(3) {
-  font-size: 1.6rem;
+  font-size: 2.6rem;
   font-weight: bold;
 }
 
 .statistics-govern li p:nth-of-type(3)::after {
   content: "명";
+  margin-left: .25rem;
+  font-size: 1.6rem;
+  font-weight: normal;
 }
 
 .statistics-agency {
@@ -765,10 +773,12 @@
 
 .react-calendar__tile--active:enabled:hover,
 .react-calendar__tile--active:enabled:focus {
+  color: #ffffff !important;
   background: #e26f49;
 }
 
 .react-calendar__tile--active {
+  color: #ffffff !important;
   background: #e26f49;
 }
 
@@ -1650,4 +1660,16 @@
 
 .react-datepicker-wrapper {
   width: 100%;
+}
+
+.react-calendar__century-view,
+.react-calendar__decade-view__years,
+.react-calendar__year-view {
+  position: relative;
+  z-index: 2;
+  background-color: #f0f0f0;
+}
+
+.combine-left-government3 .react-calendar__month-view__days__day--neighboringMonth {
+  display: none;
 }
(No newline at end of file)
client/views/component/Calendar.jsx
--- client/views/component/Calendar.jsx
+++ client/views/component/Calendar.jsx
@@ -16,6 +16,7 @@
   //전역 변수 저장 객체
   const state = useSelector((state) => { return state });
   const defaultUserId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['user_id'];
+  const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'];
 
   const [value, setValue] = useState(new Date());
   //const mark = ["12-04-2023", "21-04-2023", "05-04-2023", "02-04-2023"];
@@ -31,11 +32,11 @@
     if (todayTemperature.length > 0) {
       if (moment(date['date']).format("MM") >= 11 || moment(date['date']).format("MM") <= 2) {
         return (
-          <p>{Math.min.apply(null, todayTemperature)}</p>
-          )
-        } else {
-          return (
-          <p>{Math.max.apply(null, todayTemperature)}</p>
+          <p>{Math.min.apply(null, todayTemperature)}℃</p>
+        )
+      } else {
+        return (
+          <p>{Math.max.apply(null, todayTemperature)}℃</p>
         )
       }
     } else {
@@ -50,14 +51,69 @@
     mark.push(data.visitRecordList[i]['visit_date']);
   }
 
+  //위험 기준 목록 정보
+  const [riskStandard, setRiskStandard] = React.useState([]);
+  //위험 기준 목록 조회
+  const riskStandardSelectList = () => {
+    fetch("/danger/riskStandardSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({ government_id: defaultGovernmentId }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("위험 기준 목록 조회 결과(건수) : ", data);
+      data.map((item, idx) => {
+        if (item['risk_standard_type'] = "TEMP") {
+          setRiskStandard(item);
+        }
+      })
+    }).catch((error) => {
+      console.log('riskStandardSelectList() /danger/riskStandardSelectList.json error : ', error);
+    });
+  }
+
+  React.useEffect(() => {
+    riskStandardSelectList();
+  }, []);
+
   return (
     <>
       <Calendar
         onChange={setValue}
         value={value}
+        // tileClassName={({ date, view }) => {
+        //   if (mark.find((x) => x === moment(date).format("YYYY-MM-DD"))) {
+        //     return "highlight";
+        //   }
+        // }}
         tileClassName={({ date, view }) => {
-          if (mark.find((x) => x === moment(date).format("YYYY-MM-DD"))) {
-            return "highlight";
+          let medication = ""
+          let temperature = ""
+          data['medication'].map((item, idx) => {
+            if (item['xName'] === moment(date).format("YYYY-MM-DD")) {
+              medication = item['sum'] / item['total'];
+            }
+          })
+
+          let todayTemperature = [];
+          data['temperature'].map((item, idx) => {
+            if (item['xName'] === moment(date).format("YYYY-MM-DD")) {
+              todayTemperature.push(item['temperature']);
+            }
+          })
+          if (todayTemperature.length > 0) {
+            if (moment(moment(date).format("YYYY-MM-DD")).format("MM") >= 11 || moment(moment(date).format("YYYY-MM-DD")).format("MM") <= 2) {
+              temperature = Math.min.apply(null, todayTemperature)
+            } else {
+              temperature = Math.max.apply(null, todayTemperature)
+            }
+          }
+
+          if (medication < 0.5 || riskStandard['risk_standard_start_value'] <= temperature || riskStandard['risk_standard_end_value'] >= temperature) {
+            if (moment(date).format("YYYY-MM-DD") < moment(new Date()).format("YYYY-MM-DD")) {
+              return "point";
+            }
           }
         }}
         onClickDay={(date, event) => {
@@ -72,12 +128,19 @@
           })
           data.onClick(sendData);
         }}
+        formatDay={(locale, date) => {
+          if (mark.find((x) => x === moment(date).format("YYYY-MM-DD"))) {
+            return moment(date).format('DD') + "일 ✔";
+          } else {
+            return moment(date).format('DD') + "일"
+          }
+        }}
         tileContent={({ date, view }) => {
           return (
             <>
               <div className="calendar-data">
                 <div>
-                  <p><small>복약량</small></p>
+                  {/* <p><small>복약량</small></p> */}
                   {data['medication'].map((item, idx) => {
                     return (
                       item['xName'] === moment(date).format("YYYY-MM-DD") ? item['sum'] + '/' + item['total'] : null
@@ -86,7 +149,7 @@
                 </div>
                 <div>
                   <div>
-                    <p><small>온도(℃)</small></p>
+                    {/* <p><small>온도(℃)</small></p> */}
                     <Temperature date={moment(date).format("YYYY-MM-DD")} />
                   </div>
                 </div>
client/views/component/chart/Chart8.jsx
--- client/views/component/chart/Chart8.jsx
+++ client/views/component/chart/Chart8.jsx
@@ -97,7 +97,6 @@
     // Set data
     yAxis.data.setAll(data);
     series.data.setAll(data);
-    sortCategoryAxis();
 
     // Get series item by category
     function getSeriesItem(category) {
@@ -114,48 +113,6 @@
       xAxis: xAxis,
       yAxis: yAxis
     }));
-
-
-    // Axis sorting
-    function sortCategoryAxis() {
-
-      // Sort by value
-      series.dataItems.sort(function (x, y) {
-        return x.get("valueX") - y.get("valueX"); // descending
-        //return y.get("valueY") - x.get("valueX"); // ascending
-      })
-
-      // Go through each axis item
-      am5.array.each(yAxis.dataItems, function (dataItem) {
-        // get corresponding series item
-        let seriesDataItem = getSeriesItem(dataItem.get("category"));
-
-        if (seriesDataItem) {
-          // get index of series data item
-          let index = series.dataItems.indexOf(seriesDataItem);
-          // calculate delta position
-          let deltaPosition = (index - dataItem.get("index", 0)) / series.dataItems.length;
-          // set index to be the same as series data item index
-          dataItem.set("index", index);
-          // set deltaPosition instanlty
-          dataItem.set("deltaPosition", -deltaPosition);
-          // animate delta position to 0
-          dataItem.animate({
-            key: "deltaPosition",
-            to: 0,
-            duration: 1000,
-            easing: am5.ease.out(am5.ease.cubic)
-          })
-        }
-      });
-
-      // Sort axis items by index.
-      // This changes the order instantly, but as deltaPosition is set,
-      // they keep in the same places and then animate to true positions.
-      yAxis.dataItems.sort(function (x, y) {
-        return x.get("index") - y.get("index");
-      });
-    }
 
     // Make stuff animate on load
     // https://www.amcharts.com/docs/v5/concepts/animations/
client/views/layout/Header.jsx
--- client/views/layout/Header.jsx
+++ client/views/layout/Header.jsx
@@ -16,15 +16,51 @@
   //App Title
   const [title, setTitle] = React.useState('');
 
+  //전체 대상자(시니어) 수 조회
+  const [seniorCount, setSeniorCount] = React.useState(0);
+  const governmentSeniorCountTotal = () => {
+    fetch("/stats/governmentSeniorCount.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({
+        'government_id': state.loginUser['government_id'],
+      }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("전체 대상자(시니어) 수 조회 : ", data);
+      setSeniorCount(data);
+    }).catch((error) => {
+      console.log('governmentSeniorCount() /stats/governmentSeniorCount.json error : ', error);
+    });
+  }
+  const agencySeniorCountTotal = () => {
+    fetch("/stats/agencySeniorCount.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({ 'agency_id': state.loginUser['agency_id'] }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("전체 대상자(시니어) 수 조회 : ", data);
+      setSeniorCount(data);
+    }).catch((error) => {
+      console.log('agencySeniorCount() /stats/agencySeniorCount.json error : ', error);
+    });
+  }
+
   React.useEffect(() => {
     if (state.loginUser['authority'] == 'ROLE_ADMIN') {
       setTitle('올잇메디');
     } else if (state.loginUser['authority'] == 'ROLE_GOVERNMENT') {
       setTitle(state.loginUser['government_name']);
+      governmentSeniorCountTotal();
     } else if (state.loginUser['authority'] == 'ROLE_AGENCYADMIN') {
       setTitle(state.loginUser['agency_name']);
+      agencySeniorCountTotal();
     } else if (state.loginUser['authority'] == 'ROLE_AGENCY') {
       setTitle(state.loginUser['agency_name']);
+      agencySeniorCountTotal();
     } else if (state.loginUser['authority'] == 'ROLE_GUARDIAN') {
       setTitle('보호자');
     }
@@ -39,12 +75,26 @@
             : null}
           <img src={logo} alt="" />
         </h1>
-        <span className="page-title-span">{title}</span>
+        <p className="page-title-span">
+          {title}
+          {state.loginUser['authority'] == 'ROLE_GOVERNMENT' || state.loginUser['authority'] == 'ROLE_AGENCYADMIN' ?
+            <span className="page-title-inner-span">
+              전체 대상자 {seniorCount}명
+            </span>
+            : state.loginUser['authority'] == 'ROLE_AGENCY' ?
+              <span className="page-title-inner-span">
+                나의 돌봄 대상자 {seniorCount}명
+              </span>
+              : null
+          }
+        </p>
         <div className="page-title flex flex-align">
           {/* <MenuIcon /> */}
           <div className="info-wrap flex">
             {/* <div className="usericon"><PersonIcon sx={{ width:48, height:48,}} /></div> */}
-            <p className="header-info-id">{state.loginUser['user_name']}({state.loginUser['user_id']})</p>
+            <p className="header-info-id">
+              {state.loginUser['user_name']}({state.loginUser['user_id']})
+            </p>
           </div>
           <Weather />
         </div>
client/views/pages/healthcare/Healthcare.jsx
--- client/views/pages/healthcare/Healthcare.jsx
+++ client/views/pages/healthcare/Healthcare.jsx
@@ -15,6 +15,7 @@
 
   //전역 변수 저장 객체
   const state = useSelector((state) => { return state });
+  const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'];
 
   //검색(엔터)
   const searchingEnter = (key) => {
@@ -119,6 +120,7 @@
         for (let i = data.length - 1; i >= data.length - 3; i--) {
           let sum = 0;      // 실제 복약량
           let counter = 0;  // 복약해야하는 양
+          let percent = 0;
           let chartData = {
             xName: data[i]['medication_default_date']
           };
@@ -133,7 +135,8 @@
               continue;
             }
           }
-          _stackChartData.push({ "sum": sum, "total": counter })
+          percent = sum / counter;
+          _stackChartData.push({ "sum": sum, "total": counter, "percent": percent })
         }
         seniorNum.seniorMedicationList = _stackChartData;
       }
@@ -157,7 +160,6 @@
       },
       body: JSON.stringify(seniorNum),
     }).then((response) => response.json()).then((data) => {
-      console.log("seniorTemperatureListByDay data : ", data);
       setSeniorTemperatureListByDay(data);
 
       if (CommonUtil.isEmpty(data) == false) {
@@ -178,7 +180,6 @@
         }
 
         seniorNum.seniorTemperatureList = _stackTemperatureData;
-        console.log('_stackTemperatureData : ', _stackTemperatureData);
       }
     }).catch((error) => {
       console.log('seniorTemperatureSelectListByDay() /user/seniorTemperatureSelectListByDay.json error : ', error);
@@ -198,13 +199,11 @@
       }
     }
 
-    console.log(">>", seniorTemperature)
-
     if (seniorTemperature.length > 0) {
       return (
         seniorTemperature.map((item, idx) => {
           return (
-            <td>{item}</td>
+            <td className={riskStandard['risk_standard_start_value'] <= item || riskStandard['risk_standard_end_value'] >= item ? "red" : null}>{item}</td>
           )
         })
       )
@@ -215,7 +214,30 @@
     }
   }
 
+  //위험 기준 목록 정보
+  const [riskStandard, setRiskStandard] = React.useState([]);
+  //위험 기준 목록 조회
+  const riskStandardSelectList = () => {
+    fetch("/danger/riskStandardSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({ government_id: defaultGovernmentId }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("위험 기준 목록 조회 결과(건수) : ", data);
+      data.map((item, idx) => {
+        if (item['risk_standard_type'] = "TEMP") {
+          setRiskStandard(item);
+        }
+      })
+    }).catch((error) => {
+      console.log('riskStandardSelectList() /danger/riskStandardSelectList.json error : ', error);
+    });
+  }
+
   React.useEffect(() => {
+    riskStandardSelectList();
     searching();
   }, []);
 
@@ -268,7 +290,7 @@
                     item['seniorMedicationList'] && item['seniorMedicationList'].length > 0 ?
                       item['seniorMedicationList'].map((date, dataIdx) => {
                         return (
-                          <td data-label="최근복약률">
+                          <td data-label="최근복약률" className={date['percent'] < 0.5 ? "red" : null}>
                             {date['sum']}/{date['total']}
                           </td>
                         )
client/views/pages/healthcare/HealthcareAdmin.jsx
--- client/views/pages/healthcare/HealthcareAdmin.jsx
+++ client/views/pages/healthcare/HealthcareAdmin.jsx
@@ -15,6 +15,7 @@
 
   //전역 변수 저장 객체
   const state = useSelector((state) => { return state });
+  const defaultGovernmentId = CommonUtil.isEmpty(state.loginUser) ? null : state.loginUser['government_id'];
 
   //검색(엔터)
   const searchingEnter = (key) => {
@@ -119,6 +120,7 @@
         for (let i = data.length - 1; i >= data.length - 3; i--) {
           let sum = 0;      // 실제 복약량
           let counter = 0;  // 복약해야하는 양
+          let percent = 0;
           let chartData = {
             xName: data[i]['medication_default_date']
           };
@@ -133,7 +135,8 @@
               continue;
             }
           }
-          _stackChartData.push({ "sum": sum, "total": counter })
+          percent = sum / counter;
+          _stackChartData.push({ "sum": sum, "total": counter, "percent": percent })
         }
         seniorNum.seniorMedicationList = _stackChartData;
       }
@@ -157,7 +160,6 @@
       },
       body: JSON.stringify(seniorNum),
     }).then((response) => response.json()).then((data) => {
-      console.log("seniorTemperatureListByDay data : ", data);
       setSeniorTemperatureListByDay(data);
 
       if (CommonUtil.isEmpty(data) == false) {
@@ -178,14 +180,13 @@
         }
 
         seniorNum.seniorTemperatureList = _stackTemperatureData;
-        console.log('_stackTemperatureData : ', _stackTemperatureData);
       }
     }).catch((error) => {
       console.log('seniorTemperatureSelectListByDay() /user/seniorTemperatureSelectListByDay.json error : ', error);
     });
   };
 
-  const Temperature = ({data}) => {
+  const Temperature = ({ data }) => {
     let seniorTemperature = [];
     if (data['seniorTemperatureList'] && data['seniorTemperatureList'].length > 0) {
       data['seniorTemperatureList'].map((data, dataIdx) => {
@@ -198,13 +199,11 @@
       }
     }
 
-    console.log(">>", seniorTemperature)
-
     if (seniorTemperature.length > 0) {
       return (
         seniorTemperature.map((item, idx) => {
           return (
-            <td>{item}</td>
+            <td className={riskStandard['risk_standard_start_value'] <= item || riskStandard['risk_standard_end_value'] >= item ? "red" : null}>{item}</td>
           )
         })
       )
@@ -215,7 +214,30 @@
     }
   }
 
+  //위험 기준 목록 정보
+  const [riskStandard, setRiskStandard] = React.useState([]);
+  //위험 기준 목록 조회
+  const riskStandardSelectList = () => {
+    fetch("/danger/riskStandardSelectList.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({ government_id: defaultGovernmentId }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("위험 기준 목록 조회 결과(건수) : ", data);
+      data.map((item, idx) => {
+        if (item['risk_standard_type'] = "TEMP") {
+          setRiskStandard(item);
+        }
+      })
+    }).catch((error) => {
+      console.log('riskStandardSelectList() /danger/riskStandardSelectList.json error : ', error);
+    });
+  }
+
   React.useEffect(() => {
+    riskStandardSelectList();
     searching();
   }, []);
 
@@ -268,7 +290,7 @@
                     item['seniorMedicationList'] && item['seniorMedicationList'].length > 0 ?
                       item['seniorMedicationList'].map((date, dataIdx) => {
                         return (
-                          <td data-label="최근복약률">
+                          <td data-label="최근복약률" className={date['percent'] < 0.5 ? "red" : null}>
                             {date['sum']}/{date['total']}
                           </td>
                         )
client/views/pages/healthcare/HealthcareSelectOne.jsx
--- client/views/pages/healthcare/HealthcareSelectOne.jsx
+++ client/views/pages/healthcare/HealthcareSelectOne.jsx
@@ -393,33 +393,36 @@
 
 
   const DateMedication = () => {
-    var clickDayMedication = [];
+    var clickDayMedication = {};
+    var clcikDaymedicationCount = 0;
     medicationData.map((item, idx) => {
       if (item['xName'] === visitDate) {
         seniorMedicationList.map((time, idx) => {
-          clickDayMedication.push(item[time]);
+          clickDayMedication[time] = item[time];
+          clcikDaymedicationCount += item[time];
         })
       }
     })
+    var keys = Object.keys(clickDayMedication);
     return (
       <>
         <tr>
           <th rowSpan={2}>복약량</th>
-          {seniorMedicationList.map((item, idx) => {
-            return (
-              <th>
-                {item == 'DAWN' ? '식전' : item == 'MORNING' ? '아침' : item == 'AFTERNOON' ? '점심' : item == 'NIGHT' ? '저녁' : item == 'MIDNIGHT' ? '취침' : null}
-              </th>
-            )
-          })}
+          {'DAWN' in clickDayMedication ? <th>식전</th> : null}
+          {'MORNING' in clickDayMedication ? <th>아침</th> : null}
+          {'AFTERNOON' in clickDayMedication ? <th>점심</th> : null}
+          {'NIGHT' in clickDayMedication ? <th>저녁</th> : null}
+          {'MIDNIGHT' in clickDayMedication ? <th>취침</th> : null}
         </tr>
         <tr>
-          {clickDayMedication.length > 0 ? (
-            clickDayMedication.map((item) => {
-              return (
-                <td>{item}</td>
-              )
-            })
+          {clcikDaymedicationCount > 0 ? (
+            <>
+              {'DAWN' in clickDayMedication ? <td>{clickDayMedication['DAWN']}</td> : null}
+              {'MORNING' in clickDayMedication ? <td>{clickDayMedication['MORNING']}</td> : null}
+              {'AFTERNOON' in clickDayMedication ? <td>{clickDayMedication['AFTERNOON']}</td> : null}
+              {'NIGHT' in clickDayMedication ? <td>{clickDayMedication['NIGHT']}</td> : null}
+              {'MIDNIGHT' in clickDayMedication ? <td>{clickDayMedication['MIDNIGHT']}</td> : null}
+            </>
           ) : <td colSpan={seniorMedicationList.length}>정보가 없습니다.</td>}
         </tr>
       </>
client/views/pages/main/Main.jsx
--- client/views/pages/main/Main.jsx
+++ client/views/pages/main/Main.jsx
@@ -20,161 +20,161 @@
 import CommonUtil from "../../../resources/js/CommonUtil.js";
 
 export default function Main() {
-
-
-    //관리자 메인 페이지 장비 통계 데이터
-	const [adminMainEquipment, setAdminMainEquipment] = React.useState({
-        today: CommonUtil.getDate(),
-        newEquipmentInquiryCount: 0,
-        newEquipmentCount: 0,
-        stockEquipmentCount: 0,
-        deliveryEquipmentCount: 0,
+  //관리자 메인 페이지 장비 통계 데이터
+  const [adminMainEquipment, setAdminMainEquipment] = React.useState({
+    today: CommonUtil.getDate(),
+    newEquipmentInquiryCount: 0,
+    newEquipmentCount: 0,
+    stockEquipmentCount: 0,
+    deliveryEquipmentCount: 0,
+  });
+  //관리자 메인 페이지 장비 통계 데이터 조회
+  const adminMainEquipmentSelect = () => {
+    fetch("/equipment/adminMainEquipmentSelect.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({}),
+    }).then((response) => response.json()).then((data) => {
+      console.log("관리자 메인 페이지 장비 통계 데이터 조회 : ", data);
+      setAdminMainEquipment(data);
+    }).catch((error) => {
+      console.log('adminMainEquipmentSelect() /equipment/adminMainEquipmentSelect.json error : ', error);
     });
-	//관리자 메인 페이지 장비 통계 데이터 조회
-	const adminMainEquipmentSelect = () => {
-		fetch("/equipment/adminMainEquipmentSelect.json", {
-			method: "POST",
-			headers: {
-			    'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify({}),
-		}).then((response) => response.json()).then((data) => {
-			console.log("관리자 메인 페이지 장비 통계 데이터 조회 : ", data);
-			setAdminMainEquipment(data);
-		}).catch((error) => {
-			console.log('adminMainEquipmentSelect() /equipment/adminMainEquipmentSelect.json error : ', error);
-		});
-	};
+  };
 
-    //달력에 색칠할 날짜 목록 ex) ['2023-04-17', '2023-05-17', ...]
-    const [selectDate, setSelectDate] = React.useState(adminMainEquipment.today);
-    //달력에 색칠할 날짜 목록 ex) ['2023-04-17', '2023-05-17', ...]
-    const [markList, setMarkList] = React.useState([]);
-    //관리자 메인 페이지 장비 통계 데이터
-	const [equipmentCountByEventInMonth, setEquipmentCountByEventInMonth] = React.useState([]);
-    //관리자 메인 페이지 장비 통계 데이터 조회
-	const getEquipmentCountByEventInMonth = (date) => {
-        console.log('getEquipmentCountByEventInMonth date : ', date);
-		fetch("/equipment/equipmentCountByEventInMonth.json", {
-			method: "POST",
-			headers: {
-			    'Content-Type': 'application/json; charset=UTF-8'
-			},
-			body: JSON.stringify({'date': date}),
-		}).then((response) => response.json()).then((data) => {
-			console.log("관리자 메인 페이지 장비 통계 데이터 조회 : ", data);
-			setEquipmentCountByEventInMonth(data);
-            
-            let newMarkList = [];
-            for (let i = 0; i < data.length; i++) {
-                const result = data[i]['new_equipment_inquiry_count'] + data[i]['new_equipment_count'] + data[i]['delivery_equipment_count'];
-                if (result > 0) {
-                    newMarkList.push(data[i]['date'])
-                } else {
-                    continue;
-                }
-            }
-            console.log('newMarkList : ', newMarkList);
-            setMarkList(newMarkList);
-		}).catch((error) => {
-			console.log('getEquipmentCountByEventInMonth() /equipment/equipmentCountByEventInMonth.json error : ', error);
-		});
-	};
+  //달력에 색칠할 날짜 목록 ex) ['2023-04-17', '2023-05-17', ...]
+  const [selectDate, setSelectDate] = React.useState(adminMainEquipment.today);
+  //달력에 색칠할 날짜 목록 ex) ['2023-04-17', '2023-05-17', ...]
+  const [markList, setMarkList] = React.useState([]);
+  //관리자 메인 페이지 장비 통계 데이터
+  const [equipmentCountByEventInMonth, setEquipmentCountByEventInMonth] = React.useState([]);
+  //관리자 메인 페이지 장비 통계 데이터 조회
+  const getEquipmentCountByEventInMonth = (date) => {
+    console.log('getEquipmentCountByEventInMonth date : ', date);
+    fetch("/equipment/equipmentCountByEventInMonth.json", {
+      method: "POST",
+      headers: {
+        'Content-Type': 'application/json; charset=UTF-8'
+      },
+      body: JSON.stringify({ 'date': date }),
+    }).then((response) => response.json()).then((data) => {
+      console.log("관리자 메인 페이지 장비 통계 데이터 조회 : ", data);
+      setEquipmentCountByEventInMonth(data);
 
-    
+      let newMarkList = [];
+      for (let i = 0; i < data.length; i++) {
+        const result = data[i]['new_equipment_inquiry_count'] + data[i]['new_equipment_count'] + data[i]['delivery_equipment_count'];
+        if (result > 0) {
+          newMarkList.push(data[i]['date'])
+        } else {
+          continue;
+        }
+      }
+      console.log('newMarkList : ', newMarkList);
+      setMarkList(newMarkList);
+    }).catch((error) => {
+      console.log('getEquipmentCountByEventInMonth() /equipment/equipmentCountByEventInMonth.json error : ', error);
+    });
+  };
 
 
-    React.useEffect(() => {
-        adminMainEquipmentSelect();
-        getEquipmentCountByEventInMonth();
-    }, []);
 
 
-    return (
-        <main>
-            <div className="flex-start margin-bottom2">
-                <img src={tool} alt="" />
-                <TitleSmall title={"장비 및 업체 현황"} explanation={adminMainEquipment.today} />
+  React.useEffect(() => {
+    adminMainEquipmentSelect();
+    getEquipmentCountByEventInMonth();
+  }, []);
+
+
+  return (
+    <main>
+      <div className="flex-start margin-bottom2">
+        <img src={tool} alt="" />
+        <TitleSmall title={"장비 및 업체 현황"} explanation={adminMainEquipment.today} />
+      </div>
+      <div className="main-grid-admin margin-bottom2">
+        <ul className="content-box statistics-agency" background="#5f9af3">
+          <li className="flex-start">
+            <img src={error} alt="" />
+            <div className="text">
+              <p>답변 대기 문의 수</p>
+              <p className="equipcount">{adminMainEquipment.newEquipmentInquiryCount}</p>
             </div>
-            <div className="main-grid-admin margin-bottom2">
-                <ul className="content-box statistics-agency" background="#5f9af3">
-                    <li className="flex-start">
-                    <img src={error} alt="" />
-                    <div className="text">
-                        <p>답변 대기 문의 수</p>
-                        <p className="equipcount">{adminMainEquipment.newEquipmentInquiryCount}</p>
-                    </div>
-                    </li>
-                </ul>
-                <ul className="content-box statistics-agency" background="#f7acba">
-                    <li className="flex-start">
-                    <img src={box} alt="" />
-                    <div className="text">
-                        <p>신규 장비 수</p>
-                        <p className="equipcount">{adminMainEquipment.newEquipmentCount}</p>
-                    </div>
-                    </li>
-                </ul>
-                <ul className="content-box statistics-agency" background="#ebe7b9" >
-                    <li className="flex-start">
-                    <img src={exchange} alt="" />
-                    <div className="text">
-                        <p>재고 장비 수</p>
-                        <p className="equipcount">{adminMainEquipment.stockEquipmentCount}</p>
-                    </div>
-                    </li>
-                </ul>
-                <ul className="content-box statistics-agency" background="#8ef3d1">
-                    <li className="flex-start">
-                    <img src={error} alt="" />
-                    <div className="text">
-                        <p>납품 장비 수</p>
-                        <p className="equipcount">{adminMainEquipment.deliveryEquipmentCount}</p>
-                    </div>
-                    </li>
-                </ul>
+          </li>
+        </ul>
+        <ul className="content-box statistics-agency" background="#f7acba">
+          <li className="flex-start">
+            <img src={box} alt="" />
+            <div className="text">
+              <p>신규 장비 수</p>
+              <p className="equipcount">{adminMainEquipment.newEquipmentCount}</p>
+            </div>
+          </li>
+        </ul>
+        <ul className="content-box statistics-agency" background="#ebe7b9" >
+          <li className="flex-start">
+            <img src={exchange} alt="" />
+            <div className="text">
+              <p>재고 장비 수</p>
+              <p className="equipcount">{adminMainEquipment.stockEquipmentCount}</p>
+            </div>
+          </li>
+        </ul>
+        <ul className="content-box statistics-agency" background="#8ef3d1">
+          <li className="flex-start">
+            <img src={error} alt="" />
+            <div className="text">
+              <p>납품 장비 수</p>
+              <p className="equipcount">{adminMainEquipment.deliveryEquipmentCount}</p>
+            </div>
+          </li>
+        </ul>
+      </div>
+
+      <div className="main-grid-admin">
+        <div className="content-box combine-left-government3">
+          <div>
+            <div className="margin-bottom2">
+              <Calendar_agency
+                onClick={(date) => { setSelectDate(date); console.log('onclick callback value : ', date) }}
+                setDate={getEquipmentCountByEventInMonth}
+                markList={markList}
+              />
             </div>
 
-            <div className="main-grid-admin">
-                <div className="content-box combine-left-government3">
-                    <div>
-                        <div className="margin-bottom2">
-                            <Calendar_agency
-                                onClick={(date) => {setSelectDate(date);console.log('onclick callback value : ', date)}}
-                                setDate={getEquipmentCountByEventInMonth}
-                                markList={markList}
-                            />
-                        </div>
+            <table className={"agency-visitlist"}>
+              <thead>
+                <tr>
+                  <th>일자</th>
+                  <th>신규 문의 수</th>
+                  <th>신규 장비 수</th>
+                  <th>납품 장비 수</th>
+                </tr>
+              </thead>
+              <tbody>
+                {equipmentCountByEventInMonth.map((item, idx) => {
+                  return (
+                    <tr className={item['date'] == selectDate ? 'active' : null}>
+                      <td>{item['date']}</td>
+                      <td>{item['new_equipment_inquiry_count'] == 0 ? '-' : item['new_equipment_inquiry_count']}</td>
+                      <td>{item['new_equipment_count'] == 0 ? '-' : item['new_equipment_count']}</td>
+                      <td>{item['delivery_equipment_count'] == 0 ? '-' : item['delivery_equipment_count']}</td>
+                    </tr>
+                  )
+                })}
+                {CommonUtil.isEmpty(equipmentCountByEventInMonth) ?
+                  <tr>
+                    <td colSpan={4}>조회된 데이터가 없습니다</td>
+                  </tr>
+                  : null}
+              </tbody>
+            </table>
 
-                        <table className={"agency-visitlist"}>
-                            <thead>
-                                <tr>
-                                    <th>일자</th>
-                                    <th>신규 문의 수</th>
-                                    <th>신규 장비 수</th>
-                                    <th>납품 장비 수</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                {equipmentCountByEventInMonth.map((item, idx) => {return (
-                                    <tr className={item['date'] == selectDate ? 'active': null}>
-                                        <td>{item['date']}</td>
-                                        <td>{item['new_equipment_inquiry_count'] == 0 ? '-' : item['new_equipment_inquiry_count']}</td>
-                                        <td>{item['new_equipment_count'] == 0 ? '-' : item['new_equipment_count']}</td>
-                                        <td>{item['delivery_equipment_count'] == 0 ? '-' : item['delivery_equipment_count']}</td>
-                                    </tr>
-                                )})}
-                                {CommonUtil.isEmpty(equipmentCountByEventInMonth) ?
-                                    <tr>
-                                        <td colSpan={4}>조회된 데이터가 없습니다</td>
-                                    </tr> 
-                                : null}
-                            </tbody>
-                        </table>
-
-                    </div>
-                </div>
-            </div>
-        </main>
-    );
+          </div>
+        </div>
+      </div>
+    </main>
+  );
 }
client/views/pages/main/Main_agency.jsx
--- client/views/pages/main/Main_agency.jsx
+++ client/views/pages/main/Main_agency.jsx
@@ -113,25 +113,6 @@
     });
   }
 
-  //전체 대상자(시니어) 수 조회
-  const [seniorCount, setSeniorCount] = React.useState(0);
-  const agentSeniorCount = () => {
-    fetch("/stats/agentSeniorCount.json", {
-      method: "POST",
-      headers: {
-        'Content-Type': 'application/json; charset=UTF-8'
-      },
-      body: JSON.stringify({
-        'agent_id': state.loginUser['user_id'],
-      }),
-    }).then((response) => response.json()).then((data) => {
-      console.log("전체 대상자(시니어) 수 조회 : ", data);
-      setSeniorCount(data);
-    }).catch((error) => {
-      console.log('agentSeniorCount() /stats/agentSeniorCount.json error : ', error);
-    });
-  }
-
   //온도 위험 대상자(시니어) 수 조회
   const [temperatureCount, setTemperatureCount] = React.useState(0);
   const temperatureRiskCount = () => {
@@ -179,7 +160,7 @@
       headers: {
         'Content-Type': 'application/json; charset=UTF-8'
       },
-      body: JSON.stringify({ "agency_id": state.loginUser['agency_id'] }),
+      body: JSON.stringify({ "agent_id": state.loginUser['user_id'] }),
     }).then((response) => response.json()).then((data) => {
       console.log("seniorMedicationSelectListByNew : ", data);
       setMedicationSelectListByNew(data)
@@ -244,7 +225,6 @@
 
 
   React.useEffect(() => {
-    agentSeniorCount();
     temperatureRiskCount();
     batteryRiskCount();
     seniorMedicationSelectListByNew();
@@ -256,15 +236,6 @@
     <main>
       <div className="flex-start margin-bottom2"><img src={medicinebox} alt="" /><TitleSmall title={"대상자 현황"} explanation={new Date(new Date().setDate(new Date().getDate() - 1)).toLocaleDateString().replace(/\./g, '').replace(/\s/g, '-') + " 기준"} /></div>
       <div className="main-grid-agency margin-bottom2">
-        <ul className="content-box statistics-agency" background="#f7acba">
-          <li className="flex-start">
-            <img src={box} alt="" />
-            <div className="text">
-              <p>나의 돌봄 대상자</p>
-              <p className="peoplecount">{seniorCount}</p>
-            </div>
-          </li>
-        </ul>
         <ul className="content-box statistics-agency" background="#8ef3d1">
           <li className="flex-start">
             <img src={medicineAgency} alt="" />
@@ -374,7 +345,7 @@
       </div> */}
       <div className="main-grid-agency2">
         <div>
-          <div className="flex-start margin-bottom2"><img src={medicinebox} alt="" /><TitleSmall title={"시니어 복약률 순위"} /></div>
+          <div className="flex-start margin-bottom2"><img src={medicinebox} alt="" /><TitleSmall title={"시니어 복약수 순위"} /></div>
           <div className="content-box combine-left-government3 visitlist margin-bottom2">
             {
               medicationSelectListByNew.length > 0 ?
client/views/pages/main/Main_agencyAdmin.jsx
--- client/views/pages/main/Main_agencyAdmin.jsx
+++ client/views/pages/main/Main_agencyAdmin.jsx
@@ -57,25 +57,6 @@
     });
   }
 
-  //전체 대상자(시니어) 수 조회
-  const [seniorCount, setSeniorCount] = React.useState(0);
-  const seniorCountTotal = () => {
-    fetch("/stats/agencySeniorCount.json", {
-      method: "POST",
-      headers: {
-        'Content-Type': 'application/json; charset=UTF-8'
-      },
-      body: JSON.stringify({
-        'agency_id': state.loginUser['agency_id'],
-      }),
-    }).then((response) => response.json()).then((data) => {
-      console.log("전체 대상자(시니어) 수 조회 : ", data);
-      setSeniorCount(data);
-    }).catch((error) => {
-      console.log('agencySeniorCount() /stats/agencySeniorCount.json error : ', error);
-    });
-  }
-
   //온도 위험 대상자(시니어) 수 조회
   const [temperatureCount, setTemperatureCount] = React.useState(0);
   const temperatureRiskCount = () => {
@@ -238,7 +219,6 @@
 
   React.useEffect(() => {
     seniorSelectList();
-    seniorCountTotal();
     temperatureRiskCount();
     batteryRiskCount();
     visitByMonthList();
@@ -251,13 +231,6 @@
     <main>
       <div className="main-grid-government">
         <div className="sub-grid-government">
-          <ul className="content-box statistics-govern" background="#f7acba">
-            <li>
-              <p><ElderlyIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#bf0629", borderRadius: "50px" }} /></p>
-              <p>{cityName} 전체 대상자</p>
-              <p>{seniorCount}</p>
-            </li>
-          </ul>
           <ul className="content-box statistics-govern" background="#8ef3d1">
             <li>
               <p><MedicationIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#076143", borderRadius: "50px" }} /></p>
client/views/pages/main/Main_government.jsx
--- client/views/pages/main/Main_government.jsx
+++ client/views/pages/main/Main_government.jsx
@@ -53,25 +53,6 @@
     });
   }
 
-  //전체 대상자(시니어) 수 조회
-  const [seniorCount, setSeniorCount] = React.useState(0);
-  const seniorCountTotal = () => {
-    fetch("/stats/governmentSeniorCount.json", {
-      method: "POST",
-      headers: {
-        'Content-Type': 'application/json; charset=UTF-8'
-      },
-      body: JSON.stringify({
-        'government_id': state.loginUser['government_id'],
-      }),
-    }).then((response) => response.json()).then((data) => {
-      console.log("전체 대상자(시니어) 수 조회 : ", data);
-      setSeniorCount(data);
-    }).catch((error) => {
-      console.log('governmentSeniorCount() /stats/governmentSeniorCount.json error : ', error);
-    });
-  }
-
   //온도 위험 대상자(시니어) 수 조회
   const [temperatureCount, setTemperatureCount] = React.useState(0);
   const temperatureRiskCount = () => {
@@ -271,7 +252,6 @@
 
   React.useEffect(() => {
     seniorSelectList();
-    seniorCountTotal();
     temperatureRiskCount();
     batteryRiskCount();
     visitByMonthList();
@@ -285,13 +265,6 @@
     <main>
       <div className="main-grid-government">
         <div className="sub-grid-government">
-          <ul className="content-box statistics-govern" background="#f7acba">
-            <li>
-              <p><ElderlyIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#bf0629", borderRadius: "50px" }} /></p>
-              <p>{cityName} 전체 대상자</p>
-              <p>{seniorCount}</p>
-            </li>
-          </ul>
           <ul className="content-box statistics-govern" background="#8ef3d1">
             <li>
               <p><MedicationIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#076143", borderRadius: "50px" }} /></p>
@@ -303,7 +276,7 @@
             <li>
               <p><DeviceThermostatIcon sx={{ width: "50px", height: "50px", color: "#ffffff", background: "#f1de05", borderRadius: "50px" }} /></p>
               <p>{cityName} 댁내 온도 위험 대상자</p>
-              <p>{temperatureCount}</p>
+              <p className={temperatureCount > 0 ? "red" : null}>{temperatureCount}</p>
             </li>
           </ul>
           <ul className="content-box statistics-govern" background="#5f9af3">
client/views/pages/main/Main_guardian.jsx
--- client/views/pages/main/Main_guardian.jsx
+++ client/views/pages/main/Main_guardian.jsx
@@ -289,33 +289,36 @@
 
 
   const DateMedication = () => {
-    var clickDayMedication = [];
+    var clickDayMedication = {};
+    var clcikDaymedicationCount = 0;
     medicationData.map((item, idx) => {
       if (item['xName'] === visitDate) {
         seniorMedicationList.map((time, idx) => {
-          clickDayMedication.push(item[time]);
+          clickDayMedication[time] = item[time];
+          clcikDaymedicationCount += item[time];
         })
       }
     })
+    var keys = Object.keys(clickDayMedication);
     return (
       <>
         <tr>
           <th rowSpan={2}>복약량</th>
-          {seniorMedicationList.map((item, idx) => {
-            return (
-              <th>
-                {item == 'DAWN' ? '식전' : item == 'MORNING' ? '아침' : item == 'AFTERNOON' ? '점심' : item == 'NIGHT' ? '저녁' : item == 'MIDNIGHT' ? '취침' : null}
-              </th>
-            )
-          })}
+          {'DAWN' in clickDayMedication ? <th>식전</th> : null}
+          {'MORNING' in clickDayMedication ? <th>아침</th> : null}
+          {'AFTERNOON' in clickDayMedication ? <th>점심</th> : null}
+          {'NIGHT' in clickDayMedication ? <th>저녁</th> : null}
+          {'MIDNIGHT' in clickDayMedication ? <th>취침</th> : null}
         </tr>
         <tr>
-          {clickDayMedication.length > 0 ? (
-            clickDayMedication.map((item) => {
-              return (
-                <td>{item}</td>
-              )
-            })
+          {clcikDaymedicationCount > 0 ? (
+            <>
+              {'DAWN' in clickDayMedication ? <td>{clickDayMedication['DAWN']}</td> : null}
+              {'MORNING' in clickDayMedication ? <td>{clickDayMedication['MORNING']}</td> : null}
+              {'AFTERNOON' in clickDayMedication ? <td>{clickDayMedication['AFTERNOON']}</td> : null}
+              {'NIGHT' in clickDayMedication ? <td>{clickDayMedication['NIGHT']}</td> : null}
+              {'MIDNIGHT' in clickDayMedication ? <td>{clickDayMedication['MIDNIGHT']}</td> : null}
+            </>
           ) : <td colSpan={seniorMedicationList.length}>정보가 없습니다.</td>}
         </tr>
       </>
client/views/pages/org/OrgSelect.jsx
--- client/views/pages/org/OrgSelect.jsx
+++ client/views/pages/org/OrgSelect.jsx
@@ -249,7 +249,7 @@
     } else {
       agency.agency = item;
     }
-    setAgency({...agency});
+    setAgency({ ...agency });
     setIsAgencyModalOpen(true);
   };
   //시행기관 모달 닫기
@@ -698,15 +698,27 @@
             {/* <SubTitle explanation={"장비 클릭 시 지난 매칭이력을 확인할 수 있습니다."} /> */}
             <div className="btn-wrap flex-end margin-bottom ">
               {state.loginUser['authority'] == 'ROLE_ADMIN' || state.loginUser['authority'] == 'ROLE_GOVERNMENT' ?
-                <button className={"btn-small gray-btn"} onClick={() => {
-                  agency.agency['agency_id'] = null;
-                  if (CommonUtil.isEmpty(government.government['government_id']) == false) {
-                    agency.agency['government_id'] = government.government['government_id'];
-                    agency.agency['agency_type'] = government.government['government_type'];
-                  }
-                  setAgency({ ...agency });
-                  agencyModalOpen();
-                }}>등록</button>
+                <>
+                  {government.government['government_id'] != null ?
+                    <button className={"btn-small lightgray-btn"}
+                      onClick={() => {
+                        government.government = governmentInit;
+                        setGovernment({ ...government });
+                        agency.search = { currentPage: 1, perPage: 5, 'government_id': agencyInit['government_id'], 'agency_id': agencyInit['agency_id'] }
+                        setAgency({ ...agency });
+                        agencySelectList();
+                      }}>전체보기</button>
+                    : null}
+                  <button className={"btn-small gray-btn"} onClick={() => {
+                    agency.agency['agency_id'] = null;
+                    if (CommonUtil.isEmpty(government.government['government_id']) == false) {
+                      agency.agency['government_id'] = government.government['government_id'];
+                      agency.agency['agency_type'] = government.government['government_type'];
+                    }
+                    setAgency({ ...agency });
+                    agencyModalOpen();
+                  }}>등록</button>
+                </>
                 : null}
             </div>
             <table className={"senior-user protector-user"}>
client/views/pages/user_management/AgencyAdminSeniorSelect.jsx
--- client/views/pages/user_management/AgencyAdminSeniorSelect.jsx
+++ client/views/pages/user_management/AgencyAdminSeniorSelect.jsx
@@ -197,6 +197,7 @@
       }),
     }).then((response) => response.json()).then((data) => {
       closeModal();
+      setCheckList([]);
       agentSelectList();
       searching();
     }).catch((error) => {
@@ -404,7 +405,9 @@
               } />
               <div className="btn-wrap flex-end margin-bottom ">
                 <button className={"btn-small gray-btn"} onClick={modalSeniorInsertOpen}>신규등록</button>
-                <button className={"btn-small gray-btn"} onClick={() => { openModal() }}>{state.loginUser['title_name']}배정</button>
+                <button className={"btn-small gray-btn"}
+                  onClick={() => { CheckList.length > 0 ? openModal() : alert('담당자를 배정할 시니어를 선택해 주세요.') }}
+                >{state.loginUser['title_name']}배정</button>
               </div>
             </div>
             <table className={"protector-user"}>
Add a comment
List