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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
| <?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.ycl.mapper.ProjectPlanRecordMapper">
|
| <!-- 通用查询映射结果 -->
| <resultMap id="BaseResultMap" type="com.ycl.domain.vo.ProjectPlanRecordVO">
| <result column="project_info_id" property="projectInfoId" />
| <result column="plan_id" property="planId" />
| <result column="engineering_info_id" property="engineeringInfoId" />
| <result column="plan_time" property="planTime" />
| <result column="plan_time_flag" property="planTimeFlag" />
| <result column="create_time" property="createTime" />
| <result column="report_status" property="reportStatus" />
| <result column="actual_invest" property="actualInvest" />
| </resultMap>
|
| <resultMap id="ProjetPlanRecordItem" type="com.ycl.domain.vo.ProjetPlanRecordItem">
| <id property="id" column="id" />
| <result column="project_name" property="projectName" />
| <result column="project_code" property="projectCode" />
| <result column="plan_time" property="planTime" />
| <result column="plan_time_flag" property="planTimeFlag" />
| <result column="create_time" property="createTime" />
| <result column="report_status" property="reportStatus" />
| </resultMap>
| <insert id="insertItem">
| INSERT INTO t_project_plan_record (
| project_info_id,
| plan_id,
| engineering_info_id,
| plan_time,
| plan_time_flag,
| create_time,
| report_status,
| actual_invest
| )
| VALUES (
| #{projectInfoId},
| #{planId},
| #{engineeringInfoId},
| #{planTime},
| #{planTimeFlag},
| #{createTime},
| #{reportStatus},
| #{actualInvest}
| )
| </insert>
|
|
| <select id="getById" resultMap="BaseResultMap">
| SELECT
| TPPR.project_info_id,
| TPPR.plan_id,
| TPPR.engineering_info_id,
| TPPR.plan_time,
| TPPR.plan_time_flag,
| TPPR.create_time,
| TPPR.report_status,
| TPPR.actual_invest,
| TPPR.id
| FROM
| t_project_plan_record TPPR
| WHERE
| TPPR.id = #{id} AND TPPR.deleted = 0
| </select>
|
|
| <select id="getPage" resultMap="BaseResultMap">
| SELECT
| TPPR.project_info_id,
| TPPR.plan_id,
| TPPR.engineering_info_id,
| TPPR.plan_time,
| TPPR.plan_time_flag,
| TPPR.create_time,
| TPPR.report_status,
| TPPR.actual_invest,
| TPPR.id
| FROM
| t_project_plan_record TPPR
| WHERE
| TPPR.deleted = 0
| </select>
|
|
| <select id="selectPlanList" resultMap="ProjetPlanRecordItem">
| SELECT
| ppr.id,
| pi.project_name,
| pi.project_code,
| ppr.plan_time,
| ppr.plan_time_flag,
| ppr.create_time,
| ppr.report_status
| FROM t_project_plan_record AS ppr
| LEFT JOIN t_project_info AS pi ON pi.id = ppr.project_info_id
| WHERE
| ppr.plan_time_flag = #{flag}
| AND pi.id = #{id}
| </select>
|
| </mapper>
|
|