Commit aeb1aea9 authored by gaopengxuan's avatar gaopengxuan

现金流量日期去掉‘-’

parent d5d7b1f3
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -38,11 +38,19 @@ public class CashFlowServiceImpl implements CashFlowService { ...@@ -38,11 +38,19 @@ public class CashFlowServiceImpl implements CashFlowService {
StopWatch stopWatch = new StopWatch(); StopWatch stopWatch = new StopWatch();
stopWatch.start(); stopWatch.start();
String period= DateUtils.getYearAndMonthLast(); String period= DateUtils.getYearAndMonthLast();
// String period="2024-09"; //String period="2024-10";
List<String> stringList=fallSlaveMapper.getCodeList().stream().map(v->v.replaceAll("[a-zA-Z]", StringUtils.EMPTY)).collect(Collectors.toList()); List<String> stringList=fallSlaveMapper.getCodeList().stream().map(v->v.replaceAll("[a-zA-Z]", StringUtils.EMPTY)).collect(Collectors.toList());
List<CashFlowModel> cashFlowModels=new ArrayList<>(); List<CashFlowModel> cashFlowModels=new ArrayList<>();
stringList.forEach(v->{ stringList.forEach(v->{
List<CashFlowModel> cashFlowModelList=cashFlowMapper.getCashFlowInfo(period, v); List<CashFlowModel> cashFlowModelList=cashFlowMapper.getCashFlowInfo(period, v);
for (CashFlowModel model : cashFlowModelList) {
String originalMonth = model.getPeriod(); // 获取月份,例如"2024-10"
if (originalMonth != null && originalMonth.contains("-")) {
// 替换 "-" 为 "",得到 "202410"
String formattedMonth = originalMonth.replace("-", "");
model.setPeriod(formattedMonth); // 设置转换后的月份
}
}
cashFlowModels.addAll(cashFlowModelList); cashFlowModels.addAll(cashFlowModelList);
}); });
if (!CollectionUtils.isEmpty(cashFlowModels)){ if (!CollectionUtils.isEmpty(cashFlowModels)){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment