Merge branch 'bo_sms-auto-send' into 'dev'
Bo sms auto send See merge request korea-research/korea-research!86
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.dashboard.getSmsAutoStatus.adapters.persistence.GetSmsAutoStatusMapper">
|
||||
<select id="operate"
|
||||
resultType="app.module.admin.usecase.dashboard.getSmsAutoStatus.ports.application.domain.GetSmsAutoStatus">
|
||||
/* operate : 문자 자동발송 상태 조회 */
|
||||
SELECT active,
|
||||
message,
|
||||
send_phone,
|
||||
updated_at,
|
||||
updated_by
|
||||
FROM sms_auto_status
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="app.module.admin.usecase.dashboard.updateSmsAutoStatus.adapters.persistence.UpdateSmsAutoStatusMapper" >
|
||||
<update id="operate">
|
||||
/* operate : 문자 자동 발송 활성화 상태 수정 */
|
||||
UPDATE sms_auto_status
|
||||
SET active = #{active},
|
||||
<include refid="common.fields.UpdateBaseSet" />
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -6,4 +6,30 @@
|
||||
<select id="createMonthlyInputStatus">
|
||||
select fn_monthly_input_status()
|
||||
</select>
|
||||
|
||||
<insert id="createSmsAutoSend">
|
||||
/* createSmsAutoSend : 문자 발송 insert */
|
||||
INSERT INTO biz_msg
|
||||
(
|
||||
MSG_TYPE,
|
||||
CMID,
|
||||
REQUEST_TIME,
|
||||
SEND_TIME,
|
||||
DEST_PHONE,
|
||||
SEND_PHONE,
|
||||
MSG_BODY
|
||||
)
|
||||
VALUES
|
||||
<foreach collection="sendHouseholds" item="item" separator=",">
|
||||
(
|
||||
5,
|
||||
TO_CHAR(NOW(), 'YYYYMMDDHH24MISS') || '_' || #{item.householdNum},
|
||||
NOW(),
|
||||
NOW(),
|
||||
#{item.phone},
|
||||
#{sendPhone},
|
||||
#{message}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.schedule.getIncompleteHouseholds.adapters.persistence.GetIncompleteHouseholdsMapper">
|
||||
<select id="operate"
|
||||
resultType="app.module.admin.usecase.schedule.getIncompleteHouseholds.ports.application.domain.GetIncompleteHouseholds">
|
||||
/* operate : 문자 발송 일계부 미완료된 대상자 조회 */
|
||||
SELECT h.seq,
|
||||
h.household_num,
|
||||
h.owner_name,
|
||||
h.phone
|
||||
FROM household h
|
||||
WHERE h.seq IN (
|
||||
SELECT DISTINCT dr.household_seq
|
||||
FROM daily_record dr
|
||||
WHERE dr.record_month = #{recordMonth}
|
||||
AND dr.day_group_no IN (
|
||||
SELECT ddg.group_no
|
||||
FROM daily_day_group ddg
|
||||
WHERE ddg.is_deleted = false
|
||||
AND ddg.start_day >= #{fromDay}
|
||||
AND ddg.end_day < #{toDay}
|
||||
)
|
||||
AND dr.all_status NOT IN ('DONE', 'TODAY_NONE')
|
||||
)
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -94,7 +94,7 @@
|
||||
<a aria-current="page" th:href="${topNode.uri}" >
|
||||
<img class="logo" th:src="@{/static/assets/images/common/ico_logo.svg}" alt="로고 이미지">
|
||||
</a>
|
||||
<p class="logo-tit">임가경제조사 일계부 관리자모드</p>
|
||||
<p class="logo-tit"><a th:href="${topNode.uri}">임가경제조사 일계부 관리자모드</a></p>
|
||||
</div>
|
||||
<ul class="main-menu" th:if="${topNode != null}">
|
||||
<li class="menu-item" th:each="menu : ${topNode.children}"
|
||||
|
||||
@@ -1,35 +1,423 @@
|
||||
<!DOCTYPE html>
|
||||
<html layout:decorate="~{layout/layout-home}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
<html layout:decorate="~{layout/layout-home}"
|
||||
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
xmlns:sec="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<title>관리자 수정</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<section layout:fragment="content">
|
||||
<hgroup class="page-tit-group">
|
||||
<h2 class="page-tit">
|
||||
2025년 6월 현황
|
||||
</h2>
|
||||
<div class="table-tit-group large">
|
||||
<div class="component-select">
|
||||
<select class="select-list" required>
|
||||
<option value="" disabled hidden>선택해주세요.</option>
|
||||
<option value="value1" selected>전체</option>
|
||||
<option value="value2">Option 2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</hgroup>
|
||||
<div class="content-inner">
|
||||
<section class="dounut-chart-area">
|
||||
<div class="chart-group type-green">
|
||||
<dl>
|
||||
<dt>
|
||||
<strong>일계부 진행률</strong>
|
||||
<span>(전체 임가 기준)</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<strong class="percent">50</strong>
|
||||
<span class="d-flex">
|
||||
<span>1006</span>
|
||||
/
|
||||
<span>1476</span>
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="donut-chart" style="--percent: 50;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="p-5 mb-4 bg-light rounded-3">
|
||||
<div class="container-fluid py-5">
|
||||
<h1 class="display-5 fw-bold">안녕하세요, <span class="text-muted"
|
||||
sec:authentication="name"></span> :-)</h1>
|
||||
<p class="col-md-8 fs-4">
|
||||
관리자 메인에 오신걸 환영합니다. <span class="text-muted" sec:authentication="name"></span> 님께 부여된 역할에 따라
|
||||
메뉴이용이
|
||||
제한되는 점에 유의해주세요.
|
||||
</p>
|
||||
<div class="chart-group type-blue">
|
||||
<dl>
|
||||
<dt>
|
||||
<strong>일계부 진행률</strong>
|
||||
<span>(전체 임가 기준)</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<strong class="percent">68</strong>
|
||||
<span class="d-flex">
|
||||
<span>1006</span>
|
||||
/
|
||||
<span>1476</span>
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="donut-chart" style="--percent: 68;">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="chart-group type-orange">
|
||||
<dl>
|
||||
<dt>
|
||||
<strong>일계부 진행률</strong>
|
||||
<span>(전체 임가 기준)</span>
|
||||
</dt>
|
||||
<dd>
|
||||
<strong class="percent">48</strong>
|
||||
<span class="d-flex">
|
||||
<span>1006</span>
|
||||
/
|
||||
<span>1476</span>
|
||||
</span>
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="donut-chart" style="--percent: 48;">
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<div class="table-group">
|
||||
<div class="table-tit-group large">
|
||||
<h3>
|
||||
지방실사별 진행현황
|
||||
</h3>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
실사
|
||||
</th>
|
||||
<th>임계부 진행률</th>
|
||||
<th>현장 방문률(1차)</th>
|
||||
<th>답례품 전달률</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>서울</td>
|
||||
<td>
|
||||
<div class="progress-group type-green">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-blue">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-orange">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>강원</td>
|
||||
<td>
|
||||
<div class="progress-group type-green">
|
||||
<progress class="progress" value="35" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">35</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-blue">
|
||||
<progress class="progress" value="55" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">55</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-orange">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="total">
|
||||
<td>전체</td>
|
||||
<td>
|
||||
<span>68</span>%
|
||||
</td>
|
||||
<td>
|
||||
<span>68</span>%
|
||||
</td>
|
||||
<td>
|
||||
<span>68</span>%
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="table-group">
|
||||
<div class="table-tit-group large">
|
||||
<h3>
|
||||
조사원별 진행 현황
|
||||
</h3>
|
||||
<div class="component-select">
|
||||
<select class="select-list" required>
|
||||
<option value="" disabled hidden>선택해주세요.</option>
|
||||
<option value="value1" selected>전체</option>
|
||||
<option value="value2">Option 2</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<colgroup>
|
||||
<col width="8%"/>
|
||||
<col width="8%"/>
|
||||
<col width="8%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
<col width="25%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>조사원명</th>
|
||||
<th>실사</th>
|
||||
<th>할당 임가 수</th>
|
||||
<th>임계부 진행률</th>
|
||||
<th>현장 방문률(1차)</th>
|
||||
<th>답례품 전달률</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="">김조사</a>
|
||||
</td>
|
||||
<td>서울</td>
|
||||
<td>24</td>
|
||||
<td>
|
||||
<div class="progress-group type-green">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-blue">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-orange">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="">김조사</a>
|
||||
</td>
|
||||
<td>서울</td>
|
||||
<td>24</td>
|
||||
<td>
|
||||
<div class="progress-group type-green">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-blue">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="progress-group type-orange">
|
||||
<progress class="progress" value="85" min="0" max="100"></progress>
|
||||
<div class="detail">
|
||||
<p class="percent">85</p>
|
||||
<span class="d-flex">
|
||||
(
|
||||
<span>66</span>
|
||||
/
|
||||
<span>78</span>
|
||||
)
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section th:if="${loginUserRoles.id == 'ROLE_ADMIN'}">
|
||||
<div class="table-group">
|
||||
<div class="table-tit-group large">
|
||||
<h3>
|
||||
문자 발송 체크
|
||||
</h3>
|
||||
</div>
|
||||
<button type="button" class="btn small">
|
||||
<span class="btn-txt">
|
||||
<label class="radio-inner">
|
||||
<input type="checkbox" id="smsAutoSend" th:checked="${smsActive}"
|
||||
onclick="smsAutoSendConfirm(this);">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">문자 자동 발송</span>
|
||||
</span>
|
||||
</label>
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<p class="col-md-8 fs-5">
|
||||
<span>역할</span>
|
||||
<span class="text-muted"
|
||||
th:each="role, status : ${loginUserRoles}"
|
||||
th:text="${role.getId()} + ' (' + ${role.description} + ')' + ${!status.last ? ', ': ''}"></span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</body>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script>
|
||||
/**
|
||||
* 문자 발송 체크 스크립트
|
||||
* */
|
||||
|
||||
// 문자 자동 발송 컨펌창
|
||||
const smsAutoSendConfirm = (el) => {
|
||||
let message = el.checked ? '문자 자동 발송 기능을 사용하시겠습니까?' : '문자 자동 발송 기능을 중지하시겠습니까?';
|
||||
|
||||
etUI.dialog.confirm({
|
||||
title: '문자 자동 발송 안내',
|
||||
message: message,
|
||||
negativeCallback: function () {
|
||||
$(el).prop('checked', !el.checked);
|
||||
},
|
||||
positiveCallback: function () {
|
||||
updateSmsAutoStatusActive(el.checked);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 문자 자동 발송 기능 활성화
|
||||
const updateSmsAutoStatusActive = (active) => {
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/smsAutoStatus/update',
|
||||
JSON.stringify({
|
||||
active: active,
|
||||
}),
|
||||
() => {
|
||||
$('#smsAutoSend').prop('checked', active);
|
||||
},
|
||||
(code, rstData) => {
|
||||
if(code == 422) alert(rstData.responseText);
|
||||
$('#smsAutoSend').prop('checked', !active);
|
||||
},
|
||||
'patch',
|
||||
'json',
|
||||
{ handle422Type: 'alert' }
|
||||
);
|
||||
}
|
||||
</script>
|
||||
</section>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -4,23 +4,26 @@
|
||||
<head th:replace="~{common/components :: head}"></head>
|
||||
|
||||
<body>
|
||||
<header th:replace="~{common/components :: header}"></header>
|
||||
<div id="wrap">
|
||||
<header th:replace="~{common/components :: header}"></header>
|
||||
|
||||
<div id="container">
|
||||
|
||||
<div id="content" role="main">
|
||||
<div class="inner">
|
||||
<div class="content-inner">
|
||||
<div th:replace="~{common/components :: operationMessage}"></div>
|
||||
<div style="display: flex; justify-content: space-evenly;align-items: center; width:100%; background: #DEE2E6; height: 500px; font-size: 16px;">
|
||||
<section class="container" layout:fragment="content">
|
||||
<div th:replace="~{common/components :: operationMessage}"></div>
|
||||
<div class="content-inner">
|
||||
<section layout:fragment="content">
|
||||
page content
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="~{common/components :: footer}"></div>
|
||||
|
||||
<section layout:fragment="script"></section>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user