|
@@ -18,14 +18,22 @@ a.sy_stuta as syStuta,a.is_ahaa as isAhaa
|
|
|
from sy_shipping_order a
|
|
|
left join sy_shipping_order_item b
|
|
|
ON a.id = b.sy_shipping_order_item_id
|
|
|
-left join sy_packing_list_tailoring_item c
|
|
|
-on b.tailoring_fabric_item_id = c.id
|
|
|
+<if test='type == "成衣"'>
|
|
|
+ left join sy_packing_list_tailoring_item c
|
|
|
+ on b.tailoring_fabric_item_id = c.id
|
|
|
+</if>
|
|
|
+ <if test='type == "面辅料"'>
|
|
|
+ left join sy_packing_list_fabric_item c
|
|
|
+ on b.tailoring_fabric_item_id = c.id
|
|
|
+ </if>
|
|
|
+
|
|
|
${ew.customSqlSegment}
|
|
|
group by c.group_id order by a.create_time desc) t group by t.shippingOrderNumber
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
<select id="queryTailoring" resultType="org.jeecg.modules.documents.syShippingOrder.entity.VO.SyPackingList">
|
|
|
select a.id as id ,GROUP_CONCAT(DISTINCT b.id) as itemId,a.document_No as documentNo,a.order_Number as orderNumber,
|
|
@@ -103,8 +111,14 @@ a.distribution_point as distributionPoint, a.container_code as containerCode, a.
|
|
|
a.salesman, a.operating_department as operatingDepartment, a.purchase_outsourcing_order_no as purOrSubOrder, a.outsourcing_factory_for_procurement as outsourcingFactoryForProcurement,
|
|
|
a.memo, a.sort, a.ready_fabric as readyFabric, a.tailoring_fabric_id as tailoringFabricId, GROUP_CONCAT(a.tailoring_fabric_item_id) as tailoringFabricItemId,a.client_abbreviation as clientAbbreviation
|
|
|
FROM sy_shipping_order_item a
|
|
|
- left join sy_packing_list_tailoring_item c
|
|
|
-on a.tailoring_fabric_item_id = c.id
|
|
|
+ <if test='type == "成衣"'>
|
|
|
+ left join sy_packing_list_tailoring_item c
|
|
|
+ on a.tailoring_fabric_item_id = c.id
|
|
|
+ </if>
|
|
|
+ <if test='type == "面辅料"'>
|
|
|
+ left join sy_packing_list_fabric_item c
|
|
|
+ on a.tailoring_fabric_item_id = c.id
|
|
|
+ </if>
|
|
|
where a.del_flag = 0 and sy_shipping_order_item_id = #{id}
|
|
|
group by c.group_id order by style_number,smail_po desc
|
|
|
</select>
|