diff --git a/ruoyi-system/src/main/java/com/ruoyi/gss/domain/DhcProductInfo.java b/ruoyi-system/src/main/java/com/ruoyi/gss/domain/DhcProductInfo.java index 0d32742..c960ced 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/gss/domain/DhcProductInfo.java +++ b/ruoyi-system/src/main/java/com/ruoyi/gss/domain/DhcProductInfo.java @@ -6,6 +6,10 @@ import com.fasterxml.jackson.annotation.JsonIgnore; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; + public class DhcProductInfo extends BaseEntity { private static final long serialVersionUID = 1L; @@ -139,6 +143,14 @@ public class DhcProductInfo extends BaseEntity { this.categoryMiddle = categoryMiddle; } + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + public String getCategorySmall() { return categorySmall; } @@ -243,4 +255,163 @@ public class DhcProductInfo extends BaseEntity { public void setCreateTimes(String[] createTimes) { this.createTimes = createTimes; } + + /** 版本号 */ + @Excel(name = "版本号") + private String versionNo; + + /** 版本状态(0启用 1停用) */ + @Excel(name = "版本状态", readConverterExp = "0=启用,1=停用") + private String versionStatus; + + /** 变更说明 */ + @Excel(name = "变更说明") + private String changeDesc; + + /** 产地 */ + @Excel(name = "产地") + private String originPlace; + + /** 毛重(kg) */ + @Excel(name = "毛重(kg)") + private BigDecimal grossWeight; + + /** 净重(kg) */ + @Excel(name = "净重(kg)") + private BigDecimal netWeight; + + /** 外包装尺寸-长(mm) */ + @Excel(name = "外包装尺寸-长(mm)") + private BigDecimal packageLength; + + /** 外包装尺寸-宽(mm) */ + @Excel(name = "外包装尺寸-宽(mm)") + private BigDecimal packageWidth; + + /** 外包装尺寸-高(mm) */ + @Excel(name = "外包装尺寸-高(mm)") + private BigDecimal packageHeight; + + /** IR时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "IR时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date irDatetime; + + /** DR时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "DR时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date drDatetime; + + /** 生产版本 */ + @Excel(name = "生产版本") + private String productionVersion; + + /** 销售型号 */ + @Excel(name = "销售型号") + private String salesModel; + + // 为新增字段添加 getter/setter 方法 + public String getVersionNo() { + return versionNo; + } + + public void setVersionNo(String versionNo) { + this.versionNo = versionNo; + } + + public String getVersionStatus() { + return versionStatus; + } + + public void setVersionStatus(String versionStatus) { + this.versionStatus = versionStatus; + } + + public String getChangeDesc() { + return changeDesc; + } + + public void setChangeDesc(String changeDesc) { + this.changeDesc = changeDesc; + } + + public String getOriginPlace() { + return originPlace; + } + + public void setOriginPlace(String originPlace) { + this.originPlace = originPlace; + } + + public BigDecimal getGrossWeight() { + return grossWeight; + } + + public void setGrossWeight(BigDecimal grossWeight) { + this.grossWeight = grossWeight; + } + + public BigDecimal getNetWeight() { + return netWeight; + } + + public void setNetWeight(BigDecimal netWeight) { + this.netWeight = netWeight; + } + + public BigDecimal getPackageLength() { + return packageLength; + } + + public void setPackageLength(BigDecimal packageLength) { + this.packageLength = packageLength; + } + + public BigDecimal getPackageWidth() { + return packageWidth; + } + + public void setPackageWidth(BigDecimal packageWidth) { + this.packageWidth = packageWidth; + } + + public BigDecimal getPackageHeight() { + return packageHeight; + } + + public void setPackageHeight(BigDecimal packageHeight) { + this.packageHeight = packageHeight; + } + + public Date getIrDatetime() { + return irDatetime; + } + + public void setIrDatetime(Date irDatetime) { + this.irDatetime = irDatetime; + } + + public Date getDrDatetime() { + return drDatetime; + } + + public void setDrDatetime(Date drDatetime) { + this.drDatetime = drDatetime; + } + + public String getProductionVersion() { + return productionVersion; + } + + public void setProductionVersion(String productionVersion) { + this.productionVersion = productionVersion; + } + + public String getSalesModel() { + return salesModel; + } + + public void setSalesModel(String salesModel) { + this.salesModel = salesModel; + } } \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/gss/DhcProductInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/gss/DhcProductInfoMapper.xml index a34f04d..ff40082 100644 --- a/ruoyi-system/src/main/resources/mapper/gss/DhcProductInfoMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/gss/DhcProductInfoMapper.xml @@ -3,17 +3,23 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -24,14 +30,17 @@ select product_id, product_name, product_code, category_large, category_middle, category_small, - product_status, brand_name, brand_code, sales_type, description, ext_properties, del_flag, - create_by, create_time, update_by, update_time + product_status, brand_name, brand_code, sales_type, description, version_no, version_status, + change_desc, origin_place, gross_weight, net_weight, package_length, package_width, + package_height, ir_datetime, dr_datetime, production_version, sales_model, ext_properties, + del_flag, create_by, create_time, update_by, update_time from dhc_product_info - - + insert into dhc_product_info + product_name, product_code, category_large, @@ -69,6 +80,7 @@ update_time, + #{productName}, #{productCode}, #{categoryLarge}, @@ -87,9 +99,11 @@ + update dhc_product_info + product_name = #{productName}, product_code = #{productCode}, category_large = #{categoryLarge}, @@ -106,11 +120,4 @@ where product_id = #{productId} - - - update dhc_product_info set del_flag = '1' where product_id in - - #{productId} - - \ No newline at end of file diff --git a/sql/gss/产品表.sql b/sql/gss/产品表.sql index ad364ab..c60a770 100644 --- a/sql/gss/产品表.sql +++ b/sql/gss/产品表.sql @@ -1,3 +1,4 @@ +DROP TABLE IF EXISTS `dhc_product_info`; CREATE TABLE `dhc_product_info` ( `product_id` bigint NOT NULL AUTO_INCREMENT COMMENT '产品ID', `product_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT '产品名称', @@ -10,6 +11,19 @@ CREATE TABLE `dhc_product_info` ( `brand_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '品牌编码', `sales_type` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '内外销标识(0内销 1外销 2内外销)', `description` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '产品描述', + `version_no` varchar(32) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '1.0.0' COMMENT '版本号', + `version_status` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '版本状态(0启用 1停用)', + `change_desc` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '变更说明', + `origin_place` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '产地', + `gross_weight` decimal(16,4) DEFAULT '0.0000' COMMENT '毛重(kg)', + `net_weight` decimal(16,4) DEFAULT '0.0000' COMMENT '净重(kg)', + `package_length` decimal(16,4) DEFAULT '0.0000' COMMENT '外包装尺寸-长(mm)', + `package_width` decimal(16,4) DEFAULT '0.0000' COMMENT '外包装尺寸-宽(mm)', + `package_height` decimal(16,4) DEFAULT '0.0000' COMMENT '外包装尺寸-高(mm)', + `ir_datetime` datetime DEFAULT NULL COMMENT 'IR时间', + `dr_datetime` datetime DEFAULT NULL COMMENT 'DR时间', + `production_version` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '生产版本', + `sales_model` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '销售型号', `ext_properties` json DEFAULT NULL COMMENT '扩展属性(JSON格式)', `del_flag` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', `create_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者', @@ -17,8 +31,31 @@ CREATE TABLE `dhc_product_info` ( `update_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者', `update_time` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`product_id`), - UNIQUE KEY `idx_product_code` (`product_code`) -) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='产品信息表'; + UNIQUE KEY `idx_product_code_version` (`product_code`,`version_no`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='产品信息表'; + +-- 产品表 +-- CREATE TABLE `dhc_product_info` ( +-- `product_id` bigint NOT NULL AUTO_INCREMENT COMMENT '产品ID', +-- `product_name` varchar(100) COLLATE utf8mb4_general_ci NOT NULL COMMENT '产品名称', +-- `product_code` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '产品编码', +-- `category_large` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '所属大类编码', +-- `category_middle` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '所属中类编码', +-- `category_small` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '所属小类编码', +-- `product_status` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '产品状态(0草稿 1在售 2下市 3冻结)', +-- `brand_name` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '品牌名称', +-- `brand_code` varchar(32) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '品牌编码', +-- `sales_type` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '内外销标识(0内销 1外销 2内外销)', +-- `description` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '产品描述', +-- `ext_properties` json DEFAULT NULL COMMENT '扩展属性(JSON格式)', +-- `del_flag` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', +-- `create_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '创建者', +-- `create_time` datetime DEFAULT NULL COMMENT '创建时间', +-- `update_by` varchar(64) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '更新者', +-- `update_time` datetime DEFAULT NULL COMMENT '更新时间', +-- PRIMARY KEY (`product_id`), +-- UNIQUE KEY `idx_product_code` (`product_code`) +-- ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='产品信息表'; CREATE TABLE `dhc_product_version` ( @@ -27,7 +64,9 @@ CREATE TABLE `dhc_product_version` ( `version_no` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '版本号', `version_status` char(1) COLLATE utf8mb4_general_ci DEFAULT '0' COMMENT '版本状态(0启用 1停用)', `change_desc` varchar(500) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '变更说明', + `origin_place` varchar(100) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '产地', `gross_weight` decimal(16,4) DEFAULT '0.0000' COMMENT '毛重(kg)', + `net_weight` decimal(16,4) DEFAULT '0.0000' COMMENT '净重(kg)', `package_length` decimal(16,4) DEFAULT '0.0000' COMMENT '外包装尺寸-长(mm)', `package_width` decimal(16,4) DEFAULT '0.0000' COMMENT '外包装尺寸-宽(mm)', `package_height` decimal(16,4) DEFAULT '0.0000' COMMENT '外包装尺寸-高(mm)', @@ -67,4 +106,35 @@ insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame values('产品删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'gss:product:remove', '#', 'admin', sysdate(), '', null, ''); insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('产品导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'gss:product:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file +values('产品导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'gss:product:export', '#', 'admin', sysdate(), '', null, ''); + + +----------------------------------------------------------------- +-- 全产品表mock数据 +-- 插入模拟数据 +INSERT INTO `dhc_product_info` (`product_name`, `product_code`, `category_large`, `category_middle`, `category_small`, + `product_status`, `brand_name`, `brand_code`, `sales_type`, `description`, `version_no`, `version_status`, + `change_desc`, `origin_place`, `gross_weight`, `net_weight`, `package_length`, `package_width`, `package_height`, + `ir_datetime`, `dr_datetime`, `production_version`, `sales_model`, `ext_properties`, `create_by`, `create_time`) +VALUES + ('98英寸会议平板', 'CD001', 'D01', 'E01', 'F01', '1', '东华商显', 'DHC', '0', '98英寸4K超高清智能会议平板', '1.0.0', '0', '初始版本', '中国浙江', 98.5000, 85.2000, 2350.0000, 1400.0000, 160.0000, '2023-01-15 10:00:00', '2023-01-20 14:00:00', 'V1.0', 'IFP98-2023', '{"resolution": "3840x2160", "brightness": "500nits", "contrast": "1200:1"}', 'admin', NOW()), + + ('86英寸教育平板', 'CD002', 'D01', 'E01', 'F02', '1', '东华商显', 'DHC', '0', '86英寸教育交互式智能平板', '2.1.0', '0', '教育版本升级', '中国浙江', 78.6000, 65.3000, 2000.0000, 1220.0000, 150.0000, '2023-02-01 09:00:00', '2023-02-10 16:00:00', 'V2.1', 'IFP86-EDU', '{"resolution": "3840x2160", "touch_points": "40点", "speaker": "2x15W"}', 'admin', NOW()), + + ('75英寸商用显示器', 'CD003', 'D01', 'E02', 'F03', '1', '东华商显', 'DHC', '2', '75英寸商用广告机', '1.5.0', '0', '性能优化版本', '中国浙江', 45.8000, 38.2000, 1800.0000, 1100.0000, 120.0000, '2023-03-01 11:00:00', '2023-03-10 15:00:00', 'V1.5', 'DS75-PRO', '{"brightness": "700nits", "operation_time": "24/7", "orientation": "横竖双向"}', 'admin', NOW()), + + ('65英寸壁挂广告机', 'CD004', 'D01', 'E02', 'F04', '1', '东华商显', 'DHC', '1', '65英寸壁挂式数字标牌显示器', '1.0.1', '0', '初始版本', '中国浙江', 35.6000, 28.9000, 1600.0000, 950.0000, 100.0000, '2023-04-01 08:00:00', '2023-04-10 17:00:00', 'V1.0', 'DS65-WALL', '{"resolution": "3840x2160", "viewing_angle": "178°", "response_time": "8ms"}', 'admin', NOW()), + + ('55英寸户外广告机', 'CD005', 'D01', 'E03', 'F05', '1', '东华商显', 'DHC', '0', '55英寸高亮户外广告显示器', '2.0.0', '0', '户外防护升级', '中国浙江', 68.5000, 55.2000, 1400.0000, 850.0000, 200.0000, '2023-05-01 10:30:00', '2023-05-15 14:30:00', 'V2.0', 'DS55-OUT', '{"brightness": "2500nits", "protection": "IP65", "cooling": "智能温控"}', 'admin', NOW()), + + ('49英寸拼接屏', 'CD006', 'D01', 'E04', 'F06', '1', '东华商显', 'DHC', '2', '49英寸液晶拼接显示单元', '1.2.0', '0', '拼接优化版本', '中国浙江', 25.8000, 20.5000, 1200.0000, 700.0000, 95.0000, '2023-06-01 09:15:00', '2023-06-10 16:45:00', 'V1.2', 'DV49-SPLICE', '{"bezel": "1.8mm", "splice_control": "智能拼接", "calibration": "自动校色"}', 'admin', NOW()), + + ('43英寸条形屏', 'CD007', 'D01', 'E05', 'F07', '1', '东华商显', 'DHC', '0', '43英寸超宽条形商业显示器', '3.0.0', '0', '全新升级版本', '中国浙江', 18.5000, 15.2000, 1150.0000, 350.0000, 85.0000, '2023-07-01 11:20:00', '2023-07-12 15:20:00', 'V3.0', 'DB43-BAR', '{"aspect_ratio": "16:4.5", "application": "货架标签", "wireless": "WiFi6"}', 'admin', NOW()), + + ('32英寸桌面显示器', 'CD008', 'D01', 'E06', 'F08', '1', '东华商显', 'DHC', '1', '32英寸触控一体机', '1.1.0', '0', '触控升级版本', '中国浙江', 12.5000, 9.8000, 800.0000, 500.0000, 60.0000, '2023-08-01 10:40:00', '2023-08-11 14:40:00', 'V1.1', 'DT32-TOUCH', '{"touch_type": "电容触控", "stand": "可调底座", "interface": "Type-C"}', 'admin', NOW()), + + ('27英寸收银显示器', 'CD009', 'D01', 'E06', 'F09', '1', '东华商显', 'DHC', '0', '27英寸商用收银显示器', '2.2.0', '0', '功能增强版本', '中国浙江', 8.5000, 6.8000, 650.0000, 450.0000, 50.0000, '2023-09-01 09:50:00', '2023-09-13 16:50:00', 'V2.2', 'DT27-POS', '{"screen_type": "IPS", "vesa": "100x100", "power": "外置电源"}', 'admin', NOW()), + + ('15.6英寸台式显示器', 'CD010', 'D01', 'E07', 'F10', '1', '东华商显', 'DHC', '2', '15.6英寸触控显示器', '1.3.0', '0', '便携版本升级', '中国浙江', 3.5000, 2.8000, 400.0000, 250.0000, 30.0000, '2023-10-01 08:30:00', '2023-10-14 15:30:00', 'V1.3', 'DT15-PORT', '{"panel": "IPS", "touch": "十点触控", "portable": "便携支架"}', 'admin', NOW()), + + ('98英寸LED显示屏', 'CD011', 'D01', 'E08', 'F11', '1', '东华商显', 'DHC', '0', '98英寸LED商用大屏', '1.0.0', '0', '初始版本', '中国浙江', 125.0000, 102.0000, 2400.0000, 1450.0000, 180.0000, '2023-11-01 09:00:00', '2023-11-15 15:00:00', 'V1.0', 'LED98-PRO', '{"pixel_pitch": "1.25mm", "refresh": "3840Hz", "control": "智能控制"}', 'admin', NOW()); \ No newline at end of file