Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
주수현
2025-07-17 11:50:43 +09:00
9 changed files with 71 additions and 28 deletions

View File

@@ -18,5 +18,5 @@ public class GetBankAutoTransferExpenseRecords {
private String sourcePurpose;
private String count;
private String unitText;
private Integer price;
private Long price;
}

View File

@@ -17,7 +17,7 @@ public class GetBankAutoTransferIncomeRecords {
private String sourcePurpose;
private String count;
private String unitText;
private Integer price;
private Long price;
private String category;
private String incomeCode;
private String expenseCode;

View File

@@ -15,9 +15,7 @@
household_num,
owner_name,
owner_age,
<if test="tel != null and tel != ''">
tel,
</if>
phone,
password,
region_main_code,
@@ -40,9 +38,7 @@
#{householdNum},
#{ownerName},
#{ownerAge},
<if test="tel != null and tel != ''">
#{tel},
</if>
#{phone},
#{encodedPassword},
#{regionMainCode},

View File

@@ -8,7 +8,6 @@
/* getBankAutoTransferIncomeRecords : 은행자동이체 (수입) 내역 목록 조회 */
SELECT bat.id, /* 수입 id */
ui_crop.code_text AS cropText, /* 재배형태 */
-- TODO(ks) : 이게 맞나 싶지만.. 일단 .. case when 으로 ..
CASE
WHEN ui_category.id = 'code.bank.input.self'
THEN bat.transfer_category

View File

@@ -50,7 +50,6 @@
ELSE ui_sub_sale.code_text
END AS sub_sale_unit_text /* 부생산물 판매량 단위 */
FROM forest_product df
-- TODO(ks) : 일단 전부 join.. 추후에 view 로 만들든지 개선해보기..
LEFT JOIN uicode ui_main_yield
ON ui_main_yield.parent_id = 'code.record.unit'
AND ui_main_yield.id = df.main_yield_unit_code

View File

@@ -10,9 +10,7 @@
SET
owner_name = #{ownerName},
owner_age = #{ownerAge},
<if test="tel != null and tel != ''">
tel = #{tel},
</if>
phone = #{phone},
region_main_code = #{regionMainCode},
region_sub_code = #{regionSubCode},

View File

@@ -509,7 +509,7 @@
$('#incomeCount').text(data.length);
if(data.length === 0) {
noDataDaily(tbody, status, 10);
noDataDaily(tbody, status, 11);
return;
}

View File

@@ -252,7 +252,7 @@
let $tab = $('.component-tab button[data-tab-value="' + tabActive + '"]');
getTabData($tab.data('tabType'), $tab.data('tabValue'));
}, 500);
}, 100);
});
$('.select-tab').on('click', function () {

View File

@@ -55,10 +55,10 @@
<input type="hidden" name="currentMonth" th:value="${currentMonth}">
<input type="hidden" name="isPaging">
<div class="component-tab" data-active="tab1">
<div class="component-tab" data-active="none">
<div class="tab-head">
<button type="button" class="tab-label" data-tab-value="tab1">담당 임가 목록</button>
<button type="button" class="tab-label" data-tab-value="tab2">임가방문정보</button>
<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>
<div class="component-select select-date" id="monthTab2" style="display: none;">
<select name="searchMonth" class="select-list search-month-container"
onchange="getVisitHouseholdPercentage();
@@ -178,37 +178,88 @@
<div th:replace="researcher/modal/modal-household-visit:: modalFragment"></div>
</section>
<th:block layout:fragment="script">
<script th:inline="javascript">
<script>
const form = document.householdReqForm;
const managementType = {
VISIT: "방문조사",
CALL: "전화상담",
ETC: "기타"
};
</script>
<script>
const tabStorageName = 'researcherTabActive';
const monthStorageName = 'searchMonth';
let tabActive = 'tab1';
let tabMonth = document.householdReqForm.searchMonth.value;
window.onpageshow = function (event) {
if (event.persisted || (window.performance && window.performance.navigation.type == 1)) {
if (('sessionStorage' in window) && window['sessionStorage'] !== null) {
if (sessionStorage.getItem(tabStorageName)) {
tabActive = sessionStorage.getItem(tabStorageName);
}
if (sessionStorage.getItem(monthStorageName)) {
tabMonth = sessionStorage.getItem(monthStorageName);
document.householdReqForm.searchMonth.value = tabMonth;
}
}
} else if (event.persisted || (window.performance && window.performance.navigation.type == 2)) {
sessionStorage.removeItem(tabStorageName);
sessionStorage.removeItem(monthStorageName);
}
}
</script>
<script th:inline="javascript">
// 탭 클릭 시 함수 호출
document.addEventListener('DOMContentLoaded', function () {
const tabButtons = document.querySelectorAll('.tab-label');
tabButtons.forEach(button => {
button.addEventListener('click', function () {
const tabValue = this.getAttribute('data-tab-value');
const form = document.householdReqForm;
const tabType = this.getAttribute('data-tab-type');
form.page.value = 0; // 페이지 초기화
document.getElementById('monthTab2').style.display = 'block';
if (tabValue === 'tab1') {
getHouseholdList(0);
} else if (tabValue === 'tab2') {
if (!form.searchMonth.value) {
form.searchMonth.value = '[[${currentMonth}]]'; // 기본값 복원
}
getVisitHouseholdPercentage();
getHouseholdVisitList();
}
sessionStorage.setItem(tabStorageName, tabValue);
sessionStorage.setItem(monthStorageName, form.searchMonth.value);
getTabData(tabType, tabValue);
});
});
// 초기 데이터 로드 (tab1)
getHouseholdList(document.householdReqForm.page.value);
});
$(document).ready(() => {
setTimeout(function () {
let $tab = $('.component-tab button[data-tab-value="' + tabActive + '"]');
getTabData($tab.data('tabType'), $tab.data('tabValue'));
}, 100);
});
const getTabData = (tabType, tabValue) => {
switch (tabType) {
case 'household':
getHouseholdList(0);
break;
case 'household-visit':
document.getElementById('monthTab2').style.display = 'block';
if (!form.searchMonth.value) {
form.searchMonth.value = '[[${currentMonth}]]'; // 기본값 복원
}
getVisitHouseholdPercentage();
getHouseholdVisitList();
break;
}
sessionStorage.setItem(tabStorageName, tabValue);
sessionStorage.setItem(monthStorageName, document.householdReqForm.searchMonth.value);
document.querySelector('.component-tab').ui.setValue(tabValue);
}
// 담당 임가 목록
const getHouseholdList = (pageNo) => {
const f = document.householdReqForm;