Merge branch 'dev' into deploy-dev-admin
This commit is contained in:
@@ -51,7 +51,7 @@ public class AdminUtil {
|
||||
}
|
||||
|
||||
AdminUser user = (AdminUser) authentication.getPrincipal();
|
||||
return user.getRegionMainCode().isEmpty() ? null : user.getRegionMainCode();
|
||||
return user.getRegionMainCode() == null ? null : user.getRegionMainCode();
|
||||
}
|
||||
|
||||
public static String getLoginUserLastIp() {
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LocalRegionResearcherPercentDto {
|
||||
private Long seq;
|
||||
private String researcherName;
|
||||
private String regionMainCodeName;
|
||||
private Double totalHouseholdCount;
|
||||
|
||||
@@ -41,8 +41,8 @@ class GetHouseholdsStatusController {
|
||||
reqVO.getResearcherValue(),
|
||||
reqVO.getIsPanel(),
|
||||
AdminUtil.getLoginUserSeq(),
|
||||
reqVO.getUserRole(),
|
||||
reqVO.getUserRegionMainCode(),
|
||||
AdminUtil.getLoginUserRole(),
|
||||
AdminUtil.getLoginUserRegionMainCode(),
|
||||
Boolean.TRUE)));
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,4 @@ public class GetHouseholdsStatusReqVO {
|
||||
private String researcherValue;
|
||||
// 패널 유지 여부
|
||||
private Boolean isPanel;
|
||||
// 로그인한 유저 역할
|
||||
private String userRole;
|
||||
// 로그인한 유저 실사 지역
|
||||
private String userRegionMainCode;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
and h.usage_type = #{usageType}
|
||||
</if>
|
||||
LEFT JOIN household_visit hv
|
||||
ON hv.household_seq = h.seq AND hv.is_deleted = false
|
||||
ON hv.household_seq = h.seq AND hv.is_deleted = false AND to_char(hv.visit_date,'YYYYMM') = #{recordMonth}
|
||||
LEFT JOIN v_monthly_completion_rate v
|
||||
ON v.household_seq = h.seq AND v.record_month = #{recordMonth}
|
||||
WHERE u.parent_id = 'code.region.main' and u.in_use = true
|
||||
@@ -81,6 +81,7 @@
|
||||
|
||||
<select id="selectLocalRegionResearcherPercentage">
|
||||
SELECT
|
||||
a.seq,
|
||||
NULLIF(a.name,'-') AS researcher_name,
|
||||
u.code_text AS region_main_code_name,
|
||||
COUNT(DISTINCT h.seq) AS total_household_count,
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button class="btn" onclick="showAdminExcelUploadModal();" type="button" th:unless="${activeProfile != 'local'}">
|
||||
<button class="btn" onclick="showAdminExcelUploadModal();" type="button">
|
||||
<span class="btn-txt">엑셀 업로드</span>
|
||||
</button>
|
||||
<!-- <button class="btn" onclick="goExcel();" type="button"><span class="btn-txt" th:unless="${activeProfile != 'local'}">엑셀 다운로드</span></button>-->
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:sec="http://www.w3.org/1999/xhtml"
|
||||
xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<section layout:fragment="content" th:unless="${activeProfile != 'local'}">
|
||||
<section layout:fragment="content">
|
||||
<div class="d-flex-tit">
|
||||
<hgroup class="page-tit-group">
|
||||
<h2 class="page-tit" id="recordMonthText">
|
||||
@@ -274,7 +274,7 @@
|
||||
`
|
||||
<tr>
|
||||
<td>
|
||||
<a href="">${ct.researcherName}</a>
|
||||
<a href="/researcher/${ct.seq}">${ct.researcherName}</a>
|
||||
</td>
|
||||
<td>${ct.regionMainCodeName}</td>
|
||||
<td>${ct.totalHouseholdCount}</td>
|
||||
@@ -347,7 +347,7 @@
|
||||
`
|
||||
<tr>
|
||||
<td>
|
||||
<a href="">${ct.researcherName}</a>
|
||||
<a href="/researcher/${ct.seq}">${ct.researcherName}</a>
|
||||
</td>
|
||||
<td>${ct.regionMainCodeName}</td>
|
||||
<td>${ct.totalHouseholdCount}</td>
|
||||
@@ -405,9 +405,9 @@
|
||||
const activeProfile = '[[${activeProfile}]]';
|
||||
// 페이지 로드 시 호출
|
||||
$(document).ready(function() {
|
||||
if(activeProfile === 'local'){
|
||||
getTotalPercentage();
|
||||
}
|
||||
|
||||
getTotalPercentage();
|
||||
|
||||
$('#usageType').change(function() {
|
||||
getTotalPercentage();
|
||||
});
|
||||
|
||||
@@ -9,9 +9,6 @@
|
||||
<input name="page" th:field="*{page}" type="hidden"/>
|
||||
<input name="size" th:field="*{size}" type="hidden"/>
|
||||
|
||||
<input name="userRole" th:value="${userRole}" type="hidden"/>
|
||||
<input name="userRegionMainCode" th:value="${userRegionMainCode}" type="hidden"/>
|
||||
|
||||
<div class="content-inner">
|
||||
<!-- 필터 영역 -->
|
||||
<section class="filter-wrap">
|
||||
@@ -270,10 +267,10 @@
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn" onclick="showExcelHouseholdModal();" th:unless="${activeProfile != 'local'}">
|
||||
<span class="btn-txt">엑셀 업로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
<button type="button" class="btn" onclick="showExcelHouseholdModal();" >
|
||||
<span class="btn-txt">엑셀 업로드</span>
|
||||
</button>
|
||||
<button type="button" class="btn" onclick="showExcelDownloadModal();" th:unless="${activeProfile != 'local'}">
|
||||
<button type="button" class="btn" onclick="showExcelDownloadModal();">
|
||||
<span class="btn-txt">엑셀 다운로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
</button>
|
||||
<!-- 관리자만 노출 -->
|
||||
@@ -305,6 +302,8 @@
|
||||
const selectedIndustryLargeCode = /*[[${reqVO.industryLargeCode}]]*/ '';
|
||||
const selectedIndustryMiddleCode= /*[[${reqVO.industryMiddleCode}]]*/ '';
|
||||
|
||||
const userRole = /*[[${userRole}]]*/ '';
|
||||
|
||||
$(document).ready(function () {
|
||||
// 지역, 세부지역 셀렉트박스 세팅
|
||||
setSelectBoxUiCode({
|
||||
@@ -382,7 +381,7 @@
|
||||
|
||||
|
||||
// 현재 로그인한 유저의 역할
|
||||
const isResearcher = f.userRole.value === 'ROLE_RESEARCHER';
|
||||
const isResearcher = userRole === 'ROLE_RESEARCHER';
|
||||
const colspanLength = isResearcher ? 13 : 15;
|
||||
|
||||
// 조사원일 경우 조사원이름, 번호 칼럼 hide
|
||||
|
||||
@@ -476,7 +476,7 @@
|
||||
if (response.monthlyCarryOver != null) {
|
||||
$('#carryOver').text(Number(response.monthlyCarryOver).toLocaleString() + '원');
|
||||
} else {
|
||||
$('#carryOver').text('계산중입니다.');
|
||||
$('#carryOver').text('정산중입니다.');
|
||||
}
|
||||
$('._monthlyCarryOver').show();
|
||||
} else {
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
let $tab = $('.component-tab button[data-tab-value="' + tabActive + '"]');
|
||||
|
||||
getTabData($tab.data('tabType'), $tab.data('tabValue'));
|
||||
}, 100);
|
||||
}, 500);
|
||||
});
|
||||
|
||||
$('.select-tab').on('click', function () {
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<input type="hidden" name="currentMonth" th:value="${currentMonth}">
|
||||
<input type="hidden" name="isPaging">
|
||||
|
||||
<div class="component-tab" data-active="none">
|
||||
<div class="component-tab" data-active="tab1">
|
||||
<div class="tab-head">
|
||||
<button type="button" class="tab-label" data-tab-type="household" data-tab-value="tab1">담당 임가 목록</button>
|
||||
<button type="button" class="tab-label" data-tab-type="household-visit" data-tab-value="tab2">임가방문정보</button>
|
||||
@@ -77,7 +77,7 @@
|
||||
<input name="adminSeq" th:field="${researcherDto.seq}" type="hidden"/>
|
||||
|
||||
<div class="tab-body">
|
||||
<div class="tab-content" data-tab-value="tab1">
|
||||
<div class="tab-content" data-tab-value="none">
|
||||
<div class="content-inner">
|
||||
<section class="table-group">
|
||||
<div class="table-tit-group">
|
||||
@@ -236,7 +236,7 @@
|
||||
let $tab = $('.component-tab button[data-tab-value="' + tabActive + '"]');
|
||||
|
||||
getTabData($tab.data('tabType'), $tab.data('tabValue'));
|
||||
}, 100);
|
||||
}, 500);
|
||||
});
|
||||
|
||||
const getTabData = (tabType, tabValue) => {
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
<div class="row paging"></div>
|
||||
|
||||
<div class="component-btns bottom-btn-group" th:unless="${activeProfile != 'local'}">
|
||||
<div class="component-btns bottom-btn-group" >
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn" onclick="goExcel();">
|
||||
<span class="btn-txt">엑셀 다운로드 <i class="ico-download ico-small" aria-hidden="true"></i></span>
|
||||
|
||||
@@ -59,9 +59,7 @@
|
||||
<div class="detail-tit-area">
|
||||
<p class="tit">일계부 등록 기본</p>
|
||||
</div>
|
||||
<span class="deatil-txt">
|
||||
|
||||
</span>
|
||||
<span class="deatil-txt"></span>
|
||||
<div class="detail-step">
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -915,7 +915,7 @@
|
||||
<li>
|
||||
<p class="label">월초이월금</p>
|
||||
{{if carryOver == null}}
|
||||
<p class="value">계산중입니다.</p>
|
||||
<p class="value">정산중입니다.</p>
|
||||
{{else}}
|
||||
<p class="value"><em><b>{{:carryOver}}</b> 원</em></p>
|
||||
{{/if}}
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="EXPENSE"
|
||||
th:disabled="${not btnActive}"
|
||||
th:checked="${#strings.equals(dailyRecord.expenseStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||
th:checked="${#strings.equals(dailyRecord.expenseStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}"
|
||||
onchange="modalControl.showTodayNoneAlert(this)">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -466,6 +467,23 @@
|
||||
|
||||
ajaxUtil._hideWaiting();
|
||||
},
|
||||
showTodayNoneAlert(checkbox){
|
||||
if (checkbox.checked) {
|
||||
etUI.dialog.alert({
|
||||
message: '금일 등록내용 없음을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}else{
|
||||
etUI.dialog.alert({
|
||||
message: '등록을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="FARMING"
|
||||
th:disabled="${not btnActive}"
|
||||
th:checked="${#strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||
th:checked="${#strings.equals(dailyRecord.farmingStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}"
|
||||
onchange="modalControl.showTodayNoneAlert(this)">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -216,6 +217,23 @@
|
||||
},
|
||||
);
|
||||
},
|
||||
showTodayNoneAlert(checkbox){
|
||||
if (checkbox.checked) {
|
||||
etUI.dialog.alert({
|
||||
message: '금일 등록내용 없음을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}else{
|
||||
etUI.dialog.alert({
|
||||
message: '등록을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="FORESTRY"
|
||||
th:disabled="${not btnActive}"
|
||||
th:checked="${#strings.equals(dailyRecord.forestryStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||
th:checked="${#strings.equals(dailyRecord.forestryStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}"
|
||||
onchange="modalControl.showTodayNoneAlert(this)">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -204,6 +205,23 @@
|
||||
},
|
||||
);
|
||||
},
|
||||
showTodayNoneAlert(checkbox){
|
||||
if (checkbox.checked) {
|
||||
etUI.dialog.alert({
|
||||
message: '금일 등록내용 없음을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}else{
|
||||
etUI.dialog.alert({
|
||||
message: '등록을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
@@ -45,7 +45,8 @@
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="INCOME"
|
||||
th:disabled="${not btnActive}"
|
||||
th:checked="${#strings.equals(dailyRecord.incomeStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||
th:checked="${#strings.equals(dailyRecord.incomeStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}"
|
||||
onchange="modalControl.showTodayNoneAlert(this)">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -525,7 +526,23 @@
|
||||
|
||||
ajaxUtil._hideWaiting();
|
||||
},
|
||||
|
||||
showTodayNoneAlert(checkbox){
|
||||
if (checkbox.checked) {
|
||||
etUI.dialog.alert({
|
||||
message: '금일 등록내용 없음을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}else{
|
||||
etUI.dialog.alert({
|
||||
message: '등록을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="POWER"
|
||||
th:disabled="${not btnActive}"
|
||||
th:checked="${#strings.equals(dailyRecord.powerStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||
th:checked="${#strings.equals(dailyRecord.powerStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}"
|
||||
onchange="modalControl.showTodayNoneAlert(this)">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -205,6 +206,23 @@
|
||||
},
|
||||
);
|
||||
},
|
||||
showTodayNoneAlert(checkbox){
|
||||
if (checkbox.checked) {
|
||||
etUI.dialog.alert({
|
||||
message: '금일 등록내용 없음을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}else{
|
||||
etUI.dialog.alert({
|
||||
message: '등록을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
<input type="checkbox" name="todayNone"
|
||||
data-type="WORK"
|
||||
th:disabled="${not btnActive}"
|
||||
th:checked="${#strings.equals(dailyRecord.workStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}">
|
||||
th:checked="${#strings.equals(dailyRecord.workStatus, T(app.module.core.config.application.enums.DailyTargetStatus).TODAY_NONE)}"
|
||||
onchange="modalControl.showTodayNoneAlert(this)">
|
||||
<span class="checkbox-item">
|
||||
<span class="checkbox-txt">금일 등록내용 없음</span>
|
||||
</span>
|
||||
@@ -266,6 +267,23 @@
|
||||
}
|
||||
);
|
||||
},
|
||||
showTodayNoneAlert(checkbox){
|
||||
if (checkbox.checked) {
|
||||
etUI.dialog.alert({
|
||||
message: '금일 등록내용 없음을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}else{
|
||||
etUI.dialog.alert({
|
||||
message: '등록을 선택하셨습니다.',
|
||||
type: 'alert',
|
||||
callback: function () {
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user