[BUG] FMS:新建账套不进行级联初始化基础资料——科目为空、建科目恒 NPE 500、三大报表恒空表
作者: dadiyang创建于 2026年9月23日更新于 2026年9月23日
- Symptom 1 (function missing): The account set creation interface code=0 is successful, and the server log has 0 abnormal stacks (an empty log is evidence); the DB check is qualitative: the new account set has 0 rows in the fms_subject table, 38 rows in the fms_subject_template table, and 0 rows in the fms_finance_parameter table;
- Symptom 2 (constant NPE): The server log (determinant):
2026-09-20 11:06:06.560 [http-nio-18080-exec-4] ERROR GlobalExceptionHandler:342 - [defaultExceptionHandler]
java.lang.NullPointerException: Cannot invoke "cn.iocoder.yudao.module.fms.dal.dataobject.config.FmsFinanceParameterDO.getSubjectCodeRule()" because "<parameter4>" is null
at cn.iocoder.yudao.module.fms.service.config.FmsSubjectServiceImpl.validateSubjectCodeRule(FmsSubjectServiceImpl.java:843) (called by createSubject:171)The only variable that differs between the crash and non-crash is whether the account set financial parameters row exists (0 rows in the new account set / 1 row in the old account set, DB check);
- Symptom 3 (reporting is empty): There is no runtime error (the query returns an empty list normally); the DB check is that the results table of the three major reports is 0 rows, and the report template table
内容来源: YunaiV/ruoyi-vue-pro