浏览代码

完善仓储费计算

sunhz 3 年之前
父节点
当前提交
0aac59054e

+ 3 - 2
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/enums/WarehouseTypeEnum.java

@@ -74,6 +74,7 @@ public enum WarehouseTypeEnum {
     SJCK_NO("CK", "出库", "warehouseAbbreviation"),
     CKDB_NO("DB", "调拨", "warehouseAbbreviation"),
     HQZY_NO("HZ", "货转", "warehouseAbbreviation"),
+    HWTG_NO("TG", "通关", "warehouseAbbreviation"),
 
     FYBG_NO("FYBG", "费用变更", "warehouseAbbreviation"),
 
@@ -104,8 +105,8 @@ public enum WarehouseTypeEnum {
 
 
     // 查询库存帐操作
-    CONFIRM_OPERATION("0", "确认入库、出库、货转、调拨", "queryType"),
-    UNDO_OPERATION("1", "撤回入库、出库、货转、调拨", "queryType"),
+    CONFIRM_OPERATION("0", "确认入库、出库、货转、调拨、通关", "queryType"),
+    UNDO_OPERATION("1", "撤回入库、出库、货转、调拨、通关", "queryType"),
 
     // 是否判断箱型
     JUDGE_BOX("1", "判断箱型", "judge"),

+ 3 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/warehouseBusiness/domain/vo/CalculateStorageFeesInfoVO.java

@@ -41,6 +41,9 @@ public class CalculateStorageFeesInfoVO implements Serializable {
     //原始入库日期
     private Date fOriginalbilldate;
 
+    //来源日期
+    private Date fSrcBsdate;
+
     //唛头
     private String fMarks;
 

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

@@ -4546,10 +4546,10 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
 
             long fId = item.getFId();
             // 累计计费天数 如果计费日期与原始入库日期一直代表没有计算过
-            if (Objects.equals(item.getFChargedate().getTime(), item.getFOriginalbilldate().getTime())) {
+            if (Objects.equals(item.getFChargedate().getTime(), item.getFSrcBsdate().getTime())) {
                 storageFeesDto.setEarlySumDays(0L);
             } else {
-                storageFeesDto.setEarlySumDays(DateUtils.getDateDay(item.getFChargedate(), item.getFOriginalbilldate()) - 1);
+                storageFeesDto.setEarlySumDays(DateUtils.getDateDay(item.getFChargedate(), item.getFSrcBsdate()) - 1);
             }
             // 库存天数
             long fInventoryDays;
@@ -4988,7 +4988,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
             storageFeesDto.setfGoodsid(fGoodsid);
             long fId = Long.parseLong(String.valueOf(item.get("fId")));
             // 累计计费天数
-            storageFeesDto.setEarlySumDays(DateUtils.getDateDay((Date) item.get("fChargedate"), (Date) item.get("fOriginalbilldate")) - 1);
+            storageFeesDto.setEarlySumDays(DateUtils.getDateDay((Date) item.get("fChargedate"), (Date) item.get("fSrcBsdate")) - 1);
             // 库存天数
             long fInventoryDays;
             // 要计费天数

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

@@ -57,6 +57,7 @@
         <result property="fBillingway" column="f_billingway"/>
         <result property="fBsdate" column="f_bsdate"/>
         <result property="fChargedate" column="f_chargedate"/>
+        <result property="fSrcBsdate" column="f_src_bsdate"/>
         <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="fMblno" column="f_mblno"/>
         <result property="fVolumn" column="f_volumn"/>
@@ -627,6 +628,7 @@
             wh.f_billingway,
             wh.f_mblno,
             wh.f_chargedate,
+            wh.f_originalbilldate AS f_src_bsdate,
             wh.f_originalbilldate,
             wh.f_marks,
             wh.f_cntrno,

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

@@ -90,6 +90,7 @@
         <result property="fBsdate" column="f_bsdate"/>
         <result property="fBillingway" column="f_billingway"/>
         <result property="fChargedate" column="f_chargedate"/>
+        <result property="fSrcBsdate" column="f_src_bsdate"/>
         <result property="fOriginalbilldate" column="f_originalbilldate"/>
         <result property="fMblno" column="f_mblno"/>
         <result property="fVolumn" column="f_volumn"/>
@@ -565,6 +566,7 @@
             item.f_bsdate,
             item.f_billingway,
             item.f_chargedate,
+            item.f_src_bsdate,
             item.f_originalbilldate,
             item.f_mblno,
             item.f_volumn,