diff --git a/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidDeviceMapper.xml b/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidDeviceMapper.xml index 421b16a..5c2e8f9 100644 --- a/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidDeviceMapper.xml +++ b/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidDeviceMapper.xml @@ -88,6 +88,25 @@ + + + + + + - select t.id, t.location_code, t.location_alias, t.location_type, t.parent_id, t.is_marked, t.remark, t.created_by, t.created_at, t.updated_by, t.updated_at + select t.id, t.location_code, t.location_alias, t.location_type, t.parent_id, t.is_marked, t.remark, t.created_by, t.created_at, t.updated_by, t.updated_at from rfid_location t ${ew.customSqlSegment} diff --git a/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidReadRecordMapper.xml b/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidReadRecordMapper.xml index fc91473..6de8efd 100644 --- a/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidReadRecordMapper.xml +++ b/ruoyi-modules/hw-rfid/src/main/resources/mapper/rfid/RfidReadRecordMapper.xml @@ -11,8 +11,9 @@ select combined.id, combined.device_id, - d.device_code as deviceCode, + combined.device_code as deviceCode, d.device_name as deviceName, + l.location_alias as locationAlias, combined.read_status, TRIM(combined.barcode) as barcode, combined.record_time, @@ -46,6 +49,7 @@ select t.id, t.device_id, + t.device_code, t.read_status, TRIM(t.barcode) as barcode, t.record_time, @@ -60,6 +64,7 @@ ) combined left join rfid_device d on combined.device_id = d.id + left join rfid_location l on d.location_id = l.id order by combined.record_time desc @@ -67,8 +72,9 @@ @@ -85,8 +92,9 @@ select t.id, t.device_id, - d.device_code as deviceCode, + t.device_code as deviceCode, d.device_name as deviceName, + l.location_alias as locationAlias, t.read_status, TRIM(t.barcode) as barcode, t.record_time, @@ -139,6 +149,7 @@ t.alarm_action from ${tableName} t left join rfid_device d on t.device_id = d.id + left join rfid_location l on d.location_id = l.id ${ew.customSqlSegment} @@ -150,8 +161,9 @@ @@ -185,6 +199,7 @@ insert into ${tableName}( id, device_id, + device_code, read_status, barcode, record_time, @@ -196,6 +211,7 @@ values ( #{entity.id}, #{entity.deviceId}, + #{entity.deviceCode}, #{entity.readStatus}, #{entity.barcode}, #{entity.recordTime}, @@ -211,6 +227,7 @@ insert into ${tableName}( id, device_id, + device_code, read_status, barcode, record_time, @@ -224,6 +241,7 @@ ( #{item.id}, #{item.deviceId}, + #{item.deviceCode}, #{item.readStatus}, #{item.barcode}, #{item.recordTime}, @@ -242,6 +260,9 @@ device_id = #{entity.deviceId}, + + device_code = #{entity.deviceCode}, + read_status = #{entity.readStatus}, @@ -275,6 +296,9 @@ device_id = #{item.deviceId}, + + device_code = #{item.deviceCode}, + read_status = #{item.readStatus}, @@ -352,8 +376,9 @@ @@ -383,8 +409,9 @@ @@ -450,7 +478,7 @@ select t1.id, t1.device_id, - d.device_code as deviceCode, + t1.device_code as deviceCode, d.device_name as deviceName, + l.location_alias as locationAlias, t1.read_status, TRIM(t1.barcode) as barcode, t1.record_time, @@ -487,6 +516,7 @@ t1.alarm_action from ${tableName} t1 left join rfid_device d on t1.device_id = d.id + left join rfid_location l on d.location_id = l.id inner join ( select @@ -507,8 +537,9 @@