diff --git a/doc/AICode.cmd b/doc/AICode.cmd index 79c8f29..edb0609 100644 --- a/doc/AICode.cmd +++ b/doc/AICode.cmd @@ -33,12 +33,12 @@ MySQL数据库要求如下: 请将前端有现的静态菜单 增加到菜单表格 ,然后修改前端为动态菜单方式,读取数据库的菜单配置信息,并显示 99. 请将项目前端和后端 打包生成一个运行jar包 - +//////////////////////////////////////////////// 建表语句结构和数据: 区域信息表:jhi_region 包括以下字段:详细地圵,联系人,联系电话,邮箱,联系地址,备注 这个表将包含区域编号(使用短UUID格式)、父区域编号、区域名称等基本信息字段,通过parent_number字段建立父子关系,实现区域的层级管理 每个数据表都要包括有以下字段: id, company(与jhi_company.number对应所属公司), created_by, created_date, updated_by, updated_date, version(乐观锁,默认值为0)。 -请先用liquibase创建表结构和csv例数据 +请用liquibase创建表结构和csv例子数据 后端代码: 需要编写jhi_region表的后端API基本接口功能,不需要DTO类,请参考menu相详模块的代码方式来写。 @@ -49,7 +49,26 @@ MySQL数据库要求如下: 4. 查询区域信息 GET /api/regions/{id} 5. 查询区域列表 GET /api/regions 需要有分页功能,并返回总数量。 6. 查询区域树状结构 GET /api/regions/tree - 7. 查询区域树状结构 GET /api/regions/tree/{id} +前端代码: + 在entity-menu下增子菜单 /master/region 地区管理 还需要增加相应的维护UI界面(包括层级管理),请编写生成相应的前端文件,风格保持一致 + 由于前端 是用Vue3 要增加 compatConfig: { MODE: 3 }, +//////////////////////////////////////////////////// +部门信息表:jhi_depart表包括以下字段: +部门编号number(使用短UUID格式)、父部门编号parent_number、部门名称, 属性, 备注, 排序 等字段,通过parent_number字段建立父子关系,实现部门的层级管理 +每个数据表都要包括有以下字段: id, company(与jhi_company.number对应所属公司), created_by, created_date, updated_by, updated_date, version(乐观锁,默认值为0)。 +请用liquibase创建表结构和csv例子数据 + + 需要编写部门管理(jhi_depart表)的功能的后端API基本接口功能,不需要DTO类, + 数据表都要包括有以下字段: id, company(与jhi_company.number对应所属公司), created_by, created_date, updated_by, updated_date, version(乐观锁,默认值为0), + 有层次关系(number, parent_number), 还需要region字段(与jhi_region.number对应所属区域), + 请按照 region模块的代码风格方式来写。 + 后端API基本接口功能: + 1. 新增部门信息 POST /api/departs + 2. 修改部门信息 PUT /api/departs/{id} + 3. 删除部门信息 DELETE /api/departs/{id} + 4. 查询部门信息 GET /api/departs/{id} + 5. 查询部门列表 GET /api/departs 需要有分页功能,并返回总数量。 + 6. 查询部门树状结构 GET /api/departs/tree docker: compose: @@ -81,4 +100,4 @@ https://gitea.vxnet.cn/admingit/jewpms.git 请修正此问题 已设置 updatable = false -但那两个字段在 UPDATE 数据时, 仍然被更新,如何修正 \ No newline at end of file +请执行 将已改好的代码 提交并推送, 说明内容需要加双引号. \ No newline at end of file diff --git a/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml b/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml index cea87cb..2d73fa8 100644 --- a/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml +++ b/src/main/resources/config/liquibase/changelog/00000000000000_initial_schema.xml @@ -11,7 +11,7 @@ The initial schema has the '00000000000001' id, so that it is over-written if we re-generate it. --> - + @@ -65,13 +65,13 @@ - + - + diff --git a/src/main/resources/config/liquibase/changelog/20240325000001_added_entity_Menu.xml b/src/main/resources/config/liquibase/changelog/20240325000001_added_entity_Menu.xml index 051dd44..e064627 100644 --- a/src/main/resources/config/liquibase/changelog/20240325000001_added_entity_Menu.xml +++ b/src/main/resources/config/liquibase/changelog/20240325000001_added_entity_Menu.xml @@ -7,7 +7,7 @@ http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> - + diff --git a/src/main/resources/config/liquibase/changelog/20240325000002_added_entity_Company.xml b/src/main/resources/config/liquibase/changelog/20240325000002_added_entity_Company.xml index 48d164b..6ba6801 100644 --- a/src/main/resources/config/liquibase/changelog/20240325000002_added_entity_Company.xml +++ b/src/main/resources/config/liquibase/changelog/20240325000002_added_entity_Company.xml @@ -7,7 +7,7 @@ http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd"> - + diff --git a/src/main/resources/config/liquibase/changelog/20240325000003_added_entity_Depart.xml b/src/main/resources/config/liquibase/changelog/20240325000003_added_entity_Depart.xml new file mode 100644 index 0000000..60b43d9 --- /dev/null +++ b/src/main/resources/config/liquibase/changelog/20240325000003_added_entity_Depart.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/config/liquibase/data/depart.csv b/src/main/resources/config/liquibase/data/depart.csv new file mode 100644 index 0000000..0596841 --- /dev/null +++ b/src/main/resources/config/liquibase/data/depart.csv @@ -0,0 +1,7 @@ +id;number;parent_number;name;property;remark;sort_no;company;region;created_by;created_date;updated_by;updated_date;version +1;d001;;总部;总部;总部;1;c001;r001;system;2024-03-25 00:00:00;system;2024-03-25 00:00:00;0 +2;d002;d001;人事部;职能部门;人力资源管理;2;c001;r001;system;2024-03-25 00:00:00;system;2024-03-25 00:00:00;0 +3;d003;d001;财务部;职能部门;财务管理;3;c001;r001;system;2024-03-25 00:00:00;system;2024-03-25 00:00:00;0 +4;d004;d001;技术部;业务部门;技术研发;4;c001;r001;system;2024-03-25 00:00:00;system;2024-03-25 00:00:00;0 +5;d005;d004;开发组;技术团队;软件开发;5;c001;r001;system;2024-03-25 00:00:00;system;2024-03-25 00:00:00;0 +6;d006;d004;测试组;技术团队;质量保证;6;c001;r001;system;2024-03-25 00:00:00;system;2024-03-25 00:00:00;0 \ No newline at end of file diff --git a/src/main/resources/config/liquibase/master.xml b/src/main/resources/config/liquibase/master.xml index 7001fb4..b3cb5d9 100644 --- a/src/main/resources/config/liquibase/master.xml +++ b/src/main/resources/config/liquibase/master.xml @@ -15,6 +15,7 @@ + diff --git a/src/main/webapp/i18n/zh-cn/global.json b/src/main/webapp/i18n/zh-cn/global.json index db5d581..cd77f7b 100644 --- a/src/main/webapp/i18n/zh-cn/global.json +++ b/src/main/webapp/i18n/zh-cn/global.json @@ -8,6 +8,7 @@ "entities": { "main": "数据", "company": "公司管理", + "region": "地区管理", "jhipster-needle-menu-add-entry": "JHipster will add additional entities here (do not translate!)" }, "account": {