select thisTab.id, thisTab.system_code, thisTab.shelf_code, thisTab.shelf_type, thisTab.owner_team_id, thisTab.owner_team_name, thisTab.manufacturer, thisTab.manufacture_date, thisTab.length_mm, thisTab.width_mm, thisTab.height_mm, thisTab.max_load_kg, thisTab.compatible_container_type, thisTab.is_in_use, thisTab.maintenance_status, thisTab.last_maintenance_date, thisTab.next_maintenance_date, thisTab.status, thisTab.create_by, thisTab.create_time, thisTab.update_by, thisTab.update_time, thisTab.remark ,thisTab.self_leas_type from tms_shelf AS thisTab
select count(0) from tms_shelf as thisTab
and thisTab.system_code = #{systemCode}
and thisTab.shelf_code = #{shelfCode}
and thisTab.shelf_type = #{shelfType}
and thisTab.owner_team_id = #{ownerTeamId}
and thisTab.owner_team_name like concat('%', #{ownerTeamName}, '%')
and thisTab.max_load_kg = #{maxLoadKg}
and thisTab.compatible_container_type like concat('%', #{compatibleContainerType}, '%')
and thisTab.is_in_use = #{isInUse}
and thisTab.maintenance_status = #{maintenanceStatus}
and thisTab.status = #{status}
and thisTab.self_leas_type = #{selfLeasType}
insert into tms_shelf
system_code,
shelf_code,
shelf_type,
owner_team_id,
owner_team_name,
manufacturer,
manufacture_date,
length_mm,
width_mm,
height_mm,
max_load_kg,
compatible_container_type,
is_in_use,
maintenance_status,
last_maintenance_date,
next_maintenance_date,
status,
create_by,
create_time,
update_by,
update_time,
remark,
self_leas_type,
#{systemCode},
#{shelfCode},
#{shelfType},
#{ownerTeamId},
#{ownerTeamName},
#{manufacturer},
#{manufactureDate},
#{lengthMm},
#{widthMm},
#{heightMm},
#{maxLoadKg},
#{compatibleContainerType},
#{isInUse},
#{maintenanceStatus},
#{lastMaintenanceDate},
#{nextMaintenanceDate},
#{status},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
#{remark},
#{selfLeasType},
insert into tms_shelf
id,system_code,shelf_code,shelf_type,owner_team_id,owner_team_name,manufacturer,manufacture_date,length_mm,width_mm,height_mm,max_load_kg,compatible_container_type,is_in_use,maintenance_status,last_maintenance_date,next_maintenance_date,status,create_by,create_time,update_by,update_time,remark,self_leas_type,
#{item.id},#{item.systemCode},#{item.shelfCode},#{item.shelfType},#{item.ownerTeamId},#{item.ownerTeamName},#{item.manufacturer},#{item.manufactureDate},#{item.lengthMm},#{item.widthMm},#{item.heightMm},#{item.maxLoadKg},#{item.compatibleContainerType},#{item.isInUse},#{item.maintenanceStatus},#{item.lastMaintenanceDate},#{item.nextMaintenanceDate},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.selfLeasType},
update tms_shelf
system_code = #{systemCode},
shelf_code = #{shelfCode},
shelf_type = #{shelfType},
owner_team_id = #{ownerTeamId},
owner_team_name = #{ownerTeamName},
manufacturer = #{manufacturer},
manufacture_date = #{manufactureDate},
length_mm = #{lengthMm},
width_mm = #{widthMm},
height_mm = #{heightMm},
max_load_kg = #{maxLoadKg},
compatible_container_type = #{compatibleContainerType},
is_in_use = #{isInUse},
maintenance_status = #{maintenanceStatus},
last_maintenance_date = #{lastMaintenanceDate},
next_maintenance_date = #{nextMaintenanceDate},
status = #{status},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
remark = #{remark},
self_leas_type = #{selfLeasType},
where id = #{id}
update tms_shelf
system_code = #{item.systemCode},
shelf_code = #{item.shelfCode},
shelf_type = #{item.shelfType},
owner_team_id = #{item.ownerTeamId},
owner_team_name = #{item.ownerTeamName},
manufacturer = #{item.manufacturer},
manufacture_date = #{item.manufactureDate},
length_mm = #{item.lengthMm},
width_mm = #{item.widthMm},
height_mm = #{item.heightMm},
max_load_kg = #{item.maxLoadKg},
compatible_container_type = #{item.compatibleContainerType},
is_in_use = #{item.isInUse},
maintenance_status = #{item.maintenanceStatus},
last_maintenance_date = #{item.lastMaintenanceDate},
next_maintenance_date = #{item.nextMaintenanceDate},
status = #{item.status},
create_by = #{item.createBy},
create_time = #{item.createTime},
update_by = #{item.updateBy},
update_time = #{item.updateTime},
remark = #{item.remark},
self_leas_type = #{item.selfLeasType},
where id = #{item.id}
delete from tms_shelf where id = #{id}
delete from tms_shelf where id in
#{id}