This commit is contained in:
wangliwen 2022-10-12 16:20:32 +08:00
parent 5c9a8a83d8
commit da4fab24bc
8 changed files with 55 additions and 53 deletions

View File

@ -88,7 +88,8 @@
car.dept_name AS "deptName", car.dept_name AS "deptName",
COUNT(car.id) AS "count" COUNT(car.id) AS "count"
FROM FROM
(select del_flag, user_id, json_extract(note1, '$[0].idtCameraChannel') as id, TRIM(BOTH '"' FROM json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1, '$[0].channelName') as name (select del_flag, user_id, json_extract(note1, '$[0].idtCameraChannel') as id, TRIM(BOTH '"' FROM
json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1, '$[0].channelName') as name
from tb_resource_car where note1 IS NOT NULL) car from tb_resource_car where note1 IS NOT NULL) car
left join sys_dept dept on car.dept_name=dept.name left join sys_dept dept on car.dept_name=dept.name
WHERE car.user_id = #{userId} WHERE car.user_id = #{userId}
@ -163,7 +164,8 @@
car.del_flag AS delFlag, car.del_flag AS delFlag,
car.idtCameraChannel car.idtCameraChannel
FROM FROM
(select del_flag, id, user_id, note1, create_date, resource_id, json_extract(note1, '$[0].idtCameraChannel') as idtCameraChannel, (select del_flag, id, user_id, note1, create_date, resource_id, json_extract(note1, '$[0].idtCameraChannel') as
idtCameraChannel,
TRIM(BOTH '"' FROM json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1, TRIM(BOTH '"' FROM json_extract(note1, '$[0].managementUnitName')) as dept_name, json_extract(note1,
'$[0].channelName') as name '$[0].channelName') as name
from tb_resource_car where note1 IS NOT NULL) car from tb_resource_car where note1 IS NOT NULL) car