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 sourcePurpose;
private String count; private String count;
private String unitText; private String unitText;
private Integer price; private Long price;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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