Browse Source

修改计算仓储费问题

zouzhuo 3 years ago
parent
commit
d770a905dd

+ 14 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/TWarehouseAgreement.java

@@ -137,6 +137,20 @@ public class TWarehouseAgreement extends BaseEntity {
     @Excel(name = "类型名称")
     private String fBilltypeName;
 
+    /**
+     * 仓库
+     */
+    @Excel(name = "仓库")
+    private String fWarehouseid;
+
+    public String getfWarehouseid() {
+        return fWarehouseid;
+    }
+
+    public void setfWarehouseid(String fWarehouseid) {
+        this.fWarehouseid = fWarehouseid;
+    }
+
     public String getfBilltypeName() {
         return fBilltypeName;
     }

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

@@ -76,7 +76,9 @@ public interface TWarehouseAgreementitemsMapper {
      */
     List<TWarehouseAgreementitems> getItemsBytWarehouseAgreementMsg(@Param("fCorpid") Long fCorpid,
                                                                     @Param("fGoodsid") String fGoodsid,
-                                                                    @Param("feeUnitid") Long feeUnitid);
+                                                                    @Param("feeUnitid") Long feeUnitid,
+                                                                    @Param("cangKuZhi") String cangKuZhi,
+                                                                    @Param("cangKey") String cangKey);
 
     /**
      *  根据主表id 更新主表对应状态

+ 10 - 6
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseAgreementServiceImpl.java

@@ -138,7 +138,7 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
             }
         }
         map.put("corps", corpsList);
-       // map.put("goodsList", goodsList);
+        // map.put("goodsList", goodsList);
         map.put("feesList", feesList);
         map.put("tWarehouseAgreementitems", tWarehouseAgreementitemss);
         map.put("dept", sysDeptMapper.selectDeptById(tWarehouseAgreement.getfDeptid()));
@@ -440,7 +440,9 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
      * @param feeUnitid    计价单位
      * @param itemNums     数量
      * @param earlySumDays 已经计算过仓储费的天数(假设传参80,则阶梯计价时按照80往后的计算)  21.01.14 曹志刚要求新增
-     * @return
+     * @param cangKey      是否需要校验仓库
+     * @param warehouseId  仓库id
+     * @return  结果
      * @author shanxin
      */
     public Map<String, Object> getCarryingCost(Long fCorpid,
@@ -448,19 +450,21 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
                                                Long days,
                                                Long feeUnitid,
                                                BigDecimal itemNums,
-                                               Long earlySumDays) {
+                                               Long earlySumDays,
+                                               String cangKey,
+                                               String warehouseId) {
         Map<String, Object> map = new HashMap<>();
         if (null == fCorpid ||
                 null == fGoodsid ||
                 null == days ||
                 null == feeUnitid ||
                 null == itemNums ||
-                null == earlySumDays) {
+                null == earlySumDays ||
+                null == cangKey) {
             return null;
         }
         List<TWarehouseAgreementitems> itemList =
-                this.tWarehouseAgreementitemsMapper.getItemsBytWarehouseAgreementMsg(fCorpid, fGoodsid, feeUnitid);
-
+                this.tWarehouseAgreementitemsMapper.getItemsBytWarehouseAgreementMsg(fCorpid, fGoodsid, feeUnitid, warehouseId, cangKey);
         if (CollUtil.isEmpty(itemList)) {
             return null;
         }

+ 45 - 27
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/service/impl/TWarehouseBillsServiceImpl.java

@@ -16,7 +16,10 @@ import com.ruoyi.basicData.mapper.*;
 import com.ruoyi.basicData.service.impl.TWarehouseServiceImpl;
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.entity.*;
+import com.ruoyi.common.core.domain.entity.SysDept;
+import com.ruoyi.common.core.domain.entity.SysDictData;
+import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.core.domain.entity.TWarehouse;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
@@ -29,13 +32,15 @@ import com.ruoyi.reportManagement.domain.TWareHouseItemsExcel;
 import com.ruoyi.reportManagement.domain.TWhgenleg;
 import com.ruoyi.reportManagement.mapper.TWhgenlegMapper;
 import com.ruoyi.shipping.domain.*;
-import com.ruoyi.shipping.excel.TWarehousebillsCntritemsExcel;
 import com.ruoyi.shipping.excel.DeriveInventoryExcel;
 import com.ruoyi.shipping.excel.SingleVoyageByShipExcel;
+import com.ruoyi.shipping.excel.TWarehousebillsCntritemsExcel;
 import com.ruoyi.shipping.mapper.*;
 import com.ruoyi.system.domain.SysCheckCode;
 import com.ruoyi.system.domain.SysConfig;
 import com.ruoyi.system.mapper.*;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.system.service.impl.SysConfigServiceImpl;
 import com.ruoyi.warehouseBusiness.domain.*;
 import com.ruoyi.warehouseBusiness.excel.*;
 import com.ruoyi.warehouseBusiness.mapper.*;
@@ -122,6 +127,12 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     private SysDictDataMapper sysDictDataMapper;
 
     @Autowired
+    private ISysConfigService sysConfigService;
+
+    @Autowired
+    private SysConfigServiceImpl sysConfigServiceImpl;
+
+    @Autowired
     private AuditItemsServiceImpl auditItemsService;
 
     @Autowired
@@ -233,9 +244,9 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 warehouseList.add(tWarehouse);
             }
             //查询业务员
-            if (tWarehousebills.getfSalesmanId() != null){
+            if (tWarehousebills.getfSalesmanId() != null) {
                 SysUser user = sysUserMapper.selectUserById(tWarehousebills.getfSalesmanId());
-                map.put("fSalesman",user);
+                map.put("fSalesman", user);
             }
             // 查询经营单位
             corpsId.add(tWarehousebills.getfSbu());
@@ -1981,8 +1992,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                             TCntrno tCntrno = tCntrnoMapper.selectTCnTrNoByfNo(cell.getStringCellValue());
                             if (tCntrno == null) {
                                 tCnTrNoList.add(cell.getStringCellValue());
-                            }else {
-                                if (tCntrno.getfTypeid() != null && tCntrno.getfTypeid() != tWarehousebillsCntr.getfCntrid()){
+                            } else {
+                                if (tCntrno.getfTypeid() != null && tCntrno.getfTypeid() != tWarehousebillsCntr.getfCntrid()) {
                                     List.add(cell.getStringCellValue());
                                 }
                             }
@@ -3946,9 +3957,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      * @param warehouseBills
      * @param mapItem
      * @param loginUser
+     * @param cangKey
      * @return
      */
-    public Map<String, Object> getWarehouseItems(TWarehouseBills warehouseBills, List<Map<String, Object>> mapItem, LoginUser loginUser) {
+    public Map<String, Object> getWarehouseItems(TWarehouseBills warehouseBills, List<Map<String, Object>> mapItem, LoginUser loginUser, String cangKey) {
         Map<String, Object> map = new HashMap<>();
         long feeId = 0L;
         BigDecimal sumAmt = new BigDecimal(0);
@@ -3962,6 +3974,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             Date fBsdate = (Date) item.get("fBsdate");
             long fCorpid = warehouseBills.getfCorpid();
             String fBilltype = (String) item.get("fBilltype");
+            String warehouseId = item.get("warehouse").toString();
             String fGoodsid = (String) item.get("fTypeid");
             if (StringUtils.isNotEmpty(fGoodsid)) {
                 fGoodsid = "\"" + fGoodsid + "\"";
@@ -3992,8 +4005,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return AjaxResult.error("单号:" + item.get("fBillno") + ",业务日期:" + item.get("fBsdate") + "未找到计费单位,请确认");
             }
-            // 计算仓储费明细
-            Map<String, Object> objectMap = tWarehouseAgreementService.getCarryingCost(fCorpid, fGoodsid, fBillingDays, dictLabel, fQty, accumulatedDays);
+            // 仓储费协议计算
+            Map<String, Object> objectMap = tWarehouseAgreementService.getCarryingCost(fCorpid, fGoodsid, fBillingDays, dictLabel, fQty, accumulatedDays, cangKey, warehouseId);
             if (StringUtils.isNull(objectMap)) {
                 map.put("error", "单号:" + item.get("fBillno") + ",业务日期:" + item.get("fBsdate") + "未找到仓储费协议,请确认");
                 return map;
@@ -4059,7 +4072,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
      * @param loginUser
      * @return
      */
-    public Map<String, Object> getWarehouseItemsList(TWarehouseBills warehouseBills, List<Map<String, Object>> mapItem, LoginUser loginUser) {
+    public Map<String, Object> getWarehouseItemsList(TWarehouseBills warehouseBills, List<Map<String, Object>> mapItem, LoginUser loginUser, String warehouse) {
         Map<String, Object> map = new HashMap<>();
         long feeId = 0L;
         BigDecimal sumAmt = new BigDecimal(0);
@@ -4074,6 +4087,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             long fCorpid = warehouseBills.getfCorpid();
             String fBilltype = (String) item.get("fBilltype");
             String fGoodsid = (String) item.get("fTypeid");
+            String warehouseId = (String) item.get("warehouse");
             if (StringUtils.isNotEmpty(fGoodsid)) {
                 fGoodsid = "\"" + fGoodsid + "\"";
             }
@@ -4104,7 +4118,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 return AjaxResult.error("单号:" + item.get("fBillno") + ",业务日期:" + item.get("fBsdate") + "未找到计费单位,请确认");
             }
             // 计算仓储费明细
-            Map<String, Object> objectMap = tWarehouseAgreementService.getCarryingCost(fCorpid, fGoodsid, fBillingDays, dictLabel, fQty, accumulatedDays);
+            Map<String, Object> objectMap = tWarehouseAgreementService.getCarryingCost(fCorpid, fGoodsid, fBillingDays, dictLabel, fQty, accumulatedDays, warehouse, warehouseId);
             if (StringUtils.isNull(objectMap)) {
                 map.put("error", "单号:" + item.get("fBillno") + ",业务日期:" + item.get("fBsdate") + "未找到仓储费协议,请确认");
                 return map;
@@ -4207,6 +4221,8 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         List<TWarehousebillsfees> itemsList = new ArrayList<>();
         BigDecimal bigDecimal = new BigDecimal(0);
         Map<String, Object> map = new HashMap<>();
+        //调一次公共方法,获取字符类型的true或者false传
+        String cangKey = sysConfigServiceImpl.selectConfigByKey("agreement.warehouse");
         // 库存总账id
         long whgenlegFeeId = 0;
         // 计费单位
@@ -4214,7 +4230,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         // 查询 出库 货转的库存明细
         List<Map<String, Object>> warehousebillsitemsList = tWarehousebillsitemsMapper.selectStorageFeeItemList(tWarehouseBills);
         if (warehousebillsitemsList.size() != 0) {
-            Map<String, Object> mapItem = getWarehouseItems(tWarehouseBills, warehousebillsitemsList, loginUser);
+            Map<String, Object> mapItem = getWarehouseItems(tWarehouseBills, warehousebillsitemsList, loginUser, cangKey);
             if (mapItem.containsKey("error")) {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return AjaxResult.error((String) mapItem.get("error"));
@@ -4223,7 +4239,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         }
         List<Map<String, Object>> tWhgenlegs = tWhgenlegMapper.selectStorageFeeItemList(tWarehouseBills);
         if (tWhgenlegs.size() != 0) {
-            Map<String, Object> mapItem = getWarehouseItems(tWarehouseBills, tWhgenlegs, loginUser);
+            Map<String, Object> mapItem = getWarehouseItems(tWarehouseBills, tWhgenlegs, loginUser, cangKey);
             if (mapItem.containsKey("error")) {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                 return AjaxResult.error((String) mapItem.get("error"));
@@ -4292,8 +4308,9 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             long feeUnitid = 1;
             // 查询 出库 货转的库存明细
             List<Map<String, Object>> warehousebillsitemsList = tWarehousebillsitemsMapper.selectStorageFeeItemList(tWarehouseBills);
+            String cangKey = sysConfigServiceImpl.selectConfigByKey("agreement.warehouse");
             if (warehousebillsitemsList.size() != 0) {
-                Map<String, Object> mapItem = getWarehouseItemsList(tWarehouseBills, warehousebillsitemsList, loginUser);
+                Map<String, Object> mapItem = getWarehouseItemsList(tWarehouseBills, warehousebillsitemsList, loginUser, cangKey);
                 if (mapItem.containsKey("error")) {
                     TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                     return AjaxResult.error((String) mapItem.get("error"));
@@ -6248,13 +6265,13 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         TWarehouseBills bills = new TWarehouseBills();
         bills.setfBillno(fOriginalbillno);
         List<TWarehouseBills> tWarehouseBillsList = tWarehouseBillsMapper.webVersionOrderList(bills);
-        if (CollectionUtils.isEmpty(tWarehouseBillsList)){
+        if (CollectionUtils.isEmpty(tWarehouseBillsList)) {
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             return AjaxResult.error("未查到原单信息");
         }
         TWarehouseBills selectOne = tWarehouseBillsList.get(0);
         TWarehousebillsCntr Cntr = tWarehousebillsCntrMapper.selectTWarehousebillsCntrByPId(selectOne.getfId());
-        if(tWarehousebillsCntritemsList.size() >=Cntr.getfCntrcount() ){
+        if (tWarehousebillsCntritemsList.size() >= Cntr.getfCntrcount()) {
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             return AjaxResult.error("分单箱量不能超出原单数量");
         }
@@ -6301,7 +6318,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             }
             //保存新单费用信息 修改原单费用信息
             List<TWarehousebillsfees> tWarehousebillsfeesList = tWarehousebillsfeesMapper.selectWarehousebillsfeesByPId(selectOne.getfId());
-            if (CollectionUtils.isNotEmpty(tWarehousebillsfeesList)){
+            if (CollectionUtils.isNotEmpty(tWarehousebillsfeesList)) {
                 //保存新单费用
                 for (TWarehousebillsfees tWarehousebillsfees : tWarehousebillsfeesList) {
                     tWarehousebillsfees.setfPid(warehouseBills.getfId());
@@ -6314,7 +6331,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 }
             }
             List<TWarehousebillsfees> WarehousebillsfeesList = tWarehousebillsfeesMapper.selectWarehousebillsfeesByPId(selectOne.getfId());
-            if (CollectionUtils.isNotEmpty(WarehousebillsfeesList)){
+            if (CollectionUtils.isNotEmpty(WarehousebillsfeesList)) {
                 //修改原单费用
                 for (TWarehousebillsfees tWarehousebillsfees : WarehousebillsfeesList) {
                     tWarehousebillsfees.setUpdateBy(SecurityUtils.getUsername());
@@ -6358,7 +6375,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             int i = tWarehousebillsfeesMapper.deleteByFPid(warehouseBills.getfId());
             //保存新单费用信息 修改原单费用信息
             List<TWarehousebillsfees> tWarehousebillsfeesList = tWarehousebillsfeesMapper.selectWarehousebillsfeesByPId(selectOne.getfId());
-            if (CollectionUtils.isNotEmpty(tWarehousebillsfeesList)){
+            if (CollectionUtils.isNotEmpty(tWarehousebillsfeesList)) {
                 //保存新单费用
                 for (TWarehousebillsfees tWarehousebillsfees : tWarehousebillsfeesList) {
                     tWarehousebillsfees.setfPid(warehouseBills.getfId());
@@ -6371,7 +6388,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
                 }
             }
             List<TWarehousebillsfees> WarehousebillsfeesList = tWarehousebillsfeesMapper.selectWarehousebillsfeesByPId(selectOne.getfId());
-            if (CollectionUtils.isNotEmpty(WarehousebillsfeesList)){
+            if (CollectionUtils.isNotEmpty(WarehousebillsfeesList)) {
                 //修改原单费用
                 for (TWarehousebillsfees tWarehousebillsfees : WarehousebillsfeesList) {
                     tWarehousebillsfees.setUpdateBy(SecurityUtils.getUsername());
@@ -6386,30 +6403,31 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
         TWarehousebillsCntr warehousebillsCntr = tWarehousebillsCntrMapper.selectTWarehousebillsCntrByPId(selectOne.getfId());
         warehousebillsCntr.setUpdateBy(SecurityUtils.getUsername());
         warehousebillsCntr.setUpdateTime(new Date());
-        warehousebillsCntr.setfCntrcount(warehousebillsCntr.getfCntrcount()-number);
+        warehousebillsCntr.setfCntrcount(warehousebillsCntr.getfCntrcount() - number);
         tWarehousebillsCntrMapper.updateTWarehousebillsCntr(warehousebillsCntr);
         //修改箱信息
-        if (CollectionUtils.isNotEmpty(tWarehousebillsCntritemsList)){
+        if (CollectionUtils.isNotEmpty(tWarehousebillsCntritemsList)) {
             for (TWarehousebillsCntritems warehousebillsCntritems : tWarehousebillsCntritemsList) {
-                tWarehousebillsCntritemsMapper.deleteTWarehousebillsCntritemOlder(selectOne.getfId(),warehousebillsCntritems.getfCntrno());
+                tWarehousebillsCntritemsMapper.deleteTWarehousebillsCntritemOlder(selectOne.getfId(), warehousebillsCntritems.getfCntrno());
             }
         }
         return AjaxResult.success();
-}
+    }
 
     /**
      * 获取分单提单号
+     *
      * @param fbillNo
      * @return
      */
-    public String getBillNoNew(String fbillNo){
+    public String getBillNoNew(String fbillNo) {
         List<String> strings = Arrays.asList(StringUtils.split("A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z", ","));
         for (String string : strings) {
-            String billno = fbillNo+string;
+            String billno = fbillNo + string;
             TWarehouseBills tWarehouseBills = new TWarehouseBills();
             tWarehouseBills.setfMblno(billno);
             List<Map<String, Object>> maps = tWarehouseBillsMapper.ruoYiVersionOrderList(tWarehouseBills);
-            if (CollectionUtils.isEmpty(maps)){
+            if (CollectionUtils.isEmpty(maps)) {
                 return billno;
             }
         }

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

@@ -458,6 +458,7 @@
             wh.f_qtyblc AS fQty,
             wh.f_grossweightblc AS fGrossweight,
             wh.f_netweightblc AS fNetweight,
+            wh.f_warehouseid AS warehouse,
             "KCZZ" AS fBilltype,
             goods.f_typeid AS fTypeid,
             goods.f_name AS fGoodsids

+ 6 - 1
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehouseAgreementMapper.xml

@@ -30,6 +30,7 @@
         <result property="fDc" column="f_dc"/>
         <result property="fBilltype" column="f_billtype"/>
         <result property="fBilltypeName" column="f_billtype_name"/>
+        <result property="fWarehouseid" column="f_warehouseid"/>
     </resultMap>
 
     <sql id="selectTWarehouseAgreementVo">
@@ -57,7 +58,8 @@
                f_task_type,
                f_dc,
                f_billtype,
-               f_billtype_name
+               f_billtype_name,
+               f_warehouseid
         from t_warehouse_agreement
     </sql>
 
@@ -150,6 +152,7 @@
             <if test="fStltypeid != null">f_stltypeid,</if>
             <if test="fFeetypeid != null">f_feetypeid,</if>
             <if test="tPackages != null">t_packages,</if>
+            <if test="fWarehouseid != null">f_warehouseid,</if>
             <if test="fTrademodeid != null">f_trademodeid,</if>
             <if test="fFreedays != null">f_freedays,</if>
             <if test="fBegindate != null">f_begindate,</if>
@@ -176,6 +179,7 @@
             <if test="fStltypeid != null">#{fStltypeid},</if>
             <if test="fFeetypeid != null">#{fFeetypeid},</if>
             <if test="tPackages != null">#{tPackages},</if>
+            <if test="fWarehouseid != null">#{fWarehouseid},</if>
             <if test="fTrademodeid != null">#{fTrademodeid},</if>
             <if test="fFreedays != null">#{fFreedays},</if>
             <if test="fBegindate != null">#{fBegindate},</if>
@@ -206,6 +210,7 @@
             <if test="fStltypeid != null">f_stltypeid = #{fStltypeid},</if>
             <if test="fFeetypeid != null">f_feetypeid = #{fFeetypeid},</if>
             <if test="tPackages != null">t_packages = #{tPackages},</if>
+            <if test="fWarehouseid != null">f_warehouseid = #{fWarehouseid},</if>
             <if test="fTrademodeid != null">f_trademodeid = #{fTrademodeid},</if>
             <if test="fFreedays != null">f_freedays = #{fFreedays},</if>
             <if test="fBegindate != null">f_begindate = #{fBegindate},</if>

+ 6 - 3
ruoyi-warehouse/src/main/resources/mapper/warehouseBusiness/TWarehouseAgreementitemsMapper.xml

@@ -100,18 +100,21 @@
             items.create_time,
             items.update_by,
             items.update_time,
-            items.remark
+            items.remark,
+            agreement.f_warehouseid
         FROM
             t_warehouse_agreement AS agreement
             LEFT JOIN t_warehouse_agreementitems AS items ON agreement.f_id = items.f_pid
-        WHERE
-            agreement.f_corpid = #{fCorpid}
+        <where>
+            <if test="cangKey == '0'">AND JSON_CONTAINS( agreement.f_warehouseid -> '$[*]', #{cangKuZhi}, '$')</if>
+            AND agreement.f_corpid = #{fCorpid}
             AND JSON_CONTAINS( agreement.t_packages -> '$[*]', #{fGoodsid}, '$')
             AND items.f_feeUnitid = #{feeUnitid}
             AND agreement.f_status = '0'
             AND agreement.del_flag = '0'
             AND agreement.f_feetypeid = '0'
             AND items.del_flag = '0'
+        </where>
         ORDER BY
             items.f_fromdays
     </select>

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

@@ -445,6 +445,7 @@
     <select id="selectStorageFeeItemList" parameterType="com.ruoyi.warehouseBusiness.domain.TWarehouseBills"
             resultType="Map">
         SELECT
+            ware.f_warehouseid AS warehouse,
             item.f_id AS fId,
             item.f_billno AS fBillno,
             item.f_goodsid AS fGoodsid,