Merge branch 'kangsun' into 'dev'
[BO] 충돌해결 See merge request korea-research/korea-research!14
This commit is contained in:
@@ -43,9 +43,7 @@ class GetHouseholdsStatusController {
|
||||
reqVO.getResearcherValue(),
|
||||
reqVO.getIsPanel(),
|
||||
reqVO.getUserRole(),
|
||||
reqVO.getUserRegionMainCode(),
|
||||
null,
|
||||
null
|
||||
reqVO.getUserRegionMainCode()
|
||||
))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain;
|
||||
|
||||
import app.module.admin.usecase.researcher.web.model.HouseholdSearchReqVO;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
@@ -45,18 +44,4 @@ public class GetHouseholdsStatusCmd {
|
||||
private String userRole;
|
||||
// 로그인한 유저 실사 지역
|
||||
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";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,4 +21,6 @@ public interface ResearcherService {
|
||||
Page<ResearchersHouseholdVisitDto> visitHouseholdList(ResearchersDetailReqVO reqVO);
|
||||
Integer visitHouseholdDelete(List<Integer> selectIds);
|
||||
Page<GetPopupHouseholds> searchMappingHousehold(HouseholdSearchReqVO reqVO);
|
||||
Integer updateMappingHousehold(MappingHouseholdListReqVO reqVO);
|
||||
|
||||
}
|
||||
|
||||
@@ -7,22 +7,20 @@
|
||||
<select id="getHouseholdsStatus"
|
||||
resultType="app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatus">
|
||||
/* getHouseholdsStatus : 임가현황 리스트 조회 */
|
||||
<if test="!(cmd.viewType eq 'popup')">
|
||||
WITH record_progress AS (
|
||||
SELECT ROUND(
|
||||
100.0 *
|
||||
WITH record_progress AS (
|
||||
SELECT ROUND(
|
||||
100.0 *
|
||||
(SELECT COUNT(*)
|
||||
FROM daily_record
|
||||
WHERE record_month = #{cmd.recordMonth} AND all_status = 'DONE')
|
||||
/ NULLIF(
|
||||
(SELECT COUNT(*)
|
||||
FROM daily_record
|
||||
WHERE record_month = #{cmd.recordMonth} AND all_status = 'DONE')
|
||||
/ NULLIF(
|
||||
(SELECT COUNT(*)
|
||||
FROM daily_day_group
|
||||
WHERE end_day <= EXTRACT(DAY FROM CURRENT_DATE)), 0
|
||||
),
|
||||
2
|
||||
) AS progress_percent
|
||||
) /* 일계부 입력 진행 완료 퍼센테이지 (이번달 작성 완료일 수 / 현재날짜 기준 전체 입력 가능 날짜 수) */
|
||||
</if>
|
||||
FROM daily_day_group
|
||||
WHERE end_day <= EXTRACT(DAY FROM CURRENT_DATE)), 0
|
||||
),
|
||||
2
|
||||
) AS progress_percent
|
||||
) /* 일계부 입력 진행 완료 퍼센테이지 (이번달 작성 완료일 수 / 현재날짜 기준 전체 입력 가능 날짜 수) */
|
||||
SELECT
|
||||
hvr.*,
|
||||
COUNT(*) OVER () AS total
|
||||
@@ -43,12 +41,7 @@
|
||||
h.industry_middle_code as industryMiddleCode,
|
||||
h.industry_middle_name AS industryMiddleName,
|
||||
h.is_panel AS isPanel,
|
||||
<if test="!(cmd.viewType eq 'popup')">
|
||||
ps.progress_percent AS progressPercent,
|
||||
</if>
|
||||
<if test="cmd.viewType eq 'popup'">
|
||||
0 AS progressPercent,
|
||||
</if>
|
||||
v.first_visit_date AS firstVisitDate,
|
||||
v.second_visit_date AS secondVisitDate,
|
||||
COALESCE(v.is_gift_sent, false) AS isGiftSent,
|
||||
@@ -57,9 +50,7 @@
|
||||
FROM v_household_with_code h
|
||||
LEFT JOIN v_household_visit v ON h.seq = v.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
|
||||
</if>
|
||||
) AS hvr
|
||||
|
||||
<where>
|
||||
@@ -186,18 +177,6 @@
|
||||
</when>
|
||||
</choose>
|
||||
</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>
|
||||
|
||||
ORDER BY hvr.householdNum ASC
|
||||
|
||||
Reference in New Issue
Block a user