自动化立体仓库 - WMS系统
*
lsh
2025-11-11 2ce9436d64aaee5d9743e34f89e64f2207cc8583
src/main/resources/mapper/OrderPakoutMapper.xml
@@ -42,6 +42,47 @@
    </resultMap>
    <!-- 主视图A的通用查询映射结果 -->
    <resultMap id="PakoutMainResultMap" type="com.zy.asrs.entity.result.OrderPakoutMainVo">
        <result column="id" property="id" jdbcType="BIGINT"/>
        <result column="row" property="row" jdbcType="BIGINT"/>
        <result column="item_name" property="itemName" jdbcType="VARCHAR"/>
        <result column="order_count" property="orderCount" jdbcType="INTEGER"/>
        <result column="uuid" property="uuid" jdbcType="VARCHAR"/>
        <result column="order_no" property="orderNo" jdbcType="VARCHAR"/>
        <result column="order_time" property="orderTime" jdbcType="VARCHAR"/>
        <result column="doc_type" property="docType" jdbcType="BIGINT"/>
        <result column="item_id" property="itemId" jdbcType="BIGINT"/>
        <result column="allot_item_id" property="allotItemId" jdbcType="BIGINT"/>
        <result column="def_number" property="defNumber" jdbcType="VARCHAR"/>
        <result column="number" property="number" jdbcType="VARCHAR"/>
        <result column="cstmr" property="cstmr" jdbcType="BIGINT"/>
        <result column="cstmr_name" property="cstmrName" jdbcType="VARCHAR"/>
        <result column="tel" property="tel" jdbcType="VARCHAR"/>
        <result column="oper_memb" property="operMemb" jdbcType="VARCHAR"/>
        <result column="total_fee" property="totalFee" jdbcType="DECIMAL"/>
        <result column="discount" property="discount" jdbcType="DECIMAL"/>
        <result column="discount_fee" property="discountFee" jdbcType="DECIMAL"/>
        <result column="other_fee" property="otherFee" jdbcType="DECIMAL"/>
        <result column="act_fee" property="actFee" jdbcType="DECIMAL"/>
        <result column="pay_type" property="payType" jdbcType="INTEGER"/>
        <result column="salesman" property="salesman" jdbcType="VARCHAR"/>
        <result column="account_day" property="accountDay" jdbcType="INTEGER"/>
        <result column="post_fee_type" property="postFeeType" jdbcType="INTEGER"/>
        <result column="post_fee" property="postFee" jdbcType="DECIMAL"/>
        <result column="pay_time" property="payTime" jdbcType="TIMESTAMP"/>
        <result column="send_time" property="sendTime" jdbcType="TIMESTAMP"/>
        <result column="ship_name" property="shipName" jdbcType="VARCHAR"/>
        <result column="ship_code" property="shipCode" jdbcType="VARCHAR"/>
        <result column="settle" property="settle" jdbcType="BIGINT"/>
        <result column="status" property="status" jdbcType="INTEGER"/>
        <result column="create_by" property="createBy" jdbcType="BIGINT"/>
        <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
        <result column="update_by" property="updateBy" jdbcType="BIGINT"/>
        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
        <result column="memo" property="memo" jdbcType="VARCHAR"/>
    </resultMap>
    <update id="updateSettle">
        update man_order_pakout
        set settle = #{settle}
@@ -59,6 +100,15 @@
        where 1=1
        and settle = 4
        and status = 1
        order by create_time asc
    </select>
    <select id="selectSettle" resultMap="BaseResultMap">
        select top 5 *
        from man_order_pakout
        where 1=1
          and settle =  #{settle}
          and status = 1
        order by create_time asc
    </select>
@@ -84,4 +134,50 @@
        </if>
    </select>
    <update id="removeGroupGoodsNoUpdate">
        update man_order_pakout
        set settle = 99
        ,update_time = getdate()
        where 1=1
        and item_name = #{itemName}
        and order_no != #{orderNo}
        and (settle = 10 or settle = 98)
    </update>
    <select id="selectOrderPakoutMainVoList" resultMap="PakoutMainResultMap">
        SELECT * FROM v_pakout_main
        WHERE status = 1
        <if test="itemName != null and itemName != ''">
            AND item_name LIKE CONCAT('%', #{itemName}, '%')
        </if>
        <if test="cstmrName != null and cstmrName != ''">
            AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
        </if>
        <if test="settle != null and settle != ''">
            AND settle = #{settle}
        </if>
        <if test="status != null and status != ''">
            AND status = #{status}
        </if>
        AND row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize})
        ORDER BY create_time DESC
    </select>
    <select id="selectOrderPakoutMainVoListTotal" resultType="Long">
        SELECT count(1) FROM v_pakout_main
        WHERE status = 1
        <if test="itemName != null and itemName != ''">
            AND item_name LIKE CONCAT('%', #{itemName}, '%')
        </if>
        <if test="cstmrName != null and cstmrName != ''">
            AND cstmr_name LIKE CONCAT('%', #{cstmrName}, '%')
        </if>
        <if test="settle != null and settle != ''">
            AND settle = #{settle}
        </if>
        <if test="status != null and status != ''">
            AND status = #{status}
        </if>
    </select>
</mapper>