Jelajahi Sumber

[CODE]: 总账模块 应收、应付

maxianghua 4 tahun lalu
induk
melakukan
d6d405e862

+ 40 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TWareHouseFees.java

@@ -59,11 +59,26 @@ public class TWareHouseFees {
 
 
     /**
-     * 对账单号
+     *  是否对账 0 否 1 是 ; 结算状态 0 未收 1 全部
      */
     @Excel(name = "对账")
     private String fReconciliation;
 
+    /**
+     *   费用状态
+     */
+    @Excel(name = "费用状态")
+    private Long fBillstatus;
+
+    /**
+     * 唛头
+     */
+    @Excel(name = "唛头")
+    private String fMarks;
+
+    /** 明细品名合计 */
+    @Excel(name = "明细品名合计")
+    private String fProductName;
 
     /**
      * 查询时间区间 审核日期
@@ -104,6 +119,30 @@ public class TWareHouseFees {
     }
 
 
+    public String getfMarks() {
+        return fMarks;
+    }
+
+    public void setfMarks(String fMarks) {
+        this.fMarks = fMarks;
+    }
+
+    public Long getfBillstatus() {
+        return fBillstatus;
+    }
+
+    public void setfBillstatus(Long fBillstatus) {
+        this.fBillstatus = fBillstatus;
+    }
+
+    public String getfProductName() {
+        return fProductName;
+    }
+
+    public void setfProductName(String fProductName) {
+        this.fProductName = fProductName;
+    }
+
     public String getfStatementNo() {
         return fStatementNo;
     }

+ 3 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/mapper/TFeeMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.finance.mapper;
 
 import com.ruoyi.finance.domain.TFee;
+import com.ruoyi.finance.domain.TWareHouseFees;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -70,4 +71,6 @@ public interface TFeeMapper {
     public List<Map<String, Object>> warehouseBillsFeesList(@Param("map") Map<String, Object> map);
 
     public List<Map<String, Object>> warehouseBillsFeesListAccamount(@Param("map") Map<String, Object> map);
+
+    public List<Map<String, Object>> warehouseBillsFeesList1(TWareHouseFees tWareHouseFees);
 }

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/ITFeeService.java

@@ -83,6 +83,8 @@ public interface ITFeeService {
      */
     public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees,String billsType);
 
+    public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees);
+
     /**
      *  财务: 对账、收费、付费   流程确认
      * @param tfee

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -291,6 +291,11 @@ public class TFeeServiceImpl implements ITFeeService {
         return mapList;
     }
 
+    @Override
+    public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees) {
+        return tFeeMapper.warehouseBillsFeesList1(tWareHouseFees);
+    }
+
     public static BigDecimal calculation1(String fTotalgross, String fGrossweightblc) {
         BigDecimal num1 = new BigDecimal(fTotalgross);
         BigDecimal num2 = new BigDecimal(fGrossweightblc);

+ 84 - 0
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -371,4 +371,88 @@
         </where>
     </select>
 
+    <select id="warehouseBillsFeesList1" resultType="java.util.Map">
+        SELECT
+            w.f_id AS fSrcid,
+            t.f_id AS fSrcpid,
+            t.f_corpid AS fCorpid,
+            c.f_name AS fName,
+            w.fId AS fId,
+            w.fName AS fFeesName,
+            t.f_mblno AS fMblno,
+            t.f_product_name AS fProductName,
+            t.f_marks AS fMarks,
+            t.f_billtype AS fBilltype,
+            t.f_review_date AS fReviewDate,
+            w.f_dc AS fSrcdc,
+            w.f_amount AS fAmount,
+            w.f_stlamount AS fStlamount
+        FROM
+            t_warehousebills t
+                LEFT JOIN t_corps c ON c.f_id = t.f_corpid
+                LEFT JOIN (
+                SELECT
+                    f.f_id AS f_id,
+                    f.f_pid AS f_pid,
+                    f.f_lineno AS f_lineno,
+                    f.f_corpid,
+                    f.f_feeid,
+                    f.f_feeUnitid,
+                    f.f_qty,
+                    f.f_unitprice,
+                    f.f_amount,
+                    f.f_currency,
+                    f.f_exrate,
+                    f.f_taxrate,
+                    f.f_dc,
+                    f.f_billstatus,
+                    f.f_statement_no,
+                    f.f_accamount,
+                    f.f_accamount_date,
+                    f.f_stlamount_no,
+                    f.f_stlamount,
+                    f.f_stlamount_date,
+                    f.f_invnos,
+                    f.f_invamount,
+                    f.f_askamount,
+                    f.f_status,
+                    f.remark,
+                    c.f_id AS fId,
+                    c.f_name AS fName
+                FROM
+                    t_warehousebillsfees AS f
+                        LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id
+            ) w ON w.f_pid = t.f_id
+                LEFT JOIN t_fees f ON w.f_feeid = f.f_id
+        <where>
+            <if test="fCorpid != null  and fCorpid != ''">and t.f_corpid = #{fCorpid} </if>
+            <if test="fToCorpid != null  and fToCorpid != ''">and w.f_corpid = #{fToCorpid} </if>
+            <if test="fMblno != null  and fMblno != ''">and t.f_mblno  like concat('%', #{fMblno}, '%') </if>
+            <if test="fMarks != null and fMarks != ''">and t.f_marks  like concat('%', #{fMarks}, '%') </if>
+            <if test="fProductName != null and fProductName != ''">and t.f_product_name  like concat('%', #{fProductName}, '%') </if>
+            <if test='fBillstatus != null and fBillstatus != "" and fBillstatus == "1" '>
+                and w.f_billstatus != 1
+            </if>
+            <if test='fBillstatus!= null and fBillstatus != "" and fBillstatus == "0" '>
+                and w.f_billstatus = 1
+            </if>
+            <if test='fDc != null and fDc != "" and fDc == "D" '>
+                and w.f_dc = #{fDc}
+            </if>
+            <if test='fDc != null and fDc != "" and fDc == "C" '>
+                and w.f_dc = #{fDc}
+            </if>
+            <if test='timeExamine != null and timeExamine[0] != null and timeExamine[0]!= ""'>
+                and t.f_review_date &gt;= #{timeExamine[0]}
+            </if>
+            <if test='timeExamine != null and timeExamine[1] != null and timeExamine[1]!= ""'>
+                and t.f_review_date &lt;= #{timeExamine[1]}
+            </if>
+            <if test='fReconciliation!= null and fReconciliation != "" and fReconciliation == "0" '>
+                and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) != 0
+            </if>
+            and  t.f_review_date IS NOT NULL
+        </where>
+    </select>
+
 </mapper>