| | |
| | | dl.tenant_id, |
| | | dl.is_depr, |
| | | dl.annual_depreciation_amount, |
| | | dl.type |
| | | dl.type, |
| | | dl.is_iot_device AS isIotDevice, |
| | | dl.external_code AS externalCode |
| | | FROM device_ledger dl |
| | | LEFT JOIN sys_user su ON dl.create_user = su.user_id |
| | | LEFT JOIN device_area da ON dl.area_id = da.id |
| | |
| | | <if test="deviceLedger.tenantId != null"> |
| | | AND dl.tenant_id = #{deviceLedger.tenantId} |
| | | </if> |
| | | <if test="deviceLedger.isIotDevice != null"> |
| | | AND dl.is_iot_device = #{deviceLedger.isIotDevice} |
| | | </if> |
| | | <if test="deviceLedger.externalCode != null and deviceLedger.externalCode != ''"> |
| | | AND dl.external_code LIKE CONCAT('%', #{deviceLedger.externalCode}, '%') |
| | | </if> |
| | | </where> |
| | | ORDER BY dl.create_time DESC |
| | | </select> |