/* updateHousehold : 임가 정보 수정 */
UPDATE household
SET
owner_name = #{ownerName},
owner_age = #{ownerAge},
tel = #{tel},
phone = #{phone},
region_main_code = #{regionMainCode},
region_sub_code = #{regionSubCode},
region_detail_code = #{regionDetailCode},
address = #{address},
industry_large_code = #{industryLargeCode},
industry_middle_code = #{industryMiddleCode},
industry_sub_middle = #{industrySubMiddle},
industry_detail = #{industryDetail},
is_panel = #{isPanel},
usage_type = #{usageType},
employment_type = #{employmentType},
memo = #{memo},
WHERE seq = #{householdSeq}
/* deleteResearcherHasHousehold : 임가에 매핑된 담당 조사원 삭제 */
UPDATE researcher_has_household
SET
WHERE is_deleted = false
AND household_seq = #{householdSeq}
/* createResearcherHasHousehold : 임가에 담당 조사원 매핑 */
INSERT INTO researcher_has_household
(
id,
admin_seq,
household_seq,
)
VALUES
(
nextval('researcher_has_household_seq'),
#{researcherSeq},
#{householdSeq},
)