diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb.api.ts b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb.api.ts new file mode 100644 index 00000000..58047b61 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/kc/kcTksfrzb/list', + save='/kc/kcTksfrzb/add', + edit='/kc/kcTksfrzb/edit', + deleteOne = '/kc/kcTksfrzb/delete', + deleteBatch = '/kc/kcTksfrzb/deleteBatch', + importExcel = '/kc/kcTksfrzb/importExcel', + exportXls = '/kc/kcTksfrzb/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/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb.data.ts b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb.data.ts new file mode 100644 index 00000000..a5ea6b90 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb.data.ts @@ -0,0 +1,62 @@ +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: 'gh' + }, + { + title: '姓名', + align: "center", + dataIndex: 'xm' + }, + { + title: '职务名称', + align: "center", + dataIndex: 'zwmc' + }, + { + title: '标志位 1:学校教务委员会+学校督学(曹老师excel提供)2:信息办数据同步,每天更新(先删除后插入)', + align: "center", + dataIndex: 'flag' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '工号', + field: 'gh', + component: 'Input', + }, + { + label: '姓名', + field: 'xm', + component: 'Input', + }, + { + label: '职务名称', + field: 'zwmc', + component: 'Input', + }, + { + label: '标志位 1:学校教务委员会+学校督学(曹老师excel提供)2:信息办数据同步,每天更新(先删除后插入)', + field: 'flag', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzbList.vue b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzbList.vue new file mode 100644 index 00000000..c263bdbe --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzbList.vue @@ -0,0 +1,215 @@ + + + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb_menu_insert.sql b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb_menu_insert.sql new file mode 100644 index 00000000..c9862c7a --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/KcTksfrzb_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/kc文件夹下 +-- 如果你想更改到其他目录,请修改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 ('2023052509113050440', NULL, '听课身份主表', '/kc/kcTksfrzbList', 'kc/KcTksfrzbList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-25 21:11:44', 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 ('2023052509113050441', '2023052509113050440', '添加听课身份主表', NULL, NULL, 0, NULL, NULL, 2, 'kc:kc_tksfrzb:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-25 21:11:44', 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 ('2023052509113050442', '2023052509113050440', '编辑听课身份主表', NULL, NULL, 0, NULL, NULL, 2, 'kc:kc_tksfrzb:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-25 21:11:44', 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 ('2023052509113050443', '2023052509113050440', '删除听课身份主表', NULL, NULL, 0, NULL, NULL, 2, 'kc:kc_tksfrzb:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-25 21:11:44', 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 ('2023052509113050444', '2023052509113050440', '批量删除听课身份主表', NULL, NULL, 0, NULL, NULL, 2, 'kc:kc_tksfrzb:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-25 21:11:44', 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 ('2023052509113050445', '2023052509113050440', '导出excel_听课身份主表', NULL, NULL, 0, NULL, NULL, 2, 'kc:kc_tksfrzb:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-25 21:11:44', 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 ('2023052509113050446', '2023052509113050440', '导入excel_听课身份主表', NULL, NULL, 0, NULL, NULL, 2, 'kc:kc_tksfrzb:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-25 21:11:44', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/components/KcTksfrzbForm.vue b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/components/KcTksfrzbForm.vue new file mode 100644 index 00000000..b47b5aee --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/components/KcTksfrzbForm.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/components/KcTksfrzbModal.vue b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/components/KcTksfrzbModal.vue new file mode 100644 index 00000000..0b49e219 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/business/kc/vue3Native/components/KcTksfrzbModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTFwdtShryxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTFwdtShryxx.java index ba76384e..94b7059a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTFwdtShryxx.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTFwdtShryxx.java @@ -1,21 +1,21 @@ package org.jeecg.modules.kc.grab.SynchronizationService; import cn.hutool.core.bean.BeanUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import lombok.extern.slf4j.Slf4j; import org.apache.commons.compress.utils.Lists; import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; import org.jeecg.modules.kc.grab.exports.entity.TFwdtShryxx; -import org.jeecg.modules.kc.grab.exports.entity.TJwKcxxb; import org.jeecg.modules.kc.grab.exports.service.ITFwdtShryxxService; -import org.jeecg.modules.kc.grab.exports.service.ITJwKcxxbService; -import org.jeecg.modules.kc.grab.imports.entity.Xxhbkcxxb; import org.jeecg.modules.kc.grab.imports.entity.Xxhbshryxx; import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog; -import org.jeecg.modules.kc.grab.imports.service.IXxhbkcxxbService; import org.jeecg.modules.kc.grab.imports.service.IXxhbshryxxService; +import org.jeecg.modules.kc.tksf.kctksfrzb.entity.KcTksfrzb; +import org.jeecg.modules.kc.tksf.kctksfrzb.service.IKcTksfrzbService; import org.quartz.JobExecutionContext; import org.springframework.beans.factory.annotation.Autowired; +import java.util.Arrays; import java.util.List; import java.util.Map; @@ -28,6 +28,9 @@ public class SyncTFwdtShryxx extends BaseSync { @Autowired private IXxhbshryxxService impService; + @Autowired + private IKcTksfrzbService kcTksfrzbService; + /** * 若参数变量名修改 QuartzJobController中也需对应修改 */ @@ -49,11 +52,31 @@ public class SyncTFwdtShryxx extends BaseSync { List inDataList = expService.list(); List outDataList = Lists.newArrayList(); + List saveList = Lists.newArrayList(); + + List whiteList = Arrays.asList("学校教务委员会", "学校督学", "党委书记", "党委副书记", "党委常务副书记", "副处长", "处长", "教务秘书", "本科生辅导员", "校团委书记", "校长", "校领导"); //清洗数据 - inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbshryxx.class))); + inDataList.forEach(x -> { + outDataList.add(BeanUtil.toBean(x, Xxhbshryxx.class)); + if(whiteList.contains(x.getZwmc())){ + KcTksfrzb y = new KcTksfrzb(); + y.setGh(x.getGh()); + y.setXm(x.getXm()); + y.setZwmc(x.getZwmc()); + y.setFlag("2"); + saveList.add(y); + } + }); //保存到胃 impService.syncList(outDataList); + //删除旧数据 + + QueryWrapper rqw = new QueryWrapper<>(); + rqw.eq("flag",2); + kcTksfrzbService.remove(rqw); + + kcTksfrzbService.saveBatch(saveList); Xxhbsynclog xxhbsynclog = new Xxhbsynclog(); xxhbsynclog.setSyncRowNum(String.valueOf(outDataList.size())); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/controller/KcTkcstjController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/controller/KcTkcstjController.java new file mode 100644 index 00000000..53d12c79 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/controller/KcTkcstjController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.tksf.kctkcstj.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.kc.tksf.kctkcstj.entity.KcTkcstj; +import org.jeecg.modules.kc.tksf.kctkcstj.service.IKcTkcstjService; + +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: 2023-05-27 + * @Version: V1.0 + */ +@Api(tags="听课次数统计") +@RestController +@RequestMapping("/kctkcstj/kcTkcstj") +@Slf4j +public class KcTkcstjController extends JeecgController { + @Autowired + private IKcTkcstjService kcTkcstjService; + + /** + * 分页列表查询 + * + * @param kcTkcstj + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "听课次数统计-分页列表查询") + @ApiOperation(value="听课次数统计-分页列表查询", notes="听课次数统计-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(KcTkcstj kcTkcstj, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(kcTkcstj, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = kcTkcstjService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param kcTkcstj + * @return + */ + @AutoLog(value = "听课次数统计-添加") + @ApiOperation(value="听课次数统计-添加", notes="听课次数统计-添加") + @RequiresPermissions("kctkcstj:kc_tkcstj:add") + @PostMapping(value = "/add") + public Result add(@RequestBody KcTkcstj kcTkcstj) { + kcTkcstjService.save(kcTkcstj); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param kcTkcstj + * @return + */ + @AutoLog(value = "听课次数统计-编辑") + @ApiOperation(value="听课次数统计-编辑", notes="听课次数统计-编辑") + @RequiresPermissions("kctkcstj:kc_tkcstj:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcTkcstj kcTkcstj) { + kcTkcstjService.updateById(kcTkcstj); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "听课次数统计-通过id删除") + @ApiOperation(value="听课次数统计-通过id删除", notes="听课次数统计-通过id删除") + @RequiresPermissions("kctkcstj:kc_tkcstj:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcTkcstjService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "听课次数统计-批量删除") + @ApiOperation(value="听课次数统计-批量删除", notes="听课次数统计-批量删除") + @RequiresPermissions("kctkcstj:kc_tkcstj:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.kcTkcstjService.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) { + KcTkcstj kcTkcstj = kcTkcstjService.getById(id); + if(kcTkcstj==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(kcTkcstj); + } + + /** + * 导出excel + * + * @param request + * @param kcTkcstj + */ + @RequiresPermissions("kctkcstj:kc_tkcstj:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, KcTkcstj kcTkcstj) { + return super.exportXls(request, kcTkcstj, KcTkcstj.class, "听课次数统计"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("kctkcstj:kc_tkcstj:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, KcTkcstj.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/entity/KcTkcstj.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/entity/KcTkcstj.java new file mode 100644 index 00000000..5c2e4d95 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/entity/KcTkcstj.java @@ -0,0 +1,63 @@ +package org.jeecg.modules.kc.tksf.kctkcstj.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: 2023-05-27 + * @Version: V1.0 + */ +@Data +@TableName("kc_tkcstj") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="kc_tkcstj对象", description="听课次数统计") +public class KcTkcstj implements Serializable { + private static final long serialVersionUID = 1L; + + /**学年学期*/ + @Excel(name = "学年学期", width = 15) + @ApiModelProperty(value = "学年学期") + private java.lang.String xnxq; + /**教师工号*/ + @Excel(name = "教师工号", width = 15) + @ApiModelProperty(value = "教师工号") + private java.lang.String jgh; + /**教师姓名*/ + @Excel(name = "教师姓名", width = 15) + @ApiModelProperty(value = "教师姓名") + private java.lang.String jsxm; + /**所属学院*/ + @Excel(name = "所属学院", width = 15) + @ApiModelProperty(value = "所属学院") + private java.lang.String ssxy; + /**听课身份*/ + @Excel(name = "听课身份", width = 15) + @ApiModelProperty(value = "听课身份") + private java.lang.String tksf; + /**应听课次数*/ + @Excel(name = "应听课次数", width = 15) + @ApiModelProperty(value = "应听课次数") + private java.lang.String yskcs; + /**应听课次数*/ + @Excel(name = "应听课次数", width = 15) + @ApiModelProperty(value = "应听课次数") + private java.lang.String tkxttj; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/mapper/KcTkcstjMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/mapper/KcTkcstjMapper.java new file mode 100644 index 00000000..1098214b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/mapper/KcTkcstjMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.tksf.kctkcstj.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.tksf.kctkcstj.entity.KcTkcstj; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 听课次数统计 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +public interface KcTkcstjMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/mapper/xml/KcTkcstjMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/mapper/xml/KcTkcstjMapper.xml new file mode 100644 index 00000000..33c3c023 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/mapper/xml/KcTkcstjMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/service/IKcTkcstjService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/service/IKcTkcstjService.java new file mode 100644 index 00000000..211f570d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/service/IKcTkcstjService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.tksf.kctkcstj.service; + +import org.jeecg.modules.kc.tksf.kctkcstj.entity.KcTkcstj; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 听课次数统计 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +public interface IKcTkcstjService extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/service/impl/KcTkcstjServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/service/impl/KcTkcstjServiceImpl.java new file mode 100644 index 00000000..a8d00d75 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/service/impl/KcTkcstjServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.kc.tksf.kctkcstj.service.impl; + +import org.jeecg.modules.kc.tksf.kctkcstj.entity.KcTkcstj; +import org.jeecg.modules.kc.tksf.kctkcstj.mapper.KcTkcstjMapper; +import org.jeecg.modules.kc.tksf.kctkcstj.service.IKcTkcstjService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 听课次数统计 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +@Service +public class KcTkcstjServiceImpl extends ServiceImpl implements IKcTkcstjService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj.api.ts b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj.api.ts new file mode 100644 index 00000000..09085f9a --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj.api.ts @@ -0,0 +1,72 @@ +import { defHttp } from '/@/utils/http/axios'; +import { useMessage } from "/@/hooks/web/useMessage"; + +const { createConfirm } = useMessage(); + +enum Api { + list = '/kctkcstj/kcTkcstj/list', + save='/kctkcstj/kcTkcstj/add', + edit='/kctkcstj/kcTkcstj/edit', + deleteOne = '/kctkcstj/kcTkcstj/delete', + deleteBatch = '/kctkcstj/kcTkcstj/deleteBatch', + importExcel = '/kctkcstj/kcTkcstj/importExcel', + exportXls = '/kctkcstj/kcTkcstj/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/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj.data.ts b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj.data.ts new file mode 100644 index 00000000..b72b5bfd --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj.data.ts @@ -0,0 +1,116 @@ +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: 'xnxq' + }, + { + title: '教师工号', + align: "center", + dataIndex: 'jgh' + }, + { + title: '教师姓名', + align: "center", + dataIndex: 'jsxm' + }, + { + title: '所属学院', + align: "center", + dataIndex: 'ssxy' + }, + { + title: '听课身份', + align: "center", + dataIndex: 'tksf' + }, + { + title: '应听课次数', + align: "center", + dataIndex: 'yskcs' + }, + { + title: '应听课次数', + align: "center", + dataIndex: 'tkxttj' + }, +]; + +//查询数据 +export const searchFormSchema: FormSchema[] = [ + { + label: "学年学期", + field: 'xnxq', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "教师工号", + field: 'jgh', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "教师姓名", + field: 'jsxm', + component: 'Input', + colProps: {span: 6}, + }, + { + label: "听课身份", + field: 'tksf', + component: 'Input', + colProps: {span: 6}, + }, +]; + +//表单数据 +export const formSchema: FormSchema[] = [ + { + label: '学年学期', + field: 'xnxq', + component: 'Input', + }, + { + label: '教师工号', + field: 'jgh', + component: 'Input', + }, + { + label: '教师姓名', + field: 'jsxm', + component: 'Input', + }, + { + label: '所属学院', + field: 'ssxy', + component: 'Input', + }, + { + label: '听课身份', + field: 'tksf', + component: 'Input', + }, + { + label: '应听课次数', + field: 'yskcs', + component: 'Input', + }, + { + label: '应听课次数', + field: 'tkxttj', + component: 'Input', + }, + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false, + }, +]; diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstjList.vue b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstjList.vue new file mode 100644 index 00000000..c9520e88 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstjList.vue @@ -0,0 +1,249 @@ + + + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj_menu_insert.sql b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj_menu_insert.sql new file mode 100644 index 00000000..36e9f183 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/KcTkcstj_menu_insert.sql @@ -0,0 +1,26 @@ +-- 注意:该页面对应的前台目录为views/kctkcstj文件夹下 +-- 如果你想更改到其他目录,请修改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 ('2023052702565770120', NULL, '听课次数统计', '/kctkcstj/kcTkcstjList', 'kctkcstj/KcTkcstjList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-05-27 14:56:12', 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 ('2023052702565770121', '2023052702565770120', '添加听课次数统计', NULL, NULL, 0, NULL, NULL, 2, 'kctkcstj:kc_tkcstj:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-27 14:56:12', 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 ('2023052702565770122', '2023052702565770120', '编辑听课次数统计', NULL, NULL, 0, NULL, NULL, 2, 'kctkcstj:kc_tkcstj:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-27 14:56:12', 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 ('2023052702565770123', '2023052702565770120', '删除听课次数统计', NULL, NULL, 0, NULL, NULL, 2, 'kctkcstj:kc_tkcstj:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-27 14:56:12', 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 ('2023052702565770124', '2023052702565770120', '批量删除听课次数统计', NULL, NULL, 0, NULL, NULL, 2, 'kctkcstj:kc_tkcstj:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-27 14:56:12', 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 ('2023052702565770125', '2023052702565770120', '导出excel_听课次数统计', NULL, NULL, 0, NULL, NULL, 2, 'kctkcstj:kc_tkcstj:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-27 14:56:12', 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 ('2023052702565770126', '2023052702565770120', '导入excel_听课次数统计', NULL, NULL, 0, NULL, NULL, 2, 'kctkcstj:kc_tkcstj:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-05-27 14:56:12', NULL, NULL, 0, 0, '1', 0); \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/components/KcTkcstjForm.vue b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/components/KcTkcstjForm.vue new file mode 100644 index 00000000..a37c9fd3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/components/KcTkcstjForm.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/components/KcTkcstjModal.vue b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/components/KcTkcstjModal.vue new file mode 100644 index 00000000..f8455ad0 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctkcstj/vue3Native/components/KcTkcstjModal.vue @@ -0,0 +1,75 @@ + + + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/controller/KcTksfrzbController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/controller/KcTksfrzbController.java new file mode 100644 index 00000000..d8285b6d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/controller/KcTksfrzbController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.tksf.kctksfrzb.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.kc.tksf.kctksfrzb.entity.KcTksfrzb; +import org.jeecg.modules.kc.tksf.kctksfrzb.service.IKcTksfrzbService; + +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: 2023-05-27 + * @Version: V1.0 + */ +@Api(tags="听课身份主表") +@RestController +@RequestMapping("/kctksfrzb/kcTksfrzb") +@Slf4j +public class KcTksfrzbController extends JeecgController { + @Autowired + private IKcTksfrzbService kcTksfrzbService; + + /** + * 分页列表查询 + * + * @param kcTksfrzb + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "听课身份主表-分页列表查询") + @ApiOperation(value="听课身份主表-分页列表查询", notes="听课身份主表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(KcTksfrzb kcTksfrzb, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(kcTksfrzb, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = kcTksfrzbService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param kcTksfrzb + * @return + */ + @AutoLog(value = "听课身份主表-添加") + @ApiOperation(value="听课身份主表-添加", notes="听课身份主表-添加") + @RequiresPermissions("kctksfrzb:kc_tksfrzb:add") + @PostMapping(value = "/add") + public Result add(@RequestBody KcTksfrzb kcTksfrzb) { + kcTksfrzbService.save(kcTksfrzb); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param kcTksfrzb + * @return + */ + @AutoLog(value = "听课身份主表-编辑") + @ApiOperation(value="听课身份主表-编辑", notes="听课身份主表-编辑") + @RequiresPermissions("kctksfrzb:kc_tksfrzb:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcTksfrzb kcTksfrzb) { + kcTksfrzbService.updateById(kcTksfrzb); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "听课身份主表-通过id删除") + @ApiOperation(value="听课身份主表-通过id删除", notes="听课身份主表-通过id删除") + @RequiresPermissions("kctksfrzb:kc_tksfrzb:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcTksfrzbService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "听课身份主表-批量删除") + @ApiOperation(value="听课身份主表-批量删除", notes="听课身份主表-批量删除") + @RequiresPermissions("kctksfrzb:kc_tksfrzb:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.kcTksfrzbService.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) { + KcTksfrzb kcTksfrzb = kcTksfrzbService.getById(id); + if(kcTksfrzb==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(kcTksfrzb); + } + + /** + * 导出excel + * + * @param request + * @param kcTksfrzb + */ + @RequiresPermissions("kctksfrzb:kc_tksfrzb:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, KcTksfrzb kcTksfrzb) { + return super.exportXls(request, kcTksfrzb, KcTksfrzb.class, "听课身份主表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("kctksfrzb:kc_tksfrzb:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, KcTksfrzb.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/entity/KcTksfrzb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/entity/KcTksfrzb.java new file mode 100644 index 00000000..05ce8e58 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/entity/KcTksfrzb.java @@ -0,0 +1,55 @@ +package org.jeecg.modules.kc.tksf.kctksfrzb.entity; + +import java.io.Serializable; +import java.io.UnsupportedEncodingException; +import java.util.Date; +import java.math.BigDecimal; + +import com.baomidou.mybatisplus.annotation.*; +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: 2023-05-27 + * @Version: V1.0 + */ +@Data +@TableName("kc_tksfrzb") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="kc_tksfrzb对象", description="听课身份主表") +public class KcTksfrzb implements Serializable { + private static final long serialVersionUID = 1L; + + /**工号*/ + @Excel(name = "工号", width = 15) + @ApiModelProperty(value = "工号") + private java.lang.String gh; + /**姓名*/ + @Excel(name = "姓名", width = 15) + @ApiModelProperty(value = "姓名") + private java.lang.String xm; + /**职务名称*/ + @Excel(name = "职务名称", width = 15) + @ApiModelProperty(value = "职务名称") + private java.lang.String zwmc; + /**标志位 1:学校教务委员会+学校督学(曹老师excel提供)2:信息办数据同步,每天更新(先删除后插入)*/ + @Excel(name = "标志位 1:学校教务委员会+学校督学(曹老师excel提供)2:信息办数据同步,每天更新(先删除后插入)", width = 15) + @ApiModelProperty(value = "标志位 1:学校教务委员会+学校督学(曹老师excel提供)2:信息办数据同步,每天更新(先删除后插入)") + private java.lang.String flag; + + /** + * 听课要求(次数) + */ + @TableField(exist = false) + private String tkyq; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/mapper/KcTksfrzbMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/mapper/KcTksfrzbMapper.java new file mode 100644 index 00000000..4f4fbefb --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/mapper/KcTksfrzbMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.tksf.kctksfrzb.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.tksf.kctksfrzb.entity.KcTksfrzb; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 听课身份主表 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +public interface KcTksfrzbMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/mapper/xml/KcTksfrzbMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/mapper/xml/KcTksfrzbMapper.xml new file mode 100644 index 00000000..84467268 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/mapper/xml/KcTksfrzbMapper.xml @@ -0,0 +1,21 @@ + + + + + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/service/IKcTksfrzbService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/service/IKcTksfrzbService.java new file mode 100644 index 00000000..caa71d9b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/service/IKcTksfrzbService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.tksf.kctksfrzb.service; + +import org.jeecg.modules.kc.tksf.kctksfrzb.entity.KcTksfrzb; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 听课身份主表 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +public interface IKcTksfrzbService extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/service/impl/KcTksfrzbServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/service/impl/KcTksfrzbServiceImpl.java new file mode 100644 index 00000000..193de733 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfrzb/service/impl/KcTksfrzbServiceImpl.java @@ -0,0 +1,19 @@ +package org.jeecg.modules.kc.tksf.kctksfrzb.service.impl; + +import org.jeecg.modules.kc.tksf.kctksfrzb.entity.KcTksfrzb; +import org.jeecg.modules.kc.tksf.kctksfrzb.mapper.KcTksfrzbMapper; +import org.jeecg.modules.kc.tksf.kctksfrzb.service.IKcTksfrzbService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 听课身份主表 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +@Service +public class KcTksfrzbServiceImpl extends ServiceImpl implements IKcTksfrzbService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/controller/KcTksfyqController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/controller/KcTksfyqController.java new file mode 100644 index 00000000..27ac87d6 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/controller/KcTksfyqController.java @@ -0,0 +1,179 @@ +package org.jeecg.modules.kc.tksf.kctksfyq.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.kc.tksf.kctksfyq.entity.KcTksfyq; +import org.jeecg.modules.kc.tksf.kctksfyq.service.IKcTksfyqService; + +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: 2023-05-27 + * @Version: V1.0 + */ +@Api(tags="听课身份要求") +@RestController +@RequestMapping("/kctksfyq/kcTksfyq") +@Slf4j +public class KcTksfyqController extends JeecgController { + @Autowired + private IKcTksfyqService kcTksfyqService; + + /** + * 分页列表查询 + * + * @param kcTksfyq + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "听课身份要求-分页列表查询") + @ApiOperation(value="听课身份要求-分页列表查询", notes="听课身份要求-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(KcTksfyq kcTksfyq, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(kcTksfyq, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = kcTksfyqService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param kcTksfyq + * @return + */ + @AutoLog(value = "听课身份要求-添加") + @ApiOperation(value="听课身份要求-添加", notes="听课身份要求-添加") +// @RequiresPermissions("kctksfyq:kc_tksfyq:add") + @PostMapping(value = "/add") + public Result add(@RequestBody KcTksfyq kcTksfyq) { + + kcTksfyqService.saveOrEdit(kcTksfyq); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param kcTksfyq + * @return + */ + @AutoLog(value = "听课身份要求-编辑") + @ApiOperation(value="听课身份要求-编辑", notes="听课身份要求-编辑") +// @RequiresPermissions("kctksfyq:kc_tksfyq:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcTksfyq kcTksfyq) { + kcTksfyqService.updateById(kcTksfyq); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "听课身份要求-通过id删除") + @ApiOperation(value="听课身份要求-通过id删除", notes="听课身份要求-通过id删除") +// @RequiresPermissions("kctksfyq:kc_tksfyq:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcTksfyqService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "听课身份要求-批量删除") + @ApiOperation(value="听课身份要求-批量删除", notes="听课身份要求-批量删除") +// @RequiresPermissions("kctksfyq:kc_tksfyq:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.kcTksfyqService.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) { + KcTksfyq kcTksfyq = kcTksfyqService.getById(id); + if(kcTksfyq==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(kcTksfyq); + } +// +// /** +// * 导出excel +// * +// * @param request +// * @param kcTksfyq +// */ +// @RequiresPermissions("kctksfyq:kc_tksfyq:exportXls") +// @RequestMapping(value = "/exportXls") +// public ModelAndView exportXls(HttpServletRequest request, KcTksfyq kcTksfyq) { +// return super.exportXls(request, kcTksfyq, KcTksfyq.class, "听课身份要求"); +// } +// +// /** +// * 通过excel导入数据 +// * +// * @param request +// * @param response +// * @return +// */ +// @RequiresPermissions("kctksfyq:kc_tksfyq:importExcel") +// @RequestMapping(value = "/importExcel", method = RequestMethod.POST) +// public Result importExcel(HttpServletRequest request, HttpServletResponse response) { +// return super.importExcel(request, response, KcTksfyq.class); +// } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/entity/KcTksfyq.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/entity/KcTksfyq.java new file mode 100644 index 00000000..46f4aa45 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/entity/KcTksfyq.java @@ -0,0 +1,47 @@ +package org.jeecg.modules.kc.tksf.kctksfyq.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: 2023-05-27 + * @Version: V1.0 + */ +@Data +@TableName("kc_tksfyq") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="kc_tksfyq对象", description="听课身份要求") +public class KcTksfyq implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private java.lang.String id; + /**听课身份*/ + @Excel(name = "听课身份", width = 15) + @ApiModelProperty(value = "听课身份") + private java.lang.String zwmc; + /**听课要求*/ + @Excel(name = "听课要求", width = 15) + @ApiModelProperty(value = "听课要求") + private java.lang.String tkyq; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/mapper/KcTksfyqMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/mapper/KcTksfyqMapper.java new file mode 100644 index 00000000..d6d896b5 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/mapper/KcTksfyqMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.tksf.kctksfyq.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.tksf.kctksfyq.entity.KcTksfyq; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 听课身份要求 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +public interface KcTksfyqMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/mapper/xml/KcTksfyqMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/mapper/xml/KcTksfyqMapper.xml new file mode 100644 index 00000000..9f4826f9 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/mapper/xml/KcTksfyqMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/service/IKcTksfyqService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/service/IKcTksfyqService.java new file mode 100644 index 00000000..5e5449a0 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/service/IKcTksfyqService.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.kc.tksf.kctksfyq.service; + +import org.jeecg.modules.kc.tksf.kctksfyq.entity.KcTksfyq; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: 听课身份要求 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +public interface IKcTksfyqService extends IService { + + void saveOrEdit(KcTksfyq kcTksfyq); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/service/impl/KcTksfyqServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/service/impl/KcTksfyqServiceImpl.java new file mode 100644 index 00000000..12d61a8e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/kctksfyq/service/impl/KcTksfyqServiceImpl.java @@ -0,0 +1,27 @@ +package org.jeecg.modules.kc.tksf.kctksfyq.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.jeecg.modules.kc.tksf.kctksfyq.entity.KcTksfyq; +import org.jeecg.modules.kc.tksf.kctksfyq.mapper.KcTksfyqMapper; +import org.jeecg.modules.kc.tksf.kctksfyq.service.IKcTksfyqService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: 听课身份要求 + * @Author: jeecg-boot + * @Date: 2023-05-27 + * @Version: V1.0 + */ +@Service +public class KcTksfyqServiceImpl extends ServiceImpl implements IKcTksfyqService { + + @Override + public void saveOrEdit(KcTksfyq kcTksfyq) { + QueryWrapper qw = new QueryWrapper<>(); + qw.eq("zwmc",kcTksfyq.getZwmc()); + remove(qw); + save(kcTksfyq); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/听课身份模块.md b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/tksf/听课身份模块.md new file mode 100644 index 00000000..e69de29b