Selaa lähdekoodia

[CODE]: 应收、应付 --> 明细账列表

maxianghua 4 vuotta sitten
vanhempi
commit
56392a36e2

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/reportManagement/ReceivableController.java

@@ -9,6 +9,7 @@ import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.finance.domain.TWareHouseFees;
 import com.ruoyi.finance.service.ITFeeService;
+import com.ruoyi.reportManagement.dto.TWarehousebill;
 import com.ruoyi.reportManagement.excel.Receivable;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -59,6 +60,16 @@ public class ReceivableController extends BaseController {
         return util.exportExcel(list, "应收总账");
     }
 
+    /**
+     *  明细帐
+     */
+    @DataScope(deptAlias = "d", userAlias = "u")
+    @GetMapping("/detailed/list")
+    public TableDataInfo detailedList(TWarehousebill tWarehousebill) {
+        startPage();
+        List<Map<String, Object>> list = tFeeService.selectdetailedList(tWarehousebill);
+        return getDataTable(list);
+    }
 
 
 }

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

@@ -3,6 +3,7 @@ package com.ruoyi.finance.mapper;
 import com.ruoyi.finance.domain.TFee;
 import com.ruoyi.finance.domain.TWareHouseFees;
 import com.ruoyi.finance.excel.Detailed;
+import com.ruoyi.reportManagement.dto.TWarehousebill;
 import com.ruoyi.warehouseBusiness.excel.TWareHouseExcelItem;
 import org.apache.ibatis.annotations.Param;
 
@@ -89,4 +90,6 @@ public interface TFeeMapper {
 
     public List<Detailed> selectDetailedList(@Param("fId") Long fid);
 
+    public List<Map<String, Object>> selectDetailedList1(TWarehousebill tWarehousebill);
+
 }

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

@@ -8,6 +8,7 @@ import com.ruoyi.finance.excel.Charge;
 import com.ruoyi.finance.excel.Contrast;
 import com.ruoyi.finance.excel.Detailed;
 import com.ruoyi.finance.excel.Payment;
+import com.ruoyi.reportManagement.dto.TWarehousebill;
 import com.ruoyi.reportManagement.excel.Payable;
 import com.ruoyi.reportManagement.excel.Profit;
 import com.ruoyi.reportManagement.excel.Receivable;
@@ -132,4 +133,6 @@ public interface ITFeeService {
 
     public List<Detailed> selectDetailedList(Long  fId);
 
+    List<Map<String, Object>> selectdetailedList(TWarehousebill tWarehousebill);
+
 }

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

@@ -23,6 +23,7 @@ import com.ruoyi.finance.excel.Payment;
 import com.ruoyi.finance.mapper.TFeeDoMapper;
 import com.ruoyi.finance.mapper.TFeeMapper;
 import com.ruoyi.finance.service.ITFeeService;
+import com.ruoyi.reportManagement.dto.TWarehousebill;
 import com.ruoyi.reportManagement.excel.Payable;
 import com.ruoyi.reportManagement.excel.Profit;
 import com.ruoyi.reportManagement.excel.Receivable;
@@ -674,6 +675,10 @@ public class TFeeServiceImpl implements ITFeeService {
         return detailedList1;
     }
 
+    @Override
+    public List<Map<String, Object>> selectdetailedList(TWarehousebill tWarehousebill) {
+        return tFeeMapper.selectDetailedList1(tWarehousebill);
+    }
     /**
      *  更新费用明细
      * @param fid

+ 29 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/dto/TWarehousebill.java

@@ -14,7 +14,18 @@ public class TWarehousebill extends BaseEntity {
 
 
     /**
-     * 货权方
+     * 应收应付 (货权方)
+     */
+    private Long fCorpId;
+
+    /**
+     *  收付
+     */
+    private String fSrcdc;
+
+
+    /**
+     *  库存总账 货权方 、 应收应付 (结算单位)
      */
     private Long fCorpIds;
 
@@ -103,5 +114,22 @@ public class TWarehousebill extends BaseEntity {
     public void setfTrademodeids(Long fTrademodeids) {
         this.fTrademodeids = fTrademodeids;
     }
+
+    public Long getfCorpId() {
+        return fCorpId;
+    }
+
+    public void setfCorpId(Long fCorpId) {
+        this.fCorpId = fCorpId;
+    }
+
+    public String getfSrcdc() {
+        return fSrcdc;
+    }
+
+    public void setfSrcdc(String fSrcdc) {
+        this.fSrcdc = fSrcdc;
+    }
+
 }
 

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

@@ -563,7 +563,7 @@
             t.f_id AS fSrcpid,
             t.f_corpid AS fCorpid,
             c.f_name AS fName,
-            c1.f_id AS fId,
+            w.f_corpid AS fCorpids,
             c1.f_name AS fFeesName,
             w.f_mblno AS fMblno,
             w.f_product_name AS fProductName,
@@ -846,4 +846,32 @@
           AND dict.dict_type = 'data_unitfees'
           AND w.f_pid = #{fId}
     </select>
+    <select id="selectDetailedList1" resultType="java.util.Map">
+        SELECT
+            t.f_id AS fSrcpid,
+            t.f_corpid AS fCorpid,
+            c.f_name AS fName,
+            c1.f_name AS fFeesName,
+            w.f_mblno AS fMblno,
+            w.f_product_name AS fProductName,
+            w.f_marks AS fMarks,
+            w.f_dc AS fSrcdc,
+            w.f_amount  AS fAmount,
+            w.f_stlamount  AS fStlamount,
+            ifnull( w.f_amount , 0 ) - ifnull( w.f_stlamount , 0 ) AS nnfinished
+        FROM
+            t_warehousebills t
+                LEFT JOIN sys_user u ON t.create_by = u.user_name
+                LEFT JOIN sys_dept d ON t.f_bsdeptid = d.dept_id
+                LEFT JOIN t_corps c ON c.f_id = t.f_corpid
+                LEFT JOIN t_warehousebillsfees w ON w.f_pid = t.f_id
+                LEFT JOIN t_corps c1 ON w.f_corpid = c1.f_id
+                LEFT JOIN t_fees f ON w.f_feeid = f.f_id
+        WHERE
+            w.f_dc = #{fSrcdc}
+          AND t.f_review_date IS NOT NULL
+          AND w.f_corpid = #{fCorpIds}
+          AND t.f_corpid = #{fCorpId}
+          AND w.f_mblno = #{fMblno}
+    </select>
 </mapper>