|
@@ -91,47 +91,18 @@
|
|
|
|
|
|
<select id="selectPage2" resultType="org.jeecg.modules.spapl.vo.SyPreAssembledPackingListVo">
|
|
|
/*获取汇总数据*/
|
|
|
+
|
|
|
SELECT
|
|
|
- a.id,/*主键id*/
|
|
|
- a.document_No,/*单据号*/
|
|
|
- a.order_number,/*订单号*/
|
|
|
- a.item_number, /*款号*/
|
|
|
- (SELECT english_product_name FROM sy_declaration_elements WHERE id=a.elements_id) englishProductName ,/*中文品名*/
|
|
|
- (SELECT declaration_name FROM sy_declaration_elements WHERE id=a.elements_id) productName,/*英文品名*/
|
|
|
- (SELECT material_Composition FROM sy_shipping_details_item WHERE elements_id=a.elements_id limit 1) material_Composition,/*成分*/
|
|
|
- (SELECT sales_Unit_Price FROM sy_shipping_details_item WHERE elements_id=a.elements_id limit 1) sales_Unit_Price,/*单价*/
|
|
|
- a.size_range,/*尺码范围*/
|
|
|
- a.customer,/*客户名称*/
|
|
|
- a.container_code,/*集装箱号*/
|
|
|
- a.container_number,/*集装箱代号*/
|
|
|
- a.u8_remarks,/*备注*/
|
|
|
- b.garment_factory,/*成衣工厂*/
|
|
|
- a.depositary_receipt_no,/*预托书号*/
|
|
|
- a.memo,/*备注*/
|
|
|
- a.order_type,/*订单类型*/
|
|
|
- a.customer_abbreviation,/*客户简称*/
|
|
|
- a.`update_time`,/*修改日期*/
|
|
|
- a.`status`,/*单据状态*/
|
|
|
- a.total_Boxes totalboxes,/*总箱数*/
|
|
|
- a.`push_Status`,/*推送状态*/
|
|
|
- a.is_Reference,/*是否被参照*/
|
|
|
- b.master_Metering,/*计量单位*/
|
|
|
- SUM(b.total) total,/*件数*/
|
|
|
- b.hod as preDeliveryDate,/*预发货日期*/
|
|
|
- a.total_net_weight totalnetweight,/*总净重*/
|
|
|
- a.total_gross_weight totalgrossweight,/*总毛重*/
|
|
|
- a.total_volume totalvolume,/*总体积*/
|
|
|
- a.total_price totalprice,/*总价*/
|
|
|
- /*sum(b.total) totalquantity,*/
|
|
|
- b.factory_Unit_Price factoryUnitPrice,/*工厂单价*/
|
|
|
- a.spur_or_sub_order,/*采购委外订单号*/
|
|
|
- b.inventory_name,/*存货名称*/
|
|
|
- b.small_po,/*小po*/
|
|
|
- b.colour,/*颜色*/
|
|
|
- b.distribution_point/*分销点*/
|
|
|
- FROM Sy_Pre_Assembled_Packing_List a
|
|
|
- LEFT JOIN Sy_Pre_Assembled_Packing_List_item b
|
|
|
- ON a.id=b.sy_pre_assembled_packing_list_id AND b.del_flag='0'
|
|
|
+ a.id,
|
|
|
+ material_Composition,
|
|
|
+ sales_Unit_Price,
|
|
|
+ b.hod AS preDeliveryDate,
|
|
|
+ b.small_po
|
|
|
+ FROM Sy_Pre_Assembled_Packing_List a LEFT JOIN
|
|
|
+ Sy_Pre_Assembled_Packing_List_item b ON a.id = b.sy_pre_assembled_packing_list_id
|
|
|
+ left join sy_shipping_details_item c
|
|
|
+ on a.elements_id=c.id
|
|
|
+ AND b.del_flag = '0'
|
|
|
${ew.customSqlSegment}
|
|
|
GROUP BY a.id
|
|
|
ORDER BY a.`update_time` DESC
|
|
@@ -285,40 +256,31 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="queryById2" resultType="org.jeecg.modules.spapl.entity.SyPreAssembledPackingList" parameterType="java.lang.String">
|
|
|
-
|
|
|
- SELECT t.*,
|
|
|
- (SELECT declaration_name FROM sy_declaration_elements WHERE id=t.elements_id) productName
|
|
|
- from (SELECT
|
|
|
- SUM(total) total,/*件数*/
|
|
|
- SUM(total_Boxes) total_Boxes,/*件数*/
|
|
|
- SUM(total_net_weight) totalnetweight,/*总净重*/
|
|
|
- SUM(total_gross_weight) totalgrossweight,/*总毛重*/
|
|
|
- SUM( total_volume) totalvolume,/*总体积*/
|
|
|
- SUM( total_price) totalprice,/*总价*/
|
|
|
- item_Number item_Number,
|
|
|
-
|
|
|
- (select small_Po from Sy_Pre_Assembled_Packing_List_item
|
|
|
- where Sy_Pre_Assembled_Packing_List_id=Sy_Pre_Assembled_Packing_List.id limit 1) order_Number,
|
|
|
-
|
|
|
- (select SUBSTRING(hod,1,10) from Sy_Pre_Assembled_Packing_List_item
|
|
|
- where Sy_Pre_Assembled_Packing_List_id=Sy_Pre_Assembled_Packing_List.id limit 1) hod,
|
|
|
-
|
|
|
- (select supplier from Sy_Pre_Assembled_Packing_List_item
|
|
|
- where Sy_Pre_Assembled_Packing_List_id=Sy_Pre_Assembled_Packing_List.id limit 1) supplier,
|
|
|
-
|
|
|
- (select Unit_Price from Sy_Pre_Assembled_Packing_List_item
|
|
|
- where Sy_Pre_Assembled_Packing_List_id=Sy_Pre_Assembled_Packing_List.id limit 1) price,
|
|
|
-
|
|
|
- (SELECT material_Composition FROM sy_shipping_details_item
|
|
|
- WHERE elements_id=Sy_Pre_Assembled_Packing_List.elements_id limit 1) material_Composition,
|
|
|
-
|
|
|
- elements_id elements_id
|
|
|
- FROM Sy_Pre_Assembled_Packing_List
|
|
|
- where id in
|
|
|
+ SELECT
|
|
|
+ SUM(a.total) total,/*件数*/
|
|
|
+ SUM(a.total_Boxes) total_Boxes,/*件数*/
|
|
|
+ SUM(a.total_net_weight) totalnetweight,/*总净重*/
|
|
|
+ SUM(a.total_gross_weight) totalgrossweight,/*总毛重*/
|
|
|
+ SUM( a.total_volume) totalvolume,/*总体积*/
|
|
|
+ SUM( a.total_price) totalprice,/*总价*/
|
|
|
+ a.item_Number item_Number,
|
|
|
+ b.small_Po order_Number,
|
|
|
+ SUBSTRING(b.hod,1,10) hod,
|
|
|
+ b.supplier,
|
|
|
+ b.Unit_Price price,
|
|
|
+ d.material_Composition,
|
|
|
+ declaration_name productName
|
|
|
+ FROM Sy_Pre_Assembled_Packing_List a
|
|
|
+ left join sy_pre_assembled_packing_list_item b
|
|
|
+ on a.id=b.sy_Pre_Assembled_Packing_List_Id
|
|
|
+ left join sy_shipping_details_item d
|
|
|
+ on b.sy_declaration_elements_item_id=d.id
|
|
|
+ left join sy_declaration_elements c
|
|
|
+ on d.elements_Id=c.id
|
|
|
+ where a.id in
|
|
|
<foreach collection="list" item="value" index="index" open="(" separator="," close=")">
|
|
|
#{value}
|
|
|
</foreach>
|
|
|
- ) t
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|