数据结构
12079表总览
通用表
- _user
- _user_session
- _role
- _page
- _resource
- _group
- _user_group_role
- _user_group_role_page
- _user_group_role_resource
- _constant
- _constant_ui
- _record
- _record_history
- _cache
- _file
- _view01_user
业务表
_app_account
- 帐套表
CREATE TABLE `_app_account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '帐套ID; 可以用缩写 或者 中文名; 不可修改',
`appaName` varchar(255) DEFAULT NULL COMMENT '帐套名称;',
`appaStatus` varchar(255) DEFAULT NULL COMMENT '账套状态; 账套启用,账套停用',
`appaType` varchar(255) DEFAULT '普通账套' COMMENT '账套类型; 模版账套、null',
`subjectBalanceCalcStatus` varchar(255) DEFAULT '正常' COMMENT '科目余额计算状态',
`periodIdStart` varchar(255) DEFAULT NULL COMMENT '账套启用年月;',
`periodIdEnd` varchar(255) DEFAULT NULL COMMENT '账套结束年月; 审计专用',
`appaStandard` varchar(255) DEFAULT NULL COMMENT '会计准则;',
`appaIndustry` varchar(255) DEFAULT NULL COMMENT '所属行业;',
`appaVATType` varchar(255) DEFAULT NULL COMMENT '增值税种类; 备用',
`appaManagerId` varchar(255) DEFAULT NULL COMMENT '账套负责人ID',
`appaManagerName` varchar(255) DEFAULT NULL COMMENT '账套负责人名称',
`appaMemberIdList` varchar(255) DEFAULT NULL COMMENT '账套成员IDs',
`appaMemberList` text COMMENT '账套成员名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_unique` (`appaId`) USING BTREE,
UNIQUE KEY `appaName_unique` (`appaName`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '帐套表'
_ui
- ui 施工方案
CREATE TABLE `_ui` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
`uiActionType` varchar(255) DEFAULT NULL COMMENT 'ui 动作类型,如:fetchData, postData, changeUi',
`uiActionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
`desc` varchar(255) DEFAULT NULL COMMENT '描述',
`uiActionConfig` text COMMENT 'ui 动作数据',
`appDataSchema` text COMMENT 'ui 校验数据',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = 'ui 施工方案'
app_account_file
- 帐套归档表
CREATE TABLE `app_account_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '帐套ID; 可以用缩写 或者 中文名; 不可修改',
`periodId` varchar(255) DEFAULT NULL COMMENT '会计期间; 月份维度 E.g: 2023-03',
`files` text COMMENT '归档文件json; 以逗号分隔',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '帐套归档表'
assist_cunhuo
- 辅助核算-供应商
CREATE TABLE `assist_cunhuo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`assistId` varchar(255) DEFAULT NULL COMMENT 'ID;',
`assistName` varchar(255) DEFAULT NULL COMMENT '名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
`filePath` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_assistId_unique` (`appaId`, `assistId`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '辅助核算-供应商'
assist_customer
- 辅助核算-客户
CREATE TABLE `assist_customer` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`assistId` varchar(255) DEFAULT NULL COMMENT 'ID;',
`assistName` varchar(255) DEFAULT NULL COMMENT '名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
`filePath` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_assistId_unique` (`appaId`, `assistId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2386 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '辅助核算-客户'
assist_depart
- 辅助核算-部门
CREATE TABLE `assist_depart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`assistId` varchar(255) DEFAULT NULL COMMENT 'ID;',
`assistName` varchar(255) DEFAULT NULL COMMENT '名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
`filePath` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_assistId_unique` (`appaId`, `assistId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '辅助核算-部门'
assist_project
- 辅助核算-项目
CREATE TABLE `assist_project` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`assistId` varchar(255) DEFAULT NULL COMMENT 'ID;',
`assistName` varchar(255) DEFAULT NULL COMMENT '名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
`filePath` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_assistId_unique` (`appaId`, `assistId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '辅助核算-项目'
assist_staff
- 辅助核算-员工
CREATE TABLE `assist_staff` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`assistId` varchar(255) DEFAULT NULL COMMENT 'ID;',
`assistName` varchar(255) DEFAULT NULL COMMENT '名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
`filePath` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_assistId_unique` (`appaId`, `assistId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '辅助核算-员工'
assist_supplier
- 辅助核算-供应商
CREATE TABLE `assist_supplier` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`assistId` varchar(255) DEFAULT NULL COMMENT 'ID;',
`assistName` varchar(255) DEFAULT NULL COMMENT '名称',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
`filePath` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_assistId_unique` (`appaId`, `assistId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '辅助核算-供应商'
currency
- 科目表
CREATE TABLE `currency` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`currencyId` varchar(255) DEFAULT NULL COMMENT '币别编码; ',
`currencyName` varchar(255) DEFAULT NULL COMMENT '币别名称;',
`currencyRate` decimal(4, 2) DEFAULT NULL COMMENT '汇率;',
`isBaseCurrency` varchar(255) DEFAULT NULL COMMENT '是否本位币;是,否',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_subject_unique` (`appaId`, `currencyId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '科目表'
employee
CREATE TABLE `employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`employeeId` varchar(255) DEFAULT NULL COMMENT '员工id',
`employeeName` varchar(255) DEFAULT NULL COMMENT '员工姓名',
`idSequence` int(11) DEFAULT NULL COMMENT '员工序号',
`sex` varchar(255) DEFAULT NULL COMMENT '性别',
`icType` varchar(255) DEFAULT NULL COMMENT '证件类型',
`icNumber` varchar(255) DEFAULT NULL COMMENT '证件号码',
`dateOfBirth` varchar(255) DEFAULT NULL COMMENT '出生日期',
`phone` varchar(255) DEFAULT NULL COMMENT '手机',
`email` varchar(255) DEFAULT NULL COMMENT '邮箱',
`education` varchar(255) DEFAULT NULL COMMENT '学历',
`bankName` varchar(255) DEFAULT NULL COMMENT '开户行',
`bankAccount` varchar(255) DEFAULT NULL COMMENT '银行账号',
`dateOfEntry` varchar(255) DEFAULT NULL COMMENT '入职日期',
`department` varchar(255) DEFAULT NULL COMMENT '部门',
`position` varchar(255) DEFAULT NULL COMMENT '职位',
`positionLevel` varchar(255) DEFAULT NULL COMMENT '职级',
`dateOfSalary` varchar(255) DEFAULT NULL COMMENT '工资始发日期',
`hasMemberInsurance` tinyint(1) DEFAULT NULL COMMENT '是否缴纳五险一金',
`subjectOfAccruedSalary` varchar(255) DEFAULT NULL COMMENT '计提工资科目',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`entryStatus` varchar(255) DEFAULT NULL COMMENT '在职状态',
`insuranceConfig` longtext COMMENT '五险一金配置; JSON',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 570 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
fund_account
- 资金-账户
CREATE TABLE `fund_account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 1001++',
`accountId` varchar(255) DEFAULT NULL COMMENT '账户ID; ZJ1001',
`accountName` varchar(255) DEFAULT NULL COMMENT '账户; xx银行账户、xx现金账户',
`accountType` varchar(255) DEFAULT NULL COMMENT '账户类型; 现金、银行存款',
`currencyType` varchar(255) DEFAULT NULL COMMENT '货币类型; 人民币',
`initAmount` decimal(10, 2) DEFAULT '0.00' COMMENT '初始金额',
`subjectId` varchar(255) DEFAULT NULL COMMENT '会计科目编码;',
`subjectName` varchar(255) DEFAULT NULL COMMENT '会计科目;',
`accountBankNum` varchar(255) DEFAULT NULL COMMENT '银行账号; accountType 为 银行存款时才需要填',
`rowStatus` varchar(255) DEFAULT '正常' COMMENT '数据状态; 正常、停用',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_accountId_unique` (`appaId`, `accountId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资金-账户'
fund_account_entry
- 资金-账户日记账
CREATE TABLE `fund_account_entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 1++, accountEntryAt维度自增',
`accountEntryId` varchar(255) DEFAULT NULL COMMENT '日记帐序号; accountId + accountEntryAt + 001',
`accountId` varchar(255) DEFAULT NULL COMMENT '账户ID;',
`accountEntryAt` varchar(255) DEFAULT NULL COMMENT '日期; 账目产生的时间 E.g: 2021-05-28',
`accountEntryAbstract` varchar(255) DEFAULT NULL COMMENT '摘要',
`templateName` varchar(255) DEFAULT NULL COMMENT '收支类别名; 模版名',
`assistIdOfCustomer` varchar(255) DEFAULT NULL COMMENT '辅助核算-员工Id',
`assistNameOfCustomer` varchar(255) DEFAULT NULL COMMENT '辅助核算-员工名称',
`assistIdOfSupplier` varchar(255) DEFAULT NULL COMMENT '辅助核算-供应商Id',
`assistNameOfSupplier` varchar(255) DEFAULT NULL COMMENT '辅助核算-供应商名称',
`assistIdOfStaff` varchar(255) DEFAULT NULL COMMENT '辅助核算-员工Id',
`assistNameOfStaff` varchar(255) DEFAULT NULL COMMENT '辅助核算-员工名称',
`assistIdOfProject` varchar(255) DEFAULT NULL,
`assistNameOfProject` varchar(255) DEFAULT NULL,
`assistIdOfDepart` varchar(255) DEFAULT NULL,
`assistNameOfDepart` varchar(255) DEFAULT NULL,
`relTransferId` varchar(255) DEFAULT NULL COMMENT '关联转账id',
`transferAccountInfo` text COMMENT '转账信息',
`amount` decimal(10, 2) DEFAULT NULL COMMENT '金额',
`voucherId` varchar(255) DEFAULT NULL COMMENT '关联凭证;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 342 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资金-账户日记账'
fund_account_transfer_entry
- 资金-账户日记账
CREATE TABLE `fund_account_transfer_entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 1++, accountEntryAt维度自增',
`transferId` varchar(255) DEFAULT NULL COMMENT '日记帐序号; accountId + accountEntryAt + 001',
`transferAbstract` varchar(255) DEFAULT NULL COMMENT '摘要',
`fromAccountId` varchar(255) DEFAULT NULL COMMENT '转出账户ID',
`toAccountId` varchar(255) DEFAULT NULL COMMENT '转入账户ID',
`amount` decimal(10, 2) DEFAULT NULL COMMENT '金额',
`voucherId` varchar(255) DEFAULT NULL COMMENT '关联凭证;',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 255 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资金-账户日记账'
invoice
- 发票
CREATE TABLE `invoice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`invoiceId` varchar(255) DEFAULT NULL COMMENT '发票数据 ID',
`periodId` varchar(255) DEFAULT NULL COMMENT '记账期间',
`voucherId` varchar(255) DEFAULT NULL COMMENT '关联凭证',
`invoiceType` varchar(255) DEFAULT NULL COMMENT '发票类型:销项发票;进项发票',
`invoiceDataType` varchar(255) DEFAULT NULL COMMENT '发票种类:未开具发票;增值税普通发票;增值税专用发票;全电发票(增值税专用发票);全电发票(普通发票);税控机动车专用发票;纳税检查调整;',
`invoiceRecordTime` varchar(255) DEFAULT NULL COMMENT '录入日期',
`invoiceTime` varchar(255) DEFAULT NULL COMMENT '开票日期',
`invoiceCode` varchar(255) DEFAULT NULL COMMENT '发票代码',
`invoiceUnifiedSocialCreditCode` varchar(255) DEFAULT NULL COMMENT '统一社会信用代码',
`invoiceNumber` varchar(255) DEFAULT NULL COMMENT '发票号码',
`invoiceStatus` varchar(255) DEFAULT NULL COMMENT '发票状态:正常;作废',
`invoiceTaxpayerNum` varchar(255) DEFAULT NULL COMMENT '纳税人识别号',
`invoiceAddressAndPhone` varchar(255) DEFAULT NULL COMMENT '地址及电话: 地址;电话',
`invoiceBankAndAccount` varchar(255) DEFAULT NULL COMMENT '开户行及账户',
`invoiceTemplateName` varchar(255) DEFAULT NULL COMMENT '业务类型',
`invoiceTemplateId` varchar(255) DEFAULT NULL COMMENT '业务类型ID',
`invoiceCustomer` varchar(255) DEFAULT NULL COMMENT '客户名称;销项发票专用',
`invoiceCustomerName` varchar(255) DEFAULT NULL COMMENT '客户名称;销项发票专用',
`invoiceApproveTime` varchar(255) DEFAULT NULL COMMENT '认证日期;进项发票专用',
`invoiceSupplier` varchar(255) DEFAULT NULL,
`invoiceSupplierName` varchar(255) DEFAULT NULL COMMENT '供应商名称;进项发票专用',
`invoiceHasDetail` varchar(255) DEFAULT NULL COMMENT '是否录入发票明细; 是、否',
`invoiceTotalPriceAmount` varchar(255) DEFAULT NULL COMMENT '合计金额,不含税金额',
`invoiceTotalTaxRate` varchar(255) DEFAULT NULL COMMENT '合计税率',
`invoiceTotalTaxAmount` varchar(255) DEFAULT NULL COMMENT '合计税额',
`invoiceTotalPriceAndTaxAmount` varchar(255) DEFAULT NULL COMMENT '价税合计',
`invoiceVIN` varchar(255) DEFAULT NULL COMMENT '车架号',
`invoiceMachineNo` varchar(255) DEFAULT NULL COMMENT '机器编号',
`invoiceTaxAuthorityCode` varchar(255) DEFAULT NULL COMMENT '主管税务机关代码',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 41 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '发票'
invoice_entry
- 发票数据
CREATE TABLE `invoice_entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`invoiceId` varchar(255) DEFAULT NULL COMMENT '发票ID',
`invoiceEntryId` varchar(255) DEFAULT NULL COMMENT '发票数据ID',
`invoiceEntryName` varchar(255) DEFAULT NULL COMMENT '商品名称',
`invoiceEntrySpec` varchar(255) DEFAULT NULL COMMENT '规格型号',
`invoiceEntryUnit` varchar(255) DEFAULT NULL COMMENT '单位',
`invoiceEntryCount` varchar(255) DEFAULT NULL COMMENT '数量',
`invoiceEntryAmount` varchar(255) DEFAULT NULL COMMENT '金额',
`invoiceEntryTaxRate` varchar(255) DEFAULT NULL COMMENT '税率',
`invoiceEntryTaxAmount` varchar(255) DEFAULT NULL COMMENT '税额',
`invoiceEntryTaxProject` varchar(255) DEFAULT NULL COMMENT '征税项目:应税货物;应税劳务;应税服务、不动产、无形资产',
`invoiceEntryTaxMethod` varchar(255) DEFAULT NULL COMMENT '计税方法:一般计税方法-一般;一般计税方法-即征即退;简易计税方法-一般;简易计税方法-即征即退;免抵退税;免税',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 30 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '发票数据'
mb_currency
- 科目表
CREATE TABLE `mb_currency` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`currencyId` varchar(255) DEFAULT NULL COMMENT '币别编码; ',
`currencyName` varchar(255) DEFAULT NULL COMMENT '币别名称;',
`currencyRate` decimal(4, 2) DEFAULT NULL COMMENT '汇率;',
`isBaseCurrency` varchar(255) DEFAULT NULL COMMENT '是否本位币;是,否',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_subject_unique` (`appaId`, `currencyId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '科目表'
mb_report_asset_liability_formula
- 资产负债计算规则
CREATE TABLE `mb_report_asset_liability_formula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`itemId` varchar(255) DEFAULT NULL COMMENT '资产负债id;',
`countDirection` varchar(1) NOT NULL COMMENT '运算符号; +、-',
`accessRule` varchar(20) NOT NULL DEFAULT '' COMMENT '取数规则; 余额、借方余额、贷房余额、科目借方余额、科目贷方余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1430 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债计算规则'
mb_report_asset_liability_item
- 资产负债表
CREATE TABLE `mb_report_asset_liability_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`type` varchar(255) DEFAULT NULL COMMENT '类型; 资产、负债',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`computeFormula` varchar(255) DEFAULT NULL COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1219 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
mb_report_cash_flow_ex_formula
- 资产负债计算规则
CREATE TABLE `mb_report_cash_flow_ex_formula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`itemId` varchar(255) DEFAULT NULL COMMENT '资产负债id;',
`countDirection` varchar(1) NOT NULL COMMENT '运算符号; +、-',
`accessRule` varchar(20) DEFAULT '' COMMENT '取数规则; 余额、借方余额、贷房余额、科目借方余额、科目贷方余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 169 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债计算规则'
mb_report_cash_flow_ex_item
- 资产负债表
CREATE TABLE `mb_report_cash_flow_ex_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`computeFormula` varchar(255) DEFAULT NULL COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 442 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
mb_report_cash_flow_item
- 资产负债表
CREATE TABLE `mb_report_cash_flow_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`computeFormula` text COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 526 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
mb_report_cash_flow_item3
- 资产负债表
CREATE TABLE `mb_report_cash_flow_item3` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`computeFormula` text COMMENT '项目固定公式;',
`itemAmountMidYear` decimal(14, 2) DEFAULT NULL COMMENT '期初余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1651 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '资产负债表'
mb_report_profit_formula
- 资产负债计算规则
CREATE TABLE `mb_report_profit_formula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`itemId` varchar(255) DEFAULT NULL COMMENT '资产负债id;',
`countDirection` varchar(1) NOT NULL COMMENT '运算符号; +、-',
`accessRule` varchar(20) DEFAULT '' COMMENT '取数规则; 余额、借方余额、贷房余额、科目借方余额、科目贷方余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 744 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债计算规则'
mb_report_profit_item
- 资产负债表
CREATE TABLE `mb_report_profit_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`computeFormula` varchar(255) DEFAULT NULL COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 621 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
mb_report_summary_item
- 资产负债表
CREATE TABLE `mb_report_summary_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`computeFormula` text COMMENT '项目固定公式;',
`computeFormulaRemark` text COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 381 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
mb_subject
- 科目表
CREATE TABLE `mb_subject` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码; 资产类 1001++, 负债类2001++..',
`subjectName` varchar(255) DEFAULT NULL COMMENT '科目名称;',
`subjectLabel` varchar(255) DEFAULT NULL COMMENT '科目标签;',
`subjectCategory` varchar(255) DEFAULT NULL COMMENT '科目分类;资产, 负债, 权益, 成本, 损益',
`subjectLevel` int(11) DEFAULT '1' COMMENT '科目级别; 1级科目、2级科目….',
`subjectHasChildren` varchar(255) DEFAULT '无下级科目' COMMENT '科目类型; 有下级科目, 无下级科目',
`subjectBalanceDirection` varchar(4) DEFAULT NULL COMMENT '科目余额方向; 借、贷',
`assistList` varchar(255) DEFAULT NULL COMMENT '辅助核算配置列表; “,”拼接 E.g: 客户,供应商,职员,项目,部门,拓展1,拓展2 ',
`isShown` varchar(255) DEFAULT '显示' COMMENT '是否显示;显示,隐藏',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`cashFlowInItemId` varchar(255) DEFAULT NULL COMMENT '现金流注入项目id;',
`cashFlowInItemName` varchar(255) DEFAULT NULL COMMENT '现金流注入项目名称;',
`cashFlowOutItemId` varchar(255) DEFAULT NULL COMMENT '现金流注出项目id;',
`cashFlowOutItemName` varchar(255) DEFAULT NULL COMMENT '现金流注出项目名称;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_subject_unique` (`appaId`, `subjectId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5031 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '科目表'
mb_subject_cash_flow
- 资产负债表
CREATE TABLE `mb_subject_cash_flow` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`cashFlowInItemId` varchar(255) DEFAULT NULL,
`cashFlowInItemName` varchar(255) DEFAULT NULL,
`cashFlowOutItemId` varchar(255) DEFAULT NULL,
`cashFlowOutItemName` varchar(255) DEFAULT NULL,
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1869 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '资产负债表'
mb_voucher_template
- 凭证模板表
CREATE TABLE `mb_voucher_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`voucherTemplateId` varchar(255) DEFAULT NULL COMMENT '模板ID; V + idSequence',
`idSequence` int(11) DEFAULT NULL COMMENT '自增ID',
`voucherTemplateName` varchar(255) DEFAULT '0.00' COMMENT '模板名称;',
`voucherTemplateConfig` text COMMENT '模板配置JSON',
`voucherType` varchar(255) DEFAULT NULL COMMENT '凭证类型; 普通凭证、结账凭证、日记账凭证',
`sort` int(11) DEFAULT NULL,
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_template_unique` (`appaId`, `voucherTemplateId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '凭证模板表'
period
- 会计区间表
CREATE TABLE `period` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`periodId` varchar(255) DEFAULT NULL COMMENT '会计期间; 月份维度 E.g: 2023-03',
`financeYear` varchar(255) DEFAULT NULL COMMENT '财年;',
`isCheckout` varchar(255) DEFAULT NULL COMMENT '是否结账; 已结账、待结账、重新结账中',
`isPeriodStart` varchar(255) DEFAULT '否' COMMENT '是否初始会计期间; 是, 否',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_periodId_unique` (`appaId`, `periodId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 793 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '会计区间表'
report_asset_liability_formula
- 资产负债计算规则
CREATE TABLE `report_asset_liability_formula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`itemId` varchar(255) DEFAULT NULL COMMENT '资产负债id;',
`countDirection` varchar(1) NOT NULL COMMENT '运算符号; +、-',
`accessRule` varchar(20) NOT NULL DEFAULT '' COMMENT '取数规则; 余额、借方余额、贷房余额、科目借方余额、科目贷方余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3038 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债计算规则'
report_asset_liability_item
- 资产负债表
CREATE TABLE `report_asset_liability_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`type` varchar(255) DEFAULT NULL COMMENT '类型; 资产、负债',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`computeFormula` varchar(255) DEFAULT NULL COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2553 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
report_cash_flow_ex_formula
- 资产负债计算规则
CREATE TABLE `report_cash_flow_ex_formula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`itemId` varchar(255) DEFAULT NULL COMMENT '资产负债id;',
`countDirection` varchar(1) NOT NULL COMMENT '运算符号; +、-',
`accessRule` varchar(20) DEFAULT '' COMMENT '取数规则; 余额、借方余额、贷房余额、科目借方余额、科目贷方余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 353 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债计算规则'
report_cash_flow_ex_item
- 资产负债表
CREATE TABLE `report_cash_flow_ex_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`computeFormula` varchar(255) DEFAULT NULL COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 925 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
report_cash_flow_item
- 资产负债表
CREATE TABLE `report_cash_flow_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`computeFormula` text COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1101 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
report_cash_flow_item3
- 资产负债表
CREATE TABLE `report_cash_flow_item3` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`computeFormula` text COMMENT '项目固定公式;',
`itemAmountMidYear` decimal(14, 2) DEFAULT NULL COMMENT '期初余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 201 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '资产负债表'
report_profit_formula
- 资产负债计算规则
CREATE TABLE `report_profit_formula` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`itemId` varchar(255) DEFAULT NULL COMMENT '资产负债id;',
`countDirection` varchar(1) NOT NULL COMMENT '运算符号; +、-',
`accessRule` varchar(20) DEFAULT '' COMMENT '取数规则; 余额、借方余额、贷房余额、科目借方余额、科目贷方余额',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1549 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债计算规则'
report_profit_item
- 资产负债表
CREATE TABLE `report_profit_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`type` varchar(255) DEFAULT NULL COMMENT '类型; 资产、负债',
`computeFormula` varchar(255) DEFAULT NULL COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1334 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
report_summary_item
- 资产负债表
CREATE TABLE `report_summary_item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`itemId` varchar(255) DEFAULT NULL COMMENT '项目ID;',
`itemName` varchar(255) DEFAULT NULL COMMENT '项目名称;',
`level` int(11) DEFAULT '0' COMMENT '级别;',
`row` int(11) DEFAULT NULL COMMENT '行次;',
`editable` varchar(20) DEFAULT NULL COMMENT '是否可以编辑公式;是、否',
`computeFormula` text COMMENT '项目固定公式;',
`computeFormulaRemark` text COMMENT '项目固定公式;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 818 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '资产负债表'
salary_month_record
- 每月薪资记录
CREATE TABLE `salary_month_record` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`salaryMonthRecordId` varchar(255) NOT NULL COMMENT '工资月记录编号',
`title` varchar(40) DEFAULT NULL COMMENT '报表标题',
`year` int(11) DEFAULT NULL COMMENT '年',
`month` int(11) DEFAULT NULL COMMENT '月',
`startTime` date DEFAULT NULL COMMENT '计薪开始日期',
`endTime` date DEFAULT NULL COMMENT '计薪结束日期',
`expectedPaySalaryTotal` decimal(10, 2) DEFAULT '0.00' COMMENT '应发工资总额',
`totalDeductSalaryTotal` decimal(10, 2) DEFAULT '0.00' COMMENT '应扣工资总额',
`realPaySalaryTotal` decimal(10, 2) DEFAULT '0.00' COMMENT '实发工资总额',
`employeeCostTotal` decimal(10, 2) DEFAULT '0.00' COMMENT '员工成本合计',
`voucherId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '凭证ID',
`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 107 DEFAULT CHARSET = utf8mb4 COMMENT = '每月薪资记录'
salary_record
- 薪资记录
CREATE TABLE `salary_record` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`employeeId` varchar(255) NOT NULL COMMENT '员工ID',
`salaryRecordId` varchar(255) NOT NULL COMMENT '工资记录编号',
`salaryMonthRecordId` varchar(255) NOT NULL COMMENT '工资月记录编号',
`year` int(11) DEFAULT NULL COMMENT '年',
`month` int(11) DEFAULT NULL COMMENT '月',
`taxExemption` decimal(10, 2) DEFAULT '0.00' COMMENT '个税免征额',
`totalSalary` decimal(10, 2) DEFAULT '0.00' COMMENT '工资总额',
`totalSalaryContent` longtext COMMENT '工资总额内容; JSON',
`totalDeductSalary` decimal(10, 2) DEFAULT '0.00' COMMENT '应扣工资',
`totalDeductSalaryContent` longtext COMMENT '应扣工资内容; JSON',
`expectedPaySalary` decimal(10, 2) DEFAULT '0.00' COMMENT '应发工资',
`personalInsuranceAmount` decimal(10, 2) DEFAULT '0.00' COMMENT '代扣个人款项',
`personalEndowmentInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '养老保险',
`personalMedicalInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '医疗保险',
`personalUnemploymentInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '失业保险',
`personalInjuryInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '工伤保险',
`personalMaternityInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '生育保险',
`personalHousingFund` decimal(10, 2) DEFAULT '0.00' COMMENT '住房公积金',
`otherDeduct` decimal(10, 2) DEFAULT '0.00' COMMENT '其他扣除',
`accumulatedIncome` decimal(10, 2) DEFAULT '0.00' COMMENT '累计收入额',
`accumulatedDeductExpenses` decimal(10, 2) DEFAULT '0.00' COMMENT '累计减除费用',
`accumulatedWithholding` decimal(10, 2) DEFAULT '0.00' COMMENT '累计代扣额',
`accumulatedSpecialAdditionalDeduction` decimal(10, 2) DEFAULT '0.00' COMMENT '累计专项附加扣除',
`accumulatedOtherDeduction` decimal(10, 2) DEFAULT '0.00' COMMENT '累计其他扣除',
`childrenEducation` decimal(10, 2) DEFAULT '0.00' COMMENT '子女教育',
`supportingTheElderly` decimal(10, 2) DEFAULT '0.00' COMMENT '赡养老人',
`housingLoanInterest` decimal(10, 2) DEFAULT '0.00' COMMENT '住房贷款利息',
`housingRent` decimal(10, 2) DEFAULT '0.00' COMMENT '住房租金',
`continuingEducation` decimal(10, 2) DEFAULT '0.00' COMMENT '继续教育',
`infantCare` decimal(10, 2) DEFAULT '0.00' COMMENT '3岁以下婴幼儿照护',
`accumulatedTaxableIncome` decimal(10, 2) DEFAULT '0.00' COMMENT '累计应缴个税',
`accumulatedPaidTax` decimal(10, 2) DEFAULT '0.00' COMMENT '已缴个税',
`currentMonthTaxableIncome` decimal(10, 2) DEFAULT '0.00' COMMENT '本月应缴个税',
`taxAdjustment` decimal(10, 2) DEFAULT '0.00' COMMENT '个税调整',
`realPaySalaryAdjustment` decimal(10, 2) DEFAULT '0.00' COMMENT '实发工资调整',
`realPaySalaryAdjustmentContent` longtext COMMENT '实发工资调整内容; JSON',
`realPaySalary` decimal(10, 2) DEFAULT '0.00' COMMENT '实发工资',
`companyInsuranceAmount` decimal(10, 2) DEFAULT '0.00' COMMENT '公司承担款项',
`companyEndowmentInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '养老保险',
`companyMedicalInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '医疗保险',
`companyUnemploymentInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '失业保险',
`companyInjuryInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '工伤保险',
`companyMaternityInsurance` decimal(10, 2) DEFAULT '0.00' COMMENT '生育保险',
`companyHousingFund` decimal(10, 2) DEFAULT '0.00' COMMENT '住房公积金',
`companyInsuranceAmountTotal` decimal(10, 2) DEFAULT NULL COMMENT '公司承担款项小计',
`employeeCostTotal` decimal(10, 2) DEFAULT '0.00' COMMENT '员工成本合计',
`operation` varchar(255) CHARACTER SET utf8mb4 DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 108 DEFAULT CHARSET = utf8mb4 COMMENT = '薪资记录'
subject
- 科目表
CREATE TABLE `subject` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码; 资产类 1001++, 负债类2001++..',
`subjectName` varchar(255) DEFAULT NULL COMMENT '科目名称;',
`subjectLabel` varchar(255) DEFAULT NULL COMMENT '科目标签;',
`subjectTag` varchar(255) DEFAULT '' COMMENT '科目小标签;如父,子,辅,新,借,贷',
`subjectCategory` varchar(255) DEFAULT NULL COMMENT '科目分类;资产, 负债, 权益, 成本, 损益',
`subjectLevel` int(11) DEFAULT '1' COMMENT '科目级别; 1级科目、2级科目….',
`subjectHasChildren` varchar(255) DEFAULT '无下级科目' COMMENT '科目类型; 有下级科目, 无下级科目',
`subjectBalanceDirection` varchar(4) DEFAULT NULL COMMENT '科目余额方向; 借、贷',
`assistList` varchar(255) DEFAULT NULL COMMENT '辅助核算配置列表; “,”拼接 E.g: 客户,供应商,职员,项目,部门,拓展1,拓展2 ',
`currencyList` varchar(255) DEFAULT NULL COMMENT '外币核算;',
`isShown` varchar(255) DEFAULT '显示' COMMENT '是否显示;显示,隐藏',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`oldSubjectId` varchar(255) DEFAULT NULL COMMENT '导入的科目编码; 资产类 1001++, 负债类2001++..',
`oldSubjectName` varchar(255) DEFAULT NULL COMMENT '导入的科目名称;',
`cashFlowInItemId` varchar(255) DEFAULT NULL COMMENT '现金流注入项目id;',
`cashFlowInItemName` varchar(255) DEFAULT NULL COMMENT '现金流注入项目名称;',
`cashFlowOutItemId` varchar(255) DEFAULT NULL COMMENT '现金流注出项目id;',
`cashFlowOutItemName` varchar(255) DEFAULT NULL COMMENT '现金流注出项目名称;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_subject_unique` (`appaId`, `subjectId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16823 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '科目表'
subject_balance_period
- 科目余额表-会计期间维度
CREATE TABLE `subject_balance_period` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`periodId` varchar(255) DEFAULT NULL COMMENT '会计期间; E.g: 2023-03',
`financeYear` varchar(255) DEFAULT NULL COMMENT '财年;',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`startDebit` decimal(14, 2) DEFAULT '0.00' COMMENT '期初余额-借方',
`startCredit` decimal(14, 2) DEFAULT '0.00' COMMENT '期初余额-贷方',
`occurDebit` decimal(14, 2) DEFAULT '0.00' COMMENT '本期发生额-借方',
`occurCredit` decimal(14, 2) DEFAULT '0.00' COMMENT '本期发生额-贷方',
`occurAmount` decimal(14, 2) DEFAULT '0.00' COMMENT '本期余额/本期实际损益发生额',
`endDebit` decimal(14, 2) DEFAULT '0.00' COMMENT '期末余额-借方',
`endCredit` decimal(14, 2) DEFAULT '0.00' COMMENT '期末余额-贷方',
`isPeriodStart` varchar(255) DEFAULT '否' COMMENT '是否初始会计期间; 是, 否',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_periodId_subjectId_unique` (`appaId`, `periodId`, `subjectId`) USING BTREE,
KEY `subjectId_index` (`subjectId`) USING BTREE,
KEY `periodId_index` (`periodId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 107182 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '科目余额表-会计期间维度'
subject_balance_start
- 科目余额表-会计期间维度
CREATE TABLE `subject_balance_start` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`assistChildrenList` mediumtext COMMENT '辅助子科目列表; 当前科目的临时子科目列表',
`startDebitPeriod` decimal(14, 2) DEFAULT '0.00' COMMENT '期初余额-借方',
`startCreditPeriod` decimal(14, 2) DEFAULT '0.00' COMMENT '期初余额-贷方',
`startDebitYear` decimal(14, 2) DEFAULT '0.00' COMMENT '年初余额-借方',
`startCreditYear` decimal(14, 2) DEFAULT '0.00' COMMENT '年初余额-贷方',
`occurDebitYear` decimal(14, 2) DEFAULT '0.00' COMMENT '本年发生额-借方',
`occurCreditYear` decimal(14, 2) DEFAULT '0.00' COMMENT '本年发生额-贷方',
`occurAmountYear` decimal(14, 2) DEFAULT '0.00' COMMENT '本年发生额-余额变动;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_periodId_subjectId_unique` (`appaId`, `subjectId`) USING BTREE,
KEY `subjectId_index` (`subjectId`) USING BTREE
) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin ROW_FORMAT = DYNAMIC COMMENT = '科目余额表-会计期间维度'
subject_balance_year
- 科目余额表-财年维度
CREATE TABLE `subject_balance_year` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`financeYear` varchar(255) DEFAULT NULL COMMENT '财年; E.g: 2023',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`startDebitYearNoAdjust` decimal(14, 2) DEFAULT '0.00',
`startCreditYearNoAdjust` decimal(14, 2) DEFAULT '0.00',
`startDebitYear` decimal(14, 2) DEFAULT '0.00' COMMENT '年初余额-借方',
`startCreditYear` decimal(14, 2) DEFAULT '0.00' COMMENT '年初余额-贷方',
`occurDebitYear` decimal(14, 2) DEFAULT '0.00' COMMENT '本年累计发生额-借方;',
`occurCreditYear` decimal(14, 2) DEFAULT '0.00' COMMENT '本年累计发生额-贷方',
`occurAmountYear` decimal(14, 2) DEFAULT '0.00' COMMENT '本年余额/本年实际损益发生额',
`endDebitYear` decimal(14, 2) DEFAULT '0.00' COMMENT '年末余额-借方; 预留字段',
`endCreditYear` decimal(14, 2) DEFAULT '0.00' COMMENT '年末余额-贷方; 预留字段',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_financeYear_subjectId_unique` (`appaId`, `financeYear`, `subjectId`) USING BTREE,
KEY `subject_index` (`subjectId`) USING BTREE,
KEY `financeYear_index` (`financeYear`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 97077 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '科目余额表-财年维度'
subject_balance_year_adjust
- 科目余额表-财年维度
CREATE TABLE `subject_balance_year_adjust` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`financeYear` varchar(255) DEFAULT NULL COMMENT '财年; E.g: 2023',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目编码;',
`startDebitYearAdjust` decimal(14, 2) DEFAULT '0.00' COMMENT '调年初余额-借方',
`startCreditYearAdjust` decimal(14, 2) DEFAULT '0.00' COMMENT '调年初余额-贷方',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_financeYear_subjectId_unique` (`appaId`, `subjectId`, `financeYear`) USING BTREE,
KEY `subject_index` (`subjectId`) USING BTREE,
KEY `financeYear_index` (`financeYear`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 58 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '科目余额表-财年维度'
voucher
- 凭证表
CREATE TABLE `voucher` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`periodId` varchar(255) DEFAULT NULL COMMENT '会计期间; E.g: 2023-03',
`voucherName` varchar(255) DEFAULT NULL COMMENT '凭证字; 记2022',
`voucherNumber` int(11) DEFAULT NULL COMMENT '凭证号; 10001',
`voucherId` varchar(255) DEFAULT NULL COMMENT '凭证字号; periodId + voucherName + voucherNumber',
`voucherType` varchar(255) DEFAULT '普通凭证' COMMENT '凭证类型; 普通凭证、结账凭证',
`voucherTemplateId` varchar(255) DEFAULT NULL COMMENT '凭证模板ID;',
`voucherTemplateName` varchar(255) DEFAULT NULL COMMENT '凭证模板名称;',
`voucherAccountant` varchar(255) DEFAULT '' COMMENT '制单人',
`voucherAudit` varchar(255) DEFAULT '' COMMENT '审核人; 预留字段',
`voucherAt` varchar(255) DEFAULT NULL COMMENT '凭证时间; E.g: 2021-05-28',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_voucherId_unique` (`appaId`, `voucherId`) USING BTREE,
KEY `appaId` (`appaId`) USING BTREE,
KEY `periodId` (`periodId`) USING BTREE,
KEY `voucherId` (`voucherId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 31091 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '凭证表'
voucher_entry
- 凭证条目表
CREATE TABLE `voucher_entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`voucherId` varchar(255) DEFAULT NULL COMMENT '凭证Id;',
`subjectId` varchar(255) DEFAULT NULL COMMENT '科目id;',
`entryAbstract` varchar(255) DEFAULT NULL COMMENT '摘要',
`debit` decimal(14, 2) DEFAULT '0.00' COMMENT '借方金额',
`credit` decimal(14, 2) DEFAULT '0.00' COMMENT '贷方金额',
`currencyId` varchar(255) DEFAULT NULL COMMENT '外币名称;',
`currencyRate` decimal(4, 2) DEFAULT NULL COMMENT '汇率;',
`currencyAmonut` varchar(255) DEFAULT NULL COMMENT '原币;原币*汇率 =借方/贷方金额',
`assistIdOfCustomer` varchar(255) DEFAULT NULL COMMENT '辅助核算-客户Id',
`assistIdOfSupplier` varchar(255) DEFAULT NULL COMMENT '辅助核算-供应商Id',
`assistIdOfStaff` varchar(255) DEFAULT NULL COMMENT '辅助核算-员工Id',
`assistIdOfProject` varchar(255) DEFAULT NULL COMMENT '辅助核算-项目Id',
`assistIdOfDepart` varchar(255) DEFAULT NULL COMMENT '辅助核算-部门Id',
`assistIdOfCunhuo` varchar(255) DEFAULT NULL COMMENT '辅助核算-存货名称;',
`assistNameOfCustomer` varchar(255) DEFAULT NULL,
`assistNameOfSupplier` varchar(255) DEFAULT NULL,
`assistNameOfStaff` varchar(255) DEFAULT NULL,
`assistNameOfProject` varchar(255) DEFAULT NULL,
`assistNameOfDepart` varchar(255) DEFAULT NULL,
`assistNameOfCunhuo` varchar(255) DEFAULT NULL COMMENT '辅助核算-存货ID;',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 360493 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '凭证条目表'
voucher_file
CREATE TABLE `voucher_file` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`fileId` varchar(255) DEFAULT NULL COMMENT '文件Id',
`voucherId` varchar(255) DEFAULT NULL COMMENT '凭证字号',
`downloadPath` varchar(255) DEFAULT NULL COMMENT '文件下载路径',
`filename` varchar(255) DEFAULT NULL COMMENT '文件名',
`binarySize` varchar(255) DEFAULT NULL COMMENT '文件大小',
`fileType` varchar(255) DEFAULT NULL COMMENT '文件类型',
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin
voucher_template
- 凭证模板表
CREATE TABLE `voucher_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appaId` varchar(255) DEFAULT NULL COMMENT '账套ID',
`voucherTemplateId` varchar(255) DEFAULT NULL COMMENT '模板ID; V + idSequence',
`idSequence` int(11) DEFAULT NULL COMMENT '自增ID',
`voucherTemplateName` varchar(255) DEFAULT '0.00' COMMENT '模板名称;',
`voucherTemplateConfig` text COMMENT '模板配置JSON',
`voucherType` varchar(255) DEFAULT NULL COMMENT '凭证类型; 普通凭证、结账凭证、日记账凭证',
`sort` int(11) DEFAULT NULL,
`operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
`operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
`operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
`operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `appaId_template_unique` (`appaId`, `voucherTemplateId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 501 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '凭证模板表'
业务视图
_view02_user_app
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`localhost` SQL SECURITY DEFINER VIEW `_view02_user_app` AS
select
`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`id` AS `id`,
`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`userId` AS `userId`,
`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` AS `appId`
from
`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`
where
(
`jh_enterprise_v2_data_repository`.`enterprise_view02_user_app`.`appId` = 'jh-finance'
)
view01_employee_salary_record
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_employee_salary_record` AS
select
`salary_record`.`id` AS `id`,
`salary_record`.`appaId` AS `appaId`,
`salary_record`.`salaryRecordId` AS `salaryRecordId`,
`salary_record`.`salaryMonthRecordId` AS `salaryMonthRecordId`,
`salary_record`.`year` AS `year`,
`salary_record`.`month` AS `month`,
`salary_record`.`taxExemption` AS `taxExemption`,
`salary_record`.`totalSalary` AS `totalSalary`,
`salary_record`.`totalSalaryContent` AS `totalSalaryContent`,
`salary_record`.`totalDeductSalary` AS `totalDeductSalary`,
`salary_record`.`totalDeductSalaryContent` AS `totalDeductSalaryContent`,
`salary_record`.`expectedPaySalary` AS `expectedPaySalary`,
`salary_record`.`personalInsuranceAmount` AS `personalInsuranceAmount`,
`salary_record`.`personalEndowmentInsurance` AS `personalEndowmentInsurance`,
`salary_record`.`personalMedicalInsurance` AS `personalMedicalInsurance`,
`salary_record`.`personalUnemploymentInsurance` AS `personalUnemploymentInsurance`,
`salary_record`.`personalInjuryInsurance` AS `personalInjuryInsurance`,
`salary_record`.`personalMaternityInsurance` AS `personalMaternityInsurance`,
`salary_record`.`personalHousingFund` AS `personalHousingFund`,
`salary_record`.`otherDeduct` AS `otherDeduct`,
`salary_record`.`accumulatedIncome` AS `accumulatedIncome`,
`salary_record`.`accumulatedDeductExpenses` AS `accumulatedDeductExpenses`,
`salary_record`.`accumulatedWithholding` AS `accumulatedWithholding`,
`salary_record`.`accumulatedSpecialAdditionalDeduction` AS `accumulatedSpecialAdditionalDeduction`,
`salary_record`.`accumulatedOtherDeduction` AS `accumulatedOtherDeduction`,
`salary_record`.`supportingTheElderly` AS `supportingTheElderly`,
`salary_record`.`childrenEducation` AS `childrenEducation`,
`salary_record`.`housingLoanInterest` AS `housingLoanInterest`,
`salary_record`.`housingRent` AS `housingRent`,
`salary_record`.`continuingEducation` AS `continuingEducation`,
`salary_record`.`infantCare` AS `infantCare`,
`salary_record`.`accumulatedTaxableIncome` AS `accumulatedTaxableIncome`,
`salary_record`.`accumulatedPaidTax` AS `accumulatedPaidTax`,
`salary_record`.`taxAdjustment` AS `taxAdjustment`,
`salary_record`.`currentMonthTaxableIncome` AS `currentMonthTaxableIncome`,
`salary_record`.`realPaySalaryAdjustment` AS `realPaySalaryAdjustment`,
`salary_record`.`companyEndowmentInsurance` AS `companyEndowmentInsurance`,
`salary_record`.`companyInsuranceAmount` AS `companyInsuranceAmount`,
`salary_record`.`realPaySalary` AS `realPaySalary`,
`salary_record`.`realPaySalaryAdjustmentContent` AS `realPaySalaryAdjustmentContent`,
`salary_record`.`companyInjuryInsurance` AS `companyInjuryInsurance`,
`salary_record`.`companyUnemploymentInsurance` AS `companyUnemploymentInsurance`,
`salary_record`.`companyMedicalInsurance` AS `companyMedicalInsurance`,
`salary_record`.`companyMaternityInsurance` AS `companyMaternityInsurance`,
`salary_record`.`operation` AS `operation`,
`salary_record`.`employeeCostTotal` AS `employeeCostTotal`,
`salary_record`.`companyHousingFund` AS `companyHousingFund`,
`salary_record`.`operationAt` AS `operationAt`,
`salary_record`.`operationByUser` AS `operationByUser`,
`salary_record`.`operationByUserId` AS `operationByUserId`,
`employee`.`employeeId` AS `employeeId`,
`employee`.`employeeName` AS `employeeName`,
`employee`.