fix:sys_dict关联查询
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
detail.label
|
||||
FROM
|
||||
st_ivt_bsrealstorattr stor
|
||||
LEFT JOIN sys_dict 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 <> ""
|
||||
|
||||
@@ -348,7 +348,9 @@ public class PointServiceImpl implements PointService {
|
||||
|
||||
//根据重量返回最大的 级数
|
||||
public String getLoadSeriesByqty(Double qty) {
|
||||
JSONArray dictArr = WQLObject.getWQLObject("sys_dict_detail").query("dict_id ='108'", "label").getResultJSONArray(0);
|
||||
//字典表查询 使用sys_dict表code查询
|
||||
//JSONArray dictArr = WQLObject.getWQLObject("sys_dict").query("dict_code ='xxxx'", "label").getResultJSONArray(0);
|
||||
JSONArray dictArr = new JSONArray();
|
||||
String load_series = "4";
|
||||
for (int i = 0; i < dictArr.size(); i++) {
|
||||
JSONObject dictObj = dictArr.getJSONObject(i);
|
||||
|
||||
@@ -226,14 +226,13 @@
|
||||
QUERY
|
||||
SELECT
|
||||
bucket.*,
|
||||
detail.label,
|
||||
dict.label,
|
||||
mb.material_code,
|
||||
mb.material_name
|
||||
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
|
||||
INNER JOIN sys_dict dict ON dict.dict_id = detail.dict_id
|
||||
LEFT JOIN sys_dict dict ON dict.`value` = bucket.storagevehicle_type
|
||||
AND dict.`name` LIKE 'MD_BUCKET_TYPE%'
|
||||
INNER JOIN md_me_materialbase mb ON mb.material_id = bucket.material_id
|
||||
WHERE
|
||||
@@ -336,7 +335,7 @@
|
||||
disdtl.pcsn,
|
||||
disdtl.real_qty AS need_qty,
|
||||
disdtl.qty_unit_name,
|
||||
detail.label AS source_type_name,
|
||||
dict.label AS source_type_name,
|
||||
disdtl.qty_unit_id,
|
||||
disdtl.iostorinvdtl_id AS source_billdtl_id,
|
||||
mst.bill_type AS source_bill_type,
|
||||
@@ -355,8 +354,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
|
||||
LEFT JOIN sys_dict dict ON dict.`value` = mst.bill_type
|
||||
AND dict.`name` 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
|
||||
|
||||
@@ -118,7 +118,7 @@
|
||||
sys_dict detail
|
||||
WHERE
|
||||
1 = 1
|
||||
AND detail.code LIKE '%INV_TYPE%'
|
||||
AND code LIKE '%INV_TYPE%'
|
||||
group by detail.VALUE
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
@@ -127,17 +127,16 @@
|
||||
IF 输入.flag = "5"
|
||||
QUERY
|
||||
SELECT
|
||||
detail.VALUE,
|
||||
detail.label
|
||||
VALUE,
|
||||
label
|
||||
FROM
|
||||
sys_dict_detail detail
|
||||
inner JOIN sys_dict dict ON dict.dict_id = detail.dict_id and dict.dict_id='6'
|
||||
sys_dict
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.ids <> ""
|
||||
detail.VALUE in (输入.ids)
|
||||
dict_id in (输入.ids)
|
||||
ENDOPTION
|
||||
order by detail.dict_sort
|
||||
order by dict_sort
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -635,14 +635,12 @@
|
||||
IF 输入.flag = "11"
|
||||
QUERY
|
||||
SELECT
|
||||
detail.value AS code,
|
||||
detail.label AS name
|
||||
value AS code,
|
||||
label AS name
|
||||
FROM
|
||||
sys_dict_detail detail
|
||||
INNER JOIN sys_dict dict ON detail.dict_id = dict.dict_id
|
||||
sys_dict
|
||||
WHERE
|
||||
dict.name = 'ST_INV_TYPE_IO'
|
||||
AND detail.name = 'IO_BUSS_TYPE'
|
||||
code = 'ST_INV_TYPE_IO'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user