Ver código fonte

2022年12月2日13:41:07

纪新园 2 anos atrás
pai
commit
96335ef509

+ 2 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/vo/FeeVO.java

@@ -60,6 +60,8 @@ public class FeeVO extends TFee {
 
     private String reviewDate;
 
+    private String bstime;
+
     // 对账金额
     private BigDecimal fAccamount;
 

+ 3 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -730,6 +730,9 @@ public class TFeeServiceImpl implements ITFeeService {
         }
         List<FeeVO> list = tFeeMapper.selectFinancialLedgerList(tWareHouseFees);
         for (int i = 0; i < list.size(); i++) {
+            if(tWareHouseFees.getSwitchSection() == 0){
+                list.get(i).setReviewDate(list.get(i).getBstime());
+            }
             FeeDTO feeDTO = new FeeDTO();
             feeDTO.setFDc(tWareHouseFees.getfDc());
             feeDTO.setFCorpId(list.get(i).getfCorpid());

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

@@ -671,15 +671,15 @@ public class TWarehouseAgreementServiceImpl implements ITWarehouseAgreementServi
         BigDecimal fQty = new BigDecimal("0");
         BigDecimal divisor = new BigDecimal("1000");
         if (unit.equals(Long.parseLong(WarehouseTypeEnum.BOX_NUM.getType()))) {
-            return storageFeesDto.getfQty().setScale(2, RoundingMode.HALF_UP);
+            return storageFeesDto.getfQty().setScale(6, RoundingMode.HALF_UP);
         } else if (unit.equals(Long.parseLong(WarehouseTypeEnum.GROSS_WEIGHT.getType()))) {
             fQty = storageFeesDto.getfGrossweight();
             // 结果值除以1000 保留两位
-            return fQty.divide(divisor, 2, RoundingMode.HALF_UP);
+            return fQty.divide(divisor, 6, RoundingMode.HALF_UP);
         } else if (unit.equals(Long.parseLong(WarehouseTypeEnum.NET_WEIGHT.getType()))) {
             fQty = storageFeesDto.getfNetweight();
             // 结果值除以1000 保留两位
-            return fQty.divide(divisor, 2, RoundingMode.HALF_UP);
+            return fQty.divide(divisor, 6, RoundingMode.HALF_UP);
         } else if (unit.equals(Long.parseLong(WarehouseTypeEnum.MEASURE.getType()))) {
             fQty = storageFeesDto.getfVolumn();
         } else if (unit.equals(Long.parseLong(WarehouseTypeEnum.FIXED.getType()))) {

+ 8 - 7
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -106,6 +106,7 @@
         <result property="fMarks" column="f_marks"/>
         <result property="fProductName" column="f_product_name"/>
         <result property="fReviewDate" column="f_review_date"/>
+        <result property="fBstime" column="f_bstime"/>
         <result property="fAccamount" column="f_accamount"/>
         <result property="fInvamount" column="f_invamount"/>
     </resultMap>
@@ -2001,7 +2002,7 @@
             c.f_name AS fName,
                c.f_id AS fCorpid,
             DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,
-            DATE_FORMAT(t.f_bstime,'%Y-%m') AS f_bstime,
+            DATE_FORMAT(w.f_bsdate,'%Y-%m') AS f_bstime,
             sum( CASE f_dc WHEN 'D' THEN f_amount ELSE 0 END ) fAmount,
             sum( CASE f_dc WHEN 'C' THEN f_amount ELSE 0 END ) fStlamount,
             sum( CASE f_dc WHEN 'D' THEN f_amount ELSE 0 END ) - sum( CASE f_dc WHEN 'C' THEN f_amount ELSE 0 END ) nnfinished
@@ -2027,7 +2028,7 @@
                 and DATE_FORMAT(w.f_review_date, '%Y-%m') between #{timeExamine[0]} and #{timeExamine[1]}
             </if>
             <if test="fBstimeExamine != null and fBstimeExamine[0] != null and fBstimeExamine[0]!= ''">
-                and DATE_FORMAT(t.f_bstime, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
+                and DATE_FORMAT(w.f_bsdate, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
             </if>
             <if test='fReconciliation!= null and fReconciliation != "" and fReconciliation == "0" '>
                 and ifnull(w.f_amount, 0) - ifnull(w.f_stlamount, 0) != 0
@@ -2838,7 +2839,7 @@
 
     <select id="selectFinancialLedgerList" resultMap="feeVOResult">
         SELECT
-            c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus, DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,DATE_FORMAT(t.f_bstime,'%Y-%m') AS f_bstime,
+            c.f_name AS f_fees_name, w.f_corpid, w.f_mblno, w.f_billstatus, DATE_FORMAT(w.f_review_date,'%Y-%m') AS reviewDate,DATE_FORMAT(w.f_bsdate,'%Y-%m') AS bstime,
             SUM( w.f_amount ) AS f_amount, SUM( w.f_stlamount ) AS f_stlamount,SUM( w.f_accamount ) AS f_accamount,SUM( w.f_invamount ) AS f_invamount,
             ifnull( SUM( w.f_amount ), 0 ) - ifnull( SUM( w.f_stlamount ), 0 ) AS nnfinished
         FROM
@@ -2870,7 +2871,7 @@
                 and DATE_FORMAT(w.f_review_date, '%Y-%m') between #{timeExamine[0]} and #{timeExamine[1]}
             </if>
             <if test="fBstimeExamine != null and fBstimeExamine[0] != null and fBstimeExamine[0]!= ''">
-                and DATE_FORMAT(t.f_bstime, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
+                and DATE_FORMAT(w.f_bsdate, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
             </if>
             ${params.dataScope}
         </where>
@@ -2888,7 +2889,7 @@
             IF ( w.f_feeid != #{feesId}, w.f_amount, 0.00 ) other_fee,
             w.f_amount, w.f_stlamount AS fStlamount,
             ifnull( w.f_amount, 0 ) - ifnull( w.f_stlamount, 0 ) AS nnfinished,
-            t.f_bstime AS fBstime,
+            w.f_bsdate AS fBstime,
             w.f_dc,
             w.f_unitprice AS price,
                w.f_qty AS fQty,
@@ -2911,10 +2912,10 @@
                 and w.f_billstatus = 6
             </if>
             <if test='fAuditList != null and fAuditList[0] != null'>
-                and DATE_FORMAT(w.f_review_date, '%Y-%m') BETWEEN #{fAuditList[0]} and #{fAuditList[1]}
+                and DATE_FORMAT(w.f_bsdate, '%Y-%m') BETWEEN #{fAuditList[0]} and #{fAuditList[1]}
             </if>
             <if test="fBstimeExamine != null and fBstimeExamine[0] != null and fBstimeExamine[0]!= ''">
-                and DATE_FORMAT(t.f_bstime, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
+                and DATE_FORMAT(w.f_review_date, '%Y-%m') between #{fBstimeExamine[0]} and #{fBstimeExamine[1]}
             </if>
         GROUP BY
         w.f_id