From d146c084c0b5bf360cd55d63e79916c55e703a3e Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期六, 16 十一月 2024 09:15:35 +0800 Subject: [PATCH] 1 --- billion-main/src/main/java/com/billion/main/bs/workshop/domain/BsWorkshop.java | 82 --------------- billion-main/src/main/java/common/BaseEntity.java | 37 +++++++ billion-admin/src/main/resources/application.yml | 45 +++++++- sql/table.sql | 110 ++++++++++++++++++++++ 4 files changed, 189 insertions(+), 85 deletions(-) diff --git a/billion-admin/src/main/resources/application.yml b/billion-admin/src/main/resources/application.yml index 4406572..5e2e740 100644 --- a/billion-admin/src/main/resources/application.yml +++ b/billion-admin/src/main/resources/application.yml @@ -106,14 +106,47 @@ # # 鍔犺浇鍏ㄥ眬鐨勯厤缃枃浠� # configLocation: classpath:mybatis/mybatis-config.xml -# MyBatis Plus閰嶇疆 +## MyBatis Plus閰嶇疆 +#mybatis-plus: +# # 鎼滅储鎸囧畾鍖呭埆鍚� +# typeAliasesPackage: com.billion.**.domain +# # 閰嶇疆mapper鐨勬壂鎻忥紝鎵惧埌鎵�鏈夌殑mapper.xml鏄犲皠鏂囦欢 +# mapperLocations: classpath*:mapper/**/*Mapper.xml +# # 鍔犺浇鍏ㄥ眬鐨勯厤缃枃浠� +# configLocation: classpath:mybatis/mybatis-config.xml + mybatis-plus: - # 鎼滅储鎸囧畾鍖呭埆鍚� - typeAliasesPackage: com.billion.**.domain - # 閰嶇疆mapper鐨勬壂鎻忥紝鎵惧埌鎵�鏈夌殑mapper.xml鏄犲皠鏂囦欢 + # 瀵瑰簲鐨� XML 鏂囦欢浣嶇疆 mapperLocations: classpath*:mapper/**/*Mapper.xml - # 鍔犺浇鍏ㄥ眬鐨勯厤缃枃浠� - configLocation: classpath:mybatis/mybatis-config.xml + typeAliasesPackage: com.billion.**.domain + checkConfigLocation: false + executorType: SIMPLE + configuration: + mapUnderscoreToCamelCase: true + defaultEnumTypeHandler: org.apache.ibatis.type.EnumTypeHandler + aggressiveLazyLoading: true + autoMappingBehavior: PARTIAL + autoMappingUnknownColumnBehavior: NONE + localCacheScope: SESSION + # 寮�鍚疢ybatis浜岀骇缂撳瓨锛岄粯璁や负 true + cacheEnabled: true + global-config: + banner: true + enableSqlRunner: false + dbConfig: + idType: AUTO + tablePrefix: null + columnFormat: null + tableUnderline: true + capitalMode: false + logicDeleteField: deleted + # 閫昏緫宸插垹闄ゅ�� + logicDeleteValue: 1 + # 閫昏緫鏈垹闄ゅ�� + logicNotDeleteValue: 0 + insertStrategy: NOT_NULL + updateStrategy: NOT_NULL + # PageHelper鍒嗛〉鎻掍欢 pagehelper: diff --git a/billion-main/src/main/java/com/billion/main/bs/workshop/domain/BsWorkshop.java b/billion-main/src/main/java/com/billion/main/bs/workshop/domain/BsWorkshop.java index f4ffd6d..a6a182e 100644 --- a/billion-main/src/main/java/com/billion/main/bs/workshop/domain/BsWorkshop.java +++ b/billion-main/src/main/java/com/billion/main/bs/workshop/domain/BsWorkshop.java @@ -1,9 +1,8 @@ package com.billion.main.bs.workshop.domain; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; +import common.BaseEntity; +import lombok.Data; import com.billion.common.annotation.Excel; -import com.billion.common.core.domain.BaseEntity; /** * 杞﹂棿淇℃伅瀵硅薄 bs_workshop @@ -11,13 +10,9 @@ * @author Billion-Yi * @date 2024-11-12 */ +@Data public class BsWorkshop extends BaseEntity { - private static final long serialVersionUID = 1L; - - /** id */ - private Long id; - /** 杞﹂棿缂栫爜 */ @Excel(name = "杞﹂棿缂栫爜") private String workshopCode; @@ -35,75 +30,4 @@ /** 澶囨敞 */ @Excel(name = "澶囨敞") private String remarks; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setWorkshopCode(String workshopCode) - { - this.workshopCode = workshopCode; - } - - public String getWorkshopCode() - { - return workshopCode; - } - public void setWorkshopName(String workshopName) - { - this.workshopName = workshopName; - } - - public String getWorkshopName() - { - return workshopName; - } - public void setSpareField1(String spareField1) - { - this.spareField1 = spareField1; - } - - public String getSpareField1() - { - return spareField1; - } - public void setSpareField2(String spareField2) - { - this.spareField2 = spareField2; - } - - public String getSpareField2() - { - return spareField2; - } - public void setRemarks(String remarks) - { - this.remarks = remarks; - } - - public String getRemarks() - { - return remarks; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("workshopCode", getWorkshopCode()) - .append("workshopName", getWorkshopName()) - .append("spareField1", getSpareField1()) - .append("spareField2", getSpareField2()) - .append("remarks", getRemarks()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .toString(); - } } diff --git a/billion-main/src/main/java/common/BaseEntity.java b/billion-main/src/main/java/common/BaseEntity.java new file mode 100644 index 0000000..b9725a8 --- /dev/null +++ b/billion-main/src/main/java/common/BaseEntity.java @@ -0,0 +1,37 @@ +package common; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +@Data +public class BaseEntity implements Serializable { + private static final long serialVersionUID = 1L; + + @TableId + @JsonSerialize(using = ToStringSerializer.class) + private Long id; + + /** 鍒涘缓鑰� */ + private String createBy; + + /** 鍒涘缓鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + /** 鏇存柊鑰� */ + private String updateBy; + + /** 鏇存柊鏃堕棿 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date updateTime; + + private Integer deleted; + + +} diff --git a/sql/table.sql b/sql/table.sql new file mode 100644 index 0000000..23ee930 --- /dev/null +++ b/sql/table.sql @@ -0,0 +1,110 @@ +-- ---------------------------- +-- 1銆丱PC閰嶇疆 +-- ---------------------------- +drop table if exists sc_opc_conf; +create table sc_opc_conf ( + id bigint(20) not null auto_increment comment '涓婚敭id', + location_code varchar(16) default null comment '宸ヤ綅缂栫爜', + location_name varchar(32) default null comment '宸ヤ綅鍚嶇О', + node varchar(64) default '' comment '鍦板潃', + type char(1) default '' comment '閲囬泦绫诲瀷', + subscribe char(1) default '0' comment '鏄惁璁㈤槄', + del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', + create_by varchar(64) default '' comment '鍒涘缓鑰�', + create_time datetime comment '鍒涘缓鏃堕棿', + update_by varchar(64) default '' comment '鏇存柊鑰�', + update_time datetime comment '鏇存柊鏃堕棿', + primary key (id) +) engine=innodb auto_increment=1 comment = 'OPC浜や簰閰嶇疆'; + +-- ---------------------------- +-- 2銆佸弬鏁伴噰闆嗛厤缃� +-- ---------------------------- +drop table if exists sc_opc_conf; +create table sc_collection_param_conf ( + id bigint(20) not null auto_increment comment '涓婚敭id', + product_code varchar(64) default '' comment '浜у搧缂栫爜', + product_type varchar(64) default '' comment '浜у搧鍨嬪彿', + location_code varchar(16) default null comment '宸ヤ綅缂栫爜', + param_code varchar(32) default null comment '鍙傛暟缂栫爜', + param_name varchar(32) default null comment '鍙傛暟鍚嶇О', + param_set_code varchar(32) default null comment '鍙傛暟闆嗙紪鐮�', + param_set_name varchar(32) default null comment '鍙傛暟闆嗗悕绉�', + node varchar(64) default '' comment '閲囬泦鍦板潃', + type char(1) default '' comment '閲囬泦绫诲瀷锛�1鐗╂枡杩芥函锛�2鎷х揣杩芥函锛屽叾浠栵級', + unit varchar(16) default '' comment '鍗曚綅', + param_upper varchar(64) default '' comment '涓婇檺鍊�', + param_lower varchar(64) default '' comment '涓嬮檺鍊�', + param_central varchar(64) default '' comment '涓績鍊�', + order_num int(4) default 0 comment '鏄剧ず椤哄簭', + subscribe char(1) default '0' comment '鏄惁璁㈤槄', + del_flag char(1) default '0' comment '鍒犻櫎鏍囧織锛�0浠h〃瀛樺湪 1浠h〃鍒犻櫎锛�', + create_by varchar(64) default '' comment '鍒涘缓鑰�', + create_time datetime comment '鍒涘缓鏃堕棿', + update_by varchar(64) default '' comment '鏇存柊鑰�', + update_time datetime comment '鏇存柊鏃堕棿', + primary key (id) +) engine=innodb auto_increment=1 comment = '鍙傛暟閲囬泦閰嶇疆'; + +-- ---------------------------- +-- 1銆佹嫥绱ц拷婧� +-- ---------------------------- +drop table if exists da_tighten_collection; +create table da_tighten_collection ( + id bigint(20) not null auto_increment comment '涓婚敭id', + sfc_code varchar(64) default null comment '鎬绘垚搴忓垪鍙�', + location_code varchar(16) default null comment '宸ヤ綅缂栫爜', + param_set_code varchar(32) default null comment '鍙傛暟闆嗙紪鐮�', + param_set_name varchar(32) default null comment '鍙傛暟闆嗗悕绉�', + torque varchar(64) default '' comment '鎵煩鍊�', + torque_status char(1) default '' comment '鎵煩鐘舵��', + angle varchar(64) default '' comment '瑙掑害鍊�', + angle_status char(1) default '' comment '瑙掑害鐘舵��', + collect_time datetime comment '閲囬泦鏃堕棿', + primary key (id) +) engine=innodb auto_increment=1 comment = '鎷х揣閲囬泦'; + +-- ---------------------------- +-- 1銆佺墿鏂欒拷婧� +-- ---------------------------- +drop table if exists da_material_collection; +create table da_material_collection ( + id bigint(20) not null auto_increment comment '涓婚敭id', + sfc_code varchar(64) default null comment '鎬绘垚搴忓垪鍙�', + location_code varchar(16) default null comment '宸ヤ綅缂栫爜', + param_code varchar(32) default null comment '鍙傛暟缂栫爜', + param_name varchar(32) default null comment '鍙傛暟鍚嶇О', + param_value varchar(64) default '' comment '鍙傛暟鍊�', + collect_time datetime comment '閲囬泦鏃堕棿', + primary key (id) +) engine=innodb auto_increment=1 comment = '鎷х揣閲囬泦'; + +-- ---------------------------- +-- 1銆佸弬鏁伴噰闆� +-- ---------------------------- +drop table if exists da_param_collection; +create table da_param_collection ( + id bigint(20) not null auto_increment comment '涓婚敭id', + sfc_code varchar(64) default null comment '鎬绘垚搴忓垪鍙�', + location_code varchar(16) default null comment '宸ヤ綅缂栫爜', + param_code varchar(32) default null comment '鍙傛暟缂栫爜', + param_name varchar(32) default null comment '鍙傛暟鍚嶇О', + param_value varchar(64) default '' comment '鍙傛暟鍊�', + collect_time datetime comment '閲囬泦鏃堕棿', + primary key (id) +) engine=innodb auto_increment=1 comment = '鍙傛暟閲囬泦'; + +-- ---------------------------- +-- 1銆佽繃绔欓噰闆� +-- ---------------------------- +drop table if exists da_station_collection; +create table da_station_collection ( + id bigint(20) not null auto_increment comment '涓婚敭id', + sfc_code varchar(64) default null comment '鎬绘垚搴忓垪鍙�', + location_code varchar(16) default null comment '宸ヤ綅缂栫爜', + inbound_time datetime comment '杩涚珯鏃堕棿', + outbound_time datetime comment '鍑虹珯鏃堕棿', + status char(1) default '' comment '鐘舵�侊紙1鍚堟牸0涓嶅悎鏍硷級', + collect_time datetime comment '閲囬泦鏃堕棿', + primary key (id) +) engine=innodb auto_increment=1 comment = '杩囩珯閲囬泦'; \ No newline at end of file -- Gitblit v1.9.3