fix:报表优化
This commit is contained in:
@@ -173,19 +173,6 @@
|
|||||||
attr.stor_id = 输入.stor_id
|
attr.stor_id = 输入.stor_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.sub_type = "1"
|
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) <= '90'
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.sub_type = "2"
|
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) > '60'
|
|
||||||
AND DATEDIFF( NOW(), sub.date_of_production ) <= '90'
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.sub_type = "3"
|
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) > '90'
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.sect_id <> ""
|
OPTION 输入.sect_id <> ""
|
||||||
attr.sect_id = 输入.sect_id
|
attr.sect_id = 输入.sect_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -214,6 +201,10 @@
|
|||||||
ivt.frozen_qty > 0
|
ivt.frozen_qty > 0
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
) a
|
) a
|
||||||
|
WHERE 1=1
|
||||||
|
OPTION 输入.sub_type <> ""
|
||||||
|
a.sub_type = 输入.sub_type
|
||||||
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
@@ -338,19 +329,6 @@
|
|||||||
ivt.pcsn like 输入.pcsn
|
ivt.pcsn like 输入.pcsn
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.sub_type = "1"
|
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) <= '90'
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.sub_type = "2"
|
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) > '60'
|
|
||||||
AND DATEDIFF( NOW(), sub.date_of_production ) <= '90'
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.sub_type = "3"
|
|
||||||
DATEDIFF( NOW(), sub.date_of_production ) > '90'
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.sap_pcsn <> ""
|
OPTION 输入.sap_pcsn <> ""
|
||||||
sub.sap_pcsn like 输入.sap_pcsn
|
sub.sap_pcsn like 输入.sap_pcsn
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
@@ -403,6 +381,9 @@
|
|||||||
) b ON a.pcsn = b.pcsn
|
) b ON a.pcsn = b.pcsn
|
||||||
WHERE
|
WHERE
|
||||||
1=1
|
1=1
|
||||||
|
OPTION 输入.sub_type <> ""
|
||||||
|
a.sub_type = 输入.sub_type
|
||||||
|
ENDOPTION
|
||||||
order by a.instorage_time desc,a.package_box_sn
|
order by a.instorage_time desc,a.package_box_sn
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
IF 输入.flag = "2"
|
IF 输入.flag = "2"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT DISTINCT
|
||||||
mst.stor_name,
|
mst.stor_name,
|
||||||
dis.sect_name,
|
dis.sect_name,
|
||||||
mst.bill_type,
|
mst.bill_type,
|
||||||
|
|||||||
Reference in New Issue
Block a user