|
@@ -1,66 +1,66 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.zkqy.business.mapper.SaleProductsMapper">
|
|
|
-
|
|
|
+
|
|
|
<resultMap type="com.zkqy.business.domain.SaleProducts" id="SaleProductsResult">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="saleProductNo" column="sale_product_no" />
|
|
|
- <result property="saleOrderNo" column="sale_order_no" />
|
|
|
- <result property="productNo" column="product_no" />
|
|
|
- <result property="productName" column="product_name" />
|
|
|
- <result property="productNumber" column="product_number" />
|
|
|
- <result property="productWeight" column="product_weight" />
|
|
|
- <result property="productUnitPrice" column="product_unit_price" />
|
|
|
- <result property="productAmounts" column="product_amounts" />
|
|
|
- <result property="productNotes" column="product_notes" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
- <result property="createById" column="create_by_id" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateById" column="update_by_id" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
- <result property="taskProcessKey" column="task_process_key" />
|
|
|
- <result property="taskNodeKey" column="task_node_key" />
|
|
|
- <result property="processKey" column="process_key" />
|
|
|
- <result property="status" column="status" />
|
|
|
- <result property="productionLineNo" column="production_line_no" />
|
|
|
- <result property="sliceType" column="slice_type" />
|
|
|
- <result property="colourNumber" column="colour_number" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="saleProductNo" column="sale_product_no"/>
|
|
|
+ <result property="saleOrderNo" column="sale_order_no"/>
|
|
|
+ <result property="productNo" column="product_no"/>
|
|
|
+ <result property="productName" column="product_name"/>
|
|
|
+ <result property="productNumber" column="product_number"/>
|
|
|
+ <result property="productWeight" column="product_weight"/>
|
|
|
+ <result property="productUnitPrice" column="product_unit_price"/>
|
|
|
+ <result property="productAmounts" column="product_amounts"/>
|
|
|
+ <result property="productNotes" column="product_notes"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="createById" column="create_by_id"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateById" column="update_by_id"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="taskProcessKey" column="task_process_key"/>
|
|
|
+ <result property="taskNodeKey" column="task_node_key"/>
|
|
|
+ <result property="processKey" column="process_key"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="productionLineNo" column="production_line_no"/>
|
|
|
+ <result property="sliceType" column="slice_type"/>
|
|
|
+ <result property="colourNumber" column="colour_number"/>
|
|
|
<result property="taskName" column="task_name"/>
|
|
|
<result property="lotNumber" column="lot_number"/>
|
|
|
<result property="onBoardState" column="on_board_state"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<resultMap type="com.zkqy.business.domain.vo.SaleProductsVo" id="SaleProductsResultAndCustomInfo">
|
|
|
- <result property="id" column="id" />
|
|
|
- <result property="saleProductNo" column="sale_product_no" />
|
|
|
- <result property="saleOrderNo" column="sale_order_no" />
|
|
|
- <result property="productNo" column="product_no" />
|
|
|
- <result property="productName" column="product_name" />
|
|
|
- <result property="productNumber" column="product_number" />
|
|
|
- <result property="productWeight" column="product_weight" />
|
|
|
- <result property="productUnitPrice" column="product_unit_price" />
|
|
|
- <result property="productAmounts" column="product_amounts" />
|
|
|
- <result property="productNotes" column="product_notes" />
|
|
|
- <result property="remark" column="remark" />
|
|
|
- <result property="createById" column="create_by_id" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateById" column="update_by_id" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- <result property="delFlag" column="del_flag" />
|
|
|
- <result property="taskProcessKey" column="task_process_key" />
|
|
|
- <result property="taskNodeKey" column="task_node_key" />
|
|
|
- <result property="processKey" column="process_key" />
|
|
|
- <result property="status" column="status" />
|
|
|
- <result property="productionLineNo" column="production_line_no" />
|
|
|
- <result property="sliceType" column="slice_type" />
|
|
|
- <result property="colourNumber" column="colour_number" />
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="saleProductNo" column="sale_product_no"/>
|
|
|
+ <result property="saleOrderNo" column="sale_order_no"/>
|
|
|
+ <result property="productNo" column="product_no"/>
|
|
|
+ <result property="productName" column="product_name"/>
|
|
|
+ <result property="productNumber" column="product_number"/>
|
|
|
+ <result property="productWeight" column="product_weight"/>
|
|
|
+ <result property="productUnitPrice" column="product_unit_price"/>
|
|
|
+ <result property="productAmounts" column="product_amounts"/>
|
|
|
+ <result property="productNotes" column="product_notes"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ <result property="createById" column="create_by_id"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateById" column="update_by_id"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="delFlag" column="del_flag"/>
|
|
|
+ <result property="taskProcessKey" column="task_process_key"/>
|
|
|
+ <result property="taskNodeKey" column="task_node_key"/>
|
|
|
+ <result property="processKey" column="process_key"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="productionLineNo" column="production_line_no"/>
|
|
|
+ <result property="sliceType" column="slice_type"/>
|
|
|
+ <result property="colourNumber" column="colour_number"/>
|
|
|
<result property="customName" column="custom_name"/>
|
|
|
<result property="materieEncoding" column="materie_encoding"/>
|
|
|
<result property="materieColorNumber" column="materie_color_number"/>
|
|
@@ -68,106 +68,147 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectSaleProductsVo">
|
|
|
- select id, sale_product_no, sale_order_no, product_no, product_name, product_number, product_weight, product_unit_price, product_amounts, product_notes, remark, create_by_id, create_by, create_time, update_by_id, update_by, update_time, del_flag, task_process_key, task_node_key, process_key, status, production_line_no, slice_type, colour_number,task_name,lot_number, on_board_state from {DBNAME}.sale_products
|
|
|
+ select id,
|
|
|
+ sale_product_no,
|
|
|
+ sale_order_no,
|
|
|
+ product_no,
|
|
|
+ product_name,
|
|
|
+ product_number,
|
|
|
+ product_weight,
|
|
|
+ product_unit_price,
|
|
|
+ product_amounts,
|
|
|
+ product_notes,
|
|
|
+ remark,
|
|
|
+ create_by_id,
|
|
|
+ create_by,
|
|
|
+ create_time,
|
|
|
+ update_by_id,
|
|
|
+ update_by,
|
|
|
+ update_time,
|
|
|
+ del_flag,
|
|
|
+ task_process_key,
|
|
|
+ task_node_key,
|
|
|
+ process_key,
|
|
|
+ status,
|
|
|
+ production_line_no,
|
|
|
+ slice_type,
|
|
|
+ colour_number,
|
|
|
+ task_name,
|
|
|
+ lot_number,
|
|
|
+ on_board_state
|
|
|
+ from {DBNAME}.sale_products
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectSaleProductsList" parameterType="com.zkqy.business.domain.SaleProducts" resultMap="SaleProductsResult">
|
|
|
+ <select id="selectSaleProductsList" parameterType="com.zkqy.business.domain.SaleProducts"
|
|
|
+ resultMap="SaleProductsResult">
|
|
|
<include refid="selectSaleProductsVo"/>
|
|
|
where del_flag = '0'
|
|
|
- <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 status = #{status}</if>
|
|
|
- <if test="productionLineNo != null and productionLineNo != ''"> and production_line_no = #{productionLineNo}</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>
|
|
|
+ <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 status = #{status}</if>
|
|
|
+ <if test="productionLineNo != null and productionLineNo != ''">and production_line_no = #{productionLineNo}
|
|
|
+ </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="selectSaleProductsListAndCustomInfo" parameterType="com.zkqy.business.domain.SaleProducts" resultMap="SaleProductsResultAndCustomInfo">
|
|
|
+ <select id="selectSaleProductsListAndCustomInfo" parameterType="com.zkqy.business.domain.SaleProducts"
|
|
|
+ resultMap="SaleProductsResultAndCustomInfo">
|
|
|
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 and (sp.status=3 or sp.status=4 or sp.status=5) and sp.status!=6
|
|
|
- <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 = #{status}</if>
|
|
|
-<!-- <if test="productionLineNo != null and productionLineNo != ''"> AND sp.production_line_no IS NULL or sp.status =3 and pl.production_line_no NOT lIKE CONCAT(#{productionLineNo}, '%' )</if>-->
|
|
|
+ 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 and (sp.status=3 or
|
|
|
+ sp.status=4 or sp.status=5) and sp.status!=6
|
|
|
+ <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 = #{status}</if>
|
|
|
+ <!-- <if test="productionLineNo != null and productionLineNo != ''"> AND sp.production_line_no IS NULL or sp.status =3 and pl.production_line_no NOT lIKE CONCAT(#{productionLineNo}, '%' )</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>
|
|
|
+ <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" resultMap="SaleProductsResultAndCustomInfo">
|
|
|
+ <select id="selectSaleProductsListAndCustomInfoTwo" parameterType="com.zkqy.business.domain.SaleProducts"
|
|
|
+ resultMap="SaleProductsResultAndCustomInfo">
|
|
|
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
|
|
|
+ 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
|
|
|
- <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 = #{status}</if>
|
|
|
- <if test="productionLineNo = null and productionLineNo = ''"> AND sp.production_line_no is null</if>
|
|
|
- <if test="productionLineNo != null and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</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>
|
|
|
+ <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 = #{status}</if>
|
|
|
+ <if test="productionLineNo = null and productionLineNo = ''">AND sp.production_line_no is null</if>
|
|
|
+ <if test="productionLineNo != null and productionLineNo != ''">AND sp.production_line_no=#{productionLineNo}
|
|
|
+ </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="selectSaleProductsById" parameterType="Long" resultMap="SaleProductsResult">
|
|
|
<include refid="selectSaleProductsVo"/>
|
|
|
where id = #{id}
|
|
|
</select>
|
|
|
-
|
|
|
- <insert id="insertSaleProducts" parameterType="com.zkqy.business.domain.SaleProducts" useGeneratedKeys="true" keyProperty="id">
|
|
|
+
|
|
|
+ <insert id="insertSaleProducts" parameterType="com.zkqy.business.domain.SaleProducts" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
insert into {DBNAME}.sale_products
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="saleProductNo != null">sale_product_no,</if>
|
|
@@ -194,7 +235,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="lotNumber != null">lot_number,</if>
|
|
|
<if test="onBoardState != null">on_board_state,</if>
|
|
|
del_flag
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="saleProductNo != null">#{saleProductNo},</if>
|
|
|
<if test="saleOrderNo != null">#{saleOrderNo},</if>
|
|
@@ -220,7 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="lotNumber != null">#{lotNumber},</if>
|
|
|
<if test="onBoardState != null">#{onBoardState},</if>
|
|
|
'0'
|
|
|
- </trim>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateSaleProducts" parameterType="com.zkqy.business.domain.SaleProducts">
|
|
@@ -288,7 +329,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteSaleProductsById" parameterType="Long">
|
|
|
- delete from sale_products where id = #{id}
|
|
|
+ delete
|
|
|
+ from sale_products
|
|
|
+ where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<update id="deleteSaleProductsByIds">
|
|
@@ -309,6 +352,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where id = #{item.id}
|
|
|
</foreach>
|
|
|
</update>
|
|
|
+ <update id="updateSaleProduct">
|
|
|
+ update {DBNAME}.sale_products
|
|
|
+ set
|
|
|
+ production_line_no=#{productionLineNo}, lot_number=#{lotNumber}, on_board_state=#{onBoardState}, product_number=#{productNumber}
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
<update id="updateSaleProductsNull">
|
|
|
update {DBNAME}.sale_products
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
@@ -341,156 +390,144 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
where id = #{id}
|
|
|
</update>
|
|
|
<select id="selectSaleProductsIds" resultType="long">
|
|
|
- select id from {DBNAME}.sale_products where sale_order_no = #{saleOrderNo}
|
|
|
+ select id
|
|
|
+ from {DBNAME}.sale_products
|
|
|
+ where sale_order_no = #{saleOrderNo}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectSaleProductsInfo" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
|
|
|
- SELECT
|
|
|
- a.*,
|
|
|
- pi.levels,
|
|
|
- pi.qr_code
|
|
|
- FROM
|
|
|
- (
|
|
|
- SELECT
|
|
|
- pt.id AS productId,
|
|
|
- pt.product_no AS productCode,
|
|
|
- pt.product_name AS productName,
|
|
|
- pt.product_specifications AS productSpecifications,
|
|
|
- sp.lot_number AS lotNum,
|
|
|
- sp.product_unit_price AS unitPrice,
|
|
|
- concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
|
|
|
- pt.product_type AS productType,
|
|
|
- sp.remark AS productRemark,
|
|
|
- sp.product_number AS actualWeight
|
|
|
- FROM
|
|
|
- {DBNAME}.sale_products sp
|
|
|
- LEFT JOIN {DBNAME}.production pt ON sp.product_no = pt.product_no
|
|
|
- left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
|
|
|
- WHERE
|
|
|
- sp.del_flag = '0'
|
|
|
- AND pt.del_flag = '0'
|
|
|
- and ml.del_flag = '0'
|
|
|
- AND sp.sale_order_no = #{saleOrderNo}
|
|
|
- ) AS a
|
|
|
- LEFT JOIN {DBNAME}.product_inventory pi ON a.productId = pi.product_id and a.productColor = pi.product_colour
|
|
|
- where pi.del_flag = '0'
|
|
|
- group by a.productId,a.lotNum,a.productColor,pi.levels
|
|
|
+ SELECT a.*,
|
|
|
+ pi.levels,
|
|
|
+ pi.qr_code
|
|
|
+ FROM (SELECT pt.id AS productId,
|
|
|
+ pt.product_no AS productCode,
|
|
|
+ pt.product_name AS productName,
|
|
|
+ pt.product_specifications AS productSpecifications,
|
|
|
+ sp.lot_number AS lotNum,
|
|
|
+ sp.product_unit_price AS unitPrice,
|
|
|
+ concat(ml.materie_encoding, ml.materie_color_number) AS productColor,
|
|
|
+ pt.product_type AS productType,
|
|
|
+ sp.remark AS productRemark,
|
|
|
+ sp.product_number AS actualWeight
|
|
|
+ FROM {DBNAME}.sale_products sp
|
|
|
+ LEFT JOIN {DBNAME}.production pt
|
|
|
+ ON sp.product_no = pt.product_no
|
|
|
+ left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
|
|
|
+ WHERE
|
|
|
+ sp.del_flag = '0'
|
|
|
+ AND pt.del_flag = '0'
|
|
|
+ and ml.del_flag = '0'
|
|
|
+ AND sp.sale_order_no = #{saleOrderNo}) AS a
|
|
|
+ LEFT JOIN {DBNAME}.product_inventory pi
|
|
|
+ ON a.productId = pi.product_id and a.productColor = pi.product_colour
|
|
|
+ where pi.del_flag = '0'
|
|
|
+ group by a.productId, a.lotNum, a.productColor, pi.levels
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="selectSaleProductsInfo1" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
|
|
|
- SELECT
|
|
|
- pt.id AS productId,
|
|
|
- pt.product_no AS productCode,
|
|
|
- pt.product_name AS productName,
|
|
|
- pt.product_specifications AS productSpecifications,
|
|
|
- sp.product_unit_price AS unitPrice,
|
|
|
- concat(ml.materie_encoding,ml.materie_color_number) AS productColor,
|
|
|
- pt.product_type AS productType,
|
|
|
- sp.remark AS productRemark,
|
|
|
- sp.product_number AS actualWeight
|
|
|
- FROM
|
|
|
- {DBNAME}.sale_products sp
|
|
|
- LEFT JOIN {DBNAME}.production pt ON sp.product_no = pt.product_no
|
|
|
- left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
|
|
|
- WHERE
|
|
|
- sp.del_flag = '0'
|
|
|
- AND pt.del_flag = '0'
|
|
|
- and ml.del_flag = '0'
|
|
|
- AND sp.sale_order_no = #{saleOrderNo}
|
|
|
+ SELECT pt.id AS productId,
|
|
|
+ pt.product_no AS productCode,
|
|
|
+ pt.product_name AS productName,
|
|
|
+ pt.product_specifications AS productSpecifications,
|
|
|
+ sp.product_unit_price AS unitPrice,
|
|
|
+ concat(ml.materie_encoding, ml.materie_color_number) AS productColor,
|
|
|
+ pt.product_type AS productType,
|
|
|
+ sp.remark AS productRemark,
|
|
|
+ sp.product_number AS actualWeight
|
|
|
+ FROM {DBNAME}.sale_products sp
|
|
|
+ LEFT JOIN {DBNAME}.production pt
|
|
|
+ ON sp.product_no = pt.product_no
|
|
|
+ left join {DBNAME}.materiel ml on sp.colour_number = ml.materiel_code
|
|
|
+ WHERE
|
|
|
+ sp.del_flag = '0'
|
|
|
+ AND pt.del_flag = '0'
|
|
|
+ and ml.del_flag = '0'
|
|
|
+ AND sp.sale_order_no = #{saleOrderNo}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
<select id="selectSaleProductsInfo2" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
|
|
|
- SELECT
|
|
|
- a.*,
|
|
|
- IFNULL( sp.product_unit_price, 0 ) AS unitPrice,
|
|
|
- sp.remark AS productRemark,
|
|
|
- sp.product_number AS actualWeight
|
|
|
- FROM
|
|
|
- (
|
|
|
- SELECT
|
|
|
- p.id AS productId,
|
|
|
- p.product_no AS productCode,
|
|
|
- p.product_name AS productName,
|
|
|
- p.product_specifications AS productSpecifications,
|
|
|
- r.lot_num AS lotNum,
|
|
|
- r.levels,
|
|
|
- count( r.id ) AS boxNum,
|
|
|
- TRUNCATE ( sum( r.suttle ), 2 ) AS weight,
|
|
|
- r.product_colour AS productColor,
|
|
|
- p.product_type AS productType,
|
|
|
- pi.sale_order_no
|
|
|
- FROM
|
|
|
- {DBNAME}.product_outbound_record r
|
|
|
- LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
|
|
|
- LEFT JOIN {DBNAME}.product_invoice pi ON r.notice_number = pi.notice_number
|
|
|
- AND pi.del_flag = '0'
|
|
|
- WHERE
|
|
|
- r.del_flag = '0'
|
|
|
- AND r.notice_number = #{noticeNumber}
|
|
|
- GROUP BY
|
|
|
- r.lot_num,
|
|
|
- r.product_id,
|
|
|
- r.product_colour,
|
|
|
- r.levels
|
|
|
- ) AS a
|
|
|
- LEFT JOIN {DBNAME}.sale_products sp ON sp.sale_order_no = a.sale_order_no
|
|
|
- AND sp.product_no = a.productCode and sp.del_flag = '0'
|
|
|
+ SELECT a.*,
|
|
|
+ IFNULL(sp.product_unit_price, 0) AS unitPrice,
|
|
|
+ sp.remark AS productRemark,
|
|
|
+ sp.product_number AS actualWeight
|
|
|
+ FROM (SELECT p.id AS productId,
|
|
|
+ p.product_no AS productCode,
|
|
|
+ p.product_name AS productName,
|
|
|
+ p.product_specifications AS productSpecifications,
|
|
|
+ r.lot_num AS lotNum,
|
|
|
+ r.levels,
|
|
|
+ count(r.id) AS boxNum,
|
|
|
+ TRUNCATE(sum(r.suttle), 2) AS weight,
|
|
|
+ r.product_colour AS productColor,
|
|
|
+ p.product_type AS productType,
|
|
|
+ pi.sale_order_no
|
|
|
+ FROM {DBNAME}.product_outbound_record r
|
|
|
+ LEFT JOIN {DBNAME}.production p
|
|
|
+ ON r.product_id = p.id
|
|
|
+ LEFT JOIN {DBNAME}.product_invoice pi ON r.notice_number = pi.notice_number
|
|
|
+ AND pi.del_flag = '0'
|
|
|
+ WHERE
|
|
|
+ r.del_flag = '0'
|
|
|
+ AND r.notice_number = #{noticeNumber}
|
|
|
+ GROUP BY
|
|
|
+ r.lot_num,
|
|
|
+ r.product_id,
|
|
|
+ r.product_colour,
|
|
|
+ r.levels) AS a
|
|
|
+ LEFT JOIN {DBNAME}.sale_products sp
|
|
|
+ ON sp.sale_order_no = a.sale_order_no
|
|
|
+ AND sp.product_no = a.productCode and sp.del_flag = '0'
|
|
|
|
|
|
</select>
|
|
|
|
|
|
<select id="selectSaleProductsInfo3" resultType="com.zkqy.business.domain.vo.ProductInvoiceVO$SaleProductInfo">
|
|
|
- SELECT
|
|
|
- a.*,
|
|
|
- IFNULL( sp.product_unit_price, 0 ) AS unitPrice,
|
|
|
- sp.remark AS productRemark,
|
|
|
- sp.product_number AS actualWeight
|
|
|
- FROM
|
|
|
- (
|
|
|
- SELECT
|
|
|
- p.id AS productId,
|
|
|
- p.product_no AS productCode,
|
|
|
- p.product_name AS productName,
|
|
|
- p.product_specifications AS productSpecifications,
|
|
|
- r.lot_num AS lotNum,
|
|
|
- r.levels,
|
|
|
- count( r.id ) AS boxNum,
|
|
|
- TRUNCATE ( sum( r.suttle ), 2 ) AS weight,
|
|
|
- r.product_colour AS productColor,
|
|
|
- p.product_type AS productType,
|
|
|
- pi.sale_order_no
|
|
|
- FROM
|
|
|
- {DBNAME}.product_handset_outbound_record r
|
|
|
- LEFT JOIN {DBNAME}.production p ON r.product_id = p.id
|
|
|
- LEFT JOIN {DBNAME}.product_invoice pi ON r.notice_number = pi.notice_number
|
|
|
- AND pi.del_flag = '0'
|
|
|
- WHERE
|
|
|
- r.del_flag = '0'
|
|
|
- AND r.notice_number = #{noticeNumber}
|
|
|
- GROUP BY
|
|
|
- r.lot_num,
|
|
|
- r.product_id,
|
|
|
- r.product_colour,
|
|
|
- r.levels
|
|
|
- ) AS a
|
|
|
- LEFT JOIN {DBNAME}.sale_products sp ON sp.sale_order_no = a.sale_order_no
|
|
|
+ SELECT a.*,
|
|
|
+ IFNULL(sp.product_unit_price, 0) AS unitPrice,
|
|
|
+ sp.remark AS productRemark,
|
|
|
+ sp.product_number AS actualWeight
|
|
|
+ FROM (SELECT p.id AS productId,
|
|
|
+ p.product_no AS productCode,
|
|
|
+ p.product_name AS productName,
|
|
|
+ p.product_specifications AS productSpecifications,
|
|
|
+ r.lot_num AS lotNum,
|
|
|
+ r.levels,
|
|
|
+ count(r.id) AS boxNum,
|
|
|
+ TRUNCATE(sum(r.suttle), 2) AS weight,
|
|
|
+ r.product_colour AS productColor,
|
|
|
+ p.product_type AS productType,
|
|
|
+ pi.sale_order_no
|
|
|
+ FROM {DBNAME}.product_handset_outbound_record r
|
|
|
+ LEFT JOIN {DBNAME}.production p
|
|
|
+ ON r.product_id = p.id
|
|
|
+ LEFT JOIN {DBNAME}.product_invoice pi ON r.notice_number = pi.notice_number
|
|
|
+ AND pi.del_flag = '0'
|
|
|
+ WHERE
|
|
|
+ r.del_flag = '0'
|
|
|
+ AND r.notice_number = #{noticeNumber}
|
|
|
+ GROUP BY
|
|
|
+ r.lot_num,
|
|
|
+ r.product_id,
|
|
|
+ r.product_colour,
|
|
|
+ r.levels) AS a
|
|
|
+ LEFT JOIN {DBNAME}.sale_products sp
|
|
|
+ ON sp.sale_order_no = a.sale_order_no
|
|
|
AND sp.product_no = a.productCode and sp.del_flag = '0'
|
|
|
|
|
|
</select>
|
|
|
|
|
|
<select id="selectOutboundOrderInfo" resultType="com.zkqy.business.domain.vo.SaleProductsVo">
|
|
|
- SELECT
|
|
|
- p.product_name as productName,
|
|
|
- p.product_specifications as productSpecifications,
|
|
|
- sp.lot_number as lotNumber,
|
|
|
- sp.product_number as productNumber,
|
|
|
- sp.product_unit_price as productUnitPrice,
|
|
|
- sp.product_amounts as productAmounts
|
|
|
- FROM
|
|
|
- {DBNAME}.sale_products sp
|
|
|
- LEFT JOIN {DBNAME}.production p ON sp.product_no = p.product_no
|
|
|
+ SELECT p.product_name as productName,
|
|
|
+ p.product_specifications as productSpecifications,
|
|
|
+ sp.lot_number as lotNumber,
|
|
|
+ sp.product_number as productNumber,
|
|
|
+ sp.product_unit_price as productUnitPrice,
|
|
|
+ sp.product_amounts as productAmounts
|
|
|
+ FROM {DBNAME}.sale_products sp
|
|
|
+ LEFT JOIN {DBNAME}.production p
|
|
|
+ ON sp.product_no = p.product_no
|
|
|
WHERE
|
|
|
sp.del_flag = '0'
|
|
|
AND p.del_flag = '0'
|
|
@@ -505,29 +542,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
{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
|
|
|
+ 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 sp.status!=6 and so.order_type=2
|
|
|
- <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 = #{status}</if>
|
|
|
-<!-- <if test="productionLineNo != null and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</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>
|
|
|
+ <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 = #{status}</if>
|
|
|
+ <!-- <if test="productionLineNo != null and productionLineNo != ''"> AND sp.production_line_no=#{productionLineNo}</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>
|
|
|
|
|
|
<insert id="batchInsertSaleProducts" parameterType="java.util.List">
|
|
@@ -588,6 +627,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</insert>
|
|
|
|
|
|
<select id="selectSaleProductsIdsBySaleNo" parameterType="string" resultType="java.lang.Long">
|
|
|
- select id from {DBNAME}.sale_products where sale_order_no = #{saleOrderNo} and del_flag = '0'
|
|
|
+ select id
|
|
|
+ from {DBNAME}.sale_products
|
|
|
+ where sale_order_no = #{saleOrderNo} and del_flag = '0'
|
|
|
</select>
|
|
|
</mapper>
|