<?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="com.hzya.frame.u8c.bdcorp.dao.impl.BdCorpDaoImpl">

    <resultMap id="get-BdCorpEntity-result" type="com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity" >
       <result property="begindate" column="begindate" jdbcType="VARCHAR"/>
           <result property="pkPurorg" column="pk_purorg" jdbcType="VARCHAR"/>
           <result property="pkCalbody" column="pk_calbody" jdbcType="VARCHAR"/>
           <result property="pkCorp" column="pk_corp" jdbcType="VARCHAR"/>

        </resultMap>
    <!-- 查询的字段-->
    <sql id = "BdCorpEntity_Base_Column_List">
        id
     </sql>
 <!-- 查询 采用==查询 -->
 <select id="entity_list_base_po" resultMap="get-BdCorpEntity-result" parameterType = "com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity">
 select pk_purorg,code,name ,ownercorp from bd_purorg
 where ownercorp = #{pkCorp} and code = #{code}
</select>
    <!-- 查询 采用==查询 -->
 <select id="entity_list_base_stock" resultMap="get-BdCorpEntity-result" parameterType = "com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity">
 select pk_corp,bodycode,bodyname,pk_calbody from bd_calbody
 where 1=1
    <!--  and pk_corp = #{pkCorp}-->
     and bodycode = #{code}
    </select>
        <!-- 查询 采用==查询 -->
 <select id="entity_list_base_so" resultMap="get-BdCorpEntity-result" parameterType = "com.hzya.frame.u8c.bdcorp.entity.BdCorpEntity">
select vsalestrucode,vsalestruname,csalestruid,belongcorp from bd_salestru
 where belongcorp = #{pkCorp} and vsalestrucode = #{code}
</select>

</mapper>

