This commit is contained in:
hayu 2025-09-12 10:49:54 +08:00
parent fac0a798c2
commit 38afac0898
1 changed files with 12 additions and 4 deletions

View File

@ -1347,17 +1347,23 @@
sdd.dict_label as maStatus,
mt.type_name as typeModelName,
mt1.type_name as typeName,
CASE
CASE
WHEN rar.create_by is not null THEN
rar.create_by
ELSE
WHEN su.nick_name is not null THEN
su.nick_name
WHEN raud.create_by REGEXP '^[0-9]+$' THEN
su3.nick_name
ELSE
raud.create_by
END createBy,
CASE
CASE
WHEN rar.create_time is not null THEN
rar.create_time
ELSE
WHEN rad.update_time is not null THEN
rad.update_time
ELSE
raud.create_time
END createTime,
CASE
WHEN rad.repairer REGEXP '^[0-9]+$' THEN su2.nick_name
@ -1377,6 +1383,8 @@
LEFT JOIN ma_part_type mpt
ON mpt.pa_id = rar.part_id
LEFT JOIN ma_part_type mpt2 ON mpt2.pa_id = mpt.parent_id
LEFT JOIN repair_audit_details raud on raud.repair_id=rad.task_id and raud.type_id=rad.type_id and rad.ma_id<=>raud.ma_id
LEFT JOIN sys_user su3 on raud.create_by=su3.user_id
]]>
WHERE rad.task_id = #{taskId}
and rad.type_id = #{typeId}