| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.tms.mapper.TmsShelfMapper"> |
| | | |
| | | <resultMap type="com.ruoyi.tms.domain.TmsShelf" id="TmsShelfResult"> |
| | |
| | | <result property="shelfCode" column="shelf_code" /> |
| | | <result property="shelfType" column="shelf_type" /> |
| | | <result property="ownerTeamId" column="owner_team_id" /> |
| | | <result property="ownerTeamName" column="owner_team_name" /> |
| | | <result property="manufacturer" column="manufacturer" /> |
| | | <result property="manufactureDate" column="manufacture_date" /> |
| | | <result property="lengthMm" column="length_mm" /> |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectTmsShelfVo"> |
| | | select thisTab.id, thisTab.system_code, thisTab.shelf_code, thisTab.shelf_type, thisTab.owner_team_id, 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 from tms_shelf AS thisTab |
| | | 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 from tms_shelf AS thisTab |
| | | </sql> |
| | | <sql id="selectTmsShelfVoCount"> |
| | | select count(0) from tms_shelf as thisTab |
| | |
| | | <sql id="whereCondition"> |
| | | <if test="systemCode != null and systemCode != ''"> and thisTab.system_code = #{systemCode}</if> |
| | | <if test="shelfCode != null and shelfCode != ''"> and thisTab.shelf_code = #{shelfCode}</if> |
| | | <if test="shelfType != null and shelfType != ''"> and thisTab.shelf_type = #{shelfType}</if> |
| | | <if test="ownerTeamId != null and ownerTeamId != ''"> and thisTab.owner_team_id = #{ownerTeamId}</if> |
| | | <if test="maxLoadKg != null and maxLoadKg != ''"> and thisTab.max_load_kg = #{maxLoadKg}</if> |
| | | <if test="compatibleContainerType != null and compatibleContainerType != ''"> and thisTab.compatible_container_type = #{compatibleContainerType}</if> |
| | | <if test="isInUse != null and isInUse != ''"> and thisTab.is_in_use = #{isInUse}</if> |
| | | <if test="maintenanceStatus != null and maintenanceStatus != ''"> and thisTab.maintenance_status = #{maintenanceStatus}</if> |
| | | <if test="status != null and status != ''"> and thisTab.status = #{status}</if> |
| | | <if test="shelfType != null "> and thisTab.shelf_type = #{shelfType}</if> |
| | | <if test="ownerTeamId != null "> and thisTab.owner_team_id = #{ownerTeamId}</if> |
| | | <if test="ownerTeamName != null and ownerTeamName != ''"> and thisTab.owner_team_name like concat('%', #{ownerTeamName}, '%')</if> |
| | | <if test="maxLoadKg != null "> and thisTab.max_load_kg = #{maxLoadKg}</if> |
| | | <if test="compatibleContainerType != null "> and thisTab.compatible_container_type = #{compatibleContainerType}</if> |
| | | <if test="isInUse != null "> and thisTab.is_in_use = #{isInUse}</if> |
| | | <if test="maintenanceStatus != null "> and thisTab.maintenance_status = #{maintenanceStatus}</if> |
| | | <if test="status != null "> and thisTab.status = #{status}</if> |
| | | </sql> |
| | | |
| | | <!--查询--> |
| | |
| | | <if test="shelfCode != null and shelfCode != ''">shelf_code,</if> |
| | | <if test="shelfType != null">shelf_type,</if> |
| | | <if test="ownerTeamId != null">owner_team_id,</if> |
| | | <if test="ownerTeamName != null">owner_team_name,</if> |
| | | <if test="manufacturer != null">manufacturer,</if> |
| | | <if test="manufactureDate != null">manufacture_date,</if> |
| | | <if test="lengthMm != null">length_mm,</if> |
| | |
| | | <if test="updateBy != null">update_by,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="remark != null">remark,</if> |
| | | </trim> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="systemCode != null and systemCode != ''">#{systemCode},</if> |
| | | <if test="shelfCode != null and shelfCode != ''">#{shelfCode},</if> |
| | | <if test="shelfType != null">#{shelfType},</if> |
| | | <if test="ownerTeamId != null">#{ownerTeamId},</if> |
| | | <if test="ownerTeamName != null">#{ownerTeamName},</if> |
| | | <if test="manufacturer != null">#{manufacturer},</if> |
| | | <if test="manufactureDate != null">#{manufactureDate},</if> |
| | | <if test="lengthMm != null">#{lengthMm},</if> |
| | |
| | | <if test="updateBy != null">#{updateBy},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="remark != null">#{remark},</if> |
| | | </trim> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <insert id="insertTmsShelfBatch" parameterType="java.util.List" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into tms_shelf |
| | | <trim prefix="(" suffix=") values" suffixOverrides=","> |
| | | id,system_code,shelf_code,shelf_type,owner_team_id,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, |
| | | 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, |
| | | </trim> |
| | | <foreach item="item" index="index" collection="list" separator=","> |
| | | <trim prefix="(" suffix=") " suffixOverrides=","> |
| | | #{item.id},#{item.systemCode},#{item.shelfCode},#{item.shelfType},#{item.ownerTeamId},#{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.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}, |
| | | </trim> |
| | | </foreach> |
| | | </insert> |
| | |
| | | <if test="shelfCode != null and shelfCode != ''">shelf_code = #{shelfCode},</if> |
| | | <if test="shelfType != null">shelf_type = #{shelfType},</if> |
| | | <if test="ownerTeamId != null">owner_team_id = #{ownerTeamId},</if> |
| | | <if test="ownerTeamName != null">owner_team_name = #{ownerTeamName},</if> |
| | | <if test="manufacturer != null">manufacturer = #{manufacturer},</if> |
| | | <if test="manufactureDate != null">manufacture_date = #{manufactureDate},</if> |
| | | <if test="lengthMm != null">length_mm = #{lengthMm},</if> |
| | |
| | | <if test="item.shelfCode != null and item.shelfCode != ''">shelf_code = #{item.shelfCode},</if> |
| | | <if test="item.shelfType != null">shelf_type = #{item.shelfType},</if> |
| | | <if test="item.ownerTeamId != null">owner_team_id = #{item.ownerTeamId},</if> |
| | | <if test="item.ownerTeamName != null">owner_team_name = #{item.ownerTeamName},</if> |
| | | <if test="item.manufacturer != null">manufacturer = #{item.manufacturer},</if> |
| | | <if test="item.manufactureDate != null">manufacture_date = #{item.manufactureDate},</if> |
| | | <if test="item.lengthMm != null">length_mm = #{item.lengthMm},</if> |
| | |
| | | <if test="item.updateTime != null">update_time = #{item.updateTime},</if> |
| | | <if test="item.remark != null">remark = #{item.remark},</if> |
| | | </trim> |
| | | where id = #{item.id} |
| | | where id = #{item.id} |
| | | </foreach> |
| | | </update> |
| | | |