数据结构

12132

表总览

通用表

业务表

_app_account

  • 帐套表
  1. CREATE TABLE `_app_account` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `appaId` varchar(255) DEFAULT NULL COMMENT '帐套ID; 可以用缩写 或者 中文名; 不可修改',
  4. `appaName` varchar(255) DEFAULT NULL COMMENT '帐套名称;',
  5. `appaStatus` varchar(255) DEFAULT NULL COMMENT '账套状态; 账套启用,账套停用',
  6. `appaType` varchar(255) DEFAULT '普通账套' COMMENT '账套类型; 模版账套、null',
  7. `periodIdStart` varchar(255) DEFAULT NULL COMMENT '账套启用年月;',
  8. `periodIdEnd` varchar(255) DEFAULT NULL COMMENT '账套结束年月; 审计专用',
  9. `appaStandard` varchar(255) DEFAULT NULL COMMENT '会计准则;',
  10. `appaIndustry` varchar(255) DEFAULT NULL COMMENT '所属行业;',
  11. `appaVATType` varchar(255) DEFAULT NULL COMMENT '增值税种类; 备用',
  12. `appaManagerId` varchar(255) DEFAULT NULL COMMENT '账套负责人ID',
  13. `appaManagerName` varchar(255) DEFAULT NULL COMMENT '账套负责人名称',
  14. `appaMemberIdList` varchar(255) DEFAULT NULL COMMENT '账套成员IDs',
  15. `appaMemberList` text COMMENT '账套成员名称',
  16. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  17. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  18. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  19. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  20. PRIMARY KEY (`id`) USING BTREE,
  21. UNIQUE KEY `appaId_unique` (`appaId`) USING BTREE,
  22. UNIQUE KEY `appaName_unique` (`appaName`) USING BTREE
  23. ) ENGINE = InnoDB AUTO_INCREMENT = 3 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '帐套表'

_ui

  • ui 施工方案
  1. CREATE TABLE `_ui` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
  4. `uiActionType` varchar(255) DEFAULT NULL COMMENT 'ui 动作类型,如:fetchData, postData, changeUi',
  5. `uiActionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
  6. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  7. `uiActionConfig` text COMMENT 'ui 动作数据',
  8. `appDataSchema` text COMMENT 'ui 校验数据',
  9. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  10. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  11. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  12. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  13. PRIMARY KEY (`id`)
  14. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = 'ui 施工方案'

audit_project

  • 审计-项目列表
  1. CREATE TABLE `audit_project` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `isTemplate` varchar(255) DEFAULT '否' COMMENT '是否是审计模板',
  4. `auditProjectId` varchar(255) DEFAULT NULL COMMENT '审计项目; 公司名-202306',
  5. `auditProjectIdOfTemplate` varchar(255) DEFAULT NULL COMMENT '使用的审计模板; auditProjectId',
  6. `auditProjectType` varchar(255) DEFAULT NULL COMMENT '审计项目类型; 财务审计、税务审计、资产评估',
  7. `auditStatus` varchar(255) DEFAULT '审计中' COMMENT '审计状态; 审计中、审定完',
  8. `auditManagerId` varchar(255) DEFAULT NULL COMMENT '项目负责人, 审计经理 userId',
  9. `auditManagerName` varchar(255) DEFAULT NULL COMMENT '项目负责人, 审计经理',
  10. `auditMemberIdList` varchar(512) DEFAULT NULL COMMENT '项目成员Id列表; 用“,”拼接 userId',
  11. `auditMemberList` text COMMENT '项目成员信息列表; [{ auditMemberId, auditMemberName }, {}]',
  12. `auditContent` text COMMENT '审计分工内容; {} ',
  13. `customer` varchar(255) DEFAULT NULL COMMENT '客户',
  14. `projectDescription` varchar(255) DEFAULT NULL COMMENT '项目描述',
  15. `auditPeriodStartDate` varchar(255) DEFAULT NULL COMMENT '审计期间-开始日期',
  16. `auditPeriodEndDate` varchar(255) DEFAULT NULL COMMENT '审计期间-结束日期',
  17. `reviewStep` varchar(255) DEFAULT NULL COMMENT '复合阶段; null 复合1、复合2、复合3',
  18. `reviewUserId1` varchar(255) DEFAULT NULL COMMENT '项目审核人 userId 1',
  19. `reviewUserId2` varchar(255) DEFAULT NULL COMMENT '项目审核人 userId 2',
  20. `reviewUserId3` varchar(255) DEFAULT NULL COMMENT '项目审核人 userId 3',
  21. `reviewUsername1` varchar(255) DEFAULT NULL COMMENT '项目审核人 username1 ',
  22. `reviewUsername2` varchar(255) DEFAULT NULL COMMENT '项目审核人 username2',
  23. `reviewUsername3` varchar(255) DEFAULT NULL COMMENT '项目审核人 username3',
  24. `auditSymbol` varchar(255) DEFAULT NULL COMMENT '审计文号',
  25. `remark` text COMMENT '备注;',
  26. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  27. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  28. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  29. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  30. PRIMARY KEY (`id`) USING BTREE,
  31. UNIQUE KEY `auditProjectId_unique` (`auditProjectId`) USING BTREE
  32. ) ENGINE = InnoDB AUTO_INCREMENT = 632 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '审计-项目列表'

audit_review

  • 审计-项目复核
  1. CREATE TABLE `audit_review` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `auditProjectId` varchar(255) DEFAULT NULL COMMENT '审计项目',
  4. `fileName` varchar(255) DEFAULT NULL COMMENT '文件名',
  5. `relativePath` varchar(512) DEFAULT NULL COMMENT '相对路径',
  6. `reviewContent1` text COMMENT '复核意见1',
  7. `reviewContent2` text COMMENT '复核意见2',
  8. `reviewContent3` text COMMENT '复核意见3',
  9. `reviewComment1` text COMMENT '复核意见1',
  10. `reviewComment2` text COMMENT '复核意见2',
  11. `reviewComment3` text COMMENT '复核意见3',
  12. `reviewResponse1` text COMMENT '复核内容1',
  13. `reviewResponse2` text COMMENT '复核内容2',
  14. `reviewResponse3` text COMMENT '复核内容3',
  15. `reviewResult1` varchar(255) DEFAULT NULL COMMENT '复核结果1;复核中、复核完成',
  16. `reviewResult2` varchar(255) DEFAULT NULL COMMENT '复核结果2;复核中、复核完成',
  17. `reviewResult3` varchar(255) DEFAULT NULL COMMENT '复核结果3;复核中、复核完成',
  18. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  19. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  20. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  21. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  22. PRIMARY KEY (`id`) USING BTREE,
  23. UNIQUE KEY `auditProjectId_unique` (`auditProjectId`, `relativePath`) USING BTREE
  24. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '审计-项目复核'

业务视图

_view02_user_app

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`localhost` SQL SECURITY DEFINER VIEW `_view02_user_app` AS
  2. select
  3. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`id` AS `id`,
  4. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`userId` AS `userId`,
  5. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` AS `appId`
  6. from
  7. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`
  8. where
  9. (
  10. `jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` = 'jianghu-audit'
  11. )

view01_audit_project

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_audit_project` AS
  2. select
  3. `ap`.`id` AS `id`,
  4. `ap`.`isTemplate` AS `isTemplate`,
  5. `appa`.`appaId` AS `financeAppaId`,
  6. `ap`.`auditProjectId` AS `auditProjectId`,
  7. `ap`.`auditProjectType` AS `auditProjectType`,
  8. `ap`.`auditStatus` AS `auditStatus`,
  9. `ap`.`auditManagerId` AS `auditManagerId`,
  10. `ap`.`auditManagerName` AS `auditManagerName`,
  11. `ap`.`auditMemberIdList` AS `auditMemberIdList`,
  12. `ap`.`auditMemberList` AS `auditMemberList`,
  13. `ap`.`auditContent` AS `auditContent`,
  14. `ap`.`remark` AS `remark`,
  15. `ap`.`operation` AS `operation`,
  16. `ap`.`operationByUserId` AS `operationByUserId`,
  17. `ap`.`operationByUser` AS `operationByUser`,
  18. `ap`.`operationAt` AS `operationAt`,
  19. `ap`.`customer` AS `customer`,
  20. `ap`.`projectDescription` AS `projectDescription`,
  21. `ap`.`auditPeriodStartDate` AS `auditPeriodStartDate`,
  22. `ap`.`auditPeriodEndDate` AS `auditPeriodEndDate`,
  23. `ap`.`reviewStep` AS `reviewStep`,
  24. `ap`.`auditSymbol` AS `auditSymbol`,
  25. `ap`.`reviewUserId1` AS `reviewUserId1`,
  26. `ap`.`reviewUserId2` AS `reviewUserId2`,
  27. `ap`.`reviewUserId3` AS `reviewUserId3`,
  28. `ap`.`reviewUsername1` AS `reviewUsername1`,
  29. `ap`.`reviewUsername2` AS `reviewUsername2`,
  30. `ap`.`reviewUsername3` AS `reviewUsername3`,
  31. `ap`.`auditProjectIdOfTemplate` AS `auditProjectIdOfTemplate`
  32. from
  33. (
  34. `audit_project` `ap`
  35. left join `_app_account` `appa` on ((`appa`.`appaId` = `ap`.`auditProjectId`))
  36. )

view01_user_select

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_user_select` AS
  2. select
  3. `_user`.`id` AS `id`,
  4. `_user`.`userId` AS `userId`,
  5. `_user`.`username` AS `username`,
  6. `_user`.`userStatus` AS `userStatus`,
  7. `_user`.`userType` AS `userType`
  8. from
  9. `_user`
  10. where
  11. (`_user`.`userStatus` = 'active')