Browse Source

改动后端查询字段,将cLoadDate查询字段f_sdate改为create_time

nzf 3 years ago
parent
commit
b4651fca94

+ 26 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TWareHouseFees.java

@@ -97,6 +97,16 @@ public class TWareHouseFees extends BaseEntity {
      */
     private List<String> timeExamine;
 
+    /**
+     * 查询业务区间 业务时间
+     */
+    private List<String> fBstimeExamine;
+
+    /**
+     * 切换参数:切换类型:审核:0、业务:1
+     */
+    private int switchSection;
+
     private Integer groupBy;
 
     private String fBillno;
@@ -144,6 +154,22 @@ public class TWareHouseFees extends BaseEntity {
     @TableField(exist = false)
     private Long isReviewed;
 
+    public List<String> getfBstimeExamine() {
+        return fBstimeExamine;
+    }
+
+    public void setfBstimeExamine(List<String> fBstimeExamine) {
+        this.fBstimeExamine = fBstimeExamine;
+    }
+
+    public int getSwitchSection() {
+        return switchSection;
+    }
+
+    public void setSwitchSection(int switchSection) {
+        this.switchSection = switchSection;
+    }
+
     public void setIsReviewed(Long isReviewed) {
         this.isReviewed = isReviewed;
     }

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/vo/FeeVO.java

@@ -31,6 +31,11 @@ public class FeeVO extends TFee {
     @DateTimeFormat(pattern = "yyyy-MM-dd")
     private Date fReviewDate;
 
+    // 业务时间
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date fBstime;
+
     // 总金额
     private BigDecimal fAmount;
 

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

@@ -690,6 +690,11 @@ public class TFeeServiceImpl implements ITFeeService {
 
     @Override
     public List<FeeVO> warehouseBillsFeesList(TWareHouseFees tWareHouseFees) {
+        if (tWareHouseFees.getSwitchSection() == 1) {
+            tWareHouseFees.setTimeExamine(tWareHouseFees.getTimeExamine());
+        } else {
+            tWareHouseFees.setfBstimeExamine(tWareHouseFees.getTimeExamine());
+        }
         return tFeeMapper.selectFinancialLedgerList(tWareHouseFees);
     }
 
@@ -698,6 +703,11 @@ public class TFeeServiceImpl implements ITFeeService {
         if (tWareHouseFees.getGroupBy() == 0) {
             return tFeeMapper.warehouseBillsFeesProfitList(tWareHouseFees);
         }
+        if (tWareHouseFees.getSwitchSection() == 1) {
+            tWareHouseFees.setTimeExamine(tWareHouseFees.getTimeExamine());
+        } else {
+            tWareHouseFees.setfBstimeExamine(tWareHouseFees.getTimeExamine());
+        }
         return tFeeMapper.warehouseBillsFeesCustomProfitList(tWareHouseFees);
     }
 

+ 8 - 1
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -1941,6 +1941,7 @@
         SELECT
             c.f_name AS fName,
             DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,
+            DATE_FORMAT(t.f_bstime,'%Y-%m') AS f_bstime,
             sum( CASE f_dc WHEN 'D' THEN f_amount ELSE 0 END ) fAmount,
             sum( CASE f_dc WHEN 'C' THEN f_amount ELSE 0 END ) fStlamount,
             sum( CASE f_dc WHEN 'D' THEN f_amount ELSE 0 END ) - sum( CASE f_dc WHEN 'C' THEN f_amount ELSE 0 END ) nnfinished
@@ -1964,6 +1965,9 @@
             <if test='timeExamine != null and timeExamine[0] != null and timeExamine[0]!= ""'>
                 and DATE_FORMAT(w.f_review_date, '%Y-%m') between #{timeExamine[0]} and #{timeExamine[1]}
             </if>
+            <if test="fBstimeExamine != null and fBstimeExamine[0] != null and fBstimeExamine[0]!= ''">
+                and DATE_FORMAT(t.f_bstime, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
+            </if>
             <if test='fReconciliation!= null and fReconciliation != "" and fReconciliation == "0" '>
                 and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) != 0
             </if>
@@ -2765,7 +2769,7 @@
 
     <select id="selectFinancialLedgerList" resultMap="feeVOResult">
         SELECT
-            c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus, DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,
+            c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus, DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,DATE_FORMAT(t.f_bstime,'%Y-%m') AS f_bstime,
             SUM( w.f_amount ) AS f_amount, SUM( w.f_stlamount ) AS f_stlamount,SUM( w.f_accamount ) AS f_accamount,SUM( w.f_invamount ) AS f_invamount,
             ifnull( SUM( w.f_amount ), 0 ) - ifnull( SUM( w.f_stlamount ), 0 ) AS nnfinished
         FROM
@@ -2796,6 +2800,9 @@
             <if test="timeExamine != null and timeExamine[0] != null and timeExamine[0]!= ''">
                 and DATE_FORMAT(w.f_review_date, '%Y-%m') between #{timeExamine[0]} and #{timeExamine[1]}
             </if>
+            <if test="fBstimeExamine != null and fBstimeExamine[0] != null and fBstimeExamine[0]!= ''">
+                and DATE_FORMAT(t.f_bstime, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
+            </if>
             ${params.dataScope}
         </where>
         GROUP BY

+ 2 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -2165,10 +2165,10 @@
             </if>
             <if test="createBy != null  and createBy != ''">and tw.create_by = #{createBy}</if>
             <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
-                and tw.f_bsdate &gt;= #{cLoadDate[0]}
+                and tw.create_time &gt;= #{cLoadDate[0]}
             </if>
             <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
-                and tw.f_bsdate &lt;= #{cLoadDate[1]}
+                and tw.create_time &lt;= #{cLoadDate[1]}
             </if>
             <if test='timeInterval != null and timeInterval[0] != null and timeInterval[0]!= ""'>
                 and ty.f_ATD &gt;= #{timeInterval[0]}