Selaa lähdekoodia

2023年1月11日17:02:39

纪新园 2 vuotta sitten
vanhempi
commit
506924e637

+ 19 - 14
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -780,16 +780,17 @@ public class TFeeServiceImpl implements ITFeeService {
         List<Map<String, Object>> mapList = tFeeMapper.warehouseBillsFeesCustomProfitList(tWareHouseFees);
         List<Map<String, Object>> mapList = tFeeMapper.warehouseBillsFeesCustomProfitList(tWareHouseFees);
         for (Map<String, Object> map : mapList) {
         for (Map<String, Object> map : mapList) {
             FeeDTO feeDTO = new FeeDTO();
             FeeDTO feeDTO = new FeeDTO();
-            feeDTO.setFToCorpid(Long.parseLong(map.get("fCorpid").toString()));
             BigDecimal amount = new BigDecimal("0.00");
             BigDecimal amount = new BigDecimal("0.00");
             BigDecimal stlamount = new BigDecimal("0.00");
             BigDecimal stlamount = new BigDecimal("0.00");
-//            if (tWareHouseFees.getSwitchSection() == 0) {
-            if (ObjectUtils.isNotNull(map.get("f_bstime"))) {
-                List<String> list1 = new ArrayList<>();
-                list1.add(map.get("f_bstime").toString());
-                list1.add(map.get("f_bstime").toString());
-                feeDTO.setFAuditList(list1);
-            }
+            if (ObjectUtils.isNotNull(map.get("fCorpid"))) {
+                feeDTO.setFToCorpid(Long.parseLong(map.get("fCorpid").toString()));
+                //            if (tWareHouseFees.getSwitchSection() == 0) {
+                if (ObjectUtils.isNotNull(map.get("f_bstime"))) {
+                    List<String> list1 = new ArrayList<>();
+                    list1.add(map.get("f_bstime").toString());
+                    list1.add(map.get("f_bstime").toString());
+                    feeDTO.setFAuditList(list1);
+                }
            /* } else {
            /* } else {
                 if (ObjectUtils.isNotNull(map.get("f_bstime"))) {
                 if (ObjectUtils.isNotNull(map.get("f_bstime"))) {
                     List<String> list1 = new ArrayList<>();
                     List<String> list1 = new ArrayList<>();
@@ -798,13 +799,17 @@ public class TFeeServiceImpl implements ITFeeService {
                     feeDTO.setFBstimeExamine(list1);
                     feeDTO.setFBstimeExamine(list1);
                 }
                 }
             }*/
             }*/
-            List<FeeVO> feeVOList = tFeeMapper.selectFinancialLedgerDetails(feeDTO);
-            for (FeeVO feeVO : feeVOList) {
-                if ("D".equals(feeVO.getfDc())) {
-                    amount = amount.add(feeVO.getFAmount());
-                } else {
-                    stlamount = stlamount.add(feeVO.getFAmount());
+                List<FeeVO> feeVOList = tFeeMapper.selectFinancialLedgerDetails(feeDTO);
+                for (FeeVO feeVO : feeVOList) {
+                    if ("D".equals(feeVO.getfDc())) {
+                        amount = amount.add(feeVO.getFAmount());
+                    } else {
+                        stlamount = stlamount.add(feeVO.getFAmount());
+                    }
                 }
                 }
+            } else {
+                amount = amount.add(new BigDecimal(map.get("fAmount").toString()));
+                stlamount = stlamount.add(new BigDecimal(map.get("fStlamount").toString()));
             }
             }
             map.put("fAmount", amount);
             map.put("fAmount", amount);
             map.put("fStlamount", stlamount);
             map.put("fStlamount", stlamount);