CREATE TABLE `purchasestocksaledaily` ( `Id` int(11) NOT NULL AUTO_INCREMENT, `ReportDate` datetime(6) NOT NULL, `Year` int(11) NOT NULL, `Month` int(11) NOT NULL, `Day` int(11) NOT NULL, `Week` int(11) NOT NULL, `OrganizationId` char(36) NOT NULL, `OrganizationCode` longtext DEFAULT NULL, `StockRoomId` char(36) NOT NULL, `StockRoomCode` longtext DEFAULT NULL, `StockRoomName` longtext DEFAULT NULL, `GoodsId` char(36) NOT NULL, `GoodsCode` longtext DEFAULT NULL, `GoodsBarcode` longtext DEFAULT NULL, `GoodsName` longtext DEFAULT NULL, `SalePrice` decimal(18,4) NOT NULL, `PromotionPrice` decimal(18,4) DEFAULT NULL, `WarehouseInventory` decimal(18,4) NOT NULL, `AmountBySalePrice` decimal(18,4) NOT NULL, `Amount` decimal(18,4) NOT NULL, `AmountNoTax` decimal(18,4) NOT NULL, `PurchaseQuantity` decimal(18,4) NOT NULL, `PurchaseAmount` decimal(18,4) NOT NULL, `PurchaseInQuantity` decimal(18,4) NOT NULL, `PurchaseInAmountBySalePrice` decimal(18,4) NOT NULL, `PurchaseInAmount` decimal(18,4) NOT NULL, `PurchaseInAmountNoTax` decimal(18,4) NOT NULL, `AllotInQuantity` decimal(18,4) NOT NULL, `AllotInAmountBySalePrice` decimal(18,4) NOT NULL, `AllotInAmount` decimal(18,4) NOT NULL, `AllotInAmountNoTax` decimal(18,4) NOT NULL, `AllotOutQuantity` decimal(18,4) NOT NULL, `AllotOutAmountBySalePrice` decimal(18,4) NOT NULL, `AllotOutAmount` decimal(18,4) NOT NULL, `AllotOutAmountNoTax` decimal(18,4) NOT NULL, `LossQuantity` decimal(18,4) NOT NULL, `LossAmountBySalePrice` decimal(18,4) NOT NULL, `LossAmount` decimal(18,4) NOT NULL, `LossAmountNoTax` decimal(18,4) NOT NULL, `SpillQuantity` decimal(18,4) NOT NULL, `SpillAmountBySalePrice` decimal(18,4) NOT NULL, `SpillAmount` decimal(18,4) NOT NULL, `SpillAmountNoTax` decimal(18,4) NOT NULL, `GetQuantity` decimal(18,4) NOT NULL, `GetAmountBySalePrice` decimal(18,4) NOT NULL, `GetAmount` decimal(18,4) NOT NULL, `GetAmountNoTax` decimal(18,4) NOT NULL, `BatchOutQuantity` decimal(18,4) NOT NULL, `BatchOutAmountBySalePrice` decimal(18,4) NOT NULL, `BatchOutAmount` decimal(18,4) NOT NULL, `BatchOutAmountNoTax` decimal(18,4) NOT NULL, `AllocateInQuantity` decimal(18,4) NOT NULL, `AllocateInAmountBySalePrice` decimal(18,4) NOT NULL, `AllocateInAmount` decimal(18,4) NOT NULL, `AllocateInAmountNoTax` decimal(18,4) NOT NULL, `AllocateOutQuantity` decimal(18,4) NOT NULL, `AllocateOutAmountBySalePrice` decimal(18,4) NOT NULL, `AllocateOutAmount` decimal(18,4) NOT NULL, `AllocateOutAmountNoTax` decimal(18,4) NOT NULL, `SaleAllOrderNum` decimal(18,4) NOT NULL, `SaleAllNum` decimal(18,4) NOT NULL, `SaleAllAmountBySalePrice` decimal(18,4) NOT NULL, `SaleAllAmount` decimal(18,4) NOT NULL, `SaleNum` decimal(18,4) NOT NULL, `SaleAmountBySalePrice` decimal(18,4) NOT NULL, `SaleAmount` decimal(18,4) NOT NULL, `SaleReturnNum` decimal(18,4) NOT NULL, `SaleReturnAmountBySalePrice` decimal(18,4) NOT NULL, `SaleReturnAmount` decimal(18,4) NOT NULL, `SaleLoss` decimal(18,4) NOT NULL, `SaleReturnLoss` decimal(18,4) NOT NULL, `PurchaseReturnAmount` decimal(18,4) NOT NULL, `PurchaseReturnAmountBySalePrice` decimal(18,4) NOT NULL, `PurchaseReturnQuantity` decimal(18,4) NOT NULL, `PurchaseReturnAmountNoTax` decimal(18,4) NOT NULL, `AvgSalePrice` decimal(18,4) NOT NULL, `TenantId` int(11) DEFAULT NULL, `MemberLossAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `SaleMaoli` decimal(18,4) NOT NULL DEFAULT '0.0000', `SaleMaoliNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `CommunalGoodState` int(11) NOT NULL DEFAULT '0', `AveDaySaleNum` decimal(18,4) NOT NULL DEFAULT '0.0000', `CommunalGoodType` int(11) NOT NULL DEFAULT '0', `CostAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `CostAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeductionRate` decimal(18,4) DEFAULT NULL, `GoodBrandId` char(36) DEFAULT NULL, `GoodClassCode` varchar(50) DEFAULT NULL, `GoodClassId` int(11) NOT NULL DEFAULT '0', `GoodClassIdRealation` varchar(100) DEFAULT NULL, `GoodDeparmentCode` varchar(50) DEFAULT NULL, `GoodDeparmentId` int(11) NOT NULL DEFAULT '0', `GoodDeparmentIdRealation` varchar(100) DEFAULT NULL, `GoodFormat` longtext DEFAULT NULL, `GoodsABCLevel` varchar(2) DEFAULT NULL, `GoodsSaleLevel` int(11) NOT NULL DEFAULT '0', `InputTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `PromotionState` int(11) NOT NULL DEFAULT '0', `SaleTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `MemberCount` decimal(18,4) NOT NULL DEFAULT '0.0000', `MemberOrderAvgPrice` decimal(18,4) NOT NULL DEFAULT '0.0000', `MemberOrderCount` decimal(18,4) NOT NULL DEFAULT '0.0000', `MemberSaleAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `PromotionSaleAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `SaleOrderNum` decimal(18,4) NOT NULL DEFAULT '0.0000', `SaleReturnOrderNum` decimal(18,4) NOT NULL DEFAULT '0.0000', `AllowanceAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `AllowanceAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `AllowanceMaoLi` decimal(18,4) NOT NULL DEFAULT '0.0000', `AllowanceQuantity` decimal(18,4) NOT NULL DEFAULT '0.0000', `LossMaoLi` decimal(18,4) NOT NULL DEFAULT '0.0000', `MaoLi` decimal(18,4) NOT NULL DEFAULT '0.0000', `PurchaseReturnMaoLi` decimal(18,4) NOT NULL DEFAULT '0.0000', `ReceiveUseMaoLi` decimal(18,4) NOT NULL DEFAULT '0.0000', `SaleMaoLiPercent` decimal(18,4) NOT NULL DEFAULT '0.0000', `SpillMaoLi` decimal(18,4) NOT NULL DEFAULT '0.0000', `TransferCostAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `TransferCostAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `OperationMode` int(11) NOT NULL DEFAULT '0', `DeliveryInAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryInAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryInCostAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryInCostAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryInMaoli` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryInQuantity` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryOutAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryOutAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryOutCostAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryOutCostAmountNoTax` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryOutMaoli` decimal(18,4) NOT NULL DEFAULT '0.0000', `DeliveryOutQuantity` decimal(18,4) NOT NULL DEFAULT '0.0000', PRIMARY KEY (`Id`), KEY `IX_PurchaseStockSaleDaily_ReportDate_OrganizationId_StockRoomId~` (`ReportDate`, `OrganizationId`, `StockRoomId`, `GoodsId`, `CommunalGoodType`, `InputTax`, `PromotionState`, `OperationMode`) BLOCK_SIZE 16384 LOCAL ) AUTO_INCREMENT = 172050 AUTO_INCREMENT_MODE = 'ORDER' DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0; CREATE TABLE `communalgoodextend` ( `Id` char(36) NOT NULL, `GoodsABCLevel` longtext DEFAULT NULL, `GoodsSaleLevel` int(11) NOT NULL, `TenantId` int(11) DEFAULT NULL, PRIMARY KEY (`Id`) ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0; CREATE TABLE `communalgood` ( `Id` char(36) NOT NULL, `AffiliationBusinessformatId` char(36) NOT NULL, `AffiliationBusinessformatCode` varchar(50) DEFAULT NULL, `AffiliationBusinessformatName` varchar(50) DEFAULT NULL, `AffiliationOrganizationId` char(36) DEFAULT NULL, `AffiliationOrganizationName` varchar(50) DEFAULT NULL, `AffiliationOrganizationCode` varchar(50) DEFAULT NULL, `LastOrganizationId` char(36) NOT NULL, `LastOrganizationCode` varchar(50) DEFAULT NULL, `LastOrganizationName` varchar(50) DEFAULT NULL, `AuditUserId` char(36) DEFAULT NULL, `AuditUserCode` varchar(50) DEFAULT NULL, `AuditUserName` varchar(50) DEFAULT NULL, `AuditUserPhone` varchar(50) DEFAULT NULL, `SupplierId` char(36) NOT NULL, `SupplierCode` varchar(50) DEFAULT NULL, `SupplierName` varchar(50) DEFAULT NULL, `GoodClassId` int(11) NOT NULL, `GoodClassCode` varchar(50) DEFAULT NULL, `GoodClassName` varchar(50) DEFAULT NULL, `GoodClassIdRealation` varchar(100) DEFAULT NULL, `GoodDeparmentId` int(11) NOT NULL, `GoodDeparmentCode` varchar(50) DEFAULT NULL, `GoodDeparmentName` varchar(50) DEFAULT NULL, `GoodDeparmentIdRealation` varchar(100) DEFAULT NULL, `GoodName` varchar(200) DEFAULT NULL, `Abbreviation` longtext DEFAULT NULL, `PyCode` varchar(100) DEFAULT NULL, `BarCode` varchar(50) DEFAULT NULL, `CommunalGoodType` int(11) NOT NULL, `GoodBrandId` char(36) DEFAULT NULL, `GoodBrandCode` varchar(50) DEFAULT NULL, `GoodBrandName` varchar(50) DEFAULT NULL, `GoodFormat` varchar(50) DEFAULT NULL, `ProductionCode` longtext DEFAULT NULL, `ProductionName` varchar(100) DEFAULT NULL, `SaleUnit` varchar(50) DEFAULT NULL, `ThirdCode` varchar(50) DEFAULT NULL, `Season` varchar(50) DEFAULT NULL, `CommunalGoodLevel` int(11) NOT NULL, `CommunalGoodState` int(11) NOT NULL, `InvalidDate` datetime(6) DEFAULT NULL, `CommunalGoodSaleState` int(11) NOT NULL, `IsWeight` tinyint(1) NOT NULL, `Image` longtext DEFAULT NULL, `CostPrice` decimal(65,30) NOT NULL, `SalePrice` decimal(65,30) NOT NULL, `MemberLevelPriceType` int(11) DEFAULT NULL, `MemberLevelPrice` decimal(65,30) DEFAULT NULL, `DeductionRate` decimal(65,30) DEFAULT NULL, `ExtendOne` decimal(65,30) DEFAULT NULL, `ExtendTwo` decimal(65,30) DEFAULT NULL, `ExtendThree` decimal(65,30) DEFAULT NULL, `PromotionDeductionRate` decimal(65,30) DEFAULT NULL, `PromotionEndTime` datetime(6) DEFAULT NULL, `DeductionPrice` decimal(65,30) NOT NULL, `MinPrice` decimal(65,30) DEFAULT NULL, `MaxDeductionRate` int(11) DEFAULT NULL, `InputTax` int(11) NOT NULL, `SaleTax` int(11) NOT NULL, `FullVolume` decimal(18,2) DEFAULT NULL, `FaceQuantity` int(11) DEFAULT NULL, `StoreyNum` int(11) DEFAULT NULL, `BusinessLeaderId` char(36) DEFAULT NULL, `BusinessLeaderCode` varchar(50) DEFAULT NULL, `BusinessLeaderName` varchar(50) DEFAULT NULL, `BusinessLeaderPhone` varchar(50) DEFAULT NULL, `PromotionState` int(11) NOT NULL, `AveDaySaleNum` decimal(65,30) DEFAULT NULL, `StatisticalDays` int(11) DEFAULT NULL, `Importance` varchar(50) DEFAULT NULL, `Long` decimal(65,30) DEFAULT NULL, `Wide` decimal(65,30) DEFAULT NULL, `High` decimal(65,30) DEFAULT NULL, `Describe` longtext DEFAULT NULL, `IsDraft` tinyint(1) NOT NULL, `ContractId` char(36) DEFAULT NULL, `ContractNo` longtext DEFAULT NULL, `StoreRecruit` varchar(200) DEFAULT NULL, `OperationMode` int(11) DEFAULT NULL, `GoodsPriceType` int(11) NOT NULL, `PromotionDeductionRate1` decimal(65,30) DEFAULT NULL, `PromotionDeductionRate2` decimal(65,30) DEFAULT NULL, `PromotionDeductionRate3` decimal(65,30) DEFAULT NULL, `GoodsAddSource` int(11) NOT NULL, `MerchantGoodsCatalogId` char(36) DEFAULT NULL, `MerchantGoodsCatalogCode` longtext DEFAULT NULL, `MerchantGoodsCatalogName` longtext DEFAULT NULL, `ApproverDateTime` datetime(6) DEFAULT NULL, `ApproverOrganizationId` char(36) DEFAULT NULL, `ApproverOrganizationName` varchar(50) DEFAULT NULL, `ApproverOrganizationCode` varchar(50) DEFAULT NULL, `TenantId` int(11) DEFAULT NULL, `Code` longtext DEFAULT NULL, `EnterpriseId` char(36) NOT NULL, `EnterpriseCode` longtext DEFAULT NULL, `CreatorId` char(36) NOT NULL, `CreatorCode` longtext DEFAULT NULL, `CreatorName` longtext DEFAULT NULL, `CreatorTime` datetime(6) NOT NULL, `LastUpdatorId` char(36) NOT NULL, `LastUpdatorCode` longtext DEFAULT NULL, `LastUpdatorName` longtext DEFAULT NULL, `LastUpdatorTime` datetime(6) NOT NULL, `DeleteorId` char(36) DEFAULT NULL, `DeleteorCode` longtext DEFAULT NULL, `DeleteorName` longtext DEFAULT NULL, `IsDeleted` tinyint(1) NOT NULL, `DeletionTime` datetime(6) DEFAULT NULL, `BusinessformatId` char(36) NOT NULL, `BusinessformatCode` longtext DEFAULT NULL, `BusinessformatName` longtext DEFAULT NULL, `OrganizationId` char(36) NOT NULL, `OrganizationCode` longtext DEFAULT NULL, `OrganizationName` longtext DEFAULT NULL, `AllowWeightPoint` tinyint(1) NOT NULL DEFAULT '0', `CatalogRoleCode` longtext DEFAULT NULL, `CatalogRoleId` char(36) DEFAULT NULL, `CatalogRoleName` longtext DEFAULT NULL, `Color` longtext DEFAULT NULL, `ControlCode` longtext DEFAULT NULL, `DeliveryVolume` decimal(65,30) DEFAULT NULL, `EatNotice` longtext DEFAULT NULL, `FirstPurchaseDate` datetime(6) DEFAULT NULL, `FormulationGoodsType` int(11) NOT NULL DEFAULT '0', `GoodsDesc` longtext DEFAULT NULL, `GoodsPurchaseStatus` int(11) NOT NULL DEFAULT '0', `GoodsSourceType` int(11) NOT NULL DEFAULT '0', `GrassRate` decimal(65,30) DEFAULT NULL, `GroupOrderId` char(36) DEFAULT NULL, `GrowthRate` decimal(65,30) DEFAULT NULL, `IntegralRate` decimal(65,30) DEFAULT NULL, `IsBatchManager` tinyint(1) NOT NULL DEFAULT '0', `IsCodeManager` tinyint(1) NOT NULL DEFAULT '0', `IsGroup` tinyint(1) NOT NULL DEFAULT '0', `IsMgrStock` tinyint(1) NOT NULL DEFAULT '0', `IsPropertyMgr` tinyint(1) NOT NULL DEFAULT '0', `IsPurchaseReturn` tinyint(1) NOT NULL DEFAULT '0', `IsShowPropertyImage` tinyint(1) NOT NULL DEFAULT '0', `LastInDate` datetime(6) DEFAULT NULL, `LastOutTime` datetime(6) DEFAULT NULL, `LastSaleDate` datetime(6) DEFAULT NULL, `LastWeekSaleAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `LogisticsType` int(11) NOT NULL DEFAULT '0', `Material` longtext DEFAULT NULL, `MaterialGoodsId` char(36) DEFAULT NULL, `MinOrderingNum` int(11) DEFAULT NULL, `MinSaleVolume` decimal(65,30) DEFAULT NULL, `NewProductPrice` decimal(65,30) DEFAULT NULL, `OrderingPeriod` int(11) DEFAULT NULL, `OtherBarCode` longtext DEFAULT NULL, `PackingNum` decimal(18,2) DEFAULT NULL, `PalletQuantity` decimal(65,30) DEFAULT NULL, `PluNo` longtext DEFAULT NULL, `PromotionBeginTime` datetime(6) DEFAULT NULL, `PromotionMemberPrice` decimal(18,4) DEFAULT NULL, `PromotionPrice` decimal(65,30) DEFAULT NULL, `PromotionPurchasePrice` decimal(18,4) DEFAULT NULL, `PropertyFirstCode` longtext DEFAULT NULL, `PropertyFirstId` char(36) DEFAULT NULL, `PropertyFirstName` longtext DEFAULT NULL, `PropertyJson` longtext DEFAULT NULL, `PropertySecondCode` longtext DEFAULT NULL, `PropertySecondId` char(36) DEFAULT NULL, `PropertySecondName` longtext DEFAULT NULL, `PurchasePrice` decimal(65,30) DEFAULT NULL, `PurchaseUnit` varchar(50) DEFAULT NULL, `Quantity` decimal(65,30) DEFAULT NULL, `RichDescribe` longtext DEFAULT NULL, `SafeStockDay` int(11) DEFAULT NULL, `ShelfDetail` longtext DEFAULT NULL, `ShelfLifeContent` longtext DEFAULT NULL, `ShelfLifeDay` int(11) DEFAULT NULL, `ShelfLifeHour` decimal(18,2) DEFAULT NULL, `ShelveImage` longtext DEFAULT NULL, `SourceType` int(11) NOT NULL DEFAULT '0', `StockMaxDay` int(11) DEFAULT NULL, `StockMinDay` int(11) DEFAULT NULL, `SuitAge` longtext DEFAULT NULL, `SuitSex` longtext DEFAULT NULL, `ThisWeekSaleAmount` decimal(18,4) NOT NULL DEFAULT '0.0000', `TrialSalesAmount` decimal(65,30) DEFAULT NULL, `TrialSalesDays` int(11) DEFAULT NULL, `ValidOrgDetail` longtext DEFAULT NULL, `WeightTagNo` longtext DEFAULT NULL, `WholesalePrice` decimal(65,30) DEFAULT NULL, `StockMaxNumber` decimal(18,3) DEFAULT NULL, `StockMinNumber` decimal(18,3) DEFAULT NULL, `MinVolume` decimal(18,2) DEFAULT NULL, `MarkupRate` decimal(18,2) DEFAULT NULL, `ShippingPrice` decimal(18,4) DEFAULT NULL, `TaxClassCode` longtext DEFAULT NULL, `TaxClassName` longtext DEFAULT NULL, `OrderGoodsVolume` decimal(18,3) DEFAULT NULL, `DeliveryDiscountRate` decimal(18,2) DEFAULT NULL, `TrialSaleGoodsState` int(11) NOT NULL DEFAULT '0', `ComboGroupType` int(11) DEFAULT NULL, `CommunalGoodDeployState` int(11) NOT NULL DEFAULT '0', `IsMultUnit` tinyint(1) NOT NULL DEFAULT '0', `PurchaseUserCode` longtext DEFAULT NULL, `PurchaseUserId` char(36) DEFAULT NULL, `PurchaseUserName` longtext DEFAULT NULL, PRIMARY KEY (`Id`) ) DEFAULT CHARSET = utf8mb4 ROW_FORMAT = DYNAMIC COMPRESSION = 'zstd_1.3.8' REPLICA_NUM = 1 BLOCK_SIZE = 16384 USE_BLOOM_FILTER = FALSE TABLET_SIZE = 134217728 PCTFREE = 0