chenlu
2024-09-05 cb05a90ebb7d71099a66fb03382cc93a4fa0a8ee
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -8,6 +8,7 @@
        <result column="order_id" property="orderId"/>
        <result column="production_id" property="productionId"/>
        <result column="splitting_status" property="splittingStatus"/>
        <result column="founder" property="founder"/>
        <result column="create_time" property="createTime"/>
        <!--接收其他外键实体类数据-->
            <result column="batch" property="order.batch"/>
@@ -15,6 +16,7 @@
            <result column="project" property="order.project"/>
            <result column="area" property="order.area"/>
            <result column="creator" property="order.creator"/>
        <result column="customer_name" property="order.customerName"/>
<!--        <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">-->
<!--            <result column="product_id" property="productId"/>-->
<!--            <result column="product_name" property="productName"/>-->
@@ -37,7 +39,8 @@
        o.order_type,
        o.area as gross_area,
        o.quantity as quantity,
        o.creator
        o.creator,
        o.customer_name
        from sd.order_detail  as od
        left join `order` as o
        on o.order_id=od.order_id
@@ -56,6 +59,9 @@
        <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''">
            and o.order_type regexp #{orderGlassDetail.order.orderType}
        </if>
        <if test="orderGlassDetail.order.customerName != null and orderGlassDetail.order.customerName!= ''">
            and o.customer_name regexp #{orderGlassDetail.order.customerName}
        </if>
        <if test="orderGlassDetail.createTime != ''">
            and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
@@ -73,13 +79,15 @@
        o.order_id,
        od.order_number,
        ogd.production_id,
        ogd.founder,
        o.batch,
        o.project,
        o.order_type,
        (od.gross_area) as gross_area,
        (od.quantity) as quantity,
        o.creator,
        od.id
        od.id,
        o.customer_name
        from sd.order_glass_detail  as ogd
        left join  order_detail as od
        on od.order_id=ogd.order_id
@@ -87,7 +95,7 @@
        left join `order` as o
        on o.order_id=ogd.order_id
        where ogd.production_id IS NOT NULL
        and o.order_review>0
        <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
            and o.order_id regexp #{orderGlassDetail.orderId}
        </if>
@@ -103,6 +111,9 @@
        <if test="orderGlassDetail.order.orderType != null and orderGlassDetail.order.orderType!= ''">
            and o.order_type regexp #{orderGlassDetail.order.orderType}
        </if>
        <if test="orderGlassDetail.order.customerName != null and orderGlassDetail.order.customerName!= ''">
            and o.customer_name regexp #{orderGlassDetail.order.customerName}
        </if>
        <if test="orderGlassDetail.createTime != ''">
            and DATE_FORMAT((o.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }