Jelajahi Sumber

[CODE]:作业费协议接口

maxianghua 4 tahun lalu
induk
melakukan
0e8961818b

+ 2 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/agreement/TWarehouseAgreementitemsController.java

@@ -13,6 +13,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 仓储费明细表Controller
@@ -33,7 +34,7 @@ public class TWarehouseAgreementitemsController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(TWarehouseAgreementitems tWarehouseAgreementitems) {
         startPage();
-        List<TWarehouseAgreementitems> list = tWarehouseAgreementitemsService.selectTWarehouseAgreementitemsList(tWarehouseAgreementitems);
+        List<Map<String, Object>> list = tWarehouseAgreementitemsService.selectTWarehouseAgreementitemsList1(tWarehouseAgreementitems);
         return getDataTable(list);
     }
 

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

@@ -5,6 +5,7 @@ import com.ruoyi.warehouseBusiness.domain.TWarehouseAgreementitems;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 仓储费明细表Mapper接口
@@ -29,6 +30,8 @@ public interface TWarehouseAgreementitemsMapper {
      */
     public List<TWarehouseAgreementitems> selectTWarehouseAgreementitemsList(TWarehouseAgreementitems tWarehouseAgreementitems);
 
+    public List<Map<String, Object>> selectTWarehouseAgreementitemsList1(TWarehouseAgreementitems tWarehouseAgreementitems);
+
     /**
      * 新增仓储费明细表
      *

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseAgreementitemsService.java

@@ -4,6 +4,7 @@ package com.ruoyi.warehouseBusiness.service;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseAgreementitems;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 仓储费明细表Service接口
@@ -27,6 +28,7 @@ public interface ITWarehouseAgreementitemsService {
      * @return 仓储费明细表集合
      */
     public List<TWarehouseAgreementitems> selectTWarehouseAgreementitemsList(TWarehouseAgreementitems tWarehouseAgreementitems);
+    public List<Map<String, Object>> selectTWarehouseAgreementitemsList1(TWarehouseAgreementitems tWarehouseAgreementitems);
 
     /**
      * 新增仓储费明细表

+ 6 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseAgreementitemsServiceImpl.java

@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 仓储费明细表Service业务层处理
@@ -43,6 +44,11 @@ public class TWarehouseAgreementitemsServiceImpl implements ITWarehouseAgreement
         return tWarehouseAgreementitemsMapper.selectTWarehouseAgreementitemsList(tWarehouseAgreementitems);
     }
 
+    @Override
+    public List<Map<String, Object>> selectTWarehouseAgreementitemsList1(TWarehouseAgreementitems tWarehouseAgreementitems) {
+        return tWarehouseAgreementitemsMapper.selectTWarehouseAgreementitemsList1(tWarehouseAgreementitems);
+    }
+
     /**
      * 新增仓储费明细表
      *

+ 24 - 1
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -382,7 +382,7 @@
 	        w.f_totalgross AS fTotalgross
         FROM
             t_warehouse w
-            LEFT JOIN (
+            RIGHT JOIN (
             SELECT
                 f_warehouseid AS f_warehouseid,
                 sum( f_grossweightD ) AS f_grossweightD
@@ -394,6 +394,29 @@
                 sum( f_grossweightD ) DESC
             ) t ON w.f_id = t.f_warehouseid
     </select>
+    <select id="selectWareHouseListWhouse"  resultType="Map">
+        SELECT
+        t.f_warehouseid AS fWarehouseid,
+        w.f_name AS fName,
+        t.f_grossweightD AS fGrossweightD,
+        w.f_totalgross AS fTotalgross
+        FROM
+        t_warehouse w
+        RIGHT JOIN (
+        SELECT
+        f_warehouseid AS f_warehouseid,
+        sum( f_grossweightD ) AS f_grossweightD
+        FROM
+        t_whgenleg
+        GROUP BY
+        f_warehouseid
+        ORDER BY
+        sum( f_grossweightD ) DESC
+        ) t ON w.f_id = t.f_warehouseid
+        <where>
+            <if test="fId != null ">and w.f_id = #{fId}</if>
+        </where>
+    </select>
 
     <select id="selectCorpsList" resultType="Map">
         SELECT

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

@@ -41,6 +41,40 @@
         </where>
     </select>
 
+
+    <select id="selectTWarehouseAgreementList1" parameterType="TWarehouseAgreement"
+            resultType="Map" >
+        SELECT DISTINCT
+        agre.f_id AS fId,
+        corp.f_name AS fCorpid,
+        agre.f_contractno AS fContractno,
+        goods.f_name AS fGoodsid,
+        agre.t_packages AS tPackages,
+        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="fContractno != null  and fContractno != ''">and agre.f_contractno = #{fContractno}</if>
+            <if test="fDeptid != null ">and agre.f_deptid = #{fDeptid}</if>
+            <if test="fCorpid != null ">and agre.f_corpid = #{fCorpid}</if>
+            <if test="fGoodsid != null">and agre.f_goodsid = #{fGoodsid}</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="selectTWarehouseAgreementitemsById" parameterType="Long" resultMap="TWarehouseAgreementitemsResult">
         <include refid="selectTWarehouseAgreementitemsVo"/>
         where f_id = #{fId}
@@ -81,6 +115,26 @@
         ORDER BY
             items.f_fromdays
     </select>
+    <select id="selectTWarehouseAgreementitemsList1" resultType="java.util.Map">
+        SELECT DISTINCT
+            agre.f_id AS fId,
+            corp.f_name AS fCorpname,
+            corp.f_id AS fCorpid,
+            fee.f_name AS  fName,
+            fee.f_id AS feeFId,
+            itme.f_feeUnitid AS fFeeUnitid,
+            f_price AS fPrice
+            FROM
+            t_warehouse_agreement agre
+            LEFT JOIN t_corps corp ON corp.f_id = agre.f_corpid
+            LEFT JOIN t_warehouse_agreementitems itme ON itme.f_pid = agre.f_id
+            LEFT JOIN t_fees fee ON fee.f_id = itme.f_feeid
+        <where>
+            <if test="fLineno != null  and fLineno != ''">and corp.f_id = #{fLineno}</if>
+            and agre.f_billstatus = 0
+        </where>
+    </select>
+
 
     <insert id="insertTWarehouseAgreementitems" parameterType="TWarehouseAgreementitems" useGeneratedKeys="true"
             keyProperty="fId">