1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
| <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
| "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
| <mapper namespace="com.ruoyi.measuringinstrumentledger.mapper.MeasuringInstrumentLedgerMapper">
|
| <select id="listPage" resultType="com.ruoyi.measuringinstrumentledger.dto.MeasuringInstrumentLedgerPageDto">
| SELECT
| mil.id,
| mil.user_id,
| mil.user_name,
| mil.code,
| sd.dept_name,
| mil.installation_location,
| mil.unit,
| mil.cycle,
| mil.name,
| mil.model,
| mil.most_date,
| mil.valid,
| mil.next_date,
| mil.record_date,
| mil.create_user,
| mil.create_time,
| mil.update_user,
| mil.update_time,
| mil.tenant_id
| FROM
| measuring_instrument_ledger mil
| left join sys_dept sd on sd.id = mil.dept_id
| <where>
| <!-- 查询条件同上 -->
| <if test="req.code != null and req.code != ''">
| AND mil.code LIKE CONCAT('%', #{req.code}, '%')
| </if>
| <if test="req.name != null and req.name != ''">
| AND mil.name LIKE CONCAT('%', #{req.name}, '%')
| </if>
| <if test="req.status != null">
| AND mil.status = #{req.status}
| </if>
| <if test="req.tenantId != null">
| AND mil.tenant_id = #{req.tenantId}
| </if>
| <if test="req.recordDate != null">
| AND mil.record_date = DATE_FORMAT(#{req.recordDate},'%Y-%m-%d')
| </if>
| </where>
| ORDER BY mil.update_time DESC
| </select>
| </mapper>
|
|