| | |
| | | SELECT |
| | | t1.id, |
| | | t1.user_id, |
| | | t1.user_name, |
| | | <!-- user_name 存的是登录账号,这里改取用户昵称;取不到时回退为原值 --> |
| | | IFNULL(su.nick_name, t1.user_name) AS user_name, |
| | | t2.code, |
| | | t2.name, |
| | | t2.model, |
| | |
| | | FROM |
| | | measuring_instrument_ledger_record t1 |
| | | left join measuring_instrument_ledger t2 on t1.measuring_instrument_ledger_id = t2.id |
| | | left join sys_user su on t1.user_id = su.user_id |
| | | <where> |
| | | <!-- 查询条件同上 --> |
| | | <if test="req.code != null and req.code != ''"> |
| | |
| | | AND t1.record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d') |
| | | </if> |
| | | </where> |
| | | ORDER BY t1.update_time DESC |
| | | ORDER BY t1.create_time DESC |
| | | </select> |
| | | <select id="list" resultType="com.ruoyi.measuringinstrumentledger.pojo.MeasuringInstrumentLedgerRecord"> |
| | | SELECT |
| | | t1.id, |
| | | t1.user_id, |
| | | t1.user_name, |
| | | <!-- user_name 存的是登录账号,这里改取用户昵称;取不到时回退为原值 --> |
| | | IFNULL(su.nick_name, t1.user_name) AS user_name, |
| | | t2.code, |
| | | t2.name, |
| | | t2.model, |
| | |
| | | FROM |
| | | measuring_instrument_ledger_record t1 |
| | | left join measuring_instrument_ledger t2 on t1.measuring_instrument_ledger_id = t2.id |
| | | left join sys_user su on t1.user_id = su.user_id |
| | | <where> |
| | | <!-- 查询条件同上 --> |
| | | <if test="req.code != null and req.code != ''"> |
| | |
| | | </where> |
| | | ORDER BY t1.update_time DESC |
| | | </select> |
| | | </mapper> |
| | | </mapper> |