代码提交

This commit is contained in:
itcast 2025-12-09 13:40:20 +08:00
parent 22a6f9017b
commit d90af2e3f3
1 changed files with 8 additions and 1 deletions

View File

@ -91,6 +91,7 @@
cdc.create_user as createUser,
cdc.create_time as createTime,
cdc.company_id as companyId
FROM
cs_device_change cdc
LEFT JOIN cs_device_change_details cdcd ON cdcd.change_id = cdc.id
@ -120,6 +121,7 @@
<select id="getScrapDetailsList" resultType="com.bonus.material.scrap.domain.ToBeScrap">
SELECT DISTINCT cdcd.id,cdcd.dev_type_id as typeId, 2 as devType,
tl.id as devId,
'工具' as type,
CONCAT(tt2.type_name, '/', tt3.type_name, '/', tt4.type_name) AS groupName,
tt4.type_name as typeName,
@ -151,6 +153,10 @@
reason_url
END url
FROM cs_device_change_details cdcd
LEFT JOIN tool_ledger tl
ON cdcd.dev_type = '2'
AND cdcd.dev_type_id = tl.type_id
AND (cdcd.dev_code is null OR cdcd.dev_code = tl.tool_code)
LEFT JOIN tool_type tt5 on tt5.type_id = cdcd.dev_type_id
LEFT JOIN tool_type tt4 on tt4.type_id = tt5.parent_id
LEFT JOIN tool_type tt3 on tt3.type_id = tt4.parent_id
@ -165,6 +171,7 @@
SELECT DISTINCT cdcd.id,cdcd.dev_type_id as typeId, 1 as devType,
mdi.ma_id as devId,
'装备' as type,
CONCAT(mt2.type_name, '/', mt3.type_name, '/', mt4.type_name) AS groupName,
mdi.device_name as typeName,
@ -196,7 +203,7 @@
reason_url
END url
FROM cs_device_change_details cdcd
LEFT JOIN ma_dev_info mdi on mdi.type_id = cdcd.dev_type_id
LEFT JOIN ma_dev_info mdi on mdi.code = cdcd.dev_code
LEFT JOIN ma_type mt5 on mt5.type_id = mdi.type_id
LEFT JOIN ma_type mt4 on mt4.type_id = mt5.parent_id
LEFT JOIN ma_type mt3 on mt3.type_id = mt4.parent_id