Bladeren bron

1.入库 出库 货转 调拨-收费增加开票金额、发票号、开票日期
2.仓储出库增加库存预警(增加字段以及预警接口)
2022年7月15日19点35分

纪新园 3 jaren geleden
bovenliggende
commit
bee6e66ee5

+ 11 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/warehouseBusiness/TWarehouseOutStockController.java

@@ -425,4 +425,15 @@ public class TWarehouseOutStockController extends BaseController {
         return itWarehouseBillsService.quickOperation(warehousebillsDTO, loginUser);
     }
 
+
+    /**
+     * 出库-库存预警提示
+     */
+    @PreAuthorize("@ss.hasPermi('warehouseBusiness:outStock:add')")
+    @PostMapping(value = "/stockWarning")
+    @RepeatSubmit
+    public AjaxResult stockWarning(@RequestParam("tWarehousebillsitems") String tWarehousebillsitems) {
+        return itWarehouseBillsService.stockWarning(tWarehousebillsitems);
+    }
+
 }

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/basicData/domain/TGoods.java

@@ -6,6 +6,8 @@ import com.ruoyi.common.core.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import java.math.BigDecimal;
+
 /**
  * 商品详情对象 t_goods
  *
@@ -123,6 +125,19 @@ public class TGoods extends BaseEntity {
     @TableLogic
     private String delFlag;
 
+    /**
+     * 库存警告
+     */
+    private BigDecimal stockWarning;
+
+    public BigDecimal getStockWarning() {
+        return stockWarning;
+    }
+
+    public void setStockWarning(BigDecimal stockWarning) {
+        this.stockWarning = stockWarning;
+    }
+
     public String getfGoodsTs() {
         return fGoodsTs;
     }

+ 1 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/reportManagement/mapper/TWhgenlegMapper.java

@@ -9,6 +9,7 @@ import com.ruoyi.warehouseBusiness.domain.vo.CalculateStorageFeesInfoVO;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehousebillsfees.java

@@ -208,6 +208,21 @@ public class TWarehousebillsfees extends BaseEntity {
     private BigDecimal fInvamount;
 
     /**
+     * 开票日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date fInvoicingDate;
+
+    public Date getFInvoicingDate() {
+        return fInvoicingDate;
+    }
+
+    public void setFInvoicingDate(Date fInvoicingDate) {
+        this.fInvoicingDate = fInvoicingDate;
+    }
+
+    /**
      * 结算单号
      */
     @Excel(name = "结算单号")

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

@@ -183,4 +183,6 @@ public interface TWarehousebillsfeesMapper extends BaseMapper<TWarehousebillsfee
     List<Map<String, Object>> selectFeesBymblnoAndFname(@Param("fMblno") String fMblno,@Param("fCorpid") Long fCorpid,@Param("fDc") String fDc);
 
     List<Long> getCorpid(@Param("fIds") List<Long> fIds);
+
+    List<Map<String, Object>> selectTWarehousebillsfeesList1(TWarehousebillsfees tWarehousebillsfees);
 }

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

@@ -886,4 +886,10 @@ public interface ITWarehouseBillsService {
      */
     AjaxResult receipt(TWarehouseBills tWarehouseBills,LoginUser loginUser);
 
+    /**
+     * 出库-库存预警提示
+     * @param tWarehousebillsitems  库存明细
+     * @return  结果
+     */
+    AjaxResult stockWarning(String tWarehousebillsitems);
 }

+ 46 - 8
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -53,7 +53,10 @@ import com.ruoyi.warehouseBusiness.component.CalculationWarehouseService;
 import com.ruoyi.warehouseBusiness.component.WarehouseBillsfilterService;
 import com.ruoyi.warehouseBusiness.component.impl.QueryWhgenlegServiceImpl;
 import com.ruoyi.warehouseBusiness.domain.*;
-import com.ruoyi.warehouseBusiness.domain.ccb.*;
+import com.ruoyi.warehouseBusiness.domain.ccb.CargoInOutResult;
+import com.ruoyi.warehouseBusiness.domain.ccb.CargoInfo;
+import com.ruoyi.warehouseBusiness.domain.ccb.InCargoRsp;
+import com.ruoyi.warehouseBusiness.domain.ccb.OutCargoRsp;
 import com.ruoyi.warehouseBusiness.domain.dto.CalculateStorageFeesDTO;
 import com.ruoyi.warehouseBusiness.domain.dto.WarehousebillsDTO;
 import com.ruoyi.warehouseBusiness.domain.enums.FeesTypeEnum;
@@ -236,6 +239,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     private AuditItemsUsersMapper auditItemsUsersMapper;
     @Autowired
     private TWarehousebillsitemsElabelMapper warehousebillsitemsElabelMapper;
+    @Autowired
+    private TCorpsMapper corpMapper;
 
     private static final Logger log = LoggerFactory.getLogger(AddressUtils.class);
 
@@ -353,16 +358,18 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         tWarehousebillsfees.setfPid(fId);
         List<TWarehousebillsfees> warehousebillsfeesDr = new ArrayList<>();
         List<TWarehousebillsfees> warehousebillsfeesCr = new ArrayList<>();
-        List<TWarehousebillsfees> warehousebillsfees = tWarehousebillsfeesMapper.selectTWarehousebillsfeesList(tWarehousebillsfees);
+        List<Map<String,Object>> warehousebillsfees = tWarehousebillsfeesMapper.selectTWarehousebillsfeesList1(tWarehousebillsfees);
         if (StringUtils.isNotEmpty(warehousebillsfees)) {
-            for (TWarehousebillsfees fees : warehousebillsfees) {
-                if ("C".equals(fees.getfDc())) {
-                    warehousebillsfeesCr.add(fees);
+            for (Map<String,Object> fees : warehousebillsfees) {
+                String toJSON = JSONObject.toJSONString(fees);
+                TWarehousebillsfees tWarehousebillsfees_ = JSONObject.toJavaObject(JSON.parseObject(toJSON), TWarehousebillsfees.class);
+                if ("C".equals(fees.get("fDc"))) {
+                    warehousebillsfeesCr.add(tWarehousebillsfees_);
                 } else {
-                    warehousebillsfeesDr.add(fees);
+                    warehousebillsfeesDr.add(tWarehousebillsfees_);
                 }
-                corpsId.add(fees.getfCorpid());
-                feesId.add(fees.getfFeeid());
+                corpsId.add(tWarehousebillsfees_.getfCorpid());
+                feesId.add(tWarehousebillsfees_.getfFeeid());
             }
         }
         // 查询附件表数据
@@ -9508,6 +9515,37 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 
     }
 
+
+    /**
+     * 出库-库存预警提示
+     *
+     * @param tWarehousebillsitems 库存明细
+     * @return 结果
+     */
+    @Override
+    public AjaxResult stockWarning(String tWarehousebillsitems) {
+        // 库存明细添加
+        if (StringUtils.isNotNull(tWarehousebillsitems) && !"[]".equals(tWarehousebillsitems)) {
+            JSONArray warehouseJSON = JSONArray.parseArray(tWarehousebillsitems);
+            List<TWarehousebillsitems> warehousebillsitemsList = JSONObject.parseArray(warehouseJSON.toJSONString(), TWarehousebillsitems.class);
+            //遍历库存明细
+            for (TWarehousebillsitems warehousebillsitems : warehousebillsitemsList) {
+                //查看商品信息
+                TGoods tGoods = tGoodsMapper.selectTGoodsById(warehousebillsitems.getfGoodsid());
+                //判断结余净重、出库净重、商品信息是否为空
+                if (ObjectUtil.isNotNull(warehousebillsitems.getfNetweight()) && ObjectUtil.isNotNull(tGoods) && ObjectUtil.isNotNull(warehousebillsitems.getfPlannetweight())) {
+                    //计算库存剩余净重
+                    BigDecimal surplus = warehousebillsitems.getfPlannetweight().subtract(warehousebillsitems.getfNetweight());
+                    //判断库存剩余净重是否小于等于库存预警重量  如果是返回预警信息   (=-1小于 =0为等于  =1为大于)
+                    if (surplus.compareTo(tGoods.getStockWarning()) != 1) {
+                        return AjaxResult.error("品名为" + tGoods.getfName() + "提单号为" + warehousebillsitems.getfMblno() + "库存量已小于等于预警量!");
+                    }
+                }
+            }
+        }
+        return AjaxResult.success();
+    }
+
     /**
      * RSA 签名
      *

+ 6 - 1
ruoyi-warehouse/src/main/resources/mapper/basicData/TGoodsMapper.xml

@@ -28,10 +28,11 @@
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
         <result property="remark"    column="remark"    />
+        <result property="stockWarning"    column="stock_warning"    />
     </resultMap>
 
     <sql id="selectTGoodsVo">
-        select f_id, f_typeid, f_no, f_name, f_enam, f_specs, f_packagespecs, f_color, f_hscode, f_packageid, f_ems_no, f_ems_seq_no, f_goods_ts, f_wms_dcl_unit, f_wms_law_unit, if_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_goods
+        select f_id, f_typeid, f_no, f_name, f_enam, f_specs, f_packagespecs, f_color, f_hscode, f_packageid, f_ems_no, f_ems_seq_no, f_goods_ts, f_wms_dcl_unit, f_wms_law_unit, if_cntrno, f_status, del_flag, create_by, create_time, update_by, update_time, remark,stock_warning from t_goods
     </sql>
 
     <select id="selectTGoodsList" parameterType="TGoods" resultMap="TGoodsResult">
@@ -48,6 +49,7 @@
             <if test="fHscode != null  and fHscode != ''">and f_hscode like concat('%', #{fHscode}, '%')</if>
             <if test="fPackageid != null ">and f_packageid = #{fPackageid}</if>
             <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
+            <if test="stockWarning != null ">and stock_warning = #{stockWarning}</if>
         </where>
     </select>
 
@@ -81,6 +83,7 @@
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            <if test="stockWarning != null ">stock_warning,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fTypeid != null">#{fTypeid},</if>
@@ -105,6 +108,7 @@
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            <if test="stockWarning != null ">#{stockWarning},</if>
         </trim>
     </insert>
 
@@ -133,6 +137,7 @@
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remark != null">remark = #{remark},</if>
+            <if test="stockWarning != null ">stock_warning = #{stockWarning}</if>
         </trim>
         where f_id = #{fId}
     </update>

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

@@ -194,7 +194,8 @@
             ware.invoice_no,
             ware.bank,
             ware.water_bill_no,
-            ware.f_system_type
+            ware.f_system_type,
+            ware.f_apply_money as fApplyMoney
         from
             t_fee ware
             left join sys_user u on ware.create_by = u.user_name

+ 35 - 34
ruoyi-warehouse/src/main/resources/mapper/reportManagement/TWhgenlegMapper.xml

@@ -797,22 +797,22 @@
             leg.f_trademodeid AS fTrademodeids,
             goods.f_packagespecs AS fPackagespecs,
             leg.f_goodsid AS fGoodsid,
-            leg.f_volumnD AS fVolumnD,
-            leg.f_qtyD AS fQtyD,
-            leg.f_mblno AS fMblno,
-            leg.f_grossweightD AS fGrossweightD,
-            leg.f_netweightD AS fNetweightD,
-            leg.f_volumnC AS fVolumnC,
-            leg.f_volumnblc AS fVolumnblc,
-            leg.f_qtyC AS fQtyC,
-            leg.f_business_type AS fBusinessType,
-            leg.f_grossweightC AS fGrossweightC,
-            leg.f_netweightC AS fNetweightC,
-            leg.f_qtyblc AS fQtyblc,
-            leg.f_billingway AS fBillingway,
-            leg.f_chargedate AS fChargedate,
-            leg.f_grossweightblc AS fGrossweightblc,
-            leg.f_netweightblc AS fNetweightblc,
+        SUM(leg.f_volumnD) AS fVolumnD,
+        SUM(leg.f_qtyD) AS fQtyD,
+        leg.f_mblno AS fMblno,
+        SUM(leg.f_grossweightD) AS fGrossweightD,
+        SUM(leg.f_netweightD) AS fNetweightD,
+        SUM(leg.f_volumnC) AS fVolumnC,
+        SUM(leg.f_volumnblc) AS fVolumnblc,
+        SUM(leg.f_qtyC) AS fQtyC,
+        leg.f_business_type AS fBusinessType,
+        SUM(leg.f_grossweightC) AS fGrossweightC,
+        SUM(leg.f_netweightC) AS fNetweightC,
+        SUM(leg.f_qtyblc) AS fQtyblc,
+        leg.f_billingway AS fBillingway,
+        leg.f_chargedate AS fChargedate,
+        SUM(leg.f_grossweightblc) AS fGrossweightblc,
+        SUM(leg.f_netweightblc) AS fNetweightblc,
             dict.dict_label AS fBusinessTypes,
             leg.f_marks AS fMarks,
             DATE_FORMAT( leg.create_time, '%Y-%m-%d' ) AS createTime,
@@ -1004,7 +1004,8 @@
         leg.f_corpid AS fCorpIds,
         corp.f_name AS fCorpid,
         leg.f_shipper AS fShipper,
-        ware.f_warehouse_information AS fWarehouseids,
+        <if test="isCntrno != 2 ">ware.f_warehouse_information AS fWarehouseids,</if>
+        <if test="isCntrno == 2 ">ware.f_name AS fWarehouseids,</if>
         area.f_name AS fWarehouseLocationids,
         leg.f_originalbillno AS fOriginalbillno,
         leg.f_warehouse_locationid AS fWarehouseLocationid,
@@ -1013,22 +1014,22 @@
         leg.f_trademodeid AS fTrademodeids,
         goods.f_packagespecs AS fPackagespecs,
         leg.f_goodsid AS fGoodsid,
-        leg.f_volumnD AS fVolumnD,
-        leg.f_qtyD AS fQtyD,
+        SUM(leg.f_volumnD) AS fVolumnD,
+        SUM(leg.f_qtyD) AS fQtyD,
         leg.f_mblno AS fMblno,
-        leg.f_grossweightD AS fGrossweightD,
-        leg.f_netweightD AS fNetweightD,
-        leg.f_volumnC AS fVolumnC,
-        leg.f_volumnblc AS fVolumnblc,
-        leg.f_qtyC AS fQtyC,
+        SUM(leg.f_grossweightD) AS fGrossweightD,
+        SUM(leg.f_netweightD) AS fNetweightD,
+        SUM(leg.f_volumnC) AS fVolumnC,
+        SUM(leg.f_volumnblc) AS fVolumnblc,
+        SUM(leg.f_qtyC) AS fQtyC,
         leg.f_business_type AS fBusinessType,
-        leg.f_grossweightC AS fGrossweightC,
-        leg.f_netweightC AS fNetweightC,
-        leg.f_qtyblc AS fQtyblc,
+        SUM(leg.f_grossweightC) AS fGrossweightC,
+        SUM(leg.f_netweightC) AS fNetweightC,
+        SUM(leg.f_qtyblc) AS fQtyblc,
         leg.f_billingway AS fBillingway,
         leg.f_chargedate AS fChargedate,
-        leg.f_grossweightblc AS fGrossweightblc,
-        leg.f_netweightblc AS fNetweightblc,
+        SUM(leg.f_grossweightblc) AS fGrossweightblc,
+        SUM(leg.f_netweightblc) AS fNetweightblc,
         leg.f_localcntrno AS fLocalcntrno,
         dict.dict_label AS fBusinessTypes,
         leg.f_marks AS fMarks,
@@ -1041,7 +1042,8 @@
         left join sys_dept d on u.dept_id = d.dept_id
         LEFT JOIN t_corps corp ON corp.f_id = leg.f_corpid
         LEFT JOIN t_goods goods ON goods.f_id = leg.f_goodsid
-        LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouse_locationid
+        <if test="isCntrno != 2 ">LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouse_locationid</if>
+        <if test="isCntrno == 2 ">LEFT JOIN t_warehouse ware ON ware.f_id = leg.f_warehouseid</if>
         LEFT JOIN sys_dict_data dict ON dict.dict_value = leg.f_business_type
         LEFT JOIN t_warehouse_area area ON area.f_id = leg.f_warehouse_locationid
         LEFT JOIN sys_dict_data dict1 ON dict1.dict_value = leg.f_trademodeid
@@ -1088,12 +1090,12 @@
             <if test="fLocalcntrno != null  and fLocalcntrno != ''">and leg.f_localcntrno  LIKE  concat('%', #{fLocalcntrno}, '%')</if>
             <if test="fLocation != null  and fLocation ==0 ">and ware.ancestors  LIKE  concat('%', #{fWarehouseLocationid}, '%')</if>
             <if test="isCntrno == null">
-                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid
+                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_marks
             </if>
             <if test="isCntrno == 1 ">
-                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_cntrno
+                GROUP BY leg.f_corpid, leg.f_originalbillno, leg.f_originalbilldate, leg.f_warehouse_locationid, leg.f_goodsid, leg.f_trademodeid,leg.f_cntrno,leg.f_marks
             </if>
-            <if test="isCntrno == 2 ">GROUP BY leg.f_corpid, leg.f_mblno, leg.f_goodsid, leg.f_warehouseid</if>
+            <if test="isCntrno == 2 ">GROUP BY leg.f_corpid, leg.f_mblno, leg.f_goodsid, leg.f_warehouseid ,leg.f_marks</if>
         </where>
         ${params.dataScope}
         order by leg.f_bsdate desc
@@ -1471,7 +1473,6 @@
             <if test="corpId != null ">and t1.f_corpid = #{corpId}</if>
         </where>
     </select>
-
     <update id="changeBelongTo" parameterType="TWhgenleg">
         update t_whgenleg
         <trim prefix="SET" suffixOverrides=",">

+ 10 - 2
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsMapper.xml

@@ -351,7 +351,10 @@
             twfD.f_amount as fReceivable,
             twfD.f_accamount as fRecycle,
             twfC.f_amount as fDue,
-            twfC.f_accamount as fPay
+            twfC.f_accamount as fPay,
+            tf.f_apply_money AS fApplyMoney,
+            tf.invoice_no AS invoiceNo,
+            tf.f_accbilldate AS fAccbilldate
         FROM
             t_warehousebills bill
             LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
@@ -388,6 +391,7 @@
             WHERE f_dc = 'C'
             GROUP BY f_pid
             ) twfC ON twfC.f_pid = bill.f_id
+            left join t_fee tf on tf.t_mblno = bill.f_mblno
         <where>
             <if test="fTypeid == null or fTypeid == ''">and bill.f_typeid IS NULL</if>
             <if test="fTypeid != null and fTypeid != ''">and bill.f_typeid = #{fTypeid}</if>
@@ -565,7 +569,10 @@
             bill.f_billno AS fBillno,
             g.f_name AS fGoodsid,
             bill.f_storekeeper AS fStorekeeper,
-            bill.f_remarks_fees AS fRemarksFees
+            bill.f_remarks_fees AS fRemarksFees,
+            tf.f_apply_money AS fApplyMoney,
+            tf.invoice_no AS invoiceNo,
+            tf.f_accbilldate AS fAccbilldate
         FROM
             t_warehousebills bill
             LEFT JOIN t_goods g ON g.f_id = bill.f_goodsid
@@ -580,6 +587,7 @@
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = bill.f_id
             LEFT JOIN t_goods goods ON goods.f_id = item.f_goodsid
             LEFT JOIN sys_dict_data dict ON dict.dict_value = bill.f_trademodeid
+            LEFT JOIN t_fee tf on tf.t_mblno = bill.f_mblno
         <where>
             dict.status = '0'
             AND dict.dict_type = 'data_trademodes'

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

@@ -29,6 +29,7 @@
         <result property="fInvnos" column="f_invnos"/>
         <result property="fAccamountDate" column="f_accamount_date"/>
         <result property="fInvamount" column="f_invamount"/>
+        <result property="fInvoicingDate" column="f_invoicing_date"/>
         <result property="fStlamountNo" column="f_stlamount_no"/>
         <result property="fAskamount" column="f_askamount"/>
         <result property="fStatus" column="f_status"/>
@@ -90,6 +91,7 @@
                f_accamount_date,
                f_invnos,
                f_invamount,
+               f_invoicing_date,
                f_stlamount_no,
                f_askamount,
                f_status,
@@ -148,6 +150,7 @@
             <if test="fAccamountDate != null ">and f_accamount_date = #{fAccamountDate}</if>
             <if test="fInvnos != null  and fInvnos != ''">and f_invnos = #{fInvnos}</if>
             <if test="fInvamount != null ">and f_invamount = #{fInvamount}</if>
+            <if test="fInvoicingDate != null ">and f_invoicing_date = #{fInvoicingDate}</if>
             <if test="fStlamountNo != null  and fStlamountNo != ''">and f_stlamount_no = #{fStlamountNo}</if>
             <if test="fAskamount != null ">and f_askamount = #{fAskamount}</if>
             <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
@@ -306,6 +309,7 @@
             <if test="fAccamountDate != null">f_accamount_date,</if>
             <if test="fInvnos != null">f_invnos,</if>
             <if test="fInvamount != null">f_invamount,</if>
+            <if test="fInvoicingDate != null ">f_invoicing_date,</if>
             <if test="fStlamountNo != null">f_stlamount_no,</if>
             <if test="fAskamount != null">f_askamount,</if>
             <if test="fStatus != null">f_status,</if>
@@ -361,6 +365,7 @@
             <if test="fAccamountDate != null">#{fAccamountDate},</if>
             <if test="fInvnos != null">#{fInvnos},</if>
             <if test="fInvamount != null">#{fInvamount},</if>
+            <if test="fInvoicingDate != null ">#{fInvoicingDate},</if>
             <if test="fStlamountNo != null">#{fStlamountNo},</if>
             <if test="fAskamount != null">#{fAskamount},</if>
             <if test="fStatus != null">#{fStatus},</if>
@@ -419,6 +424,7 @@
             <if test="fAccamountDate != null">f_accamount_date = #{fAccamountDate},</if>
             <if test="fInvnos != null">f_invnos = #{fInvnos},</if>
             <if test="fInvamount != null">f_invamount = #{fInvamount},</if>
+            <if test="fInvoicingDate != null ">f_invoicing_date = #{fInvoicingDate},</if>
             <if test="fStlamountNo != null">f_stlamount_no = #{fStlamountNo},</if>
             <if test="fAskamount != null">f_askamount = #{fAskamount},</if>
             <if test="fStatus != null">f_status = #{fStatus},</if>
@@ -1116,4 +1122,119 @@
             #{fId}
         </foreach>
     </select>
+    <select id="selectTWarehousebillsfeesList1" resultType="java.util.Map">
+        SELECT
+        tw.f_id AS fId,
+        tw.f_pid AS fPid,
+        tw.f_lineno AS fLineno,
+        tw.f_corpid AS fCorpid,
+        tw.f_feeid AS fFeeid,
+        tw.f_warehouseid AS fWarehouseid,
+        tw.f_feeUnitid AS fFeeUnitid,
+        tw.f_qty AS fQty,
+        tw.f_unitprice AS fQty,
+        tw.f_amount AS fQty,
+        tw.f_currency AS fQty,
+        tw.f_exrate AS fQty,
+        tw.f_taxrate AS fQty,
+        CASE
+        WHEN tw.f_taxrate = 0 THEN
+        '0.00%'
+        WHEN tw.f_taxrate != 0 THEN
+        CONCAT( tw.f_taxrate, '%' )
+        END AS f_taxratestr,
+        tw.f_dc AS fDc,
+        tw.f_billstatus AS fDillstatus,
+        tw.f_review_date AS fReviewDate,
+        tw.f_statement_no AS fStatementNo,
+        tw.f_accamount AS fAccamount,
+        tw.f_stlamount AS fStlamount,
+        tw.f_accamount_date AS fAccamountDate,
+
+        tw.f_stlamount_no AS fStlamountNo,
+        tw.f_askamount AS fAskamount,
+        tw.f_status AS f_status,
+        tw.f_stlamount_date AS fStlamountDate,
+        tw.del_flag AS delFlag,
+        tw.create_by AS createBy,
+        tw.create_time AS createTime,
+        tw.update_by AS updateBy,
+        tw.update_time AS updateTime,
+        tw.remark AS remark,
+        tw.src_id AS srcId,
+        tw.src_bill_no AS srcBillNo,
+        tw.f_mblno AS fMblno,
+        tw.f_product_name AS fProductName,
+        tw.f_marks AS fMarks,
+        tw.f_chargedate AS fChargedate,
+        tw.f_billing_deadline AS fBillingDeadline,
+        tw.f_inventory_days AS fInventoryDays,
+        tw.f_amt AS fAmt,
+        tw.f_billing_days AS fBillingDays,
+        tw.f_billing_qty AS fBillingQty,
+        tw.f_billtype AS fBilltype,
+        tw.f_billingway AS fBillingway,
+        tw.f_bsdate AS fBsdate,
+        tw.f_originalbilldate AS fOriginalbilldate,
+        tw.f_stltypeid AS fStltypeid,
+        tw.f_business_type AS fBusinessType,
+        tw.f_src_type_id AS fSrcTypeTd,
+        tw.price_date_remarks AS priceDateRemarks,
+        tw.f_address_name AS fAddress_name,
+        tw.f_address AS fAddress,
+        tf.invoice_no AS fInvnos,
+        tf.f_amtdr AS fInvamount,
+        tf.f_accbilldate AS fInvoicingDate
+        FROM
+        t_warehousebillsfees tw
+        LEFT JOIN t_fee tf ON tw.f_invnos = tf.f_billno
+        <where>
+            <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 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="fInvoicingDate != null ">and tw.f_invoicing_date = #{fInvoicingDate}</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="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="fAddress != null">and tw.f_address = #{fAddress}</if>
+            <if test="fAddressName != null  and fAddressName != ''">and tw.f_address_name = #{fAddressName}</if>
+        </where>
+    </select>
 </mapper>

+ 5 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehousebillsitemsMapper.xml

@@ -247,7 +247,10 @@
             item.f_now_carton AS fNowCarton,
             item.f_cartype_id AS fCartypeId,
             item.f_dc AS fDc,
-            item.create_time AS createTime
+            item.create_time AS createTime,
+            tf.f_accbilldate  AS fAccbilldate,
+            tf.invoice_no AS invoiceNo,
+            tf.f_apply_money AS fApplyMoney
         FROM
             t_warehousebills w
             LEFT JOIN t_warehousebillsitems item ON item.f_pid = w.f_id
@@ -258,6 +261,7 @@
             LEFT JOIN t_corps f ON f.f_id = item.f_fleet
             LEFT JOIN sys_dict_data l ON l.dict_value = item.f_lntype
             AND l.dict_type = 'ln_way'
+            Left join t_fee tf on tf.t_mblno = w.f_mblno
         WHERE
             item.f_pid = #{fPid}
     </select>