SET NAMES utf8;

SET FOREIGN_KEY_CHECKS = 0;

ALTER TABLE `t_company`
ADD COLUMN IF NOT EXISTS `company_phone`  varchar(255) NULL AFTER `version`;

ALTER TABLE `t_printer`
ADD COLUMN IF NOT EXISTS `printer_page`  int(11) NULL AFTER `ttime`,
ADD COLUMN IF NOT EXISTS `version`  int(11) NULL AFTER `printer_page`;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 10, `column_title` = '要求交货时间', `column_name` = 'requirement_delivery_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 135;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 11, `column_title` = '实际发货时间', `column_name` = 'actual_delivery_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 136;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 12, `column_title` = '交货周期', `column_name` = 'delivery_cycle', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 137;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 13, `column_title` = '验货时间', `column_name` = 'inspection_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 138;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 25, `column_title` = '时间', `column_name` = 'data_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 139;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 8, `column_title` = '入库时间', `column_name` = 'in_warehouse_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 140;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 9, `column_title` = '出库时间', `column_name` = 'out_warehouse_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 141;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 14, `column_title` = '开始时间', `column_name` = 'start_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 142;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 15, `column_title` = '结束时间', `column_name` = 'end_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 143;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 5, `column_title` = '停机时间', `column_name` = 'stop_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 144;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 4, `column_title` = '开机时间', `column_name` = 'boot_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 145;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 2, `column_title` = '销售时间', `column_name` = 'sale_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 154;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 19, `column_title` = '付款时间', `column_name` = 'payment_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 155;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 18, `column_title` = '收款时间', `column_name` = 'receivables_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 156;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 1, `column_title` = '订单时间', `column_name` = 'order_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 211;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 3, `column_title` = '采购时间', `column_name` = 'purchase_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 212;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 6, `column_title` = '计划开机时间', `column_name` = 'plan_boot_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 213;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 7, `column_title` = '计划停机时间', `column_name` = 'plan_stop_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 214;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 16, `column_title` = '延长时间', `column_name` = 'expand_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 215;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 17, `column_title` = '缩短时间', `column_name` = 'shorten_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 216;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 22, `column_title` = '下布时间', `column_name` = 'lower_cloth_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 220;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 23, `column_title` = '加工时间', `column_name` = 'processing_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 254;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 24, `column_title` = '退货时间', `column_name` = 'sale_refund_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 255;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 26, `column_title` = '对账时间', `column_name` = 'reconciliation_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 256;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 27, `column_title` = '进仓时间', `column_name` = 'in_storehouse_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 262;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 28, `column_title` = '出仓时间', `column_name` = 'out_storehouse_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 263;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 20, `column_title` = '开票时间', `column_name` = 'ticket_opening_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 276;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 21, `column_title` = '收票时间', `column_name` = 'collect_ticket_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 277;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 1, `column_order` = 23, `column_title` = '克重', `column_name` = 'product_gram_weight', `column_unit` = '[{\"key\":\"g/m2\",\"value\":\"平方米克重\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 302;

REPLACE INTO `t_affair_system_column_group`(`group_id`, `group_name`) VALUES (10, '成本');

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (306, 0, 7, 11, '收款模式', 'receivables_mode', '[{\"key\":\"1\",\"value\":\"全款\"},{\"key\":\"2\",\"value\":\"订金\"},{\"key\":\"3\",\"value\":\"尾款\"},{\"key\":\"4\",\"value\":\"优惠\"}]', '{\"key\":\"string\",\"value\":\"25\"}', 2, '{\"regex\":\"\",\"tips\":\"选择收款模式单选\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (307, 0, 7, 12, '对应单据', 'bill_order_number', '[{\"key\":\"bill_order_id\"}]', '{\"key\":\"bill_order_id\",\"value\":\"bill_order_number\"}', 34, '{\"regex\":\"\",\"tips\":\"选择票据号\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (308, 0, 7, 13, '转账金额', 'transfer_amount', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (309, 0, 7, 14, '付款类别', 'payment_category', '[{\"key\":\"oneself\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"50\"}', 11, '{\"regex\":\"\",\"tips\":\"付款类别\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (310, 0, 7, 15, '收款类别', 'receivables_category', '[{\"key\":\"oneself\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"50\"}', 11, '{\"regex\":\"\",\"tips\":\"收款类别\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (311, 0, 7, 16, '调款类型', 'adjustment_money_type', '[{\"key\":\"1\",\"value\":\"减少总额\"},{\"key\":\"2\",\"value\":\"增加总额\"}]', '{\"key\":\"string\",\"value\":\"25\"}', 2, '{\"regex\":\"\",\"tips\":\"选择调款类型单选\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (312, 0, 7, 17, '调款金额', 'adjustment_amount', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (313, 0, 7, 18, '转入账户', 'transfer_in_category', '[{\"key\":\"oneself\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"50\"}', 35, '{\"regex\":\"\",\"tips\":\"转入账户\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (314, 0, 7, 19, '转出账户', 'transfer_out_category', '[{\"key\":\"oneself\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"50\"}', 35, '{\"regex\":\"\",\"tips\":\"转出账户\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (315, 0, 8, 28, '转账时间', 'transfer_time', '[]', '{\"key\":\"date_time\",\"value\":\"1\"}', 6, '', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (316, 0, 8, 29, '调款时间', 'adjustment_time', '[]', '{\"key\":\"date_time\",\"value\":\"1\"}', 6, '', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (317, 0, 10, 1, '货物净额', 'net_cargo', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (318, 0, 10, 2, '染费', 'dye_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (319, 0, 10, 3, '割边费', 'edge_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (320, 0, 10, 4, '剪线费', 'trimming_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (321, 0, 10, 5, '剪睫毛费', 'eyelashes_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (322, 0, 10, 6, '运费', 'freight_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (323, 0, 10, 7, '快递费', 'express_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (324, 0, 10, 8, '样品费', 'Sample_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (325, 0, 10, 9, '税金', 'taxes_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (326, 0, 10, 10, '人工费', 'labor_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (327, 0, 10, 11, '打卷费', 'marking_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (328, 0, 10, 12, '印花费', 'stamp_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column`(`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (329, 0, 10, 13, '总成本', 'total_cost', '[{\"key\":\"yuan\",\"value\":\"元\"}]', '{\"key\":\"double\",\"value\":\"2\"}', 0, '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/ \",\"tips\":\"只能为数字和2位小数点\"}', 0, '', 0, NULL);

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 12, `column_title` = '交货周期', `column_name` = 'delivery_cycle', `column_unit` = '[]', `column_type` = '{\"key\":\"integer\",\"value\":\"\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^0|[1-9][0-9]{0,18}$/\",\"tips\":\"请填入1到18位纯数字\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 137;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 30, `column_title` = '时间', `column_name` = 'data_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 139;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 8, `column_title` = '收取现金', `column_name` = 'sale_collect_cash', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 160;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 9, `column_title` = '支出现金', `column_name` = 'purchase_pay_cash', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 161;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 1, `column_title` = '收款金额', `column_name` = 'receivables_amount', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 186;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 3, `column_title` = '付款金额', `column_name` = 'payment_amount', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 198;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 2, `column_title` = '账户', `column_name` = 'account_category', `column_unit` = '[{\"key\":\"oneself\",\"value\":\"\"}]', `column_type` = '{\"key\":\"string\",\"value\":\"50\"}', `column_control` = 11, `column_rule` = '{\"regex\":\"\",\"tips\":\"请选择账户\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 247;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 26, `column_title` = '退货时间', `column_name` = 'sale_refund_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 255;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 27, `column_title` = '对账时间', `column_name` = 'reconciliation_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 256;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 24, `column_title` = '进仓时间', `column_name` = 'in_storehouse_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 262;

UPDATE `t_affair_system_column` SET `column_pid` = 0, `group_id` = 8, `column_order` = 25, `column_title` = '出仓时间', `column_name` = 'out_storehouse_time', `column_unit` = '[]', `column_type` = '{\"key\":\"date_time\",\"value\":\"1\"}', `column_control` = 6, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 263;

ALTER TABLE `t_product` MODIFY COLUMN IF EXISTS `product_gram_weight`  decimal(13,2) NULL AFTER `product_beginning_id`;

ALTER TABLE `t_collection` MODIFY COLUMN IF EXISTS `collection_gram_weight`  decimal(13,2) NULL;

UPDATE `t_affair_system_column` SET `column_id`='307', `column_pid`='0', `group_id`='7', `column_order`='12', `column_title`='对应单据', `column_name`='bill_order_number', `column_unit`='[]', `column_type`='{\"key\":\"string\",\"value\":\"50\"}', `column_control`='34', `column_rule`='{\"regex\":\"\",\"tips\":\"选择票据号\"}', `column_is_virtual`='0', `column_unit_symbiosis`='', `column_detachable`='0', `status`=NULL WHERE (`column_id`='307');

REPLACE INTO `t_affair_system_column` (`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (330, 0, 4, 19, '对色光源', 'color_light_source', '[{\"key\":\"oneself\",\"value\":\"\"}]', '{\"key\":\"string\",\"value\":\"255\"}', '11', '{\"regex\":\"\",\"tips\":\"对色光源\"}', 0, '', 0, NULL);

REPLACE INTO `t_affair_system_column` (`column_id`, `column_pid`, `group_id`, `column_order`, `column_title`, `column_name`, `column_unit`, `column_type`, `column_control`, `column_rule`, `column_is_virtual`, `column_unit_symbiosis`, `column_detachable`, `status`) VALUES (331, 0, 5, 12, '停机事由', 'reasons_downtime', '[]', '{\"key\":\"string\",\"value\":\"255\"}', '0', '{\"regex\":\"\",\"tips\":\"请输入\"}', 0, '', 0, NULL);

ALTER TABLE `t_statement_calculation`
ADD COLUMN IF NOT EXISTS `calculation_product_specification`  varchar(255) NOT NULL AFTER `calculation_ctime`,
ADD COLUMN IF NOT EXISTS `calculation_product_color`  varchar(255) NOT NULL AFTER `calculation_product_specification`;

ALTER TABLE `t_bill_subtitle`
MODIFY COLUMN IF EXISTS `bill_subtitle_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL AFTER `user_ids`;

ALTER TABLE `t_user`
ADD COLUMN IF NOT EXISTS `bill_header`  varchar(255) NULL AFTER `attendance_id`,
ADD COLUMN IF NOT EXISTS `report_header`  varchar(255) NULL AFTER `bill_header`;

ALTER TABLE `t_bill_order`
ADD COLUMN IF NOT EXISTS `bill_order_header`  varchar(255) NULL AFTER `bill_order_supplement`;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 1, `column_title` = '销售价格', `column_name` = 'sale_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 12;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 2, `column_title` = '销售总额', `column_name` = 'sale_total_amount', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 13;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 8, `column_title` = '采购价格', `column_name` = 'purchase_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 26;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 9, `column_title` = '采购总额', `column_name` = 'purchase_total_amount', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 27;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 4, `column_order` = 2, `column_title` = '加工价格', `column_name` = 'machining_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 40;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 4, `column_order` = 3, `column_title` = '加工总额', `column_name` = 'machining_total_amount', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 41;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 11, `column_title` = '物流价格', `column_name` = 'logistics_price', `column_unit` = '[{\"key\":\"yuan/piece\",\"value\":\"元/件\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'logistics', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 88;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 5, `column_title` = '退货价格', `column_name` = 'sale_refund_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 157;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 6, `column_title` = '退货总额', `column_name` = 'sale_refund_total_amount', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 158;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 3, `column_order` = 4, `column_title` = '退货数量', `column_name` = 'sale_refund_quantity', `column_unit` = '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 159;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 8, `column_title` = '收取现金', `column_name` = 'sale_collect_cash', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 160;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 7, `column_order` = 9, `column_title` = '支出现金', `column_name` = 'purchase_pay_cash', `column_unit` = '[{\"key\":\"yuan\",\"value\":\"元\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 161;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 9, `column_order` = 10, `column_title` = '数量', `column_name` = 'public_quantity', `column_unit` = '[{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 163;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 9, `column_order` = 5, `column_title` = '价格', `column_name` = 'public_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = 'PriceQuantity', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 217;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 9, `column_order` = 7, `column_title` = '成品价格', `column_name` = 'public_finished_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 237;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 9, `column_order` = 9, `column_title` = '胚布价格', `column_name` = 'public_embryo_price', `column_unit` = '[{\"key\":\"yuan/yard\",\"value\":\"元/码\"},{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"},{\"key\":\"yuan/one\",\"value\":\"元/条\"},{\"key\":\"yuan/m\",\"value\":\"元/米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 238;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 4, `column_order` = 14, `column_title` = '颜色单价', `column_name` = 'color _price', `column_unit` = '[{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 241;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 4, `column_order` = 16, `column_title` = '手感单价', `column_name` = 'handle_feel_price', `column_unit` = '[{\"key\":\"yuan/kg\",\"value\":\"元/公斤\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 242;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 4, `column_order` = 17, `column_title` = '包装单价', `column_name` = 'packing_price', `column_unit` = '[{\"key\":\"yuan/rolls\",\"value\":\"元/卷\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"3\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,3})?$/\",\"tips\":\"只能为数字和3位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 2, `status` = NULL WHERE `column_id` = 243;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 4, `column_order` = 7, `column_title` = '出仓数量', `column_name` = 'out_storehouse_quantity', `column_unit` = '[{\"key\":\"kg\",\"value\":\"公斤\"},{\"key\":\"yard\",\"value\":\"码\"},{\"key\":\"one\",\"value\":\"条\"},{\"key\":\"m\",\"value\":\"米\"}]', `column_type` = '{\"key\":\"double\",\"value\":\"2\"}', `column_control` = 0, `column_rule` = '{\"regex\":\"/^[0-9]+(.[0-9]{0,2})?$/\",\"tips\":\"只能为数字和2位小数点\"}', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 1, `status` = NULL WHERE `column_id` = 260;

UPDATE `lacew_mi_prod`.`t_affair_system_column` SET `column_pid` = 0, `group_id` = 5, `column_order` = 12, `column_title` = '停机事由', `column_name` = 'reasons_downtime', `column_unit` = '[]', `column_type` = '{\"key\":\"string\",\"value\":\"255\"}', `column_control` = 0, `column_rule` = '', `column_is_virtual` = 0, `column_unit_symbiosis` = '', `column_detachable` = 0, `status` = NULL WHERE `column_id` = 331;

SET FOREIGN_KEY_CHECKS = 1;