Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -186,7 +186,7 @@
|
|||||||
MAX(attr.stor_name) AS out_stor_name,
|
MAX(attr.stor_name) AS out_stor_name,
|
||||||
MAX(ios.bill_type) AS bill_type,
|
MAX(ios.bill_type) AS bill_type,
|
||||||
MAX(ios.biz_date) AS biz_date,
|
MAX(ios.biz_date) AS biz_date,
|
||||||
MAX(ios.total_qty) AS qty,
|
MAX(dtl.plan_qty) AS qty,
|
||||||
MAX(cu.cust_code) AS cust_code,
|
MAX(cu.cust_code) AS cust_code,
|
||||||
MAX(cu.cust_name) AS cust_name,
|
MAX(cu.cust_name) AS cust_name,
|
||||||
MAX(dtl.vbeln) AS vbeln,
|
MAX(dtl.vbeln) AS vbeln,
|
||||||
@@ -194,7 +194,7 @@
|
|||||||
CONCAT( sub.thickness_request, '*', sub.width_standard ) AS spec,
|
CONCAT( sub.thickness_request, '*', sub.width_standard ) AS spec,
|
||||||
MAX(tr.cust_name) AS wl_cust_name,
|
MAX(tr.cust_name) AS wl_cust_name,
|
||||||
MAX(ios.estimated_freight) AS estimated_freight,
|
MAX(ios.estimated_freight) AS estimated_freight,
|
||||||
MAX(a.plan_qty) AS plan_qty,
|
MAX(dtl.assign_qty) AS plan_qty,
|
||||||
MAX(sub.box_weight) AS box_weight,
|
MAX(sub.box_weight) AS box_weight,
|
||||||
MAX(ios.order_number) AS order_number,
|
MAX(ios.order_number) AS order_number,
|
||||||
MAX(ios.receiptaddress) AS receiptaddress,
|
MAX(ios.receiptaddress) AS receiptaddress,
|
||||||
@@ -209,18 +209,6 @@
|
|||||||
LEFT JOIN st_ivt_bsrealstorattr attr ON attr.stor_id = ios.out_stor_id
|
LEFT JOIN st_ivt_bsrealstorattr attr ON attr.stor_id = ios.out_stor_id
|
||||||
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.package_box_sn = dis.box_no AND dis.pcsn = sub.container_name AND dis.iostorinv_id = sub.bill_id
|
LEFT JOIN pdm_bi_subpackagerelationrecord sub ON sub.package_box_sn = dis.box_no AND dis.pcsn = sub.container_name AND dis.iostorinv_id = sub.bill_id
|
||||||
LEFT JOIN sys_dict sd on ios.bill_status = sd.`value` and sd.`code` = 'io_bill_status'
|
LEFT JOIN sys_dict sd on ios.bill_status = sd.`value` and sd.`code` = 'io_bill_status'
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
SUM(a.assign_qty) AS plan_qty,
|
|
||||||
a.iostorinv_id
|
|
||||||
FROM
|
|
||||||
st_ivt_iostorinvdtl a
|
|
||||||
LEFT JOIN ST_IVT_IOStorInv b ON a.iostorinv_id = b.iostorinv_id
|
|
||||||
WHERE
|
|
||||||
b.io_type = '1'
|
|
||||||
and b.is_delete='0'
|
|
||||||
GROUP BY a.iostorinv_id
|
|
||||||
) a ON a.iostorinv_id = ios.iostorinv_id
|
|
||||||
WHERE
|
WHERE
|
||||||
ios.io_type = '1'
|
ios.io_type = '1'
|
||||||
AND ios.is_delete = '0'
|
AND ios.is_delete = '0'
|
||||||
@@ -282,7 +270,7 @@
|
|||||||
ios.input_time <= 输入.end_time
|
ios.input_time <= 输入.end_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
GROUP BY sub.sale_order_name,spec,ios.iostorinv_id
|
GROUP BY sub.sale_order_name,spec,ios.iostorinv_id,dtl.iostorinvdtl_id
|
||||||
|
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
|
|||||||
Reference in New Issue
Block a user