数据结构

12114

表总览

普通表

_cache

  • 缓存表
  1. CREATE TABLE `_cache` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `userId` varchar(255) NOT NULL COMMENT '用户Id',
  4. `content` longtext COMMENT '缓存数据',
  5. `recordStatus` varchar(255) DEFAULT 'active',
  6. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  7. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  8. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  9. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  10. PRIMARY KEY (`id`) USING BTREE
  11. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '缓存表'

_constant

  • 常量表; 软删除未启用;
  1. CREATE TABLE `_constant` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `constantKey` varchar(255) DEFAULT NULL,
  4. `constantType` varchar(255) DEFAULT NULL COMMENT '常量类型; object, array',
  5. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  6. `constantValue` text COMMENT '常量内容; object, array',
  7. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  8. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  9. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  10. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  11. PRIMARY KEY (`id`) USING BTREE
  12. ) ENGINE = InnoDB AUTO_INCREMENT = 24 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '常量表; 软删除未启用;'

_page

  • 页面表; 软删除未启用;
  1. CREATE TABLE `_page` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `pageId` varchar(255) DEFAULT NULL COMMENT 'pageId',
  4. `pageFile` varchar(255) DEFAULT NULL COMMENT 'page文件指定; 默认使用pageId.html',
  5. `pageHook` varchar(255) DEFAULT NULL COMMENT 'pageHook',
  6. `pageName` varchar(255) DEFAULT NULL COMMENT 'page name',
  7. `pageType` varchar(255) DEFAULT NULL COMMENT '页面类型; showInMenu, dynamicInMenu',
  8. `sort` varchar(255) DEFAULT NULL,
  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`) USING BTREE
  14. ) ENGINE = InnoDB AUTO_INCREMENT = 100 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '页面表; 软删除未启用;'

_record_history

  • 数据历史表
  1. CREATE TABLE `_record_history` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `table` varchar(255) DEFAULT NULL COMMENT '表',
  4. `recordId` int(11) DEFAULT NULL COMMENT '数据在table中的主键id; recordContent.id',
  5. `recordContent` text NOT NULL COMMENT '数据',
  6. `packageContent` text NOT NULL COMMENT '当时请求的 package JSON',
  7. `operation` varchar(255) DEFAULT NULL COMMENT '操作; jhInsert, jhUpdate, jhDelete jhRestore',
  8. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId; recordContent.operationByUserId',
  9. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名; recordContent.operationByUser',
  10. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; recordContent.operationAt; E.g: 2021-05-28T10:24:54+08:00 ',
  11. PRIMARY KEY (`id`) USING BTREE,
  12. KEY `index_record_id` (`recordId`) USING BTREE,
  13. KEY `index_table_action` (`table`, `operation`) USING BTREE
  14. ) ENGINE = InnoDB AUTO_INCREMENT = 1541 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '数据历史表'

_resource

  • 请求资源表; 软删除未启用; resourceId=${appId}.${pageId}.${actionId}
  1. CREATE TABLE `_resource` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `accessControlTable` varchar(255) DEFAULT NULL COMMENT '数据规则控制表',
  4. `resourceHook` text COMMENT '[ "before": {"service": "xx", "serviceFunction": "xxx"}, "after": [] }',
  5. `pageId` varchar(255) DEFAULT NULL COMMENT 'page id; E.g: index',
  6. `actionId` varchar(255) DEFAULT NULL COMMENT 'action id; E.g: selectXXXByXXX',
  7. `desc` varchar(255) DEFAULT NULL COMMENT '描述',
  8. `resourceType` varchar(255) DEFAULT NULL COMMENT 'resource 类型; E.g: auth service sql',
  9. `appDataSchema` text COMMENT 'appData 参数校验',
  10. `resourceData` text COMMENT 'resource 数据; { "service": "auth", "serviceFunction": "passwordLogin" } or { "table": "${tableName}", "action": "select", "whereCondition": ".where(function() {this.whereNot( { recordStatus: \\"active\\" })})" }',
  11. `requestDemo` text COMMENT '请求Demo',
  12. `responseDemo` text COMMENT '响应Demo',
  13. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  14. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  15. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  16. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  17. PRIMARY KEY (`id`) USING BTREE
  18. ) ENGINE = InnoDB AUTO_INCREMENT = 802 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '请求资源表; 软删除未启用; resourceId=`${appId}.${pageId}.${actionId}`'

_test_case

  • 测试用例表
  1. CREATE TABLE `_test_case` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `pageId` varchar(255) DEFAULT NULL COMMENT '页面Id',
  4. `testId` varchar(255) DEFAULT NULL COMMENT '测试用例Id; 10000 ++',
  5. `testName` varchar(255) DEFAULT NULL COMMENT '测试用例名',
  6. `uiActionIdList` varchar(255) DEFAULT NULL COMMENT 'uiAction列表; 一个测试用例对应多个uiActionId',
  7. `testOpeartion` text COMMENT '测试用例步骤;',
  8. `expectedResult` text COMMENT '期望结果',
  9. `operation` varchar(255) DEFAULT NULL COMMENT '操作; jhInsert, jhUpdate, jhDelete jhRestore',
  10. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId; recordContent.operationByUserId',
  11. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名; recordContent.operationByUser',
  12. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; recordContent.operationAt; E.g: 2021-05-28T10:24:54+08:00 ',
  13. PRIMARY KEY (`id`) USING BTREE
  14. ) ENGINE = InnoDB 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`) USING BTREE
  14. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = 'ui 施工方案'

_user_session

  • 用户session表; deviceId 维度;软删除未启用;
  1. CREATE TABLE `_user_session` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `userId` varchar(255) DEFAULT NULL COMMENT '用户id',
  4. `userIp` varchar(255) DEFAULT NULL COMMENT '用户ip',
  5. `userIpRegion` varchar(255) DEFAULT NULL COMMENT '用户Ip区域',
  6. `userAgent` text COMMENT '请求的 agent',
  7. `deviceId` varchar(255) DEFAULT NULL COMMENT '设备id',
  8. `deviceType` varchar(255) DEFAULT 'web' COMMENT '设备类型; flutter, web, bot_databot, bot_chatbot, bot_xiaochengxu',
  9. `socketStatus` varchar(255) DEFAULT 'offline' COMMENT 'socket状态',
  10. `authToken` varchar(255) DEFAULT NULL COMMENT 'auth token',
  11. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  12. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  13. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  14. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  15. PRIMARY KEY (`id`) USING BTREE,
  16. KEY `userId_index` (`userId`) USING BTREE,
  17. KEY `userId_deviceId_index` (`userId`, `deviceId`) USING BTREE,
  18. KEY `authToken_index` (`authToken`) USING BTREE
  19. ) ENGINE = InnoDB AUTO_INCREMENT = 50 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户session表; deviceId 维度;软删除未启用;'

customer

  1. CREATE TABLE `customer` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '业务自增ID, 1001++',
  4. `customerId` varchar(255) DEFAULT NULL COMMENT '客户ID; KH1001',
  5. `customerName` varchar(255) DEFAULT NULL COMMENT '客户名',
  6. `customerAccountNum` varchar(255) DEFAULT NULL COMMENT '银行账号',
  7. `customerBankName` varchar(255) DEFAULT NULL COMMENT '开户银行',
  8. `customerBranchBankName` varchar(255) DEFAULT NULL COMMENT '开户分行\\支行',
  9. `customerAddress` varchar(255) DEFAULT NULL COMMENT '客户地址',
  10. `customerPostalCode` varchar(255) DEFAULT NULL COMMENT '邮政编码',
  11. `customerContactPerson` varchar(255) DEFAULT NULL COMMENT '联系人',
  12. `customerPhoneNum` varchar(255) DEFAULT NULL COMMENT '联系电话',
  13. `customerCollectionCycle` varchar(255) DEFAULT NULL COMMENT '收款账期;单位:天',
  14. `customerBusinessLicenseNum` varchar(255) DEFAULT NULL COMMENT '营业执照',
  15. `customerMedicalOperatingLicenseNum` varchar(255) DEFAULT NULL COMMENT '医疗器械经营许可证',
  16. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  17. `rowStatus` varchar(255) DEFAULT '正常' COMMENT '数据状态; 正常、停用',
  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. ) ENGINE = InnoDB AUTO_INCREMENT = 25 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin

finance_asset

  • 财务-资产信息表
  1. CREATE TABLE `finance_asset` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(255) DEFAULT NULL COMMENT '顺序id; 10001++',
  4. `assetId` varchar(255) DEFAULT NULL COMMENT '资产ID; ZC10001',
  5. `assetName` varchar(255) DEFAULT NULL COMMENT '资产;',
  6. `currentPeriod` varchar(255) DEFAULT NULL COMMENT '当前会计期间; 2022-02',
  7. `depreciationMethod` varchar(255) DEFAULT NULL COMMENT '折旧方法; 平均年限法、不折旧',
  8. `financeAssetSubject` varchar(255) DEFAULT NULL COMMENT '资产科目; 固定资产',
  9. `financeDepreciationSubject` varchar(255) DEFAULT NULL COMMENT '累计折旧科目; 累计折旧',
  10. `financeClearSubject` varchar(255) DEFAULT NULL COMMENT '资产清理科目; 固定资产清理',
  11. `financeDepreciationFeeSubject` varchar(255) DEFAULT NULL COMMENT '折旧费用科目; 管理费用-折旧费',
  12. `startUseAt` varchar(255) DEFAULT NULL COMMENT '开始使用日期; 2020-02-02',
  13. `assetValue` decimal(10, 2) DEFAULT NULL COMMENT '资产原值',
  14. `residualRate` decimal(10, 2) DEFAULT NULL COMMENT '残值率',
  15. `estimatedUseMonth` int(11) DEFAULT NULL COMMENT '预计使用月份',
  16. `depreciatedMonths` int(11) DEFAULT NULL COMMENT '已折旧月份',
  17. `remainingMonth` int(11) DEFAULT NULL COMMENT '剩余使用月份',
  18. `monthlyDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '每月折旧额',
  19. `totalDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '累计折旧',
  20. `currentYearDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '本年累计折旧;',
  21. `preYearDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '以前年度累计折旧',
  22. `currentPeriodDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '本期折旧',
  23. `financeAssetSubjectId` varchar(255) DEFAULT NULL COMMENT '资产科目ID;',
  24. `financeDepreciationSubjectId` varchar(255) DEFAULT NULL COMMENT '累计折旧科目ID;',
  25. `financeClearSubjectId` varchar(255) DEFAULT NULL COMMENT '资产清理科目ID;',
  26. `financeDepreciationFeeSubjectId` varchar(255) DEFAULT NULL COMMENT '折旧费用科目ID;',
  27. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  28. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  29. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  30. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  31. PRIMARY KEY (`id`) USING BTREE
  32. ) ENGINE = InnoDB AUTO_INCREMENT = 14 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '财务-资产信息表'

finance_asset_record

  • 财务-资产信息表
  1. CREATE TABLE `finance_asset_record` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(255) DEFAULT NULL COMMENT '顺序id; 10001++',
  4. `assetId` varchar(255) DEFAULT NULL COMMENT '资产ID; ZC10001',
  5. `assetName` varchar(255) DEFAULT NULL COMMENT '资产;',
  6. `currentPeriod` varchar(255) DEFAULT NULL COMMENT '当前会计期间; 2022-02',
  7. `depreciationMethod` varchar(255) DEFAULT NULL COMMENT '折旧方法; 平均年限法、不折旧',
  8. `financeAssetSubject` varchar(255) DEFAULT NULL COMMENT '资产科目; 固定资产',
  9. `financeDepreciationSubject` varchar(255) DEFAULT NULL COMMENT '累计折旧科目; 累计折旧',
  10. `financeClearSubject` varchar(255) DEFAULT NULL COMMENT '资产清理科目; 固定资产清理',
  11. `financeDepreciationFeeSubject` varchar(255) DEFAULT NULL COMMENT '折旧费用科目; 管理费用-折旧费',
  12. `startUseAt` varchar(255) DEFAULT NULL COMMENT '开始使用日期; 2020-02-02',
  13. `assetValue` decimal(10, 2) DEFAULT NULL COMMENT '资产原值',
  14. `residualRate` decimal(10, 2) DEFAULT NULL COMMENT '残值率',
  15. `estimatedUseMonth` int(11) DEFAULT NULL COMMENT '预计使用月份',
  16. `depreciatedMonths` int(11) DEFAULT NULL COMMENT '已折旧月份',
  17. `remainingMonth` int(11) DEFAULT NULL COMMENT '剩余使用月份',
  18. `monthlyDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '每月折旧额',
  19. `totalDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '累计折旧',
  20. `currentYearDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '本年累计折旧',
  21. `preYearDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '以前年度累计折旧',
  22. `currentPeriodDepreciation` decimal(10, 2) DEFAULT NULL COMMENT '本期折旧',
  23. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  24. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  25. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  26. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  27. `financeAssetSubjectId` varchar(255) DEFAULT NULL COMMENT '资产科目ID;',
  28. `financeDepreciationSubjectId` varchar(255) DEFAULT NULL COMMENT '累计折旧科目ID;',
  29. `financeClearSubjectId` varchar(255) DEFAULT NULL COMMENT '资产清理科目ID;',
  30. `financeDepreciationFeeSubjectId` varchar(255) DEFAULT NULL COMMENT '折旧费用科目ID;',
  31. PRIMARY KEY (`id`) USING BTREE
  32. ) ENGINE = InnoDB AUTO_INCREMENT = 362 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '财务-资产信息表'

finance_period

  • 折旧-会计区间表
  1. CREATE TABLE `finance_period` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `periodId` varchar(255) DEFAULT NULL COMMENT '会计期间; 月份维度 E.g: 2023-03',
  4. `financeYear` varchar(255) DEFAULT NULL COMMENT '财年;',
  5. `isDepreciation` varchar(255) DEFAULT NULL COMMENT '是否折旧; 已折旧、待折旧',
  6. `isPeriodStart` varchar(255) DEFAULT '否' COMMENT '是否初始会计期间; 是, 否',
  7. `depreciationVoucherId` varchar(255) DEFAULT NULL COMMENT '折旧凭证ID',
  8. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  9. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  10. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  11. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  12. PRIMARY KEY (`id`) USING BTREE,
  13. UNIQUE KEY `periodId_unique` (`periodId`) USING BTREE
  14. ) ENGINE = InnoDB AUTO_INCREMENT = 223 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '折旧-会计区间表'

payment

  • 收款&付款表;
  1. CREATE TABLE `payment` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  3. `idSequence` int(255) DEFAULT NULL COMMENT '顺序id; 10001++',
  4. `paymentId` varchar(255) DEFAULT NULL COMMENT '收款/付款ID; SK10001 FK10001',
  5. `paymentType` varchar(20) DEFAULT NULL COMMENT '类型; 收款、付款',
  6. `paymentAmount` decimal(10, 2) DEFAULT NULL COMMENT '金额',
  7. `paymentPayee` varchar(50) DEFAULT NULL COMMENT '收款账户; 人、公司、账号',
  8. `paymentPayeeAccount` varchar(255) DEFAULT NULL COMMENT '收款账号; ',
  9. `paymentPayeeBank` varchar(255) DEFAULT NULL COMMENT '收款账号银行',
  10. `paymentPayeeBranchBank` varchar(255) DEFAULT NULL COMMENT '收款账号开户分行\\支行',
  11. `paymentPayer` varchar(50) DEFAULT NULL COMMENT '付款账户; 人、公司、账号',
  12. `paymentPayerAccount` varchar(255) DEFAULT NULL COMMENT '付款账号;',
  13. `paymentPayerBank` varchar(255) DEFAULT NULL COMMENT '付款账号银行',
  14. `paymentPayerBranchBank` varchar(255) DEFAULT NULL COMMENT '付款账号开户分行\\支行',
  15. `paymentMethod` varchar(50) DEFAULT NULL COMMENT '方式',
  16. `paymentStatus` varchar(20) NOT NULL DEFAULT '未付款' COMMENT '付款状态; 未付款、已付款',
  17. `invoiceStatus` varchar(255) DEFAULT '未开票' COMMENT '开票状态; 未开票、已开票',
  18. `paymentAt` varchar(255) DEFAULT NULL COMMENT '时间; E.g: 2021-05-28T10:24:54+08:00',
  19. `supplierId` varchar(255) DEFAULT NULL COMMENT '供应商ID;',
  20. `customerId` varchar(255) DEFAULT NULL COMMENT '客户ID;',
  21. `ticketId` varchar(255) DEFAULT NULL COMMENT '工单id',
  22. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  23. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  24. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  25. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  26. PRIMARY KEY (`id`) USING BTREE
  27. ) ENGINE = InnoDB AUTO_INCREMENT = 76 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '收款&付款表;'

payment_order

  • 收款&付款表-订单抵扣表
  1. CREATE TABLE `payment_order` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  3. `paymentId` varchar(255) DEFAULT NULL COMMENT '收款/付款ID; SK10001 FK10001',
  4. `paymentType` varchar(20) DEFAULT NULL COMMENT '类型; 收款、付款',
  5. `orderType` varchar(20) DEFAULT NULL COMMENT '订单类型; 采购订单、销售订单、采退订单、销退订单',
  6. `orderId` varchar(255) NOT NULL COMMENT '订单ID',
  7. `deductionAmount` decimal(10, 2) NOT NULL COMMENT '抵扣金额',
  8. `ticketId` varchar(255) DEFAULT NULL COMMENT '工单id',
  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`) USING BTREE
  14. ) ENGINE = InnoDB AUTO_INCREMENT = 73 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '收款&付款表-订单抵扣表'

purchase_order

  • 采购订单表
  1. CREATE TABLE `purchase_order` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 10001++',
  4. `purchaseOrderId` varchar(255) DEFAULT NULL COMMENT '订单ID; CG10001',
  5. `supplierId` varchar(255) DEFAULT NULL COMMENT '供货商ID',
  6. `supplierName` varchar(255) DEFAULT NULL COMMENT '供货商',
  7. `supplierInfo` mediumtext COMMENT '供货商信息; json',
  8. `purchaseOrderType` varchar(255) DEFAULT '普通采购' COMMENT '采购订单类型; 普通采购、资产采购',
  9. `purchaseOrderDesc` varchar(255) DEFAULT NULL COMMENT '采购订单描述;',
  10. `purchaseProductList` text COMMENT '采购产品列表; [{}, {}]',
  11. `purchaseProductListCount` int(11) DEFAULT NULL COMMENT '采购产品列表个数',
  12. `purchaseProductTotalCount` int(11) DEFAULT NULL COMMENT '采购产品总个数',
  13. `purchaseTotalAmount` decimal(10, 2) DEFAULT NULL COMMENT '订单金额',
  14. `purchaseOrderStatus` varchar(255) DEFAULT NULL COMMENT '订单状态; 待采购、采购中、订单完成/订单取消',
  15. `purchaseOrderStatusDesc` varchar(255) DEFAULT NULL COMMENT '订单状态描述; 例如: 填写订单取消原因',
  16. `purchaseCreateAt` varchar(255) DEFAULT NULL COMMENT '订单创建日期',
  17. `purchaseFinishAt` varchar(255) DEFAULT NULL COMMENT '订单完成时间',
  18. `purchaseOrderRemark` varchar(255) DEFAULT NULL COMMENT '订单备注',
  19. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  20. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  21. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  22. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  23. PRIMARY KEY (`id`) USING BTREE
  24. ) ENGINE = InnoDB AUTO_INCREMENT = 8 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '采购订单表'

purchase_return_order

  • 采购退货订单表
  1. CREATE TABLE `purchase_return_order` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 10001++',
  4. `returnOrderId` varchar(255) DEFAULT NULL COMMENT '退款订单ID; XSTK10001',
  5. `supplierId` varchar(255) DEFAULT NULL COMMENT '供货商ID',
  6. `supplierName` varchar(255) DEFAULT NULL COMMENT '供货商',
  7. `supplierInfo` mediumtext COMMENT '供货商信息; json',
  8. `returnOrderDesc` varchar(255) DEFAULT NULL COMMENT '退货订单描述;',
  9. `returnProductList` text COMMENT '退货产品列表; [{}, {}]',
  10. `returnProductListCount` int(11) DEFAULT NULL COMMENT '退货产品列表个数',
  11. `returnProductTotalCount` int(11) DEFAULT NULL COMMENT '退货产品总个数',
  12. `returnTotalAmount` decimal(10, 2) DEFAULT NULL COMMENT '订单金额',
  13. `returnOrderStatus` varchar(255) DEFAULT NULL COMMENT '订单状态; 待退货、退货中、订单完成/订单取消',
  14. `returnOrderStatusDesc` varchar(255) DEFAULT NULL COMMENT '订单状态描述; 例如: 填写订单取消原因',
  15. `returnCreateAt` varchar(255) DEFAULT NULL COMMENT '订单创建日期',
  16. `returnFinishAt` varchar(255) DEFAULT NULL COMMENT '订单完成时间',
  17. `returnOrderRemark` varchar(255) DEFAULT NULL COMMENT '订单备注',
  18. `returnOrderType` varchar(255) DEFAULT NULL COMMENT '订单类型;普通退货、资产退货',
  19. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  20. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  21. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  22. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  23. PRIMARY KEY (`id`) USING BTREE
  24. ) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '采购退货订单表'

sale_order

  1. CREATE TABLE `sale_order` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '主键ID, 10001++',
  4. `saleOrderId` varchar(255) DEFAULT NULL COMMENT '订单ID; CG10001',
  5. `customerId` varchar(255) DEFAULT NULL COMMENT '客户ID',
  6. `customerName` varchar(255) DEFAULT NULL COMMENT '客户',
  7. `customerInfo` text COMMENT '客户',
  8. `saleOrderDesc` varchar(255) DEFAULT NULL COMMENT '销售订单描述;',
  9. `saleProductList` text COMMENT '销售产品列表; [{}, {}]',
  10. `saleProductListCount` int(11) DEFAULT NULL COMMENT '销售产品列表个数',
  11. `saleProductTotalCount` int(11) DEFAULT NULL COMMENT '销售产品总个数',
  12. `saleTotalAmount` decimal(10, 2) DEFAULT NULL COMMENT '订单金额',
  13. `saleOrderStatus` varchar(255) DEFAULT NULL COMMENT '订单状态; 待销售、销售中、订单完成/订单取消',
  14. `saleOrderStatusDesc` varchar(255) DEFAULT NULL COMMENT '订单状态描述; 例如: 填写订单失败原因',
  15. `saleCreateAt` varchar(255) DEFAULT NULL COMMENT '订单创建日期',
  16. `saleOrderRemark` varchar(255) DEFAULT NULL COMMENT '订单备注',
  17. `saleFinishAt` varchar(255) DEFAULT NULL COMMENT '订单完成时间',
  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. ) ENGINE = InnoDB AUTO_INCREMENT = 46 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin

sale_return_order

  • 销售退货订单表
  1. CREATE TABLE `sale_return_order` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '主键ID, 10001++',
  4. `returnOrderId` varchar(255) DEFAULT NULL COMMENT '退款订单ID; CGTK10001',
  5. `customerId` varchar(255) DEFAULT NULL COMMENT '客户ID',
  6. `customerName` varchar(255) DEFAULT NULL COMMENT '客户',
  7. `customerInfo` text COMMENT '客户',
  8. `returnOrderDesc` varchar(255) DEFAULT NULL COMMENT '退货订单描述;',
  9. `returnProductList` text COMMENT '退货产品列表; [{}, {}]',
  10. `returnProductListCount` int(11) DEFAULT NULL COMMENT '退货产品列表个数',
  11. `returnProductTotalCount` int(11) DEFAULT NULL COMMENT '退货产品总个数',
  12. `returnTotalAmount` decimal(10, 2) DEFAULT NULL COMMENT '订单金额',
  13. `returnOrderStatus` varchar(255) DEFAULT NULL COMMENT '订单状态; 待退货、退货中、订单完成/订单取消',
  14. `returnOrderStatusDesc` varchar(255) DEFAULT NULL COMMENT '订单状态描述; 例如: 填写订单失败原因',
  15. `returnCreateAt` varchar(255) DEFAULT NULL COMMENT '订单创建日期',
  16. `returnOrderRemark` varchar(255) DEFAULT NULL COMMENT '订单备注',
  17. `returnFinishAt` varchar(255) DEFAULT NULL COMMENT '订单完成时间',
  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. ) ENGINE = InnoDB AUTO_INCREMENT = 65 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '销售退货订单表'

supplier

  • 供货商
  1. CREATE TABLE `supplier` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 1001++',
  4. `supplierId` varchar(255) DEFAULT NULL COMMENT '供应商ID; GH1001',
  5. `supplierName` varchar(255) DEFAULT NULL COMMENT '供应商名',
  6. `supplierAccountNum` varchar(255) DEFAULT NULL COMMENT '付款账号',
  7. `supplierBankName` varchar(255) DEFAULT NULL COMMENT '开户银行',
  8. `supplierBranchBankName` varchar(255) DEFAULT NULL COMMENT '分行名称',
  9. `supplierBusinessLicenseNum` varchar(255) DEFAULT NULL COMMENT '营业执照',
  10. `supplierMedicalOperatingLicenseNum` varchar(255) DEFAULT NULL COMMENT '医疗器械经营许可证',
  11. `supplierPaymentCycle` varchar(255) DEFAULT NULL COMMENT '账期;单位:天',
  12. `supplierAddress` varchar(255) DEFAULT NULL COMMENT '地址',
  13. `supplierPostalCode` varchar(255) DEFAULT NULL COMMENT '邮政编码',
  14. `supplierContactPerson` varchar(255) DEFAULT NULL COMMENT '联系人',
  15. `supplierPhoneNum` varchar(255) DEFAULT NULL COMMENT '联系电话',
  16. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  17. `rowStatus` varchar(255) DEFAULT '正常' COMMENT '数据状态; 正常、停用',
  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 '操作时间',
  22. PRIMARY KEY (`id`) USING BTREE,
  23. UNIQUE KEY `supplierId_unique` (`supplierId`) USING BTREE,
  24. UNIQUE KEY `supplierName_unique` (`supplierName`) USING BTREE
  25. ) ENGINE = InnoDB AUTO_INCREMENT = 30 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '供货商'

supplier_product

  • 供货商产品表; productId=supplierId-productName-manufacturerName- 在view或者前端拼接
  1. CREATE TABLE `supplier_product` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `supplierId` varchar(255) DEFAULT NULL COMMENT '供应商ID; GH10001',
  4. `supplierName` varchar(255) DEFAULT NULL,
  5. `productName` varchar(255) DEFAULT NULL COMMENT '产品名称',
  6. `manufacturerName` varchar(255) DEFAULT NULL COMMENT '生产厂家',
  7. `productSpecList` varchar(512) DEFAULT NULL COMMENT '规格/型号列表; “15ml/袋, 20ml/袋”',
  8. `productUnit` varchar(255) DEFAULT NULL COMMENT '单位',
  9. `productType` varchar(255) DEFAULT NULL COMMENT '产品类型',
  10. `manufacturerLicenseNum` varchar(255) DEFAULT NULL COMMENT '生产许可证号',
  11. `manufacturerLicenseExpireAt` varchar(255) DEFAULT NULL COMMENT '生产许可证到期日; E.g: 2024-05-28',
  12. `manufacturerProductRCNum` varchar(255) DEFAULT NULL COMMENT '产品注册证号;',
  13. `manufacturerProductRCExpireAt` varchar(255) DEFAULT NULL COMMENT '产品注册证到期日; E.g: 2024-03-28',
  14. `productTransport` varchar(255) DEFAULT NULL COMMENT '储运条件;',
  15. `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  16. `rowStatus` varchar(255) DEFAULT '正常' COMMENT '数据状态; 正常、停用',
  17. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  18. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  19. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  20. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  21. PRIMARY KEY (`id`) USING BTREE
  22. ) ENGINE = InnoDB AUTO_INCREMENT = 811 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '供货商产品表; productId=supplierId-productName-manufacturerName- 在view或者前端拼接'

ticket

  • 工单表;
  1. CREATE TABLE `ticket` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(11) DEFAULT NULL COMMENT '自增ID, 10001++',
  4. `ticketId` varchar(255) DEFAULT NULL COMMENT '工单ID; T10001',
  5. `ticketBizId` varchar(255) DEFAULT NULL COMMENT '业务ID; 采购订单ID、销售订单ID',
  6. `ticketType` varchar(255) DEFAULT NULL COMMENT '工单类型; 采购付款、销售收款、采购入库、采购资产入库、资产入库、销售出库',
  7. `ticketDesc` varchar(255) DEFAULT NULL COMMENT '工单描述;',
  8. `ticketContentRequest` text COMMENT '申请内容; {}',
  9. `ticketContent` text COMMENT '完成内容; {}',
  10. `ticketCommentList` text COMMENT '评论列表; [{}, {}] (后期再做)',
  11. `ticketAmount` int(11) DEFAULT NULL COMMENT '工单处理金额',
  12. `ticketRequestAmount` int(11) DEFAULT NULL COMMENT '申请金额',
  13. `ticketRequestAt` varchar(255) DEFAULT NULL COMMENT '申请时间; E.g: 2021-05-28T10:24:54+08:00',
  14. `ticketRequestByUserId` varchar(255) DEFAULT NULL COMMENT '申请人Id',
  15. `ticketRequestByUser` varchar(255) DEFAULT NULL COMMENT '申请人',
  16. `ticketStatus` varchar(255) DEFAULT '申请' COMMENT '工单状态; 申请、处理中、完成、拒绝',
  17. `ticketStatusAt` varchar(255) DEFAULT NULL COMMENT '处理时间; E.g: 2021-05-28T10:24:54+08:00',
  18. `ticketStatusDesc` varchar(255) DEFAULT NULL COMMENT '处理描述; 拒绝描述',
  19. `ticketStatusByUserId` varchar(255) DEFAULT NULL COMMENT '处理人Id',
  20. `ticketStatusByUser` varchar(255) DEFAULT NULL COMMENT '处理人',
  21. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  22. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  23. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  24. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  25. PRIMARY KEY (`id`) USING BTREE
  26. ) ENGINE = InnoDB AUTO_INCREMENT = 25 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '工单表;'

voucher

  • 凭证表
  1. CREATE TABLE `voucher` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `periodId` varchar(255) DEFAULT NULL COMMENT '会计期间; E.g: 2023-03',
  4. `ticketIdList` varchar(255) DEFAULT NULL COMMENT '工单ID; 用‘,’分隔',
  5. `voucherName` varchar(255) DEFAULT NULL COMMENT '凭证字; 记2022',
  6. `voucherNumber` int(11) DEFAULT NULL COMMENT '凭证号; 10001',
  7. `voucherId` varchar(255) DEFAULT NULL COMMENT '凭证字号; periodId + voucherName + voucherNumber',
  8. `voucherType` varchar(255) DEFAULT '普通凭证' COMMENT '凭证类型; 普通凭证、结转凭证',
  9. `voucherTemplateId` varchar(255) DEFAULT NULL COMMENT '凭证模板ID;',
  10. `voucherTemplateName` varchar(255) DEFAULT NULL COMMENT '凭证模板名称;',
  11. `voucherAccountant` varchar(255) DEFAULT '' COMMENT '制单人',
  12. `voucherAudit` varchar(255) DEFAULT '' COMMENT '审核人; 预留字段',
  13. `voucherDebitSum` decimal(10, 2) DEFAULT NULL COMMENT '借方总额',
  14. `voucherCreditSum` decimal(10, 2) DEFAULT NULL COMMENT '贷方总额',
  15. `voucherAt` varchar(255) DEFAULT NULL COMMENT '凭证时间; E.g: 2021-05-28',
  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 `voucherId_unique` (`voucherId`) USING BTREE
  22. ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '凭证表'

voucher_entry

  • 凭证条目表
  1. CREATE TABLE `voucher_entry` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `voucherId` varchar(255) DEFAULT NULL COMMENT '凭证Id;',
  4. `subjectId` varchar(255) DEFAULT NULL COMMENT '科目id;',
  5. `subjectName` varchar(255) DEFAULT NULL COMMENT '科目名称;',
  6. `entryAbstract` varchar(255) DEFAULT NULL COMMENT '摘要',
  7. `debit` decimal(14, 2) DEFAULT '0.00' COMMENT '借方金额',
  8. `credit` decimal(14, 2) DEFAULT '0.00' COMMENT '贷方金额',
  9. `assistIdOfCustomer` varchar(255) DEFAULT NULL COMMENT '辅助核算-客户Id',
  10. `assistIdOfSupplier` varchar(255) DEFAULT NULL COMMENT '辅助核算-供应商Id',
  11. `assistIdOfStaff` varchar(255) DEFAULT NULL COMMENT '辅助核算-员工Id',
  12. `assistIdOfProject` varchar(255) DEFAULT NULL COMMENT '辅助核算-项目Id',
  13. `assistIdOfDepart` varchar(255) DEFAULT NULL COMMENT '辅助核算-部门Id',
  14. `assistIdOfExtend1` varchar(255) DEFAULT NULL COMMENT '辅助核算-拓展1; 预留字段 assist_bank',
  15. `assistIdOfExtend2` varchar(255) DEFAULT NULL COMMENT '辅助核算-拓展2; 预留字段',
  16. `assistNameOfCustomer` varchar(255) DEFAULT NULL,
  17. `assistNameOfSupplier` varchar(255) DEFAULT NULL,
  18. `assistNameOfStaff` varchar(255) DEFAULT NULL,
  19. `assistNameOfProject` varchar(255) DEFAULT NULL,
  20. `assistNameOfDepart` varchar(255) DEFAULT NULL,
  21. `assistNameOfExtend1` varchar(255) DEFAULT NULL,
  22. `assistNameOfExtend2` varchar(255) DEFAULT NULL,
  23. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  24. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  25. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  26. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  27. PRIMARY KEY (`id`) USING BTREE
  28. ) ENGINE = InnoDB AUTO_INCREMENT = 143 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '凭证条目表'

warehouse_asset

  • 仓库-资产表
  1. CREATE TABLE `warehouse_asset` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(255) DEFAULT NULL COMMENT '顺序id; 10001++',
  4. `assetId` varchar(255) DEFAULT NULL COMMENT '资产ID; ZC10001',
  5. `assetName` varchar(255) DEFAULT NULL COMMENT '资产;',
  6. `warehouseName` varchar(255) DEFAULT NULL COMMENT '仓库',
  7. `stockName` varchar(255) DEFAULT NULL COMMENT '货架',
  8. `assetUnit` varchar(255) DEFAULT NULL COMMENT '单位;',
  9. `assetSpec` varchar(255) DEFAULT NULL COMMENT '规格;',
  10. `assetSpecPrice` decimal(10, 0) DEFAULT NULL COMMENT '价格;',
  11. `purchaseAssetSpecPriceWithoutTax` decimal(10, 2) DEFAULT NULL COMMENT '产品去税价格',
  12. `purchaseAssetTaxRate` decimal(10, 2) DEFAULT NULL COMMENT '产品税率',
  13. `purchaseAssetTaxPrice` decimal(10, 2) DEFAULT NULL COMMENT '产品税额',
  14. `purchaseAssetSpecPrice` decimal(10, 2) DEFAULT NULL COMMENT '产品价格',
  15. `assetType` varchar(255) DEFAULT NULL COMMENT '类型;',
  16. `assetTransport` varchar(255) DEFAULT NULL COMMENT '储运条件;',
  17. `assetStatus` varchar(255) DEFAULT NULL COMMENT '资产状态;在库,已领用,已报废,维修中',
  18. `assetUser` varchar(255) DEFAULT NULL COMMENT '资产最新相关人',
  19. `supplierId` varchar(255) DEFAULT NULL COMMENT '供货商ID',
  20. `supplierName` varchar(255) DEFAULT NULL COMMENT '供货商',
  21. `manufacturerName` varchar(255) DEFAULT NULL COMMENT '生产厂家',
  22. `manufacturerProductRCNum` varchar(255) DEFAULT NULL COMMENT '生产厂家-产品注册证号;',
  23. `inventoryInType` varchar(255) DEFAULT NULL COMMENT '入库类型; 采购入库',
  24. `inventoryInOrderId` varchar(255) DEFAULT NULL COMMENT '入库关联订单ID',
  25. `inventoryInAt` varchar(255) DEFAULT NULL COMMENT '入库时间; E.g: 2021-05-28T10:24:54+08:00',
  26. `productionBatchNum` varchar(255) DEFAULT NULL COMMENT '生产批号;',
  27. `productionAt` varchar(255) DEFAULT NULL COMMENT '生产日期; E.g: 2021-05-28T10:24:54+08:00',
  28. `expirationAt` varchar(255) DEFAULT NULL COMMENT '有效期至; E.g: 2021-05-28T10:24:54+08:00',
  29. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  30. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  31. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  32. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  33. PRIMARY KEY (`id`) USING BTREE
  34. ) ENGINE = InnoDB AUTO_INCREMENT = 16 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '仓库-资产表'

warehouse_asset_record

  • 仓库-资产表-记录表
  1. CREATE TABLE `warehouse_asset_record` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `idSequence` int(255) DEFAULT NULL COMMENT '顺序id; 1++',
  4. `assetRecordId` varchar(255) DEFAULT NULL COMMENT '资产操作ID; ZC10001-001',
  5. `ticketId` varchar(255) DEFAULT NULL COMMENT '申请单号',
  6. `assetId` varchar(255) DEFAULT NULL COMMENT '资产ID; ZC10001',
  7. `assetName` varchar(255) DEFAULT NULL COMMENT '资产;',
  8. `assetUnit` varchar(255) DEFAULT NULL COMMENT '单位;',
  9. `assetSpec` varchar(255) DEFAULT NULL COMMENT '规格;',
  10. `assetUser` varchar(255) DEFAULT NULL COMMENT '资产相关人',
  11. `warehouseName` varchar(255) DEFAULT NULL COMMENT '仓库',
  12. `stockName` varchar(255) DEFAULT NULL COMMENT '货架',
  13. `assetSpecPrice` decimal(10, 0) DEFAULT NULL COMMENT '价格;',
  14. `supplierId` varchar(255) DEFAULT NULL COMMENT '供货商ID',
  15. `supplierName` varchar(255) DEFAULT NULL COMMENT '供货商',
  16. `assetTransport` varchar(255) DEFAULT NULL COMMENT '储运条件;',
  17. `manufacturerName` varchar(255) DEFAULT NULL COMMENT '生产厂家',
  18. `manufacturerProductRCNum` varchar(255) DEFAULT NULL COMMENT '生产厂家-产品注册证号;',
  19. `operationType` varchar(255) DEFAULT NULL COMMENT '操作类型;',
  20. `operationTypeOrderId` varchar(255) DEFAULT NULL COMMENT '操作类型对应的订单ID;',
  21. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  22. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  23. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  24. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  25. PRIMARY KEY (`id`) USING BTREE
  26. ) ENGINE = InnoDB AUTO_INCREMENT = 21 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '仓库-资产表-记录表'

warehouse_inventory

  • 仓库-库存表(产品库存)
  1. CREATE TABLE `warehouse_inventory` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `inventoryId` varchar(255) DEFAULT NULL COMMENT '库存ID; 230603-022713-01 YYMMDD-ddhhss-XX',
  4. `ticketId` varchar(255) DEFAULT NULL COMMENT '工单id',
  5. `productName` varchar(255) DEFAULT NULL COMMENT '产品;',
  6. `warehouseName` varchar(255) DEFAULT NULL COMMENT '仓库',
  7. `stockName` varchar(255) DEFAULT NULL COMMENT '货架',
  8. `count` int(11) DEFAULT NULL COMMENT '数量',
  9. `countOfInventoryIn` int(11) DEFAULT NULL COMMENT '入库数量',
  10. `productUnit` varchar(255) DEFAULT NULL COMMENT '产品单位;',
  11. `productSpec` varchar(255) DEFAULT NULL COMMENT '产品规格;',
  12. `productSpecPrice` decimal(10, 0) DEFAULT NULL COMMENT '产品价格;',
  13. `purchaseProductSpecPriceWithoutTax` decimal(10, 2) DEFAULT NULL COMMENT '产品去税价格',
  14. `purchaseProductTaxRate` decimal(10, 2) DEFAULT NULL COMMENT '产品税率',
  15. `purchaseProductTaxPrice` decimal(10, 2) DEFAULT NULL COMMENT '产品税额',
  16. `purchaseProductSpecPrice` decimal(10, 2) DEFAULT NULL COMMENT '产品价格;',
  17. `purchaseProductTotalAmount` decimal(10, 2) DEFAULT NULL COMMENT '含税总金额',
  18. `purchaseProductTotalAmountWithoutTax` decimal(10, 2) DEFAULT NULL COMMENT '不含税总金额',
  19. `productType` varchar(255) DEFAULT NULL COMMENT '产品类型;',
  20. `productTransport` varchar(255) DEFAULT NULL COMMENT '储运条件;',
  21. `supplierId` varchar(255) DEFAULT NULL COMMENT '供货商ID',
  22. `supplierName` varchar(255) DEFAULT NULL COMMENT '供货商',
  23. `manufacturerName` varchar(255) DEFAULT NULL COMMENT '生产厂家',
  24. `inventoryInType` varchar(255) DEFAULT NULL COMMENT '入库类型; 采购入库',
  25. `inventoryInOrderId` varchar(255) DEFAULT NULL COMMENT '入库关联订单ID',
  26. `inventoryInAt` varchar(255) DEFAULT NULL COMMENT '入库时间; E.g: 2021-05-28T10:24:54+08:00',
  27. `productionBatchNum` varchar(255) DEFAULT NULL COMMENT '生产批号;',
  28. `productionAt` varchar(255) DEFAULT NULL COMMENT '生产日期; E.g: 2021-05-28T10:24:54+08:00',
  29. `expirationAt` varchar(255) DEFAULT NULL COMMENT '有效期至; E.g: 2021-05-28T10:24:54+08:00',
  30. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  31. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  32. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  33. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  34. `manufacturerProductRCNum` varchar(255) DEFAULT NULL COMMENT '生产厂家-产品注册证号;',
  35. PRIMARY KEY (`id`) USING BTREE
  36. ) ENGINE = InnoDB AUTO_INCREMENT = 4 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '仓库-库存表(产品库存)'

warehouse_inventory_record

  • 仓库-库存表-记录表
  1. CREATE TABLE `warehouse_inventory_record` (
  2. `id` int(11) NOT NULL AUTO_INCREMENT,
  3. `inventoryId` varchar(255) DEFAULT NULL COMMENT '库存ID',
  4. `inventoryRecordId` varchar(255) DEFAULT NULL COMMENT '库存ID; 库存ID-0XX',
  5. `ticketId` varchar(255) DEFAULT NULL COMMENT '工单id',
  6. `warehouseName` varchar(255) DEFAULT NULL COMMENT '仓库',
  7. `stockName` varchar(255) DEFAULT NULL COMMENT '货架',
  8. `operationCount` int(11) DEFAULT NULL COMMENT '操作数量',
  9. `operationType` varchar(255) DEFAULT NULL COMMENT '操作类型',
  10. `operationTypeOrderId` varchar(255) DEFAULT NULL COMMENT '操作类型对应的订单ID',
  11. `operationTargetCompanyName` varchar(255) DEFAULT NULL COMMENT '操作对象; 客户/供货商',
  12. `operationTargetCompanyAddress` varchar(255) DEFAULT NULL COMMENT '操作对象地址; 客户或者供货商',
  13. `productName` varchar(255) DEFAULT NULL COMMENT '产品;',
  14. `productUnit` varchar(255) DEFAULT NULL COMMENT '产品单位;',
  15. `productSpec` varchar(255) DEFAULT NULL COMMENT '产品规格;',
  16. `productSpecPrice` decimal(10, 0) DEFAULT NULL COMMENT '产品价格;',
  17. `purchaseProductSpecPriceWithoutTax` decimal(10, 2) DEFAULT NULL COMMENT '产品去税价格',
  18. `purchaseProductTaxRate` decimal(10, 2) DEFAULT NULL COMMENT '产品税率',
  19. `purchaseProductTaxPrice` decimal(10, 2) DEFAULT NULL COMMENT '产品税额',
  20. `purchaseProductSpecPrice` decimal(10, 2) DEFAULT NULL COMMENT '产品价格;',
  21. `purchaseProductTotalAmount` decimal(10, 2) DEFAULT NULL COMMENT '含税总金额',
  22. `purchaseProductTotalAmountWithoutTax` decimal(10, 2) DEFAULT NULL COMMENT '不含税总金额',
  23. `productType` varchar(255) DEFAULT NULL COMMENT '产品类型;',
  24. `productTransport` varchar(255) DEFAULT NULL COMMENT '储运条件;',
  25. `supplierId` varchar(255) DEFAULT NULL COMMENT '供货商ID',
  26. `supplierName` varchar(255) DEFAULT NULL COMMENT '供货商',
  27. `manufacturerName` varchar(255) DEFAULT NULL COMMENT '生产厂家',
  28. `manufacturerProductRCNum` varchar(255) DEFAULT NULL COMMENT '生产厂家-产品注册证号;',
  29. `productionBatchNum` varchar(255) DEFAULT NULL COMMENT '生产批号',
  30. `productionAt` varchar(255) DEFAULT NULL COMMENT '生产日期; E.g: 2021-05-28T10:24:54+08:00',
  31. `expirationAt` varchar(255) DEFAULT NULL COMMENT '有效期至; E.g: 2021-05-28T10:24:54+08:00',
  32. `operation` varchar(255) DEFAULT 'insert' COMMENT '操作; insert, update, jhInsert, jhUpdate, jhDelete jhRestore',
  33. `operationByUserId` varchar(255) DEFAULT NULL COMMENT '操作者userId',
  34. `operationByUser` varchar(255) DEFAULT NULL COMMENT '操作者用户名',
  35. `operationAt` varchar(255) DEFAULT NULL COMMENT '操作时间; E.g: 2021-05-28T10:24:54+08:00 ',
  36. PRIMARY KEY (`id`) USING BTREE,
  37. UNIQUE KEY `inventoryRecordId_unique` (`inventoryRecordId`) USING BTREE
  38. ) ENGINE = InnoDB AUTO_INCREMENT = 8 DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '仓库-库存表-记录表'

视图

_directory_user_session

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_directory_user_session` AS
  2. select
  3. `lms_data_repository`.`enterprise_directory_user_session`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_directory_user_session`.`userId` AS `userId`,
  5. `lms_data_repository`.`enterprise_directory_user_session`.`userIp` AS `userIp`,
  6. `lms_data_repository`.`enterprise_directory_user_session`.`userIpRegion` AS `userIpRegion`,
  7. `lms_data_repository`.`enterprise_directory_user_session`.`userAgent` AS `userAgent`,
  8. `lms_data_repository`.`enterprise_directory_user_session`.`deviceId` AS `deviceId`,
  9. `lms_data_repository`.`enterprise_directory_user_session`.`deviceType` AS `deviceType`,
  10. `lms_data_repository`.`enterprise_directory_user_session`.`socketStatus` AS `socketStatus`,
  11. `lms_data_repository`.`enterprise_directory_user_session`.`authToken` AS `authToken`,
  12. `lms_data_repository`.`enterprise_directory_user_session`.`operation` AS `operation`,
  13. `lms_data_repository`.`enterprise_directory_user_session`.`operationByUserId` AS `operationByUserId`,
  14. `lms_data_repository`.`enterprise_directory_user_session`.`operationByUser` AS `operationByUser`,
  15. `lms_data_repository`.`enterprise_directory_user_session`.`operationAt` AS `operationAt`
  16. from
  17. `lms_data_repository`.`enterprise_directory_user_session`

_group

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_group` AS
  2. select
  3. `lms_data_repository`.`enterprise_group`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_group`.`groupId` AS `groupId`,
  5. `lms_data_repository`.`enterprise_group`.`groupLastId` AS `groupLastId`,
  6. `lms_data_repository`.`enterprise_group`.`groupPath` AS `groupPath`,
  7. `lms_data_repository`.`enterprise_group`.`groupName` AS `groupName`,
  8. `lms_data_repository`.`enterprise_group`.`groupDeptName` AS `groupDeptName`,
  9. `lms_data_repository`.`enterprise_group`.`groupAllName` AS `groupAllName`,
  10. `lms_data_repository`.`enterprise_group`.`principalId` AS `principalId`,
  11. `lms_data_repository`.`enterprise_group`.`headId` AS `headId`,
  12. `lms_data_repository`.`enterprise_group`.`leadId` AS `leadId`,
  13. `lms_data_repository`.`enterprise_group`.`groupDesc` AS `groupDesc`,
  14. `lms_data_repository`.`enterprise_group`.`operation` AS `operation`,
  15. `lms_data_repository`.`enterprise_group`.`operationByUserId` AS `operationByUserId`,
  16. `lms_data_repository`.`enterprise_group`.`operationByUser` AS `operationByUser`,
  17. `lms_data_repository`.`enterprise_group`.`operationAt` AS `operationAt`
  18. from
  19. `lms_data_repository`.`enterprise_group`

_role

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_role` AS
  2. select
  3. `lms_data_repository`.`enterprise_role`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_role`.`roleId` AS `roleId`,
  5. `lms_data_repository`.`enterprise_role`.`roleName` AS `roleName`,
  6. `lms_data_repository`.`enterprise_role`.`roleType` AS `roleType`,
  7. `lms_data_repository`.`enterprise_role`.`roleDesc` AS `roleDesc`,
  8. `lms_data_repository`.`enterprise_role`.`operation` AS `operation`,
  9. `lms_data_repository`.`enterprise_role`.`operationByUserId` AS `operationByUserId`,
  10. `lms_data_repository`.`enterprise_role`.`operationByUser` AS `operationByUser`,
  11. `lms_data_repository`.`enterprise_role`.`operationAt` AS `operationAt`
  12. from
  13. `lms_data_repository`.`enterprise_role`

_user_group_role

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_user_group_role` AS
  2. select
  3. `lms_data_repository`.`enterprise_user_group_role`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_user_group_role`.`userId` AS `userId`,
  5. `lms_data_repository`.`enterprise_user_group_role`.`groupId` AS `groupId`,
  6. `lms_data_repository`.`enterprise_user_group_role`.`roleId` AS `roleId`,
  7. `lms_data_repository`.`enterprise_user_group_role`.`roleDeadline` AS `roleDeadline`,
  8. `lms_data_repository`.`enterprise_user_group_role`.`operation` AS `operation`,
  9. `lms_data_repository`.`enterprise_user_group_role`.`operationByUserId` AS `operationByUserId`,
  10. `lms_data_repository`.`enterprise_user_group_role`.`operationByUser` AS `operationByUser`,
  11. `lms_data_repository`.`enterprise_user_group_role`.`operationAt` AS `operationAt`
  12. from
  13. `lms_data_repository`.`enterprise_user_group_role`

_user_group_role_page

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_user_group_role_page` AS
  2. select
  3. `lms_data_repository`.`enterprise_user_group_role_page`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_user_group_role_page`.`appId` AS `appId`,
  5. `lms_data_repository`.`enterprise_user_group_role_page`.`user` AS `user`,
  6. `lms_data_repository`.`enterprise_user_group_role_page`.`group` AS `group`,
  7. `lms_data_repository`.`enterprise_user_group_role_page`.`role` AS `role`,
  8. `lms_data_repository`.`enterprise_user_group_role_page`.`page` AS `page`,
  9. `lms_data_repository`.`enterprise_user_group_role_page`.`allowOrDeny` AS `allowOrDeny`,
  10. `lms_data_repository`.`enterprise_user_group_role_page`.`desc` AS `desc`,
  11. `lms_data_repository`.`enterprise_user_group_role_page`.`source` AS `source`,
  12. `lms_data_repository`.`enterprise_user_group_role_page`.`operation` AS `operation`,
  13. `lms_data_repository`.`enterprise_user_group_role_page`.`operationByUserId` AS `operationByUserId`,
  14. `lms_data_repository`.`enterprise_user_group_role_page`.`operationByUser` AS `operationByUser`,
  15. `lms_data_repository`.`enterprise_user_group_role_page`.`operationAt` AS `operationAt`
  16. from
  17. `lms_data_repository`.`enterprise_user_group_role_page`
  18. where
  19. (
  20. (
  21. `lms_data_repository`.`enterprise_user_group_role_page`.`appId` = 'lms-erp'
  22. )
  23. or (
  24. `lms_data_repository`.`enterprise_user_group_role_page`.`appId` = '*'
  25. )
  26. )

_user_group_role_resource

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_user_group_role_resource` AS
  2. select
  3. `lms_data_repository`.`enterprise_user_group_role_resource`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_user_group_role_resource`.`appId` AS `appId`,
  5. `lms_data_repository`.`enterprise_user_group_role_resource`.`user` AS `user`,
  6. `lms_data_repository`.`enterprise_user_group_role_resource`.`group` AS `group`,
  7. `lms_data_repository`.`enterprise_user_group_role_resource`.`role` AS `role`,
  8. `lms_data_repository`.`enterprise_user_group_role_resource`.`resource` AS `resource`,
  9. `lms_data_repository`.`enterprise_user_group_role_resource`.`allowOrDeny` AS `allowOrDeny`,
  10. `lms_data_repository`.`enterprise_user_group_role_resource`.`desc` AS `desc`,
  11. `lms_data_repository`.`enterprise_user_group_role_resource`.`source` AS `source`,
  12. `lms_data_repository`.`enterprise_user_group_role_resource`.`operation` AS `operation`,
  13. `lms_data_repository`.`enterprise_user_group_role_resource`.`operationByUserId` AS `operationByUserId`,
  14. `lms_data_repository`.`enterprise_user_group_role_resource`.`operationByUser` AS `operationByUser`,
  15. `lms_data_repository`.`enterprise_user_group_role_resource`.`operationAt` AS `operationAt`
  16. from
  17. `lms_data_repository`.`enterprise_user_group_role_resource`
  18. where
  19. (
  20. (
  21. `lms_data_repository`.`enterprise_user_group_role_resource`.`appId` = 'lms-erp'
  22. )
  23. or (
  24. `lms_data_repository`.`enterprise_user_group_role_resource`.`appId` = '*'
  25. )
  26. )

_view01_user

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `_view01_user` AS
  2. select
  3. `lms_data_repository`.`enterprise_view01_user`.`id` AS `id`,
  4. `lms_data_repository`.`enterprise_view01_user`.`idSequence` AS `idSequence`,
  5. `lms_data_repository`.`enterprise_view01_user`.`userId` AS `userId`,
  6. `lms_data_repository`.`enterprise_view01_user`.`username` AS `username`,
  7. `lms_data_repository`.`enterprise_view01_user`.`phoneNumber` AS `phoneNumber`,
  8. `lms_data_repository`.`enterprise_view01_user`.`email` AS `email`,
  9. `lms_data_repository`.`enterprise_view01_user`.`userStatus` AS `userStatus`,
  10. `lms_data_repository`.`enterprise_view01_user`.`qiweiId` AS `qiweiId`,
  11. `lms_data_repository`.`enterprise_view01_user`.`userConfig` AS `userConfig`,
  12. `lms_data_repository`.`enterprise_view01_user`.`password` AS `password`,
  13. `lms_data_repository`.`enterprise_view01_user`.`md5Salt` AS `md5Salt`,
  14. `lms_data_repository`.`enterprise_view01_user`.`clearTextPassword` AS `clearTextPassword`,
  15. `lms_data_repository`.`enterprise_view01_user`.`operation` AS `operation`,
  16. `lms_data_repository`.`enterprise_view01_user`.`operationByUserId` AS `operationByUserId`,
  17. `lms_data_repository`.`enterprise_view01_user`.`operationByUser` AS `operationByUser`,
  18. `lms_data_repository`.`enterprise_view01_user`.`operationAt` AS `operationAt`
  19. from
  20. `lms_data_repository`.`enterprise_view01_user`

_view02_user_app

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

view01_asset_list_for_apply

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_asset_list_for_apply` AS
  2. select
  3. `warehouse_asset`.`assetName` AS `assetName`,
  4. group_concat(
  5. distinct `warehouse_asset`.`assetSpec` separator ','
  6. ) AS `assetSpecList`,
  7. count(1) AS `assetCount`
  8. from
  9. `warehouse_asset`
  10. group by
  11. `warehouse_asset`.`assetName`

view01_customer_sale_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_customer_sale_order` AS
  2. select
  3. `sale_order`.`id` AS `id`,
  4. `sale_order`.`saleOrderId` AS `saleOrderId`,
  5. `sale_order`.`customerId` AS `customerId`,
  6. `sale_order`.`customerName` AS `customerName`,
  7. `sale_order`.`saleOrderDesc` AS `saleOrderDesc`,
  8. `sale_order`.`saleProductList` AS `saleProductList`,
  9. `sale_order`.`saleProductListCount` AS `saleProductListCount`,
  10. `sale_order`.`saleProductTotalCount` AS `saleProductTotalCount`,
  11. `sale_order`.`saleTotalAmount` AS `saleTotalAmount`,
  12. `sale_order`.`saleOrderStatus` AS `saleOrderStatus`,
  13. `sale_order`.`saleOrderStatusDesc` AS `saleOrderStatusDesc`,
  14. `sale_order`.`saleCreateAt` AS `saleCreateAt`,
  15. `sale_order`.`saleFinishAt` AS `saleFinishAt`,
  16. `sale_order`.`operation` AS `operation`,
  17. `sale_order`.`operationByUserId` AS `operationByUserId`,
  18. `sale_order`.`operationByUser` AS `operationByUser`,
  19. `sale_order`.`operationAt` AS `operationAt`,
  20. `customer`.`customerAddress` AS `customerAddress`
  21. from
  22. (
  23. `customer`
  24. join `sale_order` on (
  25. (
  26. `customer`.`customerId` = `sale_order`.`customerId`
  27. )
  28. )
  29. )

view01_customer_sale_return_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_customer_sale_return_order` AS
  2. select
  3. `sale_return_order`.`id` AS `id`,
  4. `sale_return_order`.`returnOrderId` AS `returnOrderId`,
  5. `sale_return_order`.`customerId` AS `customerId`,
  6. `sale_return_order`.`customerName` AS `customerName`,
  7. `sale_return_order`.`returnOrderDesc` AS `returnOrderDesc`,
  8. `sale_return_order`.`returnProductList` AS `returnProductList`,
  9. `sale_return_order`.`returnProductListCount` AS `returnProductListCount`,
  10. `sale_return_order`.`returnProductTotalCount` AS `returnProductTotalCount`,
  11. `sale_return_order`.`returnTotalAmount` AS `returnTotalAmount`,
  12. `sale_return_order`.`returnOrderStatus` AS `returnOrderStatus`,
  13. `sale_return_order`.`returnCreateAt` AS `returnCreateAt`,
  14. `sale_return_order`.`returnFinishAt` AS `returnFinishAt`,
  15. `sale_return_order`.`operation` AS `operation`,
  16. `sale_return_order`.`operationByUserId` AS `operationByUserId`,
  17. `sale_return_order`.`operationByUser` AS `operationByUser`,
  18. `sale_return_order`.`operationAt` AS `operationAt`,
  19. `customer`.`customerAddress` AS `customerAddress`
  20. from
  21. (
  22. `customer`
  23. join `sale_return_order` on (
  24. (
  25. `customer`.`customerId` = `sale_return_order`.`customerId`
  26. )
  27. )
  28. )

view01_finance_asset_info

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_finance_asset_info` AS
  2. select
  3. `finance_asset`.`id` AS `id`,
  4. `finance_asset`.`idSequence` AS `idSequence`,
  5. `warehouse_asset`.`assetId` AS `assetId`,
  6. `warehouse_asset`.`assetName` AS `assetName`,
  7. `finance_asset`.`currentPeriod` AS `currentPeriod`,
  8. `finance_asset`.`depreciationMethod` AS `depreciationMethod`,
  9. `finance_asset`.`financeAssetSubject` AS `financeAssetSubject`,
  10. `finance_asset`.`financeDepreciationSubject` AS `financeDepreciationSubject`,
  11. `finance_asset`.`financeClearSubject` AS `financeClearSubject`,
  12. `finance_asset`.`financeDepreciationFeeSubject` AS `financeDepreciationFeeSubject`,
  13. `finance_asset`.`startUseAt` AS `startUseAt`,
  14. `finance_asset`.`assetValue` AS `assetValue`,
  15. `finance_asset`.`residualRate` AS `residualRate`,
  16. `finance_asset`.`estimatedUseMonth` AS `estimatedUseMonth`,
  17. `finance_asset`.`depreciatedMonths` AS `depreciatedMonths`,
  18. `finance_asset`.`remainingMonth` AS `remainingMonth`,
  19. `finance_asset`.`monthlyDepreciation` AS `monthlyDepreciation`,
  20. `finance_asset`.`totalDepreciation` AS `totalDepreciation`,
  21. `finance_asset`.`currentYearDepreciation` AS `currentYearDepreciation`,
  22. `finance_asset`.`preYearDepreciation` AS `preYearDepreciation`,
  23. `finance_asset`.`currentPeriodDepreciation` AS `currentPeriodDepreciation`,
  24. `finance_asset`.`operation` AS `operation`,
  25. `finance_asset`.`operationByUserId` AS `operationByUserId`,
  26. `finance_asset`.`operationByUser` AS `operationByUser`,
  27. `finance_asset`.`operationAt` AS `operationAt`
  28. from
  29. (
  30. `warehouse_asset`
  31. left join `finance_asset` on (
  32. (
  33. `warehouse_asset`.`assetId` = `finance_asset`.`assetId`
  34. )
  35. )
  36. )

view01_next_voucher_number

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_next_voucher_number` AS
  2. select
  3. `voucher`.`periodId` AS `periodId`,
  4. (max(`voucher`.`voucherNumber`) + 1) AS `maxVoucherNumber`
  5. from
  6. `voucher`
  7. group by
  8. `voucher`.`periodId`

view01_period_voucher

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_period_voucher` AS
  2. select
  3. `finance_period`.`id` AS `id`,
  4. `finance_period`.`periodId` AS `periodId`,
  5. `finance_period`.`isDepreciation` AS `isDepreciation`,
  6. `finance_period`.`isPeriodStart` AS `isPeriodStart`,
  7. `voucher`.`voucherName` AS `voucherName`,
  8. `voucher`.`voucherNumber` AS `voucherNumber`,
  9. `voucher`.`voucherId` AS `voucherId`,
  10. `voucher`.`voucherType` AS `voucherType`,
  11. `voucher`.`voucherDebitSum` AS `voucherDebitSum`,
  12. `voucher`.`voucherCreditSum` AS `voucherCreditSum`,
  13. `voucher`.`voucherAt` AS `voucherAt`,
  14. `voucher`.`operation` AS `operation`,
  15. `voucher`.`operationByUser` AS `operationByUser`,
  16. `voucher`.`operationAt` AS `operationAt`
  17. from
  18. (
  19. `finance_period`
  20. left join `voucher` on (
  21. (
  22. `finance_period`.`depreciationVoucherId` = `voucher`.`voucherId`
  23. )
  24. )
  25. )

view01_purchase_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_purchase_order` AS
  2. select
  3. `purchase_order`.`id` AS `id`,
  4. `purchase_order`.`idSequence` AS `idSequence`,
  5. `purchase_order`.`purchaseOrderId` AS `purchaseOrderId`,
  6. `purchase_order`.`supplierId` AS `supplierId`,
  7. `purchase_order`.`supplierName` AS `supplierName`,
  8. `purchase_order`.`supplierInfo` AS `supplierInfo`,
  9. `purchase_order`.`purchaseOrderDesc` AS `purchaseOrderDesc`,
  10. `purchase_order`.`purchaseProductList` AS `purchaseProductList`,
  11. `purchase_order`.`purchaseProductListCount` AS `purchaseProductListCount`,
  12. `purchase_order`.`purchaseProductTotalCount` AS `purchaseProductTotalCount`,
  13. `purchase_order`.`purchaseTotalAmount` AS `purchaseTotalAmount`,
  14. `purchase_order`.`purchaseOrderStatus` AS `purchaseOrderStatus`,
  15. `purchase_order`.`purchaseOrderStatusDesc` AS `purchaseOrderStatusDesc`,
  16. `purchase_order`.`purchaseCreateAt` AS `purchaseCreateAt`,
  17. `purchase_order`.`purchaseFinishAt` AS `purchaseFinishAt`,
  18. `purchase_order`.`operation` AS `operation`,
  19. `purchase_order`.`operationByUserId` AS `operationByUserId`,
  20. `purchase_order`.`operationByUser` AS `operationByUser`,
  21. `purchase_order`.`operationAt` AS `operationAt`,
  22. ifnull(
  23. (
  24. select
  25. sum(`warehouse_inventory`.`count`)
  26. from
  27. `warehouse_inventory`
  28. where
  29. (
  30. `warehouse_inventory`.`inventoryInOrderId` = `purchase_order`.`purchaseOrderId`
  31. )
  32. ),
  33. 0
  34. ) AS `inventoryCount`,
  35. ifnull(
  36. (
  37. select
  38. sum(`payment_order`.`deductionAmount`)
  39. from
  40. `payment_order`
  41. where
  42. (
  43. (
  44. `payment_order`.`orderId` = `purchase_order`.`purchaseOrderId`
  45. )
  46. and (`payment_order`.`paymentType` = '付款')
  47. )
  48. ),
  49. 0
  50. ) AS `purchasePaidAmount`,
  51. ifnull(
  52. (
  53. select
  54. sum(`warehouse_inventory_record`.`operationCount`)
  55. from
  56. `warehouse_inventory_record`
  57. where
  58. (
  59. `warehouse_inventory_record`.`operationTypeOrderId` = `purchase_order`.`purchaseOrderId`
  60. )
  61. ),
  62. 0
  63. ) AS `purchaseProductInStoreCount`,
  64. `purchase_order`.`purchaseOrderType` AS `purchaseOrderType`
  65. from
  66. `purchase_order`

view01_purchase_order_v2

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_purchase_order_v2` AS
  2. select
  3. `purchase_order`.`id` AS `id`,
  4. `purchase_order`.`idSequence` AS `idSequence`,
  5. `purchase_order`.`purchaseOrderId` AS `purchaseOrderId`,
  6. `purchase_order`.`supplierId` AS `supplierId`,
  7. `purchase_order`.`supplierName` AS `supplierName`,
  8. `purchase_order`.`supplierInfo` AS `supplierInfo`,
  9. `purchase_order`.`purchaseOrderDesc` AS `purchaseOrderDesc`,
  10. `purchase_order`.`purchaseProductList` AS `purchaseProductList`,
  11. `purchase_order`.`purchaseProductListCount` AS `purchaseProductListCount`,
  12. `purchase_order`.`purchaseProductTotalCount` AS `purchaseProductTotalCount`,
  13. `purchase_order`.`purchaseTotalAmount` AS `purchaseTotalAmount`,
  14. `purchase_order`.`purchaseOrderStatus` AS `purchaseOrderStatus`,
  15. `purchase_order`.`purchaseOrderStatusDesc` AS `purchaseOrderStatusDesc`,
  16. `purchase_order`.`purchaseCreateAt` AS `purchaseCreateAt`,
  17. `purchase_order`.`purchaseFinishAt` AS `purchaseFinishAt`,
  18. `purchase_order`.`operation` AS `operation`,
  19. `purchase_order`.`operationByUserId` AS `operationByUserId`,
  20. `purchase_order`.`operationByUser` AS `operationByUser`,
  21. `purchase_order`.`operationAt` AS `operationAt`,
  22. (
  23. select
  24. count(`warehouse_asset`.`inventoryInOrderId`)
  25. from
  26. `warehouse_asset`
  27. where
  28. (
  29. `warehouse_asset`.`inventoryInOrderId` = `purchase_order`.`purchaseOrderId`
  30. )
  31. ) AS `assetCount`,
  32. ifnull(
  33. (
  34. select
  35. sum(`warehouse_inventory`.`count`)
  36. from
  37. `warehouse_inventory`
  38. where
  39. (
  40. `warehouse_inventory`.`inventoryInOrderId` = `purchase_order`.`purchaseOrderId`
  41. )
  42. ),
  43. 0
  44. ) AS `inventoryCount`,
  45. ifnull(
  46. (
  47. select
  48. sum(`payment_order`.`deductionAmount`)
  49. from
  50. `payment_order`
  51. where
  52. (
  53. (
  54. `payment_order`.`orderId` = `purchase_order`.`purchaseOrderId`
  55. )
  56. and (`payment_order`.`paymentType` = '付款')
  57. )
  58. ),
  59. 0
  60. ) AS `purchasePaidAmount`,
  61. ifnull(
  62. (
  63. select
  64. sum(`warehouse_inventory_record`.`operationCount`)
  65. from
  66. `warehouse_inventory_record`
  67. where
  68. (
  69. `warehouse_inventory_record`.`operationTypeOrderId` = `purchase_order`.`purchaseOrderId`
  70. )
  71. ),
  72. 0
  73. ) AS `purchaseProductInStoreCount`,
  74. `purchase_order`.`purchaseOrderType` AS `purchaseOrderType`
  75. from
  76. `purchase_order`

view01_purchase_return_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_purchase_return_order` AS
  2. select
  3. `purchase_return_order`.`id` AS `id`,
  4. `purchase_return_order`.`idSequence` AS `idSequence`,
  5. `purchase_return_order`.`returnOrderId` AS `returnOrderId`,
  6. `purchase_return_order`.`supplierId` AS `supplierId`,
  7. `purchase_return_order`.`supplierName` AS `supplierName`,
  8. `purchase_return_order`.`supplierInfo` AS `supplierInfo`,
  9. `purchase_return_order`.`returnOrderDesc` AS `returnOrderDesc`,
  10. `purchase_return_order`.`returnProductList` AS `returnProductList`,
  11. `purchase_return_order`.`returnProductListCount` AS `returnProductListCount`,
  12. `purchase_return_order`.`returnProductTotalCount` AS `returnProductTotalCount`,
  13. `purchase_return_order`.`returnTotalAmount` AS `returnTotalAmount`,
  14. `purchase_return_order`.`returnOrderStatus` AS `returnOrderStatus`,
  15. `purchase_return_order`.`returnOrderStatusDesc` AS `returnOrderStatusDesc`,
  16. `purchase_return_order`.`returnCreateAt` AS `returnCreateAt`,
  17. `purchase_return_order`.`returnFinishAt` AS `returnFinishAt`,
  18. `purchase_return_order`.`returnOrderType` AS `returnOrderType`,
  19. `purchase_return_order`.`returnOrderRemark` AS `returnOrderRemark`,
  20. `purchase_return_order`.`operation` AS `operation`,
  21. `purchase_return_order`.`operationByUserId` AS `operationByUserId`,
  22. `purchase_return_order`.`operationByUser` AS `operationByUser`,
  23. `purchase_return_order`.`operationAt` AS `operationAt`,
  24. ifnull(
  25. (
  26. select
  27. sum(`payment_order`.`deductionAmount`)
  28. from
  29. `payment_order`
  30. where
  31. (
  32. (
  33. `payment_order`.`orderId` = `purchase_return_order`.`returnOrderId`
  34. )
  35. and (`payment_order`.`paymentType` = '收款')
  36. and (`payment_order`.`orderType` = '采购退货订单')
  37. )
  38. ),
  39. 0
  40. ) AS `returnPaidAmount`,
  41. ifnull(
  42. (
  43. select
  44. sum(`warehouse_inventory_record`.`operationCount`)
  45. from
  46. `warehouse_inventory_record`
  47. where
  48. (
  49. `warehouse_inventory_record`.`operationTypeOrderId` = `purchase_return_order`.`returnOrderId`
  50. )
  51. ),
  52. 0
  53. ) AS `returnProductOutStoreCount`,
  54. ifnull(
  55. (
  56. select
  57. count(`warehouse_asset_record`.`operationType`)
  58. from
  59. `warehouse_asset_record`
  60. where
  61. (
  62. `warehouse_asset_record`.`operationTypeOrderId` = `purchase_return_order`.`returnOrderId`
  63. )
  64. ),
  65. 0
  66. ) AS `returnAssetProductOutStoreCount`
  67. from
  68. `purchase_return_order`

view01_sale_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_sale_order` AS
  2. select
  3. `sale_order`.`id` AS `id`,
  4. `sale_order`.`idSequence` AS `idSequence`,
  5. `sale_order`.`saleOrderId` AS `saleOrderId`,
  6. `sale_order`.`customerId` AS `customerId`,
  7. `sale_order`.`customerName` AS `customerName`,
  8. `sale_order`.`customerInfo` AS `customerInfo`,
  9. `sale_order`.`saleOrderDesc` AS `saleOrderDesc`,
  10. `sale_order`.`saleProductList` AS `saleProductList`,
  11. `sale_order`.`saleProductListCount` AS `saleProductListCount`,
  12. `sale_order`.`saleProductTotalCount` AS `saleProductTotalCount`,
  13. `sale_order`.`saleTotalAmount` AS `saleTotalAmount`,
  14. `sale_order`.`saleOrderStatus` AS `saleOrderStatus`,
  15. `sale_order`.`saleOrderStatusDesc` AS `saleOrderStatusDesc`,
  16. `sale_order`.`saleCreateAt` AS `saleCreateAt`,
  17. `sale_order`.`saleFinishAt` AS `saleFinishAt`,
  18. `sale_order`.`operation` AS `operation`,
  19. `sale_order`.`operationByUserId` AS `operationByUserId`,
  20. `sale_order`.`operationAt` AS `operationAt`,
  21. `sale_order`.`operationByUser` AS `operationByUser`,
  22. ifnull(
  23. (
  24. select
  25. sum(`payment_order`.`deductionAmount`)
  26. from
  27. `payment_order`
  28. where
  29. (
  30. (
  31. `payment_order`.`orderId` = `sale_order`.`saleOrderId`
  32. )
  33. and (`payment_order`.`paymentType` = '收款')
  34. )
  35. ),
  36. 0
  37. ) AS `salePaidAmount`,
  38. ifnull(
  39. (
  40. select
  41. sum(`warehouse_inventory_record`.`operationCount`)
  42. from
  43. `warehouse_inventory_record`
  44. where
  45. (
  46. `warehouse_inventory_record`.`operationTypeOrderId` = `sale_order`.`saleOrderId`
  47. )
  48. ),
  49. 0
  50. ) AS `saleProductOutStoreCount`
  51. from
  52. `sale_order`

view01_sale_return_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_sale_return_order` AS
  2. select
  3. `sale_return_order`.`id` AS `id`,
  4. `sale_return_order`.`idSequence` AS `idSequence`,
  5. `sale_return_order`.`returnOrderId` AS `returnOrderId`,
  6. `sale_return_order`.`customerId` AS `customerId`,
  7. `sale_return_order`.`customerName` AS `customerName`,
  8. `sale_return_order`.`customerInfo` AS `customerInfo`,
  9. `sale_return_order`.`returnOrderDesc` AS `returnOrderDesc`,
  10. `sale_return_order`.`returnProductList` AS `returnProductList`,
  11. `sale_return_order`.`returnProductListCount` AS `returnProductListCount`,
  12. `sale_return_order`.`returnProductTotalCount` AS `returnProductTotalCount`,
  13. `sale_return_order`.`returnTotalAmount` AS `returnTotalAmount`,
  14. `sale_return_order`.`returnOrderStatus` AS `returnOrderStatus`,
  15. `sale_return_order`.`returnOrderStatusDesc` AS `returnOrderStatusDesc`,
  16. `sale_return_order`.`returnCreateAt` AS `returnCreateAt`,
  17. `sale_return_order`.`returnOrderRemark` AS `returnOrderRemark`,
  18. `sale_return_order`.`returnFinishAt` AS `returnFinishAt`,
  19. `sale_return_order`.`operation` AS `operation`,
  20. `sale_return_order`.`operationByUserId` AS `operationByUserId`,
  21. `sale_return_order`.`operationByUser` AS `operationByUser`,
  22. `sale_return_order`.`operationAt` AS `operationAt`,
  23. ifnull(
  24. (
  25. select
  26. sum(`warehouse_inventory`.`count`)
  27. from
  28. `warehouse_inventory`
  29. where
  30. (
  31. `warehouse_inventory`.`inventoryInOrderId` = `sale_return_order`.`returnOrderId`
  32. )
  33. ),
  34. 0
  35. ) AS `returnProductOutStoreCount`,
  36. ifnull(
  37. (
  38. select
  39. sum(`payment_order`.`deductionAmount`)
  40. from
  41. `payment_order`
  42. where
  43. (
  44. (
  45. `payment_order`.`orderId` = `sale_return_order`.`returnOrderId`
  46. )
  47. and (`payment_order`.`paymentType` = '销售退货付款')
  48. )
  49. ),
  50. 0
  51. ) AS `returnPaidAmount`
  52. from
  53. `sale_return_order`

view01_supplier_info

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_supplier_info` AS
  2. select
  3. `supplier`.`id` AS `id`,
  4. `supplier`.`supplierId` AS `supplierId`,
  5. `supplier`.`idSequence` AS `idSequence`,
  6. `supplier`.`supplierName` AS `supplierName`,
  7. count(`supplier_product`.`id`) AS `productCount`,
  8. `supplier`.`supplierAccountNum` AS `supplierAccountNum`,
  9. `supplier`.`supplierBankName` AS `supplierBankName`,
  10. `supplier`.`supplierBusinessLicenseNum` AS `supplierBusinessLicenseNum`,
  11. `supplier`.`supplierMedicalOperatingLicenseNum` AS `supplierMedicalOperatingLicenseNum`,
  12. `supplier`.`supplierPaymentCycle` AS `supplierPaymentCycle`,
  13. `supplier`.`supplierAddress` AS `supplierAddress`,
  14. `supplier`.`supplierPostalCode` AS `supplierPostalCode`,
  15. `supplier`.`supplierContactPerson` AS `supplierContactPerson`,
  16. `supplier`.`supplierPhoneNum` AS `supplierPhoneNum`,
  17. `supplier`.`remark` AS `remark`,
  18. `supplier`.`rowStatus` AS `rowStatus`,
  19. `supplier`.`operation` AS `operation`,
  20. `supplier`.`operationByUserId` AS `operationByUserId`,
  21. `supplier`.`operationByUser` AS `operationByUser`,
  22. `supplier`.`operationAt` AS `operationAt`,
  23. `supplier`.`supplierBranchBankName` AS `supplierBranchBankName`
  24. from
  25. (
  26. `supplier`
  27. left join `supplier_product` on (
  28. (
  29. `supplier`.`supplierId` = `supplier_product`.`supplierId`
  30. )
  31. )
  32. )
  33. group by
  34. `supplier`.`supplierId`

view01_ticket_order

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_ticket_order` AS
  2. select
  3. `ticket`.`id` AS `id`,
  4. `ticket`.`idSequence` AS `idSequence`,
  5. `ticket`.`ticketId` AS `ticketId`,
  6. `purchase_order`.`supplierId` AS `purchaseOrderSupplierId`,
  7. `sale_order`.`customerId` AS `saleOrderCustomerId`,
  8. `ticket`.`ticketBizId` AS `ticketBizId`,
  9. `ticket`.`ticketType` AS `ticketType`,
  10. `ticket`.`ticketDesc` AS `ticketDesc`,
  11. `ticket`.`ticketContentRequest` AS `ticketContentRequest`,
  12. `ticket`.`ticketContent` AS `ticketContent`,
  13. `ticket`.`ticketCommentList` AS `ticketCommentList`,
  14. `ticket`.`ticketAmount` AS `ticketAmount`,
  15. `ticket`.`ticketRequestAt` AS `ticketRequestAt`,
  16. `ticket`.`ticketRequestByUserId` AS `ticketRequestByUserId`,
  17. `ticket`.`ticketRequestByUser` AS `ticketRequestByUser`,
  18. `ticket`.`ticketStatus` AS `ticketStatus`,
  19. `ticket`.`ticketStatusAt` AS `ticketStatusAt`,
  20. `ticket`.`ticketStatusDesc` AS `ticketStatusDesc`,
  21. `ticket`.`ticketStatusByUserId` AS `ticketStatusByUserId`,
  22. `ticket`.`ticketStatusByUser` AS `ticketStatusByUser`,
  23. `ticket`.`operation` AS `operation`,
  24. `ticket`.`operationByUserId` AS `operationByUserId`,
  25. `ticket`.`operationByUser` AS `operationByUser`,
  26. `ticket`.`operationAt` AS `operationAt`
  27. from
  28. (
  29. (
  30. `ticket`
  31. left join `purchase_order` on (
  32. (
  33. `ticket`.`ticketBizId` = `purchase_order`.`purchaseOrderId`
  34. )
  35. )
  36. )
  37. left join `sale_order` on (
  38. (
  39. `ticket`.`ticketBizId` = `sale_order`.`saleOrderId`
  40. )
  41. )
  42. )

view01_ticket_voucher

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_ticket_voucher` AS
  2. select
  3. `ticket`.`id` AS `id`,
  4. `ticket`.`idSequence` AS `idSequence`,
  5. `ticket`.`ticketId` AS `ticketId`,
  6. `ticket`.`ticketBizId` AS `ticketBizId`,
  7. `ticket`.`ticketType` AS `ticketType`,
  8. `ticket`.`ticketDesc` AS `ticketDesc`,
  9. `ticket`.`ticketContentRequest` AS `ticketContentRequest`,
  10. `ticket`.`ticketContent` AS `ticketContent`,
  11. `ticket`.`ticketCommentList` AS `ticketCommentList`,
  12. `ticket`.`ticketRequestAmount` AS `ticketRequestAmount`,
  13. `ticket`.`ticketAmount` AS `ticketAmount`,
  14. `ticket`.`ticketRequestAt` AS `ticketRequestAt`,
  15. `ticket`.`ticketRequestByUserId` AS `ticketRequestByUserId`,
  16. `ticket`.`ticketRequestByUser` AS `ticketRequestByUser`,
  17. `ticket`.`ticketStatus` AS `ticketStatus`,
  18. `ticket`.`ticketStatusAt` AS `ticketStatusAt`,
  19. `ticket`.`ticketStatusDesc` AS `ticketStatusDesc`,
  20. `ticket`.`ticketStatusByUserId` AS `ticketStatusByUserId`,
  21. `ticket`.`ticketStatusByUser` AS `ticketStatusByUser`,
  22. `ticket`.`operation` AS `operation`,
  23. `ticket`.`operationByUserId` AS `operationByUserId`,
  24. `ticket`.`operationByUser` AS `operationByUser`,
  25. `ticket`.`operationAt` AS `operationAt`,
  26. `voucher`.`voucherId` AS `voucherId`
  27. from
  28. (
  29. `ticket`
  30. left join `voucher` on (
  31. (
  32. `voucher`.`ticketIdList` like concat('%', `ticket`.`ticketId`, '%')
  33. )
  34. )
  35. )

view01_warehouse_inventory

  1. CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `view01_warehouse_inventory` AS
  2. select
  3. `wi`.`id` AS `id`,
  4. `wi`.`inventoryId` AS `inventoryId`,
  5. `wi`.`productName` AS `productName`,
  6. `wi`.`warehouseName` AS `warehouseName`,
  7. `wi`.`stockName` AS `stockName`,
  8. `wi`.`count` AS `count`,
  9. `wi`.`countOfInventoryIn` AS `countOfInventoryIn`,
  10. `wi`.`productUnit` AS `productUnit`,
  11. `wi`.`productSpec` AS `productSpec`,
  12. `wi`.`productSpecPrice` AS `productSpecPrice`,
  13. `wi`.`productType` AS `productType`,
  14. `wi`.`productTransport` AS `productTransport`,
  15. `wi`.`supplierId` AS `supplierId`,
  16. `wi`.`supplierName` AS `supplierName`,
  17. `wi`.`manufacturerName` AS `manufacturerName`,
  18. `wi`.`inventoryInType` AS `inventoryInType`,
  19. `wi`.`inventoryInOrderId` AS `inventoryInOrderId`,
  20. `wi`.`inventoryInAt` AS `inventoryInAt`,
  21. `wi`.`productionBatchNum` AS `productionBatchNum`,
  22. `wi`.`productionAt` AS `productionAt`,
  23. `wi`.`expirationAt` AS `expirationAt`,
  24. `wi`.`operation` AS `operation`,
  25. `wi`.`operationByUserId` AS `operationByUserId`,
  26. `wi`.`operationByUser` AS `operationByUser`,
  27. `wi`.`operationAt` AS `operationAt`,
  28. `sp`.`manufacturerProductRCNum` AS `manufacturerProductRCNum`,
  29. `sp`.`manufacturerProductRCExpireAt` AS `manufacturerProductRCExpireAt`,
  30. `sp`.`manufacturerLicenseNum` AS `manufacturerLicenseNum`,
  31. `wi`.`purchaseProductSpecPriceWithoutTax` AS `purchaseProductSpecPriceWithoutTax`,
  32. `wi`.`purchaseProductTaxRate` AS `purchaseProductTaxRate`,
  33. `wi`.`purchaseProductTaxPrice` AS `purchaseProductTaxPrice`,
  34. `wi`.`purchaseProductSpecPrice` AS `purchaseProductSpecPrice`,
  35. `wi`.`purchaseProductTotalAmount` AS `purchaseProductTotalAmount`,
  36. `wi`.`purchaseProductTotalAmountWithoutTax` AS `purchaseProductTotalAmountWithoutTax`
  37. from
  38. (
  39. `warehouse_inventory` `wi`
  40. left join `supplier_product` `sp` on (
  41. (
  42. (`sp`.`supplierId` = `wi`.`supplierId`)
  43. and (`sp`.`productName` = `wi`.`productName`)
  44. )
  45. )
  46. )