|
@@ -45,6 +45,26 @@
|
|
select="queryMaintainFilesByMouldId" column="id">
|
|
select="queryMaintainFilesByMouldId" column="id">
|
|
</collection>
|
|
</collection>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
+ <resultMap id="BaseResultMapApprovedVO" type="com.hssx.cloudmodel.entity.vo.MouldFileVO">
|
|
|
|
+ <id column="id" property="id" />
|
|
|
|
+ <result column="model_no" property="modelNo"/>
|
|
|
|
+ <result column="model_name" property="modelName"/>
|
|
|
|
+ <collection property="mould2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
|
|
|
|
+ select="queryApprovedMould2DFilesByMouldId" column="id">
|
|
|
|
+ </collection>
|
|
|
|
+ <collection property="mould3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
|
|
|
|
+ select="queryApprovedMould3DFilesByMouldId" column="id">
|
|
|
|
+ </collection>
|
|
|
|
+ <collection property="sparepart2DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
|
|
|
|
+ select="queryApprovedSparepart2DFilesByMouldId" column="id">
|
|
|
|
+ </collection>
|
|
|
|
+ <collection property="sparepart3DFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
|
|
|
|
+ select="queryApprovedSparepart3DFilesByMouldId" column="id">
|
|
|
|
+ </collection>
|
|
|
|
+ <collection property="maintainFiles" javaType="java.util.List" ofType="com.hssx.cloudmodel.entity.MouldFile"
|
|
|
|
+ select="queryApprovedMaintainFilesByMouldId" column="id">
|
|
|
|
+ </collection>
|
|
|
|
+ </resultMap>
|
|
|
|
|
|
<!-- 通用查询结果列 -->
|
|
<!-- 通用查询结果列 -->
|
|
<sql id="Base_Column_List">
|
|
<sql id="Base_Column_List">
|
|
@@ -66,6 +86,15 @@
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getFileListByMouldId" resultMap="BaseResultMapApprovedVO">
|
|
|
|
+ select
|
|
|
|
+ id,model_no,model_name
|
|
|
|
+ from
|
|
|
|
+ tb_mould
|
|
|
|
+ <where>
|
|
|
|
+ id = #{id}
|
|
|
|
+ </where>
|
|
|
|
+ </select>
|
|
<select id="querySparepart3DFilesByMouldId" resultMap="BaseResultMap">
|
|
<select id="querySparepart3DFilesByMouldId" resultMap="BaseResultMap">
|
|
select
|
|
select
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
@@ -80,6 +109,22 @@
|
|
and
|
|
and
|
|
dwg_type = 1
|
|
dwg_type = 1
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="queryApprovedSparepart3DFilesByMouldId" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
|
|
+ project_id, file_url, file_name, blong_type, content, state,
|
|
|
|
+ file_type, file_size, dwg_type
|
|
|
|
+ from
|
|
|
|
+ tb_mould_file
|
|
|
|
+ where
|
|
|
|
+ model_id = #{id}
|
|
|
|
+ and
|
|
|
|
+ blong_type = 1
|
|
|
|
+ and
|
|
|
|
+ dwg_type = 1
|
|
|
|
+ and
|
|
|
|
+ state = 3
|
|
|
|
+ </select>
|
|
<select id="querySparepart2DFilesByMouldId" resultMap="BaseResultMap">
|
|
<select id="querySparepart2DFilesByMouldId" resultMap="BaseResultMap">
|
|
select
|
|
select
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
@@ -94,6 +139,22 @@
|
|
and
|
|
and
|
|
dwg_type = 0
|
|
dwg_type = 0
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="queryApprovedSparepart2DFilesByMouldId" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
|
|
+ project_id, file_url, file_name, blong_type, content, state,
|
|
|
|
+ file_type, file_size, dwg_type
|
|
|
|
+ from
|
|
|
|
+ tb_mould_file
|
|
|
|
+ where
|
|
|
|
+ model_id = #{id}
|
|
|
|
+ and
|
|
|
|
+ blong_type = 1
|
|
|
|
+ and
|
|
|
|
+ dwg_type = 0
|
|
|
|
+ and
|
|
|
|
+ state = 3
|
|
|
|
+ </select>
|
|
<select id="queryMould3DFilesByMouldId" resultMap="BaseResultMap">
|
|
<select id="queryMould3DFilesByMouldId" resultMap="BaseResultMap">
|
|
select
|
|
select
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
@@ -108,6 +169,22 @@
|
|
and
|
|
and
|
|
dwg_type = 1
|
|
dwg_type = 1
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="queryApprovedMould3DFilesByMouldId" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
|
|
+ project_id, file_url, file_name, blong_type, content, state,
|
|
|
|
+ file_type, file_size, dwg_type
|
|
|
|
+ from
|
|
|
|
+ tb_mould_file
|
|
|
|
+ where
|
|
|
|
+ model_id = #{id}
|
|
|
|
+ and
|
|
|
|
+ blong_type = 0
|
|
|
|
+ and
|
|
|
|
+ dwg_type = 1
|
|
|
|
+ and
|
|
|
|
+ state = 3
|
|
|
|
+ </select>
|
|
<select id="queryMould2DFilesByMouldId" resultMap="BaseResultMap">
|
|
<select id="queryMould2DFilesByMouldId" resultMap="BaseResultMap">
|
|
select
|
|
select
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
@@ -134,4 +211,18 @@
|
|
and
|
|
and
|
|
blong_type = 3
|
|
blong_type = 3
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="queryApprovedMaintainFilesByMouldId" resultMap="BaseResultMap">
|
|
|
|
+ select
|
|
|
|
+ id, uplodtor_id, uploadtor, indate, model_id, sparepart_id,
|
|
|
|
+ project_id, file_url, file_name, blong_type, content, state,
|
|
|
|
+ file_type, file_size
|
|
|
|
+ from
|
|
|
|
+ tb_mould_file
|
|
|
|
+ where
|
|
|
|
+ model_id = #{id}
|
|
|
|
+ and
|
|
|
|
+ blong_type = 3
|
|
|
|
+ and
|
|
|
|
+ state = 3
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|