From decd9f8bf3e6119efce34e6bbc0c320a2a2446c1 Mon Sep 17 00:00:00 2001
From: guoyuji <guoyujie@ng.com>
Date: 星期五, 02 二月 2024 15:41:50 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 107 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml b/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
new file mode 100644
index 0000000..e68717a
--- /dev/null
+++ b/north-glass-erp/src/main/resources/mapper/pp/WordOrder.xml
@@ -0,0 +1,107 @@
+<?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.example.erp.mapper.pp.WorkOrderMapper">
+ <resultMap id="wordOrderMap" type="com.example.erp.entity.sd.OrderGlassDetail">
+
+ <result column="order_id" property="orderId"/>
+ <result column="production_id" property="productionId"/>
+ <result column="splitting_status" property="splittingStatus"/>
+ <result column="create_time" property="createTime"/>
+ <!--鎺ユ敹鍏朵粬澶栭敭瀹炰綋绫绘暟鎹�-->
+ <association property="order" javaType="com.example.erp.entity.sd.Order">
+ <result column="batch" property="batch"/>
+ </association>
+ <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail">
+ <result column="product_name" property="productName"/>
+ <result column="compute_area" property="computeArea"/>
+ <result column="quantity" property="quantity"/>
+ <result column="compute_gross_area" property="computeGrossArea"/>
+ <result column="perimeter" property="perimeter"/>
+ <result column="bend_radius" property="bendRadius"/>
+ <result column="processing_note" property="processingNote"/>
+ </association>
+
+ <!--<result column="g_typeId" property="glassTypes.typeId"/>
+ <result column="g_type" property="glassTypes.type"/>-->
+
+ </resultMap>
+ <select id="selectWordOrder" resultMap="wordOrderMap">
+ select
+ a.order_id,
+ a.production_id,
+ c.batch,
+ b.product_name,
+ b.compute_area,
+ b.quantity,
+ b.compute_gross_area,
+ b.perimeter,
+ b.bend_radius,
+ b.processing_note
+ from order_glass_detail as a
+ LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN
+ `order` as c on a.order_id=c.order_id
+ <where>
+ <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''">
+ and a.order_id regexp #{orderGlassDetail.orderId}
+ </if>
+ <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''">
+ and a.production_id regexp #{orderGlassDetail.productionId}
+ </if>
+ <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''">
+ and c.batch regexp #{orderGlassDetail.order.batch}
+ </if>
+ <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''">
+ and b.product_name regexp #{orderGlassDetail.orderDetail.productName}
+ </if>
+ <if test="orderGlassDetail.splittingStatus=0 " >
+ and a.splitting_status regexp #{state}
+ </if>
+ <if test="orderGlassDetail.splittingStatus=1">
+ and a.splitting_status regexp #{state}
+ </if>
+ <if test="orderGlassDetail.createTime != ''">
+ and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }
+ </if>
+ </where>
+ group by a.production_id,a.order_number
+ order by a.id desc
+
+
+ ;
+ </select>
+
+ <!-- <select id="getPageTotal" >-->
+ <!-- select-->
+ <!-- CEILING(count(a.id)/#{pageSize})-->
+ <!-- from product as a-->
+ <!-- left join basic_glass_type bgt on bgt.type_id = a.type_id-->
+ <!-- <where>-->
+ <!-- <if test="glassTypeId != null and glassTypeId != ''">-->
+ <!-- and a.type_id regexp #{glassTypeId}-->
+ <!-- </if>-->
+ <!-- <if test="product.id != null and product.id != ''">-->
+ <!-- and a.id regexp #{product.id}-->
+ <!-- </if>-->
+ <!-- <if test="product.productName != null and product.productName != ''">-->
+ <!-- and a.product_name regexp #{product.productName}-->
+ <!-- </if>-->
+ <!-- <if test="product.basicGlassType.typeName != null and product.basicGlassType.typeName!= ''">-->
+ <!-- and bgt.type_name regexp #{product.basicGlassType.typeName}-->
+ <!-- </if>-->
+ <!-- <if test="product.query != null and product.query != ''">-->
+ <!-- and a.query regexp #{product.query}-->
+ <!-- </if>-->
+ <!-- <if test="product.creator != null and product.creator != ''">-->
+ <!-- and a.creator regexp #{product.creator}-->
+ <!-- </if>-->
+ <!-- <if test="product.createTime != null and product.createTime != ''">-->
+ <!-- and date(a.create_time) regexp #{product.createTime}-->
+ <!-- </if>-->
+ <!-- </where>-->
+
+ <!-- order by a.id desc-->
+ <!-- ;-->
+ <!-- </select>-->
+</mapper>
\ No newline at end of file
--
Gitblit v1.8.0