代码更新

This commit is contained in:
2023-01-04 14:55:31 +08:00
parent 1e66a048f9
commit dda6e6d464
15 changed files with 41 additions and 76 deletions

View File

@@ -65,7 +65,7 @@
FROM
md_pb_storagevehicleinfo info
LEFT JOIN md_pb_storagevehicleext ext ON info.storagevehicle_id = ext.storagevehicle_id
LEFT JOIN sys_dict_detail d ON info.storagevehicle_type = d.value and d.name = 'storagevehicle_type'
LEFT JOIN sys_dict d ON info.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
LEFT JOIN MD_ME_MaterialBase mdb ON ext.material_id = mdb.material_id
LEFT JOIN MD_ME_ProducMaterialExt mdp ON mdb.material_id = mdp.material_id
LEFT JOIN sch_base_point point ON info.storagevehicle_code = point.vehicle_code
@@ -102,9 +102,9 @@
dict.label,
dict.value
FROM
sys_dict_detail dict
sys_dict dict
WHERE
dict.name = 'storagevehicle_type'
dict.code = 'storagevehicle_type'
AND dict.value in (30,31,32,33)
ENDSELECT
ENDPAGEQUERY

View File

@@ -52,7 +52,7 @@
point.point_name
FROM
md_pb_storagevehicleinfo s
LEFT JOIN sys_dict_detail d ON s.storagevehicle_type = d.value and d.dict_id = '32'
LEFT JOIN sys_dict d ON s.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
LEFT JOIN sch_base_point point ON point.vehicle_code = s.storagevehicle_code
LEFT JOIN ST_IVT_StructIvt ivt ON point.source_id = ivt.struct_id
LEFT JOIN md_me_materialbase mater ON mater.material_id = ivt.material_id

View File

@@ -52,7 +52,7 @@
FROM
sch_base_point point
LEFT JOIN md_pb_storagevehiclepoint svp ON point.point_id = svp.point_id and svp.set_type <>'02'
LEFT JOIN sys_dict_detail d ON svp.set_type = d.value and d.name = 'set_type'
LEFT JOIN sys_dict d ON svp.set_type = d.value and d.code = 'set_type'
WHERE
point.is_delete = '0'
AND point.is_used = '1'
@@ -77,9 +77,9 @@
dict.label,
dict.value
FROM
sys_dict_detail dict
sys_dict dict
WHERE
dict.name = 'storagevehicle_type'
dict.code = 'storagevehicle_type'
AND dict.value in (30,31,32,33)
ENDSELECT
ENDPAGEQUERY
@@ -91,9 +91,9 @@
dict.label,
dict.value
FROM
sys_dict_detail dict
sys_dict dict
WHERE
dict.name = 'sch_area_type'
dict.code = 'sch_area_type'
AND dict.value in (25,26,32,28)
ENDSELECT
ENDQUERY

View File

@@ -55,7 +55,7 @@
md_pb_storagevehicleinfo info
LEFT JOIN md_pb_storagevehiclepoint svp ON info.storagevehicle_id = svp.storagevehicle_id and svp.set_type <>'01'
LEFT JOIN sch_base_point point ON point.point_id = svp.point_id
LEFT JOIN sys_dict_detail d ON info.storagevehicle_type = d.value and d.name = 'storagevehicle_type'
LEFT JOIN sys_dict d ON info.storagevehicle_type = d.value and d.code = 'storagevehicle_type'
WHERE
info.is_delete = '0'
AND info.is_used = '1'
@@ -99,9 +99,9 @@
dict.label,
dict.value
FROM
sys_dict_detail dict
sys_dict dict
WHERE
dict.name = 'storagevehicle_type'
dict.code = 'storagevehicle_type'
AND dict.value in (30,31,32,33)
ENDSELECT
ENDPAGEQUERY

View File

@@ -94,13 +94,13 @@
LEFT JOIN md_me_stockmaterialext s ON m.material_id = s.material_id
LEFT JOIN md_me_producmaterialext p ON m.material_id = p.material_id
LEFT JOIN md_pb_classstandard b ON m.material_type_id = b.class_id
LEFT JOIN sys_dict_detail d1 ON d1.value = p.product_mode and d1.name = 'product_mode'
LEFT JOIN sys_dict_detail d2 ON d2.value = s.is_need_plan and d2.name = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d3 ON d3.value = s.is_report and d3.name = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d7 ON d7.value = p.is_report and d7.name = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d4 ON d4.value = p.is_auto_open and d4.name = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d5 ON d5.value = p.is_again_put and d5.name = 'IS_OR_NOT'
LEFT JOIN sys_dict_detail d6 ON d6.value = p.product_series and d6.name = 'product_series'
LEFT JOIN sys_dict d1 ON d1.value = p.product_mode and d1.code = 'product_mode'
LEFT JOIN sys_dict d2 ON d2.value = s.is_need_plan and d2.code = 'IS_OR_NOT'
LEFT JOIN sys_dict d3 ON d3.value = s.is_report and d3.code = 'IS_OR_NOT'
LEFT JOIN sys_dict d7 ON d7.value = p.is_report and d7.code = 'IS_OR_NOT'
LEFT JOIN sys_dict d4 ON d4.value = p.is_auto_open and d4.code = 'IS_OR_NOT'
LEFT JOIN sys_dict d5 ON d5.value = p.is_again_put and d5.code = 'IS_OR_NOT'
LEFT JOIN sys_dict d6 ON d6.value = p.product_series and d6.code = 'product_series'
LEFT JOIN md_pb_measureunit u ON u.measure_unit_id = m.base_unit_id
WHERE
m.is_delete = '0'

View File

@@ -55,7 +55,7 @@
detail.label
FROM
st_ivt_bsrealstorattr stor
LEFT JOIN sys_dict_detail detail ON detail.value = stor.stor_type_scode AND detail.dict_id = '30'
LEFT JOIN sys_dict detail ON detail.value = stor.stor_type_scode AND detail.code = 'st_stor_type'
WHERE
stor.is_delete = '0'
OPTION 输入.search <> ""

View File

@@ -119,9 +119,9 @@
label AS text,
value
FROM
sys_dict_detail
sys_dict
WHERE
name = 'product_area'
code = 'product_area'
ENDSELECT
ENDQUERY

View File

@@ -87,9 +87,9 @@
label AS text,
value
FROM
sys_dict_detail
sys_dict
WHERE
dict_id = '115'
code = 'sch_cool_ivt_status'
ENDSELECT
ENDQUERY
@@ -100,9 +100,9 @@
SELECT
*
FROM
sys_dict_detail
sys_dict
WHERE
name = 'task_priority'
code = 'task_priority'
AND
label = 输入.task_type

View File

@@ -87,9 +87,9 @@
value,
label
FROM
sys_dict_detail
sys_dict
WHERE
name = 'product_area'
code = 'product_area'
ENDSELECT
ENDQUERY

View File

@@ -149,9 +149,9 @@
label AS text,
value
FROM
sys_dict_detail
sys_dict
WHERE
name = 'ST_INV_OUT_TYPE'
code = 'ST_INV_OUT_TYPE'
ENDSELECT
ENDQUERY

View File

@@ -53,7 +53,7 @@
FROM
sch_base_point point
LEFT JOIN SCH_BASE_Region region ON point.region_id = region.region_id
LEFT JOIN sys_dict_detail d3 ON point.lock_type = d3.value and d3.name='d_lock_type'
LEFT JOIN sys_dict d3 ON point.lock_type = d3.value and d3.code='d_lock_type'
WHERE
point.is_delete = '0'
OPTION 输入.region_id <> ""

View File

@@ -56,7 +56,7 @@
FROM
sch_base_task task
LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code
LEFT JOIN sys_dict_detail dict ON dict.`value` = task.task_status AND dict.`name` = 'task_status'
LEFT JOIN sys_dict dict ON dict.`value` = task.task_status AND dict.`code` = 'task_status'
WHERE
task.is_delete = '0'
OPTION 输入.task_type <> ""

View File

@@ -251,7 +251,7 @@
FROM
st_ivt_iostorinvdisdtl disdtl
LEFT JOIN md_pb_bucketrecord bucket ON bucket.bucketunique = disdtl.bucketunique
LEFT JOIN sys_dict_detail detail ON detail.`value` = bucket.storagevehicle_type
LEFT JOIN sys_dict detail ON detail.`value` = bucket.storagevehicle_type
INNER JOIN sys_dict dict ON dict.dict_id = detail.dict_id
AND dict.`name` LIKE 'MD_BUCKET_TYPE%'
INNER JOIN md_me_materialbase mb ON mb.material_id = bucket.material_id
@@ -374,9 +374,7 @@
st_ivt_iostorinvdisdtl disdtl
INNER JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = disdtl.iostorinv_id
LEFT JOIN st_ivt_iostorinvdtl dtl ON dtl.iostorinvdtl_id = disdtl.iostorinvdtl_id
LEFT JOIN sys_dict_detail detail ON detail.`value` = mst.bill_type
LEFT JOIN sys_dict dict ON dict.dict_id = detail.dict_id
AND dict.`name` LIKE 'ST_INV_TYPE%'
LEFT JOIN sys_dict detail ON detail.`value` = mst.bill_type AND detail.code LIKE 'ST_INV_TYPE%'
INNER JOIN md_me_materialbase mb ON mb.material_id = disdtl.material_id
INNER JOIN md_pb_classstandard class ON class.class_id = mb.material_type_id
WHERE

View File

@@ -112,33 +112,15 @@
IF 输入.flag = "4"
QUERY
SELECT
max(detail.VALUE) AS CODE,
max(detail.label) AS NAME
max(value) AS CODE,
max(label) AS NAME
FROM
sys_dict_detail detail
LEFT JOIN sys_dict dict ON dict.dict_id = detail.dict_id
sys_dict
WHERE
1 = 1
AND dict. NAME LIKE '%INV_TYPE%'
group by detail.VALUE
AND CODE LIKE '%INV_TYPE%'
group by value
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "5"
QUERY
SELECT
detail.VALUE,
detail.label
FROM
sys_dict_detail detail
inner JOIN sys_dict dict ON dict.dict_id = detail.dict_id and dict.dict_id='6'
WHERE
1 = 1
OPTION 输入.ids <> ""
detail.VALUE in (输入.ids)
ENDOPTION
order by detail.dict_sort
ENDSELECT
ENDQUERY
ENDIF
ENDIF

View File

@@ -700,21 +700,6 @@
ENDQUERY
ENDIF
IF 输入.flag = "11"
QUERY
SELECT
detail.value AS code,
detail.label AS name
FROM
sys_dict_detail detail
INNER JOIN sys_dict dict ON detail.dict_id = dict.dict_id
WHERE
dict.name = 'ST_INV_TYPE_IO'
AND detail.name = 'IO_BUSS_TYPE'
ENDSELECT
ENDQUERY
ENDIF
IF 输入.flag = "12"
PAGEQUERY
SELECT