| | |
| | | </resultMap> |
| | | <resultMap id="Map_WorksheetMain4" type="WorksheetMain" extends="Map_WorksheetMain"> |
| | | <collection property="mpApprovingList" ofType="MaterialProductApproving"> |
| | | <!-- <result column="parent_model" property="parentModel" /> |
| | | <result column="sub_name" property="subName"/> |
| | | <result column="parent_code" property="parentCode" /> |
| | | <result column="custom_code" property="customCode" /> |
| | | <result column="version" property="version"/> |
| | | <result column="sub_code" property="subCode"/> |
| | | <result column="link_type" property="linkType"/> |
| | | <result column="material_id" property="MaterialId"/> |
| | | <association column="material_id" property="Material" javaType="Material" select="getMaterial"> |
| | | <result column="material_id" property="materialId"/> |
| | | <association column="material_id" property="material" javaType="Material" select="getMaterial"> |
| | | <result column="category" property="category"/> |
| | | <result column="sub_code" property="subCode"/> |
| | | <result column="sub_name" property="subName"/> |
| | |
| | | <result column="unit" property="unit"/> |
| | | <result column="producer" property="producer"/> |
| | | <result column="notes" property="notes"/> |
| | | </association>--> |
| | | </association> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | |
| | | select name from db_doc.tb_doc_user where id =#{user_id} |
| | | </select> |
| | | <select id="getMaterial" resultType="Material"> |
| | | select category,sub_code,sub_name,sub_model,unit,quantity,producer,notes from db_doc.tb_Material where id =#{material_id} |
| | | select category,sub_code,sub_name,sub_model,unit,quantity,producer,notes from db_doc.tb_material where id =#{material_id} |
| | | </select> |
| | | <select id="getLinkListWithMaterials" resultMap="Map_WorksheetMain3"> |
| | | SELECT |
| | |
| | | SELECT |
| | | m.id mid,m.title,m.description,m.file,m.create_user_id,m.begin_time,m.end_time,m.level,m.status,m.end_reason,m.type mType, |
| | | l.id lid,l.parent_id,deal_user_id,deal_type,deal_desc,deal_reason,link_file,link_status,enable_archive,create_time,deal_time, |
| | | cp.* |
| | | mp.* |
| | | FROM |
| | | tb_worksheet_main m |
| | | LEFT JOIN |
| | | tb_worksheet_link l ON m.id = l.main_id |
| | | LEFT JOIN |
| | | tb_Material_product_approving cp ON m.id = cp.main_id |
| | | tb_material_product_approving mp ON m.id = mp.main_id |
| | | WHERE |
| | | m.id = #{id} |
| | | </select> |