insert into apply_room_discount(
apply_type,ard_id,create_user_name,create_user_tel,create_remark,check_user_id,check_remark,room_id,room_name,review_user_id,review_remark,start_time,end_time,state,community_id,discount_id,in_use,fee_id,return_way,return_amount,
fixed_discount_value, discounted_amount, discount_archive_date, related_attachments
) values (
#{applyType},#{ardId},#{createUserName},#{createUserTel},#{createRemark},#{checkUserId},#{checkRemark},#{roomId},#{roomName},#{reviewUserId},#{reviewRemark},#{startTime},#{endTime},#{state},
#{communityId},#{discountId},#{inUse},#{feeId},#{returnWay},#{returnAmount},
#{fixedDiscountValue}, #{discountedAmount}, #{discountArchiveDate}, #{relatedAttachments}
)
update apply_room_discount t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.apply_type= #{applyType}
, t.create_user_tel = #{createUserTel}
, t.check_user_id= #{checkUserId}
, t.check_remark= #{checkRemark}
, t.room_id= #{roomId}
, t.room_name= #{roomName}
, t.review_user_id= #{reviewUserId}
, t.review_remark= #{reviewRemark}
, t.start_time= #{startTime}
, t.end_time= #{endTime}
, t.state= #{state}
, t.community_id= #{communityId}
, t.discount_id= #{discountId}
, t.in_use= #{inUse}
, t.fee_id= #{feeId}
, t.return_way= #{returnWay}
, t.return_amount= #{returnAmount}
, t.fixed_discount_value= #{fixedDiscountValue}
, t.discounted_amount= #{discountedAmount}
, t.b_id= #{bId}
where 1=1
and t.ard_id= #{ardId}
INSERT INTO house_mail_record
owner_id,
house_id,
send_date,
mail_no,
service_fee,
mail_result,
remark,
callable_id,
#{ownerId},
#{houseId},
#{sendDate},
#{mailNo},
#{serviceFee},
#{mailResult},
#{remark},
#{callableId},
INSERT INTO mail_call_record
mail_id,
call_date,
call_contact,
call_result,
caller,
remark,
#{mailId},
#{callDate},
#{callContact},
#{callResult},
#{caller},
#{remark},
INSERT INTO owner_property_survey
owner_id,
room_id,
survey_warrant_apply_date,
property_survey_date,
name,
extra_date,
#{ownerId},
#{roomId},
#{surveyWarrantApplyDate},
#{propertySurveyDate},
#{name},
#{extraDate},
INSERT INTO court_execution_procedure
owner_id,
apply_time,
judgment_doc_number,
arrears_period,
arrears_amount,
late_fee,
acceptance_fee,
other_fee,
total_amount,
remark,
#{ownerId},
#{applyTime},
#{judgmentDocNumber},
#{arrearsPeriod},
#{arrearsAmount},
#{lateFee},
#{acceptanceFee},
#{otherFee},
#{totalAmount},
#{remark},
INSERT INTO court_trial_procedure
owner_id,
accept_court_name,
judge_name,
judge_contact,
judge_notice_accept_date,
court_mediation_date,
mediation_result,
subpoena_sign_date,
undelivered_date,
court_session_date1,
court_session_date2,
case_number,
court_session_result,
judgment_date,
judgment_result,
remark,
callable_id,
#{ownerId},
#{acceptCourtName},
#{judgeName},
#{judgeContact},
#{judgeNoticeAcceptDate},
#{courtMediationDate},
#{mediationResult},
#{subpoenaSignDate},
#{undeliveredDate},
#{courtSessionDate1},
#{courtSessionDate2},
#{caseNumber},
#{courtSessionResult},
#{judgmentDate},
#{judgmentResult},
#{remark},
#{callableId}