|
@@ -100,20 +100,20 @@ public class BudgetListener extends AnalysisEventListener<Budget> {
|
|
|
String yearMonthStr=date.format(DateTimeFormatter.ofPattern("yyyy-MM"));
|
|
|
String yearMonth= String.valueOf(date.atStartOfDay().toInstant(ZoneOffset.of("+8")).toEpochMilli());
|
|
|
String data=ReflectUtil.invoke(budget, keys[i]);
|
|
|
- if(data!=null&&!data.equals("")&&!data.equals("0")){
|
|
|
+ if(data!=null&&!data.equals("")){
|
|
|
System.out.println("月份:"+i+"科目编码:"+budget.getKmbm()+"数据值:"+data);
|
|
|
totalYs= NumberUtil.add(totalYs,data.replaceAll(",","")).toString();
|
|
|
saveYearAndKmbmAndMonth(data,budget.getKmbm(),yearMonth,yearMonthStr,kmdl,kmmc);
|
|
|
}
|
|
|
}
|
|
|
totalYearYs= NumberUtil.add(totalYearYs,totalYs).toString();
|
|
|
- if(!totalYs.equals("0")){
|
|
|
+// if(!totalYs.equals("0")){
|
|
|
saveYearAndKmbm(totalYs,budget.getKmbm(),kmdl,kmmc);
|
|
|
- }
|
|
|
+// }
|
|
|
}
|
|
|
- if(!totalYearYs.equals("0")){
|
|
|
+// if(!totalYearYs.equals("0")){
|
|
|
saveYear(totalYearYs);
|
|
|
- }
|
|
|
+// }
|
|
|
System.out.println("存储数据库成功!");
|
|
|
}
|
|
|
|