Browse Source

2022年12月2日17:19:39

纪新园 2 năm trước cách đây
mục cha
commit
436e68ed29

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

@@ -616,7 +616,7 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
                 earlySumDays = 0L;
                 days -= tempDays;
                 // 计算最终金额:数量 * 单价 * 天数
-                BigDecimal calculate = this.getCalculate(qty, tWarehouseAgreementitems.getfPrice(), tempDays);
+                BigDecimal calculate = this.getCalculate(qty, tWarehouseAgreementitems.getfPrice(), tempDays).setScale(2,BigDecimal.ROUND_HALF_UP);
                 money = money.add(calculate);
                 // 组装运费明细记录
                 String details = assemblyBillingDetails(StorageFeeRangeDTO.builder()
@@ -633,7 +633,7 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
                 // 下一个区间的开始时间调整
                 storageFeesDto.setStartTime(DateUtils.dateAdd(storageFeesDto.getStartTime(), tempDays.intValue()));
             } else {
-                BigDecimal calculate = this.getCalculate(qty, tWarehouseAgreementitems.getfPrice(), days);
+                BigDecimal calculate = this.getCalculate(qty, tWarehouseAgreementitems.getfPrice(), days).setScale(2,BigDecimal.ROUND_HALF_UP);
                 money = money.add(calculate);
                 // 计算费用明细
                 String details = assemblyBillingDetails(StorageFeeRangeDTO.builder()

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

@@ -5195,7 +5195,7 @@ public class TWarehouseBillsServiceImpl implements ITWarehouseBillsService {
     public StorageFeeCalculationResultVO getWarehouseItems(TWarehouseBills warehouseBills, List<CalculateStorageFeesInfoVO> feesInfoVOList, LoginUser loginUser, String cangKey) {
         StorageFeeCalculationResultVO resultVO = new StorageFeeCalculationResultVO();
 
-        BigDecimal sumAmt = BigDecimal.ZERO;
+        BigDecimal sumAmt = new BigDecimal("0.00");
         List<TWarehousebillsfees> itemsList = new ArrayList<>();
         // 获取税率
         List<SysDictData> taxRate = sysDictDataMapper.selectDictDataByType("tax_rate");

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

@@ -949,9 +949,9 @@
 
     <select id="selectQueryMenuList" parameterType="TWarehousebillsfees"
             resultType="com.ruoyi.warehouseBusiness.excel.QueryMenu">
-        SELECT
+        SELECT distinct
         tc.f_name AS corpName,
-        tw.f_mblno AS fMblno,
+        tf.f_mblno AS fMblno,
         IF(tf.f_billtype = 'SJRK' || tf.f_billtype = 'SJCK' || tf.f_billtype = 'CKDB' || tf.f_billtype = 'HQZY' || tf.f_billtype = 'KCZZ',tf.f_bsdate, null) AS fBsdate,
         tf.f_review_date AS fReviewDate,
         te.f_name AS feeName,
@@ -1033,7 +1033,7 @@
     <select id="selectBillDetailsSubItemNew" parameterType="TWarehousebillsfees" resultType="map">
         select
         twf.f_pid as fId,
-        tw.f_mblno as fMblno,
+        twf.f_mblno as fMblno,
         dict.dict_label as fBusinesstype,
         CASE
         WHEN twf.f_billtype = 'SJRK' THEN '入库'