|
|
|
@ -17,12 +17,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
<result property="remark" column="remark" />
|
|
|
|
<collection property="pcEmps" ofType="KhEmployee">
|
|
|
|
<collection property="pcEmps" javaType="ArrayList"
|
|
|
|
|
|
|
|
ofType="KhEmployee"
|
|
|
|
|
|
|
|
select="getEmps" column="{id=id}"/>
|
|
|
|
|
|
|
|
<!--<collection property="pcEmps" ofType="KhEmployee" javaType="list">
|
|
|
|
<result property="id" column="emp_id" />
|
|
|
|
<result property="id" column="emp_id" />
|
|
|
|
<result property="empName" column="emp_name" />
|
|
|
|
<result property="empName" column="emp_name" />
|
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
|
</collection >
|
|
|
|
</collection >-->
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<resultMap id="EmpsResult" type="KhEmployee">
|
|
|
|
|
|
|
|
<result property="id" column="emp_id" />
|
|
|
|
|
|
|
|
<result property="empName" column="emp_name" />
|
|
|
|
|
|
|
|
<result property="deptId" column="dept_id" />
|
|
|
|
|
|
|
|
<result property="deptName" column="dept_name" />
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectKhPingceVo">
|
|
|
|
<sql id="selectKhPingceVo">
|
|
|
|
@ -30,7 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult">
|
|
|
|
<select id="selectKhPingceList" parameterType="KhPingce" resultMap="KhPingceResult">
|
|
|
|
select p.*, emp_id,emp_name,dept_id,dept_name from kh_pingce p left join kh_pc_emp pe on p.id=pe.pc_id
|
|
|
|
<include refid="selectKhPingceVo"></include>
|
|
|
|
|
|
|
|
/*select p.*, emp_id,emp_name,dept_id,dept_name from kh_pingce p left join kh_pc_emp pe on p.id=pe.pc_id*/
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="pcTitle != null and pcTitle != ''"> and pc_title = #{pcTitle}</if>
|
|
|
|
<if test="pcTitle != null and pcTitle != ''"> and pc_title = #{pcTitle}</if>
|
|
|
|
<if test="pcDescription != null and pcDescription != ''"> and pc_description = #{pcDescription}</if>
|
|
|
|
<if test="pcDescription != null and pcDescription != ''"> and pc_description = #{pcDescription}</if>
|
|
|
|
@ -40,10 +50,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="state != null and state != ''"> and state = #{state}</if>
|
|
|
|
<if test="state != null and state != ''"> and state = #{state}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="getEmps" resultMap="EmpsResult">
|
|
|
|
|
|
|
|
select emp_id,emp_name,dept_id,dept_name from kh_pc_emp pe
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="id != null "> pe.pc_id = #{id}</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectKhPingceById" parameterType="Long" resultMap="KhPingceResult">
|
|
|
|
<select id="selectKhPingceById" parameterType="Long" resultMap="KhPingceResult">
|
|
|
|
select p.*, emp_id,emp_name,dept_id,dept_name from kh_pingce p left join kh_pc_emp pe on p.id=pe.pc_id
|
|
|
|
<include refid="selectKhPingceVo"></include>
|
|
|
|
where p.id = #{id}
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertKhPingce" parameterType="KhPingce" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
<insert id="insertKhPingce" parameterType="KhPingce" useGeneratedKeys="true" keyProperty="id">
|
|
|
|
|