Browse Source

Merge remote-tracking branch 'origin/dev' into dev

lazhaoqian 3 years ago
parent
commit
9166b660c0

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

@@ -1,5 +1,6 @@
 package com.ruoyi.finance.domain;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
@@ -124,6 +125,20 @@ public class TWareHouseFees extends BaseEntity {
      */
     private Date fToDate;
 
+    /**
+     *  结算方式
+     */
+    @TableField(exist = false)
+    private Long stlTypeid;
+
+    public Long getStlTypeid() {
+        return stlTypeid;
+    }
+
+    public void setStlTypeid(Long stlTypeid) {
+        this.stlTypeid = stlTypeid;
+    }
+
     public Long getfLoadportid() {
         return fLoadportid;
     }

+ 3 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -4875,7 +4875,6 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      * @param date   审核时间
      */
     public void approvedStorageFee(Long warehouseId, Long fettle, Date date) {
-        tWarehousebillsfeesMapper.warehouseFeesFollowUpdate(warehouseId, fettle, date);
         // 查出主表数据
         TWarehouseBills warehouseBills = tWarehouseBillsMapper.selectTWarehousebillsById(warehouseId);
         if (Objects.isNull(warehouseBills)) {
@@ -4890,10 +4889,12 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         if (tWarehousebillsitemsMapper.selectIsCalculateStorageFeesByIds(ids) > 0) {
             throw new WarehouseException("计算费用中存在已计算仓储费信息");
         }
-
         for (TWarehousebillsfees fees : feesList) {
             storageFeeUpdateItem(warehouseBills, fees);
         }
+        warehouseBills.setfBillstatus(6L);
+        warehouseBills.setUpdateTime(new Date());
+        tWarehouseBillsMapper.updateTWarehousebills(warehouseBills);
     }
 
     /**

+ 39 - 37
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -178,44 +178,44 @@
 
     <select id="selectTFeeList1" parameterType="TFee" resultType="Map">
         SELECT
-        f.f_id AS fId,
-        f.f_billno AS fBillno,
-        f.f_ctrlcorpid AS fCtrlcorpid,
-        pro.dict_label AS chargingMethod,
-        f.invoice_no AS invoiceNo,
-        f.bank,
-        f.water_bill_no AS waterBillNo,
-        f.f_corpid AS fCorpid,
-        c.f_name AS fCorpidName,
-        f.f_accbilldate AS fAccbilldate,
-        f.t_mblno AS tMblno,
-        f.f_amtdr AS fAmtdr,
-        f.f_amtcr AS fAmtcr,
-        f.f_billtype AS fBilltype,
-        f.f_system_type AS fSystemType,
-        CASE
-        WHEN f.f_billstatus = '1' THEN '新建'
-        WHEN f.f_billstatus = '2' THEN '暂存'
-        WHEN f.f_billstatus = '3' THEN '审批驳回'
-        WHEN f.f_billstatus = '4' THEN '提交审核'
-        WHEN f.f_billstatus = '5' THEN '审核中'
-        WHEN f.f_billstatus = '6' THEN '审核完成'
-        END
-        AS fBillstatus,
-        f.f_remarks AS fRemarks,
-        f.create_by AS createBy,
-        tp.f_name AS createName,
-        f.create_time createTime,
-        f.update_by updateBy,
-        f.update_time
+            f.f_id AS fId,
+            f.f_billno AS fBillno,
+            f.f_ctrlcorpid AS fCtrlcorpid,
+            pro.dict_label AS chargingMethod,
+            f.invoice_no AS invoiceNo,
+            f.bank,
+            f.water_bill_no AS waterBillNo,
+            f.f_corpid AS fCorpid,
+            c.f_name AS fCorpidName,
+            f.f_accbilldate AS fAccbilldate,
+            f.t_mblno AS tMblno,
+            f.f_amtdr AS fAmtdr,
+            f.f_amtcr AS fAmtcr,
+            f.f_billtype AS fBilltype,
+            f.f_system_type AS fSystemType,
+            CASE
+            WHEN f.f_billstatus = '1' THEN '新建'
+            WHEN f.f_billstatus = '2' THEN '暂存'
+            WHEN f.f_billstatus = '3' THEN '审批驳回'
+            WHEN f.f_billstatus = '4' THEN '提交审核'
+            WHEN f.f_billstatus = '5' THEN '审核中'
+            WHEN f.f_billstatus = '6' THEN '审核完成'
+            END
+            AS fBillstatus,
+            f.f_remarks AS fRemarks,
+            f.create_by AS createBy,
+            tp.f_name AS createName,
+            f.create_time createTime,
+            f.update_by updateBy,
+            f.update_time
         FROM
-        t_fee AS f
-        LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id
-        left join sys_user u on f.create_by = u.user_name
-        left join sys_dept d on f.f_deptid = d.dept_id
-        LEFT JOIN t_customer_contact tc ON tc.f_tel = u.phonenumber
-        LEFT JOIN t_corps tp ON tp.f_id = tc.f_pid
-        LEFT JOIN sys_dict_data pro ON pro.dict_value = f.charging_method and pro.dict_type = 'data_settlement_type'
+            t_fee AS f
+            LEFT JOIN t_corps AS c ON f.f_corpid = c.f_id
+            left join sys_user u on f.create_by = u.user_name
+            left join sys_dept d on f.f_deptid = d.dept_id
+            LEFT JOIN t_customer_contact tc ON tc.f_tel = u.phonenumber
+            LEFT JOIN t_corps tp ON tp.f_id = tc.f_pid
+            LEFT JOIN sys_dict_data pro ON pro.dict_value = f.charging_method and pro.dict_type = 'data_settlement_type'
         <where>
             <if test="fId != null ">and f.f_id = #{fId}</if>
             <if test="fBillno != null  and fBillno != ''">and f.f_billno = #{fBillno}</if>
@@ -676,6 +676,7 @@
             <if test="map.tWareHouseFees.fCorpid != null  and map.tWareHouseFees.fCorpid != ''">and w.f_corpid =
                 #{map.tWareHouseFees.fCorpid}
             </if>
+            <if test="map.tWareHouseFees.stlTypeid != null and map.tWareHouseFees.stlTypeid != ''">and w.f_stltypeid = #{map.tWareHouseFees.stlTypeid}</if>
             <if test="map.tWareHouseFees.fToCorpid != null  and map.tWareHouseFees.fToCorpid != ''">and w.f_corpid =
                 #{map.tWareHouseFees.fToCorpid}
             </if>
@@ -1203,6 +1204,7 @@
         <where>
             dict.status = '0'
             AND dict.dict_type = 'data_unitfees'
+            <if test="map.tWareHouseFees.stlTypeid != null">and w.f_stltypeid = #{map.tWareHouseFees.stlTypeid}</if>
             <if test="map.tWareHouseFees.fCorpid != null  and map.tWareHouseFees.fCorpid != ''">and w.f_corpid =
                 #{map.tWareHouseFees.fCorpid}
             </if>