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
| <?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.gkhy.exam.system.mapper.AnnualReportMapper">
|
| <select id="selectAnnualList" resultType="com.gkhy.exam.system.domain.AnnualReport">
| SELECT
| ar.`id`,
| ar.`company_id`,
| sc.`name` AS company_name,
| ar.`report_name`,
| ar.`number`,
| ar.`dept_id`,
| sd.dept_name,
| ar.`end_time`,
| ar.`grant_amount`,
| ar.`recycle_amount`,
| ar.`recycle_rate`,
| ar.`check_amount`,
| ar.`year_rate`,
| ar.`anciently_rate`,
| ar.`research_satisficing`,
| ar.`delivery_satisficing`,
| ar.`sum_satisficing`,
| ar.`suggest`,
| ar.`agent_id`,
| su1.`name` AS agent_name,
| ar.`dept_user`,
| su2.`name` AS dept_user_name,
| ar.`del_flag`,
| ar.`create_by`,
| ar.`create_time`,
| ar.`update_by`,
| ar.`update_time`
| FROM
| `annual_report` ar
| LEFT JOIN sys_company sc ON ar.company_id = sc.id
| LEFT JOIN sys_user su1 ON ar.agent_id = su1.id
| LEFT JOIN sys_user su2 ON ar.dept_user = su2.id
| LEFT JOIN sys_dept sd ON ar.dept_id = sd.dept_id
| WHERE
| ar.del_flag = 1
| <if test="companyId!=null">
| AND ar.company_id = 24
| </if>
| ORDER BY
| ar.create_time DESC
| </select>
| </mapper>
|
|