|
@@ -12,6 +12,8 @@
|
|
<result property="clientId" column="client_id"/>
|
|
<result property="clientId" column="client_id"/>
|
|
<result property="clientName" column="client_name"/>
|
|
<result property="clientName" column="client_name"/>
|
|
<result property="enterpriseInspectionType" column="enterprise_inspection_type"/>
|
|
<result property="enterpriseInspectionType" column="enterprise_inspection_type"/>
|
|
|
|
+ <result property="steelcylinderId" column="steelcylinder_id"/>
|
|
|
|
+ <result property="steelcylinderName" column="steelcylinder_name"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="createName" column="create_name"/>
|
|
<result property="createName" column="create_name"/>
|
|
@@ -29,6 +31,8 @@
|
|
client_id,
|
|
client_id,
|
|
client_name,
|
|
client_name,
|
|
enterprise_inspection_type,
|
|
enterprise_inspection_type,
|
|
|
|
+ steelcylinder_id,
|
|
|
|
+ steelcylinder_name,
|
|
create_time,
|
|
create_time,
|
|
create_by,
|
|
create_by,
|
|
create_name,
|
|
create_name,
|
|
@@ -68,11 +72,14 @@
|
|
keyProperty="id">
|
|
keyProperty="id">
|
|
insert into centerdata_t_housingconstruction_safetyinspectionrecords
|
|
insert into centerdata_t_housingconstruction_safetyinspectionrecords
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">id,</if>
|
|
<if test="censorId != null">censor_id,</if>
|
|
<if test="censorId != null">censor_id,</if>
|
|
<if test="censorName != null">censor_name,</if>
|
|
<if test="censorName != null">censor_name,</if>
|
|
<if test="clientId != null">client_id,</if>
|
|
<if test="clientId != null">client_id,</if>
|
|
<if test="clientName != null">client_name,</if>
|
|
<if test="clientName != null">client_name,</if>
|
|
<if test="enterpriseInspectionType != null">enterprise_inspection_type,</if>
|
|
<if test="enterpriseInspectionType != null">enterprise_inspection_type,</if>
|
|
|
|
+ <if test="steelcylinderId != null">steelcylinder_id,</if>
|
|
|
|
+ <if test="steelcylinderName != null">steelcylinder_name,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createBy != null">create_by,</if>
|
|
<if test="createName != null">create_name,</if>
|
|
<if test="createName != null">create_name,</if>
|
|
@@ -83,11 +90,14 @@
|
|
<if test="deptName != null">dept_name,</if>
|
|
<if test="deptName != null">dept_name,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
+ <if test="id != null">#{id},</if>
|
|
<if test="censorId != null">#{censorId},</if>
|
|
<if test="censorId != null">#{censorId},</if>
|
|
<if test="censorName != null">#{censorName},</if>
|
|
<if test="censorName != null">#{censorName},</if>
|
|
<if test="clientId != null">#{clientId},</if>
|
|
<if test="clientId != null">#{clientId},</if>
|
|
<if test="clientName != null">#{clientName},</if>
|
|
<if test="clientName != null">#{clientName},</if>
|
|
<if test="enterpriseInspectionType != null">#{enterpriseInspectionType},</if>
|
|
<if test="enterpriseInspectionType != null">#{enterpriseInspectionType},</if>
|
|
|
|
+ <if test="steelcylinderId != null">#{steelcylinderId},</if>
|
|
|
|
+ <if test="steelcylinderName != null">#{steelcylinderName},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createBy != null">#{createBy},</if>
|
|
<if test="createName != null">#{createName},</if>
|
|
<if test="createName != null">#{createName},</if>
|
|
@@ -103,19 +113,9 @@
|
|
parameterType="CenterdataTHousingconstructionSafetyinspectionrecords">
|
|
parameterType="CenterdataTHousingconstructionSafetyinspectionrecords">
|
|
update centerdata_t_housingconstruction_safetyinspectionrecords
|
|
update centerdata_t_housingconstruction_safetyinspectionrecords
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
- <if test="censorId != null">censor_id = #{censorId},</if>
|
|
|
|
- <if test="censorName != null">censor_name = #{censorName},</if>
|
|
|
|
- <if test="clientId != null">client_id = #{clientId},</if>
|
|
|
|
- <if test="clientName != null">client_name = #{clientName},</if>
|
|
|
|
- <if test="enterpriseInspectionType != null">enterprise_inspection_type = #{enterpriseInspectionType},</if>
|
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
- <if test="createName != null">create_name = #{createName},</if>
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
<if test="updateName != null">update_name = #{updateName},</if>
|
|
<if test="updateName != null">update_name = #{updateName},</if>
|
|
- <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
- <if test="deptName != null">dept_name = #{deptName},</if>
|
|
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|
|
@@ -132,4 +132,95 @@
|
|
#{id}
|
|
#{id}
|
|
</foreach>
|
|
</foreach>
|
|
</delete>
|
|
</delete>
|
|
|
|
+
|
|
|
|
+ <resultMap id="redordDetailsResultMap" type="CenterdataTHousingconstructionSafetyinspectionrecords">
|
|
|
|
+ <id property="id" column="record_id"/>
|
|
|
|
+ <result property="censorId" column="censor_id"/>
|
|
|
|
+ <result property="censorName" column="censor_name"/>
|
|
|
|
+ <result property="clientId" column="client_id"/>
|
|
|
|
+ <result property="clientName" column="client_name"/>
|
|
|
|
+ <result property="enterpriseInspectionType" column="enterprise_inspection_type"/>
|
|
|
|
+ <result property="steelcylinderId" column="steelcylinder_id"/>
|
|
|
|
+ <result property="steelcylinderName" column="steelcylinder_name"/>
|
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
|
+ <result property="createName" column="create_name"/>
|
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
|
+ <result property="updateName" column="update_name"/>
|
|
|
|
+ <result property="deptId" column="dept_id"/>
|
|
|
|
+ <result property="deptName" column="dept_name"/>
|
|
|
|
+ <collection property="detailList" ofType="CenterdataTHousingconstructionSafetyinspectionrecordsdetail">
|
|
|
|
+ <result property="id" column="detail_id"/>
|
|
|
|
+ <result property="recordId" column="record_id"/>
|
|
|
|
+ <result property="itemId" column="item_id"/>
|
|
|
|
+ <result property="inspectionName" column="inspection_name"/>
|
|
|
|
+ <result property="inspectionSort" column="inspection_sort"/>
|
|
|
|
+ <result property="standardStatus" column="standard_status"/>
|
|
|
|
+ <result property="createTime" column="detail_create_time"/>
|
|
|
|
+ <result property="createBy" column="detail_create_by"/>
|
|
|
|
+ <result property="createName" column="detail_create_name"/>
|
|
|
|
+ <result property="updateTime" column="detail_update_time"/>
|
|
|
|
+ <result property="updateBy" column="detail_update_by"/>
|
|
|
|
+ <result property="updateName" column="detail_update_name"/>
|
|
|
|
+ <result property="deptId" column="detail_dept_id"/>
|
|
|
|
+ <result property="deptName" column="detail_dept_name"/>
|
|
|
|
+ <collection property="attachList" ofType="CenterdataTHousingconstructionAttach">
|
|
|
|
+ <result property="id" column="attach_id"/>
|
|
|
|
+ <result property="busId" column="bus_id"/>
|
|
|
|
+ <result property="attachPath" column="attach_path"/>
|
|
|
|
+ <result property="fileName" column="file_name"/>
|
|
|
|
+ <result property="attachSorts" column="attach_sorts"/>
|
|
|
|
+ </collection>
|
|
|
|
+ </collection>
|
|
|
|
+ </resultMap>
|
|
|
|
+
|
|
|
|
+ <select id="queryRedordDetails" parameterType="string" resultMap="redordDetailsResultMap">
|
|
|
|
+ SELECT
|
|
|
|
+ record.id as record_id,
|
|
|
|
+ record.censor_id,
|
|
|
|
+ record.censor_name,
|
|
|
|
+ record.client_id,
|
|
|
|
+ record.client_name,
|
|
|
|
+ record.enterprise_inspection_type,
|
|
|
|
+ record.steelcylinder_id,
|
|
|
|
+ record.steelcylinder_name,
|
|
|
|
+ record.create_time,
|
|
|
|
+ record.create_by,
|
|
|
|
+ record.create_name,
|
|
|
|
+ record.update_time,
|
|
|
|
+ record.update_by,
|
|
|
|
+ record.update_name,
|
|
|
|
+ record.dept_id,
|
|
|
|
+ record.dept_name,
|
|
|
|
+ detail.id as detail_id,
|
|
|
|
+ detail.standard_status,
|
|
|
|
+ detail.item_id,
|
|
|
|
+ item.inspection_name,
|
|
|
|
+ item.inspection_sort,
|
|
|
|
+ detail.remark,
|
|
|
|
+ detail.create_time as detail_create_time,
|
|
|
|
+ detail.create_by as detail_create_by,
|
|
|
|
+ detail.create_name as detail_create_name,
|
|
|
|
+ detail.update_time as detail_update_time,
|
|
|
|
+ detail.update_by as detail_update_by,
|
|
|
|
+ detail.update_name as detail_update_name,
|
|
|
|
+ detail.dept_id as detail_dept_id,
|
|
|
|
+ detail.dept_name as detail_dept_name,
|
|
|
|
+ attach.bus_id,
|
|
|
|
+ attach.id as attach_id,
|
|
|
|
+ attach.attach_path,
|
|
|
|
+ attach.file_name,
|
|
|
|
+ attach.attach_sorts
|
|
|
|
+ FROM
|
|
|
|
+ centerdata_t_housingconstruction_safetyinspectionrecords record
|
|
|
|
+ LEFT JOIN centerdata_t_housingconstruction_safetyinspectionrecordsdetail detail ON detail.record_id = record.id
|
|
|
|
+ LEFT JOIN centerdata_t_housingconstruction_safetyinspectionitem item ON detail.item_id = item.id
|
|
|
|
+ LEFT JOIN centerdata_t_housingconstruction_attach attach ON attach.bus_id = detail.id
|
|
|
|
+ where record.id = #{id}
|
|
|
|
+ ORDER BY
|
|
|
|
+ inspection_sort,
|
|
|
|
+ attach_sorts
|
|
|
|
+
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|