[BO] 임가 현황 리스트 service 원복
This commit is contained in:
@@ -43,9 +43,7 @@ class GetHouseholdsStatusController {
|
|||||||
reqVO.getResearcherValue(),
|
reqVO.getResearcherValue(),
|
||||||
reqVO.getIsPanel(),
|
reqVO.getIsPanel(),
|
||||||
reqVO.getUserRole(),
|
reqVO.getUserRole(),
|
||||||
reqVO.getUserRegionMainCode(),
|
reqVO.getUserRegionMainCode()
|
||||||
null,
|
|
||||||
null
|
|
||||||
))
|
))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain;
|
package app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain;
|
||||||
|
|
||||||
import app.module.admin.usecase.researcher.web.model.HouseholdSearchReqVO;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
@@ -45,18 +44,4 @@ public class GetHouseholdsStatusCmd {
|
|||||||
private String userRole;
|
private String userRole;
|
||||||
// 로그인한 유저 실사 지역
|
// 로그인한 유저 실사 지역
|
||||||
private String userRegionMainCode;
|
private String userRegionMainCode;
|
||||||
|
|
||||||
private Boolean isMapping;
|
|
||||||
private String viewType;
|
|
||||||
public GetHouseholdsStatusCmd(HouseholdSearchReqVO reqVO) {
|
|
||||||
this.ownerField = reqVO.getOwnerField();
|
|
||||||
this.ownerValue = reqVO.getOwnerValue();
|
|
||||||
this.regionMainCode = reqVO.getRegionMainCode();
|
|
||||||
this.regionSubCode = reqVO.getRegionSubCode();
|
|
||||||
this.regionDetailCode = reqVO.getRegionDetailCode();
|
|
||||||
this.isPanel = reqVO.getIsPanel();
|
|
||||||
this.isMapping = reqVO.getIsMapping();
|
|
||||||
this.viewType = "popup";
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<select id="getHouseholdsStatus"
|
<select id="getHouseholdsStatus"
|
||||||
resultType="app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatus">
|
resultType="app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatus">
|
||||||
/* getHouseholdsStatus : 임가현황 리스트 조회 */
|
/* getHouseholdsStatus : 임가현황 리스트 조회 */
|
||||||
<if test="!(cmd.viewType eq 'popup')">
|
|
||||||
WITH record_progress AS (
|
WITH record_progress AS (
|
||||||
SELECT ROUND(
|
SELECT ROUND(
|
||||||
100.0 *
|
100.0 *
|
||||||
@@ -22,7 +21,6 @@
|
|||||||
2
|
2
|
||||||
) AS progress_percent
|
) AS progress_percent
|
||||||
) /* 일계부 입력 진행 완료 퍼센테이지 (이번달 작성 완료일 수 / 현재날짜 기준 전체 입력 가능 날짜 수) */
|
) /* 일계부 입력 진행 완료 퍼센테이지 (이번달 작성 완료일 수 / 현재날짜 기준 전체 입력 가능 날짜 수) */
|
||||||
</if>
|
|
||||||
SELECT
|
SELECT
|
||||||
hvr.*,
|
hvr.*,
|
||||||
COUNT(*) OVER () AS total
|
COUNT(*) OVER () AS total
|
||||||
@@ -43,12 +41,7 @@
|
|||||||
h.industry_middle_code as industryMiddleCode,
|
h.industry_middle_code as industryMiddleCode,
|
||||||
h.industry_middle_name AS industryMiddleName,
|
h.industry_middle_name AS industryMiddleName,
|
||||||
h.is_panel AS isPanel,
|
h.is_panel AS isPanel,
|
||||||
<if test="!(cmd.viewType eq 'popup')">
|
|
||||||
ps.progress_percent AS progressPercent,
|
ps.progress_percent AS progressPercent,
|
||||||
</if>
|
|
||||||
<if test="cmd.viewType eq 'popup'">
|
|
||||||
0 AS progressPercent,
|
|
||||||
</if>
|
|
||||||
v.first_visit_date AS firstVisitDate,
|
v.first_visit_date AS firstVisitDate,
|
||||||
v.second_visit_date AS secondVisitDate,
|
v.second_visit_date AS secondVisitDate,
|
||||||
COALESCE(v.is_gift_sent, false) AS isGiftSent,
|
COALESCE(v.is_gift_sent, false) AS isGiftSent,
|
||||||
@@ -57,9 +50,7 @@
|
|||||||
FROM v_household_with_code h
|
FROM v_household_with_code h
|
||||||
LEFT JOIN v_household_visit v ON h.seq = v.household_seq
|
LEFT JOIN v_household_visit v ON h.seq = v.household_seq
|
||||||
LEFT JOIN v_household_researcher r ON h.seq = r.household_seq
|
LEFT JOIN v_household_researcher r ON h.seq = r.household_seq
|
||||||
<if test="!(cmd.viewType eq 'popup')">
|
|
||||||
CROSS JOIN record_progress ps
|
CROSS JOIN record_progress ps
|
||||||
</if>
|
|
||||||
) AS hvr
|
) AS hvr
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
@@ -186,18 +177,6 @@
|
|||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="cmd.isMapping != null">
|
|
||||||
/* 패널 유지 여부 */
|
|
||||||
<choose>
|
|
||||||
<when test="cmd.isMapping">
|
|
||||||
AND r.researcher_name is not null
|
|
||||||
</when>
|
|
||||||
<when test="!cmd.isMapping">
|
|
||||||
AND r.researcher_name is null
|
|
||||||
</when>
|
|
||||||
</choose>
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
ORDER BY hvr.householdNum ASC
|
ORDER BY hvr.householdNum ASC
|
||||||
|
|||||||
Reference in New Issue
Block a user