select thisTab.id, thisTab.bill_system_no, thisTab.bill_name, thisTab.customer_name, thisTab.dispatch_count, thisTab.total_amount, thisTab.settled_amount, thisTab.invoice_status, thisTab.attachment, thisTab.status, thisTab.remark, thisTab.create_by, thisTab.confirm_time, thisTab.create_time, thisTab.update_time, thisTab.deleted from estimated_receivable_bill AS thisTab
select count(0) from estimated_receivable_bill as thisTab
and thisTab.bill_system_no = #{billSystemNo}
and thisTab.bill_name like concat('%', #{billName}, '%')
and thisTab.customer_name like concat('%', #{customerName}, '%')
and thisTab.dispatch_count = #{dispatchCount}
and thisTab.total_amount = #{totalAmount}
and thisTab.settled_amount = #{settledAmount}
and thisTab.invoice_status = #{invoiceStatus}
and thisTab.attachment = #{attachment}
and thisTab.status = #{status}
and thisTab.confirm_time = #{confirmTime}
and thisTab.deleted = #{deleted}
insert into estimated_receivable_bill
bill_system_no,
bill_name,
customer_name,
dispatch_count,
total_amount,
settled_amount,
invoice_status,
attachment,
status,
remark,
create_by,
confirm_time,
create_time,
update_time,
deleted,
#{billSystemNo},
#{billName},
#{customerName},
#{dispatchCount},
#{totalAmount},
#{settledAmount},
#{invoiceStatus},
#{attachment},
#{status},
#{remark},
#{createBy},
#{confirmTime},
#{createTime},
#{updateTime},
#{deleted},
insert into estimated_receivable_bill
id,bill_system_no,bill_name,customer_name,dispatch_count,total_amount,settled_amount,invoice_status,attachment,status,remark,create_by,confirm_time,create_time,update_time,deleted,
#{item.id},#{item.billSystemNo},#{item.billName},#{item.customerName},#{item.dispatchCount},#{item.totalAmount},#{item.settledAmount},#{item.invoiceStatus},#{item.attachment},#{item.status},#{item.remark},#{item.createBy},#{item.confirmTime},#{item.createTime},#{item.updateTime},#{item.deleted},
update estimated_receivable_bill
bill_system_no = #{billSystemNo},
bill_name = #{billName},
customer_name = #{customerName},
dispatch_count = #{dispatchCount},
total_amount = #{totalAmount},
settled_amount = #{settledAmount},
invoice_status = #{invoiceStatus},
attachment = #{attachment},
status = #{status},
remark = #{remark},
create_by = #{createBy},
confirm_time = #{confirmTime},
create_time = #{createTime},
update_time = #{updateTime},
deleted = #{deleted},
where id = #{id}
update estimated_receivable_bill
bill_system_no = #{item.billSystemNo},
bill_name = #{item.billName},
customer_name = #{item.customerName},
dispatch_count = #{item.dispatchCount},
total_amount = #{item.totalAmount},
settled_amount = #{item.settledAmount},
invoice_status = #{item.invoiceStatus},
attachment = #{item.attachment},
status = #{item.status},
remark = #{item.remark},
create_by = #{item.createBy},
confirm_time = #{item.confirmTime},
create_time = #{item.createTime},
update_time = #{item.updateTime},
deleted = #{item.deleted},
where id = #{item.id}
delete from estimated_receivable_bill where id = #{id}
delete from estimated_receivable_bill where id in
#{id}