Browse Source

update sql

oubo 5 years ago
parent
commit
cbad560bfb
3 changed files with 5 additions and 2 deletions
  1. 1 1
      data/sql/structure.sql
  2. 3 0
      data/upgrade/v3.0.0/v3.0.0.sh
  3. 1 1
      data/upgrade/v3.0.0/v3.0.0.sql

+ 1 - 1
data/sql/structure.sql

@@ -1633,7 +1633,7 @@ CREATE TABLE `t_machine_calculation`  (
   `object_key`  varchar(25) NULL,
   `calculation_value`  decimal(22,2) NULL,
   `needle_position`  int(11) NULL,
-  `net_needle`  int(11) NULL DEFAULT '',
+  `net_needle`  int(11) NULL,
   `product_specification`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
   `machine_production_state`  tinyint(1) NULL DEFAULT 0 AFTER `product_specification`,
   PRIMARY KEY (`calculation_id`, `data_id`) USING BTREE,

+ 3 - 0
data/upgrade/v3.0.0/v3.0.0.sh

@@ -24,6 +24,9 @@ curl -s http://${domain}:${port}/v2/tools/init?key=rule
 curl -s http://${domain}:${port}/v2/tools/init?key=machinePause
 #初始化机台报表数据
 curl -s http://${domain}:${port}/v2/tools/init?key=machine
+#开票收票报表数据
+curl -s http://${domain}:${port}/v2/tools/report-calculation?key=ticket
+
 #安装wkhtmltopdf
 if [ ! -x "$(command -v wkhtmltopdf)"  ]; then
     yum install -y urw-fonts libXext openssl-devel libXrender

+ 1 - 1
data/upgrade/v3.0.0/v3.0.0.sql

@@ -347,7 +347,7 @@ ALTER TABLE `t_machine_calculation`
 ADD COLUMN IF NOT EXISTS `object_key`  varchar(25) NULL AFTER `stop_reason_id`,
 ADD COLUMN IF NOT EXISTS `calculation_value`  decimal(22,2) NULL AFTER `object_key`,
 ADD COLUMN IF NOT EXISTS `needle_position`  int(11) NULL AFTER `calculation_value`,
-ADD COLUMN IF NOT EXISTS `net_needle`  int(11) NULL DEFAULT '' AFTER `needle_position`,
+ADD COLUMN IF NOT EXISTS `net_needle`  int(11) NULL AFTER `needle_position`,
 ADD COLUMN IF NOT EXISTS `product_specification`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' AFTER `net_needle`,
 ADD COLUMN IF NOT EXISTS `machine_production_state`  tinyint(1) NULL DEFAULT 0 AFTER `product_specification`;