|
@@ -430,7 +430,8 @@
|
|
|
group by por.product_id, por.levels, por.lot_num, por.product_colour, por.batch_number) as a
|
|
|
left join (select sp.product_no as productNo, -- 产品编号
|
|
|
sp.product_unit_price as productUnitPrice, -- 产品单价
|
|
|
- CONCAT(m.materie_encoding, m.materie_color_number) as productColour -- 产品转码+色泽
|
|
|
+ CONCAT(m.materie_encoding, m.materie_color_number) as productColour, -- 产品转码+色泽
|
|
|
+ sp.`level` as `level`
|
|
|
from `huaxian`.sale_order so -- 订单表
|
|
|
left join `huaxian`.sale_products sp
|
|
|
on so.sale_no = sp.sale_order_no and sp.del_flag = '0' -- 销售产品表
|
|
@@ -440,7 +441,7 @@
|
|
|
on m.materiel_code = sp.colour_number and m.del_flag = '0' -- 物料信息表
|
|
|
where so.del_flag = '0'
|
|
|
and so.sale_no = #{saleNo}) as b -- 根据销售单编号得到当前订单包含的所有产品
|
|
|
- on a.productNo = b.productNo and a.productColour = b.productColour;
|
|
|
+ on a.productNo = b.productNo AND a.productLevel = b.`level` and a.productColour = b.productColour;
|
|
|
</select>
|
|
|
|
|
|
<select id="printOutsourceOrderListNowEnd" resultType="com.zkqy.business.domain.vo.SaleProductsVo">
|