[BO] 조사원현황 임가방문정보 페이징처리 제거

This commit is contained in:
kangsunlee
2025-07-04 09:16:32 +09:00
parent 22b3a1897a
commit 5d2ce5e7f9
6 changed files with 13 additions and 30 deletions

View File

@@ -60,11 +60,8 @@ public class ResearcherDao implements ResearcherPortOut {
} }
@Override @Override
public Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO) { public List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO) {
List<ResearchersHouseholdVisitDto> result = researcherMapper.visitHouseholdList(reqVO); return researcherMapper.visitHouseholdList(reqVO);
Pageable pageable = PageRequest.of(reqVO.getPage() , reqVO.getSize());
long total = researcherMapper.visitHouseholdListCountAll(reqVO);
return new PageImpl<>(result, pageable, total);
} }
@Override @Override

View File

@@ -11,7 +11,7 @@ public interface ResearcherPortIn {
Page<ResearchersDto> list(ResearchersListReqVO reqVO); Page<ResearchersDto> list(ResearchersListReqVO reqVO);
ResearchersDto detail(Integer adminSeq); ResearchersDto detail(Integer adminSeq);
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO); Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO); List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO); VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO);
Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO); Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO);
ResearchersHouseholdVisitPopUpDto visitHouseholdDetail(Integer id); ResearchersHouseholdVisitPopUpDto visitHouseholdDetail(Integer id);

View File

@@ -11,7 +11,7 @@ public interface ResearcherPortOut {
ResearchersDto detail(Integer adminSeq); ResearchersDto detail(Integer adminSeq);
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO); Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO); VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO);
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO); List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO); Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO);
ResearchersHouseholdVisitPopUpDto visitHouseholdDetail(Integer id); ResearchersHouseholdVisitPopUpDto visitHouseholdDetail(Integer id);
Integer visitHouseholdDelete(List<Integer> selectIds); Integer visitHouseholdDelete(List<Integer> selectIds);

View File

@@ -31,7 +31,7 @@ class ResearcherService implements ResearcherPortIn {
} }
@Override @Override
public Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO){ public List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO){
return portOut.visitHouseholdList(reqVO); return portOut.visitHouseholdList(reqVO);
} }

View File

@@ -129,7 +129,7 @@
rhv.visit_date, rhv.visit_date,
rhv.content, rhv.content,
rhv.management_type, rhv.management_type,
case rhv.is_gift_sent when false then '전달완료' when true then '-' end is_gift_sent_flag, case rhv.is_gift_sent when true then '전달완료' when false then '-' end is_gift_sent_flag,
rhv.created_at rhv.created_at
from household_visit rhv from household_visit rhv
join household h on rhv.household_seq = h.seq join household h on rhv.household_seq = h.seq
@@ -141,7 +141,6 @@
<if test="searchMonth != null and searchMonth != ''"> <if test="searchMonth != null and searchMonth != ''">
and TO_CHAR(rhv.visit_date ,'YYYYMM')= #{searchMonth} and TO_CHAR(rhv.visit_date ,'YYYYMM')= #{searchMonth}
</if> </if>
LIMIT #{size} OFFSET #{page}*#{size}
</select> </select>
<select id="selectVisitHouseholdPercentage"> <select id="selectVisitHouseholdPercentage">

View File

@@ -57,7 +57,7 @@
<button type="button" class="tab-label" data-tab-value="tab1">담당 임가 목록</button> <button type="button" class="tab-label" data-tab-value="tab1">담당 임가 목록</button>
<button type="button" class="tab-label" data-tab-value="tab2" th:unless="${activeProfile != 'local'}">임가방문정보</button> <button type="button" class="tab-label" data-tab-value="tab2" th:unless="${activeProfile != 'local'}">임가방문정보</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" onchange="getHouseholdVisitList(0);"> <select name="searchMonth" class="select-list search-month-container" onchange="getHouseholdVisitList();">
<option th:each="month : ${monthList}" <option th:each="month : ${monthList}"
th:value="${month.value}" th:value="${month.value}"
th:text="${month.label}" th:text="${month.label}"
@@ -155,7 +155,6 @@
</tbody> </tbody>
</table> </table>
</section> </section>
<div class="row paging"></div>
</div> </div>
</div> </div>
</div> </div>
@@ -199,7 +198,7 @@
form.searchMonth.value = '[[${currentMonth}]]'; // 기본값 복원 form.searchMonth.value = '[[${currentMonth}]]'; // 기본값 복원
} }
getVisitHouseholdPercentage(); getVisitHouseholdPercentage();
getHouseholdVisitList(0); getHouseholdVisitList();
} }
}); });
}); });
@@ -300,12 +299,10 @@
} }
// 임가 방문 정보 // 임가 방문 정보
const getHouseholdVisitList = (pageNo) => { const getHouseholdVisitList = () => {
const f = document.householdReqForm; const f = document.householdReqForm;
f.page.value = pageNo;
let dataObj = { let dataObj = {
page: f.page.value,
seq: f.seq.value, seq: f.seq.value,
searchMonth: f.searchMonth.value, searchMonth: f.searchMonth.value,
}; };
@@ -314,13 +311,13 @@
'/api/researcher/visitHousehold/list', '/api/researcher/visitHousehold/list',
dataObj, dataObj,
function (response) { function (response) {
$('#household-visit-totalElements').text(response.totalElements); $('#household-visit-totalElements').text(response.length);
// List 구성하기 // List 구성하기
const tbody = $('#household-visit-list'); const tbody = $('#household-visit-list');
tbody.empty(); tbody.empty();
$(response.content).each((idx, ct) => { $(response).each((idx, ct) => {
tbody.append( tbody.append(
` `
<tr data-id="${ct.id}"> <tr data-id="${ct.id}">
@@ -341,7 +338,7 @@
); );
}); });
if (!$(response.content).length) { if (response.length == 0) {
tbody.append(` tbody.append(`
<tr> <tr>
<td colspan="8" class="text-center text-muted">임가 방문 정보가 존재하지 않습니다.</td> <td colspan="8" class="text-center text-muted">임가 방문 정보가 존재하지 않습니다.</td>
@@ -349,16 +346,6 @@
`); `);
} }
// Pagination 구성하기
const paging = $('.paging');
paging.empty();
paging.append(
uiUtil.getPagingUI(pageNo,response.size, response.totalPages,
(movePageNo) => {
f.page.value = movePageNo;
getHouseholdVisitList(movePageNo);
}));
}, },
function (code, rstData) { function (code, rstData) {
@@ -405,7 +392,7 @@
function (response) { function (response) {
if(response > 0){ if(response > 0){
alert('선택한 임가 방문 정보가 삭제되었습니다.'); alert('선택한 임가 방문 정보가 삭제되었습니다.');
getHouseholdVisitList(document.householdReqForm.page.value); getHouseholdVisitList();
} else { } else {
alert('삭제에 실패했습니다.'); alert('삭제에 실패했습니다.');
} }