select thisTab.id, thisTab.customer_type, thisTab.customer_short_name, thisTab.customer_code, thisTab.customer_full_name, thisTab.business_registration_number, thisTab.address, thisTab.contact_name, thisTab.contact_phone, thisTab.contact_email, thisTab.business_contact_name, thisTab.business_contact_phone, thisTab.business_contact_email, thisTab.credit_rating, thisTab.credit_limit_amount, thisTab.credit_limit_quantity, thisTab.operating_status, thisTab.contract_status, thisTab.data_status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark from tms_settlement_entity AS thisTab
select count(0) from tms_settlement_entity as thisTab
and thisTab.customer_type = #{customerType}
and thisTab.customer_short_name like concat('%', #{customerShortName}, '%')
and thisTab.customer_code = #{customerCode}
and thisTab.contact_name like concat('%', #{contactName}, '%')
and thisTab.business_contact_name like concat('%', #{businessContactName}, '%')
and thisTab.credit_rating = #{creditRating}
and thisTab.credit_limit_amount = #{creditLimitAmount}
and thisTab.credit_limit_quantity = #{creditLimitQuantity}
and thisTab.operating_status = #{operatingStatus}
and thisTab.contract_status = #{contractStatus}
and thisTab.data_status = #{dataStatus}
insert into tms_settlement_entity
customer_type,
customer_short_name,
customer_code,
customer_full_name,
business_registration_number,
address,
contact_name,
contact_phone,
contact_email,
business_contact_name,
business_contact_phone,
business_contact_email,
credit_rating,
credit_limit_amount,
credit_limit_quantity,
operating_status,
contract_status,
data_status,
create_by,
create_time,
update_by,
update_time,
remark,
#{customerType},
#{customerShortName},
#{customerCode},
#{customerFullName},
#{businessRegistrationNumber},
#{address},
#{contactName},
#{contactPhone},
#{contactEmail},
#{businessContactName},
#{businessContactPhone},
#{businessContactEmail},
#{creditRating},
#{creditLimitAmount},
#{creditLimitQuantity},
#{operatingStatus},
#{contractStatus},
#{dataStatus},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
insert into tms_settlement_entity
id,customer_type,customer_short_name,customer_code,customer_full_name,business_registration_number,address,contact_name,contact_phone,contact_email,business_contact_name,business_contact_phone,business_contact_email,credit_rating,credit_limit_amount,credit_limit_quantity,operating_status,contract_status,data_status,create_by,create_time,update_by,update_time,remark,
#{item.id},#{item.customerType},#{item.customerShortName},#{item.customerCode},#{item.customerFullName},#{item.businessRegistrationNumber},#{item.address},#{item.contactName},#{item.contactPhone},#{item.contactEmail},#{item.businessContactName},#{item.businessContactPhone},#{item.businessContactEmail},#{item.creditRating},#{item.creditLimitAmount},#{item.creditLimitQuantity},#{item.operatingStatus},#{item.contractStatus},#{item.dataStatus},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},
update tms_settlement_entity
customer_type = #{customerType},
customer_short_name = #{customerShortName},
customer_code = #{customerCode},
customer_full_name = #{customerFullName},
business_registration_number = #{businessRegistrationNumber},
address = #{address},
contact_name = #{contactName},
contact_phone = #{contactPhone},
contact_email = #{contactEmail},
business_contact_name = #{businessContactName},
business_contact_phone = #{businessContactPhone},
business_contact_email = #{businessContactEmail},
credit_rating = #{creditRating},
credit_limit_amount = #{creditLimitAmount},
credit_limit_quantity = #{creditLimitQuantity},
operating_status = #{operatingStatus},
contract_status = #{contractStatus},
data_status = #{dataStatus},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
where id = #{id}
update tms_settlement_entity
customer_type = #{item.customerType},
customer_short_name = #{item.customerShortName},
customer_code = #{item.customerCode},
customer_full_name = #{item.customerFullName},
business_registration_number = #{item.businessRegistrationNumber},
address = #{item.address},
contact_name = #{item.contactName},
contact_phone = #{item.contactPhone},
contact_email = #{item.contactEmail},
business_contact_name = #{item.businessContactName},
business_contact_phone = #{item.businessContactPhone},
business_contact_email = #{item.businessContactEmail},
credit_rating = #{item.creditRating},
credit_limit_amount = #{item.creditLimitAmount},
credit_limit_quantity = #{item.creditLimitQuantity},
operating_status = #{item.operatingStatus},
contract_status = #{item.contractStatus},
data_status = #{item.dataStatus},
create_by = #{item.createBy},
create_time = #{item.createTime},
update_by = #{item.updateBy},
update_time = #{item.updateTime},
remark = #{item.remark},
where id = #{item.id}
delete from tms_settlement_entity where id = #{id}
delete from tms_settlement_entity where id in
#{id}