|
@@ -101,6 +101,107 @@
|
|
|
<result column="pr_text4" property="pr_text4"/>
|
|
<result column="pr_text4" property="pr_text4"/>
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
+ <resultMap id="homePageList" type="com.usoftchina.saas.purchase.po.ProdHomePageList">
|
|
|
|
|
+ <id column="pi_id" jdbcType="INTEGER" property="id" />
|
|
|
|
|
+ <result column="pi_inoutno" jdbcType="VARCHAR" property="pi_inoutno" />
|
|
|
|
|
+ <result column="pi_class" jdbcType="VARCHAR" property="pi_class" />
|
|
|
|
|
+ <result column="pi_date" jdbcType="TIMESTAMP" property="pi_date" />
|
|
|
|
|
+ <result column="pi_vendid" jdbcType="INTEGER" property="pi_vendid" />
|
|
|
|
|
+ <result column="pi_vendcode" jdbcType="VARCHAR" property="pi_vendcode" />
|
|
|
|
|
+ <result column="pi_vendname" jdbcType="VARCHAR" property="pi_vendname" />
|
|
|
|
|
+ <result column="pi_custid" jdbcType="INTEGER" property="pi_custid" />
|
|
|
|
|
+ <result column="pi_custcode" jdbcType="VARCHAR" property="pi_custcode" />
|
|
|
|
|
+ <result column="pi_custname" jdbcType="VARCHAR" property="pi_custname" />
|
|
|
|
|
+ <result column="pi_puid" jdbcType="INTEGER" property="pi_puid" />
|
|
|
|
|
+ <result column="pi_pucode" jdbcType="VARCHAR" property="pi_pucode" />
|
|
|
|
|
+ <result column="pi_said" jdbcType="INTEGER" property="pi_said" />
|
|
|
|
|
+ <result column="pi_sacode" jdbcType="VARCHAR" property="pi_sacode" />
|
|
|
|
|
+ <result column="pi_total" jdbcType="DOUBLE" property="pi_total" />
|
|
|
|
|
+ <result column="pi_status" jdbcType="VARCHAR" property="pi_status" />
|
|
|
|
|
+ <result column="pi_statuscode" jdbcType="VARCHAR" property="pi_statuscode" />
|
|
|
|
|
+ <result column="pi_printstatus" jdbcType="VARCHAR" property="pi_printstatus" />
|
|
|
|
|
+ <result column="pi_printstatuscode" jdbcType="VARCHAR" property="pi_printstatuscode" />
|
|
|
|
|
+ <result column="pi_text1" jdbcType="VARCHAR" property="pi_text1" />
|
|
|
|
|
+ <result column="pi_text2" jdbcType="VARCHAR" property="pi_text2" />
|
|
|
|
|
+ <result column="pi_text3" jdbcType="VARCHAR" property="pi_text3" />
|
|
|
|
|
+ <result column="pi_text4" jdbcType="VARCHAR" property="pi_text4" />
|
|
|
|
|
+ <result column="pi_text5" jdbcType="VARCHAR" property="pi_text5" />
|
|
|
|
|
+ <result column="pi_auditdate" jdbcType="TIMESTAMP" property="pi_auditdate" />
|
|
|
|
|
+ <result column="pi_auditman" jdbcType="VARCHAR" property="pi_auditman" />
|
|
|
|
|
+ <result column="pi_address" jdbcType="VARCHAR" property="pi_address" />
|
|
|
|
|
+ <result column="pi_remark" jdbcType="VARCHAR" property="pi_remark" />
|
|
|
|
|
+ <result column="pd_piid" jdbcType="INTEGER" property="pd_piid" />
|
|
|
|
|
+ <result column="pd_inoutno" jdbcType="VARCHAR" property="pd_inoutno" />
|
|
|
|
|
+ <result column="pd_piclass" jdbcType="VARCHAR" property="pd_piclass" />
|
|
|
|
|
+ <result column="pd_pdno" jdbcType="INTEGER" property="pd_pdno" />
|
|
|
|
|
+ <result column="pd_ordercode" jdbcType="VARCHAR" property="pd_ordercode" />
|
|
|
|
|
+ <result column="pd_orderdetno" jdbcType="INTEGER" property="pd_orderdetno" />
|
|
|
|
|
+ <result column="pd_prodid" jdbcType="INTEGER" property="pd_prodid" />
|
|
|
|
|
+ <result column="pd_prodcode" jdbcType="VARCHAR" property="pd_prodcode" />
|
|
|
|
|
+ <result column="pd_unit" jdbcType="VARCHAR" property="pd_unit" />
|
|
|
|
|
+ <result column="pd_inqty" jdbcType="DOUBLE" property="pd_inqty" />
|
|
|
|
|
+ <result column="pd_outqty" jdbcType="DOUBLE" property="pd_outqty" />
|
|
|
|
|
+ <result column="pd_orderprice" jdbcType="DOUBLE" property="pd_orderprice" />
|
|
|
|
|
+ <result column="pd_sendprice" jdbcType="DOUBLE" property="pd_sendprice" />
|
|
|
|
|
+ <result column="pd_price" jdbcType="DOUBLE" property="pd_price" />
|
|
|
|
|
+ <result column="pd_total" jdbcType="DOUBLE" property="pd_total" />
|
|
|
|
|
+ <result column="pd_taxrate" jdbcType="DOUBLE" property="pd_taxrate" />
|
|
|
|
|
+ <result column="pd_netprice" jdbcType="DOUBLE" property="pd_netprice" />
|
|
|
|
|
+ <result column="pd_nettotal" jdbcType="DOUBLE" property="pd_nettotal" />
|
|
|
|
|
+ <result column="pd_whid" jdbcType="INTEGER" property="pd_whid" />
|
|
|
|
|
+ <result column="pd_whcode" jdbcType="VARCHAR" property="pd_whcode" />
|
|
|
|
|
+ <result column="pd_whname" jdbcType="VARCHAR" property="pd_whname" />
|
|
|
|
|
+ <result column="pd_inwhid" jdbcType="INTEGER" property="pd_inwhid" />
|
|
|
|
|
+ <result column="pd_inwhcode" jdbcType="VARCHAR" property="pd_inwhcode" />
|
|
|
|
|
+ <result column="pd_inwhname" jdbcType="VARCHAR" property="pd_inwhname" />
|
|
|
|
|
+ <result column="pd_orderid" jdbcType="INTEGER" property="pd_orderid" />
|
|
|
|
|
+ <result column="pd_sdid" jdbcType="INTEGER" property="pd_sdid" />
|
|
|
|
|
+ <result column="pd_status" jdbcType="INTEGER" property="pd_status" />
|
|
|
|
|
+ <result column="companyid" property="companyId" jdbcType="BIGINT" />
|
|
|
|
|
+ <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
|
|
|
|
|
+ <result column="updaterName" jdbcType="VARCHAR" property="updaterName" />
|
|
|
|
|
+ <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="creatorId" property="creatorId" jdbcType="INTEGER"/>
|
|
|
|
|
+ <result column="creatorName" jdbcType="VARCHAR" property="creatorName" />
|
|
|
|
|
+ <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
|
|
|
|
|
+ <result column="pd_text1" jdbcType="VARCHAR" property="pd_text1" />
|
|
|
|
|
+ <result column="pd_text2" jdbcType="VARCHAR" property="pd_text2" />
|
|
|
|
|
+ <result column="pd_text3" jdbcType="VARCHAR" property="pd_text3" />
|
|
|
|
|
+ <result column="pd_text4" jdbcType="VARCHAR" property="pd_text4" />
|
|
|
|
|
+ <result column="pd_text5" jdbcType="VARCHAR" property="pd_text5" />
|
|
|
|
|
+ <result column="pd_ym" jdbcType="INTEGER" property="pd_ym" />
|
|
|
|
|
+ <result column="pd_yqty" jdbcType="DOUBLE" property="pd_yqty" />
|
|
|
|
|
+ <result column="pd_ioid" jdbcType="INTEGER" property="pd_ioid" />
|
|
|
|
|
+ <result column="pi_iocode" jdbcType="VARCHAR" property="pi_iocode" />
|
|
|
|
|
+ <result column="pd_remark" jdbcType="VARCHAR" property="pd_remark" />
|
|
|
|
|
+ <result column="pr_id" property="pr_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_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"/>
|
|
|
|
|
+ <result column="qty" property="qty"/>
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
<select id="selectProdInOutBycondition" resultMap="BaseResultMap">
|
|
<select id="selectProdInOutBycondition" resultMap="BaseResultMap">
|
|
|
select * from prodinout
|
|
select * from prodinout
|
|
|
<where>
|
|
<where>
|
|
@@ -113,6 +214,22 @@
|
|
|
</where> order by pi_id desc
|
|
</where> order by pi_id desc
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="selectHomePageList" resultMap="homePageList">
|
|
|
|
|
+ select *,
|
|
|
|
|
+ case WHEN pi_class='采购验收单' then pd_inqty when pi_class='采购验退单' then pd_outqty else 0 end qty
|
|
|
|
|
+ from prodinout left join prodiodetail on pi_id = pd_piid left join vendor on pi_vendid=ve_id
|
|
|
|
|
+ left join product on pd_prodid=pr_id
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="con != null">
|
|
|
|
|
+ ${con}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="companyId != null">
|
|
|
|
|
+ and prodinout.companyid = #{companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </where>
|
|
|
|
|
+ order by pi_id desc,pd_pdno desc
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
<select id="selectProdInOutListByCondition" resultMap="BaseResultMap">
|
|
<select id="selectProdInOutListByCondition" resultMap="BaseResultMap">
|
|
|
select * from prodinout left join prodiodetail on pi_id = pd_piid left join vendor on pi_vendid=ve_id
|
|
select * from prodinout left join prodiodetail on pi_id = pd_piid left join vendor on pi_vendid=ve_id
|
|
|
left join product on pd_prodid=pr_id
|
|
left join product on pd_prodid=pr_id
|
|
@@ -126,8 +243,4 @@
|
|
|
</where>
|
|
</where>
|
|
|
order by pi_id desc,pd_pdno desc
|
|
order by pi_id desc,pd_pdno desc
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</mapper>
|
|
</mapper>
|