Merge branch 'bo_researcher_visit' into 'dev'
[BO] 조사원현황 임가방문정보 페이징처리 제거 See merge request korea-research/korea-research!76
This commit is contained in:
@@ -60,11 +60,8 @@ public class ResearcherDao implements ResearcherPortOut {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO) {
|
||||
List<ResearchersHouseholdVisitDto> result = researcherMapper.visitHouseholdList(reqVO);
|
||||
Pageable pageable = PageRequest.of(reqVO.getPage() , reqVO.getSize());
|
||||
long total = researcherMapper.visitHouseholdListCountAll(reqVO);
|
||||
return new PageImpl<>(result, pageable, total);
|
||||
public List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO) {
|
||||
return researcherMapper.visitHouseholdList(reqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface ResearcherPortIn {
|
||||
Page<ResearchersDto> list(ResearchersListReqVO reqVO);
|
||||
ResearchersDto detail(Integer adminSeq);
|
||||
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO);
|
||||
Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO);
|
||||
ResearchersHouseholdVisitPopUpDto visitHouseholdDetail(Integer id);
|
||||
|
||||
@@ -11,7 +11,7 @@ public interface ResearcherPortOut {
|
||||
ResearchersDto detail(Integer adminSeq);
|
||||
Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
VisitHouseholdPercentageDto selectVisitHouseholdPercentage(ResearchersDetailReqVO reqVO);
|
||||
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
Integer updateVisitHousehold(ResearchersVisitDetailReqVO reqVO);
|
||||
ResearchersHouseholdVisitPopUpDto visitHouseholdDetail(Integer id);
|
||||
Integer visitHouseholdDelete(List<Integer> selectIds);
|
||||
|
||||
@@ -31,7 +31,7 @@ class ResearcherService implements ResearcherPortIn {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO){
|
||||
public List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO){
|
||||
return portOut.visitHouseholdList(reqVO);
|
||||
}
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@
|
||||
rhv.visit_date,
|
||||
rhv.content,
|
||||
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
|
||||
from household_visit rhv
|
||||
join household h on rhv.household_seq = h.seq
|
||||
@@ -141,7 +141,6 @@
|
||||
<if test="searchMonth != null and searchMonth != ''">
|
||||
and TO_CHAR(rhv.visit_date ,'YYYYMM')= #{searchMonth}
|
||||
</if>
|
||||
LIMIT #{size} OFFSET #{page}*#{size}
|
||||
</select>
|
||||
|
||||
<select id="selectVisitHouseholdPercentage">
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<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>
|
||||
<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}"
|
||||
th:value="${month.value}"
|
||||
th:text="${month.label}"
|
||||
@@ -155,7 +155,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
</section>
|
||||
<div class="row paging"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -199,7 +198,7 @@
|
||||
form.searchMonth.value = '[[${currentMonth}]]'; // 기본값 복원
|
||||
}
|
||||
getVisitHouseholdPercentage();
|
||||
getHouseholdVisitList(0);
|
||||
getHouseholdVisitList();
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -300,12 +299,10 @@
|
||||
}
|
||||
|
||||
// 임가 방문 정보
|
||||
const getHouseholdVisitList = (pageNo) => {
|
||||
const getHouseholdVisitList = () => {
|
||||
const f = document.householdReqForm;
|
||||
f.page.value = pageNo;
|
||||
|
||||
let dataObj = {
|
||||
page: f.page.value,
|
||||
seq: f.seq.value,
|
||||
searchMonth: f.searchMonth.value,
|
||||
};
|
||||
@@ -314,13 +311,13 @@
|
||||
'/api/researcher/visitHousehold/list',
|
||||
dataObj,
|
||||
function (response) {
|
||||
$('#household-visit-totalElements').text(response.totalElements);
|
||||
$('#household-visit-totalElements').text(response.length);
|
||||
|
||||
// List 구성하기
|
||||
const tbody = $('#household-visit-list');
|
||||
tbody.empty();
|
||||
|
||||
$(response.content).each((idx, ct) => {
|
||||
$(response).each((idx, ct) => {
|
||||
tbody.append(
|
||||
`
|
||||
<tr data-id="${ct.id}">
|
||||
@@ -341,7 +338,7 @@
|
||||
);
|
||||
});
|
||||
|
||||
if (!$(response.content).length) {
|
||||
if (response.length == 0) {
|
||||
tbody.append(`
|
||||
<tr>
|
||||
<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) {
|
||||
|
||||
@@ -405,7 +392,7 @@
|
||||
function (response) {
|
||||
if(response > 0){
|
||||
alert('선택한 임가 방문 정보가 삭제되었습니다.');
|
||||
getHouseholdVisitList(document.householdReqForm.page.value);
|
||||
getHouseholdVisitList();
|
||||
} else {
|
||||
alert('삭제에 실패했습니다.');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user