|
@@ -51,8 +51,8 @@
|
|
|
|
|
|
|
|
|
<select id="queryShippingDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
|
|
|
- select t.* from(select b.is_reference as isReference,a.id as id,GROUP_CONCAT(b.id) as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,a.state,
|
|
|
- b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,
|
|
|
+ select t.* from(select b.is_reference as isReference,a.id as id,GROUP_CONCAT(b.id) as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,b.submit_status as submitStatus,
|
|
|
+ b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,b.specification_and_model as specificationAndModel,
|
|
|
b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,a.declaration_name as declarationName,b.order_date as orderDate,
|
|
|
sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,b.order_quantity as orderQuantity,
|
|
|
b.is_tc as isTc,a.hs_code as hsCode,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
|
|
@@ -69,18 +69,15 @@ on a.id = b.shipping_details_id and b.del_flag = 0
|
|
|
where a.del_flag = 0
|
|
|
AND b.inventory_ccode like '19%'
|
|
|
|
|
|
-GROUP BY a.document_no,
|
|
|
-b.order_number,b.customer_abbreviation,b.sales_department,b.salesman,a.account,b.pre_delivery_date,b.order_remarks,
|
|
|
- b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules
|
|
|
-
|
|
|
+GROUP BY b.group_id
|
|
|
order by a.document_no desc) as t
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
|
</select>
|
|
|
|
|
|
<select id="queryShippingDetailsGarment" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
|
|
|
- select t.* from(select b.is_reference as isReference,a.id as id,GROUP_CONCAT(b.id) as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,a.state,
|
|
|
- b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,
|
|
|
+ select t.* from(select b.is_reference as isReference,a.id as id,GROUP_CONCAT(b.id) as itemIds,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,a.push_state,b.submit_status as submitStatus,
|
|
|
+ b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,a.customer as customer,b.specification_and_model as specificationAndModel,
|
|
|
b.small_po as smallPo,b.pack_id as packId,b.pre_delivery_date as preDeliveryDate,a.declaration_name as declarationName,b.order_date as orderDate,
|
|
|
sum(b.shipment_quantity) as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,b.order_quantity as orderQuantity,
|
|
|
b.is_tc as isTc,a.hs_code as hsCode,b.distribution_point as distributionPoint,b.item_number as itemNumber,b.business_type_text as businessTypeText,
|
|
@@ -96,10 +93,7 @@ left join sy_shipping_details_item b
|
|
|
on a.id = b.shipping_details_id and b.del_flag = 0
|
|
|
where a.del_flag = 0
|
|
|
AND b.inventory_ccode not like '19%'
|
|
|
-GROUP BY a.document_no,
|
|
|
-b.order_number,b.customer_abbreviation,b.sales_department,b.salesman,a.account,b.pre_delivery_date,b.order_remarks,
|
|
|
- b.item_number,b.small_po,b.inventory_name,b.colour,b.distribution_point,b.pack_id,b.coding_rules
|
|
|
-
|
|
|
+GROUP BY b.group_id
|
|
|
order by a.document_no desc) as t
|
|
|
${ew.customSqlSegment}
|
|
|
|
|
@@ -212,4 +206,26 @@ ${ew.customSqlSegment}
|
|
|
|
|
|
</update>
|
|
|
|
|
|
+ <update id="batchSubmission">
|
|
|
+
|
|
|
+ update sy_shipping_details_item
|
|
|
+ <if test='type == "1"'>
|
|
|
+ set submit_status = 1
|
|
|
+ where id in
|
|
|
+ <foreach collection="submitListId" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test='type == "2"'>
|
|
|
+ set submit_status = 0
|
|
|
+ where id in
|
|
|
+ <foreach collection="submitListId" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+
|
|
|
+
|
|
|
+ </update>
|
|
|
+
|
|
|
</mapper>
|