select tenant_id, revision, created_by, created_time, updated_by, updated_time, delete_by, delete_time, dept_id, role_id, bill_model_no, bill_model_name, field_code, company_name, company_id, bill_model_point, org_name, org_id, id, data_state, use_state, field_name,model_type from dc_busi_bill_model_master
insert into dc_busi_bill_model_master
tenant_id,
revision,
created_by,
created_time,
updated_by,
updated_time,
delete_by,
delete_time,
dept_id,
role_id,
bill_model_no,
bill_model_name,
field_code,
company_name,
company_id,
bill_model_point,
org_name,
org_id,
data_state,
use_state,
field_name,
model_type,
#{tenantId},
#{revision},
#{createdBy},
#{createdTime},
#{updatedBy},
#{updatedTime},
#{deleteBy},
#{deleteTime},
#{deptId},
#{roleId},
#{billModelNo},
#{billModelName},
#{fieldCode},
#{companyName},
#{companyId},
#{billModelPoint},
#{orgName},
#{orgId},
#{dataState},
#{useState},
#{fieldName},
#{modelType},
update dc_busi_bill_model_master
tenant_id = #{tenantId},
revision = #{revision},
created_by = #{createdBy},
created_time = #{createdTime},
updated_by = #{updatedBy},
updated_time = #{updatedTime},
delete_by = #{deleteBy},
delete_time = #{deleteTime},
dept_id = #{deptId},
role_id = #{roleId},
bill_model_no = #{billModelNo},
bill_model_name = #{billModelName},
field_code = #{fieldCode},
company_name = #{companyName},
company_id = #{companyId},
bill_model_point = #{billModelPoint},
org_name = #{orgName},
org_id = #{orgId},
data_state = #{dataState},
use_state = #{useState},
field_name = #{fieldName},
model_type =#{modelType},
where id = #{id}
delete from dc_busi_bill_model_master where id = #{id}
delete from dc_busi_bill_model_master where bill_model_no = #{billNo}
delete from dc_busi_bill_model_master where id in
#{id}
delete from dc_busi_bill_model_sub where bill_model_no in
#{billModelNo}
delete from dc_busi_bill_model_sub where bill_model_no = #{billModelNo}
insert into dc_busi_bill_model_sub( bill_model_no, asset_code, asset_name, asset_unit_code, asset_unit_name, asset_unit_type, id, asset_id,a_unit,asset_unit_alials_name) values
( #{item.billModelNo}, #{item.assetCode}, #{item.assetName}, #{item.assetUnitCode}, #{item.assetUnitName}, #{item.assetUnitType}, #{item.id}, #{item.assetId},#{item.aUnit},#{item.assetUnitAlialsName})