From e0a61480eba85a78da08ec8ad2dd1f6d61e3baa5 Mon Sep 17 00:00:00 2001
From: lgh0010 <1746689524@qq.com>
Date: Sat, 1 Jan 2022 23:15:06 +0800
Subject: [PATCH 01/19] =?UTF-8?q?=E5=87=BA=E5=BA=93=E7=9B=B8=E5=85=B3?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
5.数据库/dump-mt_wms_qj-202112230921.sql | 1765 +++++++++++++++++
.../mt/wms/core/dal/entity/ParEleValue.java | 10 +-
.../core/dal/mapper/ParEleValueMapper.java | 2 +-
.../wms/core/dal/mapper/ParEleValueMapper.xml | 4 +-
.../dal/service/ParEleValueServiceBiz.java | 2 +-
.../impl/ParEleValueServiceBizImpl.java | 2 +-
.../empty/controller/ElectricController.java | 124 +-
.../wms/empty/params/AlarmInfoQueryParam.java | 4 +-
.../service/impl/AlarmInfoServiceImpl.java | 2 +-
.../service/impl/OutStockServiceImpl.java | 25 +-
.../service/impl/StockInfoServiceImpl.java | 15 +-
.../mt/wms/empty/task/AsynRunTaskService.java | 107 +-
.../com/mt/wms/empty/task/RunTaskUtils.java | 37 +-
.../com/mt/wms/empty/task/ScheduledTask.java | 30 +-
.../com/mt/wms/empty/vo/CurrTaskDetVo.java | 2 +-
.../java/com/mt/wms/empty/vo/StockInfoVo.java | 4 +-
16 files changed, 2099 insertions(+), 36 deletions(-)
create mode 100644 5.数据库/dump-mt_wms_qj-202112230921.sql
diff --git a/5.数据库/dump-mt_wms_qj-202112230921.sql b/5.数据库/dump-mt_wms_qj-202112230921.sql
new file mode 100644
index 0000000..f982b4b
--- /dev/null
+++ b/5.数据库/dump-mt_wms_qj-202112230921.sql
@@ -0,0 +1,1765 @@
+-- MySQL dump 10.13 Distrib 5.5.40, for Win64 (x86)
+--
+-- Host: mysql.picaiba.com Database: mt_wms_qj
+-- ------------------------------------------------------
+-- Server version 8.0.25
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+--
+-- Table structure for table `t_alarm_base`
+--
+
+DROP TABLE IF EXISTS `t_alarm_base`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_alarm_base` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码',
+ `code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '编码',
+ `alarm_class` varchar(128) DEFAULT '' COMMENT '报警类型,数据字典获取',
+ `alarm_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '报警编码',
+ `alarm_info` varchar(1024) NOT NULL COMMENT '报警内容',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=252 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='报警基础表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_alarm_info`
+--
+
+DROP TABLE IF EXISTS `t_alarm_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_alarm_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `equipment_id` int NOT NULL COMMENT '设备id',
+ `equipment_name` varchar(128) DEFAULT '' COMMENT '设备名称',
+ `type` int DEFAULT '0' COMMENT '报警类型 0窑炉,1表示车辆,依次类推',
+ `alarm_code` varchar(128) NOT NULL COMMENT '报警编码',
+ `alarm_info` varchar(1024) DEFAULT '' COMMENT '报警内容',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='报警信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_apms_check_result`
+--
+
+DROP TABLE IF EXISTS `t_apms_check_result`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_apms_check_result` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `sheet_no` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '生产单号',
+ `iden_card_num` varchar(128) NOT NULL COMMENT '标识卡号',
+ `hardness` varchar(128) DEFAULT '' COMMENT '硬度检验结果(合格、不合格、返工、作废)',
+ `metallography` varchar(128) DEFAULT '' COMMENT '金相检验结果(合格、不合格)',
+ `heart_hardness` float(8,2) DEFAULT '0.00' COMMENT '心部硬度检验值',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='apms推送检验结果表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_auto_exe_task`
+--
+
+DROP TABLE IF EXISTS `t_auto_exe_task`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_auto_exe_task` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `status` int DEFAULT '0' COMMENT '状态,0:新增,1:执行中,2完成',
+ `inter_code` varchar(128) NOT NULL COMMENT '内部编码,系统自动生成',
+ `process_flow_id` bigint DEFAULT '0' COMMENT '工艺流程ID',
+ `process_flow_name` varchar(128) DEFAULT '' COMMENT '工艺流程名称',
+ `process_flow_type` int NOT NULL COMMENT '工艺类型,1表示第一种工艺流程,2表示第二种工艺流程',
+ `craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID',
+ `craft_code` varchar(128) DEFAULT '' COMMENT '工艺编码',
+ `warehouse_id` bigint DEFAULT '0' COMMENT '区域ID,区分不同操作区域',
+ `f_task_id` bigint DEFAULT '0' COMMENT '执行任务ID,关联任务表:t_curr_task',
+ `f_det_task_code` varchar(128) NOT NULL COMMENT '任务编码,子任务编码对应任务表t_curr_task中task_code编码',
+ `f_equipment_type_id` bigint DEFAULT '0' COMMENT '设备类型ID,关联设备类型表:t_equipment_type',
+ `f_equipment_id` bigint DEFAULT '0' COMMENT '设备ID,关联设备表:t_kiln_info',
+ `f_craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `f_plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `f_in_tran_status` int DEFAULT '0' COMMENT '进炉运输状态,0:开始,1:运输中,2:运输完成',
+ `f_pro_status` int DEFAULT '0' COMMENT '加工状态,0:加工开始,1:加工中,2:加工完成',
+ `f_out_tran_status` int DEFAULT '0' COMMENT '出炉运输状态,0:开始,1:运输中,2:运输完成',
+ `t_task_id` bigint DEFAULT '0' COMMENT '执行任务ID,关联任务表:t_curr_task',
+ `t_det_task_code` varchar(128) NOT NULL COMMENT '任务编码,子任务编码对应任务表t_curr_task中task_code编码',
+ `t_equipment_type_id` bigint DEFAULT '0' COMMENT '设备类型ID,关联设备类型表:t_equipment_type',
+ `t_equipment_id` bigint DEFAULT '0' COMMENT '设备ID,关联设备表:t_kiln_info',
+ `t_craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `t_plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `t_in_tran_status` int DEFAULT '0' COMMENT '进炉运输状态,0:开始,1:运输中,2:运输完成',
+ `t_pro_status` int DEFAULT '0' COMMENT '加工状态,0:加工开始,1:加工中,2:加工完成',
+ `t_out_tran_status` int DEFAULT '0' COMMENT '出炉运输状态,0:开始,1:运输中,2:运输完成',
+ `th_task_id` bigint DEFAULT '0' COMMENT '执行任务ID,关联任务表:t_curr_task',
+ `th_det_task_code` varchar(128) NOT NULL COMMENT '任务编码,子任务编码对应任务表t_curr_task中task_code编码',
+ `th_equipment_type_id` bigint DEFAULT '0' COMMENT '设备类型ID,关联设备类型表:t_equipment_type',
+ `th_equipment_id` bigint DEFAULT '0' COMMENT '设备ID,关联设备表:t_kiln_info',
+ `th_craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `th_plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `th_in_tran_status` int DEFAULT '0' COMMENT '进炉运输状态,0:开始,1:运输中,2:运输完成',
+ `th_pro_status` int DEFAULT '0' COMMENT '加工状态,0:加工开始,1:加工中,2:加工完成',
+ `th_out_tran_status` int DEFAULT '0' COMMENT '出炉运输状态,0:开始,1:运输中,2:运输完成',
+ `content` varchar(1024) DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自动执行任务表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_auto_exe_task_his`
+--
+
+DROP TABLE IF EXISTS `t_auto_exe_task_his`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_auto_exe_task_his` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `status` int DEFAULT '0' COMMENT '状态,0:新增,1:执行中,2完成',
+ `inter_code` varchar(128) NOT NULL COMMENT '内部编码,系统自动生成',
+ `process_flow_id` bigint DEFAULT '0' COMMENT '工艺流程ID',
+ `process_flow_name` varchar(128) DEFAULT '' COMMENT '工艺流程名称',
+ `process_flow_type` int NOT NULL COMMENT '工艺类型,1表示第一种工艺流程,2表示第二种工艺流程',
+ `craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID',
+ `craft_code` varchar(128) DEFAULT '' COMMENT '工艺编码',
+ `warehouse_id` bigint DEFAULT '0' COMMENT '区域ID,区分不同操作区域',
+ `f_task_id` bigint DEFAULT '0' COMMENT '执行任务ID,关联任务表:t_curr_task',
+ `f_det_task_code` varchar(128) NOT NULL COMMENT '任务编码,子任务编码对应任务表t_curr_task中task_code编码',
+ `f_equipment_type_id` bigint DEFAULT '0' COMMENT '设备类型ID,关联设备类型表:t_equipment_type',
+ `f_equipment_id` bigint DEFAULT '0' COMMENT '设备ID,关联设备表:t_kiln_info',
+ `f_craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `f_plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `f_in_tran_status` int DEFAULT '0' COMMENT '进炉运输状态,0:开始,1:运输中,2:运输完成',
+ `f_pro_status` int DEFAULT '0' COMMENT '加工状态,0:加工开始,1:加工中,2:加工完成',
+ `f_out_tran_status` int DEFAULT '0' COMMENT '出炉运输状态,0:开始,1:运输中,2:运输完成',
+ `t_task_id` bigint DEFAULT '0' COMMENT '执行任务ID,关联任务表:t_curr_task',
+ `t_det_task_code` varchar(128) NOT NULL COMMENT '任务编码,子任务编码对应任务表t_curr_task中task_code编码',
+ `t_equipment_type_id` bigint DEFAULT '0' COMMENT '设备类型ID,关联设备类型表:t_equipment_type',
+ `t_equipment_id` bigint DEFAULT '0' COMMENT '设备ID,关联设备表:t_kiln_info',
+ `t_craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `t_plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `t_in_tran_status` int DEFAULT '0' COMMENT '进炉运输状态,0:开始,1:运输中,2:运输完成',
+ `t_pro_status` int DEFAULT '0' COMMENT '加工状态,0:加工开始,1:加工中,2:加工完成',
+ `t_out_tran_status` int DEFAULT '0' COMMENT '出炉运输状态,0:开始,1:运输中,2:运输完成',
+ `th_task_id` bigint DEFAULT '0' COMMENT '执行任务ID,关联任务表:t_curr_task',
+ `th_det_task_code` varchar(128) NOT NULL COMMENT '任务编码,子任务编码对应任务表t_curr_task中task_code编码',
+ `th_equipment_type_id` bigint DEFAULT '0' COMMENT '设备类型ID,关联设备类型表:t_equipment_type',
+ `th_equipment_id` bigint DEFAULT '0' COMMENT '设备ID,关联设备表:t_kiln_info',
+ `th_craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `th_plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `th_in_tran_status` int DEFAULT '0' COMMENT '进炉运输状态,0:开始,1:运输中,2:运输完成',
+ `th_pro_status` int DEFAULT '0' COMMENT '加工状态,0:加工开始,1:加工中,2:加工完成',
+ `th_out_tran_status` int DEFAULT '0' COMMENT '出炉运输状态,0:开始,1:运输中,2:运输完成',
+ `content` varchar(1024) DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='自动执行任务表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_communication_log`
+--
+
+DROP TABLE IF EXISTS `t_communication_log`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_communication_log` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `type` int DEFAULT '0' COMMENT '类型,0:wms To wcs日志,1:wcs to wms日志\r\n2:wms to apms日志 3:apms to wms日志',
+ `code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '内部编码,系统自动生成',
+ `log_name` varchar(128) DEFAULT '' COMMENT '日志名称',
+ `content` varchar(1024) DEFAULT '' COMMENT '内容',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=288 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='通讯日志信息 包括wcs与wms apms与wms相互通讯';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_craft_info`
+--
+
+DROP TABLE IF EXISTS `t_craft_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_craft_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态,0:可用,1:不可用',
+ `inter_code` varchar(128) NOT NULL COMMENT '内部编码,系统自动生成',
+ `craft_code` varchar(128) NOT NULL COMMENT '工艺号',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `plc_value` int NOT NULL COMMENT '对应PLC值',
+ `content` varchar(1024) DEFAULT '' COMMENT '说明',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='设备工艺信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_curr_task`
+--
+
+DROP TABLE IF EXISTS `t_curr_task`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_curr_task` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,每次修改记录要更新记录新增时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态: 0等待执行,1执行中,2执行完成',
+ `inter_code` varchar(128) NOT NULL COMMENT '内部编码,系统自动生成',
+ `is_auto` int DEFAULT '0' COMMENT '是否自动执行: 0手动,1自动,如果是自动任务这里要监控进出和到缓存区的调度任务',
+ `auto_exe_task_id` bigint DEFAULT '0' COMMENT '任务流程ID,关联流程表:t_auto_exe_task',
+ `kiln_id` bigint NOT NULL COMMENT '窑炉id,关联设备窑炉表:t_kiln_info',
+ `kiln_name` varchar(128) DEFAULT '' COMMENT '窑炉名称',
+ `craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `begin_time` datetime DEFAULT NULL COMMENT '开始加工时间',
+ `end_time` datetime DEFAULT NULL COMMENT '加工结束时间',
+ `is_in` int DEFAULT '0' COMMENT '进炉状态: 0准备进炉,1正在加工,2加工完成',
+ `run_task_id` bigint DEFAULT '0' COMMENT '调度任务ID,关联调度表:t_run_task',
+ `start_position` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '开始位置',
+ `target_position` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '目标位置指的是窑炉的位置',
+ `is_cache` int DEFAULT '0' COMMENT '是否缓存,如果当前指的窑炉正在加工,系统自动分配货物到缓存位置,\r\n 并且记录缓存库位,这是当指定窑炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行',
+ `cache_satatus` int DEFAULT '0' COMMENT '缓存状态状态: 0准备进入缓存区,1正在进入缓存区,2缓存完成',
+ `cache_run_task_id` bigint DEFAULT '0' COMMENT '调度任务ID,关联调度表:t_run_task',
+ `location_id` bigint DEFAULT '0' COMMENT '库位id,关联库位表:t_location',
+ `location_name` varchar(128) DEFAULT '' COMMENT '库位名称',
+ `is_out` int DEFAULT '0' COMMENT '出炉状态: 0准备出炉,1正在加工,2加工完成',
+ `out_run_task_id` bigint DEFAULT '0' COMMENT '调度任务ID,关联调度表:t_run_task',
+ `out_start_position` varchar(128) DEFAULT '' COMMENT '开始位置',
+ `out_target_position` varchar(128) DEFAULT '' COMMENT '目标位置,指缓存位置',
+ `task_code` varchar(100) NOT NULL DEFAULT '' COMMENT '任务编码',
+ `sheet_no` varchar(128) DEFAULT NULL COMMENT '生产单号 APMS生成生产单后返回',
+ `task_type` int NOT NULL COMMENT '任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库',
+ `process_type` int NOT NULL COMMENT '加工类型:0 初始加工,1 复加工 ',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=252 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_curr_task_det`
+--
+
+DROP TABLE IF EXISTS `t_curr_task_det`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_curr_task_det` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,每次修改记录要更新记录新增时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态: 0等待执行',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `task_code` varchar(128) DEFAULT '' COMMENT '任务编码',
+ `curr_task_id` bigint NOT NULL COMMENT '当前任务id,关联当前任务表:t_curr_task',
+ `order_no` varchar(128) DEFAULT '' COMMENT '订单号,',
+ `iden_card_num` varchar(128) NOT NULL COMMENT '标识卡号,',
+ `product_name` varchar(128) DEFAULT '' COMMENT '产品名称',
+ `material_des` varchar(128) DEFAULT '' COMMENT '材料牌号 ',
+ `craft_ill` varchar(512) DEFAULT '' COMMENT '工艺要求 ',
+ `unit` varchar(32) DEFAULT '' COMMENT '单位',
+ `weight` float(8,2) DEFAULT '0.00' COMMENT '重量,手动输入',
+ `quantity` float(8,2) DEFAULT '0.00' COMMENT '数量,手动输入',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=254 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='当前任务明细';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_factory`
+--
+
+DROP TABLE IF EXISTS `t_factory`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_factory` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '0' COMMENT '删除标志,是否有效:0 可用 1不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码',
+ `code` varchar(128) NOT NULL COMMENT '工厂编码',
+ `factory_name` varchar(256) NOT NULL COMMENT '工厂名称',
+ `address` varchar(512) DEFAULT '' COMMENT '工厂地址',
+ `description` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='工厂';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_in_stock_info`
+--
+
+DROP TABLE IF EXISTS `t_in_stock_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_in_stock_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态: 0未开始执行,1正在执行,2执行完成',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `task_code` varchar(128) DEFAULT '' COMMENT '任务编码',
+ `task_id` bigint DEFAULT '0' COMMENT '任务id,关联当前任务表:currTask',
+ `kiln_id` bigint DEFAULT NULL COMMENT '窑炉id ,if(status == 0){从窑炉出来等待库存} else if(status == 1){到目标窑炉前缓存到库位}关联设备窑炉表:t_kiln_info',
+ `kiln_name` varchar(128) DEFAULT '' COMMENT '窑炉名称',
+ `location_id` bigint DEFAULT '0' COMMENT '库位id,关联库位表:t_location',
+ `location_name` varchar(128) DEFAULT '' COMMENT '库位名称',
+ `pallet_code` varchar(128) DEFAULT '' COMMENT '托盘编码',
+ `type` int DEFAULT '0' COMMENT '类型: 0等待出库,1到窑炉前缓存,2插单任务缓存',
+ `in_time` datetime DEFAULT NULL COMMENT '进入缓存区的时间,插单任务按倒叙执行,正常任务按顺序执行',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='缓存区存储情况';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_in_stock_info_his`
+--
+
+DROP TABLE IF EXISTS `t_in_stock_info_his`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_in_stock_info_his` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态: 0未开始执行,1正在执行,2执行完成',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `task_code` varchar(128) DEFAULT '' COMMENT '任务编码',
+ `task_id` int DEFAULT '0' COMMENT '历史任务id,关联任务表:t_task_his',
+ `kiln_id` int NOT NULL COMMENT '窑炉id ,if(status == 0){从窑炉出来等待库存} else if(status == 1){到目标窑炉前缓存到库位}关联设备窑炉表:t_kiln_info',
+ `kiln_name` varchar(128) DEFAULT '' COMMENT '窑炉名称',
+ `location_id` int DEFAULT '0' COMMENT '库位id,关联库位表:t_location',
+ `location_name` varchar(128) DEFAULT '' COMMENT '库位名称',
+ `pallet_code` varchar(128) DEFAULT '' COMMENT '托盘编码',
+ `type` int DEFAULT NULL COMMENT '类型: 0等待出库,1到窑炉前缓存,2插单任务缓存',
+ `in_time` varchar(100) DEFAULT NULL COMMENT '进入缓存区的时间,插单任务按倒叙执行,正常任务按顺序执行',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='缓存区存储历史情况';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_kiln_info`
+--
+
+DROP TABLE IF EXISTS `t_kiln_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_kiln_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '编码 必须与AMPS相同',
+ `factory_id` int DEFAULT NULL COMMENT '绑定工厂id',
+ `kiln_name` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '窑炉名称 建议与AMPS相同',
+ `kiln_alias` varchar(256) DEFAULT '' COMMENT '窑炉别名',
+ `en` varchar(256) DEFAULT '' COMMENT '英语名称',
+ `type` varchar(64) DEFAULT '' COMMENT '设备类型,存储数据字典编码',
+ `ip` varchar(32) DEFAULT '' COMMENT 'ip地址',
+ `port_number` varchar(16) DEFAULT '' COMMENT '端口号',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='窑炉信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_location`
+--
+
+DROP TABLE IF EXISTS `t_location`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_location` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0空闲,1使用,2不可用',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `factory_id` int DEFAULT NULL COMMENT '绑定工厂id',
+ `warehouse_id` int DEFAULT NULL COMMENT '缓存区id,关联表:t_warehouse',
+ `location_name` varchar(256) NOT NULL COMMENT '货位名称',
+ `location_name_alias` varchar(256) DEFAULT NULL COMMENT '库位别名',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='库位表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_login_log`
+--
+
+DROP TABLE IF EXISTS `t_login_log`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_login_log` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `session_id` varchar(64) NOT NULL COMMENT '会话ID',
+ `account_id` bigint NOT NULL COMMENT '账号ID',
+ `user_id` bigint NOT NULL COMMENT '用户ID',
+ `corp_id` bigint DEFAULT NULL COMMENT '公司ID',
+ `hospital_id` bigint DEFAULT NULL COMMENT '医院ID',
+ `org_id` bigint DEFAULT NULL COMMENT '组织ID',
+ `account` varchar(32) NOT NULL COMMENT '账号',
+ `mobile` varchar(16) DEFAULT NULL COMMENT '手机号',
+ `user_name` varchar(64) DEFAULT NULL COMMENT '用户名称',
+ `corp_name` varchar(256) DEFAULT NULL COMMENT '公司名称',
+ `hospital_name` varchar(256) DEFAULT NULL COMMENT '医院名称',
+ `org_name` varchar(128) DEFAULT NULL COMMENT '组织名称,存放平台组织或者医院科室或者公司门店',
+ `user_type` int NOT NULL COMMENT '用户类型:1、平台用户,2、公司用户,3、医院用户,4、患者',
+ `app_type` int NOT NULL COMMENT '应用类型:1、pc,2、app,3、wechat,4、miniapp',
+ `app_code` int DEFAULT NULL COMMENT '应用编码:暂未使用',
+ `login_type` int NOT NULL DEFAULT '1' COMMENT '登录类型:1、自主登录,2、漫游登录',
+ `logout_type` int NOT NULL DEFAULT '1' COMMENT '退出类型:1、自主退出,2、管理退出,3,超时退出',
+ `login_time` datetime NOT NULL COMMENT '登录时间',
+ `logout_time` datetime NOT NULL COMMENT '退出时间',
+ `device_class` varchar(32) DEFAULT NULL COMMENT '设备类型',
+ `device_name` varchar(64) DEFAULT NULL COMMENT '设备名称',
+ `device_brand` varchar(64) DEFAULT NULL COMMENT '设备品牌',
+ `os` varchar(64) DEFAULT NULL COMMENT '操作系统',
+ `browser` varchar(64) DEFAULT NULL COMMENT '浏览器',
+ `country` varchar(32) DEFAULT NULL COMMENT '国家',
+ `province` varchar(32) DEFAULT NULL COMMENT '省份',
+ `city` varchar(32) DEFAULT NULL COMMENT '地市',
+ `county` varchar(32) DEFAULT NULL COMMENT '区县',
+ `address` varchar(256) DEFAULT NULL COMMENT '地址',
+ `lng` varchar(16) DEFAULT NULL COMMENT '精度',
+ `lat` varchar(16) DEFAULT NULL COMMENT '纬度',
+ `isp` varchar(32) DEFAULT NULL COMMENT '网络服务提供商',
+ `ip` varchar(16) DEFAULT NULL COMMENT 'IP地址',
+ `user_agent` varchar(1024) DEFAULT NULL COMMENT '用户代理,存放用户登录时客户端信息',
+ `logout_address` varchar(256) DEFAULT NULL COMMENT '退出地址',
+ `logout_ip` varchar(16) DEFAULT NULL COMMENT '退出IP地址',
+ `logout_user_agent` varchar(1024) DEFAULT NULL COMMENT '退出用户代理,存放用户退出时客户端信息',
+ `abnormal_status` int NOT NULL DEFAULT '0' COMMENT '异常状态:0、正常,1、省份异常,2、地市异常,3、区县异常',
+ `ip_to_address_status` int NOT NULL DEFAULT '0' COMMENT 'ip转地址状态:0、未获取,1、登录地址获取成功,2、退出地址获取成功,-1、登录地址获取失败,-2、退出地址获取失败',
+ `ip_to_address_count` int NOT NULL DEFAULT '0' COMMENT 'ip转地址次数,最多转换3次,三次失败修改状态为失败(-1、-2)',
+ `ip_to_address_time` datetime DEFAULT NULL COMMENT 'ip转地址时间',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='登录日志表,存放历史会话信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_login_session`
+--
+
+DROP TABLE IF EXISTS `t_login_session`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_login_session` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `session_id` varchar(64) NOT NULL COMMENT '会话ID',
+ `account_id` bigint NOT NULL COMMENT '账号ID',
+ `user_id` bigint NOT NULL COMMENT '用户ID',
+ `corp_id` bigint DEFAULT NULL COMMENT '公司ID',
+ `hospital_id` bigint DEFAULT NULL COMMENT '医院ID',
+ `org_id` bigint DEFAULT NULL COMMENT '组织ID',
+ `account` varchar(32) NOT NULL COMMENT '账号',
+ `mobile` varchar(16) DEFAULT NULL COMMENT '手机号',
+ `user_name` varchar(64) DEFAULT NULL COMMENT '用户名称',
+ `corp_name` varchar(256) DEFAULT NULL COMMENT '公司名称',
+ `hospital_name` varchar(256) DEFAULT NULL COMMENT '医院名称',
+ `org_name` varchar(128) DEFAULT NULL COMMENT '组织名称,存放平台组织或者医院科室或者公司门店',
+ `user_type` int NOT NULL COMMENT '用户类型:1、平台用户,2、公司用户,3、医院用户,4、患者',
+ `app_type` int NOT NULL COMMENT '应用类型:1、pc,2、app,3、wechat,4、miniapp',
+ `app_code` int DEFAULT NULL COMMENT '应用编码:暂未使用',
+ `login_type` int NOT NULL DEFAULT '1' COMMENT '登录类型:1、自主登录,2、漫游登录',
+ `login_time` datetime NOT NULL COMMENT '登录时间',
+ `device_class` varchar(32) DEFAULT NULL COMMENT '设备类型',
+ `device_name` varchar(64) DEFAULT NULL COMMENT '设备名称',
+ `device_brand` varchar(64) DEFAULT NULL COMMENT '设备品牌',
+ `os` varchar(64) DEFAULT NULL COMMENT '操作系统',
+ `browser` varchar(64) DEFAULT NULL COMMENT '浏览器',
+ `country` varchar(32) DEFAULT NULL COMMENT '国家',
+ `province` varchar(32) DEFAULT NULL COMMENT '省份',
+ `city` varchar(32) DEFAULT NULL COMMENT '地市',
+ `county` varchar(32) DEFAULT NULL COMMENT '区县',
+ `address` varchar(256) DEFAULT NULL COMMENT '地址',
+ `lng` varchar(16) DEFAULT NULL COMMENT '精度',
+ `lat` varchar(16) DEFAULT NULL COMMENT '纬度',
+ `isp` varchar(32) DEFAULT NULL COMMENT '网络服务提供商',
+ `ip` varchar(16) DEFAULT NULL COMMENT 'IP地址',
+ `user_agent` varchar(1024) DEFAULT NULL COMMENT '用户代理,存放用户登录时客户端信息',
+ `ip_to_address_status` int NOT NULL DEFAULT '0' COMMENT 'ip转地址状态:0、未获取,1、登录地址获取成功,2、退出地址获取成功,-1、登录地址获取失败,-2、退出地址获取失败',
+ `ip_to_address_count` int NOT NULL DEFAULT '0' COMMENT 'ip转地址次数,最多转换3次,三次失败修改状态为失败(-1、-2)',
+ `ip_to_address_time` datetime DEFAULT NULL COMMENT 'ip转地址时间',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='登录会话表,存放在线用户信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_order_info`
+--
+
+DROP TABLE IF EXISTS `t_order_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_order_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,每次修改记录要更新记录新增时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `order_source` int NOT NULL COMMENT '来源:1.APMS 2.人工输入',
+ `status` int DEFAULT '0' COMMENT '状态: 0等待执行,1执行中,2执行完成',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `order_no` varchar(128) NOT NULL COMMENT '订单号,APMS系统获取',
+ `old_order_no` varchar(128) DEFAULT NULL COMMENT '原订单号,APMS系统获取 返单时才存在',
+ `iden_card_num` varchar(128) NOT NULL COMMENT '标识卡号,APMS系统获取',
+ `customer_no` varchar(128) DEFAULT '' COMMENT '客户编码 APMS系统获取',
+ `customer_name` varchar(128) DEFAULT '' COMMENT '客户名称 APMS系统获取',
+ `product_name` varchar(128) DEFAULT '' COMMENT '产品名称 APMS系统获取',
+ `product_model` varchar(128) DEFAULT '' COMMENT '产品型号 APMS系统获取',
+ `material_des` varchar(128) DEFAULT '' COMMENT '材料牌号 APMS系统获取',
+ `craft_ill` varchar(512) DEFAULT '' COMMENT '工艺要求 APMS系统获取',
+ `unit` varchar(32) DEFAULT '' COMMENT '单位',
+ `weight` float(8,2) DEFAULT '0.00' COMMENT '重量',
+ `quantity` float(8,2) DEFAULT '0.00' COMMENT '数量',
+ `add_a` float(8,2) DEFAULT '0.00' COMMENT '扩展字段1',
+ `add_b` float(8,2) DEFAULT '0.00' COMMENT '扩展字段2',
+ `orther_a` varchar(128) DEFAULT '' COMMENT '扩展字段4',
+ `orther_b` varchar(128) DEFAULT '' COMMENT '扩展字段5',
+ `order_void` int NOT NULL DEFAULT '1' COMMENT '是否作废 1:正常 0:作废',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=254 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单任务表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_order_info_his`
+--
+
+DROP TABLE IF EXISTS `t_order_info_his`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_order_info_his` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,每次修改记录要更新记录新增时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `order_source` int NOT NULL COMMENT '来源:1.APMS 2.人工输入',
+ `status` int DEFAULT '0' COMMENT '状态: 0等待执行,1执行中,2执行完成',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `order_no` varchar(128) NOT NULL COMMENT '订单号,APMS系统获取',
+ `old_order_no` varchar(128) DEFAULT NULL COMMENT '原订单号,APMS系统获取,返工单才存在',
+ `iden_card_num` varchar(128) NOT NULL COMMENT '标识卡号,APMS系统获取',
+ `customer_no` varchar(128) DEFAULT '' COMMENT '客户编码 APMS系统获取',
+ `customer_name` varchar(128) DEFAULT '' COMMENT '客户名称 APMS系统获取',
+ `product_name` varchar(128) DEFAULT '' COMMENT '产品名称 APMS系统获取',
+ `product_model` varchar(128) DEFAULT '' COMMENT '产品型号 APMS系统获取',
+ `material_des` varchar(128) DEFAULT '' COMMENT '材料牌号 APMS系统获取',
+ `craft_ill` varchar(512) DEFAULT '' COMMENT '工艺要求 APMS系统获取',
+ `unit` varchar(32) DEFAULT '' COMMENT '单位',
+ `weight` float(8,2) DEFAULT '0.00' COMMENT '重量',
+ `quantity` float(8,2) DEFAULT '0.00' COMMENT '数量',
+ `order_void` int NOT NULL DEFAULT '1' COMMENT '是否作废 1:正常 ,0:作废',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=258 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='订单任务历史表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_par_base`
+--
+
+DROP TABLE IF EXISTS `t_par_base`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_par_base` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `par_name` varchar(128) NOT NULL COMMENT '参数名称',
+ `unit` varchar(128) NOT NULL COMMENT '单位,数据字典获取',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='参数基础表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_par_ele_value`
+--
+
+DROP TABLE IF EXISTS `t_par_ele_value`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_par_ele_value` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `kiln_id` int NOT NULL COMMENT '窑炉id,关联设备窑炉表:t_kiln_info',
+ `par_id` int NOT NULL COMMENT '参数id,关联参数表:t_par_info',
+ `a_voltagev_value` float(8,2) DEFAULT '0.00' COMMENT 'A相电压',
+ `b_voltagev_value` float(8,2) DEFAULT '0.00' COMMENT 'B相电压',
+ `c_voltagev_value` float(8,2) DEFAULT '0.00' COMMENT 'C相电压',
+ `a_current_value` float(8,2) DEFAULT '0.00' COMMENT 'A相电流',
+ `b_current_value` float(8,2) DEFAULT '0.00' COMMENT 'B相电流',
+ `c_current_value` float(8,2) DEFAULT '0.00' COMMENT 'C相电流',
+ `total_bat` float(8,2) DEFAULT '0.00' COMMENT '总电量,单位KW',
+ `add_a` float(8,2) DEFAULT '0.00' COMMENT '扩展字段1',
+ `add_b` float(8,2) DEFAULT '0.00' COMMENT '扩展字段2',
+ `add_c` float(8,2) DEFAULT '0.00' COMMENT '扩展字段3',
+ `orther_a` varchar(128) DEFAULT '' COMMENT '扩展字段4',
+ `orther_b` varchar(128) DEFAULT '' COMMENT '扩展字段5',
+ `orther_c` varchar(128) DEFAULT '' COMMENT '扩展字段6',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='窑炉电能参数值';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_par_gas_value`
+--
+
+DROP TABLE IF EXISTS `t_par_gas_value`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_par_gas_value` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `kiln_id` int NOT NULL COMMENT '窑炉id,关联设备窑炉表:t_kiln_info',
+ `par_id` int NOT NULL COMMENT '参数id,关联参数表:t_par_info',
+ `set_nit_pot_value` float(8,2) DEFAULT '0.00' COMMENT '设定氮势值',
+ `actual_nit_pot_value` float(8,2) DEFAULT '0.00' COMMENT '实际氮势值',
+ `accept_nit_pot_value` float(8,2) DEFAULT '0.00' COMMENT '接受氮势值',
+ `nit_flow_value` float(10,2) DEFAULT '0.00' COMMENT '氮气流量',
+ `ammonia_flow_value` float(10,2) DEFAULT '0.00' COMMENT '氨气流量',
+ `car_dioxide_flow_value` float(10,2) DEFAULT '0.00' COMMENT '二氧化碳流量',
+ `add_a` float(8,2) DEFAULT '0.00' COMMENT '扩展字段1',
+ `add_b` float(8,2) DEFAULT '0.00' COMMENT '扩展字段2',
+ `add_c` float(8,2) DEFAULT '0.00' COMMENT '扩展字段3',
+ `orther_a` varchar(128) DEFAULT '' COMMENT '扩展字段4',
+ `orther_b` varchar(128) DEFAULT '' COMMENT '扩展字段5',
+ `orther_c` varchar(128) DEFAULT '' COMMENT '扩展字段6',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='窑炉使用气检测值';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_par_info`
+--
+
+DROP TABLE IF EXISTS `t_par_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_par_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `type` int NOT NULL COMMENT '参数类型,0 表示电能,1表示用气,3温度,4转速 依次类推',
+ `class_a` int DEFAULT '0' COMMENT '参数分类,eg:if (type ==0 && class_a== 0) {class_a== 0表示A向电压,class_a== 1,表示B向电压,class_a== 2,表示C向电压,依次类推} ',
+ `class_b` int DEFAULT '0' COMMENT '参数分类,eg:if (type ==0 && class_b== 0) {class_b== 0表示A向电流,class_b== 1,表示B向电流,class_b== 2,表示C向电流,依次类推} ',
+ `par_name` varchar(128) NOT NULL COMMENT '参数名称',
+ `unit` varchar(128) NOT NULL COMMENT '单位,数据字典获取',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='参数表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_par_rot_speed_value`
+--
+
+DROP TABLE IF EXISTS `t_par_rot_speed_value`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_par_rot_speed_value` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `inter_code` varchar(128) NOT NULL COMMENT '内部编码,系统自动生成',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `kiln_id` int NOT NULL COMMENT '窑炉id,关联设备窑炉表:t_kiln_info',
+ `par_id` int NOT NULL COMMENT '参数id,关联参数表:t_par_info',
+ `fan_speed_a_value` float(8,2) DEFAULT '0.00' COMMENT '后室风扇1运行速度值',
+ `fan_speed_b_value` float(8,2) DEFAULT '0.00' COMMENT '后室风扇2运行速度值',
+ `oil_sti_speed_a_value` float(8,2) DEFAULT '0.00' COMMENT '油搅拌1运行速度',
+ `oil_sti_speed_b_value` float(8,2) DEFAULT '0.00' COMMENT '油搅拌2运行速度',
+ `oil_sti_speed_c_value` float(8,2) DEFAULT '0.00' COMMENT '油搅拌3运行速度',
+ `oil_sti_speed_d_value` float(8,2) DEFAULT '0.00' COMMENT '油搅拌4运行速度',
+ `oil_sti_speed_e_value` float(8,2) DEFAULT '0.00' COMMENT '油搅拌5运行速度',
+ `oil_sti_speed_f_value` float(8,2) DEFAULT '0.00' COMMENT '油搅拌6运行速度',
+ `add_a` float(8,2) DEFAULT '0.00' COMMENT '扩展字段1',
+ `add_b` float(8,2) DEFAULT '0.00' COMMENT '扩展字段2',
+ `add_c` float(8,2) DEFAULT '0.00' COMMENT '扩展字段3',
+ `orther_a` varchar(128) DEFAULT '' COMMENT '扩展字段4',
+ `orther_b` varchar(128) DEFAULT '' COMMENT '扩展字段5',
+ `orther_c` varchar(128) DEFAULT '' COMMENT '扩展字段6',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='窑炉运转速度';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_par_tem_value`
+--
+
+DROP TABLE IF EXISTS `t_par_tem_value`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_par_tem_value` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1损坏',
+ `kiln_id` int NOT NULL COMMENT '窑炉id,关联设备窑炉表:t_kiln_info',
+ `par_id` int NOT NULL COMMENT '参数id,关联参数表:t_par_info',
+ `set_tem_value` float(8,2) DEFAULT '0.00' COMMENT '设定温度值',
+ `act_tem_value` float(8,2) DEFAULT '0.00' COMMENT '实际温度值',
+ `oil_tank_act_tem_value` float(8,2) DEFAULT '0.00' COMMENT '油槽实际温度',
+ `oil_tank_set_tem_value` float(8,2) DEFAULT '0.00' COMMENT '油槽设定温度',
+ `take_over_set_tem_value` float(8,2) DEFAULT '0.00' COMMENT '接受设定温度',
+ `take_over_oil_set_tem_value` float(8,2) DEFAULT '0.00' COMMENT '接受设定油温度',
+ `add_a` float(8,2) DEFAULT '0.00' COMMENT '扩展字段1',
+ `add_b` float(8,2) DEFAULT '0.00' COMMENT '扩展字段2',
+ `add_c` float(8,2) DEFAULT '0.00' COMMENT '扩展字段3',
+ `orther_a` varchar(128) DEFAULT '' COMMENT '扩展字段4',
+ `orther_b` varchar(128) DEFAULT '' COMMENT '扩展字段5',
+ `orther_c` varchar(128) DEFAULT '' COMMENT '扩展字段6',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='窑炉温度监控';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_product_attr`
+--
+
+DROP TABLE IF EXISTS `t_product_attr`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_product_attr` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `product_id` int NOT NULL COMMENT '产品id,关联表:t_product_library',
+ `attr_name` varchar(128) NOT NULL COMMENT '属性名',
+ `attr_content` varchar(255) DEFAULT '' COMMENT '属性',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='产品属性表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_product_library`
+--
+
+DROP TABLE IF EXISTS `t_product_library`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_product_library` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `factory_id` int DEFAULT NULL COMMENT '绑定公司id',
+ `product_name` varchar(256) NOT NULL COMMENT '品名',
+ `spec` varchar(128) DEFAULT '' COMMENT '规格',
+ `type` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '分类,关联数据字典,如:涤纶',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='产品池';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_resource`
+--
+
+DROP TABLE IF EXISTS `t_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_resource` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `service_id` bigint NOT NULL COMMENT '服务ID',
+ `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
+ `url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '请求地址,可以用于前端ajax调用,后端用于做权限控制',
+ `method` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE',
+ `subsystem` int NOT NULL DEFAULT '0' COMMENT '子系统:0、common,1、platform,2、partner,3、hospital,4、patient\r\n 用于限定维护菜单资源关系,公共资源允许所有菜单关联,其他资源只允许对应的菜单关联,如:平台菜单只允许关联到公共资源和平台资源',
+ `category` int NOT NULL DEFAULT '0' COMMENT '分类:0、common,1、pc,2、app,3、wechat,4、miniapp',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='资源表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_run_task`
+--
+
+DROP TABLE IF EXISTS `t_run_task`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_run_task` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `task_id` bigint DEFAULT NULL COMMENT '任务id,关联curr_task表',
+ `task_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '任务编码, 查看任务编码规则',
+ `start_position` varchar(128) DEFAULT '' COMMENT '开始位置',
+ `end_position` varchar(128) DEFAULT '' COMMENT '结束位置',
+ `vehicle_id` bigint NOT NULL COMMENT '车辆id,关联车辆表:t_vehicle_info',
+ `begin_time` datetime DEFAULT NULL COMMENT '任务开始时间,车辆接收任务时间',
+ `end_time` datetime DEFAULT NULL COMMENT '结束时间,车辆完成送货时间',
+ `status` int DEFAULT '0' COMMENT '状态,0:未执行,1:正在执行,2:执行成功,3:执行失败',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='执行任务信息表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_service`
+--
+
+DROP TABLE IF EXISTS `t_service`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_service` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '编码',
+ `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='服务表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sms_code`
+--
+
+DROP TABLE IF EXISTS `t_sms_code`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sms_code` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `mobile` varchar(11) NOT NULL COMMENT '手机号码',
+ `code` varchar(8) NOT NULL COMMENT '验证码',
+ `type` int NOT NULL COMMENT '1、注册\r\n 2、找回密码\r\n 3、动态密码',
+ `expires_time` datetime DEFAULT NULL COMMENT '过期时间',
+ `used_status` int NOT NULL DEFAULT '0' COMMENT '使用状态:0、未使用,1、已使用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信验证码表,过期时间和使用状态可以不用';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sms_scene`
+--
+
+DROP TABLE IF EXISTS `t_sms_scene`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sms_scene` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `corp_id` bigint NOT NULL DEFAULT '0' COMMENT '公司ID,0为公用,默认使用0对应的短信场景',
+ `type` int NOT NULL DEFAULT '0' COMMENT '场景类型\r\n 0、其他/未分类\r\n 1、注册\r\n 2、找回密码\r\n 3、动态密码\r\n 4、订单\r\n 5、支付\r\n 6、报告单\r\n 9、系统通知',
+ `code` varchar(32) NOT NULL COMMENT '场景编码,业务系统根据该编码区分不同的业务场景',
+ `name` varchar(64) NOT NULL COMMENT '场景名称',
+ `sign_id` bigint NOT NULL COMMENT '短信签名ID',
+ `template_id` bigint NOT NULL COMMENT '短信模板ID',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `ak_key_sms_code` (`corp_id`,`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信场景表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sms_send`
+--
+
+DROP TABLE IF EXISTS `t_sms_send`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sms_send` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `corp_id` bigint NOT NULL DEFAULT '0' COMMENT '公司ID,0为公用,默认使用0对应的短信场景',
+ `scene_id` bigint NOT NULL COMMENT '短信场景ID',
+ `template_code` varchar(32) NOT NULL COMMENT '模板编号,第三方模板编码,如阿里云短信模板code',
+ `type` int NOT NULL COMMENT '短信类型\r\n 0、其他/未分类\r\n 1、注册\r\n 2、找回密码\r\n 3、动态密码\r\n 4、订单\r\n 5、支付\r\n 6、报告单\r\n 9、系统通知',
+ `mobile` varchar(1024) NOT NULL COMMENT '手机号码,多个号码用户英文逗号(,)分隔',
+ `content` varchar(1024) NOT NULL COMMENT '短信内容',
+ `relation_id` varchar(48) DEFAULT NULL COMMENT '关联ID,如:用户ID、订单ID等',
+ `sid` varchar(48) DEFAULT NULL COMMENT '短信接口测ID',
+ `send` int DEFAULT NULL COMMENT '发送条数',
+ `result_code` varchar(64) DEFAULT NULL COMMENT '短信接口结果码',
+ `result_info` varchar(256) DEFAULT NULL COMMENT '短信接口结果说明',
+ `response` varchar(512) DEFAULT NULL COMMENT '短信接口响应消息,完整的响应包',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信发送表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sms_sign`
+--
+
+DROP TABLE IF EXISTS `t_sms_sign`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sms_sign` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `name` varchar(32) NOT NULL COMMENT '签名名称',
+ `apply_time` datetime DEFAULT NULL COMMENT '申请时间',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信签名表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sms_template`
+--
+
+DROP TABLE IF EXISTS `t_sms_template`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sms_template` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `type` int NOT NULL DEFAULT '2' COMMENT '模板类型:1、验证码,2、短信通知',
+ `code` varchar(32) NOT NULL COMMENT '模板编号,第三方模板编码,如阿里云短信模板code',
+ `name` varchar(128) NOT NULL COMMENT '模板名称',
+ `content` varchar(512) NOT NULL COMMENT '模板内容',
+ `description` varchar(512) DEFAULT NULL COMMENT '模板描述',
+ `apply_time` datetime DEFAULT NULL COMMENT '申请时间',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='短信模板表,用于定义阿里云短信模板';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_dict_data`
+--
+
+DROP TABLE IF EXISTS `t_sys_dict_data`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_dict_data` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `dict_type_id` bigint NOT NULL COMMENT '字典类型ID',
+ `type_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据字典类型编号',
+ `type_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典类型名称',
+ `data_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据字典编号',
+ `data_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据字典名称',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据字典表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_dict_type`
+--
+
+DROP TABLE IF EXISTS `t_sys_dict_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_dict_type` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `type_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '数据字典类型',
+ `type_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型名称',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='数据字典类型表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_file`
+--
+
+DROP TABLE IF EXISTS `t_sys_file`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_file` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `type_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件类型编号 如病例ID',
+ `file_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件编号',
+ `file_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件名称',
+ `file_url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件路径URL',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文件表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_file_type`
+--
+
+DROP TABLE IF EXISTS `t_sys_file_type`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_file_type` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `type_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件类型编号',
+ `type_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '文件类型名称',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='文件类型表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_menu`
+--
+
+DROP TABLE IF EXISTS `t_sys_menu`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `parent_id` bigint DEFAULT NULL COMMENT '父菜单ID',
+ `code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单编码',
+ `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称',
+ `icon` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单图标',
+ `href` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '链接地址,可以是页面地址,也可以是函数事件',
+ `url` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '请求地址,可以用于前端ajax调用,后端用于做权限控制',
+ `method` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE',
+ `permission` varchar(256) DEFAULT NULL COMMENT '权限,可以有多个,用逗号分隔,可用于第三方权限框架扩展',
+ `category` int NOT NULL DEFAULT '1' COMMENT '分类:1、pc,2、app,3、wechat,4、miniapp',
+ `type` int NOT NULL DEFAULT '1' COMMENT '类型:1、module,2、menu,3、button',
+ `level` int DEFAULT '1' COMMENT '层级,从1开始',
+ `order_num` int DEFAULT '0' COMMENT '显示顺序',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `ak_sys_menu_code` (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='菜单表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_menu_resource`
+--
+
+DROP TABLE IF EXISTS `t_sys_menu_resource`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_menu_resource` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `menu_id` bigint NOT NULL COMMENT '菜单ID',
+ `resource_id` bigint NOT NULL COMMENT '资源ID',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='菜单资源关系表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_org`
+--
+
+DROP TABLE IF EXISTS `t_sys_org`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_org` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `parent_id` bigint DEFAULT NULL COMMENT '父组织ID',
+ `genealogy_id` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '家谱ID,格式:/rootId/.../grandfatherId/parentId',
+ `name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
+ `contact` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '联系人',
+ `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '联系电话',
+ `address` varchar(128) DEFAULT NULL COMMENT '联系地址',
+ `email` varchar(128) DEFAULT NULL COMMENT '邮箱',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统组织表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_post`
+--
+
+DROP TABLE IF EXISTS `t_sys_post`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_post` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `parent_id` bigint NOT NULL DEFAULT '0' COMMENT '上级岗位ID,第一个岗位的上级岗位ID填0',
+ `type` int NOT NULL DEFAULT '0' COMMENT '类型:0、内部岗位,1、代理商岗位',
+ `code` varchar(64) NOT NULL COMMENT '编码:\r\n 内部岗位:省区经理、provincial_manager,地市主管、area_manager,业务员、sale\r\n 代理商岗位:代理商、agent',
+ `name` varchar(128) NOT NULL COMMENT '名称',
+ `preset` int NOT NULL DEFAULT '0' COMMENT '预设标志:1 预设 0 非预设',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='岗位表,需根据岗位编码判断用户是否有销售、物流权限';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_role`
+--
+
+DROP TABLE IF EXISTS `t_sys_role`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色编码',
+ `name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称',
+ `type` int NOT NULL DEFAULT '1' COMMENT '类型:1、平台,2、药店,3、医院',
+ `category` int NOT NULL DEFAULT '1' COMMENT '分类:1、pc,2、app,3、wechat,4、miniapp',
+ `manager_flag` int NOT NULL DEFAULT '0' COMMENT '管理角色标志:1 管理角色0 非管理角色,管理角色不允许修改角色菜单关系',
+ `preset` int NOT NULL DEFAULT '0' COMMENT '预设角色标志:1 预设 0 非预设',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `role_code` (`code`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_role_menu`
+--
+
+DROP TABLE IF EXISTS `t_sys_role_menu`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_role_menu` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `role_id` bigint NOT NULL COMMENT '角色ID',
+ `menu_id` bigint NOT NULL COMMENT '菜单ID',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='角色菜单关系表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_user`
+--
+
+DROP TABLE IF EXISTS `t_sys_user`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_user` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `org_id` bigint NOT NULL COMMENT '组织ID',
+ `account` varchar(64) NOT NULL COMMENT '帐号',
+ `password` varchar(64) NOT NULL COMMENT '密码,存放加密后的密码,加密方式:md5(password+nonce_str),转成小写存储',
+ `code` varchar(32) NOT NULL COMMENT '工号',
+ `name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '姓名',
+ `sex` tinyint DEFAULT '1' COMMENT '性别:1、男性,2、女性,0、未知',
+ `mobile` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统用户手机号',
+ `phone` varchar(32) DEFAULT NULL COMMENT '电话号码',
+ `idcard` varchar(32) DEFAULT NULL COMMENT '身份证',
+ `birthday` date DEFAULT NULL COMMENT '生日',
+ `email` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '系统用户邮箱',
+ `portrait` varchar(256) DEFAULT NULL COMMENT '头像',
+ `wechat` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '微信',
+ `qq` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'QQ',
+ `address` varchar(256) DEFAULT NULL COMMENT '联系地址',
+ `nonce_str` varchar(64) NOT NULL COMMENT '密码随机串,用于加密明文密码',
+ `modify_password_time` datetime DEFAULT NULL COMMENT '修改密码时间',
+ `mobile_enabled` int NOT NULL DEFAULT '0' COMMENT '手机号码是否激活:0、未激活,1、激活,根据是否使用过短信验证码登录确认是否激活状态',
+ `enabled` int NOT NULL DEFAULT '1' COMMENT '启用状态:0 、停用,1、启用',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `user_mobile` (`mobile`),
+ KEY `ak_user_account` (`account`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='系统用户表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_user_post`
+--
+
+DROP TABLE IF EXISTS `t_sys_user_post`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_user_post` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `user_id` bigint NOT NULL COMMENT '用户ID',
+ `post_id` bigint NOT NULL COMMENT '岗位ID',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户岗位关系表,先限定一个用只有一种岗位';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_sys_user_role`
+--
+
+DROP TABLE IF EXISTS `t_sys_user_role`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_sys_user_role` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键,自增',
+ `user_id` bigint NOT NULL COMMENT '用户ID',
+ `role_id` bigint NOT NULL COMMENT '角色ID',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户角色关系表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_task_det_his`
+--
+
+DROP TABLE IF EXISTS `t_task_det_his`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_task_det_his` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,每次修改记录要更新记录新增时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态: 0等待执行,',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `task_code` varchar(128) DEFAULT '' COMMENT '任务编码',
+ `task_id` bigint NOT NULL COMMENT '历史任务id,关联当前任务表:t_task_his',
+ `order_no` varchar(128) DEFAULT '' COMMENT '订单号',
+ `iden_card_num` varchar(128) NOT NULL COMMENT '标识卡号,',
+ `product_name` varchar(128) DEFAULT '' COMMENT '产品名称',
+ `material_des` varchar(128) DEFAULT '' COMMENT '材料牌号 ',
+ `craft_ill` varchar(512) DEFAULT '' COMMENT '工艺要求 ',
+ `unit` varchar(32) DEFAULT '' COMMENT '单位',
+ `weight` float(8,2) DEFAULT '0.00' COMMENT '重量,手动输入',
+ `quantity` float(8,2) DEFAULT '0.00' COMMENT '数量,手动输入',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=254 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务明细历史表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_task_his`
+--
+
+DROP TABLE IF EXISTS `t_task_his`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_task_his` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,每次修改记录要更新记录新增时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态: 0等待执行,1执行中,2执行完成',
+ `inter_code` varchar(128) NOT NULL COMMENT '内部编码,系统自动生成',
+ `is_auto` int DEFAULT '0' COMMENT '是否自动执行: 0手动,1自动,如果是自动任务这里要监控进出和到缓存区的调度任务',
+ `auto_exe_task_id` bigint DEFAULT '0' COMMENT '任务流程ID,关联流程表:t_auto_exe_task',
+ `kiln_id` bigint NOT NULL COMMENT '窑炉id,关联设备窑炉表:t_kiln_info',
+ `kiln_name` varchar(128) DEFAULT '' COMMENT '窑炉名称',
+ `craft_code_id` bigint DEFAULT '0' COMMENT '工艺号ID,关联工艺号表:t_craft_info',
+ `plc_value` int DEFAULT '0' COMMENT '工艺号对应PLC值',
+ `begin_time` datetime DEFAULT NULL COMMENT '开始加工时间',
+ `end_time` datetime DEFAULT NULL COMMENT '加工结束时间',
+ `is_in` int DEFAULT '0' COMMENT '进炉状态: 0准备进炉,1正在加工,2加工完成',
+ `run_task_id` bigint DEFAULT '0' COMMENT '调度任务ID,关联调度表:t_run_task',
+ `start_position` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '开始位置',
+ `target_position` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '目标位置指的是窑炉的位置',
+ `is_cache` int DEFAULT '0' COMMENT '是否缓存,如果当前指的窑炉正在加工,系统自动分配货物到缓存位置,\r\n 并且记录缓存库位,这是当指定窑炉加工完成后系统先判断是否当前缓存有当前等待执行的任务,然后按照先来先执行原则(等待多个任务)自动调用车辆来执行',
+ `cache_satatus` int DEFAULT '0' COMMENT '缓存状态状态: 0准备进入缓存区,1正在进入缓存区,2缓存完成',
+ `cache_run_task_id` bigint DEFAULT '0' COMMENT '调度任务ID,关联调度表:t_run_task',
+ `location_id` bigint DEFAULT '0' COMMENT '库位id,关联库位表:t_location',
+ `location_name` varchar(128) DEFAULT '' COMMENT '库位名称',
+ `is_out` int DEFAULT '0' COMMENT '出炉状态: 0准备出炉,1正在加工,2加工完成',
+ `out_run_task_id` bigint DEFAULT '0' COMMENT '调度任务ID,关联调度表:t_run_task',
+ `out_start_position` varchar(128) DEFAULT '' COMMENT '开始位置',
+ `out_target_position` varchar(128) DEFAULT '' COMMENT '目标位置,指缓存位置',
+ `task_code` varchar(100) NOT NULL DEFAULT '' COMMENT '任务编码',
+ `process_type` int NOT NULL COMMENT '加工类型:0 初始加工,1 复加工',
+ `task_type` int NOT NULL COMMENT '任务类型:0:入库到窑炉,1:入库到缓存区,2出库到 窑炉到缓存区,3缓存区出库',
+ `sheet_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产单号 APMS生成生产单后返回',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=252 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务历史表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_task_source_log`
+--
+
+DROP TABLE IF EXISTS `t_task_source_log`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_task_source_log` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态,0:wms To wcs日期,1:wcs to wms日志',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `source` int DEFAULT '0' COMMENT '日志来源,0:APMS,1:手动,2:其它系统,依次类推',
+ `log_name` varchar(128) DEFAULT '' COMMENT '日志名称',
+ `content` varchar(1024) DEFAULT '' COMMENT '内容',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='任务来源日志信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_tray_info`
+--
+
+DROP TABLE IF EXISTS `t_tray_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_tray_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0:正常,1:损坏',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `tray_name` varchar(256) NOT NULL COMMENT '托盘名称',
+ `spec` varchar(256) DEFAULT NULL COMMENT '规格',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='托盘信息表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_vehicle_info`
+--
+
+DROP TABLE IF EXISTS `t_vehicle_info`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_vehicle_info` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1使用中,2损坏',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码,系统自动生成',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `factory_id` int DEFAULT NULL COMMENT '绑定工厂id',
+ `vehicle_name` varchar(256) NOT NULL COMMENT '车辆名称',
+ `vehicle_alias` varchar(256) DEFAULT '' COMMENT '车辆别名',
+ `en` varchar(256) DEFAULT '' COMMENT '英语名称',
+ `type` varchar(64) DEFAULT '' COMMENT '设备类型,存储数据字典编码',
+ `ip` varchar(32) DEFAULT '' COMMENT 'ip地址',
+ `port_number` varchar(16) DEFAULT '' COMMENT '端口号',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=251 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='RGV车辆信息';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_warehouse`
+--
+
+DROP TABLE IF EXISTS `t_warehouse`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_warehouse` (
+ `id` bigint NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `status` int DEFAULT '0' COMMENT '状态 0初始化,1已占用',
+ `inter_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '内部编码',
+ `code` varchar(128) DEFAULT '' COMMENT '编码',
+ `factory_id` int DEFAULT NULL COMMENT '绑定工厂id',
+ `warehouse_name` varchar(256) NOT NULL COMMENT '仓库名称',
+ `spec` varchar(128) DEFAULT '' COMMENT '规格',
+ `description` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '描述信息',
+ `note` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '备注',
+ `english_name` varchar(256) DEFAULT NULL COMMENT '英文名称',
+ `alias_name` varchar(256) DEFAULT NULL COMMENT '别名',
+ `number` int NOT NULL COMMENT '库位数量',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=252 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='缓存区表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_wcs_task`
+--
+
+DROP TABLE IF EXISTS `t_wcs_task`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_wcs_task` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `code` varchar(128) DEFAULT '' COMMENT '任务编码',
+ `iden_card_number` varchar(128) DEFAULT '' COMMENT '标识卡号',
+ `product_name` varchar(512) DEFAULT '' COMMENT '产品名称,有多个逗号隔开',
+ `material_grade` varchar(512) DEFAULT '' COMMENT '材料牌号,有多个逗号隔开',
+ `start_position` varchar(128) DEFAULT '' COMMENT '开始位置',
+ `end_position` varchar(128) DEFAULT '' COMMENT '结束位置',
+ `status` int DEFAULT '0' COMMENT '状态,0:未执行,1:正在执行,2:执行成功,3:执行失败',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='wcs 任务信息表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_wcs_task_log`
+--
+
+DROP TABLE IF EXISTS `t_wcs_task_log`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_wcs_task_log` (
+ `id` int NOT NULL AUTO_INCREMENT,
+ `valid` int NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用,2停止',
+ `create_time` datetime DEFAULT NULL COMMENT '添加时间,入库时间',
+ `creator_id` int DEFAULT '0' COMMENT '创建人id',
+ `updater_id` int DEFAULT '0' COMMENT '更新人id',
+ `update_time` datetime DEFAULT NULL COMMENT '修改时间,更具修改时间来判断下次执行顺序,第一次修改时间和新增时间相同',
+ `version` varchar(11) DEFAULT '1' COMMENT '版本号 默认为 1',
+ `source` varchar(128) DEFAULT '' COMMENT '任务来源',
+ `receive_status` varchar(128) DEFAULT '是' COMMENT '接收状态',
+ `send_status` varchar(128) DEFAULT '否' COMMENT '发送状态',
+ `content` varchar(512) DEFAULT '' COMMENT '内容',
+ `code` varchar(128) DEFAULT '' COMMENT '编码 和 t_wcs_task 中的code 一直。用来对应wms传过来任务的 唯一标识',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='wcs 任务信息日志表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `t_wechat_template_message`
+--
+
+DROP TABLE IF EXISTS `t_wechat_template_message`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t_wechat_template_message` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `account_id` bigint DEFAULT NULL COMMENT '账号ID',
+ `user_type` int NOT NULL DEFAULT '1' COMMENT '用户类型\r\n 1、平台\r\n 2、药店\r\n 3、医院\r\n 4、患者',
+ `user_id` bigint NOT NULL COMMENT '用户ID',
+ `open_id` varchar(128) NOT NULL COMMENT '微信用户ID',
+ `template_id` varchar(128) NOT NULL COMMENT '消息模板ID',
+ `title` varchar(128) NOT NULL COMMENT '标题',
+ `content` varchar(512) NOT NULL COMMENT '消息内容',
+ `url` varchar(128) NOT NULL COMMENT '链接地址',
+ `message_id` varchar(128) DEFAULT NULL COMMENT '消息ID',
+ `status` int NOT NULL DEFAULT '0' COMMENT '状态\r\n 0、未发送\r\n 1、发送中\r\n 2、已发送\r\n -1、失败',
+ `reserved` varchar(128) DEFAULT NULL COMMENT '预留字段',
+ `remark` varchar(512) DEFAULT NULL COMMENT '备注',
+ `valid` tinyint NOT NULL DEFAULT '1' COMMENT '删除标志,是否有效:1 可用 0不可用',
+ `creator` bigint DEFAULT NULL COMMENT '创建人',
+ `creator_name` varchar(64) DEFAULT NULL COMMENT '创建人姓名',
+ `create_time` datetime DEFAULT NULL COMMENT '创建时间',
+ `updater` bigint DEFAULT NULL COMMENT '更新人',
+ `updater_name` varchar(64) DEFAULT NULL COMMENT '更新人姓名',
+ `update_time` datetime DEFAULT NULL COMMENT '更新时间',
+ `version` int DEFAULT '0' COMMENT '版本号',
+ PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='微信模板消息表';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Dumping routines for database 'mt_wms_qj'
+--
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+-- Dump completed on 2021-12-23 9:21:37
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java
index 89d315f..173b6e1 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java
@@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2021-12-27
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -104,10 +104,10 @@ public class ParEleValue extends Model {
private Float totalBat;
/**
- * 扩展字段1
+ * 时间段类型。0:半小时,1:天,2:月
*/
- @TableField("add_a")
- private Float addA;
+ @TableField("date_type")
+ private Integer dateType;
/**
* 扩展字段2
@@ -166,7 +166,7 @@ public class ParEleValue extends Model {
public static final String TOTAL_BAT = "total_bat";
- public static final String ADD_A = "add_a";
+ public static final String DATE_TYPE = "date_type";
public static final String ADD_B = "add_b";
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java
index 91720d9..9f2ff8d 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2021-12-27
*/
public interface ParEleValueMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml
index 9016bf5..b49df70 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml
@@ -17,7 +17,7 @@
-
+
@@ -27,7 +27,7 @@
- id, create_time, inter_code, status, kiln_id, par_id, a_voltagev_value, b_voltagev_value, c_voltagev_value, a_current_value, b_current_value, c_current_value, total_bat, add_a, add_b, add_c, orther_a, orther_b, orther_c
+ id, create_time, inter_code, status, kiln_id, par_id, a_voltagev_value, b_voltagev_value, c_voltagev_value, a_current_value, b_current_value, c_current_value, total_bat, date_type, add_b, add_c, orther_a, orther_b, orther_c
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java
index 10e5569..ada7c94 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2021-12-27
*/
public interface ParEleValueServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java
index 7f867ff..e55672d 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2021-12-27
*/
@Service
public class ParEleValueServiceBizImpl extends ServiceImpl implements ParEleValueServiceBiz {
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ElectricController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ElectricController.java
index a2c6090..d10813d 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ElectricController.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/ElectricController.java
@@ -12,6 +12,7 @@ import com.mt.wms.empty.params.ElectricQueryParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
+import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
@@ -19,12 +20,17 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.PostConstruct;
import javax.validation.groups.Default;
+import java.time.DayOfWeek;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalAdjusters;
+import java.util.LinkedHashMap;
import java.util.List;
+import java.util.Map;
/**
* @Author: liguanghao
@@ -37,6 +43,34 @@ import java.util.List;
@Api(value = "电能消耗相关接口", tags = "电能消耗相关接口", hidden = false)
public class ElectricController extends BaseController {
+
+ //@PostConstruct
+ public void test(){
+ LocalDateTime time=LocalDateTime.of(2021, 3, 31, 0, 0, 0);
+ Float f=29000F;
+
+ LocalDate timeDate=time.toLocalDate();
+ LocalDateTime timeEnd = LocalDateTime.of(timeDate, LocalTime.MAX).minus(5,ChronoUnit.SECONDS);
+ for (int i = 0; i < 10; i++) {
+
+ ParEleValue parEleValue=new ParEleValue();
+ parEleValue.setDateType(2);
+ parEleValue.setParId(1);
+ parEleValue.setKilnId(1);
+ parEleValue.setTotalBat(Float.valueOf(String.valueOf(f+(Math.random()*24000))));
+ parEleValue.setCreateTime(timeEnd);
+ timeEnd=timeEnd.plus(1,ChronoUnit.MONTHS);
+ f=parEleValue.getTotalBat();
+ parEleValueServiceBiz.save(parEleValue);
+ System.out.println(parEleValue);
+ }
+
+ }
+
+ public void test1(){
+
+ }
+
@Autowired
private ParEleValueServiceBiz parEleValueServiceBiz;
@@ -44,10 +78,7 @@ public class ElectricController extends BaseController {
@ApiOperation(value = "根据窑炉id获取电能消耗情况")
private R list(@Validated({Default.class}) @RequestBody ElectricQueryParam electricQueryParam) {
Long kiln = electricQueryParam.getKilnId();
- //窑炉id为0代表全部
- if (kiln==0){
-
- }else {
+ //窑炉id为0代表全部,存储的时候计算全部
JSONObject jsonObject=new JSONObject();
//指定时间节点
LocalDate timeDate = electricQueryParam.getTime().toLocalDate();
@@ -71,12 +102,13 @@ public class ElectricController extends BaseController {
List yesterdayEleValueList = parEleValueServiceBiz.list(new QueryWrapper()
.eq("kiln_id", kiln)
.between("create_time", yesterdayStart, yesterdayEnd)
+ .eq("date_type",0)
.orderByAsc("create_time"));
Float yesterdayTotalBat= yesterdayEleValueList.get(yesterdayEleValueList.size()-1).getTotalBat()-yesterdayEleValueList.get(0).getTotalBat();
jsonObject.put("yesterdayCountEle",yesterdayTotalBat);
//指定日期当天的电能消耗
- if (electricQueryParam.getDateType()==1){
+ if (electricQueryParam.getDateType()==0){
List dateEleValueList = parEleValueServiceBiz.list(new QueryWrapper()
.eq("kiln_id", kiln)
.between("create_time", timeStart, timeEnd)
@@ -88,12 +120,90 @@ public class ElectricController extends BaseController {
}
jsonObject.put("dateCountEle",dateCountEle);
//分时消耗量
+ Map timeJsonObject=new LinkedHashMap();
for (int i = 0; i < dateEleValueList.size() - 1; ++i) {
// TODO: 2021/12/16
float eleValue = dateEleValueList.get(i).getTotalBat() - dateEleValueList.get(i - 1).getTotalBat();
+ int j=i+1;
+ if (j%2==0){
+ String time=(j-1)/2+":30";
+ timeJsonObject.put(time,eleValue);
+ }else {
+ String time=(j-1)/2+":00";
+ timeJsonObject.put(time,eleValue);
+ }
}
+ jsonObject.put("timeEle",timeJsonObject);
}
- }
- return null;
+ //指定日期当周的每天电能消耗
+ if(electricQueryParam.getDateType()==1){
+ LocalDate monday = timeDate.with(DayOfWeek.MONDAY);
+ LocalDate sunday = timeDate.with(DayOfWeek.SUNDAY);
+ List timeWeekEleValueList = parEleValueServiceBiz.list(new QueryWrapper()
+ .eq("kiln_id", kiln)
+ .between("create_time", monday, sunday.plusDays(1))
+ .eq("date_type", 1)
+ .orderByAsc("create_time"));
+ //总耗电量
+ Float dateCountEle=0F;
+ if (timeWeekEleValueList.size()!=0){
+ dateCountEle= timeWeekEleValueList.get(timeWeekEleValueList.size()-1).getTotalBat()-timeWeekEleValueList.get(0).getTotalBat();
+ }
+ jsonObject.put("dateCountEle",dateCountEle);
+ Map timeJsonObject=new LinkedHashMap();
+ for (ParEleValue parEleValue:timeWeekEleValueList
+ ) {
+ LocalDate localDate = parEleValue.getCreateTime().toLocalDate();
+ timeJsonObject.put(localDate.toString(),parEleValue.getTotalBat());
+ }
+ jsonObject.put("timeEle",timeJsonObject);
+ }
+ //指定日期当月的每天电能消耗
+ if(electricQueryParam.getDateType()==2){
+ LocalDate firstday = LocalDate.of(timeDate.getYear(), timeDate.getMonthValue(), 1);
+ LocalDate lastDay = timeDate.with(TemporalAdjusters.lastDayOfMonth());
+ List timeMonthEleValueList = parEleValueServiceBiz.list(new QueryWrapper()
+ .eq("kiln_id", kiln)
+ .between("create_time", firstday, lastDay.plusDays(1))
+ .eq("date_type", 1)
+ .orderByAsc("create_time"));
+ //总耗电量
+ Float dateCountEle=0F;
+ if (timeMonthEleValueList.size()!=0){
+ dateCountEle= timeMonthEleValueList.get(timeMonthEleValueList.size()-1).getTotalBat()-timeMonthEleValueList.get(0).getTotalBat();
+ }
+ jsonObject.put("dateCountEle",dateCountEle);
+ Map timeJsonObject=new LinkedHashMap();
+ for (ParEleValue parEleValue:timeMonthEleValueList
+ ) {
+ LocalDate localDate = parEleValue.getCreateTime().toLocalDate();
+ timeJsonObject.put(localDate.toString(),parEleValue.getTotalBat());
+ }
+ jsonObject.put("timeEle",timeJsonObject);
+ }
+ //指定日期当年的每月电能消耗
+ if(electricQueryParam.getDateType()==2){
+ LocalDate firstDay = timeDate.with(TemporalAdjusters.firstDayOfYear());
+ LocalDate lastDay = timeDate.with(TemporalAdjusters.lastDayOfYear());
+ List timeYearEleValueList = parEleValueServiceBiz.list(new QueryWrapper()
+ .eq("kiln_id", kiln)
+ .between("create_time", firstDay, lastDay.plusDays(1))
+ .eq("date_type", 2)
+ .orderByAsc("create_time"));
+ //总耗电量
+ Float dateCountEle=0F;
+ if (timeYearEleValueList.size()!=0){
+ dateCountEle= timeYearEleValueList.get(timeYearEleValueList.size()-1).getTotalBat()-timeYearEleValueList.get(0).getTotalBat();
+ }
+ jsonObject.put("dateCountEle",dateCountEle);
+ Map timeJsonObject=new LinkedHashMap();
+ for (ParEleValue parEleValue:timeYearEleValueList
+ ) {
+ LocalDate localDate = parEleValue.getCreateTime().toLocalDate();
+ timeJsonObject.put(localDate.toString(),parEleValue.getTotalBat());
+ }
+ jsonObject.put("timeEle",timeJsonObject);
+ }
+ return successful(jsonObject.toJSONString());
}
}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AlarmInfoQueryParam.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AlarmInfoQueryParam.java
index 853688c..d92670b 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AlarmInfoQueryParam.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AlarmInfoQueryParam.java
@@ -24,9 +24,9 @@ public class AlarmInfoQueryParam extends BasePageParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备ID", required = false)
- private Long equipmentID;
+ private Long equipmentId;
- @ApiModelProperty(value = "报警类型", required = true)
+ @ApiModelProperty(value = "报警类型0窑炉,1表示车辆", required = true)
private Integer type;
@ApiModelProperty(value = "开始时间", required = false)
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/AlarmInfoServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/AlarmInfoServiceImpl.java
index f8d4e69..bad72a4 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/AlarmInfoServiceImpl.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/AlarmInfoServiceImpl.java
@@ -33,7 +33,7 @@ public class AlarmInfoServiceImpl extends BaseService implements AlarmInfoServic
QueryWrapper wrapper = new QueryWrapper<>();
wrapper.between(alarmInfoQueryParam.getStartTime() != null, AlarmInfo.CREATE_TIME, alarmInfoQueryParam.getStartTime(), alarmInfoQueryParam.getEndTime())
.eq(AlarmInfo.TYPE, alarmInfoQueryParam.getType())
- .eq(alarmInfoQueryParam.getEquipmentID() != null, AlarmInfo.EQUIPMENT_ID, alarmInfoQueryParam.getEquipmentID())
+ .eq(alarmInfoQueryParam.getEquipmentId() != null, AlarmInfo.EQUIPMENT_ID, alarmInfoQueryParam.getEquipmentId())
.orderByDesc(AlarmInfo.CREATE_TIME);
Page page = alarmInfoServiceBiz.page(new Page<>(alarmInfoQueryParam.getCurrent(), alarmInfoQueryParam.getSize()), wrapper);
return successful(new PageVo<>(page, AlarmInfoVo.class));
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java
index 0978720..ce7a873 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/OutStockServiceImpl.java
@@ -3,13 +3,19 @@ package com.mt.wms.empty.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.InStockInfo;
+import com.mt.wms.core.dal.entity.InStockInfoHis;
+import com.mt.wms.core.dal.entity.RunTask;
import com.mt.wms.core.dal.entity.VehicleInfo;
+import com.mt.wms.core.dal.service.InStockInfoHisServiceBiz;
import com.mt.wms.core.dal.service.InStockInfoServiceBiz;
+import com.mt.wms.core.dal.service.RunTaskServiceBiz;
import com.mt.wms.core.dal.service.VehicleInfoServiceBiz;
+import com.mt.wms.core.dal.service.impl.InStockInfoHisServiceBizImpl;
import com.mt.wms.core.vo.R;
import com.mt.wms.empty.params.OutStockParam;
import com.mt.wms.empty.service.OutStockService;
import com.mt.wms.empty.task.AsynRunTaskService;
+import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -33,11 +39,14 @@ public class OutStockServiceImpl extends BaseService implements OutStockService
private AsynRunTaskService asynRunTaskService;
@Resource
private InStockInfoServiceBiz inStockInfoServiceBiz;
+ @Resource
+ private RunTaskServiceBiz runTaskServiceBiz;
+
@Override
public R outTask(OutStockParam outStockParam) {
// TODO: 2021/12/17 出库
- Long localtionId = outStockParam.getLocaltionId();
+ Long locationId = outStockParam.getLocaltionId();
//提升台
Integer code = outStockParam.getCode();
//查询是否有空闲车辆,若有。占用车辆,若无,返回暂无可用车辆
@@ -52,14 +61,22 @@ public class OutStockServiceImpl extends BaseService implements OutStockService
}else {
return R.failed("暂无可用车辆!请稍后重试!");
}
+ //生成调度任务
+ RunTask runTask=new RunTask();
+ runTask.setBeginTime(LocalDateTime.now());
+ runTask.setVehicleId(vehicleInfoList.get(0).getId());
+ // TODO: 2021/12/22 库位id对应的位置 ,提升平台对应的位置
+ runTask.setStartPosition("库位位置");
+ runTask.setEndPosition("提升台位置");
+ setCommonField(runTask);
+ runTaskServiceBiz.save(runTask);
//异步调用车辆
- asynRunTaskService.asynRunOutStock();
+ asynRunTaskService.asynRunOutStock(runTask.getId(),locationId);
//修改库位状态
InStockInfo inStockInfo = inStockInfoServiceBiz
- .getOne(new QueryWrapper().eq("Location_id", localtionId));
+ .getOne(new QueryWrapper().eq("Location_id", locationId));
inStockInfo.setStatus(1);
inStockInfoServiceBiz.updateById(inStockInfo);
return R.ok("操作成功");
-
}
}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/StockInfoServiceImpl.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/StockInfoServiceImpl.java
index b1c3797..d06772e 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/StockInfoServiceImpl.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/StockInfoServiceImpl.java
@@ -5,9 +5,11 @@ import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.dal.entity.CurrTaskDet;
import com.mt.wms.core.dal.entity.InStockInfo;
import com.mt.wms.core.dal.entity.Location;
+import com.mt.wms.core.dal.entity.OrderInfo;
import com.mt.wms.core.dal.service.CurrTaskDetServiceBiz;
import com.mt.wms.core.dal.service.InStockInfoServiceBiz;
import com.mt.wms.core.dal.service.LocationServiceBiz;
+import com.mt.wms.core.dal.service.OrderInfoServiceBiz;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import com.mt.wms.empty.params.StockInfoQueryParam;
@@ -36,11 +38,18 @@ public class StockInfoServiceImpl extends BaseService implements StockInfoServic
private LocationServiceBiz locationServiceBiz;
@Resource
private CurrTaskDetServiceBiz currTaskDetServiceBiz;
+ @Resource
+ private OrderInfoServiceBiz orderInfoServiceBiz;
@Override
public R> get(IdParam idParam) {
Long taskId = inStockInfoServiceBiz.getById(idParam).getTaskId();
List currTaskDetList = currTaskDetServiceBiz.list(new QueryWrapper().eq("curr_task_id", taskId));
List currTaskDetVoList = com.mt.wms.core.utils.BeanUtils.copyList(currTaskDetList, CurrTaskDetVo.class);
+ for (CurrTaskDetVo currTaskDetVo:currTaskDetVoList
+ ) {
+ String costomerName = orderInfoServiceBiz.getOne(new QueryWrapper().eq("order_no", currTaskDetVo.getOrderNo())).getCustomerName();
+ currTaskDetVo.setCustomer(costomerName);
+ }
return successful(currTaskDetVoList);
}
@@ -55,11 +64,13 @@ public class StockInfoServiceImpl extends BaseService implements StockInfoServic
//库位为空
if (location.getStatus()!=1){
stockInfoVo.setEmpty(1);
- stockInfoVo.setLocaltionId(location.getId());
+ stockInfoVo.setLocationId(location.getId());
+ stockInfoVo.setLocationName(location.getLocationNameAlias());
}else {
InStockInfo inStockInfo = inStockInfoServiceBiz.getOne(new QueryWrapper()
- .eq("localtion_id", location.getId()));
+ .eq("location_id", location.getId()));
BeanUtils.copyProperties(inStockInfo,stockInfoVo);
+ stockInfoVo.setEmpty(0);
}
stockInfoVoList.add(stockInfoVo);
}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java
index cf3f6a8..0d33167 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/AsynRunTaskService.java
@@ -7,6 +7,7 @@ import com.mt.wms.core.dal.service.*;
import com.mt.wms.core.utils.IDGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -32,7 +33,8 @@ public class AsynRunTaskService extends BaseService {
private LocationServiceBiz locationServiceBiz;
@Resource
private InStockInfoServiceBiz inStockInfoServiceBiz;
-
+ @Resource
+ private InStockInfoHisServiceBiz inStockInfoHisServiceBiz;
//窑炉可用未满的情况下,调用车辆起点为提升台终点为窑炉
@Async("asyncServiceExecutor")
public void asynRunTask(Long currTaskId,Long vehicleId){
@@ -84,6 +86,7 @@ public class AsynRunTaskService extends BaseService {
runTask.setVehicleId(vehicleId);
runTask.setBeginTime(LocalDateTime.now());
runTask.setStartPosition(currTask.getStartPosition());
+ // TODO: 2021/12/28 location对应的点位
runTask.setEndPosition(location.getCode());
runTaskServiceBiz.save(runTask);
//更新 location 表对应库位状态为占用
@@ -135,12 +138,108 @@ public class AsynRunTaskService extends BaseService {
}
//窑炉加工完成,调用车辆入库到缓存区
@Async("asyncServiceExecutor")
- public void asynRunTaskForKilnToWarehouse(Long kilnId,Long vehicleId){
-
+ public void asynRunTaskForKilnToWarehouse(Long currTaskId,Long vehicleId){
+ CurrTask currTask = currTaskServiceBiz.getById(currTaskId);
+ // TODO: 2021/12/28 location排序
+ Location location = locationServiceBiz.list(new QueryWrapper()
+ .eq(Location.STATUS, 1)
+ .eq(Location.VALID, 1)).get(0);
+ currTask.setOutStartPosition(currTask.getTargetPosition());
+ // TODO: 2021/12/28 location对应的点位
+ currTask.setOutTargetPosition(location.getCode());
+ currTaskServiceBiz.updateById(currTask);
+ //新建一条执行任务的关系表存放任务执行信息,终点为缓存区空闲库位
+ RunTask runTask=new RunTask();
+ setCommonField(runTask);
+ runTask.setTaskId(currTask.getId());
+ runTask.setTaskCode(currTask.getTaskCode());
+ runTask.setVehicleId(vehicleId);
+ runTask.setBeginTime(LocalDateTime.now());
+ runTask.setStartPosition(currTask.getOutStartPosition());
+ runTask.setEndPosition(currTask.getOutTargetPosition());
+ runTaskServiceBiz.save(runTask);
+ //更新 location 表对应库位状态为占用
+ location.setStatus(1);
+ location.setUpdateTime(LocalDateTime.now());
+ locationServiceBiz.updateById(location);
+ currTask.setOutRunTaskId(runTask.getId());
+ currTaskServiceBiz.updateById(currTask);
+ //添加一条库位详情到in_stock_info表
+ InStockInfo inStockInfo=new InStockInfo();
+ inStockInfo.setStatus(1);
+ inStockInfo.setInterCode(IDGenerator.gen("HCT", "yyyyMMddHHmm", 2, "WAREHOUSE_CODE"));
+ inStockInfo.setTaskId(currTask.getId());
+ inStockInfo.setTaskCode(currTask.getTaskCode());
+ inStockInfo.setKilnId(currTask.getKilnId());
+ inStockInfo.setKilnName(currTask.getKilnName());
+ inStockInfo.setLocationId(location.getId());
+ inStockInfo.setLocationName(location.getLocationNameAlias());
+ inStockInfo.setType(0);
+ setCommonField(inStockInfo);
+ inStockInfoServiceBiz.save(inStockInfo);
+ // TODO: 2021/12/14 调用车辆填入起终点,得到车辆执行结果,填入任务号(待确认)
+ if (true){
+ //更新关系表状态为完成
+ runTask.setUpdateTime(LocalDateTime.now());
+ runTask.setStatus(2);
+ runTask.setEndTime(LocalDateTime.now());
+ runTaskServiceBiz.updateById(runTask);
+ //更新currTask表
+ currTask.setIsOut(2);
+ currTask.setUpdateTime(LocalDateTime.now());
+ currTask.setStatus(2);
+ currTaskServiceBiz.updateById(currTask);
+ //更新in_stock_info表
+ inStockInfo.setStatus(2);
+ inStockInfo.setInTime(LocalDateTime.now());
+ inStockInfoServiceBiz.updateById(inStockInfo);
+ }else {
+ runTask.setStatus(3);
+ runTask.setUpdateTime(LocalDateTime.now());
+ runTaskServiceBiz.updateById(runTask);
+ logger.info("任务 "+currTask.getTaskCode()+" 车辆从窑炉到缓存区过程中失败。");
+ // TODO: 2021/12/14 websocket推送到前端
+ }
}
//出库。起点为缓存区库位,终点为提升台
@Async("asyncServiceExecutor")
- public void asynRunOutStock(){
+ public void asynRunOutStock(Long runTaskId,Long locationId){
+ //修改调度任务状态
+ RunTask runTask = runTaskServiceBiz.getById(runTaskId);
+ //修改缓存区状态
+ InStockInfo inStockInfo = inStockInfoServiceBiz.getOne(new QueryWrapper()
+ .eq("location_id", locationId));
+ inStockInfo.setStatus(1);
+ inStockInfoServiceBiz.updateById(inStockInfo);
+ // TODO: 2021/12/14 调用车辆填入起终点,得到车辆执行结果,填入任务号(待确认)
+
+ if (true){
+ //更新关系表状态为完成
+ runTask.setUpdateTime(LocalDateTime.now());
+ runTask.setStatus(2);
+ runTask.setEndTime(LocalDateTime.now());
+ runTaskServiceBiz.updateById(runTask);
+ //更新in_stock_info表
+ inStockInfo.setStatus(2);
+ inStockInfo.setInTime(LocalDateTime.now());
+ inStockInfoServiceBiz.updateById(inStockInfo);
+ //缓存区存储历史
+ InStockInfoHis inStockInfoHis=new InStockInfoHis();
+ BeanUtils.copyProperties(inStockInfo,inStockInfoHis);
+ inStockInfoHisServiceBiz.save(inStockInfoHis);
+ inStockInfoServiceBiz.removeById(inStockInfo.getId());
+ //更新库位状态
+ Location location = locationServiceBiz.getById(locationId);
+ location.setStatus(0);
+ locationServiceBiz.updateById(location);
+
+ }else {
+ runTask.setStatus(3);
+ runTask.setUpdateTime(LocalDateTime.now());
+ runTaskServiceBiz.updateById(runTask);
+ logger.info("任务 "+runTask.getTaskCode()+" 车辆从缓存区到提升平台过程中失败。");
+ // TODO: 2021/12/14 websocket推送到前端
+ }
}
}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java
index 0c74d34..a3da4b1 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/RunTaskUtils.java
@@ -106,7 +106,40 @@ public class RunTaskUtils {
* 呼叫车辆暂存缓存区,车辆调度任务结束后,(结束后再查询缓存区队列避免车辆路线冲突)查询该窑炉的缓存区队列,开始下一托盘货物调度进窑炉
* @return
*/
- public R runTaskForOutKiln(){
- return null;
+ public R runTaskForOutKiln(Long kilnId){
+ //查询正在该窑炉加工的currTask
+ CurrTask currTask = currTaskServiceBiz.getOne(new QueryWrapper()
+ .eq("is_in", 1)
+ .eq("status", 1)
+ .eq("kiln_id", kilnId));
+ //查询缓存区库位是否已满
+ int count = locationServiceBiz.count(new QueryWrapper()
+ .eq(Location.STATUS, 0)
+ .eq(Location.VALID, 1));
+ //缓存区未满
+ if (count >0) {
+ //查询是否有空闲车辆,若有。占用车辆,若无,返回暂无可用车辆
+ List vehicleInfoList = vehicleInfoServiceBiz.list(new QueryWrapper()
+ .eq(VehicleInfo.STATUS, 0)
+ .eq(VehicleInfo.VALID, 1));
+ if (vehicleInfoList.size()>0){
+ VehicleInfo vehicleInfo = vehicleInfoList.get(0);
+ vehicleInfo.setStatus(1);
+ vehicleInfo.setUpdateTime(LocalDateTime.now());
+ vehicleInfoServiceBiz.updateById(vehicleInfo);
+ }else {
+ return R.failed("暂无可用车辆!请稍后重试!");
+ }
+ currTask.setIsOut(0);
+ currTask.setTaskType(2);
+ currTask.setUpdateTime(LocalDateTime.now());
+ currTaskServiceBiz.updateById(currTask);
+
+ //异步调用车辆
+ asynRunTaskService.asynRunTaskForKilnToWarehouse(currTask.getId(),vehicleInfoList.get(0).getId());
+ return R.ok("操作成功!当前目标窑炉已满,托盘加入缓存区待加工队列。");
+ }else {
+ return R.ok("当前缓存区已满,无法从加工炉出炉到缓存区。");
+ }
}
}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java
index 0a1d395..8e3abd3 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/task/ScheduledTask.java
@@ -14,6 +14,34 @@ public class ScheduledTask {
*/
@Scheduled
public void taskForStockToKiln(){
- //遍历窑炉状态,若加工完毕,查询空车,占用,异步处理,继续遍历下一个窑炉状态
+ //遍历currTask为进行中且is_in为正在加工的窑炉状态,若加工完毕,调用runTaskForOutKiln
}
+
+ //每个小时的0分和30分执行
+ @Scheduled(cron = "0 0/30 * * * ?")
+ //获取全部窑炉每半小时电能消耗数据,计算,存储
+ public void getAllEleValue(){
+ // TODO: 2021/12/27
+ // 获取每台窑炉的电度值,存入par_ele_value,dateType为0,kilnId为窑炉Id
+ // 获取11台窑炉的电度值,相加,存入par_ele_value,dateType为0,kilnId为0
+ }
+
+ //每日23:55执行
+ @Scheduled(cron = "0 55 23 * * ?")
+ //获取全部窑炉每天电能消耗数据,计算,存储
+ public void getAllEleValueForDay(){
+ // TODO: 2021/12/27
+ // 获取每台窑炉的电度值,存入par_ele_value,dateType为0,kilnId为窑炉Id
+ // 获取11台窑炉的电度值,相加,存入par_ele_value,dateType为0,kilnId为0
+ }
+
+ //每月最后一日23:55执行
+ @Scheduled(cron = "0 55 23 L * ?")
+ //获取全部窑炉每天电能消耗数据,计算,存储
+ public void getAllEleValueForMonth(){
+ // TODO: 2021/12/27
+ // 获取每台窑炉的电度值,存入par_ele_value,dateType为0,kilnId为窑炉Id
+ // 获取11台窑炉的电度值,相加,存入par_ele_value,dateType为0,kilnId为0
+ }
+
}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java
index c0c7f09..638db88 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/CurrTaskDetVo.java
@@ -87,7 +87,7 @@ public class CurrTaskDetVo extends BaseVo implements PageVo.ConvertVo {
* 单位
*/
@ApiModelProperty("单位")
- private Float unit;
+ private String unit;
/**
* 数量,手动输入
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/StockInfoVo.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/StockInfoVo.java
index c51829e..c4eae5d 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/StockInfoVo.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/StockInfoVo.java
@@ -36,12 +36,12 @@ public class StockInfoVo extends BaseVo implements PageVo.ConvertVo{
* 库位id
*/
@ApiModelProperty(value = "库位id",example = "0")
- private Long localtionId;
+ private Long locationId;
/**
* 库位名称
*/
@ApiModelProperty(value = "库位名称",example = "0")
- private String localtionName;
+ private String locationName;
/**
* 任务id
*/
From b2f279d9a644c946764195bffc3dc5065e283fc5 Mon Sep 17 00:00:00 2001
From: lgh0010 <1746689524@qq.com>
Date: Thu, 3 Mar 2022 23:51:07 +0800
Subject: [PATCH 02/19] lgh
---
.../basic/controller/CraftInfoController.java | 89 +++
.../mt/wms/basic/params/CraftInfoParam.java | 53 ++
.../wms/basic/params/CraftInfoQueryParam.java | 31 +
.../wms/basic/service/CraftInfoService.java | 73 ++
.../service/impl/CraftInfoServiceImpl.java | 97 +++
.../java/com/mt/wms/basic/vo/CraftInfoVo.java | 55 ++
.../java/com/mt/wms/core/MyGenerator.java | 2 +-
.../com/mt/wms/core/dal/entity/AlarmInfo.java | 12 +-
.../mt/wms/core/dal/entity/AutoExeTask.java | 26 +-
.../com/mt/wms/core/dal/entity/KilnInfo.java | 12 +-
.../mt/wms/core/dal/entity/ParEleValue.java | 14 +-
.../mt/wms/core/dal/entity/ParGasValue.java | 54 +-
.../wms/core/dal/entity/ParRotSpeedValue.java | 12 +-
.../mt/wms/core/dal/entity/ParTemValue.java | 36 +-
.../mt/wms/core/dal/entity/PlcNameSpace.java | 98 +++
.../com/mt/wms/core/dal/entity/PointInfo.java | 91 +++
.../wms/core/dal/mapper/AlarmInfoMapper.java | 2 +-
.../wms/core/dal/mapper/AlarmInfoMapper.xml | 3 +-
.../core/dal/mapper/AutoExeTaskMapper.java | 2 +-
.../wms/core/dal/mapper/AutoExeTaskMapper.xml | 5 +-
.../wms/core/dal/mapper/KilnInfoMapper.java | 2 +-
.../core/dal/mapper/ParEleValueMapper.java | 2 +-
.../wms/core/dal/mapper/ParEleValueMapper.xml | 3 +-
.../core/dal/mapper/ParGasValueMapper.java | 2 +-
.../wms/core/dal/mapper/ParGasValueMapper.xml | 11 +-
.../dal/mapper/ParRotSpeedValueMapper.java | 2 +-
.../dal/mapper/ParRotSpeedValueMapper.xml | 3 +-
.../core/dal/mapper/ParTemValueMapper.java | 2 +-
.../wms/core/dal/mapper/ParTemValueMapper.xml | 9 +-
.../core/dal/mapper/PlcNameSpaceMapper.java | 16 +
.../core/dal/mapper/PlcNameSpaceMapper.xml | 22 +
.../wms/core/dal/mapper/PointInfoMapper.java | 16 +
.../wms/core/dal/mapper/PointInfoMapper.xml | 21 +
.../core/dal/service/AlarmInfoServiceBiz.java | 2 +-
.../dal/service/AutoExeTaskServiceBiz.java | 2 +-
.../core/dal/service/KilnInfoServiceBiz.java | 2 +-
.../dal/service/ParEleValueServiceBiz.java | 2 +-
.../dal/service/ParGasValueServiceBiz.java | 2 +-
.../service/ParRotSpeedValueServiceBiz.java | 2 +-
.../dal/service/ParTemValueServiceBiz.java | 2 +-
.../dal/service/PlcNameSpaceServiceBiz.java | 16 +
.../core/dal/service/PointInfoServiceBiz.java | 16 +
.../service/impl/AlarmInfoServiceBizImpl.java | 2 +-
.../impl/AutoExeTaskServiceBizImpl.java | 2 +-
.../service/impl/KilnInfoServiceBizImpl.java | 2 +-
.../impl/ParEleValueServiceBizImpl.java | 2 +-
.../impl/ParGasValueServiceBizImpl.java | 2 +-
.../impl/ParRotSpeedValueServiceBizImpl.java | 2 +-
.../impl/ParTemValueServiceBizImpl.java | 2 +-
.../impl/PlcNameSpaceServiceBizImpl.java | 20 +
.../service/impl/PointInfoServiceBizImpl.java | 20 +
.../wms/core/utils/CodeGeneratorHelper.java | 24 +
.../com/mt/wms/core/utils/HttpClient.java | 7 +-
.../empty/controller/AutoTaskController.java | 54 ++
.../empty/controller/CurrTaskController.java | 137 +++-
...cController.java => EnergyController.java} | 52 +-
.../wms/empty/params/AutoCurrTaskParam.java | 24 +
.../mt/wms/empty/params/AutoTaskParam.java | 25 +
.../wms/empty/params/AutoTaskQueryParam.java | 28 +
.../wms/empty/params/ElectricQueryParam.java | 3 +
.../mt/wms/empty/params/StepInfoParam.java | 25 +
.../mt/wms/empty/params/TaskCreateParam.java | 8 +-
.../mt/wms/empty/service/AutoTaskService.java | 51 ++
.../mt/wms/empty/service/CurrTaskService.java | 8 +
.../service/impl/AutoTaskServiceImpl.java | 77 +++
.../service/impl/CurrTaskServiceImpl.java | 33 +-
.../mt/wms/empty/task/AsynRunTaskService.java | 634 +++++++++++++++++-
.../com/mt/wms/empty/task/RunTaskUtils.java | 193 ++++--
.../com/mt/wms/empty/task/ScheduledTask.java | 454 ++++++++++++-
.../mt/wms/empty/task/TaskDistanceUtils.java | 87 ++-
.../wms/empty/task/VehicleCollisionUtils.java | 13 +-
.../java/com/mt/wms/empty/vo/AutoTaskVo.java | 236 +++++++
6.program/wms-gateway/pom.xml | 5 +
73 files changed, 2946 insertions(+), 210 deletions(-)
create mode 100644 6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/CraftInfoController.java
create mode 100644 6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoParam.java
create mode 100644 6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoQueryParam.java
create mode 100644 6.program/wms-basic/src/main/java/com/mt/wms/basic/service/CraftInfoService.java
create mode 100644 6.program/wms-basic/src/main/java/com/mt/wms/basic/service/impl/CraftInfoServiceImpl.java
create mode 100644 6.program/wms-basic/src/main/java/com/mt/wms/basic/vo/CraftInfoVo.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PlcNameSpace.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PointInfo.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.xml
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.xml
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PlcNameSpaceServiceBiz.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PointInfoServiceBiz.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PlcNameSpaceServiceBizImpl.java
create mode 100644 6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PointInfoServiceBizImpl.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/AutoTaskController.java
rename 6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/{ElectricController.java => EnergyController.java} (79%)
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AutoCurrTaskParam.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AutoTaskParam.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/params/AutoTaskQueryParam.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/params/StepInfoParam.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/service/AutoTaskService.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/service/impl/AutoTaskServiceImpl.java
create mode 100644 6.program/wms-empty/src/main/java/com/mt/wms/empty/vo/AutoTaskVo.java
diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/CraftInfoController.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/CraftInfoController.java
new file mode 100644
index 0000000..9e58232
--- /dev/null
+++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/controller/CraftInfoController.java
@@ -0,0 +1,89 @@
+package com.mt.wms.basic.controller;
+
+import com.mt.wms.basic.params.AlarmBaseParam;
+import com.mt.wms.basic.params.AlarmBaseQueryParam;
+import com.mt.wms.basic.params.CraftInfoParam;
+import com.mt.wms.basic.params.CraftInfoQueryParam;
+import com.mt.wms.basic.service.AlarmBaseService;
+import com.mt.wms.basic.service.CraftInfoService;
+import com.mt.wms.basic.vo.AlarmBaseVo;
+import com.mt.wms.basic.vo.CraftInfoVo;
+import com.mt.wms.core.base.BaseController;
+import com.mt.wms.core.constants.CommonConstant;
+import com.mt.wms.core.params.IdParam;
+import com.mt.wms.core.utils.IDGenerator;
+import com.mt.wms.core.validator.groups.AddGroup;
+import com.mt.wms.core.validator.groups.PageGroup;
+import com.mt.wms.core.validator.groups.UpdateGroup;
+import com.mt.wms.core.vo.IdVo;
+import com.mt.wms.core.vo.PageVo;
+import com.mt.wms.core.vo.R;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.groups.Default;
+import java.util.List;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2021/10/9 11:09
+ * @Version 1.0
+ */
+@RestController
+@RequestMapping(CommonConstant.API_MODULE_BASE + "craftInfo")
+@Slf4j
+@Api(value = "工艺基础信息管理", tags = "工艺基础信息管理", hidden = false)
+public class CraftInfoController extends BaseController {
+
+ @Autowired
+ private CraftInfoService craftInfoService;
+
+ @PostMapping(value = "get")
+ @ApiOperation(value = "获取报警基础信息")
+ private R get(@Validated @RequestBody IdParam idParam) {
+ return craftInfoService.get(idParam);
+ }
+
+ @PostMapping(value = "list")
+ @ApiOperation(value = "获取报警基础信息列表")
+ private R> list(@Validated({Default.class}) @RequestBody CraftInfoQueryParam craftInfoQueryParam) {
+ return craftInfoService.list(craftInfoQueryParam);
+ }
+
+ @PostMapping(value = "page")
+ @ApiOperation(value = "获取分页报警基础信息")
+ private R> page(@Validated({PageGroup.class, Default.class}) @RequestBody CraftInfoQueryParam craftInfoQueryParam) {
+ return craftInfoService.page(craftInfoQueryParam);
+ }
+
+ @PostMapping(value = "add")
+ @ApiOperation(value = "新增")
+ private R add(@Validated({AddGroup.class, Default.class}) @RequestBody CraftInfoParam craftInfoParam) {
+ return craftInfoService.add(craftInfoParam);
+ }
+
+ @PostMapping(value = "update")
+ @ApiOperation(value = "更新")
+ private R update(@Validated({UpdateGroup.class, Default.class}) @RequestBody CraftInfoParam craftInfoParam) {
+ return craftInfoService.update(craftInfoParam);
+ }
+
+ @PostMapping(value = "delete")
+ @ApiOperation(value = "删除报警基础信息")
+ private R delete(@Validated @RequestBody IdParam idParam) {
+ return craftInfoService.delete(idParam);
+ }
+
+ @PostMapping(value = "codeGenerator")
+ @ApiOperation(value = "编码生成")
+ private R codeGenerator() {
+ return successful(IDGenerator.gen("GY", "yyyyMMddHHmm", 2, "CRAFTINFO_CODE"));
+ }
+}
diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoParam.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoParam.java
new file mode 100644
index 0000000..c6478ff
--- /dev/null
+++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoParam.java
@@ -0,0 +1,53 @@
+package com.mt.wms.basic.params;
+
+import com.mt.wms.core.base.BaseParam;
+import com.mt.wms.core.validator.groups.UpdateGroup;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2022/1/25 21:34
+ * @Version 1.0
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "工艺基础信息参数对象", description = "用于新增和更新工艺基础信息")
+public class CraftInfoParam extends BaseParam {
+ private static final long serialVersionUID = 1L;
+ /**
+ * 主键,自增
+ */
+ @ApiModelProperty(value = "主键",required = false, example = "1")
+ @NotNull(message = "xxID不能为空", groups = {UpdateGroup.class})
+ private Long id;
+
+ /**
+ * 编码
+ */
+ @ApiModelProperty(value = "编码", example = "1")
+ private String code;
+ /**
+ * 工艺号
+ */
+ @ApiModelProperty(value = "工艺号", example = "1")
+ @NotNull(message = "工艺号不能为空")
+ private String craftCode;
+ /**
+ * plc值
+ */
+ @ApiModelProperty(value = "plc值", example = "1")
+ @NotNull(message = "plc值不能为空")
+ private Integer plcValue;
+ /**
+ * 说明
+ */
+ @ApiModelProperty(value = "说明", example = "1")
+ private String content;
+}
diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoQueryParam.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoQueryParam.java
new file mode 100644
index 0000000..6267388
--- /dev/null
+++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/params/CraftInfoQueryParam.java
@@ -0,0 +1,31 @@
+package com.mt.wms.basic.params;
+
+import com.mt.wms.core.params.BasePageParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2022/1/25 21:37
+ * @Version 1.0
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value = "报警基础信息查询参数", description = "用于查询报警基础信息")
+public class CraftInfoQueryParam extends BasePageParam {
+ /**
+ * 主键,自增
+ */
+ @ApiModelProperty(value = "主键",required = false, example = "1")
+ private Long id;
+
+ /**
+ * 工艺号
+ */
+ @ApiModelProperty(value = "工艺号",required = false, example = "1")
+ private String craftCode;
+}
diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/service/CraftInfoService.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/service/CraftInfoService.java
new file mode 100644
index 0000000..862c1f2
--- /dev/null
+++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/service/CraftInfoService.java
@@ -0,0 +1,73 @@
+package com.mt.wms.basic.service;
+
+import com.mt.wms.basic.params.AlarmBaseParam;
+import com.mt.wms.basic.params.AlarmBaseQueryParam;
+import com.mt.wms.basic.params.CraftInfoParam;
+import com.mt.wms.basic.params.CraftInfoQueryParam;
+import com.mt.wms.basic.vo.AlarmBaseVo;
+import com.mt.wms.basic.vo.CraftInfoVo;
+import com.mt.wms.core.dal.entity.CraftInfo;
+import com.mt.wms.core.params.IdParam;
+import com.mt.wms.core.vo.IdVo;
+import com.mt.wms.core.vo.PageVo;
+import com.mt.wms.core.vo.R;
+
+import java.util.List;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2021/10/9 10:46
+ * @Version 1.0
+ */
+public interface CraftInfoService {
+
+ /**
+ * 获取xx
+ *
+ * @param idParam 主键参数
+ * @return xx
+ */
+ R get(IdParam idParam);
+
+ /**
+ * 获取xx列表
+ *
+ * @param craftInfoQueryParam xx查询参数
+ * @return xx列表
+ */
+ R> list(CraftInfoQueryParam craftInfoQueryParam);
+
+ /**
+ * 获取xx分页列表
+ *
+ * @param craftInfoQueryParam xx查询参数
+ * @return xx分页列表
+ */
+ R> page(CraftInfoQueryParam craftInfoQueryParam);
+
+
+ /**
+ * 新增xx
+ *
+ * @param craftInfoParam xx参数
+ * @return 主键
+ */
+ R add(CraftInfoParam craftInfoParam);
+
+ /**
+ * 更新xx
+ *
+ * @param craftInfoParam xx参数
+ * @return 主键
+ */
+ R update(CraftInfoParam craftInfoParam);
+
+
+ /**
+ * 删除xx
+ *
+ * @param idParam 主键参数
+ * @return 主键
+ */
+ R delete(IdParam idParam);
+}
diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/service/impl/CraftInfoServiceImpl.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/service/impl/CraftInfoServiceImpl.java
new file mode 100644
index 0000000..34fb50b
--- /dev/null
+++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/service/impl/CraftInfoServiceImpl.java
@@ -0,0 +1,97 @@
+package com.mt.wms.basic.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.mt.wms.basic.params.AlarmBaseParam;
+import com.mt.wms.basic.params.AlarmBaseQueryParam;
+import com.mt.wms.basic.params.CraftInfoParam;
+import com.mt.wms.basic.params.CraftInfoQueryParam;
+import com.mt.wms.basic.service.AlarmBaseService;
+import com.mt.wms.basic.service.CraftInfoService;
+import com.mt.wms.basic.vo.AlarmBaseVo;
+import com.mt.wms.basic.vo.CraftInfoVo;
+import com.mt.wms.core.api.Assert;
+import com.mt.wms.core.base.BaseService;
+import com.mt.wms.core.dal.entity.AlarmBase;
+import com.mt.wms.core.dal.entity.CraftInfo;
+import com.mt.wms.core.dal.service.AlarmBaseServiceBiz;
+import com.mt.wms.core.dal.service.CraftInfoServiceBiz;
+import com.mt.wms.core.errorcode.ApiErrorCode;
+import com.mt.wms.core.params.IdParam;
+import com.mt.wms.core.vo.IdVo;
+import com.mt.wms.core.vo.PageVo;
+import com.mt.wms.core.vo.R;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2021/10/9 10:49
+ * @Version 1.0
+ */
+@Service
+@Transactional
+public class CraftInfoServiceImpl extends BaseService implements CraftInfoService {
+
+ @Resource
+ private CraftInfoServiceBiz craftInfoServiceBiz;
+
+ @Override
+ public R get(IdParam idParam) {
+ Assert.notNull(ApiErrorCode.INVALID_PARAMETER,idParam.getId());
+ CraftInfo craftInfo = craftInfoServiceBiz.getById(idParam.getId());
+ CraftInfoVo craftInfoVo = CraftInfoVo.builder().build();
+ BeanUtils.copyProperties(craftInfo,craftInfoVo);
+ return successful(craftInfoVo);
+ }
+
+ @Override
+ public R> list(CraftInfoQueryParam craftInfoQueryParam) {
+ QueryWrapper wrapper=new QueryWrapper<>();
+ wrapper.eq(CraftInfo.VALID,1);
+ List craftInfoList = craftInfoServiceBiz.list(wrapper);
+ List craftInfoVoList = com.mt.wms.core.utils.BeanUtils.copyList(craftInfoList, CraftInfoVo.class);
+ return successful(craftInfoVoList);
+ }
+
+ @Override
+ public R> page(CraftInfoQueryParam craftInfoQueryParam) {
+ QueryWrapper wrapper=new QueryWrapper<>();
+ wrapper.like(StringUtils.isNotBlank(craftInfoQueryParam.getCraftCode()),CraftInfo.CRAFT_CODE,craftInfoQueryParam.getCraftCode())
+ .orderByDesc(CraftInfo.CREATE_TIME);
+ Page page = craftInfoServiceBiz.page(new Page<>(craftInfoQueryParam.getCurrent(), craftInfoQueryParam.getSize()), wrapper);
+ return successful(new PageVo<>(page,CraftInfoVo.class));
+ }
+
+ @Override
+ public R add(CraftInfoParam craftInfoParam) {
+ QueryWrapper wrapper=new QueryWrapper<>();
+
+ CraftInfo craftInfo=new CraftInfo();
+ BeanUtils.copyProperties(craftInfoParam,craftInfo);
+ setCommonField(craftInfo);
+ craftInfoServiceBiz.save(craftInfo);
+ return successful(IdVo.builder().id(craftInfo.getId()).build());
+ }
+
+ @Override
+ public R update(CraftInfoParam craftInfoParam) {
+ CraftInfo craftInfo = craftInfoServiceBiz.getById(craftInfoParam.getId());
+ CraftInfo updateCraftInfo=new CraftInfo();
+ BeanUtils.copyProperties(craftInfoParam,updateCraftInfo);
+ setUpdateCommonField(updateCraftInfo);
+ craftInfoServiceBiz.updateById(updateCraftInfo);
+ return successful(IdVo.builder().id(updateCraftInfo.getId()).build());
+ }
+
+ @Override
+ public R delete(IdParam idParam) {
+ craftInfoServiceBiz.removeById(idParam.getId());
+ return successful(IdVo.builder().id(idParam.getId()).build());
+ }
+}
diff --git a/6.program/wms-basic/src/main/java/com/mt/wms/basic/vo/CraftInfoVo.java b/6.program/wms-basic/src/main/java/com/mt/wms/basic/vo/CraftInfoVo.java
new file mode 100644
index 0000000..11d0acd
--- /dev/null
+++ b/6.program/wms-basic/src/main/java/com/mt/wms/basic/vo/CraftInfoVo.java
@@ -0,0 +1,55 @@
+package com.mt.wms.basic.vo;
+
+import com.mt.wms.core.base.BaseVo;
+import com.mt.wms.core.vo.PageVo;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.models.auth.In;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2022/1/25 21:27
+ * @Version 1.0
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@Builder
+@ApiModel(value = "工艺信息视图对象", description = "用于查询工艺信息信息")
+public class CraftInfoVo extends BaseVo implements PageVo.ConvertVo{
+ /**
+ * 主键,自增
+ */
+ @ApiModelProperty(value = "主键,更新时需要填写", example = "1")
+ private Long id;
+
+ /**
+ * 编码
+ */
+ @ApiModelProperty(value = "编码", example = "1")
+ private String code;
+ /**
+ * 工艺号
+ */
+ @ApiModelProperty(value = "工艺号", example = "1")
+ private String craftCode;
+ /**
+ * plc值
+ */
+ @ApiModelProperty(value = "plc值", example = "1")
+ private Integer plcValue;
+ /**
+ * 状态
+ */
+ @ApiModelProperty(value = "状态", example = "1")
+ private Integer status;
+ /**
+ * 说明
+ */
+ @ApiModelProperty(value = "说明", example = "1")
+ private String content;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java b/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java
index 2fcbb18..f229ea6 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/MyGenerator.java
@@ -106,7 +106,7 @@ public class MyGenerator {
@Test
public void generateCodeWithInjectConfigForAllTable() {
- generateByTablesWithInjectConfig(new String[]{"t_apms_check_result"});
+ generateByTablesWithInjectConfig(new String[]{"t_auto_exe_task"});
}
public static void main(String[] args) {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AlarmInfo.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AlarmInfo.java
index 9f99e45..2d3f6ac 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AlarmInfo.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AlarmInfo.java
@@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -92,7 +92,7 @@ public class AlarmInfo extends Model {
* 设备id
*/
@TableField("equipment_id")
- private Integer equipmentId;
+ private Long equipmentId;
/**
* 设备名称
@@ -130,6 +130,12 @@ public class AlarmInfo extends Model {
@TableField("note")
private String note;
+ /**
+ * 加工任务编码(炉子报警时记录)
+ */
+ @TableField("task_code")
+ private String taskCode;
+
public static final String ID = "id";
@@ -165,6 +171,8 @@ public class AlarmInfo extends Model {
public static final String NOTE = "note";
+ public static final String TASK_CODE = "task_code";
+
@Override
protected Serializable pkVal() {
return this.id;
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AutoExeTask.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AutoExeTask.java
index 43f43de..d9b3a9e 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AutoExeTask.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/AutoExeTask.java
@@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-03-03
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -117,6 +117,12 @@ public class AutoExeTask extends Model {
@TableField("f_equipment_id")
private Long fEquipmentId;
+ /**
+ * 设备名称(炉子名称)
+ */
+ @TableField("f_equipment_name")
+ private String fEquipmentName;
+
/**
* 工艺号ID,关联工艺号表:t_craft_info
*/
@@ -165,6 +171,12 @@ public class AutoExeTask extends Model {
@TableField("t_equipment_type_id")
private Long tEquipmentTypeId;
+ /**
+ * 设备名称
+ */
+ @TableField("t_equipment_name")
+ private String tEquipmentName;
+
/**
* 设备ID,关联设备表:t_kiln_info
*/
@@ -219,6 +231,12 @@ public class AutoExeTask extends Model {
@TableField("th_equipment_type_id")
private Long thEquipmentTypeId;
+ /**
+ * 设备名称
+ */
+ @TableField("th_equipment_name")
+ private String thEquipmentName;
+
/**
* 设备ID,关联设备表:t_kiln_info
*/
@@ -292,6 +310,8 @@ public class AutoExeTask extends Model {
public static final String F_EQUIPMENT_ID = "f_equipment_id";
+ public static final String F_EQUIPMENT_NAME = "f_equipment_name";
+
public static final String F_CRAFT_CODE_ID = "f_craft_code_id";
public static final String F_PLC_VALUE = "f_plc_value";
@@ -308,6 +328,8 @@ public class AutoExeTask extends Model {
public static final String T_EQUIPMENT_TYPE_ID = "t_equipment_type_id";
+ public static final String T_EQUIPMENT_NAME = "t_equipment_name";
+
public static final String T_EQUIPMENT_ID = "t_equipment_id";
public static final String T_CRAFT_CODE_ID = "t_craft_code_id";
@@ -326,6 +348,8 @@ public class AutoExeTask extends Model {
public static final String TH_EQUIPMENT_TYPE_ID = "th_equipment_type_id";
+ public static final String TH_EQUIPMENT_NAME = "th_equipment_name";
+
public static final String TH_EQUIPMENT_ID = "th_equipment_id";
public static final String TH_CRAFT_CODE_ID = "th_craft_code_id";
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/KilnInfo.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/KilnInfo.java
index de2dc14..74c98a7 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/KilnInfo.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/KilnInfo.java
@@ -19,7 +19,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -71,7 +71,7 @@ public class KilnInfo extends Model {
private String version;
/**
- * 状态 0初始化,1损坏
+ * 状态 0初始化,1损坏 ,2 工作中
*/
@TableField("status")
private Integer status;
@@ -83,7 +83,7 @@ public class KilnInfo extends Model {
private String interCode;
/**
- * 编码
+ * 编码 必须与AMPS相同
*/
@TableField("code")
private String code;
@@ -95,7 +95,7 @@ public class KilnInfo extends Model {
private Integer factoryId;
/**
- * 窑炉名称
+ * 窑炉名称 建议与AMPS相同
*/
@TableField("kiln_name")
private String kilnName;
@@ -113,10 +113,10 @@ public class KilnInfo extends Model {
private String en;
/**
- * 设备类型,存储数据字典编码
+ * 设备类型,存储数据字典编码,修改为1:加工炉,2:回火炉,3:氮化炉,4:清洗炉
*/
@TableField("type")
- private String type;
+ private Integer type;
/**
* ip地址
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java
index 173b6e1..ff044d3 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParEleValue.java
@@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-12-27
+ * @since 2022-03-01
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -53,7 +53,13 @@ public class ParEleValue extends Model {
* 窑炉id,关联设备窑炉表:t_kiln_info
*/
@TableField("kiln_id")
- private Integer kilnId;
+ private Long kilnId;
+
+ /**
+ * 任务id
+ */
+ @TableField("task_id")
+ private Long taskId;
/**
* 参数id,关联参数表:t_par_info
@@ -104,7 +110,7 @@ public class ParEleValue extends Model {
private Float totalBat;
/**
- * 时间段类型。0:半小时,1:天,2:月
+ * 时间段类型。0:半小时,1:天,2:月
*/
@TableField("date_type")
private Integer dateType;
@@ -150,6 +156,8 @@ public class ParEleValue extends Model {
public static final String KILN_ID = "kiln_id";
+ public static final String TASK_ID = "task_id";
+
public static final String PAR_ID = "par_id";
public static final String A_VOLTAGEV_VALUE = "a_voltagev_value";
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParGasValue.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParGasValue.java
index f85d211..c377257 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParGasValue.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParGasValue.java
@@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -53,7 +53,13 @@ public class ParGasValue extends Model {
* 窑炉id,关联设备窑炉表:t_kiln_info
*/
@TableField("kiln_id")
- private Integer kilnId;
+ private Long kilnId;
+
+ /**
+ * 任务id
+ */
+ @TableField("task_id")
+ private Long taskId;
/**
* 参数id,关联参数表:t_par_info
@@ -62,13 +68,13 @@ public class ParGasValue extends Model {
private Integer parId;
/**
- * 设定氮势值
+ * 设定氮/碳势值
*/
@TableField("set_nit_pot_value")
private Float setNitPotValue;
/**
- * 实际氮势值
+ * 实际氮/碳势值
*/
@TableField("actual_nit_pot_value")
private Float actualNitPotValue;
@@ -80,46 +86,46 @@ public class ParGasValue extends Model {
private Float acceptNitPotValue;
/**
- * 氮气流量
+ * 氮气量
*/
@TableField("nit_flow_value")
private Float nitFlowValue;
/**
- * 氨气流量
+ * 氨气量
*/
@TableField("ammonia_flow_value")
private Float ammoniaFlowValue;
/**
- * 二氧化碳流量
+ * 二氧化碳量
*/
@TableField("car_dioxide_flow_value")
private Float carDioxideFlowValue;
/**
- * 扩展字段1
+ * 甲烷量
*/
- @TableField("add_a")
- private Float addA;
+ @TableField("methanol_flow")
+ private Float methanolFlow;
/**
- * 扩展字段2
+ * 丙烷量
*/
- @TableField("add_b")
- private Float addB;
+ @TableField("propane_flow")
+ private Float propaneFlow;
/**
- * 扩展字段3
+ * 氢含量
*/
- @TableField("add_c")
- private Float addC;
+ @TableField("hydrogen_content")
+ private Float hydrogenContent;
/**
- * 扩展字段4
+ * 分解率
*/
- @TableField("orther_a")
- private String ortherA;
+ @TableField("decomposition_rate")
+ private Float decompositionRate;
/**
* 扩展字段5
@@ -144,6 +150,8 @@ public class ParGasValue extends Model {
public static final String KILN_ID = "kiln_id";
+ public static final String TASK_ID = "task_id";
+
public static final String PAR_ID = "par_id";
public static final String SET_NIT_POT_VALUE = "set_nit_pot_value";
@@ -158,13 +166,13 @@ public class ParGasValue extends Model {
public static final String CAR_DIOXIDE_FLOW_VALUE = "car_dioxide_flow_value";
- public static final String ADD_A = "add_a";
+ public static final String METHANOL_FLOW = "methanol_flow";
- public static final String ADD_B = "add_b";
+ public static final String PROPANE_FLOW = "propane_flow";
- public static final String ADD_C = "add_c";
+ public static final String HYDROGEN_CONTENT = "hydrogen_content";
- public static final String ORTHER_A = "orther_a";
+ public static final String DECOMPOSITION_RATE = "decomposition_rate";
public static final String ORTHER_B = "orther_b";
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParRotSpeedValue.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParRotSpeedValue.java
index 2de692e..5ed725a 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParRotSpeedValue.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParRotSpeedValue.java
@@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -53,7 +53,13 @@ public class ParRotSpeedValue extends Model {
* 窑炉id,关联设备窑炉表:t_kiln_info
*/
@TableField("kiln_id")
- private Integer kilnId;
+ private Long kilnId;
+
+ /**
+ * 任务id
+ */
+ @TableField("task_id")
+ private Long taskId;
/**
* 参数id,关联参数表:t_par_info
@@ -156,6 +162,8 @@ public class ParRotSpeedValue extends Model {
public static final String KILN_ID = "kiln_id";
+ public static final String TASK_ID = "task_id";
+
public static final String PAR_ID = "par_id";
public static final String FAN_SPEED_A_VALUE = "fan_speed_a_value";
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParTemValue.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParTemValue.java
index 227b20a..92fdd77 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParTemValue.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/ParTemValue.java
@@ -18,7 +18,7 @@ import lombok.experimental.Accessors;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -53,7 +53,13 @@ public class ParTemValue extends Model {
* 窑炉id,关联设备窑炉表:t_kiln_info
*/
@TableField("kiln_id")
- private Integer kilnId;
+ private Long kilnId;
+
+ /**
+ * 任务id
+ */
+ @TableField("task_id")
+ private Long taskId;
/**
* 参数id,关联参数表:t_par_info
@@ -98,22 +104,22 @@ public class ParTemValue extends Model {
private Float takeOverOilSetTemValue;
/**
- * 扩展字段1
+ * 外一区温度
*/
- @TableField("add_a")
- private Float addA;
+ @TableField("outer_zone1_temp")
+ private Float outerZone1Temp;
/**
- * 扩展字段2
+ * 外二区温度
*/
- @TableField("add_b")
- private Float addB;
+ @TableField("outer_zone2_temp")
+ private Float outerZone2Temp;
/**
- * 扩展字段3
+ * 炉压
*/
- @TableField("add_c")
- private Float addC;
+ @TableField("furnace_pressure")
+ private Float furnacePressure;
/**
* 扩展字段4
@@ -144,6 +150,8 @@ public class ParTemValue extends Model {
public static final String KILN_ID = "kiln_id";
+ public static final String TASK_ID = "task_id";
+
public static final String PAR_ID = "par_id";
public static final String SET_TEM_VALUE = "set_tem_value";
@@ -158,11 +166,11 @@ public class ParTemValue extends Model {
public static final String TAKE_OVER_OIL_SET_TEM_VALUE = "take_over_oil_set_tem_value";
- public static final String ADD_A = "add_a";
+ public static final String OUTER_ZONE1_TEMP = "outer_zone1_temp";
- public static final String ADD_B = "add_b";
+ public static final String OUTER_ZONE2_TEMP = "outer_zone2_temp";
- public static final String ADD_C = "add_c";
+ public static final String FURNACE_PRESSURE = "furnace_pressure";
public static final String ORTHER_A = "orther_a";
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PlcNameSpace.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PlcNameSpace.java
new file mode 100644
index 0000000..7e171bb
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PlcNameSpace.java
@@ -0,0 +1,98 @@
+package com.mt.wms.core.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.Version;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ *
+ * PLC变量nameSpace对照表
+ *
+ *
+ * @author mt
+ * @since 2022-02-28
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_plc_name_space")
+public class PlcNameSpace extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableField("id")
+ private Long id;
+
+ /**
+ * 设备类型,1:多用加工炉,2:氮化炉,3:回火炉,4:清洗机,5:rgv
+ */
+ @TableField("eq_type")
+ private Integer eqType;
+
+ /**
+ * 变量名称
+ */
+ @TableField("name")
+ private String name;
+
+ /**
+ * 变量的含义
+ */
+ @TableField("note")
+ private String note;
+
+ /**
+ * 设备id
+ */
+ @TableField("eq_id")
+ private Long eqId;
+
+ /**
+ * 设备名称
+ */
+ @TableField("eq_name")
+ private String eqName;
+
+ /**
+ * 变量类型,0:变量,1:报警变量
+ */
+ @TableField("type")
+ private Integer type;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+
+ public static final String ID = "id";
+
+ public static final String EQ_TYPE = "eq_type";
+
+ public static final String NAME = "name";
+
+ public static final String NOTE = "note";
+
+ public static final String EQ_ID = "eq_id";
+
+ public static final String EQ_NAME = "eq_name";
+
+ public static final String TYPE = "type";
+
+ public static final String REMARK = "remark";
+
+ @Override
+ protected Serializable pkVal() {
+ return null;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PointInfo.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PointInfo.java
new file mode 100644
index 0000000..ce91718
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/PointInfo.java
@@ -0,0 +1,91 @@
+package com.mt.wms.core.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.Version;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ *
+ * 点位信息表
+ *
+ *
+ * @author mt
+ * @since 2022-03-02
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_point_info")
+public class PointInfo extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * id
+ */
+ @TableField("id")
+ private Integer id;
+
+ /**
+ * 点位编码,对应plc
+ */
+ @TableField("code")
+ private Long code;
+
+ /**
+ * 点位对应的设备名称
+ */
+ @TableField("name")
+ private String name;
+
+ /**
+ * 点位说明;关联对应表数据的code,窑炉code,库位code等等
+ */
+ @TableField("note")
+ private String note;
+
+ /**
+ * 类型:1 炉子,2 液压台,3 库位
+ */
+ @TableField("type")
+ private Integer type;
+
+ /**
+ * 距离原点的距离
+ */
+ @TableField("distance")
+ private Double distance;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDate createTime;
+
+
+ public static final String ID = "id";
+
+ public static final String CODE = "code";
+
+ public static final String NAME = "name";
+
+ public static final String NOTE = "note";
+
+ public static final String TYPE = "type";
+
+ public static final String DISTANCE = "distance";
+
+ public static final String CREATE_TIME = "create_time";
+
+ @Override
+ protected Serializable pkVal() {
+ return null;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.java
index efcd14a..10b3ddb 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
public interface AlarmInfoMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.xml
index 583af1b..0bb44af 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AlarmInfoMapper.xml
@@ -21,11 +21,12 @@
+
- id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, code, equipment_id, equipment_name, type, alarm_code, alarm_info, description, note
+ id, valid, create_time, creator_id, updater_id, update_time, version, status, inter_code, code, equipment_id, equipment_name, type, alarm_code, alarm_info, description, note, task_code
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.java
index 30b7379..5770058 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-03-03
*/
public interface AutoExeTaskMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.xml
index 65ed0ca..689b00e 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/AutoExeTaskMapper.xml
@@ -19,6 +19,7 @@
+
@@ -27,6 +28,7 @@
+
@@ -36,6 +38,7 @@
+
@@ -47,7 +50,7 @@
- id, valid, create_time, status, inter_code, process_flow_id, process_flow_name, process_flow_type, craft_code_id, craft_code, warehouse_id, f_task_id, f_det_task_code, f_equipment_type_id, f_equipment_id, f_craft_code_id, f_plc_value, f_in_tran_status, f_pro_status, f_out_tran_status, t_task_id, t_det_task_code, t_equipment_type_id, t_equipment_id, t_craft_code_id, t_plc_value, t_in_tran_status, t_pro_status, t_out_tran_status, th_task_id, th_det_task_code, th_equipment_type_id, th_equipment_id, th_craft_code_id, th_plc_value, th_in_tran_status, th_pro_status, th_out_tran_status, content
+ id, valid, create_time, status, inter_code, process_flow_id, process_flow_name, process_flow_type, craft_code_id, craft_code, warehouse_id, f_task_id, f_det_task_code, f_equipment_type_id, f_equipment_id, f_equipment_name, f_craft_code_id, f_plc_value, f_in_tran_status, f_pro_status, f_out_tran_status, t_task_id, t_det_task_code, t_equipment_type_id, t_equipment_name, t_equipment_id, t_craft_code_id, t_plc_value, t_in_tran_status, t_pro_status, t_out_tran_status, th_task_id, th_det_task_code, th_equipment_type_id, th_equipment_name, th_equipment_id, th_craft_code_id, th_plc_value, th_in_tran_status, th_pro_status, th_out_tran_status, content
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/KilnInfoMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/KilnInfoMapper.java
index 12ad5da..c67d846 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/KilnInfoMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/KilnInfoMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
public interface KilnInfoMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java
index 9f2ff8d..3ef60b5 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-12-27
+ * @since 2022-03-01
*/
public interface ParEleValueMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml
index b49df70..d3287af 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParEleValueMapper.xml
@@ -9,6 +9,7 @@
+
@@ -27,7 +28,7 @@
- id, create_time, inter_code, status, kiln_id, par_id, a_voltagev_value, b_voltagev_value, c_voltagev_value, a_current_value, b_current_value, c_current_value, total_bat, date_type, add_b, add_c, orther_a, orther_b, orther_c
+ id, create_time, inter_code, status, kiln_id, task_id, par_id, a_voltagev_value, b_voltagev_value, c_voltagev_value, a_current_value, b_current_value, c_current_value, total_bat, date_type, add_b, add_c, orther_a, orther_b, orther_c
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.java
index 90b0338..d28761c 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
public interface ParGasValueMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.xml
index 2300bb1..c3444ad 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParGasValueMapper.xml
@@ -9,6 +9,7 @@
+
@@ -16,17 +17,17 @@
-
-
-
-
+
+
+
+
- id, create_time, inter_code, status, kiln_id, par_id, set_nit_pot_value, actual_nit_pot_value, accept_nit_pot_value, nit_flow_value, ammonia_flow_value, car_dioxide_flow_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
+ id, create_time, inter_code, status, kiln_id, task_id, par_id, set_nit_pot_value, actual_nit_pot_value, accept_nit_pot_value, nit_flow_value, ammonia_flow_value, car_dioxide_flow_value, methanol_flow, propane_flow, hydrogen_content, decomposition_rate, orther_b, orther_c
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.java
index 459939d..0be2e6c 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
public interface ParRotSpeedValueMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.xml
index da49be0..f6de4ae 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParRotSpeedValueMapper.xml
@@ -9,6 +9,7 @@
+
@@ -28,7 +29,7 @@
- id, create_time, inter_code, status, kiln_id, par_id, fan_speed_a_value, fan_speed_b_value, oil_sti_speed_a_value, oil_sti_speed_b_value, oil_sti_speed_c_value, oil_sti_speed_d_value, oil_sti_speed_e_value, oil_sti_speed_f_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
+ id, create_time, inter_code, status, kiln_id, task_id, par_id, fan_speed_a_value, fan_speed_b_value, oil_sti_speed_a_value, oil_sti_speed_b_value, oil_sti_speed_c_value, oil_sti_speed_d_value, oil_sti_speed_e_value, oil_sti_speed_f_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.java
index a878f79..a32b277 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
public interface ParTemValueMapper extends BaseMapper {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.xml
index 5ff43f3..653b053 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.xml
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ParTemValueMapper.xml
@@ -9,6 +9,7 @@
+
@@ -16,9 +17,9 @@
-
-
-
+
+
+
@@ -26,7 +27,7 @@
- id, create_time, inter_code, status, kiln_id, par_id, set_tem_value, act_tem_value, oil_tank_act_tem_value, oil_tank_set_tem_value, take_over_set_tem_value, take_over_oil_set_tem_value, add_a, add_b, add_c, orther_a, orther_b, orther_c
+ id, create_time, inter_code, status, kiln_id, task_id, par_id, set_tem_value, act_tem_value, oil_tank_act_tem_value, oil_tank_set_tem_value, take_over_set_tem_value, take_over_oil_set_tem_value, outer_zone1_temp, outer_zone2_temp, furnace_pressure, orther_a, orther_b, orther_c
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.java
new file mode 100644
index 0000000..4801fec
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.PlcNameSpace;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * PLC变量nameSpace对照表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2022-02-28
+ */
+public interface PlcNameSpaceMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.xml
new file mode 100644
index 0000000..4a5026e
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PlcNameSpaceMapper.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, eq_type, name, note, eq_id, eq_name, type, remark
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.java
new file mode 100644
index 0000000..0569c1c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.PointInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 点位信息表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2022-03-02
+ */
+public interface PointInfoMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.xml
new file mode 100644
index 0000000..338679c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/PointInfoMapper.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, code, name, note, type, distance, create_time
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AlarmInfoServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AlarmInfoServiceBiz.java
index 041b3aa..61e90ab 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AlarmInfoServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AlarmInfoServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
public interface AlarmInfoServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AutoExeTaskServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AutoExeTaskServiceBiz.java
index 300aeb1..b8c8da7 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AutoExeTaskServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/AutoExeTaskServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-03-03
*/
public interface AutoExeTaskServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/KilnInfoServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/KilnInfoServiceBiz.java
index 21b0b85..ff51ddc 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/KilnInfoServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/KilnInfoServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
public interface KilnInfoServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java
index ada7c94..5ad49eb 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParEleValueServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-12-27
+ * @since 2022-03-01
*/
public interface ParEleValueServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParGasValueServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParGasValueServiceBiz.java
index 9bceed2..29226f5 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParGasValueServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParGasValueServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
public interface ParGasValueServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParRotSpeedValueServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParRotSpeedValueServiceBiz.java
index 0d8017f..65257d2 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParRotSpeedValueServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParRotSpeedValueServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
public interface ParRotSpeedValueServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParTemValueServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParTemValueServiceBiz.java
index d93f2e8..af57376 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParTemValueServiceBiz.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ParTemValueServiceBiz.java
@@ -9,7 +9,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
public interface ParTemValueServiceBiz extends IService {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PlcNameSpaceServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PlcNameSpaceServiceBiz.java
new file mode 100644
index 0000000..5abbed7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PlcNameSpaceServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.PlcNameSpace;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * PLC变量nameSpace对照表 服务类
+ *
+ *
+ * @author mt
+ * @since 2022-02-28
+ */
+public interface PlcNameSpaceServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PointInfoServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PointInfoServiceBiz.java
new file mode 100644
index 0000000..b3950db
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/PointInfoServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.PointInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 点位信息表 服务类
+ *
+ *
+ * @author mt
+ * @since 2022-03-02
+ */
+public interface PointInfoServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AlarmInfoServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AlarmInfoServiceBizImpl.java
index 73f1564..269d7fa 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AlarmInfoServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AlarmInfoServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
@Service
public class AlarmInfoServiceBizImpl extends ServiceImpl implements AlarmInfoServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AutoExeTaskServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AutoExeTaskServiceBizImpl.java
index c19bd7c..e6072f0 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AutoExeTaskServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/AutoExeTaskServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-12-14
+ * @since 2022-03-03
*/
@Service
public class AutoExeTaskServiceBizImpl extends ServiceImpl implements AutoExeTaskServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/KilnInfoServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/KilnInfoServiceBizImpl.java
index e2e3158..23f78f5 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/KilnInfoServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/KilnInfoServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-02-28
*/
@Service
public class KilnInfoServiceBizImpl extends ServiceImpl implements KilnInfoServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java
index e55672d..aa3e822 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParEleValueServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-12-27
+ * @since 2022-03-01
*/
@Service
public class ParEleValueServiceBizImpl extends ServiceImpl implements ParEleValueServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParGasValueServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParGasValueServiceBizImpl.java
index 07870cd..2baf129 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParGasValueServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParGasValueServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
@Service
public class ParGasValueServiceBizImpl extends ServiceImpl implements ParGasValueServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParRotSpeedValueServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParRotSpeedValueServiceBizImpl.java
index a8c1f10..bacce4f 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParRotSpeedValueServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParRotSpeedValueServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
@Service
public class ParRotSpeedValueServiceBizImpl extends ServiceImpl implements ParRotSpeedValueServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParTemValueServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParTemValueServiceBizImpl.java
index 80abb00..ee1b3a3 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParTemValueServiceBizImpl.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ParTemValueServiceBizImpl.java
@@ -12,7 +12,7 @@ import org.springframework.stereotype.Service;
*
*
* @author mt
- * @since 2021-11-18
+ * @since 2022-03-01
*/
@Service
public class ParTemValueServiceBizImpl extends ServiceImpl implements ParTemValueServiceBiz {
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PlcNameSpaceServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PlcNameSpaceServiceBizImpl.java
new file mode 100644
index 0000000..2f85252
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PlcNameSpaceServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.PlcNameSpace;
+import com.mt.wms.core.dal.mapper.PlcNameSpaceMapper;
+import com.mt.wms.core.dal.service.PlcNameSpaceServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * PLC变量nameSpace对照表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2022-02-28
+ */
+@Service
+public class PlcNameSpaceServiceBizImpl extends ServiceImpl implements PlcNameSpaceServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PointInfoServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PointInfoServiceBizImpl.java
new file mode 100644
index 0000000..753a588
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/PointInfoServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.PointInfo;
+import com.mt.wms.core.dal.mapper.PointInfoMapper;
+import com.mt.wms.core.dal.service.PointInfoServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 点位信息表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2022-03-02
+ */
+@Service
+public class PointInfoServiceBizImpl extends ServiceImpl implements PointInfoServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java
index 521cdab..30fbb06 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java
@@ -27,7 +27,23 @@ public class CodeGeneratorHelper {
*/
public static final String ORDER_CODE = "ORDER_CODE";
+ /**
+ * 报警编码
+ */
+ public static final String ALARM_CODE = "ALARM_CODE";
+ /**
+ * 自动任务编码
+ */
+ public static final String AUTO_TASK_CODE = "AUTO_TASK_CODE";
+ /**
+ * 生成自动任务编码
+ *
+ * @return 订单编号
+ */
+ public static String getAutoTaskCode() {
+ return IDGenerator.gen("ZD", "yyyyMMdd", 6, AUTO_TASK_CODE);
+ }
/**
* 生成订单编号
*
@@ -36,5 +52,13 @@ public class CodeGeneratorHelper {
public static String getOrderCode() {
return IDGenerator.gen("20", "yyyyMMdd", 6, ORDER_CODE);
}
+ /**
+ * 生成报警编码
+ *
+ * @return 报警编码
+ */
+ public static String getAlarmCode() {
+ return IDGenerator.gen("BJ", "yyyyMMdd", 6, ALARM_CODE);
+ }
}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java
index 917f248..ed1b953 100644
--- a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java
@@ -27,6 +27,7 @@ import java.io.IOException;
import java.nio.charset.Charset;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
+import java.util.concurrent.TimeUnit;
/**
* 使用 OKhttp 请求 Api 数据
@@ -46,7 +47,11 @@ public class HttpClient {
}
public static String httpPost(String url, String json) throws IOException {
- OkHttpClient httpClient = new OkHttpClient();
+ //OkHttpClient httpClient = new OkHttpClient();
+ OkHttpClient httpClient = new OkHttpClient().newBuilder().connectTimeout(300L, TimeUnit.SECONDS)
+ .writeTimeout(300, TimeUnit.SECONDS)
+ .readTimeout(300, TimeUnit.SECONDS)
+ .build();
RequestBody requestBody = RequestBody.create(JSON, json);
Request request = new Request.Builder()
.url(url)
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/AutoTaskController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/AutoTaskController.java
new file mode 100644
index 0000000..e566688
--- /dev/null
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/AutoTaskController.java
@@ -0,0 +1,54 @@
+package com.mt.wms.empty.controller;
+
+import com.mt.wms.core.base.BaseController;
+import com.mt.wms.core.constants.CommonConstant;
+import com.mt.wms.core.params.IdParam;
+import com.mt.wms.core.validator.groups.PageGroup;
+import com.mt.wms.core.vo.IdVo;
+import com.mt.wms.core.vo.PageVo;
+import com.mt.wms.core.vo.R;
+import com.mt.wms.empty.params.AutoTaskQueryParam;
+import com.mt.wms.empty.service.AutoTaskService;
+import com.mt.wms.empty.vo.AutoTaskVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.groups.Default;
+
+/**
+ * @Author: liguanghao
+ * @Date: 2022/3/3 23:35
+ * @Version 1.0
+ */
+@RestController
+@RequestMapping(CommonConstant.API_MODULE_BASE + "autoTask")
+@Slf4j
+@Api(value = "自动任务相关接口", tags = "自动任务相关接口", hidden = false)
+public class AutoTaskController extends BaseController {
+ @Autowired
+ private AutoTaskService autoTaskService;
+
+ @PostMapping(value = "get")
+ @ApiOperation(value = "获取自动任务基础信息")
+ private R get(@Validated @RequestBody IdParam idParam) {
+ return autoTaskService.get(idParam);
+ }
+
+
+ @PostMapping(value = "page")
+ @ApiOperation(value = "获取分页自动任务基础信息")
+ private R> page(@Validated({PageGroup.class, Default.class}) @RequestBody AutoTaskQueryParam autoTaskQueryParam) {
+ return autoTaskService.page(autoTaskQueryParam);
+ }
+
+ private R stop(@Validated @RequestBody IdParam idParam){
+ return autoTaskService.stop(idParam);
+ }
+}
diff --git a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java
index 9defeb6..a55d2de 100644
--- a/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java
+++ b/6.program/wms-empty/src/main/java/com/mt/wms/empty/controller/CurrTaskController.java
@@ -1,19 +1,23 @@
package com.mt.wms.empty.controller;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONObject;
import com.mt.wms.basic.service.KilnInfoService;
import com.mt.wms.basic.vo.KilnInfoVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
+import com.mt.wms.core.dal.entity.AutoExeTask;
import com.mt.wms.core.dal.entity.CurrTask;
+import com.mt.wms.core.dal.service.AutoExeTaskServiceBiz;
+import com.mt.wms.core.dal.service.CurrTaskServiceBiz;
import com.mt.wms.core.params.BasePageParam;
import com.mt.wms.core.params.IdParam;
+import com.mt.wms.core.utils.CodeGeneratorHelper;
+import com.mt.wms.core.utils.HttpClient;
import com.mt.wms.core.vo.IdVo;
import com.mt.wms.core.vo.PageVo;
import com.mt.wms.core.vo.R;
-import com.mt.wms.empty.params.ApmsCreateProcessSheet;
-import com.mt.wms.empty.params.CreateItem;
-import com.mt.wms.empty.params.CurrTaskQueryParam;
-import com.mt.wms.empty.params.TaskCreateParam;
+import com.mt.wms.empty.params.*;
import com.mt.wms.empty.service.CurrTaskDetService;
import com.mt.wms.empty.service.CurrTaskService;
import com.mt.wms.empty.service.OrderInfoService;
@@ -24,6 +28,8 @@ import com.mt.wms.empty.vo.CurrTaskQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
@@ -31,10 +37,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import java.io.IOException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
-import java.util.Map;
+import java.util.*;
/**
* @author xcc
@@ -56,6 +62,11 @@ public class CurrTaskController extends BaseController {
private ApmsController apmsControl;
@Autowired
private KilnInfoService kilnInfoService;
+ @Autowired
+ private CurrTaskServiceBiz currTaskServiceBiz;
+ @Autowired
+ private AutoExeTaskServiceBiz autoExeTaskServiceBiz;
+
@PostMapping(value = "createProcessTask")
@ApiOperation(value = "订单加工-创建一个加工任务至任务队列")
@@ -124,6 +135,114 @@ public class CurrTaskController extends BaseController {
}
}
+ @PostMapping(value = "createAutoTask")
+ @ApiOperation(value = "订单加工-创建多个个分步骤加工任务至任务队列")
+ public R createAutoTask(@Validated @RequestBody AutoCurrTaskParam autoCurrTaskParam){
+ List detParams = autoCurrTaskParam.getDetParams();
+ //自动任务循环添加多条currTask
+ AutoExeTask autoExeTask=new AutoExeTask();
+ for (TaskCreateParam param:detParams
+ ) {
+ //验证标识卡号正确无误。
+ orderInfoService.verifyTaskInfoByIdenCardNum(param.getDetParams());
+ //验证炉子编码信息在apms正确无误
+ R kilnInfoVoR = kilnInfoService.get(IdParam.builder().id(param.getKilnId()).build());
+ String kilnCode = kilnInfoVoR.getData().getCode();
+ R bm = apmsControl.getStoveCodeByWorkShopCode("BM");
+ ArrayList