Explorar o código

安品入库增加导出明细

lazhaoqian %!s(int64=3) %!d(string=hai) anos
pai
achega
dc6bb1e768

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/anpin/StockControl.java

@@ -395,5 +395,16 @@ public class StockControl extends BaseController {
         ExcelUtil<PurchaseRequestExcel> util = new ExcelUtil<PurchaseRequestExcel>(PurchaseRequestExcel.class);
         ExcelUtil<PurchaseRequestExcel> util = new ExcelUtil<PurchaseRequestExcel>(PurchaseRequestExcel.class);
         return util.exportExcel(list, "采购申请统计表");
         return util.exportExcel(list, "采购申请统计表");
     }
     }
+    /**
+     * 导出入库统计列表
+     */
+    @Log(title = "导出入库统计表", businessType = BusinessType.EXPORT)
+    @GetMapping("/tWarehouseInorOutExcePorrt/anPinExcePort")
+    public AjaxResult anPinExcePort(TWarehousebillsfees tWarehousebillsfees)
+    {
+        List<AnPinExcePort> list = tWarehousebillsService.anPinExcePort(tWarehousebillsfees);
+        ExcelUtil<AnPinExcePort> util = new ExcelUtil<AnPinExcePort>(AnPinExcePort.class);
+        return util.exportExcel(list, "入库统计表");
+    }
 
 
 }
 }

+ 89 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/anpin/AnPinExcePort.java

@@ -0,0 +1,89 @@
+package com.ruoyi.anpin;
+
+import com.ruoyi.common.annotation.Excel;
+
+import java.math.BigDecimal;
+
+public class AnPinExcePort {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 费用名称
+     */
+    @Excel(name = "物品名称")
+    private String feeName;
+    /**
+     * 计价单位名称
+     */
+    @Excel(name = "计量单位")
+    private String fFeeunitName;
+    /**
+     * 数量
+     */
+    @Excel(name = "入库数量")
+    private BigDecimal fQty;
+
+    /**
+     * 单价
+     */
+    @Excel(name = "入库单价")
+    private BigDecimal fUnitprice;
+
+    /**
+     * 金额,2位小数f_qty* f_amount
+     */
+    @Excel(name = "总金额")
+    private BigDecimal fAmount;
+
+    public String getFeeName() {
+        return feeName;
+    }
+
+    public void setFeeName(String feeName) {
+        this.feeName = feeName;
+    }
+
+    public String getfFeeunitName() {
+        return fFeeunitName;
+    }
+
+    public void setfFeeunitName(String fFeeunitName) {
+        this.fFeeunitName = fFeeunitName;
+    }
+
+    public BigDecimal getfQty() {
+        return fQty;
+    }
+
+    public void setfQty(BigDecimal fQty) {
+        this.fQty = fQty;
+    }
+
+    public BigDecimal getfUnitprice() {
+        return fUnitprice;
+    }
+
+    public void setfUnitprice(BigDecimal fUnitprice) {
+        this.fUnitprice = fUnitprice;
+    }
+
+    public BigDecimal getfAmount() {
+        return fAmount;
+    }
+
+    public void setfAmount(BigDecimal fAmount) {
+        this.fAmount = fAmount;
+    }
+
+    @Override
+    public String toString() {
+        return "AnPinExcePort{" +
+                "feeName='" + feeName + '\'' +
+                ", fFeeunitName='" + fFeeunitName + '\'' +
+                ", fQty=" + fQty +
+                ", fUnitprice=" + fUnitprice +
+                ", fAmount=" + fAmount +
+                '}';
+    }
+}

+ 7 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/mapper/TWarehousebillsfeesMapper.java

@@ -230,4 +230,11 @@ public interface TWarehousebillsfeesMapper extends BaseMapper<TWarehousebillsfee
      * @return
      * @return
      */
      */
     public List<WarhousrExcel> selectTWarehouseCallout(TWarehousebillsfees tWarehousebillsfees);
     public List<WarhousrExcel> selectTWarehouseCallout(TWarehousebillsfees tWarehousebillsfees);
+
+    /**
+     * 入库导出
+     * @param tWarehousebillsfees
+     * @return
+     */
+    public List<AnPinExcePort> anPinExcePort(TWarehousebillsfees tWarehousebillsfees);
 }
 }

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

@@ -536,4 +536,10 @@ public interface ITWarehouseBillsService {
      * @return
      * @return
      */
      */
     public  List<TWarehouseBills> cannibalizeList(TWarehouseBills tWarehouseBills);
     public  List<TWarehouseBills> cannibalizeList(TWarehouseBills tWarehouseBills);
+    /**
+     * 入库导出
+     * @param tWarehousebillsfees
+     * @return
+     */
+    public List<AnPinExcePort> anPinExcePort(TWarehousebillsfees tWarehousebillsfees);
 }
 }

+ 5 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -2279,6 +2279,11 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         return tWarehouseBillsMapper.cannibalizeList(tWarehouseBills);
         return tWarehouseBillsMapper.cannibalizeList(tWarehouseBills);
     }
     }
 
 
+    @Override
+    public List<AnPinExcePort> anPinExcePort(TWarehousebillsfees tWarehousebillsfees) {
+        return tWarehousebillsfeesMapper.anPinExcePort(tWarehousebillsfees);
+    }
+
     /**
     /**
      * app仓储新行提交业务
      * app仓储新行提交业务
      *
      *

+ 152 - 0
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsfeesMapper.xml

@@ -2071,5 +2071,157 @@
         </where>
         </where>
         ORDER BY tw.f_id DESC
         ORDER BY tw.f_id DESC
     </select>
     </select>
+    <select id="anPinExcePort" parameterType="TWarehousebillsfees"
+            resultType="com.ruoyi.anpin.AnPinExcePort">
+        select tw.f_id,
+        tw.f_pid,
+        tw.f_lineno,
+        tw.f_corpid,
+        tw.f_feeid,
+        tf.f_name AS feeName,
+        tf.f_currency AS fCurrencyName,
+        tw.f_feeUnitid,
+        sc.dict_label AS fFeeunitName,
+        tw.f_qty AS fQty,
+        tw.f_unitprice  AS fUnitprice,
+        tw.f_amount AS fAmount,
+        tw.f_currency,
+        tw.f_exrate,
+        tw.f_taxrate,
+        tw.f_dc,
+        tw.f_billstatus,
+        CASE
+
+        WHEN tw.f_billstatus = '1' THEN
+        '保存'
+        WHEN tw.f_billstatus = '2' THEN
+        '暂存'
+        WHEN tw.f_billstatus = '3' THEN
+        '审批驳回'
+        WHEN tw.f_billstatus = '4' THEN
+        '提交审核'
+        WHEN tw.f_billstatus = '5' THEN
+        '审核中'
+        WHEN tw.f_billstatus = '6' THEN
+        '审核完成'
+        END AS fBillstatusName,
+        tw.f_review_date,
+        tw.f_statement_no,
+        tw.f_accamount,
+        tw.f_stlamount,
+        tw.f_accamount_date,
+        tw.f_invnos,
+        tw.f_invamount,
+        tw.f_stlamount_no,
+        tw.f_askamount,
+        tw.f_status,
+        tw.f_stlamount_date,
+        tw.del_flag,
+        tw.create_by,
+        tw.create_time,
+        tw.update_by,
+        tw.update_time,
+        tw.remark,
+        tw.src_id,
+        tw.src_bill_no,
+        tw.f_mblno,
+        tw.f_product_name,
+        tw.f_marks,
+        tw.f_chargedate,
+        tw.f_billing_deadline,
+        tw.f_inventory_days,
+        tw.f_amt,
+        tw.f_billing_days,
+        tw.f_billing_qty,
+        tw.f_billtype,
+        tw.f_billingway,
+        tw.f_bsdate,
+        tw.f_originalbilldate,
+        tw.f_stltypeid,
+        sd.dict_label AS fBillingwayName,
+        tw.f_business_type,
+        tw.f_src_type_id,
+        tw.f_warehouseid,
+        th.f_warehouse_information AS fWarehouseName,
+        tw.f_purchase,
+        tw.t_productdate,
+        tw.f_lotno,
+        tw.f_valid,
+        tw.f_units,
+        tw.f_store_env,
+        tw.f_isfilles,
+        si.dict_label AS fUnitsName,
+        st.dict_label AS fStoreEnvName,
+        sti.dict_label AS fIsfillesName,
+        tw.f_allot_warehouseid,
+        te.f_warehouse_information AS fAllotWarehouseName,
+        IFNULL(tl.f_grossweightblc,0) AS fGrossweightblc,
+        IFNULL(tl.f_volumnblc,0) AS fVolumnblc,
+        IFNULL(tl.f_netweightblc,0) AS fNetweightblc,
+        tc.f_name  AS corpName
+        from t_warehousebillsfees tw
+        LEFT JOIN t_fees tf ON tw.f_feeid = tf.f_id
+        LEFT JOIN t_corps tc ON tw.f_corpid = tc.f_id
+        LEFT JOIN t_warehouse th ON tw.f_warehouseid = th.f_id
+        LEFT JOIN t_warehouse te ON tw.f_allot_warehouseid = te.f_id
+        LEFT JOIN sys_dict_data sc ON sc.dict_value = tw.f_feeUnitid AND sc.dict_type = 'data_unitfees'
+        LEFT JOIN sys_dict_data sd ON sd.dict_value = tw.f_stltypeid AND sd.dict_type = 'f_paymode'
+        LEFT JOIN sys_dict_data si ON si.dict_value = tw.f_units AND si.dict_type = 'f_floatunit'
+        LEFT JOIN sys_dict_data st ON st.dict_value = tw.f_store_env AND st.dict_type = 'f_StorageEnvironment'
+        LEFT JOIN sys_dict_data sti ON sti.dict_value = tw.f_isfilles AND sti.dict_type = 'f_evidence'
+        LEFT JOIN t_warehousebills ti ON ti.f_id = tw.f_pid
+        LEFT JOIN t_whgenleg tl ON tl.f_corpid = tw.f_corpid AND tl.f_goodsid = tw.f_feeid
+        AND tl.f_billingway = tw.f_feeUnitid AND tl.f_warehouse_locationid = tw.f_warehouseid
+        <where>
+            tw.del_flag = '0'
+            <if test="fPid != null ">and tw.f_pid = #{fPid}</if>
+            <if test="fLineno != null ">and tw.f_lineno = #{fLineno}</if>
+            <if test="fCorpid != null ">and tw.f_corpid = #{fCorpid}</if>
+            <if test="fFeeid != null ">and tw.f_feeid = #{fFeeid}</if>
+            <if test="fFeeunitid != null ">and tw.f_feeUnitid = #{fFeeunitid}</if>
+            <if test="fQty != null ">and tw.f_qty = #{fQty}</if>
+            <if test="fUnitprice != null ">and tw.f_unitprice = #{fUnitprice}</if>
+            <if test="fAmount != null ">and tw.f_amount = #{fAmount}</if>
+            <if test="fCurrency != null  and fCurrency != ''">and tw.f_currency = #{fCurrency}</if>
+            <if test="fExrate != null ">and tw.f_exrate = #{fExrate}</if>
+            <if test="fTaxrate != null ">and tw.f_taxrate = #{fTaxrate}</if>
+            <if test="fDc != null  and fDc != ''">and tw.f_dc = #{fDc}</if>
+            <if test="fBillstatus != null  and fBillstatus != ''">and tw.f_billstatus = #{fBillstatus}</if>
+            <if test="fReviewDate != null ">and tw.f_review_date = #{fReviewDate}</if>
+            <if test="fStatementNo != null  and fStatementNo != ''">and tw.f_statement_no = #{fStatementNo}</if>
+            <if test="fAccamount != null ">and tw.f_accamount = #{fAccamount}</if>
+            <if test="fStlamount != null ">and tw.f_stlamount = #{fStlamount}</if>
+            <if test="fAccamountDate != null ">and tw.f_accamount_date = #{fAccamountDate}</if>
+            <if test="fInvnos != null  and fInvnos != ''">and tw.f_invnos = #{fInvnos}</if>
+            <if test="fInvamount != null ">and tw.f_invamount = #{fInvamount}</if>
+            <if test="fStlamountNo != null  and fStlamountNo != ''">and tw.f_stlamount_no = #{fStlamountNo}</if>
+            <if test="fAskamount != null ">and tw.f_askamount = #{fAskamount}</if>
+            <if test="fStatus != null  and fStatus != ''">and tw.f_status = #{fStatus}</if>
+            <if test="delFlag != null">and tw.del_flag = #{delFlag}</if>
+            <if test="fStlamountDate != null ">and tw.f_stlamount_date = #{fStlamountDate}</if>
+            <if test="srcId != null ">and tw.src_id = #{srcId}</if>
+            <if test="srcBillNo != null  and srcBillNo != ''">and tw.src_bill_no = #{srcBillNo}</if>
+            <if test="fMblno != null  and fMblno != ''">and tw.f_mblno = #{fMblno}</if>
+            <if test="fProductName != null  and fProductName != ''">and tw.f_product_name like concat('%',
+                #{fProductName},
+                '%')
+            </if>
+            <if test="fMarks != null  and fMarks != ''">and tw.f_marks = #{fMarks}</if>
+            <if test="fChargedate != null ">and tw.f_chargedate = #{fChargedate}</if>
+            <if test="fBillingDeadline != null ">and tw.f_billing_deadline = #{fBillingDeadline}</if>
+            <if test="fInventoryDays != null ">and tw.f_inventory_days = #{fInventoryDays}</if>
+            <if test="fAmt != null ">and tw.f_amt = #{fAmt}</if>
+            <if test="fBillingDays != null ">and tw.f_billing_days = #{fBillingDays}</if>
+            <if test="fBillingQty != null ">and tw.f_billing_qty = #{fBillingQty}</if>
+            <if test="fBilltype != null  and fBilltype != ''">and tw.f_billtype = #{fBilltype}</if>
+            <if test="fBillingway != null ">and tw.f_billingway = #{fBillingway}</if>
+            <if test="fBsdate != null ">and tw.f_bsdate = #{fBsdate}</if>
+            <if test="fOriginalbilldate != null ">and tw.f_originalbilldate = #{fOriginalbilldate}</if>
+            <if test="fStltypeid != null">and tw.f_stltypeid = #{fStltypeid},</if>
+            <if test="fSrcTypeId != null">and tw.f_src_type_id = #{fSrcTypeId},</if>
+            <if test="fWarehouseid != null ">and tw.f_warehouseid = #{fWarehouseid}</if>
+            <if test="fPurchase != null ">and tw.f_purchase = #{fPurchase}</if>
+        </where>
+    </select>
 
 
 </mapper>
 </mapper>