임가방문 목록 수정
This commit is contained in:
@@ -16,7 +16,7 @@ public interface ResearcherMapper {
|
||||
Long countAll(ResearchersListReqVO reqVO);
|
||||
ResearchersDto detail(Integer adminSeq);
|
||||
List<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
Long mappingHouseholdCountAll(ResearchersDetailReqVO reqVO);
|
||||
Long mappingHouseholdListCountAll(ResearchersDetailReqVO reqVO);
|
||||
List<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
Long visitHouseholdListCountAll(ResearchersDetailReqVO reqVO);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ public class ResearchersHouseholdVisitDto {
|
||||
private String adminSeq;
|
||||
private String householdSeq;
|
||||
private String householdNum;
|
||||
private String name;
|
||||
private String ownerName;
|
||||
private String visitDate;
|
||||
private String isGiftSentFlag;
|
||||
private String Memo;
|
||||
|
||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
||||
public class ResearchersMappingHouseholdDto {
|
||||
private String seq;
|
||||
private String householdNum;
|
||||
private String name;
|
||||
private String ownerName;
|
||||
private String phone;
|
||||
private String regionMainCodeName;
|
||||
private String regionSubCodeName;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ResearcherServiceImpl implements ResearcherService {
|
||||
public Page<ResearchersMappingHouseholdDto> mappingHouseholdList(ResearchersDetailReqVO reqVO) {
|
||||
List<ResearchersMappingHouseholdDto> result = researcherMapper.mappingHouseholdList(reqVO);
|
||||
Pageable pageable = PageRequest.of(reqVO.getPage() , reqVO.getSize());
|
||||
long total = researcherMapper.mappingHouseholdCountAll(reqVO);
|
||||
long total = researcherMapper.mappingHouseholdListCountAll(reqVO);
|
||||
return new PageImpl<>(result, pageable, total);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
<select id="detail">
|
||||
select
|
||||
a.seq,
|
||||
a.id,
|
||||
a.name,
|
||||
a.phone,
|
||||
@@ -69,7 +70,7 @@
|
||||
select
|
||||
h.seq,
|
||||
h.household_num,
|
||||
h.name,
|
||||
h.owner_name,
|
||||
h.phone,
|
||||
rm.code_text AS region_main_code_name,
|
||||
rs.code_text AS region_sub_code_name,
|
||||
@@ -79,11 +80,11 @@
|
||||
case h.is_panel when false then '유지' when true then '탈락' end panel_flag
|
||||
from household h
|
||||
join admin_has_role ahr ON h.seq = ahr.admin_seq
|
||||
left join uicode rm ON u.parent_id = 'code.region.main' AND u.id = h.region_main_code
|
||||
left join uicode rs ON u.parent_id = 'code.region.sub' AND u.id = h.region_sub_code
|
||||
left join uicode rd ON u.parent_id = 'code.region.detail' AND u.id = h.region_detail_code
|
||||
left join uicode il ON u.parent_id = 'code.industry.large' AND u.id = h.industry_large_code
|
||||
left join uicode im ON u.parent_id = 'code.industry.middle' AND u.id = h.industry_middle_code
|
||||
left join uicode rm ON rm.parent_id = 'code.region.main' AND rm.id = h.region_main_code
|
||||
left join uicode rs ON rs.parent_id = 'code.region.sub' AND rs.id = h.region_sub_code
|
||||
left join uicode rd ON rd.parent_id = 'code.region.detail' AND rd.id = h.region_detail_code
|
||||
left join uicode il ON il.parent_id = 'code.industry.large' AND il.id = h.industry_large_code
|
||||
left join uicode im ON im.parent_id = 'code.industry.middle' AND im.id = h.industry_middle_code
|
||||
where ahr.role_id = 'ROLE_RESEARCHER' and ahr.is_deleted = false
|
||||
<if test="adminSeq > 0">
|
||||
and a.seq = #{adminSeq}
|
||||
@@ -109,7 +110,7 @@
|
||||
rhv.admin_seq,
|
||||
rhv.household_seq
|
||||
h.household_num,
|
||||
h.name,
|
||||
h.owner_name,
|
||||
rhv.visit_date,
|
||||
rhv.memo,
|
||||
case rhv.is_gift_sent when false then '전달완료' when true then '-' end is_gift_sent_flag,
|
||||
|
||||
@@ -47,7 +47,14 @@
|
||||
<button type="button" class="tab-label" data-tab-value="tab1">담당 임가 목록</button>
|
||||
<button type="button" class="tab-label" data-tab-value="tab2">임가방문정보</button>
|
||||
</div>
|
||||
<span id="household-totalElements"></span>
|
||||
<div class="row">
|
||||
<div class="col text-start">
|
||||
<div class="fw-bolder text-muted">
|
||||
TOTAL. <span id="household-totalElements"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form autocomplete="off" method="get" name="householdReqForm" th:object="${reqVO}">
|
||||
<!-- hidden parameters -->
|
||||
<input name="page" th:field="*{page}" type="hidden"/>
|
||||
@@ -137,7 +144,7 @@
|
||||
let dataOj = $(f).serializeObject();
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/researcher/mappingHousehold',
|
||||
'/researcher/mappingHouseholdList',
|
||||
dataOj,
|
||||
function (response) {
|
||||
$('#household-totalElements').text(response.totalElements);
|
||||
@@ -150,13 +157,8 @@
|
||||
tbody.append(
|
||||
`
|
||||
<tr data-id="${ct.id}">
|
||||
<td>
|
||||
<label>
|
||||
<input class="form-check-input" name="selectIds" type="checkbox" value="${ct.id}"/>
|
||||
</label>
|
||||
</td>
|
||||
<td class="underline"><a href="">${ct.householdNum}</a></td>
|
||||
<td>${ct.name}</td>
|
||||
<td>${ct.ownerName}</td>
|
||||
<td>${ct.phone}</td>
|
||||
<td>${ct.regionMainCodeName}</td>
|
||||
<td>${ct.regionSubCodeName}</td>
|
||||
@@ -225,8 +227,13 @@
|
||||
tbody.append(
|
||||
`
|
||||
<tr data-id="${ct.id}">
|
||||
<td>
|
||||
<label>
|
||||
<input class="form-check-input" name="selectIds" type="checkbox" value="${ct.id}"/>
|
||||
</label>
|
||||
</td>
|
||||
<td class="underline"><a href="">${ct.householdNum}</a></td>
|
||||
<td>${ct.name}</td>
|
||||
<td>${ct.ownerName}</td>
|
||||
<td>${ct.visitDate}</td>
|
||||
<td>${ct.Memo}</td>
|
||||
<td>${ct.Memo}</td>
|
||||
|
||||
Reference in New Issue
Block a user