|
|
@@ -18,6 +18,40 @@
|
|
|
<result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
<result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
<result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <association property="product" jdbcType="com.usoftchina.saas.document.entities.Product">
|
|
|
+ <id column="pr_id" property="id" jdbcType="INTEGER" />
|
|
|
+ <result column="pr_code" property="pr_code" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_whid" property="pr_whid" jdbcType="INTEGER" />
|
|
|
+ <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER" />
|
|
|
+ <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER" />
|
|
|
+ <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE" />
|
|
|
+ <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE" />
|
|
|
+ <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE" />
|
|
|
+ <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER" />
|
|
|
+ <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_docdate" property="pr_docdate" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="pr_recordmanid" property="pr_recordmanid" jdbcType="INTEGER" />
|
|
|
+ <result column="pr_recordman" property="pr_recordman" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_status" property="pr_status" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_statuscode" property="pr_statuscode" jdbcType="VARCHAR" />
|
|
|
+ <result column="companyId" property="companyId" jdbcType="INTEGER" />
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
+ <result column="pr_text1" property="pr_text1" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_text2" property="pr_text2" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_text3" property="pr_text3" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_text4" property="pr_text4" jdbcType="VARCHAR" />
|
|
|
+ <result column="pr_text5" property="pr_text5" jdbcType="VARCHAR" />
|
|
|
+ </association>
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List" >
|
|
|
mm_id, mm_maid, mm_detno, mm_prodid, mm_prodcode, mm_whid, mm_whcode, mm_price, mm_oneuseqty,
|
|
|
@@ -215,7 +249,7 @@
|
|
|
where mm_id = #{id}
|
|
|
</update>
|
|
|
<select id="selectByFK" resultMap="BaseResultMap">
|
|
|
- SELECT * FROM MAKEMATERIAL WHERE MM_MAID=#{id} AND COMPANYID={companyId}
|
|
|
+ SELECT * FROM MAKEMATERIAL LEFT JOIN PRODUCT ON PR_ID=MA_PRODID AND MAKEMATERIAL.COMPANYID=PRODUCT.COMPANYID WHERE MM_MAID=#{id} AND MAKEMATERIAL.COMPANYID={companyId}
|
|
|
</select>
|
|
|
<delete id="deleteByFK">
|
|
|
DELETE FROM MAKEMATERIAL WHERE MM_MAID=#{id} AND COMPANYID={companyId}
|