自动化立体仓库 - WMS系统
Junjie
2023-06-03 c98f5558bccd7744f61cc25367e98e56598f0ebd
src/main/resources/mapper/LocCheckMapper.xml
@@ -8,14 +8,111 @@
        <result column="type" property="type" />
        <result column="loc_no" property="locNo" />
        <result column="matnr" property="matnr" />
        <result column="origin_anfme" property="originAnfme" />
        <result column="anfme" property="anfme" />
        <result column="real_anfme" property="realAnfme" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="update_time" property="updateTime" />
        <result column="memo" property="memo" />
        <result column="examine" property="examine" />
        <result column="owner" property="owner" />
        <result column="payment" property="payment" />
    </resultMap>
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap2" type="com.zy.asrs.entity.ManLocDetl">
        <result column="host_id" property="hostId" />
        <result column="loc_no" property="locNo" />
        <result column="node_id" property="nodeId" />
        <result column="zpallet" property="zpallet" />
        <result column="anfme" property="anfme" />
        <result column="matnr" property="matnr" />
        <result column="maktx" property="maktx" />
        <result column="name" property="name" />
        <result column="specs" property="specs" />
        <result column="model" property="model" />
        <result column="batch" property="batch" />
        <result column="unit" property="unit" />
        <result column="barcode" property="barcode" />
        <result column="doc_id" property="docId" />
        <result column="doc_num" property="docNum" />
        <result column="cust_name" property="custName" />
        <result column="item_num" property="itemNum" />
        <result column="count" property="count" />
        <result column="price" property="price" />
        <result column="weight" property="weight" />
        <result column="status" property="status" />
        <result column="create_by" property="createBy" />
        <result column="create_time" property="createTime" />
        <result column="update_by" property="updateBy" />
        <result column="modi_time" property="modiTime" />
        <result column="memo" property="memo" />
        <result column="uuid" property="uuid" />
    </resultMap>
    <select id="getAutoLocDetl" resultMap="BaseResultMap2">
        SELECT
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
        ORDER BY NEWID()
    </select>
    <select id="getCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
        ORDER BY NEWID()
    </select>
    <select id="getMatnrCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
          and matnr = #{matnr}
        ORDER BY NEWID()
    </select>
    <select id="getLocCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
          and loc_no = #{loc_no}
        ORDER BY NEWID()
    </select>
    <select id="getLocCount" resultType="java.lang.String">
        SELECT loc_no FROM man_loc_check
        GROUP BY loc_no
    </select>
    <select id="getOwnerCount" resultType="com.zy.asrs.entity.LocOwner">
        select * from bas_loc_owner
    </select>
    <select id="getOwnerCountLocDetl" resultMap="BaseResultMap2">
        SELECT TOP ${count}
            *
        FROM
            man_loc_detl
        WHERE
            1 = 1
          and owner = #{owner}
        ORDER BY NEWID()
    </select>
</mapper>