ContainerMapper.xml 1.39 KB
<?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">
<mapper namespace="com.huaheng.pc.general.container.mapper.ContainerMapper">
    <update id="updateStatus">
        UPDATE container set `status`=#{status} WHERE warehouseCode=#{warehouseCode} AND `code`=#{code}
    </update>
    <update id="updateLocationCodeAndStatus">
         UPDATE container set `status`=#{status}, locationCode=#{locationCode} WHERE warehouseCode=#{warehouseCode} AND `code`=#{code}
    </update>

    <select id="getMaxCode" resultType="java.lang.String">
      SELECT code FROM container WHERE type = #{type}  ORDER BY id DESC LIMIT 1
    </select>


    <select id="selectContainerCapacity" resultType="com.huaheng.pc.config.containercapacity.domain.ContainerCapacity">
     select * from container_capacity where code=#{code} and materialCode=#{materialCode}
    </select>

    <select id="selectFirstContainer" resultType="com.huaheng.pc.general.container.domain.Container">
     select * from container where code&lt;>#{containerCode} and code like CONCAT('%',#{code},'%') and type='A' and status='empty' limit 1
    </select>

    <select id="selectContainer" resultType="com.huaheng.pc.general.container.domain.Container">
        select * from container where code&lt;>#{code} and type=#{type} and status=#{status} limit 1
    </select>
</mapper>