fix operation_record list

This commit is contained in:
dev02 2022-11-12 19:38:19 +08:00
parent 834d9ee443
commit e84e6b04ff

View File

@ -927,8 +927,10 @@ namespace FrontendWebApi.ApiControllers
var sqlString = $@"select opr.* , concat(d.device_floor_tag, ' ', d.device_last_name, ' ', d.device_serial_tag) as device_name, ui.full_name as user_full_name var sqlString = $@"select opr.* , concat(d.device_floor_tag, ' ', d.device_last_name, ' ', d.device_serial_tag) as device_name, ui.full_name as user_full_name
from operation_record opr from operation_record opr
left join device d on opr.fix_do_code = d.device_number left join device d on opr.fix_do_code = d.device_number and d.deleted = 0 and d.device_area_tag = SUBSTRING_INDEX(opr.fix_do_code, '_', 1)
left join userinfo ui on opr.work_person_id = ui.userinfo_guid and d.device_building_tag = SUBSTRING_INDEX(opr.fix_do_code, '_', 2) and d.device_floor_tag = SUBSTRING_INDEX(opr.fix_do_code, '_', 5)
and d.device_system_tag = opr.device_system_category_layer2 and d.device_name_tag = opr.device_system_category_layer3
left join userinfo ui on opr.work_person_id = ui.userinfo_guid and ui.deleted = 0
where opr.deleted = 0 and opr.work_type = @work_type" + sWhere; where opr.deleted = 0 and opr.work_type = @work_type" + sWhere;
var param = new { @work_type = ofl.work_type, @start_created_at = ofl.start_created_at, @end_created_at = ofl.end_created_at, @sub_system_tag = ofl.sub_system_tag, @main_system_tag = ofl.main_system_tag, @formId = ofl.serial_number }; var param = new { @work_type = ofl.work_type, @start_created_at = ofl.start_created_at, @end_created_at = ofl.end_created_at, @sub_system_tag = ofl.sub_system_tag, @main_system_tag = ofl.main_system_tag, @formId = ofl.serial_number };