Parcourir la source

修改入库列表页查询方法

阿伏兔 il y a 4 ans
Parent
commit
5c3f75834f

+ 2 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseInStockController.java

@@ -18,6 +18,7 @@ import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 仓库详情主表Controller
@@ -39,7 +40,7 @@ public class TWarehouseInStockController extends BaseController {
     public TableDataInfo list(TWarehouseBills tWarehouseBills) {
         startPage();
         tWarehouseBills.setfBilltype("SJRK");
-        List<TWarehouseBills> list = itWarehouseBillsService.selectTWarehousebillsList(tWarehouseBills);
+        List<Map<String, Object>> list = itWarehouseBillsService.selectWarehouseBusinessList(tWarehouseBills);
         return getDataTable(list);
     }
 

+ 9 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehouseBillsMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.ruoyi.warehouseBusiness.domain.TWarehouseBills;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 详情主表Mapper接口
@@ -22,6 +23,14 @@ public interface TWarehouseBillsMapper extends BaseMapper<TWarehouseBills> {
     public TWarehouseBills selectTWarehousebillsById(Long fId);
 
     /**
+     * 查询对仓库物详情的列表
+     *
+     * @param tWarehousebills 详情主表
+     * @return 结果
+     */
+    public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills);
+
+    /**
      * 查询详情主表列表
      *
      * @param tWarehousebills 详情主表

+ 9 - 1
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/ITWarehouseBillsService.java

@@ -23,7 +23,7 @@ public interface ITWarehouseBillsService {
     public Map<String, Object> selectTWarehousebillsById(Long fId);
 
     /**
-     * 查询详情主表列表
+     * 查询导出所需主表列表
      *
      * @param tWarehousebills 详情主表
      * @return 详情主表集合
@@ -31,6 +31,14 @@ public interface ITWarehouseBillsService {
     public List<TWarehouseBills> selectTWarehousebillsList(TWarehouseBills tWarehousebills);
 
     /**
+     * 查询详情主表列表
+     *
+     * @param tWarehousebills 详情主表
+     * @return 详情主表集合
+     */
+    public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills);
+
+    /**
      * 新增详情主表
      *
      * @param tWarehouseBills      仓库主表

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

@@ -140,9 +140,19 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      * @return 详情主表
      */
     @Override
+    public List<Map<String, Object>> selectWarehouseBusinessList(TWarehouseBills tWarehousebills) {
+        return tWarehouseBillsMapper.selectWarehouseBusinessList(tWarehousebills);
+    }
+
+    /**
+     * 查询导出所需主表列表
+     *
+     * @param tWarehousebills 详情主表
+     * @return 详情主表
+     */
+    @Override
     public List<TWarehouseBills> selectTWarehousebillsList(TWarehouseBills tWarehousebills) {
-        List<TWarehouseBills> tWarehouseBills = tWarehouseBillsMapper.selectTWarehousebillsList(tWarehousebills);
-        return tWarehouseBills;
+        return tWarehouseBillsMapper.selectTWarehousebillsList(tWarehousebills);
     }
 
     /**

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

@@ -98,6 +98,63 @@
         </where>
     </select>
 
+    <select id="selectWarehouseBusinessList" parameterType="TWarehousebills" resultType="Map">
+        SELECT
+            bill.f_id AS fId,
+            corp.f_name AS fCorpid,
+            bill.f_mblno AS fMblno,
+            corpSub.f_name AS fSbu,
+            bill.f_bsdate AS fBsdate,
+            bill.f_trademodeid AS fTrademodeid,
+            bill.f_warehouseid AS fWarehouseid,
+            bill.f_qty AS fQty,
+            bill.f_grossweight AS fGrossweight,
+            bill.f_netweight AS fNetweight
+        FROM
+            t_warehousebills bill
+            LEFT JOIN t_corps corp ON corp.f_id = bill.f_corpid
+            LEFT JOIN t_corps corpSub ON corpSub.f_id = bill.f_sbu
+            LEFT JOIN t_warehouse ware ON ware.f_id = bill.f_warehouseid
+        <where>
+            <if test="fBillno != null  and fBillno != ''">and bill.f_billno = #{fBillno}</if>
+            <if test="fCustomsdeclartion != null  and fCustomsdeclartion != ''">and bill.f_customsdeclartion = #{fCustomsdeclartion}</if>
+            <if test="fOriginalbillno != null  and fOriginalbillno != ''">and bill.f_originalbillno = #{fOriginalbillno}</if>
+            <if test="fDeptid != null ">and bill.f_deptid = #{fDeptid}</if>
+            <if test="fBsdeptid != null ">and bill.f_bsdeptid = #{fBsdeptid}</if>
+            <if test="fContacts != null  and fContacts != ''">and bill.f_contacts = #{fContacts}</if>
+            <if test="fTel != null  and fTel != ''">and bill.f_tel = #{fTel}</if>
+            <if test="fCorpid != null ">and bill.f_corpid = #{fCorpid}</if>
+            <if test="fTocorpid != null ">and bill.f_tocorpid = #{fTocorpid}</if>
+            <if test="fStltypeid != null ">and bill.f_stltypeid = #{fStltypeid}</if>
+            <if test="fBscorpno != null  and fBscorpno != ''">and bill.f_bscorpno = #{fBscorpno}</if>
+            <if test="fWarehouseid != null ">and bill.f_warehouseid = #{fWarehouseid}</if>
+            <if test="fStorekeeper != null  and fStorekeeper != ''">and bill.f_storekeeper = #{fStorekeeper}</if>
+            <if test="fBsdate != null ">and bill.f_bsdate = #{fBsdate}</if>
+            <if test="fPlanqty != null ">and bill.f_planqty = #{fPlanqty}</if>
+            <if test="fPlangrossweight != null ">and bill.f_plangrossweight = #{fPlangrossweight}</if>
+            <if test="fPlannetweight != null ">and bill.f_plannetweight = #{fPlannetweight}</if>
+            <if test="fPlanvolumn != null ">and bill.f_planvolumn = #{fPlanvolumn}</if>
+            <if test="fQty != null ">and bill.f_qty = #{fQty}</if>
+            <if test="fGrossweight != null ">and bill.f_grossweight = #{fGrossweight}</if>
+            <if test="fNetweight != null ">and bill.f_netweight = #{fNetweight}</if>
+            <if test="fVolumn != null ">and bill.f_volumn = #{fVolumn}</if>
+            <if test="fTrademodeid != null ">and bill.f_trademodeid = #{fTrademodeid}</if>
+            <if test="fBillingway != null ">and bill.f_billingway = #{fBillingway}</if>
+            <if test="fSbu != null ">and bill.f_sbu = #{fSbu}</if>
+            <if test="fFeetunit != null  and fFeetunit != ''">and bill.f_feetunit = #{fFeetunit}</if>
+            <if test="fMblno != null  and fMblno != ''">and bill.f_mblno = #{fMblno}</if>
+            <if test="fVslvoy != null  and fVslvoy != ''">and bill.f_vslvoy = #{fVslvoy}</if>
+            <if test="fEta != null ">and bill.f_eta = #{fEta}</if>
+            <if test="fCustomno != null  and fCustomno != ''">and bill.f_customno = #{fCustomno}</if>
+            <if test="fIfweigh != null  and fIfweigh != ''">and bill.f_ifweigh = #{fIfweigh}</if>
+            <if test="fIfpledge != null  and fIfpledge != ''">and bill.f_ifpledge = #{fIfpledge}</if>
+            <if test="fIfdamage != null  and fIfdamage != ''">and bill.f_ifdamage = #{fIfdamage}</if>
+            <if test="fBankcorpid != null ">and bill.f_bankcorpid = #{fBankcorpid}</if>
+            <if test="fBilltype != null  and fBilltype != ''">and bill.f_billtype = #{fBilltype}</if>
+            <if test="fBillstatus != null  and fBillstatus != ''">and bill.f_billstatus = #{fBillstatus}</if>
+        </where>
+    </select>
+
     <select id="selectTWarehousebillsById" parameterType="Long" resultMap="TWarehousebillsResult">
         <include refid="selectTWarehousebillsVo"/>
         where f_id = #{fId}