zhangback
8 天以前 90c4fbd121dd18013e333346c99bbc9844cd6fec
tms/src/main/resources/mapper/tms/TmsContainerMapper.xml
@@ -1,7 +1,7 @@
<?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.TmsContainerMapper">
    <resultMap type="com.ruoyi.tms.domain.TmsContainer" id="TmsContainerResult">
@@ -11,6 +11,7 @@
        <result property="containerUseType"    column="container_use_type"    />
        <result property="containerSize"    column="container_size"    />
        <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"    />
@@ -29,10 +30,12 @@
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="remark"    column="remark"    />
        <result property="selfLeasType"    column="self_leas_type"    />
    </resultMap>
    <sql id="selectTmsContainerVo">
        select thisTab.id, thisTab.system_code, thisTab.container_code, thisTab.container_use_type, thisTab.container_size, thisTab.owner_team_id, thisTab.manufacturer, thisTab.manufacture_date, thisTab.length_mm, thisTab.width_mm, thisTab.height_mm, thisTab.max_total_weight_kg, thisTab.max_load_kg, thisTab.volume_m3, 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_container AS thisTab
        select thisTab.id, thisTab.system_code, thisTab.container_code, thisTab.container_use_type, thisTab.container_size, thisTab.owner_team_id, thisTab.owner_team_name, thisTab.manufacturer, thisTab.manufacture_date, thisTab.length_mm, thisTab.width_mm, thisTab.height_mm, thisTab.max_total_weight_kg, thisTab.max_load_kg, thisTab.volume_m3, 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_container AS thisTab
    </sql>
    <sql id="selectTmsContainerVoCount">
        select count(0) from tms_container as thisTab
@@ -44,9 +47,12 @@
        <if test="containerUseType != null "> and thisTab.container_use_type = #{containerUseType}</if>
        <if test="containerSize != null "> and thisTab.container_size = #{containerSize}</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="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>
        <if test="selfLeasType != null "> and thisTab.self_leas_type = #{selfLeasType}</if>
    </sql>
    <!--查询-->
@@ -79,6 +85,7 @@
            <if test="containerUseType != null">container_use_type,</if>
            <if test="containerSize != null">container_size,</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>
@@ -97,13 +104,16 @@
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="remark != null">remark,</if>
         </trim>
            <if test="selfLeasType != null">self_leas_type,</if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="systemCode != null and systemCode != ''">#{systemCode},</if>
            <if test="containerCode != null and containerCode != ''">#{containerCode},</if>
            <if test="containerUseType != null">#{containerUseType},</if>
            <if test="containerSize != null">#{containerSize},</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>
@@ -122,17 +132,19 @@
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="remark != null">#{remark},</if>
         </trim>
            <if test="selfLeasType != null">#{selfLeasType},</if>
        </trim>
    </insert>
    <insert id="insertTmsContainerBatch" parameterType="java.util.List"  useGeneratedKeys="true" keyProperty="id">
        insert into tms_container
        <trim prefix="(" suffix=") values" suffixOverrides=",">
            id,system_code,container_code,container_use_type,container_size,owner_team_id,manufacturer,manufacture_date,length_mm,width_mm,height_mm,max_total_weight_kg,max_load_kg,volume_m3,is_in_use,maintenance_status,last_maintenance_date,next_maintenance_date,status,create_by,create_time,update_by,update_time,remark,
            id,system_code,container_code,container_use_type,container_size,owner_team_id,owner_team_name,manufacturer,manufacture_date,length_mm,width_mm,height_mm,max_total_weight_kg,max_load_kg,volume_m3,is_in_use,maintenance_status,last_maintenance_date,next_maintenance_date,status,create_by,create_time,update_by,update_time,remark,self_leas_type,
        </trim>
        <foreach item="item" index="index" collection="list" separator=",">
            <trim prefix="(" suffix=") " suffixOverrides=",">
                #{item.id},#{item.systemCode},#{item.containerCode},#{item.containerUseType},#{item.containerSize},#{item.ownerTeamId},#{item.manufacturer},#{item.manufactureDate},#{item.lengthMm},#{item.widthMm},#{item.heightMm},#{item.maxTotalWeightKg},#{item.maxLoadKg},#{item.volumeM3},#{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.containerCode},#{item.containerUseType},#{item.containerSize},#{item.ownerTeamId},#{item.ownerTeamName},#{item.manufacturer},#{item.manufactureDate},#{item.lengthMm},#{item.widthMm},#{item.heightMm},#{item.maxTotalWeightKg},#{item.maxLoadKg},#{item.volumeM3},#{item.isInUse},#{item.maintenanceStatus},#{item.lastMaintenanceDate},#{item.nextMaintenanceDate},#{item.status},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.remark},#{item.item.selfLeasType},
            </trim>
        </foreach>
    </insert>
@@ -146,6 +158,7 @@
            <if test="containerUseType != null">container_use_type = #{containerUseType},</if>
            <if test="containerSize != null">container_size = #{containerSize},</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>
@@ -164,6 +177,8 @@
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="remark != null">remark = #{remark},</if>
            <if test="selfLeasType != null">self_leas_type = #{selfLeasType},</if>
        </trim>
        where id = #{id}
    </update>
@@ -177,6 +192,7 @@
                <if test="item.containerUseType != null">container_use_type = #{item.containerUseType},</if>
                <if test="item.containerSize != null">container_size = #{item.containerSize},</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>
@@ -195,8 +211,9 @@
                <if test="item.updateBy != null">update_by = #{item.updateBy},</if>
                <if test="item.updateTime != null">update_time = #{item.updateTime},</if>
                <if test="item.remark != null">remark = #{item.remark},</if>
                <if test="item.selfLeasType != null">self_leas_type = #{item.selfLeasType},</if>
            </trim>
        where id = #{item.id}
            where id = #{item.id}
        </foreach>
    </update>