|
@@ -170,6 +170,40 @@
|
|
<if test="lotNumber != null and lotNumber != ''">and lot_number = #{lotNumber}</if>
|
|
<if test="lotNumber != null and lotNumber != ''">and lot_number = #{lotNumber}</if>
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="selectSaleProductsListAndCustomInfoFs" resultMap="SaleProductsResultAndCustomInfo" parameterType="com.zkqy.business.domain.SaleProducts">
|
|
|
|
+ SELECT
|
|
|
|
+ sp.*,cs.custom_name,pd.product_specifications,sp.colours,
|
|
|
|
+ pl.production_line_no as ccc
|
|
|
|
+ FROM
|
|
|
|
+ huaxian.sale_products AS sp
|
|
|
|
+ INNER JOIN huaxian.sale_order AS so ON sp.sale_order_no = so.sale_no
|
|
|
|
+ Inner Join huaxian.customer as cs ON so.sale_custom_no= cs.custom_no
|
|
|
|
+ inner join huaxian.production as pd on sp.product_no= pd.product_no
|
|
|
|
+ left join huaxian.production_line as pl on sp.production_line_no=pl.id
|
|
|
|
+ where sp.del_flag = '0' and cs.del_flag = '0' AND sp.product_number > 0.0
|
|
|
|
+ AND so.order_type = 2 and so.`status`in (3,4) and sp.`status` in (3,4)
|
|
|
|
+ <if test="saleProductNo != null and saleProductNo != ''">and sale_product_no = #{saleProductNo}</if>
|
|
|
|
+ <if test="saleOrderNo != null and saleOrderNo != ''">and sale_order_no = #{saleOrderNo}</if>
|
|
|
|
+ <if test="productNo != null and productNo != ''">and product_no = #{productNo}</if>
|
|
|
|
+ <if test="productName != null and productName != ''">and product_name like concat('%', #{productName}, '%')</if>
|
|
|
|
+ <if test="productNumber != null ">and product_number = #{productNumber}</if>
|
|
|
|
+ <if test="productWeight != null and productWeight != ''">and product_weight = #{productWeight}</if>
|
|
|
|
+ <if test="productUnitPrice != null and productUnitPrice != ''">and product_unit_price = #{productUnitPrice}</if>
|
|
|
|
+ <if test="productAmounts != null and productAmounts != ''">and product_amounts = #{productAmounts}</if>
|
|
|
|
+ <if test="productNotes != null and productNotes != ''">and product_notes = #{productNotes}</if>
|
|
|
|
+ <if test="createById != null ">and create_by_id = #{createById}</if>
|
|
|
|
+ <if test="updateById != null ">and update_by_id = #{updateById}</if>
|
|
|
|
+ <if test="taskProcessKey != null and taskProcessKey != ''">and task_process_key = #{taskProcessKey}</if>
|
|
|
|
+ <if test="taskNodeKey != null and taskNodeKey != ''">and task_node_key = #{taskNodeKey}</if>
|
|
|
|
+ <if test="processKey != null and processKey != ''">and process_key = #{processKey}</if>
|
|
|
|
+ <if test="status != null and status != ''">and sp.status=3</if>
|
|
|
|
+ <if test="productionLineNo != null and productionLineNo != ''">and (pl.production_line_no NOT lIKE CONCAT(#{productionLineNo}, '%' ) or pl.production_line_no is null)</if>
|
|
|
|
+ <if test="sliceType != null and sliceType != ''">and slice_type = #{sliceType}</if>
|
|
|
|
+ <if test="colourNumber != null and colourNumber != ''">and colour_number = #{colourNumber}</if>
|
|
|
|
+ <if test="lotNumber != null and lotNumber != ''">and lot_number = #{lotNumber}</if>
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<!--不管状态,只查关于这个几台的所有产品-->
|
|
<!--不管状态,只查关于这个几台的所有产品-->
|
|
<select id="selectSaleProductsListAndCustomInfoTwo" parameterType="com.zkqy.business.domain.SaleProducts"
|
|
<select id="selectSaleProductsListAndCustomInfoTwo" parameterType="com.zkqy.business.domain.SaleProducts"
|
|
resultMap="SaleProductsResultAndCustomInfo">
|
|
resultMap="SaleProductsResultAndCustomInfo">
|
|
@@ -417,6 +451,8 @@
|
|
where sale_order_no = #{saleOrderNo}
|
|
where sale_order_no = #{saleOrderNo}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<select id="selectSaleProductsInfo" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
|
|
<select id="selectSaleProductsInfo" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
|
|
SELECT a.*,
|
|
SELECT a.*,
|
|
pi.levels,
|
|
pi.levels,
|
|
@@ -556,16 +592,7 @@
|
|
AND p.del_flag = '0'
|
|
AND p.del_flag = '0'
|
|
and sp.sale_order_no = #{saleOrderNo}
|
|
and sp.sale_order_no = #{saleOrderNo}
|
|
</select>
|
|
</select>
|
|
-<!-- SELECT-->
|
|
|
|
-<!-- sp.*,cs.custom_name,m.materie_encoding,m.materie_color_number,pd.product_specifications-->
|
|
|
|
-<!-- FROM-->
|
|
|
|
-<!-- {DBNAME}.sale_products AS sp-->
|
|
|
|
-<!-- INNER JOIN {DBNAME}.sale_order AS so ON sp.sale_order_no = so.sale_no-->
|
|
|
|
-<!-- Inner Join {DBNAME}.customer as cs ON so.sale_custom_no= cs.custom_no-->
|
|
|
|
-<!-- inner join {DBNAME}.materiel as m on sp.colour_number= m.materiel_code-->
|
|
|
|
-<!-- inner join {DBNAME}.production as pd on sp.product_no= pd.product_no-->
|
|
|
|
-<!-- left join {DBNAME}.production_line as pl on sp.production_line_no=pl.id-->
|
|
|
|
-<!-- where sp.del_flag = '0' and cs.del_flag = '0' and m.del_flag = '0' and so.order_type=2-->
|
|
|
|
|
|
+
|
|
<select id="selectSaleProductsListAndCustomInfoThread"
|
|
<select id="selectSaleProductsListAndCustomInfoThread"
|
|
resultType="com.zkqy.business.domain.vo.SaleProductsVo">
|
|
resultType="com.zkqy.business.domain.vo.SaleProductsVo">
|
|
SELECT
|
|
SELECT
|
|
@@ -686,7 +713,6 @@
|
|
<if test="id !=null and id!=''">and id=#{id}</if>
|
|
<if test="id !=null and id!=''">and id=#{id}</if>
|
|
</where>
|
|
</where>
|
|
</update>
|
|
</update>
|
|
-
|
|
|
|
<update id="updateSaleProductsBySaleOrderNoBgsl">
|
|
<update id="updateSaleProductsBySaleOrderNoBgsl">
|
|
update {DBNAME}.sale_products
|
|
update {DBNAME}.sale_products
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|