|
@@ -41,6 +41,40 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
+ <select id="selectTWarehouseAgreementList1" parameterType="TWarehouseAgreement"
|
|
|
+ resultType="Map" >
|
|
|
+ SELECT DISTINCT
|
|
|
+ agre.f_id AS fId,
|
|
|
+ corp.f_name AS fCorpid,
|
|
|
+ agre.f_contractno AS fContractno,
|
|
|
+ goods.f_name AS fGoodsid,
|
|
|
+ agre.t_packages AS tPackages,
|
|
|
+ agre.f_begindate AS fBegindate,
|
|
|
+ agre.f_enddate AS fEnddate,
|
|
|
+ agre.f_feetypeid AS fFeetypeid,
|
|
|
+ agre.f_billstatus AS fBillstatus
|
|
|
+ FROM
|
|
|
+ t_warehouse_agreement agre
|
|
|
+ LEFT JOIN t_corps corp ON corp.f_id = agre.f_corpid
|
|
|
+ LEFT JOIN t_goods goods ON goods.f_id = agre.f_goodsid
|
|
|
+ <where>
|
|
|
+ <if test="fBillno != null and fBillno != ''">and agre.f_billno = #{fBillno}</if>
|
|
|
+ <if test="fContractno != null and fContractno != ''">and agre.f_contractno = #{fContractno}</if>
|
|
|
+ <if test="fDeptid != null ">and agre.f_deptid = #{fDeptid}</if>
|
|
|
+ <if test="fCorpid != null ">and agre.f_corpid = #{fCorpid}</if>
|
|
|
+ <if test="fGoodsid != null">and agre.f_goodsid = #{fGoodsid}</if>
|
|
|
+ <if test="fStltypeid != null ">and agre.f_stltypeid = #{fStltypeid}</if>
|
|
|
+ <if test="fFeetypeid != null ">and agre.f_feetypeid = #{fFeetypeid}</if>
|
|
|
+ <if test="tPackages != null and tPackages != ''">and agre.t_packages = #{tPackages}</if>
|
|
|
+ <if test="fTrademodeid != null ">and agre.f_trademodeid = #{fTrademodeid}</if>
|
|
|
+ <if test="fFreedays != null ">and agre.f_freedays = #{fFreedays}</if>
|
|
|
+ <if test="fBegindate != null ">and agre.f_begindate = #{fBegindate}</if>
|
|
|
+ <if test="fEnddate != null ">and agre.f_enddate = #{fEnddate}</if>
|
|
|
+ <if test="fBillstatus != null and fBillstatus != ''">and agre.f_billstatus = #{fBillstatus}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectTWarehouseAgreementitemsById" parameterType="Long" resultMap="TWarehouseAgreementitemsResult">
|
|
|
<include refid="selectTWarehouseAgreementitemsVo"/>
|
|
|
where f_id = #{fId}
|
|
@@ -81,6 +115,26 @@
|
|
|
ORDER BY
|
|
|
items.f_fromdays
|
|
|
</select>
|
|
|
+ <select id="selectTWarehouseAgreementitemsList1" resultType="java.util.Map">
|
|
|
+ SELECT DISTINCT
|
|
|
+ agre.f_id AS fId,
|
|
|
+ corp.f_name AS fCorpname,
|
|
|
+ corp.f_id AS fCorpid,
|
|
|
+ fee.f_name AS fName,
|
|
|
+ fee.f_id AS feeFId,
|
|
|
+ itme.f_feeUnitid AS fFeeUnitid,
|
|
|
+ f_price AS fPrice
|
|
|
+ FROM
|
|
|
+ t_warehouse_agreement agre
|
|
|
+ LEFT JOIN t_corps corp ON corp.f_id = agre.f_corpid
|
|
|
+ LEFT JOIN t_warehouse_agreementitems itme ON itme.f_pid = agre.f_id
|
|
|
+ LEFT JOIN t_fees fee ON fee.f_id = itme.f_feeid
|
|
|
+ <where>
|
|
|
+ <if test="fLineno != null and fLineno != ''">and corp.f_id = #{fLineno}</if>
|
|
|
+ and agre.f_billstatus = 0
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
<insert id="insertTWarehouseAgreementitems" parameterType="TWarehouseAgreementitems" useGeneratedKeys="true"
|
|
|
keyProperty="fId">
|