opt:配粉开单优化:原料根据质检时间
This commit is contained in:
@@ -117,6 +117,7 @@
|
||||
IF 输入.flag = "22"
|
||||
QUERY
|
||||
SELECT
|
||||
ql_test_inspectionsheetMst.confirm_time,
|
||||
structivt.*,
|
||||
mb.material_name,
|
||||
mb.material_code,
|
||||
@@ -151,6 +152,8 @@
|
||||
) structivt
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = structivt.material_id
|
||||
LEFT JOIN md_me_stockmaterialext stockmaterialext ON mb.material_id = stockmaterialext.material_id
|
||||
left join ql_test_inspectionsheetdtl ON structivt.pcsn = ql_test_inspectionsheetdtl.pcsn and ql_test_inspectionsheetdtl.bill_status = '99'
|
||||
left join ql_test_inspectionsheetMst ON ql_test_inspectionsheetdtl.inspection_id = ql_test_inspectionsheetMst.inspection_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
SUM( FormulaDtl2.formula_qty - FormulaDtl2.put_qty ) AS used__qty,
|
||||
@@ -205,7 +208,7 @@
|
||||
OPTION 输入.is_pure <> ""
|
||||
stockmaterialext.is_pure = 输入.is_pure
|
||||
ENDOPTION
|
||||
ORDER BY structivt.material_id,structivt.ivt_level desc, structivt.pcsn, structivt.sum_qty desc
|
||||
ORDER BY structivt.material_id, structivt.ivt_level DESC,confirm_time ASC, structivt.pcsn, structivt.sum_qty DESC
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user