[BO] 임가현황 작업 중 (11)
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.household.getBankAutoTransferRecords.adapters.persistence.GetBankAutoTransferRecordsMapper">
|
||||
namespace="app.module.admin.usecase.household.tab.bankAutoTransfer.getBankAutoTransferRecords.adapters.persistence.GetBankAutoTransferRecordsMapper">
|
||||
<select id="getBankAutoTransferIncomeRecords"
|
||||
resultType="app.module.admin.usecase.household.getBankAutoTransferRecords.ports.application.domain.GetBankAutoTransferIncomeRecords">
|
||||
resultType="app.module.admin.usecase.household.tab.bankAutoTransfer.getBankAutoTransferRecords.ports.application.domain.GetBankAutoTransferIncomeRecords">
|
||||
/* getBankAutoTransferIncomeRecords : 은행자동이체 (수입) 내역 목록 조회 */
|
||||
SELECT bat.id, /* 수입 id */
|
||||
ui_crop.code_text AS cropText, /* 재배형태 */
|
||||
@@ -47,7 +47,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getBankAutoTransferExpenseRecords"
|
||||
resultType="app.module.admin.usecase.household.getBankAutoTransferRecords.ports.application.domain.GetBankAutoTransferExpenseRecords">
|
||||
resultType="app.module.admin.usecase.household.tab.bankAutoTransfer.getBankAutoTransferRecords.ports.application.domain.GetBankAutoTransferExpenseRecords">
|
||||
/* getBankAutoTransferExpenseRecords : 은행자동이체 (지출) 내역 목록 조회 */
|
||||
SELECT bat.id, /* 지출 id */
|
||||
CASE
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.household.getDailyRecordStatusDetail.adapters.persistence.GetDailyRecordStatusDetailMapper">
|
||||
namespace="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.adapters.persistence.GetDailyRecordStatusDetailMapper">
|
||||
|
||||
<select id="getDailyRecordStatus"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyRecordStatus">
|
||||
/* getDailyRecordStatus : 일계부 등록 상태 조회 */
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyRecordStatus">
|
||||
/* getDailyRecordStatus : 일계부 등록 상태 조회 */
|
||||
SELECT income_status,
|
||||
work_status,
|
||||
expense_status,
|
||||
@@ -19,14 +19,14 @@
|
||||
</select>
|
||||
|
||||
<select id="getDailyIncomeRecords"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyIncomeRecords">
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyIncomeRecords">
|
||||
/* getDailyIncomeRecords : 일계부 등록 현황 상세 수입 조회 */
|
||||
SELECT di.id, /* 수입 id */
|
||||
di.input_type, /* 입력구분 */
|
||||
di.is_credit, /* 외상판매여부 */
|
||||
di.crop_code, /* 재배형태 코드 */
|
||||
ui_crop.code_text AS crop_text, /* 재배형태 코드 텍스트 */
|
||||
di.category_self, /* 수입 종류(직접입력) */
|
||||
di.income_kind, /* 수입의 종류 */
|
||||
di.source_purpose, /* 수입원(용도) */
|
||||
di.quantity, /* 수량 */
|
||||
di.unit_code, /* 단위 코드 */
|
||||
@@ -37,47 +37,58 @@
|
||||
di.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(di.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_income di
|
||||
LEFT JOIN uicode ui_crop ON ui_crop.parent_id = 'code.record.crop' AND ui_crop.id = di.crop_code
|
||||
LEFT JOIN uicode ui_unit ON ui_unit.parent_id = 'code.record.unit' AND ui_unit.id = di.unit_code
|
||||
LEFT JOIN uicode ui_crop
|
||||
ON ui_crop.parent_id = 'code.record.crop'
|
||||
AND ui_crop.id = di.crop_code
|
||||
LEFT JOIN uicode ui_unit
|
||||
ON ui_unit.parent_id = 'code.record.unit'
|
||||
AND ui_unit.id = di.unit_code
|
||||
WHERE di.daily_record_seq = #{recordSeq}
|
||||
AND di.is_deleted = false
|
||||
</select>
|
||||
|
||||
<select id="getDailyWorkRecords"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyWorkRecords">
|
||||
/* getDailyWorkRecords : 일계부 등록 현황 상세 임업노동 투입 내역 조회 */
|
||||
SELECT dw.id,
|
||||
dw.item_code, /* 일단 품목명 매핑코드로 */ -- TODO(ks) : 품목명 코드형태 맞는지 체크할 것
|
||||
dw.work_code, /* 일단 작업명 매핑코드로 */ -- TODO(ks) : 작업명 코드형태 맞는지 체크할 것
|
||||
dw.work_land_area, /* 작업 면적 */ -- TODO(ks) : 작업면적의 코드 추가되어야 하는지 체크할 것
|
||||
dw.harvest_quantity, /* 수확량 */
|
||||
dw.unit_code, /* 단위 */
|
||||
ui_crop.code_text AS crop_text, /* 단위 코드 텍스트 */
|
||||
dw.owner_time, /* 경영주 시간 */
|
||||
dw.spouse_time, /* 배우자 시간 */
|
||||
dw.family_m_hours, /* 가족노동(남) */
|
||||
dw.family_f_hours, /* 가족노동(여) */
|
||||
dw.hired_m_hours, /* 고용노동(남) */
|
||||
dw.hired_f_hours, /* 고용노동(여) */
|
||||
dw.shared_m_hours, /* 품앗이(남) */
|
||||
dw.shared_f_hours, /* 품앗이(여) */
|
||||
dw.volunteer_m_hours, /* 일손돕기(남) */
|
||||
dw.volunteer_f_hours, /* 일손돕기(여) */
|
||||
dw.updated_by, /* 최종수정자 */
|
||||
dw.updated_at /* 최종수정날짜 */
|
||||
FROM daily_work dw
|
||||
LEFT JOIN uicode ui_crop ON ui_crop.parent_id = 'code.record.unit' AND ui_crop.id = dw.unit_code
|
||||
WHERE dw.daily_record_seq = #{recordSeq}
|
||||
AND dw.is_deleted = false
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyWorkRecords">
|
||||
/* getDailyWorkRecords : 일계부 등록 현황 상세 임업노동 투입 내역 조회 */
|
||||
SELECT dw.id,
|
||||
dw.item_name, /* 품목명 */
|
||||
dw.work_name, /* 작업명*/
|
||||
dw.work_land_area, /* 작업 면적 */
|
||||
ui_area.code_text AS areaUnitCodeText, /* 작업면적 단위(코드매핑) */
|
||||
dw.area_unit_self, /* 작업면적 단위(직접입력) */
|
||||
dw.harvest_quantity, /* 수확량 */
|
||||
ui_harvest.code_text AS harvestUnitCodeText, /* 수확량 단위 (코드매핑) */
|
||||
dw.harvest_unit_self, /* 수확량 단위 (직접입력) */
|
||||
dw.owner_time, /* 경영주 시간 */
|
||||
dw.spouse_time, /* 배우자 시간 */
|
||||
dw.family_m_hours, /* 가족노동(남) */
|
||||
dw.family_f_hours, /* 가족노동(여) */
|
||||
dw.hired_m_hours, /* 고용노동(남) */
|
||||
dw.hired_f_hours, /* 고용노동(여) */
|
||||
dw.shared_m_hours, /* 품앗이(남) */
|
||||
dw.shared_f_hours, /* 품앗이(여) */
|
||||
dw.volunteer_m_hours, /* 일손돕기(남) */
|
||||
dw.volunteer_f_hours, /* 일손돕기(여) */
|
||||
dw.updated_by, /* 최종수정자 */
|
||||
dw.updated_at /* 최종수정날짜 */
|
||||
FROM daily_work dw
|
||||
LEFT JOIN uicode ui_area
|
||||
ON ui_area.parent_id = 'code.record.unit'
|
||||
AND ui_area.id = dw.area_unit_code
|
||||
LEFT JOIN uicode ui_harvest
|
||||
ON ui_harvest.parent_id = 'code.record.unit'
|
||||
AND ui_harvest.id = dw.harvest_unit_code
|
||||
WHERE dw.daily_record_seq = #{recordSeq}
|
||||
AND dw.is_deleted = false
|
||||
</select>
|
||||
|
||||
<select id="getDailyExpenseRecords"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyExpenseRecords">
|
||||
/* getDailyExpenseRecords : 일계부 등록 현황 상세 지출 조회 */
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyExpenseRecords">
|
||||
/* getDailyExpenseRecords : 일계부 등록 현황 상세 지출 조회 */
|
||||
SELECT de.id, /* 지출 id */
|
||||
de.input_type, /* 입력구분 */
|
||||
de.is_credit, /* 외상판매여부 */
|
||||
de.category_self, /* 지출 종류 코드 */
|
||||
de.expense_kind, /* 지출 종류 */
|
||||
de.source_purpose, /* 지출원(용도) */
|
||||
de.quantity, /* 수량 */
|
||||
de.unit_code, /* 단위 */
|
||||
@@ -88,28 +99,30 @@
|
||||
de.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(de.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_expense de
|
||||
LEFT JOIN uicode ui_unit ON ui_unit.parent_id = 'code.record.unit' AND ui_unit.id = de.unit_code
|
||||
LEFT JOIN uicode ui_unit
|
||||
ON ui_unit.parent_id = 'code.record.unit'
|
||||
AND ui_unit.id = de.unit_code
|
||||
WHERE de.daily_record_seq = #{recordSeq}
|
||||
AND de.is_deleted = false
|
||||
</select>
|
||||
|
||||
<select id="getDailyPowerRecords"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyPowerRecords">
|
||||
/* getDailyPowerRecords : 일계부 등록 현황 상세 동력사용시간 조회 */
|
||||
SELECT dp.id, /* 동력사용시간 id */
|
||||
dp.equipment_name, /* 명칭 */
|
||||
dp.owned_hours, /* 자가 사용시간 */
|
||||
dp.leased_hours, /* 임가 사용시간 */
|
||||
dp.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(dp.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_power dp
|
||||
WHERE dp.daily_record_seq = #{recordSeq}
|
||||
AND dp.is_deleted = false
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyPowerRecords">
|
||||
/* getDailyPowerRecords : 일계부 등록 현황 상세 동력사용시간 조회 */
|
||||
SELECT dp.id, /* 동력사용시간 id */
|
||||
dp.equipment_name, /* 명칭 */
|
||||
dp.owned_hours, /* 자가 사용시간 */
|
||||
dp.leased_hours, /* 임가 사용시간 */
|
||||
dp.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(dp.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_power dp
|
||||
WHERE dp.daily_record_seq = #{recordSeq}
|
||||
AND dp.is_deleted = false
|
||||
</select>
|
||||
|
||||
<select id="getDailyForestryRecords"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyForestryRecords">
|
||||
/* getDailyForestryRecords : 일계부 등록 현황 상세 자가임업 생산물 중 자가소비량 조회 */
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyForestryRecords">
|
||||
/* getDailyForestryRecords : 일계부 등록 현황 상세 자가임업 생산물 중 자가소비량 조회 */
|
||||
SELECT df.id, /* 자가임업 id */
|
||||
df.product_name, /* 생산물 */
|
||||
df.usage, /* 용도 */
|
||||
@@ -120,27 +133,38 @@
|
||||
df.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(df.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_forestry df
|
||||
LEFT JOIN uicode ui_unit ON ui_unit.parent_id = 'code.record.unit' AND ui_unit.id = df.unit_code
|
||||
LEFT JOIN uicode ui_unit
|
||||
ON ui_unit.parent_id = 'code.record.unit'
|
||||
AND ui_unit.id = df.unit_code
|
||||
WHERE df.daily_record_seq = #{recordSeq}
|
||||
AND df.is_deleted = false
|
||||
</select>
|
||||
|
||||
<select id="getDailyFarmingRecords"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordStatusDetail.ports.application.domain.GetDailyFarmingRecords">
|
||||
/* getDailyFarmingRecords : 일계부 등록 현황 상세 자가농업 생산물 중 자가소비량 조회 */
|
||||
SELECT df.id, /* 자가농업 id */
|
||||
df.product_name, /* 생산물 */
|
||||
df.usage, /* 용도 */
|
||||
df.quantity, /* 수량 */
|
||||
df.unit_code, /* 단위 코드 */
|
||||
ui_unit.code_text AS unit_text, /* 단위 코드 텍스트 */
|
||||
df.estimated_value, /* 현물평가액 */
|
||||
df.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(df.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_farming df
|
||||
LEFT JOIN uicode ui_unit ON ui_unit.parent_id = 'code.record.unit' AND ui_unit.id = df.unit_code
|
||||
WHERE df.daily_record_seq = #{recordSeq}
|
||||
AND df.is_deleted = false
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordStatusDetail.ports.application.domain.GetDailyFarmingRecords">
|
||||
/* getDailyFarmingRecords : 일계부 등록 현황 상세 자가농업 생산물 중 자가소비량 조회 */
|
||||
SELECT df.id, /* 자가농업 id */
|
||||
CASE
|
||||
WHEN df.product_self is not null
|
||||
THEN df.product_self
|
||||
ELSE ui_product.code_text
|
||||
END AS product_name, /* 생산물명 */
|
||||
df.usage, /* 용도 */
|
||||
df.quantity, /* 수량 */
|
||||
df.unit_code, /* 단위 코드 */
|
||||
ui_unit.code_text AS unit_text, /* 단위 코드 텍스트 */
|
||||
df.estimated_value, /* 현물평가액 */
|
||||
df.updated_by, /* 최종수정자 */
|
||||
TO_CHAR(df.updated_at, 'YYYY-MM-DD HH24:MI') AS updated_at /* 최종수정날짜 */
|
||||
FROM daily_farming df
|
||||
LEFT JOIN uicode ui_product
|
||||
ON ui_product.parent_id = 'code.record.farming'
|
||||
AND ui_product.id = df.product_code
|
||||
LEFT JOIN uicode ui_unit
|
||||
ON ui_unit.parent_id = 'code.record.unit'
|
||||
AND ui_unit.id = df.unit_code
|
||||
WHERE df.daily_record_seq = #{recordSeq}
|
||||
AND df.is_deleted = false
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -2,9 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.household.getDailyRecordsCount.adapters.persistence.GetDailyRecordsCountMapper">
|
||||
namespace="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordsCount.adapters.persistence.GetDailyRecordsCountMapper">
|
||||
<select id="getDailyRecordsCount"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordsCount.ports.application.domain.GetDailyRecordsCount">
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordsCount.ports.application.domain.GetDailyRecordsCount">
|
||||
/* getDailyRecordsCount : 일계부 상태 요약 및 진행률 조회 */
|
||||
WITH month_check AS (
|
||||
SELECT #{recordMonth} = TO_CHAR(CURRENT_DATE, 'YYYYMM') AS is_current_month
|
||||
@@ -26,6 +26,7 @@
|
||||
AND dr.record_month = #{recordMonth}
|
||||
AND dr.is_deleted = false
|
||||
)
|
||||
|
||||
SELECT
|
||||
COUNT(*) FILTER (WHERE all_status = 'DONE') AS done_count,
|
||||
COUNT(*) FILTER (WHERE all_status = 'EMPTY') AS empty_count,
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.household.getDailyRecordsStatus.adapters.persistence.GetDailyRecordsStatusMapper">
|
||||
namespace="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordsStatus.adapters.persistence.GetDailyRecordsStatusMapper">
|
||||
<select id="getDailyRecordsStatus"
|
||||
resultType="app.module.admin.usecase.household.getDailyRecordsStatus.ports.application.domain.GetDailyRecordsStatus">
|
||||
resultType="app.module.admin.usecase.household.tab.dailyRecord.getDailyRecordsStatus.ports.application.domain.GetDailyRecordsStatus">
|
||||
/* getDailyRecordsStatus : 일계부 등록 현황 리스트 조회 */
|
||||
WITH data_counts AS (
|
||||
SELECT
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.household.getForestProductsStatus.adapters.persistence.GetForestProductsStatusMapper">
|
||||
namespace="app.module.admin.usecase.household.tab.forestProduct.getForestProductsStatus.adapters.persistence.GetForestProductsStatusMapper">
|
||||
|
||||
<select id="getMonthlyStatus" resultType="java.lang.String">
|
||||
/* getMonthlyStatus : 임산물 현황 등록 상태 조회 */
|
||||
@@ -14,7 +14,7 @@
|
||||
</select>
|
||||
|
||||
<select id="getForestProductsStatus"
|
||||
resultType="app.module.admin.usecase.household.getForestProductsStatus.ports.application.domain.GetForestProductsStatus">
|
||||
resultType="app.module.admin.usecase.household.tab.forestProduct.getForestProductsStatus.ports.application.domain.GetForestProductsStatus">
|
||||
/* getForestProductsStatus : 임가 현황의 임산물 현황 목록 조회 */
|
||||
SELECT df.id, /* 임산물 현황 id */
|
||||
df.street_num, /* 지번 */
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper
|
||||
namespace="app.module.admin.usecase.household.getHouseholdVisitInfos.adapters.persistence.GetHouseholdVisitInfosMapper">
|
||||
namespace="app.module.admin.usecase.household.tab.householdVisit.getHouseholdVisitInfos.adapters.persistence.GetHouseholdVisitInfosMapper">
|
||||
<select id="getHouseholdVisitInfos"
|
||||
resultType="app.module.admin.usecase.household.getHouseholdVisitInfos.ports.application.domain.GetHouseholdVisitInfos">
|
||||
resultType="app.module.admin.usecase.household.tab.householdVisit.getHouseholdVisitInfos.ports.application.domain.GetHouseholdVisitInfos">
|
||||
/* getHouseholdVisitInfos : 임가방문정보 리스트 조회 */
|
||||
SELECT hv.id,
|
||||
hv.visit_date,
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
<select id="getHouseholdsStatus"
|
||||
resultType="app.module.admin.usecase.household.getHouseholdsStatus.ports.application.domain.GetHouseholdsStatus">
|
||||
/* getHouseholdsStatus : 임가현황 리스트 조회 */
|
||||
WITH daily_progress AS (
|
||||
WITH month_check AS (
|
||||
SELECT #{cmd.recordMonth} = TO_CHAR(CURRENT_DATE, 'YYYYMM') AS is_current_month
|
||||
),
|
||||
daily_progress AS (
|
||||
/* 임가별 이번달 완료된 일 수 계산 */
|
||||
SELECT
|
||||
household_seq,
|
||||
@@ -15,13 +18,16 @@
|
||||
FROM daily_record
|
||||
WHERE record_month = #{cmd.recordMonth}
|
||||
AND all_status IN ('DONE', 'TODAY_NONE')
|
||||
AND is_deleted = false
|
||||
GROUP BY household_seq
|
||||
),
|
||||
total_days AS (
|
||||
/* 오늘 날짜 기준 전체 입력 가능 날짜 수 */
|
||||
SELECT COUNT(*) as total_possible_days
|
||||
FROM daily_day_group
|
||||
WHERE end_day <= EXTRACT(DAY FROM CURRENT_DATE)
|
||||
FROM daily_day_group ddg
|
||||
CROSS JOIN month_check mc
|
||||
WHERE NOT (mc.is_current_month AND ddg.start_day > EXTRACT(DAY FROM CURRENT_DATE))
|
||||
AND ddg.is_deleted = false
|
||||
),
|
||||
visit_summary AS (
|
||||
/* 임가별 1차임가방문, 2차임가방문, 답례품전달여부 */
|
||||
@@ -32,8 +38,8 @@
|
||||
BOOL_OR(v.is_gift_sent) AS is_gift_sent
|
||||
FROM household_visit v
|
||||
JOIN researcher_has_household rhh ON v.household_seq = rhh.household_seq
|
||||
WHERE rhh.is_deleted = false
|
||||
AND TO_CHAR(v.visit_date, 'YYYYMM') = #{cmd.recordMonth}
|
||||
WHERE TO_CHAR(v.visit_date, 'YYYYMM') = #{cmd.recordMonth}
|
||||
AND rhh.is_deleted = false
|
||||
GROUP BY rhh.household_seq
|
||||
)
|
||||
SELECT
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
<select id="getPopupResearchers"
|
||||
resultType="app.module.admin.usecase.household.getPopupResearchers.ports.application.domain.GetPopupResearchers">
|
||||
SELECT
|
||||
a.seq AS adminSeq,
|
||||
a.seq AS adminSeq,
|
||||
a.name,
|
||||
a.phone,
|
||||
u.code_text AS regionMainName,
|
||||
u.code_text AS regionMainName,
|
||||
COUNT(DISTINCT rhh.household_seq) AS householdCount,
|
||||
COUNT(*) OVER() AS total
|
||||
FROM admin a
|
||||
JOIN admin_has_role ahr
|
||||
ON a.seq = ahr.admin_seq
|
||||
AND ahr.role_id = 'ROLE_RESEARCHER'
|
||||
AND ahr.is_deleted = false
|
||||
LEFT JOIN uicode u
|
||||
ON u.parent_id = 'code.region.main'
|
||||
AND u.id = a.region_main_code
|
||||
LEFT JOIN researcher_has_household rhh
|
||||
ON rhh.admin_seq = a.seq
|
||||
AND rhh.is_deleted = false
|
||||
JOIN admin_has_role ahr
|
||||
ON a.seq = ahr.admin_seq
|
||||
AND ahr.role_id = 'ROLE_RESEARCHER'
|
||||
AND ahr.is_deleted = false
|
||||
LEFT JOIN uicode u
|
||||
ON u.parent_id = 'code.region.main'
|
||||
AND u.id = a.region_main_code
|
||||
LEFT JOIN researcher_has_household rhh
|
||||
ON rhh.admin_seq = a.seq
|
||||
AND rhh.is_deleted = false
|
||||
WHERE a.is_deleted = false AND a.account_disabled = false
|
||||
|
||||
<if test="cmd.searchField != null and cmd.searchField != '' and cmd.searchValue != ''">
|
||||
|
||||
@@ -31,6 +31,7 @@ uri.admin.addons.email.create=Email \uBC1C\uC1A1\uD3FC
|
||||
uri.admin.household=\uC784\uAC00 \uD604\uD669
|
||||
uri.admin.household.households=\uC784\uAC00 \uD604\uD669
|
||||
uri.admin.household.households.create=\uC784\uAC00 \uB4F1\uB85D
|
||||
uri.admin.household.households.update.{{pathVar}}=\uC784\uAC00 \uC218\uC815
|
||||
uri.admin.household.households.view.{{pathVar}}=\uC784\uAC00 \uC0C1\uC138
|
||||
|
||||
uri.admin.researcher=\uC870\uC0AC\uC6D0 \uD604\uD669
|
||||
|
||||
@@ -51,12 +51,12 @@ let uiUtil = {
|
||||
<div class="row">
|
||||
<nav class="component-pagination" aria-label="Page navigation example">
|
||||
|
||||
<a href="#" class="page-link pagination-item first ${isFirstPage ? 'disabled' : ''}""
|
||||
<a href="#" class="page-link pagination-item first ${isFirstPage ? 'disabled' : ''}"
|
||||
aria-label="First" data-target-page="${firstPage}">
|
||||
<span class="hide-txt">첫 페이지로 이동</span>
|
||||
</a>
|
||||
|
||||
<a href="#" class="page-link pagination-item prev ${isFirstPage ? 'disabled' : ''}""
|
||||
<a href="#" class="page-link pagination-item prev ${isFirstPage ? 'disabled' : ''}"
|
||||
aria-label="Previous" data-target-page="${curPageNo === 0 ? null : curPageNo - 1}">
|
||||
<span class="hide-txt">이전 페이지로 이동</span>
|
||||
</a>
|
||||
@@ -84,11 +84,11 @@ let uiUtil = {
|
||||
const isLastPage = curPageNo === totalPages - 1 || totalPages === 0;
|
||||
let frag3 =
|
||||
`
|
||||
<a href="#" class="page-link pagination-item next ${isLastPage ? 'disabled' : ''}""
|
||||
<a href="#" class="page-link pagination-item next ${isLastPage ? 'disabled' : ''}"
|
||||
aria-label="Next" data-target-page="${curPageNo == totalPages - 1 || totalPages == 0 ? null : curPageNo + 1}">
|
||||
<span class="hide-txt">다음 페이지로 이동</span>
|
||||
</a>
|
||||
<a href="#" class="page-link pagination-item last ${isLastPage ? 'disabled' : ''}""
|
||||
<a href="#" class="page-link pagination-item last ${isLastPage ? 'disabled' : ''}"
|
||||
aria-label="Last" data-target-page="${totalPages - 1}">
|
||||
<span class="hide-txt">마지막 페이지로 이동</span>
|
||||
</a>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
</table>
|
||||
|
||||
<!-- 페이지네이션 -->
|
||||
<div class="row paging"></div>
|
||||
<div class="row modal-paging"></div>
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
@@ -190,7 +190,7 @@
|
||||
}
|
||||
|
||||
// Pagination 구성하기
|
||||
const paging = $('.paging');
|
||||
const paging = $('.modal-paging');
|
||||
paging.empty();
|
||||
paging.append(
|
||||
uiUtil.getPagingUI(pageNo, f.size.value, response.totalPages,
|
||||
|
||||
@@ -334,8 +334,8 @@
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="underline"><a href="/household/households/${ct.householdSeq}">${ct.householdNum}</a></td><!-- 임가번호 -->
|
||||
<td class="underline"><a href="/household/households/${ct.householdSeq}">${ct.householdName}</a></td><!-- 경영주 이름 -->
|
||||
<td class="underline"><a href="/household/households/${ct.householdSeq}?recordMonth=${f.recordMonth.value}">${ct.householdNum}</a></td><!-- 임가번호 -->
|
||||
<td class="underline"><a href="/household/households/${ct.householdSeq}?recordMonth=${f.recordMonth.value}">${ct.householdName}</a></td><!-- 경영주 이름 -->
|
||||
<td>${ct.householdPhone}</td><!-- 경영주 번호 -->
|
||||
<td>${ct.regionMainName}</td><!-- 실사 -->
|
||||
<td>${ct.regionSubName}</td><!-- 지역 -->
|
||||
|
||||
@@ -0,0 +1,269 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
|
||||
layout:decorate="~{layout/layout}">
|
||||
|
||||
<section layout:fragment="content">
|
||||
<form autocomplete="off" method="get" name="reqForm">
|
||||
<div class="content-inner">
|
||||
<!-- 테이블 영역 -->
|
||||
<table class="type-form">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>임가번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="d-flex">
|
||||
<div class="component-input">
|
||||
<div class="d-flex">
|
||||
<div class="input-field">
|
||||
<input type="number" name="householdNum" id="householdNum"
|
||||
placeholder=""
|
||||
oninput="numberMaxLengthChk(this, 5);">
|
||||
</div>
|
||||
<button type="button" class="btn" onclick="checkHouseholdNum();">
|
||||
<span class="btn-txt">중복확인</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>경영주명<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="ownerName" name="ownerName" placeholder="" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>연령(만 나이)<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="ownerAge" name="ownerAge" placeholder=""
|
||||
oninput="numberMaxLengthChk(this, 3);">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>가구 연락처</th>
|
||||
<td>
|
||||
<div class="d-flex">
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="tel1">
|
||||
<option value="" disabled hidden>선택해주세요.</option>
|
||||
<option value="02">02</option>
|
||||
<option value="031" selected>031</option>
|
||||
<option value="032">032</option>
|
||||
<option value="033">033</option>
|
||||
<option value="041">041</option>
|
||||
<option value="042">042</option>
|
||||
<option value="043">043</option>
|
||||
<option value="044">044</option>
|
||||
<option value="051">051</option>
|
||||
<option value="052">052</option>
|
||||
<option value="053">053</option>
|
||||
<option value="054">054</option>
|
||||
<option value="055">055</option>
|
||||
<option value="061">061</option>
|
||||
<option value="062">062</option>
|
||||
<option value="063">063</option>
|
||||
<option value="064">064</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="tel2" name="tel2" placeholder=""
|
||||
oninput="numberMaxLengthChk(this, 4);">
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" id="tel3" name="tel3" placeholder=""
|
||||
oninput="numberMaxLengthChk(this, 4);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<th>휴대폰 번호<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="d-flex">
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="phone1" required>
|
||||
<option value="" disabled hidden>선택해주세요.</option>
|
||||
<option value="010" selected>010</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" name="phone2" id="phone2" placeholder=""
|
||||
oninput="numberMaxLengthChk(this, 4);">
|
||||
</div>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="number" name="phone3" id="phone3" placeholder=""
|
||||
oninput="numberMaxLengthChk(this, 4);">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>실사<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionMainCode" required>
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionMainList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th>지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionSubCode" required>
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionSubList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th>세부 지역<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="regionDetailCode" required>
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${regionDetailList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>전체 주소<i class="ico-required-mark" role="img" aria-label="필수">*</i></th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" name="address" id="address" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>업종 대분류</th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="industryLargeCode">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${industryLargeList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th>업종 중분류1</th>
|
||||
<td>
|
||||
<div class="component-select">
|
||||
<select class="select-list" name="industryMiddleCode">
|
||||
<option value="">전체</option>
|
||||
<option th:each="item : ${industryMiddleList}"
|
||||
th:value="${item.id}"
|
||||
th:text="${item.codeValue + '. ' + item.codeText}">
|
||||
</select>
|
||||
</div>
|
||||
</td>
|
||||
<th>업종 중분류2</th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="industrySubMiddle" name="industrySubMiddle" placeholder="" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>세부품목</th>
|
||||
<td>
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" id="industryDetail" name="industryDetail" placeholder="" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>담당 조사원</th>
|
||||
<td>
|
||||
<div class="d-flex">
|
||||
<div class="component-input">
|
||||
<div class="input-field">
|
||||
<input type="text" name="researcherName" id="researcherName" placeholder="">
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="btn" onclick="showResearcherModal();">
|
||||
<span class="btn-txt">검색</span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>유지 여부</th>
|
||||
<td class="radio-group">
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="isPanel_Y" name="isPanel" value="true" checked>
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">유지</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="component-input">
|
||||
<label class="radio-inner">
|
||||
<input type="radio" id="isPanel_N" name="isPanel" value="false">
|
||||
<span class="radio-item">
|
||||
<span class="radio-txt">탈락</span>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>비고</th>
|
||||
<td colspan="5">
|
||||
<div class="component-input">
|
||||
<div class="input-textarea-field">
|
||||
<textarea id="memo" name="memo" class="textarea" placeholder=""></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn btn-secondary" onclick="location.href='/household/households'">
|
||||
<span class="btn-txt">취소</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary" onclick="createHousehold();">
|
||||
<span class="btn-txt">등록</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
<script th:inline="javascript">
|
||||
|
||||
</script>
|
||||
</section>
|
||||
|
||||
</html>
|
||||
@@ -99,10 +99,10 @@
|
||||
|
||||
<div class="component-btns bottom-btn-group">
|
||||
<div class="btns-row align-right">
|
||||
<button type="button" class="btn">
|
||||
<button type="button" class="btn" th:if="${userRole == 'ROLE_ADMIN'}" onclick="showResearcherModal();">
|
||||
<span class="btn-txt">조사원 매핑</span>
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary">
|
||||
<button type="button" class="btn btn-primary" onclick="goUpdateForm();">
|
||||
<span class="btn-txt">수정</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -121,7 +121,8 @@
|
||||
<select class="select-list" name="recordMonth" required onchange="onRecordMonthChange();">
|
||||
<option th:each="m : ${monthList}"
|
||||
th:value="${m.value}"
|
||||
th:text="${m.label}">2025년 5월</option>
|
||||
th:text="${m.label}"
|
||||
th:selected="${m.value == recordMonth}">2025년 5월</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -604,6 +605,8 @@
|
||||
</section>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div th:replace="common/modal-researcher-mapping :: modalFragment"></div>
|
||||
</section>
|
||||
|
||||
<section layout:fragment="script">
|
||||
@@ -792,7 +795,7 @@
|
||||
</td>
|
||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상판매 -->
|
||||
<td>${ifNullHyphen(item.cropText)}</td><!-- 재배형태 -->
|
||||
<td class="underline">${ifNullHyphen(item.categorySelf)}</td><!-- 수입의 종류 -->
|
||||
<td class="underline">${ifNullHyphen(item.incomeKind)}</td><!-- 수입의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
@@ -832,11 +835,12 @@
|
||||
</label>
|
||||
</div>
|
||||
</td>
|
||||
<td class="underline">${ifNullHyphen(item.itemCode)}</td><!-- 품목명 -->
|
||||
<td>${ifNullHyphen(item.workCode)}</td><!-- 작업명 -->
|
||||
<td class="align-right">${ifNullHyphen(item.workLandArea)}</td><!-- 작업 면적 -->
|
||||
<td>${ifNullHyphen(item.harvestQuantity)}</td><!-- 수확량 -->
|
||||
<td>${ifNullHyphen(item.cropText)}</td><!-- 단위 -->
|
||||
<td class="underline">${ifNullHyphen(item.itemName)}</td><!-- 품목명 -->
|
||||
<td>${ifNullHyphen(item.workName)}</td><!-- 작업명 -->
|
||||
<td class="align-right">${ifNullHyphen(item.workLandArea)}</td><!-- 작업면적 -->
|
||||
<td>${ifNullHyphen(item.areaUnitSelf != null ? item.areaUnitSelf : item.areaUnitCodeText)}</td><!-- 작업면적 단위 -->
|
||||
<td class="align-right">${ifNullHyphen(item.harvestQuantity)}</td><!-- 수확량 -->
|
||||
<td>${ifNullHyphen(item.harvestUnitSelf != null ? item.harvestUnitSelf : item.harvestUnitCodeText)}</td><!-- 수확량 단위 -->
|
||||
<td>${ifNullHyphen(item.ownerTime)}</td><!-- 경영주 시간 -->
|
||||
<td>${ifNullHyphen(item.spouseTime)}</td><!-- 배우자 시간 -->
|
||||
<td>${ifNullHyphen(item.familyMHours)}</td><!-- 가족노동(남) -->
|
||||
@@ -882,9 +886,9 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>${item.isCredit ? "Y" : "N"}</td> <!-- 외상 또는 카드구입 -->
|
||||
<td class="underline">${ifNullHyphen(item.categorySelf)}</td><!-- 지출의 종류 -->
|
||||
<td class="underline">${ifNullHyphen(item.expenseKind)}</td><!-- 지출의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
|
||||
<td>${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td class="align-right">${ifNullHyphen(item.quantity)}</td><!-- 수량 -->
|
||||
<td>${item.unitSelf != null && item.unitSelf !== '' ? item.unitSelf : ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
<td class="align-right">${formatNumberWithComma(item.estimatedValue)}</td><!-- 현물평가액 -->
|
||||
@@ -1159,6 +1163,7 @@
|
||||
);
|
||||
}
|
||||
|
||||
// 은행자동이체내역 수입 테이블 그리기
|
||||
const gridBankIncomeTable = (data) => {
|
||||
const tbody = $('#table-bank-income tbody');
|
||||
tbody.empty();
|
||||
@@ -1185,7 +1190,7 @@
|
||||
<td class="underline">${ifNullHyphen(item.categoryText)}</td> <!-- 수입의 종류 -->
|
||||
<td>${ifNullHyphen(item.target)}</td><!-- 대상 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 수입원 -->
|
||||
<td>${ifNullHyphen(item.count)}</td><!-- 수량 -->
|
||||
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
</tr>
|
||||
@@ -1195,6 +1200,7 @@
|
||||
tbody.append(tmpl);
|
||||
}
|
||||
|
||||
// 은행자동이체내역 수출 테이블 그리기
|
||||
const gridBankExpenseTable = (data) => {
|
||||
const tbody = $('#table-bank-expense tbody');
|
||||
tbody.empty();
|
||||
@@ -1219,7 +1225,7 @@
|
||||
</td>
|
||||
<td class="underline">${ifNullHyphen(item.categoryText)}</td> <!-- 지출의 종류 -->
|
||||
<td>${ifNullHyphen(item.sourcePurpose)}</td><!-- 용도 -->
|
||||
<td>${ifNullHyphen(item.count)}</td><!-- 수량 -->
|
||||
<td class="align-right">${ifNullHyphen(item.count)}</td><!-- 수량 -->
|
||||
<td>${ifNullHyphen(item.unitText)}</td><!-- 단위 -->
|
||||
<td class="align-right">${formatNumberWithComma(item.price)}</td><!-- 현금(원) -->
|
||||
</tr>
|
||||
@@ -1230,6 +1236,46 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 조사원 매핑 팝업의 선택된 조사원 가져오기.
|
||||
const getSelectedResearcher = (data, closeModal) => {
|
||||
const f = document.reqForm;
|
||||
|
||||
ajaxUtil._ajaxMethod(
|
||||
'/api/household/researcherMapping/create',
|
||||
JSON.stringify({
|
||||
adminSeq: data.adminSeq,
|
||||
householdSeqs: [Number(f.householdSeq.value)]
|
||||
}),
|
||||
() => { // 성공
|
||||
alert("등록이 완료되었습니다.");
|
||||
closeModal();
|
||||
|
||||
// 새로고침이 버벅거려서 일단 setTimeout 처리..
|
||||
setTimeout(() => {
|
||||
location.reload();
|
||||
}, 200);
|
||||
},
|
||||
function (code, rstData) {
|
||||
if(code == 422) alert(rstData.responseText);
|
||||
if(code == 400) alert(rstData.responseJSON.message); //임가번호 중복체크
|
||||
},
|
||||
'post',
|
||||
'json',
|
||||
{ handle422Type: 'alert' }
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 수정 폼으로 가기
|
||||
const goUpdateForm = () => {
|
||||
const f = document.reqForm;
|
||||
|
||||
location.href = '/household/households/update/' + f.householdSeq.value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// 일계부 등록 현황 nodata 처리
|
||||
const noDataDaily = (target, status, length) => {
|
||||
|
||||
Reference in New Issue
Block a user