Merge branch 'bo_fixes' into 'dev'
Bo fixes See merge request korea-research/korea-research!104
This commit is contained in:
@@ -52,8 +52,8 @@ class UpdateHouseholdController {
|
|||||||
reqVO.getIndustryDetail(),
|
reqVO.getIndustryDetail(),
|
||||||
reqVO.getResearcherSeq(),
|
reqVO.getResearcherSeq(),
|
||||||
reqVO.getIsPanel(),
|
reqVO.getIsPanel(),
|
||||||
reqVO.getUsageType().name(),
|
reqVO.getUsageType() != null ? reqVO.getUsageType().name() : null,
|
||||||
reqVO.getEmploymentType().name(),
|
reqVO.getEmploymentType() != null ? reqVO.getEmploymentType().name() : null,
|
||||||
reqVO.getMemo()
|
reqVO.getMemo()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -52,6 +52,11 @@ class UpdateHouseholdStatusUIController {
|
|||||||
GetHouseholdStatus result =
|
GetHouseholdStatus result =
|
||||||
getHouseholdStatusPortIn.operate(new GetHouseholdStatusCmd(seq)).orElse(null);
|
getHouseholdStatusPortIn.operate(new GetHouseholdStatusCmd(seq)).orElse(null);
|
||||||
|
|
||||||
|
String tel = StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel() : "";
|
||||||
|
String[] telParts = tel.split("-");
|
||||||
|
String phone = StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone() : "";
|
||||||
|
String[] phoneParts = phone.split("-");
|
||||||
|
|
||||||
if (result != null) {
|
if (result != null) {
|
||||||
model.addAttribute("householdInfo",
|
model.addAttribute("householdInfo",
|
||||||
new UpdateHouseholdStatusUIResVO(
|
new UpdateHouseholdStatusUIResVO(
|
||||||
@@ -59,12 +64,12 @@ class UpdateHouseholdStatusUIController {
|
|||||||
result.getHouseholdNum(),
|
result.getHouseholdNum(),
|
||||||
result.getHouseholdName(),
|
result.getHouseholdName(),
|
||||||
result.getHouseholdAge(),
|
result.getHouseholdAge(),
|
||||||
StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel().split("-")[0] : "",
|
telParts.length > 0 ? telParts[0] : "",
|
||||||
StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel().split("-")[1] : "",
|
telParts.length > 1 ? telParts[1] : "",
|
||||||
StringUtils.hasText(result.getHouseholdTel()) ? result.getHouseholdTel().split("-")[2] : "",
|
telParts.length > 2 ? telParts[2] : "",
|
||||||
StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone().split("-")[0] : "",
|
phoneParts.length > 0 ? phoneParts[0] : "",
|
||||||
StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone().split("-")[1] : "",
|
phoneParts.length > 1 ? phoneParts[1] : "",
|
||||||
StringUtils.hasText(result.getHouseholdPhone()) ? result.getHouseholdPhone().split("-")[2] : "",
|
phoneParts.length > 2 ? phoneParts[2] : "",
|
||||||
result.getRegionMainCode(),
|
result.getRegionMainCode(),
|
||||||
result.getRegionSubCode(),
|
result.getRegionSubCode(),
|
||||||
result.getRegionDetailCode(),
|
result.getRegionDetailCode(),
|
||||||
|
|||||||
@@ -31,16 +31,22 @@
|
|||||||
),
|
),
|
||||||
visit_summary AS (
|
visit_summary AS (
|
||||||
/* 임가별 1차임가방문, 2차임가방문, 답례품전달여부 */
|
/* 임가별 1차임가방문, 2차임가방문, 답례품전달여부 */
|
||||||
SELECT
|
SELECT household_seq,
|
||||||
rhh.household_seq,
|
MAX(CASE WHEN rn = 1 THEN visit_date END) AS first_visit_date,
|
||||||
MIN(v.visit_date) AS first_visit_date,
|
MAX(CASE WHEN rn = 2 THEN visit_date END) AS second_visit_date,
|
||||||
MAX(v.visit_date) AS second_visit_date,
|
BOOL_OR(is_gift_sent) AS is_gift_sent
|
||||||
BOOL_OR(v.is_gift_sent) AS is_gift_sent
|
FROM (
|
||||||
FROM household_visit v
|
SELECT rhh.household_seq,
|
||||||
JOIN researcher_has_household rhh ON v.household_seq = rhh.household_seq
|
v.visit_date,
|
||||||
WHERE TO_CHAR(v.visit_date, 'YYYYMM') = #{cmd.recordMonth}
|
v.is_gift_sent,
|
||||||
AND rhh.is_deleted = false
|
ROW_NUMBER() OVER (PARTITION BY rhh.household_seq ORDER BY v.visit_date ASC) AS rn
|
||||||
GROUP BY rhh.household_seq
|
FROM household_visit v
|
||||||
|
JOIN researcher_has_household rhh ON v.household_seq = rhh.household_seq
|
||||||
|
WHERE TO_CHAR(v.visit_date, 'YYYYMM') = #{cmd.recordMonth}
|
||||||
|
AND rhh.is_deleted = false
|
||||||
|
) sub
|
||||||
|
WHERE rn <= 2
|
||||||
|
GROUP BY household_seq
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
hvr.*,
|
hvr.*,
|
||||||
|
|||||||
@@ -364,10 +364,10 @@
|
|||||||
<td>${ct.regionDetailName}</td><!-- 세부지역 -->
|
<td>${ct.regionDetailName}</td><!-- 세부지역 -->
|
||||||
<td>${ifNullHyphen(ct.industryLargeName)}</td><!-- 업종 대분류 -->
|
<td>${ifNullHyphen(ct.industryLargeName)}</td><!-- 업종 대분류 -->
|
||||||
<td>${ifNullHyphen(ct.industryMiddleName)}</td><!-- 업종 중분류1 -->
|
<td>${ifNullHyphen(ct.industryMiddleName)}</td><!-- 업종 중분류1 -->
|
||||||
|
<td>${ct.progressPercent}%</td><!-- 임가 진행 상황 -->
|
||||||
<td>${ifNullHyphen(ct.firstVisitDate)}</td><!-- 1차방문날짜 -->
|
<td>${ifNullHyphen(ct.firstVisitDate)}</td><!-- 1차방문날짜 -->
|
||||||
<td>${ifNullHyphen(ct.secondVisitDate)}</td><!-- 2차방문날짜 -->
|
<td>${ifNullHyphen(ct.secondVisitDate)}</td><!-- 2차방문날짜 -->
|
||||||
<td>${ct.isGiftSent ? "전달" : "미전달"}</td> <!-- 답례품 -->
|
<td>${ct.isGiftSent ? "전달" : "미전달"}</td> <!-- 답례품 -->
|
||||||
<td>${ct.progressPercent}%</td><!-- 임가 진행 상황 -->
|
|
||||||
<td class="hide-role-researcher">${ifNullHyphen(ct.researcherName)}</td> <!-- 조사원이름 -->
|
<td class="hide-role-researcher">${ifNullHyphen(ct.researcherName)}</td> <!-- 조사원이름 -->
|
||||||
<td class="hide-role-researcher">${ifNullHyphen(ct.researcherPhone)}</td> <!-- 조사원번호 -->
|
<td class="hide-role-researcher">${ifNullHyphen(ct.researcherPhone)}</td> <!-- 조사원번호 -->
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user