|  | @@ -57,7 +57,6 @@
 | 
											
												
													
														|  |          a.container_code,/*集装箱号*/
 |  |          a.container_code,/*集装箱号*/
 | 
											
												
													
														|  |          a.container_number,/*集装箱代号*/
 |  |          a.container_number,/*集装箱代号*/
 | 
											
												
													
														|  |          a.u8_remarks,/*备注*/
 |  |          a.u8_remarks,/*备注*/
 | 
											
												
													
														|  | -        b.garment_factory,/*成衣工厂*/
 |  | 
 | 
											
												
													
														|  |          a.depositary_receipt_no,/*预托书号*/
 |  |          a.depositary_receipt_no,/*预托书号*/
 | 
											
												
													
														|  |          a.memo,/*备注*/
 |  |          a.memo,/*备注*/
 | 
											
												
													
														|  |          a.order_type,/*订单类型*/
 |  |          a.order_type,/*订单类型*/
 | 
											
										
											
												
													
														|  | @@ -65,10 +64,12 @@
 | 
											
												
													
														|  |          a.`update_time`,/*修改日期*/
 |  |          a.`update_time`,/*修改日期*/
 | 
											
												
													
														|  |          a.`status`,/*单据状态*/
 |  |          a.`status`,/*单据状态*/
 | 
											
												
													
														|  |          a.total_Boxes totalboxes,/*总箱数*/
 |  |          a.total_Boxes totalboxes,/*总箱数*/
 | 
											
												
													
														|  | 
 |  | +        a.`create_time`,/*创建时间*/
 | 
											
												
													
														|  |          a.`push_Status`,/*推送状态*/
 |  |          a.`push_Status`,/*推送状态*/
 | 
											
												
													
														|  |          a.is_Reference,/*是否被参照*/
 |  |          a.is_Reference,/*是否被参照*/
 | 
											
												
													
														|  |          b.master_Metering,/*计量单位*/
 |  |          b.master_Metering,/*计量单位*/
 | 
											
												
													
														|  | -        SUM(b.total) total,/*件数*/
 |  | 
 | 
											
												
													
														|  | 
 |  | +        b.garment_factory,/*成衣工厂*/
 | 
											
												
													
														|  | 
 |  | +        a.total,/*件数*/
 | 
											
												
													
														|  |          b.hod as  preDeliveryDate,/*预发货日期*/
 |  |          b.hod as  preDeliveryDate,/*预发货日期*/
 | 
											
												
													
														|  |          a.total_net_weight totalnetweight,/*总净重*/
 |  |          a.total_net_weight totalnetweight,/*总净重*/
 | 
											
												
													
														|  |          a.total_gross_weight totalgrossweight,/*总毛重*/
 |  |          a.total_gross_weight totalgrossweight,/*总毛重*/
 | 
											
										
											
												
													
														|  | @@ -84,10 +85,12 @@
 | 
											
												
													
														|  |      FROM Sy_Pre_Assembled_Packing_List  a
 |  |      FROM Sy_Pre_Assembled_Packing_List  a
 | 
											
												
													
														|  |      LEFT JOIN Sy_Pre_Assembled_Packing_List_item  b
 |  |      LEFT JOIN Sy_Pre_Assembled_Packing_List_item  b
 | 
											
												
													
														|  |      ON a.id=b.sy_pre_assembled_packing_list_id  AND b.del_flag='0'
 |  |      ON a.id=b.sy_pre_assembled_packing_list_id  AND b.del_flag='0'
 | 
											
												
													
														|  | 
 |  | +    and b.id in (select max(id) from Sy_Pre_Assembled_Packing_List_item
 | 
											
												
													
														|  | 
 |  | +    group by sy_Pre_Assembled_Packing_List_Id)
 | 
											
												
													
														|  |      left join sy_declaration_elements c
 |  |      left join sy_declaration_elements c
 | 
											
												
													
														|  |      on a.elements_Id=c.id
 |  |      on a.elements_Id=c.id
 | 
											
												
													
														|  |      ${ew.customSqlSegment}
 |  |      ${ew.customSqlSegment}
 | 
											
												
													
														|  | -    GROUP BY a.id
 |  | 
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      ORDER BY a.`create_time` DESC
 |  |      ORDER BY a.`create_time` DESC
 | 
											
												
													
														|  |  	</select>
 |  |  	</select>
 | 
											
												
													
														|  |  
 |  |  
 | 
											
										
											
												
													
														|  | @@ -116,7 +119,7 @@
 | 
											
												
													
														|  |          a.`push_Status`,/*推送状态*/
 |  |          a.`push_Status`,/*推送状态*/
 | 
											
												
													
														|  |          a.is_Reference,/*是否被参照*/
 |  |          a.is_Reference,/*是否被参照*/
 | 
											
												
													
														|  |          b.master_Metering,/*计量单位*/
 |  |          b.master_Metering,/*计量单位*/
 | 
											
												
													
														|  | -        SUM(b.total) total,/*件数*/
 |  | 
 | 
											
												
													
														|  | 
 |  | +        a.total,/*件数*/
 | 
											
												
													
														|  |          b.hod as  preDeliveryDate,/*预发货日期*/
 |  |          b.hod as  preDeliveryDate,/*预发货日期*/
 | 
											
												
													
														|  |          a.total_net_weight totalnetweight,/*总净重*/
 |  |          a.total_net_weight totalnetweight,/*总净重*/
 | 
											
												
													
														|  |          a.total_gross_weight totalgrossweight,/*总毛重*/
 |  |          a.total_gross_weight totalgrossweight,/*总毛重*/
 | 
											
										
											
												
													
														|  | @@ -165,7 +168,7 @@
 | 
											
												
													
														|  |          a.`push_Status`,/*推送状态*/
 |  |          a.`push_Status`,/*推送状态*/
 | 
											
												
													
														|  |          a.is_Reference,/*是否被参照*/
 |  |          a.is_Reference,/*是否被参照*/
 | 
											
												
													
														|  |          b.master_Metering,/*计量单位*/
 |  |          b.master_Metering,/*计量单位*/
 | 
											
												
													
														|  | -        SUM(b.total) total,/*件数*/
 |  | 
 | 
											
												
													
														|  | 
 |  | +        a.total,/*件数*/
 | 
											
												
													
														|  |          b.hod as  preDeliveryDate,/*预发货日期*/
 |  |          b.hod as  preDeliveryDate,/*预发货日期*/
 | 
											
												
													
														|  |          a.total_net_weight totalnetweight,/*总净重*/
 |  |          a.total_net_weight totalnetweight,/*总净重*/
 | 
											
												
													
														|  |          a.total_gross_weight totalgrossweight,/*总毛重*/
 |  |          a.total_gross_weight totalgrossweight,/*总毛重*/
 |