|
@@ -14,7 +14,8 @@
|
|
<result column="update_time_" property="updateTime"/>
|
|
<result column="update_time_" property="updateTime"/>
|
|
<result column="organName" property="organName"/>
|
|
<result column="organName" property="organName"/>
|
|
<result column="userName" property="userName"/>
|
|
<result column="userName" property="userName"/>
|
|
- <collection property="inspectionItems" columnPrefix="ie_" ofType="com.ym.mec.biz.dal.entity.InspectionItem" resultMap="com.ym.mec.biz.dal.dao.InspectionItemDao.InspectionItem"/>
|
|
|
|
|
|
+ <collection property="inspectionItems" columnPrefix="ie_" ofType="com.ym.mec.biz.dal.entity.InspectionItem"
|
|
|
|
+ resultMap="com.ym.mec.biz.dal.dao.InspectionItemDao.InspectionItem"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
<!--@mbg.generated-->
|
|
<!--@mbg.generated-->
|
|
@@ -28,17 +29,14 @@
|
|
where id_ = #{id}
|
|
where id_ = #{id}
|
|
</select>
|
|
</select>
|
|
<delete id="delete" parameterType="java.lang.Long">
|
|
<delete id="delete" parameterType="java.lang.Long">
|
|
- <!--@mbg.generated-->
|
|
|
|
- delete from inspection
|
|
|
|
|
|
+ delete
|
|
|
|
+ from inspection
|
|
where id_ = #{id}
|
|
where id_ = #{id}
|
|
</delete>
|
|
</delete>
|
|
<insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.Inspection"
|
|
<insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.Inspection"
|
|
useGeneratedKeys="true">
|
|
useGeneratedKeys="true">
|
|
- <!--@mbg.generated-->
|
|
|
|
- insert into inspection (organ_id_, user_id_, month_, operation_, create_time_, update_time_
|
|
|
|
- )
|
|
|
|
- values (#{organId}, #{userId}, #{month}, #{operation}, #{createTime}, #{updateTime}
|
|
|
|
- )
|
|
|
|
|
|
+ insert into inspection (organ_id_, user_id_, month_, operation_, create_time_, update_time_)
|
|
|
|
+ values (#{organId}, #{userId}, #{month}, #{operation}, #{createTime}, #{updateTime})
|
|
</insert>
|
|
</insert>
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.Inspection">
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.Inspection">
|
|
<!--@mbg.generated-->
|
|
<!--@mbg.generated-->
|
|
@@ -105,13 +103,25 @@
|
|
</where>
|
|
</where>
|
|
</sql>
|
|
</sql>
|
|
<select id="getInfo" resultMap="Inspection">
|
|
<select id="getInfo" resultMap="Inspection">
|
|
- SELECT i.*,ii.id_ ie_id_,ii.inspection_id_ ie_inspection_id_,ii.organ_id_ ie_organ_id_,ii.user_id_ ie_user_id_,
|
|
|
|
- ii.item_ ie_item_,ii.times_ ie_times_,ii.planned_times_ ie_planned_times_,ii.submitted_times_ ie_submitted_times_,
|
|
|
|
- ii.memo_ ie_memo_,ii.operation_ ie_operation_,ii.create_time_ ie_create_time_,ii.update_time_ ie_update_time_,
|
|
|
|
- o.name_ organName,su.real_name_ userName FROM inspection i
|
|
|
|
- LEFT JOIN organization o ON o.id_ = i.organ_id_
|
|
|
|
- LEFT JOIN sys_user su ON su.id_ = i.user_id_
|
|
|
|
- LEFT JOIN inspection_item ii ON ii.inspection_id_ = i.id_
|
|
|
|
|
|
+ SELECT i.*,
|
|
|
|
+ ii.id_ ie_id_,
|
|
|
|
+ ii.inspection_id_ ie_inspection_id_,
|
|
|
|
+ ii.organ_id_ ie_organ_id_,
|
|
|
|
+ ii.user_id_ ie_user_id_,
|
|
|
|
+ ii.item_ ie_item_,
|
|
|
|
+ ii.times_ ie_times_,
|
|
|
|
+ ii.planned_times_ ie_planned_times_,
|
|
|
|
+ ii.submitted_times_ ie_submitted_times_,
|
|
|
|
+ ii.memo_ ie_memo_,
|
|
|
|
+ ii.operation_ ie_operation_,
|
|
|
|
+ ii.create_time_ ie_create_time_,
|
|
|
|
+ ii.update_time_ ie_update_time_,
|
|
|
|
+ o.name_ organName,
|
|
|
|
+ su.real_name_ userName
|
|
|
|
+ FROM inspection i
|
|
|
|
+ LEFT JOIN organization o ON o.id_ = i.organ_id_
|
|
|
|
+ LEFT JOIN sys_user su ON su.id_ = i.user_id_
|
|
|
|
+ LEFT JOIN inspection_item ii ON ii.inspection_id_ = i.id_
|
|
WHERE i.id_ = #{id}
|
|
WHERE i.id_ = #{id}
|
|
</select>
|
|
</select>
|
|
</mapper>
|
|
</mapper>
|