From 96da22b7500535ca325bb54869eabdd5405edbc9 Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 6 Aug 2024 15:12:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=86=E7=BB=84?= =?UTF-8?q?=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/upfilegroup/UpfileGroup.api.ts | 75 +++++ .../src/views/upfilegroup/UpfileGroup.data.ts | 58 ++++ .../src/views/upfilegroup/UpfileGroupList.vue | 259 ++++++++++++++++++ .../upfilegroup/UpfileGroup_menu_insert.sql | 26 ++ .../components/UpfileGroupForm.vue | 179 ++++++++++++ .../components/UpfileGroupModal.vue | 79 ++++++ .../UpfileGroupAssociation.api.ts | 72 +++++ .../UpfileGroupAssociation.data.ts | 42 +++ .../UpfileGroupAssociationList.vue | 219 +++++++++++++++ .../UpfileGroupAssociation_menu_insert.sql | 26 ++ .../components/ChaoseTopicPersion.api.ts | 82 ++++++ .../components/ChaoseTopicPersion.data.ts | 55 ++++ .../components/ChaoseTopicPersionList.vue | 250 +++++++++++++++++ .../components/UpfileGroupAssociationForm.vue | 133 +++++++++ .../UpfileGroupAssociationModal.vue | 74 +++++ 15 files changed, 1629 insertions(+) create mode 100644 jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.api.ts create mode 100644 jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.data.ts create mode 100644 jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroupList.vue create mode 100644 jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup_menu_insert.sql create mode 100644 jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupForm.vue create mode 100644 jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupModal.vue create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.api.ts create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.data.ts create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociationList.vue create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation_menu_insert.sql create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.api.ts create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.data.ts create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersionList.vue create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationForm.vue create mode 100644 jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationModal.vue diff --git a/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.api.ts b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.api.ts new file mode 100644 index 00000000..dc2d8906 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.api.ts @@ -0,0 +1,75 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/upfilegroup/upfileGroup/list', + save='/upfilegroup/upfileGroup/add', + edit='/upfilegroup/upfileGroup/edit', + deleteOne = '/upfilegroup/upfileGroup/delete', + deleteBatch = '/upfilegroup/upfileGroup/deleteBatch', + importExcel = '/upfilegroup/upfileGroup/importExcel', + exportXls = '/upfilegroup/upfileGroup/exportXls', + queryCompId = '/annualcompgroup/annualCompGroup/queryCompId', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} + +export const queryCompId = (params) => defHttp.get({ url: Api.queryCompId, params }, { successMessageMode: 'none' }); diff --git a/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.data.ts b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.data.ts new file mode 100644 index 00000000..c8c3bec5 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup.data.ts @@ -0,0 +1,58 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '年度', + align: "center", + dataIndex: 'annid_dictText' + }, + { + title: '年度比赛', + align: "center", + dataIndex: 'annalComp_dictText' + }, + { + title: '年度比赛项目', + align: "center", + dataIndex: 'annComP_dictText' + }, + { + title: '作品组名称', + align: "center", + dataIndex: 'name' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "作品组名称", + field: 'name', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '作品组名称', + field: 'name', + component: 'Input', + dynamicRules: ({model,schema}) => { + return [ + { required: true, message: '请输入作品组名称!'}, + ]; + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroupList.vue b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroupList.vue new file mode 100644 index 00000000..50e930ce --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroupList.vue @@ -0,0 +1,259 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup_menu_insert.sql b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup_menu_insert.sql new file mode 100644 index 00000000..a55c913d --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroup/UpfileGroup_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/upfilegroup文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2024080609451870470', NULL, '作品组', '/upfilegroup/upfileGroupList', 'upfilegroup/UpfileGroupList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080609451870471', '2024080609451870470', '添加作品组', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroup:upfile_group:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080609451870472', '2024080609451870470', '编辑作品组', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroup:upfile_group:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080609451870473', '2024080609451870470', '删除作品组', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroup:upfile_group:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080609451870474', '2024080609451870470', '批量删除作品组', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroup:upfile_group:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080609451870475', '2024080609451870470', '导出excel_作品组', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroup:upfile_group:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080609451870476', '2024080609451870470', '导入excel_作品组', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroup:upfile_group:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 09:45:47', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupForm.vue b/jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupForm.vue new file mode 100644 index 00000000..0de09aee --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupForm.vue @@ -0,0 +1,179 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupModal.vue b/jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupModal.vue new file mode 100644 index 00000000..467e519e --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroup/components/UpfileGroupModal.vue @@ -0,0 +1,79 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.api.ts b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.api.ts new file mode 100644 index 00000000..b824c0bc --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/upfilegroupassociation/upfileGroupAssociation/list', + save='/upfilegroupassociation/upfileGroupAssociation/add', + edit='/upfilegroupassociation/upfileGroupAssociation/edit', + deleteOne = '/upfilegroupassociation/upfileGroupAssociation/delete', + deleteBatch = '/upfilegroupassociation/upfileGroupAssociation/deleteBatch', + importExcel = '/upfilegroupassociation/upfileGroupAssociation/importExcel', + exportXls = '/upfilegroupassociation/upfileGroupAssociation/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} + +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.post({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.data.ts b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.data.ts new file mode 100644 index 00000000..ee38c6b9 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation.data.ts @@ -0,0 +1,42 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +import { rules} from '/@/utils/helper/validator'; +import { render } from '/@/utils/common/renderUtils'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '作品组', + align: "center", + dataIndex: 'upfileGroupId_dictText' + }, + { + title: '作品', + align: "center", + dataIndex: 'upfileId_dictText' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '作品组', + field: 'upfileGroupId', + component: 'Input', + }, + { + label: '作品', + field: 'upfileId', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociationList.vue b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociationList.vue new file mode 100644 index 00000000..3ee7a1c4 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociationList.vue @@ -0,0 +1,219 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation_menu_insert.sql b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation_menu_insert.sql new file mode 100644 index 00000000..9a08450b --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/UpfileGroupAssociation_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/upfilegroupassociation文件夹下 +-- 如果你想更改到其他目录,请修改sql中component字段对应的值 + + +INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external) +VALUES ('2024080610428870180', NULL, '作品组与作品关联表', '/upfilegroupassociation/upfileGroupAssociationList', 'upfilegroupassociation/UpfileGroupAssociationList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0); + +-- 权限控制sql +-- 新增 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080610428870181', '2024080610428870180', '添加作品组与作品关联表', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroupassociation:upfile_group_association:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0, 0, '1', 0); +-- 编辑 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080610428870182', '2024080610428870180', '编辑作品组与作品关联表', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroupassociation:upfile_group_association:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0, 0, '1', 0); +-- 删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080610428880183', '2024080610428870180', '删除作品组与作品关联表', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroupassociation:upfile_group_association:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0, 0, '1', 0); +-- 批量删除 +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080610428880184', '2024080610428870180', '批量删除作品组与作品关联表', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroupassociation:upfile_group_association:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0, 0, '1', 0); +-- 导出excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080610428880185', '2024080610428870180', '导出excel_作品组与作品关联表', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroupassociation:upfile_group_association:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0, 0, '1', 0); +-- 导入excel +INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external) +VALUES ('2024080610428880186', '2024080610428870180', '导入excel_作品组与作品关联表', NULL, NULL, 0, NULL, NULL, 2, 'upfilegroupassociation:upfile_group_association:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2024-08-06 10:42:18', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.api.ts b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.api.ts new file mode 100644 index 00000000..005de6e4 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.api.ts @@ -0,0 +1,82 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/chooseTopicPersion/chaoseTopicPersion/zpzbdzp', + watch = '/chooseTopicPersion/chaoseTopicPersion/watch', + list4 = '/topic/topic/list4', + save='/chooseTopicPersion/chaoseTopicPersion/zpzbdzpadd', + edit='/chooseTopicPersion/chaoseTopicPersion/edit', + edit1='/chooseTopicPersion/chaoseTopicPersion/edit1', + deleteOne = '/chooseTopicPersion/chaoseTopicPersion/delete', + deleteBatch = '/chooseTopicPersion/chaoseTopicPersion/deleteBatch', + importExcel = '/chooseTopicPersion/chaoseTopicPersion/importExcel', + exportXls = '/chooseTopicPersion/chaoseTopicPersion/exportXls', +} + +/** + * 导出api + * @param params + */ +export const getExportUrl = Api.exportXls; + +/** + * 导入api + */ +export const getImportUrl = Api.importExcel; + +/** + * 列表接口 + * @param params + */ +export const list = (params) => defHttp.get({ url: Api.list, params }); +export const list4 = (params) => defHttp.get({ url: Api.list4, params }); +export const watch = (params) => defHttp.get({ url: Api.watch, params }); + +/** + * 删除单个 + * @param params + * @param handleSuccess + */ +export const deleteOne = (params,handleSuccess) => { + return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); +} + +/** + * 批量删除 + * @param params + * @param handleSuccess + */ +export const batchDelete = (params, handleSuccess) => { + createConfirm({ + iconType: 'warning', + title: '确认删除', + content: '是否删除选中数据', + okText: '确认', + cancelText: '取消', + onOk: () => { + return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { + handleSuccess(); + }); + } + }); +} +export const update = (params) => { + return defHttp.post({ url: Api.edit1, params }); +} +export const update1 = (params) => { + return defHttp.post({ url: Api.edit1, params }, { isTransformResponse: false }); +} +/** + * 保存或者更新 + * @param params + * @param isUpdate + */ +export const saveOrUpdate = (params, isUpdate) => { + let url = isUpdate ? Api.edit : Api.save; + return defHttp.get({ url: url, params }, { isTransformResponse: false }); +} diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.data.ts b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.data.ts new file mode 100644 index 00000000..68f54697 --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersion.data.ts @@ -0,0 +1,55 @@ +import {BasicColumn} from '/@/components/Table'; +import {FormSchema} from '/@/components/Table'; +//列表数据 +export const columns: BasicColumn[] = [ + { + title: '作品名称', + align: "center", + dataIndex: 'topicName' + }, + { + title: '报名编号', + align: "center", + dataIndex: 'applyCode' + } +/* { + title: '状态', + align: "center", + dataIndex: "待评分" + }*/ +]; +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '报名编号', + field: 'bmcode', + component: 'Input', + }, + { + label: '题目', + field: 'timul', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "topic,name,id" + }, + }, + { + label: '状态', + field: 'status', + component: 'JDictSelectTag', + componentProps:{ + dictCode: "choose_topic_persion_status" + }, + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersionList.vue b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersionList.vue new file mode 100644 index 00000000..9cb154cd --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/ChaoseTopicPersionList.vue @@ -0,0 +1,250 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationForm.vue b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationForm.vue new file mode 100644 index 00000000..bfdaa48e --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationForm.vue @@ -0,0 +1,133 @@ + + + + + diff --git a/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationModal.vue b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationModal.vue new file mode 100644 index 00000000..47f3d7bc --- /dev/null +++ b/jeecgboot-vue3-master/src/views/upfilegroupassociation/components/UpfileGroupAssociationModal.vue @@ -0,0 +1,74 @@ + + + + + From 5596d57ce26ad43457de263f8d1873d1bac5abed Mon Sep 17 00:00:00 2001 From: Gitea Date: Tue, 6 Aug 2024 15:15:44 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BD=9C=E5=93=81=E5=88=86=E7=BB=84?= =?UTF-8?q?=E5=90=8E=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AnnualCompGroupController.java | 6 +- .../ChaoseTopicPersionController.java | 63 +++++ .../controller/UpfileGroupController.java | 219 ++++++++++++++++++ .../demo/upfilegroup/entity/UpfileGroup.java | 77 ++++++ .../upfilegroup/mapper/UpfileGroupMapper.java | 17 ++ .../mapper/xml/UpfileGroupMapper.xml | 5 + .../service/IUpfileGroupService.java | 14 ++ .../service/impl/UpfileGroupServiceImpl.java | 19 ++ .../UpfileGroupAssociationController.java | 173 ++++++++++++++ .../entity/UpfileGroupAssociation.java | 68 ++++++ .../mapper/UpfileGroupAssociationMapper.java | 17 ++ .../xml/UpfileGroupAssociationMapper.xml | 5 + .../IUpfileGroupAssociationService.java | 14 ++ .../UpfileGroupAssociationServiceImpl.java | 19 ++ 14 files changed, 713 insertions(+), 3 deletions(-) create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/controller/UpfileGroupController.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/entity/UpfileGroup.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/UpfileGroupMapper.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/xml/UpfileGroupMapper.xml create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/IUpfileGroupService.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/impl/UpfileGroupServiceImpl.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/controller/UpfileGroupAssociationController.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/entity/UpfileGroupAssociation.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/UpfileGroupAssociationMapper.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/xml/UpfileGroupAssociationMapper.xml create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/IUpfileGroupAssociationService.java create mode 100644 jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/impl/UpfileGroupAssociationServiceImpl.java diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java index 32f5160f..4f72232e 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/annualcompgroup/controller/AnnualCompGroupController.java @@ -98,14 +98,14 @@ public class AnnualCompGroupController extends JeecgController list = compService.list(queryWrappercomp); if(list.size()==0){ - return Result.error("未绑定比赛"); + return Result.OK(null); } List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); queryWrapperAnnual.in("compid",ids); List listAnnual = annualCompService.list(queryWrapperAnnual); if(listAnnual.size()==0){ - return Result.error("未创建年度比赛"); + return Result.OK(null); } List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(annualCompGroup, req.getParameterMap()); @@ -117,7 +117,7 @@ public class AnnualCompGroupController extends JeecgController listacp = annualCompPointService.list(queryWrapperacp); if(listacp.size()==0){ - return Result.error("未创建年度比赛项目"); + return Result.OK(null); } List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); queryWrapper.in(acpIds.size()!=0,"ann_comp_p",acpIds); diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java index e6277add..594a4420 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/chooseTopicPersion/controller/ChaoseTopicPersionController.java @@ -44,6 +44,10 @@ import org.jeecg.modules.demo.topic.entity.Topic; import org.jeecg.modules.demo.topic.service.ITopicService; import org.jeecg.modules.demo.upfile_persion.entity.UpfilePersion; import org.jeecg.modules.demo.upfile_persion.service.IUpfilePersionService; +import org.jeecg.modules.demo.upfilegroup.entity.UpfileGroup; +import org.jeecg.modules.demo.upfilegroup.service.IUpfileGroupService; +import org.jeecg.modules.demo.upfilegroupassociation.entity.UpfileGroupAssociation; +import org.jeecg.modules.demo.upfilegroupassociation.service.IUpfileGroupAssociationService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -92,6 +96,10 @@ public class ChaoseTopicPersionController extends JeecgController> zpzbdzp(UpfilePersion upfilePersion, + @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, + @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, + HttpServletRequest req,@RequestParam(name="zpzid",required=true) String zpzid) { + UpfileGroup upfileGroup = upfileGroupService.getById(zpzid); + QueryWrapper queryWrapperuga = new QueryWrapper<>(); + List listuga = upfileGroupAssociationService.list(queryWrapperuga); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("annual_id",upfileGroup.getAnnid()); + queryWrapper.eq("annual_comp_id",upfileGroup.getAnnalComp()); + queryWrapper.eq("annual_comp_point_id",upfileGroup.getAnnComP()); + String str = ""; + for(int i = 0 ; i page = new Page<>(pageNo, pageSize); + IPage pageList = upfilePersionService.page(page, queryWrapper); + return Result.OK(pageList); + } + /** * 添加 * @@ -298,6 +340,27 @@ public class ChaoseTopicPersionController extends JeecgController zpzbdzpadd(@RequestParam(name="ids",required=true) String ids,@RequestParam(name="zpzid",required=true) String zpzid,HttpServletRequest req) { + String strs[] = ids.split(","); + for (int i = 0 ; i < strs.length ; i++){ + UpfileGroupAssociation upfileGroupAssociation = new UpfileGroupAssociation(); + upfileGroupAssociation.setUpfileGroupId(zpzid); + upfileGroupAssociation.setUpfileId(strs[i]); + upfileGroupAssociationService.save(upfileGroupAssociation); + } + return Result.OK("绑定成功!"); + } + /** * 添加 * diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/controller/UpfileGroupController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/controller/UpfileGroupController.java new file mode 100644 index 00000000..b282d1d3 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/controller/UpfileGroupController.java @@ -0,0 +1,219 @@ +package org.jeecg.modules.demo.upfilegroup.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.shiro.SecurityUtils; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.system.vo.LoginUser; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint; +import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService; +import org.jeecg.modules.demo.annualcomp.entity.AnnualComp; +import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService; +import org.jeecg.modules.demo.annualcompgroup.entity.AnnualCompGroup; +import org.jeecg.modules.demo.comp.entity.Comp; +import org.jeecg.modules.demo.comp.service.ICompService; +import org.jeecg.modules.demo.upfilegroup.entity.UpfileGroup; +import org.jeecg.modules.demo.upfilegroup.service.IUpfileGroupService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 作品组 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +@Api(tags="作品组") +@RestController +@RequestMapping("/upfilegroup/upfileGroup") +@Slf4j +public class UpfileGroupController extends JeecgController { + @Autowired + private IUpfileGroupService upfileGroupService; + + @Autowired + private ICompService compService; + + @Autowired + private IAnnualCompService annualCompService; + + @Autowired + private IAnnualCompPointService annualCompPointService; + + /** + * 分页列表查询 + * + * @param upfileGroup + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "作品组-分页列表查询") + @ApiOperation(value="作品组-分页列表查询", notes="作品组-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(UpfileGroup upfileGroup, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(upfileGroup, req.getParameterMap()); + LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal(); + Comp comp = new Comp(); + QueryWrapper queryWrappercomp = QueryGenerator.initQueryWrapper(comp, req.getParameterMap()); + queryWrappercomp.eq("comp_admin",user.getUsername()); + List list = compService.list(queryWrappercomp); + if(list.size()==0){ + return Result.OK(null); + } + List ids = list.stream().map(Comp::getId).collect(Collectors.toList()); + QueryWrapper queryWrapperAnnual = new QueryWrapper<>(); + queryWrapperAnnual.in("compid",ids); + List listAnnual = annualCompService.list(queryWrapperAnnual); + if(listAnnual.size()==0){ + return Result.OK(null); + } + List annualIds = listAnnual.stream().map(AnnualComp::getId).collect(Collectors.toList()); + queryWrapper.in("annal_comp",annualIds); + + AnnualCompPoint annualCompPoint = new AnnualCompPoint(); + QueryWrapper queryWrapperacp = QueryGenerator.initQueryWrapper(annualCompPoint, req.getParameterMap()); + queryWrapperacp.in("annual_comp_id",annualIds); + queryWrapperacp.eq("annual_comp_switch","Y"); // 比赛必须是开启的 + List listacp = annualCompPointService.list(queryWrapperacp); + if(listacp.size()==0){ + return Result.OK(null); + } + List acpIds = listacp.stream().map(AnnualCompPoint::getId).collect(Collectors.toList()); + queryWrapper.in("ann_com_p",acpIds); + Page page = new Page(pageNo, pageSize); + IPage pageList = upfileGroupService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param upfileGroup + * @return + */ + @AutoLog(value = "作品组-添加") + @ApiOperation(value="作品组-添加", notes="作品组-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody UpfileGroup upfileGroup) { + upfileGroupService.save(upfileGroup); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param upfileGroup + * @return + */ + @AutoLog(value = "作品组-编辑") + @ApiOperation(value="作品组-编辑", notes="作品组-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody UpfileGroup upfileGroup) { + upfileGroupService.updateById(upfileGroup); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "作品组-通过id删除") + @ApiOperation(value="作品组-通过id删除", notes="作品组-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + upfileGroupService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "作品组-批量删除") + @ApiOperation(value="作品组-批量删除", notes="作品组-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.upfileGroupService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "作品组-通过id查询") + @ApiOperation(value="作品组-通过id查询", notes="作品组-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + UpfileGroup upfileGroup = upfileGroupService.getById(id); + if(upfileGroup==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(upfileGroup); + } + + /** + * 导出excel + * + * @param request + * @param upfileGroup + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, UpfileGroup upfileGroup) { + return super.exportXls(request, upfileGroup, UpfileGroup.class, "作品组"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, UpfileGroup.class); + } + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/entity/UpfileGroup.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/entity/UpfileGroup.java new file mode 100644 index 00000000..e20ee4df --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/entity/UpfileGroup.java @@ -0,0 +1,77 @@ +package org.jeecg.modules.demo.upfilegroup.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 作品组 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +@Data +@TableName("upfile_group") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="upfile_group对象", description="作品组") +public class UpfileGroup implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**年度*/ + @Excel(name = "年度", width = 15) + @Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id") + @ApiModelProperty(value = "年度") + private java.lang.String annid; + /**年度比赛*/ + @Excel(name = "年度比赛", width = 15) + @Dict(dictTable = "annual_comp", dicText = "name", dicCode = "id") + @ApiModelProperty(value = "年度比赛") + private java.lang.String annalComp; + /**年度比赛项目*/ + @Excel(name = "年度比赛项目", width = 15) + @Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id") + @ApiModelProperty(value = "年度比赛项目") + private java.lang.String annComP; + /**作品组名称*/ + @Excel(name = "作品组名称", width = 15) + @ApiModelProperty(value = "作品组名称") + private java.lang.String name; +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/UpfileGroupMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/UpfileGroupMapper.java new file mode 100644 index 00000000..510c1444 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/UpfileGroupMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.upfilegroup.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.upfilegroup.entity.UpfileGroup; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 作品组 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +public interface UpfileGroupMapper extends BaseMapper { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/xml/UpfileGroupMapper.xml b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/xml/UpfileGroupMapper.xml new file mode 100644 index 00000000..88f538d8 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/mapper/xml/UpfileGroupMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/IUpfileGroupService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/IUpfileGroupService.java new file mode 100644 index 00000000..4d47aa01 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/IUpfileGroupService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.upfilegroup.service; + +import org.jeecg.modules.demo.upfilegroup.entity.UpfileGroup; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 作品组 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +public interface IUpfileGroupService extends IService { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/impl/UpfileGroupServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/impl/UpfileGroupServiceImpl.java new file mode 100644 index 00000000..f1b575fb --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroup/service/impl/UpfileGroupServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.upfilegroup.service.impl; + +import org.jeecg.modules.demo.upfilegroup.entity.UpfileGroup; +import org.jeecg.modules.demo.upfilegroup.mapper.UpfileGroupMapper; +import org.jeecg.modules.demo.upfilegroup.service.IUpfileGroupService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 作品组 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +@Service +public class UpfileGroupServiceImpl extends ServiceImpl implements IUpfileGroupService { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/controller/UpfileGroupAssociationController.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/controller/UpfileGroupAssociationController.java new file mode 100644 index 00000000..ec03b246 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/controller/UpfileGroupAssociationController.java @@ -0,0 +1,173 @@ +package org.jeecg.modules.demo.upfilegroupassociation.controller; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.jeecg.common.api.vo.Result; +import org.jeecg.common.system.query.QueryGenerator; +import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.demo.upfilegroupassociation.entity.UpfileGroupAssociation; +import org.jeecg.modules.demo.upfilegroupassociation.service.IUpfileGroupAssociationService; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; + +import org.jeecgframework.poi.excel.ExcelImportUtil; +import org.jeecgframework.poi.excel.def.NormalExcelConstants; +import org.jeecgframework.poi.excel.entity.ExportParams; +import org.jeecgframework.poi.excel.entity.ImportParams; +import org.jeecgframework.poi.excel.view.JeecgEntityExcelView; +import org.jeecg.common.system.base.controller.JeecgController; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.multipart.MultipartHttpServletRequest; +import org.springframework.web.servlet.ModelAndView; +import com.alibaba.fastjson.JSON; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.jeecg.common.aspect.annotation.AutoLog; +import org.apache.shiro.authz.annotation.RequiresPermissions; + + /** + * @Description: 作品组与作品关联表 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +@Api(tags="作品组与作品关联表") +@RestController +@RequestMapping("/upfilegroupassociation/upfileGroupAssociation") +@Slf4j +public class UpfileGroupAssociationController extends JeecgController { + @Autowired + private IUpfileGroupAssociationService upfileGroupAssociationService; + + /** + * 分页列表查询 + * + * @param upfileGroupAssociation + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "作品组与作品关联表-分页列表查询") + @ApiOperation(value="作品组与作品关联表-分页列表查询", notes="作品组与作品关联表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(UpfileGroupAssociation upfileGroupAssociation, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req,@RequestParam(name="zpzid",required=true) String zpzid) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(upfileGroupAssociation, req.getParameterMap()); + queryWrapper.eq("upfile_group_id",zpzid); + Page page = new Page(pageNo, pageSize); + IPage pageList = upfileGroupAssociationService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param upfileGroupAssociation + * @return + */ + @AutoLog(value = "作品组与作品关联表-添加") + @ApiOperation(value="作品组与作品关联表-添加", notes="作品组与作品关联表-添加") + @PostMapping(value = "/add") + public Result add(@RequestBody UpfileGroupAssociation upfileGroupAssociation) { + upfileGroupAssociationService.save(upfileGroupAssociation); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param upfileGroupAssociation + * @return + */ + @AutoLog(value = "作品组与作品关联表-编辑") + @ApiOperation(value="作品组与作品关联表-编辑", notes="作品组与作品关联表-编辑") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody UpfileGroupAssociation upfileGroupAssociation) { + upfileGroupAssociationService.updateById(upfileGroupAssociation); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "作品组与作品关联表-通过id删除") + @ApiOperation(value="作品组与作品关联表-通过id删除", notes="作品组与作品关联表-通过id删除") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + upfileGroupAssociationService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "作品组与作品关联表-批量删除") + @ApiOperation(value="作品组与作品关联表-批量删除", notes="作品组与作品关联表-批量删除") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.upfileGroupAssociationService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "作品组与作品关联表-通过id查询") + @ApiOperation(value="作品组与作品关联表-通过id查询", notes="作品组与作品关联表-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + UpfileGroupAssociation upfileGroupAssociation = upfileGroupAssociationService.getById(id); + if(upfileGroupAssociation==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(upfileGroupAssociation); + } + + /** + * 导出excel + * + * @param request + * @param upfileGroupAssociation + */ + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, UpfileGroupAssociation upfileGroupAssociation) { + return super.exportXls(request, upfileGroupAssociation, UpfileGroupAssociation.class, "作品组与作品关联表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, UpfileGroupAssociation.class); + } + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/entity/UpfileGroupAssociation.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/entity/UpfileGroupAssociation.java new file mode 100644 index 00000000..7fafbf88 --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/entity/UpfileGroupAssociation.java @@ -0,0 +1,68 @@ +package org.jeecg.modules.demo.upfilegroupassociation.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.TableLogic; +import lombok.Data; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.springframework.format.annotation.DateTimeFormat; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.jeecg.common.aspect.annotation.Dict; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; + +/** + * @Description: 作品组与作品关联表 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +@Data +@TableName("upfile_group_association") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="upfile_group_association对象", description="作品组与作品关联表") +public class UpfileGroupAssociation implements Serializable { + private static final long serialVersionUID = 1L; + + /**主键*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "主键") + private java.lang.String id; + /**创建人*/ + @ApiModelProperty(value = "创建人") + private java.lang.String createBy; + /**创建日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "创建日期") + private java.util.Date createTime; + /**更新人*/ + @ApiModelProperty(value = "更新人") + private java.lang.String updateBy; + /**更新日期*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "更新日期") + private java.util.Date updateTime; + /**所属部门*/ + @ApiModelProperty(value = "所属部门") + private java.lang.String sysOrgCode; + /**作品组*/ + @Excel(name = "作品组", width = 15) + @Dict(dictTable = "upfile_group", dicText = "name", dicCode = "id") + @ApiModelProperty(value = "作品组") + private java.lang.String upfileGroupId; + /**作品*/ + @Excel(name = "作品", width = 15) + @Dict(dictTable = "upfile_persion", dicText = "topic_name", dicCode = "id") + @ApiModelProperty(value = "作品") + private java.lang.String upfileId; +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/UpfileGroupAssociationMapper.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/UpfileGroupAssociationMapper.java new file mode 100644 index 00000000..5a7b494f --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/UpfileGroupAssociationMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.demo.upfilegroupassociation.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.demo.upfilegroupassociation.entity.UpfileGroupAssociation; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 作品组与作品关联表 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +public interface UpfileGroupAssociationMapper extends BaseMapper { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/xml/UpfileGroupAssociationMapper.xml b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/xml/UpfileGroupAssociationMapper.xml new file mode 100644 index 00000000..d74e1bbb --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/mapper/xml/UpfileGroupAssociationMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/IUpfileGroupAssociationService.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/IUpfileGroupAssociationService.java new file mode 100644 index 00000000..ff94e52b --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/IUpfileGroupAssociationService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.demo.upfilegroupassociation.service; + +import org.jeecg.modules.demo.upfilegroupassociation.entity.UpfileGroupAssociation; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 作品组与作品关联表 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +public interface IUpfileGroupAssociationService extends IService { + +} diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/impl/UpfileGroupAssociationServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/impl/UpfileGroupAssociationServiceImpl.java new file mode 100644 index 00000000..3ebd569a --- /dev/null +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/upfilegroupassociation/service/impl/UpfileGroupAssociationServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.demo.upfilegroupassociation.service.impl; + +import org.jeecg.modules.demo.upfilegroupassociation.entity.UpfileGroupAssociation; +import org.jeecg.modules.demo.upfilegroupassociation.mapper.UpfileGroupAssociationMapper; +import org.jeecg.modules.demo.upfilegroupassociation.service.IUpfileGroupAssociationService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 作品组与作品关联表 + * @Author: jeecg-boot + * @Date: 2024-08-06 + * @Version: V1.0 + */ +@Service +public class UpfileGroupAssociationServiceImpl extends ServiceImpl implements IUpfileGroupAssociationService { + +} From 61e287daa5d69da87c9a2db05f24caeee25c7985 Mon Sep 17 00:00:00 2001 From: zhc077 <565291854@qq.com> Date: Tue, 6 Aug 2024 15:21:04 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=A0=A1=E7=BA=A7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=EF=BC=8C=E5=88=86=E6=9E=90=E6=8A=A5=E5=91=8A=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/demo/homepage/service/UserHomePageServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java index dec4d139..cb08c87c 100644 --- a/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java +++ b/jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/homepage/service/UserHomePageServiceImpl.java @@ -586,7 +586,7 @@ public class UserHomePageServiceImpl implements UserHomePageService { }); scoreList4Point.stream().sorted(Comparator.comparing(HomePageCompVo::getTotalScore)).collect(Collectors.toList()); resultMap.put("比赛学生积分况分析", scoreList4Point); - redisUtil.set(REPORT4SCHOOL, resultMap.toString()); + redisUtil.set(REPORT4SCHOOL, resultMap); return resultMap; } else { boolean hasKey = redisUtil.hasKey(REPORT4SCHOOL);