|
@@ -2,19 +2,22 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.fjhx.sale.mapper.pack.PackDetailMapper">
|
|
<mapper namespace="com.fjhx.sale.mapper.pack.PackDetailMapper">
|
|
<select id="getPage" resultType="com.fjhx.sale.entity.pack.vo.PackDetailVo">
|
|
<select id="getPage" resultType="com.fjhx.sale.entity.pack.vo.PackDetailVo">
|
|
- SELECT GROUP_CONCAT(CONCAT(t3.`code`, "_", t2.product_name)) AS codeAPName,
|
|
|
|
- sum(t1.pack_quantity) packQuantity,
|
|
|
|
- sum(t1.net_weight) netWeight,
|
|
|
|
- sum(t1.rough_weight) roughWeight,
|
|
|
|
|
|
+ SELECT (SELECT GROUP_CONCAT(CONCAT(t3.`code`, "_", t2.product_name)) AS codeAPName
|
|
|
|
+ FROM pack_detail_product t2
|
|
|
|
+ LEFT JOIN contract t3 ON t2.contract_id = t3.id
|
|
|
|
+ where t2.pack_detail_id in (GROUP_CONCAT(t1.id))) AS codeAPName,
|
|
|
|
+ sum(t1.pack_quantity) packQuantity,
|
|
|
|
+ sum(t1.net_weight) netWeight,
|
|
|
|
+ sum(t1.rough_weight) roughWeight,
|
|
t1.box_long,
|
|
t1.box_long,
|
|
t1.box_wide,
|
|
t1.box_wide,
|
|
t1.box_high,
|
|
t1.box_high,
|
|
- sum(t1.bom_volume) bomVolume,
|
|
|
|
|
|
+ sum(t1.bom_volume) bomVolume,
|
|
t1.shipment_status,
|
|
t1.shipment_status,
|
|
t1.shipment_time
|
|
t1.shipment_time
|
|
FROM pack_detail t1
|
|
FROM pack_detail t1
|
|
- LEFT JOIN pack_detail_product t2 ON t1.id = t2.pack_detail_id
|
|
|
|
- LEFT JOIN contract t3 ON t2.contract_id = t3.id
|
|
|
|
|
|
+ GROUP BY t1.pack_id
|
|
|
|
+ ORDER BY t1.create_time DESC
|
|
${ew.customSqlSegment}
|
|
${ew.customSqlSegment}
|
|
</select>
|
|
</select>
|
|
|
|
|