|
@@ -22,16 +22,14 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="getDpList" resultType="com.fjhx.sale.entity.documents.po.DocumentsProduct">
|
|
|
- SELECT
|
|
|
- t1.*,
|
|
|
- t2.product_id AS productId,
|
|
|
- t2.pack_detail_id
|
|
|
- FROM
|
|
|
- documents_product t1
|
|
|
- LEFT JOIN pack_detail_product t2 ON t1.business_id = t2.id
|
|
|
- WHERE
|
|
|
- t2.pack_detail_id IS NOT NULL
|
|
|
- AND t1.documents_id = #{documentId}
|
|
|
+ SELECT t1.*,
|
|
|
+ t2.product_id productId,
|
|
|
+ IFNULL(t2.pack_detail_id, t3.pack_detail_id) AS packDetailId,
|
|
|
+ t3.unit AS productUnit
|
|
|
+ FROM documents_product t1
|
|
|
+ LEFT JOIN pack_detail_product t2 ON t1.business_id = t2.id
|
|
|
+ LEFT JOIN pack_detail_goods t3 ON t1.business_id = t3.id
|
|
|
+ WHERE t1.documents_id = #{documentId}
|
|
|
</select>
|
|
|
<select id="getMaxMoneyData" resultType="com.fjhx.sale.entity.documents.po.DocumentsProduct">
|
|
|
SELECT
|