فهرست منبع

[CODE]: 协议从表删除、协议主表查询

maxianghua 4 سال پیش
والد
کامیت
98daf05b5e

+ 8 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseAgreementMapper.java

@@ -4,6 +4,7 @@ package com.ruoyi.warehouseBusiness.mapper;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseAgreement;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 仓储费Mapper接口
@@ -26,6 +27,13 @@ public interface TWarehouseAgreementMapper {
      * @param tWarehouseAgreement 仓储费
      * @return 仓储费集合
      */
+    public List<Map<String, Object>> selectTWarehouseAgreementList1(TWarehouseAgreement tWarehouseAgreement);
+    /**
+     * 查询仓储费列表
+     *
+     * @param tWarehouseAgreement 仓储费
+     * @return 仓储费集合
+     */
     public List<TWarehouseAgreement> selectTWarehouseAgreementList(TWarehouseAgreement tWarehouseAgreement);
 
     /**

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseAgreementitemsMapper.java

@@ -59,4 +59,6 @@ public interface TWarehouseAgreementitemsMapper {
      * @return 结果
      */
     public int deleteTWarehouseAgreementitemsByIds(Long[] fIds);
+
+    int deleteByFPid(Long fId);
 }

+ 32 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehouseAgreementMapper.xml

@@ -34,8 +34,10 @@
         <include refid="selectTWarehouseAgreementVo"/>
         <where>
             <if test="fBillno != null  and fBillno != ''">and f_billno = #{fBillno}</if>
+            <if test="fContractno != null  and fContractno != ''">and f_contractno = #{fContractno}</if>
             <if test="fDeptid != null ">and f_deptid = #{fDeptid}</if>
             <if test="fCorpid != null ">and f_corpid = #{fCorpid}</if>
+            <if test="fGoodsid != null ">and f_goodsid = #{fGoodsid}</if>
             <if test="fStltypeid != null ">and f_stltypeid = #{fStltypeid}</if>
             <if test="fFeetypeid != null ">and f_feetypeid = #{fFeetypeid}</if>
             <if test="tPackages != null  and tPackages != ''">and t_packages = #{tPackages}</if>
@@ -47,6 +49,36 @@
         </where>
     </select>
 
+    <select id="selectTWarehouseAgreementList1" parameterType="TWarehouseAgreement"
+            resultMap="TWarehouseAgreementResult">
+        SELECT DISTINCT
+                agre.f_id AS fId,
+                corp.f_name AS fCorpid,
+                agre.f_contractno AS fContractno,
+                goods.f_name AS fGoodsid,
+                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="fDeptid != null ">and agre.f_deptid = #{fDeptid}</if>
+            <if test="fCorpid != null ">and agre.f_corpid = #{fCorpid}</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="selectTWarehouseAgreementById" parameterType="Long" resultMap="TWarehouseAgreementResult">
         <include refid="selectTWarehouseAgreementVo"/>
         where f_id = #{fId}

+ 4 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehouseAgreementitemsMapper.xml

@@ -115,4 +115,8 @@
         </foreach>
     </delete>
 
+    <delete id="deleteByFPid" parameterType="Long">
+        delete from t_warehouse_agreementitems where f_pid = #{fId}
+    </delete>
+
 </mapper>