report.dart 929 B

123456789101112131415161718192021222324252627282930313233343536
  1. import 'package:fis_jsonrpc/services/report.m.dart';
  2. ///报告缓存状态
  3. class ReportCache {
  4. static ReportCache? _reportCache;
  5. ReportCache._internal();
  6. ///ReportCache全局单例
  7. static ReportCache get instance {
  8. _reportCache ??= ReportCache._internal();
  9. return _reportCache!;
  10. }
  11. ///报告编辑和已完成报告缓存
  12. ///已完成的报告:Key = reportId,Value = json
  13. ///正在编辑中报告: Key = recordId,Value =json
  14. static Map<String, ReportInfoItem> cache = {};
  15. ///报告模板缓存
  16. static Map<String, ReportTemplateDTO> templates = {};
  17. }
  18. ///用于报告单个缓存存储
  19. class ReportInfoItem {
  20. ///报告信息Json存储
  21. String reportInfoJson = '';
  22. ///报告模板Json
  23. String reportTemplateJson = '';
  24. ReportInfoItem(String reportinfoJson, String reportTemplateJson) {
  25. this.reportInfoJson = reportinfoJson;
  26. this.reportTemplateJson = reportTemplateJson;
  27. }
  28. }