zss
2023-08-17 4c521b8f1fcc538f59cc0001dcf6649b0dee4880
inventory-server/src/main/resources/mapper/SaleMapper.xml
@@ -17,7 +17,7 @@
        <if test="name!=null and name!=''">
            and name LIKE CONCAT('%',#{name},'%')
        </if>
        <if test="type!=null and type!=''">
        <if test="type!=null ">
            and type=#{type}
        </if>
        <if test="delTime!=null and delTime!=''">
@@ -28,31 +28,33 @@
    <!--查询订单BOM列表-->
    <select id="selectAllOrder" resultType="java.util.Map">
        select s.id ,
            order_number,
            saleman,
            proname,
            sm.name,
            specifications,
            unit,
            number,
            DATE_FORMAT(s.create_time, '%Y-%m-%d') '下单日期',
            DATE_FORMAT(delTime, '%Y-%m-%d') '交货日期',
            bianzhi_state
            from mom_ocean.sale s ,mom_ocean.sale_material sm
        select sm.id,
        order_number,
        saleman,
        proname,
        sm.name,
        specifications,
        unit,
        number,
        DATE_FORMAT(s.create_time, '%Y-%m-%d') '下单日期',
        DATE_FORMAT(delTime, '%Y-%m-%d') '交货日期',
        sm.type
        from mom_ocean.sale s ,mom_ocean.sale_material sm
        where s.id=sm.sale_id
        and s.state=1
        and s.type=1
        <if test="orderCode!=null and orderCode!=''">
            and order_number like concat('%',#{orderCode},'%')
        </if>
        <if test="name!=null and name!=''">
            and sm.name like concat('%',#{name},'%')
        </if>
        <if test="state!=null and state!=''">
            and bianzhi_state=#{state}
        <if test="type!=null ">
            and sm.type=#{type}
        </if>
        <if test="time!=null and time!=''">
            and s.create_time=#{time}
        </if>
        order by delTime
    </select>
</mapper>