|
|
@@ -27,6 +27,36 @@
|
|
|
<result column="pd_text4" property="pd_text4" jdbcType="VARCHAR" />
|
|
|
<result column="pd_text5" property="pd_text5" jdbcType="VARCHAR" />
|
|
|
<result column="pd_yqty" property="pd_yqty" jdbcType="DOUBLE" />
|
|
|
+ <association property="product" javaType="com.usoftchina.saas.document.entities.Product">
|
|
|
+ <id column="pr_id" property="id"/>
|
|
|
+ <result column="pr_code" property="pr_code"/>
|
|
|
+ <result column="pr_detail" property="pr_detail"/>
|
|
|
+ <result column="pr_spec" property="pr_spec"/>
|
|
|
+ <result column="pr_unit" property="pr_unit"/>
|
|
|
+ <result column="pr_kind" property="pr_kind"/>
|
|
|
+ <result column="pr_orispeccode" property="pr_orispeccode"/>
|
|
|
+ <result column="pr_whid" property="pr_whid"/>
|
|
|
+ <result column="pr_whcode" property="pr_whcode"/>
|
|
|
+ <result column="pr_whname" property="pr_whname"/>
|
|
|
+ <result column="pr_zxbzs" property="pr_zxbzs"/>
|
|
|
+ <result column="pr_leadtime" property="pr_leadtime"/>
|
|
|
+ <result column="pr_brand" property="pr_brand"/>
|
|
|
+ <result column="pr_standardprice" property="pr_standardprice"/>
|
|
|
+ <result column="pr_purcprice" property="pr_purcprice"/>
|
|
|
+ <result column="pr_saleprice" property="pr_saleprice"/>
|
|
|
+ <result column="pr_vendid" property="pr_vendid"/>
|
|
|
+ <result column="pr_vendname" property="pr_vendname"/>
|
|
|
+ <result column="pr_vendcode" property="pr_vendcode"/>
|
|
|
+ <result column="pr_docdate" property="pr_docdate"/>
|
|
|
+ <result column="pr_recordmanid" property="pr_recordmanid"/>
|
|
|
+ <result column="pr_recordman" property="pr_recordman"/>
|
|
|
+ <result column="pr_status" property="pr_status"/>
|
|
|
+ <result column="pr_statuscode" property="pr_statuscode"/>
|
|
|
+ <result column="pr_text1" property="pr_text1"/>
|
|
|
+ <result column="pr_text2" property="pr_text2"/>
|
|
|
+ <result column="pr_text3" property="pr_text3"/>
|
|
|
+ <result column="pr_text4" property="pr_text4"/>
|
|
|
+ </association>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
PD_ID, PD_PUID, PD_CODE, PD_DETNO, PD_PRODID, PD_PRODCODE, PD_UNIT, PD_QTY, PD_PRICE,
|
|
|
@@ -381,6 +411,7 @@
|
|
|
delete from purchasedetail where pd_puid=#{id}
|
|
|
</delete>
|
|
|
<select id="selectByFK" parameterType="long" resultMap="BaseResultMap">
|
|
|
- select * from purchasedetail where pd_puid=#{pu_id}
|
|
|
+ select * from purchasedetail a left join product b on pr_id=pd_prodid and a.companyid = b.companyid
|
|
|
+ where pd_puid=#{pu_id}
|
|
|
</select>
|
|
|
</mapper>
|