# springboot **Repository Path**: xue-chenjian/springboot ## Basic Information - **Project Name**: springboot - **Description**: 这是后端的仓库 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-10 - **Last Updated**: 2024-10-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ### 要求 使用SpringBoot、MyBatis、MySQL、Vue3、Axios、ElementPlus等技术栈实现对物料信息、供应商信息、采购订单的curd。 ### 环境要求 - 开发工具:IntelliJ IDEA - Java版本:JDK17 - 数据库版本:MySQL8 - NodeJS版本:18+ ### 数据库脚本 #### **商品表(测试用)** ```sql CREATE TABLE `sys_goods` ( `id` bigint NOT NULL, `goods_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `goods_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `category_one` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `category_two` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL, `bar_code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, `spec` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, `unit` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL, `delete_flag` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', `created_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `created_by` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建人', `last_modified_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后修改时间', `last_modified_by` bigint unsigned NOT NULL DEFAULT '0' COMMENT '最后修改人', `object_version_number` bigint unsigned NOT NULL DEFAULT '1' COMMENT '对象版本号', PRIMARY KEY (`id`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='商品表'; INSERT INTO `sys_goods` VALUES (1, '06031', '巴西兰', '11', '1101', '06031', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (2, '00547', '白地瓜', '11', '1101', '00547', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (3, '004713', '白芦笋', '11', '1101', '004713', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (4, '00548', '白萝卜', '11', '1101', '00548', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (5, '02131', '白洋葱', '11', '1101', '02131', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (6, '004714', '本地毛芹', '11', '1101', '004714', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (7, '004715', '本地土白萝卜', '11', '1101', '004715', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (8, '04024', '彩玉米', '11', '1101', '04024', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (9, '006337', '春菜', '11', '1101', '006337', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (10, '00551', '春笋', '11', '1101', '00551', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (11, '00552', '大头菜', '11', '1101', '00552', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (12, '00559', '带泥胡萝卜', '11', '1101', '00559', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (13, '00553', '冬笋', '11', '1101', '00553', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (14, '00555', '红地瓜', '11', '1101', '00555', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (15, '02322', '红皮萝卜', '11', '1101', '02322', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (16, '00556', '胡萝卜', '11', '1101', '00556', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (17, '00683', '茭白', '11', '1101', '00683', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (18, '00687', '蕨菜', '11', '1101', '00687', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (19, '04076', '苦苣', '11', '1101', '04076', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (20, '02508', '雷笋', '11', '1101', '02508', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (21, '00557', '莲藕', '11', '1101', '00557', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); INSERT INTO `sys_goods` VALUES (22, '00676', '莲蓬', '11', '1101', '00676', NULL, 'KG', b'0', '2023-11-04 22:19:35', 0, '2023-11-04 22:19:35', 0, 1); ``` ### **物料信息表** ```sql create table srm_material_zmara ( id bigint not null comment '主键' primary key, matnr varchar(64) null comment '物料号', lvorm varchar(64) null comment '在客户级标记要删除的物料', ernam varchar(64) null comment '创建对象的人员名称', aenam varchar(64) null comment '对象更改人员的名称', vpsta varchar(64) null comment '维护全部物料状态', pstat varchar(64) null comment '维护状态', mtart varchar(64) null comment '物料类型', matkl varchar(64) null comment '物料组', spart varchar(64) null comment '产品组', pmata varchar(64) null comment '跨分销链定价参照物料', meins varchar(64) null comment '基本计量单位', groes varchar(64) null comment '大小/量纲', gewei varchar(64) null comment '重量单位', ean11 varchar(64) null comment '国际文件号(EAN/UPC)', mstae varchar(64) null comment '跨工厂物料状态', datab date null comment '开始生效日期', liqdt date null comment '删除日期', mstav varchar(64) null comment '跨分销链物料状态', mstde date null comment '从跨工厂物料状态有效起的日期', mstdv date null comment '从跨分销链物料状态有效起的日期', mtpos_mara varchar(64) null comment '普通项目类别组', attyp varchar(64) null comment '物料类别', satnr varchar(64) null comment '一般可配置物料', ersda date null comment '创建日期', laeda date null comment '上次更改的日期', brgew decimal(12, 3) null comment '毛重', ntgew decimal(12, 3) null comment '净重', wesch decimal(12, 3) null comment '数量: 待打印的 GR/GI 单数量', laeng decimal(12, 3) null comment '长度', breit decimal(12, 3) null comment '宽度', hoehe decimal(12, 3) null comment '高度', lifnr varchar(10) null comment '供应商或债权人的帐号', idnlf varchar(35) null comment '供应商使用的物料编号', maktx_zh varchar(64) null comment '物料描述(短文本)', maktx_en varchar(64) null comment '物料描述(短文本)', create_by varchar(64) null comment '创建者', create_time datetime null comment '创建时间', update_by varchar(64) null comment '更新者', update_time datetime null comment '更新时间', tenant_id bigint null comment '租户ID', batch_id varchar(64) null comment '批次ID', material_state varchar(10) null comment '物料状态(0:启用1:禁用)', packaging_id bigint null comment '包装规划id', length_unit varchar(20) null comment '长度单位' ) comment '常规物料数据'; create index idx_create_time on srm_material_zmara (tenant_id, create_time); create index idx_maktx_zh on srm_material_zmara (maktx_zh); create index idx_matnr on srm_material_zmara (tenant_id, matnr); ``` **物料分页效果图** ![物料分页效果图](img/material-page.png) **物料导入效果图** ![物料导入效果图](img/material-import.png) **物料新增效果图** ![物料新增效果图](img/material-add.png) ### **供应商信息表** ```sql create table srm_supplier_basic ( id bigint auto_increment comment 'id' primary key, erp_code varchar(255) null comment 'ERP编码', supplier_name varchar(64) null comment '供应商名称', english_name varchar(64) null comment '英文名称', country varchar(64) null comment '国家', province varchar(64) null comment '省', city varchar(64) null comment '城市', street_sign varchar(64) null comment '街道门牌', language varchar(64) null comment '语言', phone varchar(64) null comment '电话', fax varchar(64) null comment '传真', email varchar(64) null comment '电邮', postcode varchar(64) null comment '邮编', website varchar(255) null comment '网址', account_group varchar(64) null comment '账号组', header_description varchar(255) null comment '抬头描述', vat_registration_number varchar(255) null comment '增值税登记号', create_by varchar(64) not null comment '创建人', create_time datetime null comment '创建时间', update_by varchar(64) null comment '修改人', update_time datetime null comment '修改时间', tenant_id bigint null comment '租户ID', ref_tenant_id bigint null comment '关联租户id', credit_code varchar(64) null comment '统一信用证代码', tenant_state varchar(64) null comment '租户关联状态 : 0 未关联 1 邀约 2 已关联 3 已拒绝', data_source varchar(1) null comment '数据来源(0:邀请注册 1:ERP 2.手工添加)' ) comment '供应商主数据-供应商基本信息'; ``` **供应商分页效果图** ![供应商分页效果图](img/supplier-page.png) **供应商新增/修改效果图** ![供应商新增/修改效果图](img/supplier-add.png) **供应商详情效果图** ![供应商详情效果图](img/supplier-detail.png) ### **采购订单表** ```sql create table srm_purchase_order ( id bigint unsigned not null primary key, order_type varchar(10) null comment '订单类型', purchase_group varchar(10) null comment '采购组编码', company_code varchar(10) null comment '公司', company_name varchar(100) null comment '公司名称', supplier_code varchar(10) null comment '供应商', supplier_name varchar(100) null comment '供应商名称', order_code varchar(20) null comment '订单号', order_currency varchar(10) null comment '币别', head_text varchar(1000) null comment '抬头文本', order_date date null comment '订单日期', order_year varchar(10) not null comment '订单会计年度', purchase_org varchar(10) null comment '采购组织编码', create_by varchar(64) not null comment '创建人', update_by varchar(64) null comment '修改人', create_time datetime null comment '创建时间', update_time datetime null comment '更新时间', tenant_id bigint null comment '租户ID', delete_flag varchar(20) null comment '删除标记', order_creater varchar(20) null comment '订单创建人', pay_type varchar(10) null comment '付款条件', change_type varchar(10) null comment '修改类型(U表示更新,I表示插入,E表示删除单个字段,D表示删除整行或整个单据)', inter_trade_code varchar(10) null comment '国际贸易条款', state varchar(2) null comment '1.全部确认;2.部分确认;3.已拒绝;4.待确认;5.草稿', ref_tenant_id bigint null comment '关联租户id', so_sync_status varchar(255) null comment '对应的销售订单同步状态描述', platform_order_type varchar(64) null comment '平台订单类型', publish_asn varchar(2) null comment '供应商发布ASN(0不发布,1发布)', need_confirm varchar(2) null comment '是否需要确认 0否 1是', total_price_with_tax decimal(18, 6) null comment '订单总价(含税)', total_price_without_tax decimal(18, 6) null comment '订单总价(不含税)', source varchar(16) null comment '订单来源', confirm_time datetime null comment '确认时间', batch_id varchar(64) null comment '附件id', purchase_group_desc varchar(20) null comment '采购组描述', purchase_org_desc varchar(20) null comment '采购组织描述', order_type_desc varchar(100) null comment '采购订单类型描述', is_return varchar(10) null comment '退货标识' ) comment '采购订单'; create index idx_tenant_id_order_code on srm_purchase_order (tenant_id, order_code); create index idx_tenant_id_order_date on srm_purchase_order (tenant_id, order_date); ``` #### **采购订单明细表** ```sql create table srm_purchase_order_item ( id bigint unsigned not null comment '主键ID' primary key, item_no varchar(10) null comment '行项目', item_type varchar(10) null comment '行项目类型', item_state varchar(10) null comment '行状态(0.待确认1.已确认2.已拒绝)', material_code varchar(20) null comment '物料编码', material_desc varchar(100) null comment '物料描述', unit varchar(10) null comment '单位', factory varchar(10) null comment '工厂', stock_location varchar(40) null comment '库存地点', tax_code varchar(10) null comment '税码', tax_included_or_not varchar(10) null comment '含税否(0.否 1.是)', tax_rate decimal(18, 6) null comment '税率', number decimal(18, 2) null comment '采购方要求的数量', total decimal(18, 6) null comment '总价', price decimal(18, 6) null comment '采购方要求的单价(不含税)', total_no_tax decimal(18, 6) null comment '不含税价', tax_amount decimal(18, 6) null comment '税额', item_text varchar(1000) null comment '行项目文本', is_take varchar(10) null comment '收货完成', is_free varchar(10) null comment '免费项目', is_check varchar(10) null comment '基于收货发票校验', create_by varchar(64) not null comment '创建人', update_by varchar(64) null comment '修改人', create_time datetime null comment '创建时间', update_time datetime null comment '更新时间', order_code varchar(20) null comment '订单号', order_year varchar(10) not null comment '订单会计年度', tenant_id bigint null comment '租户ID', delete_flag varchar(2) null comment '删除标识', material_spec varchar(64) null comment '物料规格', material_org varchar(10) null comment '物料组', material_org_desc varchar(100) null comment '物料组描述', deliver_date date null comment '采购方要求的交货日期', stock_type varchar(50) null comment '库存类型', is_return varchar(10) null comment '退货标识', return_created tinyint null comment '是否已创建退货单', plan_item varchar(64) not null comment '计划行号', received_quantity decimal(64) null comment '收货数量', transit_quantity decimal(64) null comment '在途数量', shipped_quantity decimal(64) null comment '发货数量', ask_quantity decimal(64) null comment '已叫料数量', last_send_date date null comment '最后送货日期', contract_code varchar(64) null comment '合同编号', contract_name varchar(64) null comment '合同名称', ask_transit_quantity decimal(18, 2) null comment '叫料在途数量', ask_received_quantity decimal(18, 2) null comment '叫料实收数量', made_period varchar(10) null comment '订单执行周期', return_quantity decimal(64) null comment '退货数量', ref_tenant_id bigint null comment '关联租户id', change_state varchar(10) default '0' null comment '变更状态( 0.未变更 1.已变更)', batch_id varchar(64) null comment '图纸批次id', confirm_time datetime null comment '确认时间', unloading_point varchar(10) null comment '卸货点', confirmed_quantity decimal(18, 2) null comment '供应商确认的数量', confirmed_delivery_date date null comment '供应商确认的交货日期', confirmed_price_without_tax decimal(18, 6) null comment '供应商确认的单价(不含税)', confirmed_price_with_tax decimal(18, 6) null comment '供应商确认的单价(含税)', requested_price_with_tax decimal(18, 6) null comment '采购方要求的单价(含税)', factory_desc varchar(20) null comment '工厂描述', unloading_point_desc varchar(20) null comment '卸货点描述' ) comment '采购订单明细'; create index idx_tenant_code_plan on srm_purchase_order_item (tenant_id, order_code, item_no, plan_item, delete_flag, is_return); ``` **采购订单分页效果图** ![采购订单分页效果图](img/order-page.png) **采购订单新增效果图** ![采购订单新增效果图](img/order-add.png) ![采购订单新增效果图-明细1](img/order-add-item1.png) ![采购订单新增效果图-明细2](img/order-add-item2.png) **采购订单详情效果图** ![采购订单详情效果图](img/order-detail.png) ### 后端 将项目导入IDEA后,新建名为`springboot`的数据库,并在`application-dev.yml`中修改数据库的账号密码等相关配置,运行`Application.java`后访问`http://localhost:9099/admin/goods`,如能看到有json数据返回,则表示后端项目成功安装。 ### 前端 前端工程下载和安装说明:https://github.jzfai.top/vue3-admin-cn-doc/guide ### 效果截图