贵阳试剂耗材
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dlp-reagent-managment/target/classes/mapper/CatalogueDetailsMapper.xml

41 lines
2.1 KiB

2 years ago
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="digital.laboratory.platform.reagent.mapper.CatalogueDetailsMapper">
<resultMap id="catalogueDetailsMap" type="digital.laboratory.platform.reagent.entity.CatalogueDetails">
<id property="catalogueDetailsId" column="catalogue_details_id"/>
<result property="brand" column="brand"/>
<result property="category" column="category"/>
<result property="deviationOrUncertainty" column="deviation_or_uncertainty"/>
<result property="number" column="number"/>
<result property="packagedCopies" column="packaged_copies"/>
<result property="purchaseCatalogueId" column="purchase_catalogue_id"/>
<result property="purchaseCatalogueNumber" column="purchase_catalogue_number"/>
<result property="reagentConsumableId" column="reagent_consumable_id"/>
<result property="species" column="species"/>
<result property="specificationAndModel" column="specification_and_model"/>
<result property="standardValueOrPurity" column="standard_value_or_purity"/>
<result property="unitPrice" column="unit_price"/>
<result property="reagentConsumableId" column="reagent_consumable_id"/>
</resultMap>
<resultMap id="catalogueDetailsVO" type="digital.laboratory.platform.reagent.vo.CatalogueDetailsVO"
extends="catalogueDetailsMap">
<result property="reagentConsumableName" column="reagent_consumable_name"/>
</resultMap>
<!-- 根据条件取 CatalogueDetailsVO列表 -->
<select id="getCatalogueDetailsVOList" resultMap="catalogueDetailsVO"
resultType="digital.laboratory.platform.reagent.vo.CatalogueDetailsVO">
SELECT cd.*,
(SELECT rc.name
FROM reagent_consumables rc
WHERE rc.reagent_consumable_id = cd.reagent_consumable_id) AS reagent_consumable_name
FROM catalogue_details cd
WHERE cd.purchase_catalogue_id = #{purchaseCatalogueId}
</select>
</mapper>