/*
 Navicat Premium Data Transfer

 Source Server         : mysql
 Source Server Type    : MySQL
 Source Server Version : 80021
 Source Host           : localhost:3306
 Source Schema         : udiwms

 Target Server Type    : MySQL
 Target Server Version : 80021
 File Encoding         : 65001

 Date: 07/03/2022 17:58:14
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for company_product_relevance
-- ----------------------------
DROP TABLE IF EXISTS `company_product_relevance`;
CREATE TABLE `company_product_relevance`  (
                                              `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
                                              `customerId` bigint NOT NULL,
                                              `productId` bigint NULL DEFAULT NULL,
                                              `enterpriseId` bigint NULL DEFAULT NULL,
                                              `registrationId` bigint NULL DEFAULT NULL,
                                              `update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
                                              `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
                                              `auditStatus` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核状态 1：通过，2：不通过，3：反审',
                                              `productUuid` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
                                              `udiRlIdFk` bigint NULL DEFAULT NULL COMMENT '基础信息维护表关联主键',
                                              `unitFk` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '往来单位ID外键',
                                              PRIMARY KEY (`id`) USING BTREE,
                                              UNIQUE INDEX `udiRlIdFk`(`udiRlIdFk`, `customerId`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 141 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;



alter table basic_bussiness_type Add column orderVisibleType TINYINT(0) DEFAULT NULL COMMENT '订单详情展示方式：0：根据批次号展示，1:根据条码展示';
alter table basic_bustype_local Add column supplementAll TINYINT(0) DEFAULT NULL COMMENT '缺量补单是否全量补单';

INSERT INTO `udispsync`.`system_param_config`(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`) VALUES (501, 0, '上游服务地址配置', 'upper_server_ip', 'http://127.0.0.1:9906', 1, 0, NULL);

alter table `udiwms`.thr_order_upload Add column checkUdims TINYINT(0) DEFAULT NULL COMMENT 'UDIMS平台';
alter table `udiwms`.thr_order_upload Add column checkPdaEd TINYINT(0) DEFAULT NULL COMMENT 'PDA已校验';
alter table `udiwms`.thr_order_upload Add column checkPdaUn TINYINT(0) DEFAULT NULL COMMENT 'pda未校验';
alter table `udiwms`.thr_order_upload Add column checkPc TINYINT(0) DEFAULT NULL COMMENT '扫码通';
alter table `udiwms`.thr_order_upload Add column checkWebNew TINYINT(0) DEFAULT NULL COMMENT '网页端新增';
alter table `udiwms`.thr_order_upload Add column checkChange TINYINT(0) DEFAULT NULL COMMENT '缺量补单';
alter table `udiwms`.thr_order_upload Add column checkSp TINYINT(0) DEFAULT NULL COMMENT '自助平台同步';
alter table `udiwms`.thr_order_upload Add column checkBalacne TINYINT(0) DEFAULT NULL COMMENT '平衡补单';



alter table `inv_product` Add column updateTime date DEFAULT NULL COMMENT '更新时间';
alter table `inv_pre_product` Add column updateTime date DEFAULT NULL COMMENT '更新时间';
alter table `inv_prein_product` Add column updateTime date DEFAULT NULL COMMENT '更新时间';


alter  table  inv_product  add  index  orderTime  (updateTime);
alter  table  inv_pre_product  add  index  orderTime  (updateTime);
alter  table  inv_pre_product  add  index  orderTime  (updateTime);

