From 53467ee446179fa97e5655641efe5591ec74f00a Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Mon, 22 May 2023 23:28:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SyncTJwJsjbxxb.java | 70 +++++++ .../SyncTJwJxljbxxb.java | 67 +++++++ .../controller/TJwJsjbxxController.java | 178 ++++++++++++++++++ .../controller/TJwJxljbxxController.java | 178 ++++++++++++++++++ .../kc/grab/exports/entity/TJwJsjbxx.java | 133 +++++++++++++ .../kc/grab/exports/entity/TJwJxljbxx.java | 81 ++++++++ .../grab/exports/mapper/TJwJsjbxxMapper.java | 17 ++ .../grab/exports/mapper/TJwJxljbxxMapper.java | 17 ++ .../exports/mapper/xml/TJwJsjbxxMapper.xml | 5 + .../exports/mapper/xml/TJwJxljbxxMapper.xml | 5 + .../exports/service/ITJwJsjbxxService.java | 14 ++ .../exports/service/ITJwJxljbxxService.java | 14 ++ .../service/impl/TJwJsjbxxServiceImpl.java | 21 +++ .../service/impl/TJwJxljbxxServiceImpl.java | 21 +++ .../controller/XxhbjsjbxxController.java | 178 ++++++++++++++++++ .../controller/XxhbjxljbxxController.java | 178 ++++++++++++++++++ .../kc/grab/imports/entity/Xxhbjsjbxx.java | 133 +++++++++++++ .../kc/grab/imports/entity/Xxhbjxljbxx.java | 81 ++++++++ .../grab/imports/mapper/XxhbjsjbxxMapper.java | 17 ++ .../imports/mapper/XxhbjxljbxxMapper.java | 17 ++ .../imports/mapper/xml/XxhbjsjbxxMapper.xml | 5 + .../imports/mapper/xml/XxhbjxljbxxMapper.xml | 5 + .../imports/service/IXxhbjsjbxxService.java | 21 +++ .../imports/service/IXxhbjxljbxxService.java | 21 +++ .../service/impl/XxhbjsjbxxServiceImpl.java | 38 ++++ .../service/impl/XxhbjxljbxxServiceImpl.java | 36 ++++ .../controller/KcSysConfigController.java | 43 ++++- .../modules/kc/ktgl/entity/KcKetangbiao.java | 2 + .../kc/ktgl/mapper/xml/KcKetangbiaoMapper.xml | 5 + .../kc/qa/mapper/xml/KcEvaluationMapper.xml | 7 + 30 files changed, 1605 insertions(+), 3 deletions(-) create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJsjbxxb.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJsjbxxController.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJxljbxxController.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJsjbxx.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJxljbxx.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJsjbxxMapper.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJxljbxxMapper.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJsjbxxMapper.xml create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJxljbxxMapper.xml create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJsjbxxService.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJxljbxxService.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJsjbxxServiceImpl.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJxljbxxServiceImpl.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjsjbxxController.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjxljbxxController.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjsjbxx.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjsjbxxMapper.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjsjbxxMapper.xml create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjsjbxxService.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjsjbxxServiceImpl.java create mode 100644 jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJsjbxxb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJsjbxxb.java new file mode 100644 index 00000000..567af89a --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJsjbxxb.java @@ -0,0 +1,70 @@ +package org.jeecg.modules.kc.grab.SynchronizationService; + +import cn.hutool.core.bean.BeanUtil; +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.TJwJsjbxx; +import org.jeecg.modules.kc.grab.exports.entity.TJwKckb; +import org.jeecg.modules.kc.grab.exports.service.ITJwJsjbxxService; +import org.jeecg.modules.kc.grab.exports.service.ITJwKckbService; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog; +import org.jeecg.modules.kc.grab.imports.service.IXxhbjsjbxxService; +import org.jeecg.modules.kc.grab.imports.service.IXxhbkckbService; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.Map; + +@Slf4j +public class SyncTJwJsjbxxb extends BaseSync { + + @Autowired + private ITJwJsjbxxService expService; + + @Autowired + private IXxhbjsjbxxService impService; + + /** + * 若参数变量名修改 QuartzJobController中也需对应修改 + */ + + @Override + public void execute(JobExecutionContext jobExecutionContext) { + start(); + run(getParamMap()); + end(); + } + + + /** + * 有参定时任务实现 + * @param param + */ + public void run(Map param){ + //查询数据 + List inDataList = expService.list(); + List outDataList = Lists.newArrayList(); + + //清洗数据 + inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbjsjbxx.class))); + + //保存到胃 + impService.syncList(outDataList); + + Xxhbsynclog xxhbsynclog = new Xxhbsynclog(); + xxhbsynclog.setSyncRowNum(String.valueOf(outDataList.size())); + saveLog(xxhbsynclog, Xxhbkckb.class); + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java new file mode 100644 index 00000000..20f51e5d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncTJwJxljbxxb.java @@ -0,0 +1,67 @@ +package org.jeecg.modules.kc.grab.SynchronizationService; + +import cn.hutool.core.bean.BeanUtil; +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.TJwJxljbxx; +import org.jeecg.modules.kc.grab.exports.service.ITJwJxljbxxService; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjxljbxx; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog; +import org.jeecg.modules.kc.grab.imports.service.IXxhbjxljbxxService; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.Map; + +@Slf4j +public class SyncTJwJxljbxxb extends BaseSync { + + @Autowired + private ITJwJxljbxxService expService; + + @Autowired + private IXxhbjxljbxxService impService; + + /** + * 若参数变量名修改 QuartzJobController中也需对应修改 + */ + + @Override + public void execute(JobExecutionContext jobExecutionContext) { + start(); + run(getParamMap()); + end(); + } + + + /** + * 有参定时任务实现 + * @param param + */ + public void run(Map param){ + //查询数据 + List inDataList = expService.list(); + List outDataList = Lists.newArrayList(); + + //清洗数据 + inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbjxljbxx.class))); + + //保存到胃 + impService.syncList(outDataList); + + Xxhbsynclog xxhbsynclog = new Xxhbsynclog(); + xxhbsynclog.setSyncRowNum(String.valueOf(outDataList.size())); + saveLog(xxhbsynclog, Xxhbkckb.class); + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJsjbxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJsjbxxController.java new file mode 100644 index 00000000..c7c09da3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJsjbxxController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.grab.exports.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.grab.exports.entity.TJwJsjbxx; +import org.jeecg.modules.kc.grab.exports.service.ITJwJsjbxxService; + +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: TJwJsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Api(tags="TJwJsjbxx") +@RestController +@RequestMapping("/TJwJsjbxx/TJwJsjbxx") +@Slf4j +public class TJwJsjbxxController extends JeecgController { + @Autowired + private ITJwJsjbxxService TJwJsjbxxService; + + /** + * 分页列表查询 + * + * @param TJwJsjbxx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "TJwJsjbxx-分页列表查询") + @ApiOperation(value="TJwJsjbxx-分页列表查询", notes="TJwJsjbxx-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(TJwJsjbxx TJwJsjbxx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(TJwJsjbxx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = TJwJsjbxxService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param TJwJsjbxx + * @return + */ + @AutoLog(value = "TJwJsjbxx-添加") + @ApiOperation(value="TJwJsjbxx-添加", notes="TJwJsjbxx-添加") + @RequiresPermissions("TJwJsjbxx:TJwJsjbxx:add") + @PostMapping(value = "/add") + public Result add(@RequestBody TJwJsjbxx TJwJsjbxx) { + TJwJsjbxxService.save(TJwJsjbxx); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param TJwJsjbxx + * @return + */ + @AutoLog(value = "TJwJsjbxx-编辑") + @ApiOperation(value="TJwJsjbxx-编辑", notes="TJwJsjbxx-编辑") + @RequiresPermissions("TJwJsjbxx:TJwJsjbxx:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody TJwJsjbxx TJwJsjbxx) { + TJwJsjbxxService.updateById(TJwJsjbxx); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "TJwJsjbxx-通过id删除") + @ApiOperation(value="TJwJsjbxx-通过id删除", notes="TJwJsjbxx-通过id删除") + @RequiresPermissions("TJwJsjbxx:TJwJsjbxx:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + TJwJsjbxxService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "TJwJsjbxx-批量删除") + @ApiOperation(value="TJwJsjbxx-批量删除", notes="TJwJsjbxx-批量删除") + @RequiresPermissions("TJwJsjbxx:TJwJsjbxx:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.TJwJsjbxxService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "TJwJsjbxx-通过id查询") + @ApiOperation(value="TJwJsjbxx-通过id查询", notes="TJwJsjbxx-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + TJwJsjbxx TJwJsjbxx = TJwJsjbxxService.getById(id); + if(TJwJsjbxx==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(TJwJsjbxx); + } + + /** + * 导出excel + * + * @param request + * @param TJwJsjbxx + */ + @RequiresPermissions("TJwJsjbxx:TJwJsjbxx:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, TJwJsjbxx TJwJsjbxx) { + return super.exportXls(request, TJwJsjbxx, TJwJsjbxx.class, "TJwJsjbxx"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("TJwJsjbxx:TJwJsjbxx:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, TJwJsjbxx.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJxljbxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJxljbxxController.java new file mode 100644 index 00000000..bfeed751 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/controller/TJwJxljbxxController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.grab.exports.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.grab.exports.entity.TJwJxljbxx; +import org.jeecg.modules.kc.grab.exports.service.ITJwJxljbxxService; + +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: TJwJxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Api(tags="TJwJxljbxx") +@RestController +@RequestMapping("/TJwJxljbxx/TJwJxljbxx") +@Slf4j +public class TJwJxljbxxController extends JeecgController { + @Autowired + private ITJwJxljbxxService TJwJxljbxxService; + + /** + * 分页列表查询 + * + * @param TJwJxljbxx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "TJwJxljbxx-分页列表查询") + @ApiOperation(value="TJwJxljbxx-分页列表查询", notes="TJwJxljbxx-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(TJwJxljbxx TJwJxljbxx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(TJwJxljbxx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = TJwJxljbxxService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param TJwJxljbxx + * @return + */ + @AutoLog(value = "TJwJxljbxx-添加") + @ApiOperation(value="TJwJxljbxx-添加", notes="TJwJxljbxx-添加") + @RequiresPermissions("TJwJxljbxx:TJwJxljbxx:add") + @PostMapping(value = "/add") + public Result add(@RequestBody TJwJxljbxx TJwJxljbxx) { + TJwJxljbxxService.save(TJwJxljbxx); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param TJwJxljbxx + * @return + */ + @AutoLog(value = "TJwJxljbxx-编辑") + @ApiOperation(value="TJwJxljbxx-编辑", notes="TJwJxljbxx-编辑") + @RequiresPermissions("TJwJxljbxx:TJwJxljbxx:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody TJwJxljbxx TJwJxljbxx) { + TJwJxljbxxService.updateById(TJwJxljbxx); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "TJwJxljbxx-通过id删除") + @ApiOperation(value="TJwJxljbxx-通过id删除", notes="TJwJxljbxx-通过id删除") + @RequiresPermissions("TJwJxljbxx:TJwJxljbxx:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + TJwJxljbxxService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "TJwJxljbxx-批量删除") + @ApiOperation(value="TJwJxljbxx-批量删除", notes="TJwJxljbxx-批量删除") + @RequiresPermissions("TJwJxljbxx:TJwJxljbxx:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.TJwJxljbxxService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "TJwJxljbxx-通过id查询") + @ApiOperation(value="TJwJxljbxx-通过id查询", notes="TJwJxljbxx-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + TJwJxljbxx TJwJxljbxx = TJwJxljbxxService.getById(id); + if(TJwJxljbxx==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(TJwJxljbxx); + } + + /** + * 导出excel + * + * @param request + * @param TJwJxljbxx + */ + @RequiresPermissions("TJwJxljbxx:TJwJxljbxx:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, TJwJxljbxx TJwJxljbxx) { + return super.exportXls(request, TJwJxljbxx, TJwJxljbxx.class, "TJwJxljbxx"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("TJwJxljbxx:TJwJxljbxx:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, TJwJxljbxx.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJsjbxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJsjbxx.java new file mode 100644 index 00000000..d9dae54e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJsjbxx.java @@ -0,0 +1,133 @@ +package org.jeecg.modules.kc.grab.exports.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: TJwJsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Data +@TableName("TJwJsjbxx") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="TJwJsjbxx对象", description="TJwJsjbxx") +public class TJwJsjbxx implements Serializable { + private static final long serialVersionUID = 1L; + + /**是否笔试考试*/ + @Excel(name = "是否笔试考试", width = 15) + @ApiModelProperty(value = "是否笔试考试") + private java.lang.String sfbsks; + /**是否可用*/ + @Excel(name = "是否可用", width = 15) + @ApiModelProperty(value = "是否可用") + private java.lang.String sfky; + /**教室用途*/ + @Excel(name = "教室用途", width = 15) + @ApiModelProperty(value = "教室用途") + private java.lang.String jsyt; + /**考试座位数*/ + @Excel(name = "考试座位数", width = 15) + @ApiModelProperty(value = "考试座位数") + private java.lang.String kszws; + /**有效座位数*/ + @Excel(name = "有效座位数", width = 15) + @ApiModelProperty(value = "有效座位数") + private java.lang.String yxzws; + /**教室类型码*/ + @Excel(name = "教室类型码", width = 15) + @ApiModelProperty(value = "教室类型码") + private java.lang.String jslxm; + /**门牌号*/ + @Excel(name = "门牌号", width = 15) + @ApiModelProperty(value = "门牌号") + private java.lang.String mph; + /**所在楼层*/ + @Excel(name = "所在楼层", width = 15) + @ApiModelProperty(value = "所在楼层") + private java.lang.String szlc; + /**教室管理部门*/ + @Excel(name = "教室管理部门", width = 15) + @ApiModelProperty(value = "教室管理部门") + private java.lang.String jsglbm; + /**教室排课优先序号*/ + @Excel(name = "教室排课优先序号", width = 15) + @ApiModelProperty(value = "教室排课优先序号") + private java.lang.String jspkyxxh; + /**是否标准考场*/ + @Excel(name = "是否标准考场", width = 15) + @ApiModelProperty(value = "是否标准考场") + private java.lang.String sfbzkc; + /**教室名称*/ + @Excel(name = "教室名称", width = 15) + @ApiModelProperty(value = "教室名称") + private java.lang.String jsmc; + /**教学楼号(关联视图t_jw_jxljbxx里的JZWH)*/ + @Excel(name = "教学楼号(关联视图t_jw_jxljbxx里的JZWH)", width = 15) + @ApiModelProperty(value = "教学楼号(关联视图t_jw_jxljbxx里的JZWH)") + private java.lang.String jxlh; + /**功能区编号*/ + @Excel(name = "功能区编号", width = 15) + @ApiModelProperty(value = "功能区编号") + private java.lang.String gnqbh; + /**是否专用*/ + @Excel(name = "是否专用", width = 15) + @ApiModelProperty(value = "是否专用") + private java.lang.String sfzy; + /**教室描述*/ + @Excel(name = "教室描述", width = 15) + @ApiModelProperty(value = "教室描述") + private java.lang.String jsms; + /**校区码*/ + @Excel(name = "校区码", width = 15) + @ApiModelProperty(value = "校区码") + private java.lang.String xqm; + /**所属院系号*/ + @Excel(name = "所属院系号", width = 15) + @ApiModelProperty(value = "所属院系号") + private java.lang.String ssyxh; + /**编号*/ + @Excel(name = "编号", width = 15) + @ApiModelProperty(value = "编号") + private java.lang.String bh; + /**座位数*/ + @Excel(name = "座位数", width = 15) + @ApiModelProperty(value = "座位数") + private java.lang.String zws; + /**教室号(关联视图T_JW_KCKB里的JSBH)*/ + @Excel(name = "教室号(关联视图T_JW_KCKB里的JSBH)", width = 15) + @ApiModelProperty(value = "教室号(关联视图T_JW_KCKB里的JSBH)") + private java.lang.String jsh; + /**timestamps*/ + @Excel(name = "timestamps", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "timestamps") + private java.util.Date timestamps; + /**是否可借用*/ + @Excel(name = "是否可借用", width = 15) + @ApiModelProperty(value = "是否可借用") + private java.lang.String sfkjy; + /**是否可重复利用*/ + @Excel(name = "是否可重复利用", width = 15) + @ApiModelProperty(value = "是否可重复利用") + private java.lang.String sfkcfly; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJxljbxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJxljbxx.java new file mode 100644 index 00000000..3bfed050 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/entity/TJwJxljbxx.java @@ -0,0 +1,81 @@ +package org.jeecg.modules.kc.grab.exports.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: TJwJxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Data +@TableName("TJwJxljbxx") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="TJwJxljbxx对象", description="TJwJxljbxx") +public class TJwJxljbxx implements Serializable { + private static final long serialVersionUID = 1L; + + /**院系号*/ + @Excel(name = "院系号", width = 15) + @ApiModelProperty(value = "院系号") + private java.lang.String yxh; + /**建筑物状况码*/ + @Excel(name = "建筑物状况码", width = 15) + @ApiModelProperty(value = "建筑物状况码") + private java.lang.String jzwzkm; + /**编号*/ + @Excel(name = "编号", width = 15) + @ApiModelProperty(value = "编号") + private java.lang.String bh; + /**状态*/ + @Excel(name = "状态", width = 15) + @ApiModelProperty(value = "状态") + private java.lang.String zt; + /**建筑物号(关联视图t_jw_jsjbxx里的JXLH)*/ + @Excel(name = "建筑物号(关联视图t_jw_jsjbxx里的JXLH)", width = 15) + @ApiModelProperty(value = "建筑物号(关联视图t_jw_jsjbxx里的JXLH)") + private java.lang.String jzwh; + /**建筑物英文名称*/ + @Excel(name = "建筑物英文名称", width = 15) + @ApiModelProperty(value = "建筑物英文名称") + private java.lang.String jzwywmc; + /**建筑物分类码*/ + @Excel(name = "建筑物分类码", width = 15) + @ApiModelProperty(value = "建筑物分类码") + private java.lang.String jzwflm; + /**建筑物名称*/ + @Excel(name = "建筑物名称", width = 15) + @ApiModelProperty(value = "建筑物名称") + private java.lang.String jzwmc; + /**校区码*/ + @Excel(name = "校区码", width = 15) + @ApiModelProperty(value = "校区码") + private java.lang.String xqm; + /**建筑物层数*/ + @Excel(name = "建筑物层数", width = 15) + @ApiModelProperty(value = "建筑物层数") + private java.lang.String jzwcs; + /**时间戳*/ + @Excel(name = "时间戳", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "时间戳") + private java.util.Date timestamps; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJsjbxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJsjbxxMapper.java new file mode 100644 index 00000000..480cb33b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJsjbxxMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.grab.exports.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.grab.exports.entity.TJwJsjbxx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: TJwJsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface TJwJsjbxxMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJxljbxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJxljbxxMapper.java new file mode 100644 index 00000000..e124a953 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/TJwJxljbxxMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.grab.exports.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.grab.exports.entity.TJwJxljbxx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: TJwJxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface TJwJxljbxxMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJsjbxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJsjbxxMapper.xml new file mode 100644 index 00000000..7207486d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJsjbxxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJxljbxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJxljbxxMapper.xml new file mode 100644 index 00000000..e0867216 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/mapper/xml/TJwJxljbxxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJsjbxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJsjbxxService.java new file mode 100644 index 00000000..2f941e1e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJsjbxxService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.grab.exports.service; + +import org.jeecg.modules.kc.grab.exports.entity.TJwJsjbxx; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: TJwJsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface ITJwJsjbxxService extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJxljbxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJxljbxxService.java new file mode 100644 index 00000000..355627fa --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/ITJwJxljbxxService.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.grab.exports.service; + +import org.jeecg.modules.kc.grab.exports.entity.TJwJxljbxx; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + * @Description: TJwJxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface ITJwJxljbxxService extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJsjbxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJsjbxxServiceImpl.java new file mode 100644 index 00000000..e9d29816 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJsjbxxServiceImpl.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.kc.grab.exports.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.jeecg.modules.kc.grab.exports.entity.TJwJsjbxx; +import org.jeecg.modules.kc.grab.exports.mapper.TJwJsjbxxMapper; +import org.jeecg.modules.kc.grab.exports.service.ITJwJsjbxxService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: TJwJsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@DS("multi-oracle") +@Service +public class TJwJsjbxxServiceImpl extends ServiceImpl implements ITJwJsjbxxService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJxljbxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJxljbxxServiceImpl.java new file mode 100644 index 00000000..dcffdbcb --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/exports/service/impl/TJwJxljbxxServiceImpl.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.kc.grab.exports.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import org.jeecg.modules.kc.grab.exports.entity.TJwJxljbxx; +import org.jeecg.modules.kc.grab.exports.mapper.TJwJxljbxxMapper; +import org.jeecg.modules.kc.grab.exports.service.ITJwJxljbxxService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +/** + * @Description: TJwJxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@DS("multi-oracle") +@Service +public class TJwJxljbxxServiceImpl extends ServiceImpl implements ITJwJxljbxxService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjsjbxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjsjbxxController.java new file mode 100644 index 00000000..56d2817a --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjsjbxxController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.grab.imports.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.grab.imports.entity.Xxhbjsjbxx; +import org.jeecg.modules.kc.grab.imports.service.IXxhbjsjbxxService; + +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: xxhbjsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Api(tags="xxhbjsjbxx") +@RestController +@RequestMapping("/xxhbjsjbxx/xxhbjsjbxx") +@Slf4j +public class XxhbjsjbxxController extends JeecgController { + @Autowired + private IXxhbjsjbxxService xxhbjsjbxxService; + + /** + * 分页列表查询 + * + * @param xxhbjsjbxx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "xxhbjsjbxx-分页列表查询") + @ApiOperation(value="xxhbjsjbxx-分页列表查询", notes="xxhbjsjbxx-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbjsjbxx xxhbjsjbxx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbjsjbxx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = xxhbjsjbxxService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param xxhbjsjbxx + * @return + */ + @AutoLog(value = "xxhbjsjbxx-添加") + @ApiOperation(value="xxhbjsjbxx-添加", notes="xxhbjsjbxx-添加") + @RequiresPermissions("xxhbjsjbxx:xxhbjsjbxx:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Xxhbjsjbxx xxhbjsjbxx) { + xxhbjsjbxxService.save(xxhbjsjbxx); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param xxhbjsjbxx + * @return + */ + @AutoLog(value = "xxhbjsjbxx-编辑") + @ApiOperation(value="xxhbjsjbxx-编辑", notes="xxhbjsjbxx-编辑") + @RequiresPermissions("xxhbjsjbxx:xxhbjsjbxx:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Xxhbjsjbxx xxhbjsjbxx) { + xxhbjsjbxxService.updateById(xxhbjsjbxx); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "xxhbjsjbxx-通过id删除") + @ApiOperation(value="xxhbjsjbxx-通过id删除", notes="xxhbjsjbxx-通过id删除") + @RequiresPermissions("xxhbjsjbxx:xxhbjsjbxx:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + xxhbjsjbxxService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "xxhbjsjbxx-批量删除") + @ApiOperation(value="xxhbjsjbxx-批量删除", notes="xxhbjsjbxx-批量删除") + @RequiresPermissions("xxhbjsjbxx:xxhbjsjbxx:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.xxhbjsjbxxService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "xxhbjsjbxx-通过id查询") + @ApiOperation(value="xxhbjsjbxx-通过id查询", notes="xxhbjsjbxx-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Xxhbjsjbxx xxhbjsjbxx = xxhbjsjbxxService.getById(id); + if(xxhbjsjbxx==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(xxhbjsjbxx); + } + + /** + * 导出excel + * + * @param request + * @param xxhbjsjbxx + */ + @RequiresPermissions("xxhbjsjbxx:xxhbjsjbxx:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Xxhbjsjbxx xxhbjsjbxx) { + return super.exportXls(request, xxhbjsjbxx, Xxhbjsjbxx.class, "xxhbjsjbxx"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("xxhbjsjbxx:xxhbjsjbxx:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Xxhbjsjbxx.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjxljbxxController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjxljbxxController.java new file mode 100644 index 00000000..9b4d109d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/controller/XxhbjxljbxxController.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.grab.imports.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.grab.imports.entity.Xxhbjxljbxx; +import org.jeecg.modules.kc.grab.imports.service.IXxhbjxljbxxService; + +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: xxhbjxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Api(tags="xxhbjxljbxx") +@RestController +@RequestMapping("/xxhbjxljbxx/xxhbjxljbxx") +@Slf4j +public class XxhbjxljbxxController extends JeecgController { + @Autowired + private IXxhbjxljbxxService xxhbjxljbxxService; + + /** + * 分页列表查询 + * + * @param xxhbjxljbxx + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "xxhbjxljbxx-分页列表查询") + @ApiOperation(value="xxhbjxljbxx-分页列表查询", notes="xxhbjxljbxx-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbjxljbxx xxhbjxljbxx, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbjxljbxx, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = xxhbjxljbxxService.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param xxhbjxljbxx + * @return + */ + @AutoLog(value = "xxhbjxljbxx-添加") + @ApiOperation(value="xxhbjxljbxx-添加", notes="xxhbjxljbxx-添加") + @RequiresPermissions("xxhbjxljbxx:xxhbjxljbxx:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Xxhbjxljbxx xxhbjxljbxx) { + xxhbjxljbxxService.save(xxhbjxljbxx); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param xxhbjxljbxx + * @return + */ + @AutoLog(value = "xxhbjxljbxx-编辑") + @ApiOperation(value="xxhbjxljbxx-编辑", notes="xxhbjxljbxx-编辑") + @RequiresPermissions("xxhbjxljbxx:xxhbjxljbxx:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Xxhbjxljbxx xxhbjxljbxx) { + xxhbjxljbxxService.updateById(xxhbjxljbxx); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "xxhbjxljbxx-通过id删除") + @ApiOperation(value="xxhbjxljbxx-通过id删除", notes="xxhbjxljbxx-通过id删除") + @RequiresPermissions("xxhbjxljbxx:xxhbjxljbxx:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + xxhbjxljbxxService.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "xxhbjxljbxx-批量删除") + @ApiOperation(value="xxhbjxljbxx-批量删除", notes="xxhbjxljbxx-批量删除") + @RequiresPermissions("xxhbjxljbxx:xxhbjxljbxx:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.xxhbjxljbxxService.removeByIds(Arrays.asList(ids.split(","))); + return Result.OK("批量删除成功!"); + } + + /** + * 通过id查询 + * + * @param id + * @return + */ + //@AutoLog(value = "xxhbjxljbxx-通过id查询") + @ApiOperation(value="xxhbjxljbxx-通过id查询", notes="xxhbjxljbxx-通过id查询") + @GetMapping(value = "/queryById") + public Result queryById(@RequestParam(name="id",required=true) String id) { + Xxhbjxljbxx xxhbjxljbxx = xxhbjxljbxxService.getById(id); + if(xxhbjxljbxx==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(xxhbjxljbxx); + } + + /** + * 导出excel + * + * @param request + * @param xxhbjxljbxx + */ + @RequiresPermissions("xxhbjxljbxx:xxhbjxljbxx:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Xxhbjxljbxx xxhbjxljbxx) { + return super.exportXls(request, xxhbjxljbxx, Xxhbjxljbxx.class, "xxhbjxljbxx"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("xxhbjxljbxx:xxhbjxljbxx:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Xxhbjxljbxx.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjsjbxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjsjbxx.java new file mode 100644 index 00000000..8f8d566e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjsjbxx.java @@ -0,0 +1,133 @@ +package org.jeecg.modules.kc.grab.imports.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: xxhbjsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Data +@TableName("xxhbjsjbxx") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="xxhbjsjbxx对象", description="xxhbjsjbxx") +public class Xxhbjsjbxx implements Serializable { + private static final long serialVersionUID = 1L; + + /**是否笔试考试*/ + @Excel(name = "是否笔试考试", width = 15) + @ApiModelProperty(value = "是否笔试考试") + private java.lang.String sfbsks; + /**是否可用*/ + @Excel(name = "是否可用", width = 15) + @ApiModelProperty(value = "是否可用") + private java.lang.String sfky; + /**教室用途*/ + @Excel(name = "教室用途", width = 15) + @ApiModelProperty(value = "教室用途") + private java.lang.String jsyt; + /**考试座位数*/ + @Excel(name = "考试座位数", width = 15) + @ApiModelProperty(value = "考试座位数") + private java.lang.String kszws; + /**有效座位数*/ + @Excel(name = "有效座位数", width = 15) + @ApiModelProperty(value = "有效座位数") + private java.lang.String yxzws; + /**教室类型码*/ + @Excel(name = "教室类型码", width = 15) + @ApiModelProperty(value = "教室类型码") + private java.lang.String jslxm; + /**门牌号*/ + @Excel(name = "门牌号", width = 15) + @ApiModelProperty(value = "门牌号") + private java.lang.String mph; + /**所在楼层*/ + @Excel(name = "所在楼层", width = 15) + @ApiModelProperty(value = "所在楼层") + private java.lang.String szlc; + /**教室管理部门*/ + @Excel(name = "教室管理部门", width = 15) + @ApiModelProperty(value = "教室管理部门") + private java.lang.String jsglbm; + /**教室排课优先序号*/ + @Excel(name = "教室排课优先序号", width = 15) + @ApiModelProperty(value = "教室排课优先序号") + private java.lang.String jspkyxxh; + /**是否标准考场*/ + @Excel(name = "是否标准考场", width = 15) + @ApiModelProperty(value = "是否标准考场") + private java.lang.String sfbzkc; + /**教室名称*/ + @Excel(name = "教室名称", width = 15) + @ApiModelProperty(value = "教室名称") + private java.lang.String jsmc; + /**教学楼号(关联视图t_jw_jxljbxx里的JZWH)*/ + @Excel(name = "教学楼号(关联视图t_jw_jxljbxx里的JZWH)", width = 15) + @ApiModelProperty(value = "教学楼号(关联视图t_jw_jxljbxx里的JZWH)") + private java.lang.String jxlh; + /**功能区编号*/ + @Excel(name = "功能区编号", width = 15) + @ApiModelProperty(value = "功能区编号") + private java.lang.String gnqbh; + /**是否专用*/ + @Excel(name = "是否专用", width = 15) + @ApiModelProperty(value = "是否专用") + private java.lang.String sfzy; + /**教室描述*/ + @Excel(name = "教室描述", width = 15) + @ApiModelProperty(value = "教室描述") + private java.lang.String jsms; + /**校区码*/ + @Excel(name = "校区码", width = 15) + @ApiModelProperty(value = "校区码") + private java.lang.String xqm; + /**所属院系号*/ + @Excel(name = "所属院系号", width = 15) + @ApiModelProperty(value = "所属院系号") + private java.lang.String ssyxh; + /**编号*/ + @Excel(name = "编号", width = 15) + @ApiModelProperty(value = "编号") + private java.lang.String bh; + /**座位数*/ + @Excel(name = "座位数", width = 15) + @ApiModelProperty(value = "座位数") + private java.lang.String zws; + /**教室号(关联视图T_JW_KCKB里的JSBH)*/ + @Excel(name = "教室号(关联视图T_JW_KCKB里的JSBH)", width = 15) + @ApiModelProperty(value = "教室号(关联视图T_JW_KCKB里的JSBH)") + private java.lang.String jsh; + /**timestamps*/ + @Excel(name = "timestamps", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "timestamps") + private java.util.Date timestamps; + /**是否可借用*/ + @Excel(name = "是否可借用", width = 15) + @ApiModelProperty(value = "是否可借用") + private java.lang.String sfkjy; + /**是否可重复利用*/ + @Excel(name = "是否可重复利用", width = 15) + @ApiModelProperty(value = "是否可重复利用") + private java.lang.String sfkcfly; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java new file mode 100644 index 00000000..52bf260d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/entity/Xxhbjxljbxx.java @@ -0,0 +1,81 @@ +package org.jeecg.modules.kc.grab.imports.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: xxhbjxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Data +@TableName("xxhbjxljbxx") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="xxhbjxljbxx对象", description="xxhbjxljbxx") +public class Xxhbjxljbxx implements Serializable { + private static final long serialVersionUID = 1L; + + /**院系号*/ + @Excel(name = "院系号", width = 15) + @ApiModelProperty(value = "院系号") + private java.lang.String yxh; + /**建筑物状况码*/ + @Excel(name = "建筑物状况码", width = 15) + @ApiModelProperty(value = "建筑物状况码") + private java.lang.String jzwzkm; + /**编号*/ + @Excel(name = "编号", width = 15) + @ApiModelProperty(value = "编号") + private java.lang.String bh; + /**状态*/ + @Excel(name = "状态", width = 15) + @ApiModelProperty(value = "状态") + private java.lang.String zt; + /**建筑物号(关联视图t_jw_jsjbxx里的JXLH)*/ + @Excel(name = "建筑物号(关联视图t_jw_jsjbxx里的JXLH)", width = 15) + @ApiModelProperty(value = "建筑物号(关联视图t_jw_jsjbxx里的JXLH)") + private java.lang.String jzwh; + /**建筑物英文名称*/ + @Excel(name = "建筑物英文名称", width = 15) + @ApiModelProperty(value = "建筑物英文名称") + private java.lang.String jzwywmc; + /**建筑物分类码*/ + @Excel(name = "建筑物分类码", width = 15) + @ApiModelProperty(value = "建筑物分类码") + private java.lang.String jzwflm; + /**建筑物名称*/ + @Excel(name = "建筑物名称", width = 15) + @ApiModelProperty(value = "建筑物名称") + private java.lang.String jzwmc; + /**校区码*/ + @Excel(name = "校区码", width = 15) + @ApiModelProperty(value = "校区码") + private java.lang.String xqm; + /**建筑物层数*/ + @Excel(name = "建筑物层数", width = 15) + @ApiModelProperty(value = "建筑物层数") + private java.lang.String jzwcs; + /**时间戳*/ + @Excel(name = "时间戳", width = 15, format = "yyyy-MM-dd") + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "时间戳") + private java.util.Date timestamps; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjsjbxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjsjbxxMapper.java new file mode 100644 index 00000000..21c72f99 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjsjbxxMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.grab.imports.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: xxhbjsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface XxhbjsjbxxMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java new file mode 100644 index 00000000..3068fa72 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/XxhbjxljbxxMapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.grab.imports.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjxljbxx; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: xxhbjxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface XxhbjxljbxxMapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjsjbxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjsjbxxMapper.xml new file mode 100644 index 00000000..f3ce5b80 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjsjbxxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml new file mode 100644 index 00000000..e15cb99d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/mapper/xml/XxhbjxljbxxMapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjsjbxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjsjbxxService.java new file mode 100644 index 00000000..764d71a6 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjsjbxxService.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.kc.grab.imports.service; + +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx; +import com.baomidou.mybatisplus.extension.service.IService; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Collection; +import java.util.List; + +/** + * @Description: xxhbjsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface IXxhbjsjbxxService extends IService { + + boolean syncList(List outDataList); + + boolean syncList(Collection entityList, boolean isDelete); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java new file mode 100644 index 00000000..e7caceab --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/IXxhbjxljbxxService.java @@ -0,0 +1,21 @@ +package org.jeecg.modules.kc.grab.imports.service; + +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjxljbxx; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.Collection; +import java.util.List; + +/** + * @Description: xxhbjxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +public interface IXxhbjxljbxxService extends IService { + + boolean syncList(List outDataList); + + boolean syncList(Collection entityList, boolean isDelete); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjsjbxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjsjbxxServiceImpl.java new file mode 100644 index 00000000..5af8f1b3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjsjbxxServiceImpl.java @@ -0,0 +1,38 @@ +package org.jeecg.modules.kc.grab.imports.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjsjbxx; +import org.jeecg.modules.kc.grab.imports.mapper.XxhbjsjbxxMapper; +import org.jeecg.modules.kc.grab.imports.service.IXxhbjsjbxxService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Collection; +import java.util.List; + +/** + * @Description: xxhbjsjbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Service +public class XxhbjsjbxxServiceImpl extends ServiceImpl implements IXxhbjsjbxxService { + + @Override + public boolean syncList(List outDataList) { + return syncList(outDataList, true); + } + + @Override + @Transactional(rollbackFor = {Exception.class}) + public boolean syncList(Collection entityList, boolean isDelete) { + QueryWrapper dqw = new QueryWrapper(); + if(isDelete){ + baseMapper.delete(dqw); + } + return this.saveBatch(entityList, 1000); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java new file mode 100644 index 00000000..0ff3ca31 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/imports/service/impl/XxhbjxljbxxServiceImpl.java @@ -0,0 +1,36 @@ +package org.jeecg.modules.kc.grab.imports.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbjxljbxx; +import org.jeecg.modules.kc.grab.imports.mapper.XxhbjxljbxxMapper; +import org.jeecg.modules.kc.grab.imports.service.IXxhbjxljbxxService; +import org.springframework.stereotype.Service; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; + +import java.util.Collection; +import java.util.List; + +/** + * @Description: xxhbjxljbxx + * @Author: jeecg-boot + * @Date: 2023-05-22 + * @Version: V1.0 + */ +@Service +public class XxhbjxljbxxServiceImpl extends ServiceImpl implements IXxhbjxljbxxService { + + @Override + public boolean syncList(List outDataList) { + return syncList(outDataList, true); + } + + @Override + public boolean syncList(Collection entityList, boolean isDelete) { + QueryWrapper dqw = new QueryWrapper(); + if(isDelete){ + baseMapper.delete(dqw); + } + return this.saveBatch(entityList, 1000); + } +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcSysConfig/controller/KcSysConfigController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcSysConfig/controller/KcSysConfigController.java index 9446f2bb..0ab7c9bb 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcSysConfig/controller/KcSysConfigController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/kcSysConfig/controller/KcSysConfigController.java @@ -1,8 +1,7 @@ package org.jeecg.modules.kc.kcSysConfig.controller; -import java.util.Arrays; -import java.util.List; -import java.util.Map; +import java.text.ParseException; +import java.util.*; import java.util.stream.Collectors; import java.io.IOException; import java.io.UnsupportedEncodingException; @@ -11,6 +10,7 @@ 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.DateUtils; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig; import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService; @@ -174,4 +174,41 @@ public class KcSysConfigController extends JeecgController> getDjz() throws ParseException { + KcSysConfig kcSysConfig = kcSysConfigService.getById("1"); + List list = new ArrayList<>(); + String startTime = kcSysConfig.getBxqkssj(); + String endTime = kcSysConfig.getBxqjssj(); + Date date1 = DateUtils.parseDate(startTime,"yyyy-MM-dd"); + Date date2 = DateUtils.parseDate(endTime,"yyyy-MM-dd"); + int i=0; + while(date1.getTime() and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') ) @@ -78,6 +80,9 @@ and js.jsbh is not NULL + + and jxljbxx.jzwh = #{kcKetangbiao.jzwh} + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationMapper.xml index 01447a50..5049a911 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/qa/mapper/xml/KcEvaluationMapper.xml @@ -27,6 +27,10 @@ and college = #{kcEvaluation.szdw} + + + and (ev.upuserid like concat('%',#{kcEvaluation.username},'%') or ev.upuser like concat('%',#{kcEvaluation.username},'%')) + GROUP BY ev.upuserid, ev.upuser, cu.college ) tk, ( SELECT usercode, username, GROUP_CONCAT( assess1 SEPARATOR ',' ) tksf1, GROUP_CONCAT( assess2 SEPARATOR ',' ) tksf2, max( tkyq ) tkyq @@ -55,6 +59,9 @@ and p.up_date <= #{kcEvaluation.endTime} + + and (c.cn like concat('%',#{kcEvaluation.username},'%') or c.user like concat('%',#{kcEvaluation.username},'%')) + ) AS pk LEFT JOIN kc_assessuser au ON pk.userid = au.usercode