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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
| <?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.InternalAuditCarryMapper">
| <insert id="insertCarryDept">
| INSERT INTO`internal_audit_carry_dept` (`carry_id`, `dept_id`, `date`, `time`, `check_id` )
| VALUES
| <foreach collection="deptList" separator="," item="item">
| ( #{item.carryId}, #{item.deptId}, #{item.date}, #{item.time}, #{item.checkId} )
| </foreach>
| </insert>
| <delete id="deletedCarryDeptByCarryId">
| DELETE FROM internal_audit_carry_dept WHERE carry_id = #{carryId}
| </delete>
|
| <select id="selectCarryList" resultType="com.gkhy.exam.system.domain.InternalAuditCarry">
| SELECT
| iac.`id`,
| iac.`company_id`,
| sc.`name` as company_name,
| iac.`year`,
| iac.`audit_purpose`,
| iac.`review_basis`,
| iac.`review_scope`,
| iac.`review_start`,
| iac.`review_end`,
| iac.`review_person`,
| iac.`first_starttime`,
| iac.`first_endtime`,
| iac.`last_starttime`,
| iac.`last_endtime`,
| iac.`compilation_id`,
| su1.`name` as compilation_name,
| iac.`proofread_id`,
| su2.`name` as proofread_name,
| iac.`check_id`,
| su3.`name` as check_name,
| iac.`ratify_id`,
| su4.`name` as ratify_name,
| iac.`del_flag`,
| iac.`create_by`,
| iac.`create_time`,
| iac.`update_by`,
| iac.`update_time`
| FROM
| internal_audit_carry iac
| LEFT JOIN sys_user su1 on iac.compilation_id = su1.id
| LEFT JOIN sys_user su2 on iac.proofread_id = su2.id
| LEFT JOIN sys_user su3 on iac.check_id = su3.id
| LEFT JOIN sys_user su4 on iac.ratify_id = su4.id
| LEFT JOIN sys_company sc on iac.company_id = sc.id
| WHERE iac.del_flag =1
| <if test="companyId!=null and companyId!=''">
| and iac.company_id = #{companyId}
| </if>
| ORDER BY iac.create_time ASC
| </select>
| <select id="selectCarryDeptList" resultType="com.gkhy.exam.system.domain.InternalAuditCarryDept">
| SELECT
| iacd.`id`,
| iacd.`carry_id`,
| iacd.`dept_id`,
| sd.dept_name,
| iacd.`date`,
| iacd.`time`,
| iacd.`check_id` ,
| su.`name` as check_name
| FROM
| internal_audit_carry_dept iacd
| LEFT JOIN sys_user su on iacd.check_id = su.id
| left join sys_dept sd on iacd.dept_id = sd.dept_id
| WHERE iacd.carry_id = #{carryId}
| </select>
| </mapper>
|
|