diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/IpUtils.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/IpUtils.java index 01b9d6be..3cf8f0a4 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/IpUtils.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/IpUtils.java @@ -26,7 +26,12 @@ public class IpUtils { public static String getIpAddr(HttpServletRequest request) { String ip = null; try { - ip = request.getHeader("x-forwarded-for"); + if (StringUtils.isEmpty(ip) || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getRemoteAddr(); + } + if (StringUtils.isEmpty(ip) || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { + ip = request.getHeader("x-forwarded-for"); + } if (StringUtils.isEmpty(ip) || CommonConstant.UNKNOWN.equalsIgnoreCase(ip)) { ip = request.getHeader("Proxy-Client-IP"); } diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java index 7f689370..3bfa76bc 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SFTPUtil.java @@ -64,10 +64,10 @@ public class SFTPUtil { channel.connect(); sftp = (ChannelSftp) channel; logger.info("登录成功"); -// }else{ -// Channel channel = sshSession.openChannel("sftp"); -// channel.connect(); -// sftp = (ChannelSftp) channel; + }else{ + Channel channel = sshSession.openChannel("sftp"); + channel.connect(); + sftp = (ChannelSftp) channel; } } catch (Exception e){ try{ @@ -645,6 +645,13 @@ public class SFTPUtil { }finally { } } + if(sftp != null){ + try { + disChannel(); + } catch (Exception e) { + e.printStackTrace(); + } + } } public static String[] getDirectoryAndFileName(String fileName) { @@ -753,7 +760,7 @@ public class SFTPUtil { sftp.cd(sftpConfig.getFullpath()); } catch (SftpException e1) { try { - mkdirs(sftpConfig.getFullpath()); + sftp.mkdir(sftpConfig.getFullpath()); } catch (SftpException e2) { map.put("code", "1"); map.put("msg", "sftp创建" + sftpConfig.getFullpath() + "文件路径失败"); diff --git a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java index 825b984b..606cdf52 100644 --- a/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java +++ b/jeecg-boot-base-core/src/main/java/org/jeecg/config/shiro/ShiroConfig.java @@ -129,7 +129,6 @@ public class ShiroConfig { filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon"); //积木报表排除 - filterChainDefinitionMap.put("/jmreport/**", "anon"); filterChainDefinitionMap.put("/**/*.js.map", "anon"); filterChainDefinitionMap.put("/**/*.css.map", "anon"); diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncSckhclxb.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncSckhclxb.java new file mode 100644 index 00000000..434604ff --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncSckhclxb.java @@ -0,0 +1,44 @@ +package org.jeecg.modules.kc.grab.SynchronizationService; + +import lombok.extern.slf4j.Slf4j; +import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; +import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Map; + +@Slf4j +public class SyncSckhclxb extends BaseSync { + + @Autowired + private IZyInfoStudentService zyInfoStudentService; + + /** + * 考核材料修补 + */ + + @Override + public void execute(JobExecutionContext jobExecutionContext) { + start(); + run(getParamMap()); + end(); + } + + + /** + * 有参定时任务实现 + * @param param + */ + public void run(Map param){ + zyInfoStudentService.sckhclxb();//获取维普剩余查重次数 + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncVjxythk0015.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncVjxythk0015.java new file mode 100644 index 00000000..03b9ce45 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncVjxythk0015.java @@ -0,0 +1,69 @@ +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.xxhbfxcjmxb0015.entity.Vjxythk0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.service.IXxhbfxcjmxb0015Service; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.service.Vjxythk0015Service; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.Map; + +@Slf4j +public class SyncVjxythk0015 extends BaseSync { + + @Autowired + private Vjxythk0015Service expService; + + @Autowired + private IXxhbfxcjmxb0015Service 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 -> { + Xxhbfxcjmxb0015 outData = BeanUtil.toBean(x, Xxhbfxcjmxb0015.class); + outDataList.add(outData); + }); + + //保存到胃 + try { + impService.syncList(outDataList); + }catch (Exception e){ + e.printStackTrace(); + } + + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncVjxythk0016.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncVjxythk0016.java new file mode 100644 index 00000000..d6a755a9 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncVjxythk0016.java @@ -0,0 +1,69 @@ +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.xxhbfxcjb0016.entity.Vjxythk0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Xxhbfxcjb0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.service.IXxhbfxcjb0016Service; +import org.jeecg.modules.kc.xxhbfxcjb0016.service.Vjxythk0016Service; +import org.quartz.JobExecutionContext; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.List; +import java.util.Map; + +@Slf4j +public class SyncVjxythk0016 extends BaseSync { + + @Autowired + private Vjxythk0016Service expService; + + @Autowired + private IXxhbfxcjb0016Service 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 -> { + Xxhbfxcjb0016 outData = BeanUtil.toBean(x, Xxhbfxcjb0016.class); + outDataList.add(outData); + }); + + //保存到胃 + try { + impService.syncList(outDataList); + }catch (Exception e){ + e.printStackTrace(); + } + + } + + /** + * 无参定时任务实现 + */ + public void run(){ + run(null); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java index 75690c73..c77e0f6a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/grab/SynchronizationService/SyncZyStudentPdf.java @@ -5,9 +5,6 @@ import lombok.extern.slf4j.Slf4j; import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.SpringContextHolder; import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync; -import org.jeecg.modules.kc.kcEvaluationsStat.entity.KcEvaluationsStat; -import org.jeecg.modules.kc.kcEvaluationsStat.service.IKcEvaluationsStatService; -import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; import org.jeecg.modules.tools.Global; @@ -47,27 +44,6 @@ public class SyncZyStudentPdf extends BaseSync { */ public void run(Map param){ List ybtkblist = zyInfoStudentService.getDocNoPdfList(); - for(ZyInfoStudent zyInfoStudent:ybtkblist){ - try { - Global global = SpringContextHolder.getBean(Global.class); - FileUtil.mkdir(global.getContractDickPath()); - String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"); - String docPath = upLoadPath+ File.separator+ zyInfoStudent.getFilePath(); - String namePath = dd + ".pdf"; - String pdfPath = global.getContractDickPath() + namePath; - System.out.println("filPath:"+zyInfoStudent.getFilePath()); - System.out.println("docPath:"+docPath); - System.out.println("pdfPath:"+pdfPath); - - PDFUtil pdfUtil = SpringContextHolder.getBean(PDFUtil.class); - pdfUtil.office2PDF(docPath,pdfPath); - zyInfoStudent.setPdfPath("contract/"+namePath); - zyInfoStudent.setPublishTime(new Date()); - zyInfoStudentService.updateById(zyInfoStudent); - } catch (Exception e) { - throw new RuntimeException(e); - } - } } /** diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java index e0f1b626..3198bae0 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxDjxx/service/impl/WjxDjxxServiceImpl.java @@ -292,6 +292,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl impl } } else { baseMapper.updateErrMsg(user.getUsername(), vid, jsonResult.getString("errormsg")); + return jsonResult.getString("errormsg"); } } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java index 0e9afa63..7ac0c68e 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/entity/WjxWjxx.java @@ -164,4 +164,6 @@ public class WjxWjxx implements Serializable { private String yuanTeacherName; @TableField(exist = false) private String ts; + @TableField(exist = false) + private String errorMsg; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml index ef362a12..302b080e 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxx/mapper/xml/WjxWjxxMapper.xml @@ -43,7 +43,8 @@ a.fzbms, a.zdsx, ifnull(b.flag,'-1') as flag, - b.id as djId + b.id as djId, + b.error_msg from wjx_wjxx a left join wjx_djxx b on a.vid = b.vid and b.user_id = #{param.userId} where a.qpublish in ('1','2') diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java index a1e4ac93..0b4e7c49 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/wjxWjxxTmlb/service/impl/WjxWjxxTmlbServiceImpl.java @@ -50,7 +50,7 @@ public class WjxWjxxTmlbServiceImpl extends ServiceImpl wjxWjxxTmxxList) { - wjxWjxxTmlb.setWjLeixing("6"); +// wjxWjxxTmlb.setWjLeixing("6"); wjxWjxxTmlbMapper.insert(wjxWjxxTmlb); if(wjxWjxxTmxxList!=null && wjxWjxxTmxxList.size()>0) { for(WjxWjxxTmxx entity:wjxWjxxTmxxList) { diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/controller/Xxhbfxcjb0016Controller.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/controller/Xxhbfxcjb0016Controller.java new file mode 100644 index 00000000..2d7fa19e --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/controller/Xxhbfxcjb0016Controller.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.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.xxhbfxcjb0016.entity.Xxhbfxcjb0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.service.IXxhbfxcjb0016Service; + +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: 2025-01-22 + * @Version: V1.0 + */ +@Api(tags="分项成绩表") +@RestController +@RequestMapping("/xxhbfxcjb0016/xxhbfxcjb0016") +@Slf4j +public class Xxhbfxcjb0016Controller extends JeecgController { + @Autowired + private IXxhbfxcjb0016Service xxhbfxcjb0016Service; + + /** + * 分页列表查询 + * + * @param xxhbfxcjb0016 + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "分项成绩表-分页列表查询") + @ApiOperation(value="分项成绩表-分页列表查询", notes="分项成绩表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbfxcjb0016 xxhbfxcjb0016, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbfxcjb0016, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = xxhbfxcjb0016Service.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param xxhbfxcjb0016 + * @return + */ + @AutoLog(value = "分项成绩表-添加") + @ApiOperation(value="分项成绩表-添加", notes="分项成绩表-添加") + @RequiresPermissions("xxhbfxcjb0016:xxhbfxcjb0016:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Xxhbfxcjb0016 xxhbfxcjb0016) { + xxhbfxcjb0016Service.save(xxhbfxcjb0016); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param xxhbfxcjb0016 + * @return + */ + @AutoLog(value = "分项成绩表-编辑") + @ApiOperation(value="分项成绩表-编辑", notes="分项成绩表-编辑") + @RequiresPermissions("xxhbfxcjb0016:xxhbfxcjb0016:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Xxhbfxcjb0016 xxhbfxcjb0016) { + xxhbfxcjb0016Service.updateById(xxhbfxcjb0016); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "分项成绩表-通过id删除") + @ApiOperation(value="分项成绩表-通过id删除", notes="分项成绩表-通过id删除") + @RequiresPermissions("xxhbfxcjb0016:xxhbfxcjb0016:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + xxhbfxcjb0016Service.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "分项成绩表-批量删除") + @ApiOperation(value="分项成绩表-批量删除", notes="分项成绩表-批量删除") + @RequiresPermissions("xxhbfxcjb0016:xxhbfxcjb0016:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.xxhbfxcjb0016Service.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) { + Xxhbfxcjb0016 xxhbfxcjb0016 = xxhbfxcjb0016Service.getById(id); + if(xxhbfxcjb0016==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(xxhbfxcjb0016); + } + + /** + * 导出excel + * + * @param request + * @param xxhbfxcjb0016 + */ + @RequiresPermissions("xxhbfxcjb0016:xxhbfxcjb0016:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Xxhbfxcjb0016 xxhbfxcjb0016) { + return super.exportXls(request, xxhbfxcjb0016, Xxhbfxcjb0016.class, "分项成绩表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("xxhbfxcjb0016:xxhbfxcjb0016:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Xxhbfxcjb0016.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/entity/Vjxythk0016.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/entity/Vjxythk0016.java new file mode 100644 index 00000000..9af96e45 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/entity/Vjxythk0016.java @@ -0,0 +1,76 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +@Data +@TableName("v_jxyth_k_0016") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="v_jxyth_k_0016对象", description="分项成绩表") +public class Vjxythk0016 implements Serializable { + private static final long serialVersionUID = 1L; + + /**分项成绩代码*/ + @Excel(name = "分项成绩代码", width = 15) + @ApiModelProperty(value = "分项成绩代码") + private String fxcjdm; + /**分项成绩名称*/ + @Excel(name = "分项成绩名称", width = 15) + @ApiModelProperty(value = "分项成绩名称") + private String fxcjmc; + /**课程任务代码*/ + @Excel(name = "课程任务代码", width = 15) + @ApiModelProperty(value = "课程任务代码") + private String kcrwdm; + /**课程编号*/ + @Excel(name = "课程编号", width = 15) + @ApiModelProperty(value = "课程编号") + private String kcbh; + /**课程名称*/ + @Excel(name = "课程名称", width = 15) + @ApiModelProperty(value = "课程名称") + private String kcmc; + /**成绩类型代码*/ + @Excel(name = "成绩类型代码", width = 15) + @ApiModelProperty(value = "成绩类型代码") + private String cjlxdm; + /**分项比例*/ + @Excel(name = "分项比例", width = 15) + @ApiModelProperty(value = "分项比例") + private String fxbl; + /**教师工号*/ + @Excel(name = "教师工号", width = 15) + @ApiModelProperty(value = "教师工号") + private String teabh; + /**教师姓名*/ + @Excel(name = "教师姓名", width = 15) + @ApiModelProperty(value = "教师姓名") + private String teaxm; + /**代码名称*/ + @Excel(name = "代码名称", width = 15) + @ApiModelProperty(value = "代码名称") + private String dmmc; + /**无用*/ + @Excel(name = "无用", width = 15) + @ApiModelProperty(value = "无用") + private String synfxcjdm; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/entity/Xxhbfxcjb0016.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/entity/Xxhbfxcjb0016.java new file mode 100644 index 00000000..62ba2b7c --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/entity/Xxhbfxcjb0016.java @@ -0,0 +1,99 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.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: 2025-01-22 + * @Version: V1.0 + */ +@Data +@TableName("xxhbfxcjb0016") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="xxhbfxcjb0016对象", description="分项成绩表") +public class Xxhbfxcjb0016 implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private java.lang.String id; + /**createBy*/ + @ApiModelProperty(value = "createBy") + private java.lang.String createBy; + /**createTime*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "createTime") + private java.util.Date createTime; + /**updateBy*/ + @ApiModelProperty(value = "updateBy") + private java.lang.String updateBy; + /**updateTime*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "updateTime") + private java.util.Date updateTime; + /**分项成绩代码*/ + @Excel(name = "分项成绩代码", width = 15) + @ApiModelProperty(value = "分项成绩代码") + private java.lang.String fxcjdm; + /**分项成绩名称*/ + @Excel(name = "分项成绩名称", width = 15) + @ApiModelProperty(value = "分项成绩名称") + private java.lang.String fxcjmc; + /**课程任务代码*/ + @Excel(name = "课程任务代码", width = 15) + @ApiModelProperty(value = "课程任务代码") + private java.lang.String kcrwdm; + /**课程编号*/ + @Excel(name = "课程编号", width = 15) + @ApiModelProperty(value = "课程编号") + private java.lang.String kcbh; + /**课程名称*/ + @Excel(name = "课程名称", width = 15) + @ApiModelProperty(value = "课程名称") + private java.lang.String kcmc; + /**成绩类型代码*/ + @Excel(name = "成绩类型代码", width = 15) + @ApiModelProperty(value = "成绩类型代码") + private java.lang.String cjlxdm; + /**分项比例*/ + @Excel(name = "分项比例", width = 15) + @ApiModelProperty(value = "分项比例") + private java.lang.String fxbl; + /**教师工号*/ + @Excel(name = "教师工号", width = 15) + @ApiModelProperty(value = "教师工号") + private java.lang.String teabh; + /**教师姓名*/ + @Excel(name = "教师姓名", width = 15) + @ApiModelProperty(value = "教师姓名") + private java.lang.String teaxm; + /**代码名称*/ + @Excel(name = "代码名称", width = 15) + @ApiModelProperty(value = "代码名称") + private java.lang.String dmmc; + /**无用*/ + @Excel(name = "无用", width = 15) + @ApiModelProperty(value = "无用") + private java.lang.String synfxcjdm; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/Vjxythk0016Mapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/Vjxythk0016Mapper.java new file mode 100644 index 00000000..82f50738 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/Vjxythk0016Mapper.java @@ -0,0 +1,14 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Vjxythk0016; + +/** + * @Description: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface Vjxythk0016Mapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/Xxhbfxcjb0016Mapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/Xxhbfxcjb0016Mapper.java new file mode 100644 index 00000000..949fb385 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/Xxhbfxcjb0016Mapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Xxhbfxcjb0016; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface Xxhbfxcjb0016Mapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/xml/Vjxythk0016Mapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/xml/Vjxythk0016Mapper.xml new file mode 100644 index 00000000..209475b0 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/xml/Vjxythk0016Mapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/xml/Xxhbfxcjb0016Mapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/xml/Xxhbfxcjb0016Mapper.xml new file mode 100644 index 00000000..a35e1755 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/mapper/xml/Xxhbfxcjb0016Mapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/IXxhbfxcjb0016Service.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/IXxhbfxcjb0016Service.java new file mode 100644 index 00000000..120261a9 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/IXxhbfxcjb0016Service.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.service; + +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Xxhbfxcjb0016; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * @Description: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface IXxhbfxcjb0016Service extends IService { + + void syncList(List outDataList); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/Vjxythk0016Service.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/Vjxythk0016Service.java new file mode 100644 index 00000000..675ecc42 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/Vjxythk0016Service.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Vjxythk0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Xxhbfxcjb0016; + +/** + * @Description: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface Vjxythk0016Service extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/impl/Vjxythk0016ServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/impl/Vjxythk0016ServiceImpl.java new file mode 100644 index 00000000..cc535bd3 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/impl/Vjxythk0016ServiceImpl.java @@ -0,0 +1,23 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Vjxythk0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Xxhbfxcjb0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.mapper.Vjxythk0016Mapper; +import org.jeecg.modules.kc.xxhbfxcjb0016.mapper.Xxhbfxcjb0016Mapper; +import org.jeecg.modules.kc.xxhbfxcjb0016.service.IXxhbfxcjb0016Service; +import org.jeecg.modules.kc.xxhbfxcjb0016.service.Vjxythk0016Service; +import org.springframework.stereotype.Service; + +/** + * @Description: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +@DS("multi-oracle") +@Service +public class Vjxythk0016ServiceImpl extends ServiceImpl implements Vjxythk0016Service { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/impl/Xxhbfxcjb0016ServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/impl/Xxhbfxcjb0016ServiceImpl.java new file mode 100644 index 00000000..86a728fe --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjb0016/service/impl/Xxhbfxcjb0016ServiceImpl.java @@ -0,0 +1,41 @@ +package org.jeecg.modules.kc.xxhbfxcjb0016.service.impl; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.jeecg.modules.kc.xxhbfxcjb0016.entity.Xxhbfxcjb0016; +import org.jeecg.modules.kc.xxhbfxcjb0016.mapper.Xxhbfxcjb0016Mapper; +import org.jeecg.modules.kc.xxhbfxcjb0016.service.IXxhbfxcjb0016Service; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +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: 分项成绩表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +@Service +public class Xxhbfxcjb0016ServiceImpl extends ServiceImpl implements IXxhbfxcjb0016Service { + + @Override + public void syncList(List outDataList) { + syncList(outDataList, true); + } + + @Transactional(rollbackFor = {Exception.class}) + @InterceptorIgnore(tenantLine = "true") + 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/xxhbfxcjmxb0015/controller/Xxhbfxcjmxb0015Controller.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/controller/Xxhbfxcjmxb0015Controller.java new file mode 100644 index 00000000..a6017e8a --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/controller/Xxhbfxcjmxb0015Controller.java @@ -0,0 +1,178 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.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.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.service.IXxhbfxcjmxb0015Service; + +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: 2025-01-22 + * @Version: V1.0 + */ +@Api(tags="分项成绩明细表") +@RestController +@RequestMapping("/xxhbfxcjmxb0015/xxhbfxcjmxb0015") +@Slf4j +public class Xxhbfxcjmxb0015Controller extends JeecgController { + @Autowired + private IXxhbfxcjmxb0015Service xxhbfxcjmxb0015Service; + + /** + * 分页列表查询 + * + * @param xxhbfxcjmxb0015 + * @param pageNo + * @param pageSize + * @param req + * @return + */ + //@AutoLog(value = "分项成绩明细表-分页列表查询") + @ApiOperation(value="分项成绩明细表-分页列表查询", notes="分项成绩明细表-分页列表查询") + @GetMapping(value = "/list") + public Result> queryPageList(Xxhbfxcjmxb0015 xxhbfxcjmxb0015, + @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, + @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, + HttpServletRequest req) { + QueryWrapper queryWrapper = QueryGenerator.initQueryWrapper(xxhbfxcjmxb0015, req.getParameterMap()); + Page page = new Page(pageNo, pageSize); + IPage pageList = xxhbfxcjmxb0015Service.page(page, queryWrapper); + return Result.OK(pageList); + } + + /** + * 添加 + * + * @param xxhbfxcjmxb0015 + * @return + */ + @AutoLog(value = "分项成绩明细表-添加") + @ApiOperation(value="分项成绩明细表-添加", notes="分项成绩明细表-添加") + @RequiresPermissions("xxhbfxcjmxb0015:xxhbfxcjmxb0015:add") + @PostMapping(value = "/add") + public Result add(@RequestBody Xxhbfxcjmxb0015 xxhbfxcjmxb0015) { + xxhbfxcjmxb0015Service.save(xxhbfxcjmxb0015); + return Result.OK("添加成功!"); + } + + /** + * 编辑 + * + * @param xxhbfxcjmxb0015 + * @return + */ + @AutoLog(value = "分项成绩明细表-编辑") + @ApiOperation(value="分项成绩明细表-编辑", notes="分项成绩明细表-编辑") + @RequiresPermissions("xxhbfxcjmxb0015:xxhbfxcjmxb0015:edit") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody Xxhbfxcjmxb0015 xxhbfxcjmxb0015) { + xxhbfxcjmxb0015Service.updateById(xxhbfxcjmxb0015); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "分项成绩明细表-通过id删除") + @ApiOperation(value="分项成绩明细表-通过id删除", notes="分项成绩明细表-通过id删除") + @RequiresPermissions("xxhbfxcjmxb0015:xxhbfxcjmxb0015:delete") + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + xxhbfxcjmxb0015Service.removeById(id); + return Result.OK("删除成功!"); + } + + /** + * 批量删除 + * + * @param ids + * @return + */ + @AutoLog(value = "分项成绩明细表-批量删除") + @ApiOperation(value="分项成绩明细表-批量删除", notes="分项成绩明细表-批量删除") + @RequiresPermissions("xxhbfxcjmxb0015:xxhbfxcjmxb0015:deleteBatch") + @DeleteMapping(value = "/deleteBatch") + public Result deleteBatch(@RequestParam(name="ids",required=true) String ids) { + this.xxhbfxcjmxb0015Service.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) { + Xxhbfxcjmxb0015 xxhbfxcjmxb0015 = xxhbfxcjmxb0015Service.getById(id); + if(xxhbfxcjmxb0015==null) { + return Result.error("未找到对应数据"); + } + return Result.OK(xxhbfxcjmxb0015); + } + + /** + * 导出excel + * + * @param request + * @param xxhbfxcjmxb0015 + */ + @RequiresPermissions("xxhbfxcjmxb0015:xxhbfxcjmxb0015:exportXls") + @RequestMapping(value = "/exportXls") + public ModelAndView exportXls(HttpServletRequest request, Xxhbfxcjmxb0015 xxhbfxcjmxb0015) { + return super.exportXls(request, xxhbfxcjmxb0015, Xxhbfxcjmxb0015.class, "分项成绩明细表"); + } + + /** + * 通过excel导入数据 + * + * @param request + * @param response + * @return + */ + @RequiresPermissions("xxhbfxcjmxb0015:xxhbfxcjmxb0015:importExcel") + @RequestMapping(value = "/importExcel", method = RequestMethod.POST) + public Result importExcel(HttpServletRequest request, HttpServletResponse response) { + return super.importExcel(request, response, Xxhbfxcjmxb0015.class); + } + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/entity/Vjxythk0015.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/entity/Vjxythk0015.java new file mode 100644 index 00000000..4f1daecf --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/entity/Vjxythk0015.java @@ -0,0 +1,64 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.experimental.Accessors; +import org.jeecgframework.poi.excel.annotation.Excel; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Description: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +@Data +@TableName("v_jxyth_k_0015") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="v_jxyth_k_0015对象", description="分项成绩明细表") +public class Vjxythk0015 implements Serializable { + private static final long serialVersionUID = 1L; + + /**记录*/ + @Excel(name = "记录", width = 15) + @ApiModelProperty(value = "记录") + private String kid; + /**分项成绩代码*/ + @Excel(name = "分项成绩代码", width = 15) + @ApiModelProperty(value = "分项成绩代码") + private String fxcjdm; + /**课程任务代码*/ + @Excel(name = "课程任务代码", width = 15) + @ApiModelProperty(value = "课程任务代码") + private String kcrwdm; + /**学生编号*/ + @Excel(name = "学生编号", width = 15) + @ApiModelProperty(value = "学生编号") + private String xsbh; + /**学生姓名*/ + @Excel(name = "学生姓名", width = 15) + @ApiModelProperty(value = "学生姓名") + private String xsxm; + /**分项成绩*/ + @Excel(name = "分项成绩", width = 15) + @ApiModelProperty(value = "分项成绩") + private String fxcj; + /**备注*/ + @Excel(name = "备注", width = 15) + @ApiModelProperty(value = "备注") + private String bz; + /**附件*/ + @Excel(name = "附件", width = 15) + @ApiModelProperty(value = "附件") + private String path; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/entity/Xxhbfxcjmxb0015.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/entity/Xxhbfxcjmxb0015.java new file mode 100644 index 00000000..ee209cfa --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/entity/Xxhbfxcjmxb0015.java @@ -0,0 +1,87 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.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: 2025-01-22 + * @Version: V1.0 + */ +@Data +@TableName("xxhbfxcjmxb0015") +@Accessors(chain = true) +@EqualsAndHashCode(callSuper = false) +@ApiModel(value="xxhbfxcjmxb0015对象", description="分项成绩明细表") +public class Xxhbfxcjmxb0015 implements Serializable { + private static final long serialVersionUID = 1L; + + /**id*/ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "id") + private java.lang.String id; + /**createBy*/ + @ApiModelProperty(value = "createBy") + private java.lang.String createBy; + /**createTime*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "createTime") + private java.util.Date createTime; + /**updateBy*/ + @ApiModelProperty(value = "updateBy") + private java.lang.String updateBy; + /**updateTime*/ + @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern="yyyy-MM-dd") + @ApiModelProperty(value = "updateTime") + private java.util.Date updateTime; + /**记录*/ + @Excel(name = "记录", width = 15) + @ApiModelProperty(value = "记录") + private java.lang.String kid; + /**分项成绩代码*/ + @Excel(name = "分项成绩代码", width = 15) + @ApiModelProperty(value = "分项成绩代码") + private java.lang.String fxcjdm; + /**课程任务代码*/ + @Excel(name = "课程任务代码", width = 15) + @ApiModelProperty(value = "课程任务代码") + private java.lang.String kcrwdm; + /**学生编号*/ + @Excel(name = "学生编号", width = 15) + @ApiModelProperty(value = "学生编号") + private java.lang.String xsbh; + /**学生姓名*/ + @Excel(name = "学生姓名", width = 15) + @ApiModelProperty(value = "学生姓名") + private java.lang.String xsxm; + /**分项成绩*/ + @Excel(name = "分项成绩", width = 15) + @ApiModelProperty(value = "分项成绩") + private java.lang.String fxcj; + /**备注*/ + @Excel(name = "备注", width = 15) + @ApiModelProperty(value = "备注") + private java.lang.String bz; + /**附件*/ + @Excel(name = "附件", width = 15) + @ApiModelProperty(value = "附件") + private java.lang.String path; +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/Vjxythk0015Mapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/Vjxythk0015Mapper.java new file mode 100644 index 00000000..eb1a9418 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/Vjxythk0015Mapper.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Vjxythk0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; + +/** + * @Description: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface Vjxythk0015Mapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/Xxhbfxcjmxb0015Mapper.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/Xxhbfxcjmxb0015Mapper.java new file mode 100644 index 00000000..45b1c283 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/Xxhbfxcjmxb0015Mapper.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; + +/** + * @Description: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface Xxhbfxcjmxb0015Mapper extends BaseMapper { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/xml/Vjxythk0015Mapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/xml/Vjxythk0015Mapper.xml new file mode 100644 index 00000000..4f10bafc --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/xml/Vjxythk0015Mapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/xml/Xxhbfxcjmxb0015Mapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/xml/Xxhbfxcjmxb0015Mapper.xml new file mode 100644 index 00000000..ca57aa5d --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/mapper/xml/Xxhbfxcjmxb0015Mapper.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/IXxhbfxcjmxb0015Service.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/IXxhbfxcjmxb0015Service.java new file mode 100644 index 00000000..290787c1 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/IXxhbfxcjmxb0015Service.java @@ -0,0 +1,17 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.service; + +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +import com.baomidou.mybatisplus.extension.service.IService; + +import java.util.List; + +/** + * @Description: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface IXxhbfxcjmxb0015Service extends IService { + + void syncList(List outDataList); +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/Vjxythk0015Service.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/Vjxythk0015Service.java new file mode 100644 index 00000000..837ca39b --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/Vjxythk0015Service.java @@ -0,0 +1,15 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Vjxythk0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; + +/** + * @Description: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +public interface Vjxythk0015Service extends IService { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/impl/Vjxythk0015ServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/impl/Vjxythk0015ServiceImpl.java new file mode 100644 index 00000000..c8cded9f --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/impl/Vjxythk0015ServiceImpl.java @@ -0,0 +1,23 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.service.impl; + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Vjxythk0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper.Vjxythk0015Mapper; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper.Xxhbfxcjmxb0015Mapper; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.service.IXxhbfxcjmxb0015Service; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.service.Vjxythk0015Service; +import org.springframework.stereotype.Service; + +/** + * @Description: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +@DS("multi-oracle") +@Service +public class Vjxythk0015ServiceImpl extends ServiceImpl implements Vjxythk0015Service { + +} diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/impl/Xxhbfxcjmxb0015ServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/impl/Xxhbfxcjmxb0015ServiceImpl.java new file mode 100644 index 00000000..8cea5f45 --- /dev/null +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/xxhbfxcjmxb0015/service/impl/Xxhbfxcjmxb0015ServiceImpl.java @@ -0,0 +1,42 @@ +package org.jeecg.modules.kc.xxhbfxcjmxb0015.service.impl; + +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import org.jeecg.modules.kc.grab.imports.entity.Xxhbtkxx; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.entity.Xxhbfxcjmxb0015; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper.Xxhbfxcjmxb0015Mapper; +import org.jeecg.modules.kc.xxhbfxcjmxb0015.service.IXxhbfxcjmxb0015Service; +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: 分项成绩明细表 + * @Author: jeecg-boot + * @Date: 2025-01-22 + * @Version: V1.0 + */ +@Service +public class Xxhbfxcjmxb0015ServiceImpl extends ServiceImpl implements IXxhbfxcjmxb0015Service { + + @Override + public void syncList(List outDataList) { + syncList(outDataList, true); + } + + @Transactional(rollbackFor = {Exception.class}) + @InterceptorIgnore(tenantLine = "true") + 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/zyInfoStudent/controller/ZyInfoStudentController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java index e851648e..14e4b104 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/controller/ZyInfoStudentController.java @@ -670,7 +670,11 @@ public class ZyInfoStudentController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap()); LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); - ZyInfo zyInfo = zyInfoService.getById(object.getYwid()); + String ywid = object.getYwid(); + if(StringUtils.isEmpty(ywid)){ + ywid = object.getMainId(); + } + ZyInfo zyInfo = zyInfoService.getById(ywid); SysUser teacher = sysUserService.getUserByName(zyInfo.getCreateBy()); // 过滤选中数据 @@ -790,8 +794,8 @@ public class ZyInfoStudentController extends JeecgController { List getZyStuId(@Param("dto") ZyXzryInfo zyXzryInfo); List getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo); + + void insertXbkhcl(ZyInfoStudentXbkhcl zyInfoStudentXbkhcl); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml index 47ad4cd4..bdea0650 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/mapper/xml/ZyInfoStudentMapper.xml @@ -230,4 +230,10 @@ WHERE zyinfo_id = #{dto.zyinfoId} AND xh = #{dto.xh})) + + + insert into v_jxyth_k_0016(kid,path) value (#{kid},#{path}) + + + diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java index 1d8ea5a0..b9f1f72c 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/IZyInfoStudentService.java @@ -69,4 +69,6 @@ public interface IZyInfoStudentService extends IService { List getZyStuId(ZyXzryInfo zyXzryInfo); List getZyStuIdById(ZyXzryInfo zyXzryInfo); + + void sckhclxb(); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java index 385c24e0..dab93089 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/zyInfoStudent/service/impl/ZyInfoStudentServiceImpl.java @@ -1,5 +1,6 @@ package org.jeecg.modules.kc.zyInfoStudent.service.impl; +import cn.hutool.core.io.FileUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; @@ -15,6 +16,7 @@ import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.util.DateUtils; import org.jeecg.common.util.SFTPUtil; import org.jeecg.common.util.SftpConfig; +import org.jeecg.common.util.SpringContextHolder; import org.jeecg.modules.kc.kcWechatSendLog.entity.KcWechatSendLog; import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao; import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService; @@ -28,9 +30,12 @@ import org.jeecg.modules.kc.zyInfoScjl.entity.ZyInfoScjl; import org.jeecg.modules.kc.zyInfoScjl.service.IZyInfoScjlService; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudent; import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentSys; +import org.jeecg.modules.kc.zyInfoStudent.entity.ZyInfoStudentXbkhcl; import org.jeecg.modules.kc.zyInfoStudent.mapper.ZyInfoStudentMapper; import org.jeecg.modules.kc.zyInfoStudent.service.IZyInfoStudentService; +import org.jeecg.modules.tools.Global; import org.jeecg.modules.tools.dbsdkfzpt.RestTemplateUtils; +import org.jeecg.modules.tools.office.pdf.PDFUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.MediaType; @@ -252,7 +257,28 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl getDocNoPdfList() { - return baseMapper.getDocNoPdfList(); + List ybtkblist = baseMapper.getDocNoPdfList(); + for(ZyInfoStudent zyInfoStudent:ybtkblist){ + try { + Global global = SpringContextHolder.getBean(Global.class); + FileUtil.mkdir(global.getContractDickPath()); + String dd = DateUtils.formatDate(new Date(),"yyyyMMddHHmmss"); + String docPath = upLoadPath+ File.separator+ zyInfoStudent.getFilePath(); + String namePath = dd + ".pdf"; + String pdfPath = global.getContractDickPath() + namePath; + System.out.println("filPath:"+zyInfoStudent.getFilePath()); + System.out.println("docPath:"+docPath); + System.out.println("pdfPath:"+pdfPath); + + PDFUtil.office2PDF(docPath,pdfPath); + zyInfoStudent.setPdfPath("contract/"+namePath); + zyInfoStudent.setPublishTime(new Date()); + baseMapper.updateById(zyInfoStudent); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + return ybtkblist; } //校内查重批量提交 @@ -334,11 +360,17 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("a.sfsckhcl", "1"); +// queryWrapper.eq("a.id", "1865917324597338113"); + queryWrapper.apply("a.fwq_path is null and a.file_path is not null"); + List list = baseMapper.selectList(queryWrapper); + + String yyyy = DateUtils.formatDate(new Date(), "yyyy"); + String mm = DateUtils.formatDate(new Date(), "MM"); + for(ZyInfoStudent zyInfoStudentPar2 :list){ + Map uploadMap = SFTPUtil.upload(sftpConfig, upLoadPath + "/" + zyInfoStudentPar2.getFilePath(), yyyy + "/" + mm + "/xbkhcl/" + zyInfoStudentPar2.getFilePath().replace("temp/", "/")); + System.out.println("======================================="); + System.out.println("uploadMap:"+uploadMap); + System.out.println("======================================="); + if (StringUtils.equals(uploadMap.get("code"), "0")) { + zyInfoStudentPar2.setFwqPath(uploadMap.get("data")); + } + baseMapper.updateById(zyInfoStudentPar2); + + ZyInfoStudentXbkhcl zyInfoStudentXbkhcl = new ZyInfoStudentXbkhcl(); + zyInfoStudentXbkhcl.setKid(zyInfoStudentPar2.getId()); + zyInfoStudentXbkhcl.setPath(zyInfoStudentPar2.getFwqPath()); + baseMapper.insertXbkhcl(zyInfoStudentXbkhcl); + + } + + + + } + public JSONObject getSycs(String url, String type) { Map textMap = new HashMap(); //可以设置多个input的name,value diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/DesUtil.java b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/DesUtil.java index 056920af..4e484c6d 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/DesUtil.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/DesUtil.java @@ -166,7 +166,7 @@ public class DesUtil { String plainClientCredentials="b49d35b7704e41f_uuid:0683126daa811b7da48c67ccd3c498aa"; - String base64ClientCredentials = new String(Base64.encodeBase64(plainClientCredentials.getBytes())); + String base64ClientCredentials = new String(Base64.encodeBase64String(plainClientCredentials.getBytes())); System.out.println(base64ClientCredentials); } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/InterfaceDemo.java b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/InterfaceDemo.java index 4041cc45..3103083c 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/InterfaceDemo.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/tools/dbsdkfzpt/InterfaceDemo.java @@ -3,13 +3,11 @@ package org.jeecg.modules.tools.dbsdkfzpt; import com.alibaba.fastjson.JSONObject; import org.apache.http.NameValuePair; import org.apache.tomcat.util.codec.binary.Base64; -import org.jeecg.modules.wps.controller.KsoSign; import org.springframework.http.*; import org.springframework.web.client.RestTemplate; import java.io.OutputStream; import java.net.HttpURLConnection; -import java.net.Socket; import java.net.URL; import java.nio.charset.StandardCharsets; import java.util.*; @@ -68,7 +66,7 @@ public class InterfaceDemo { //通过client_id:client_secret构建认证信息 String plainClientCredentials=appNum+":"+oauthCode; - String base64ClientCredentials = new String(Base64.encodeBase64(plainClientCredentials.getBytes())); + String base64ClientCredentials = new String(Base64.encodeBase64String(plainClientCredentials.getBytes())); //构建请求头信息 HttpHeaders headers = new HttpHeaders(); diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/kc/blLoginLog/controller/BlLoginLogController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/kc/blLoginLog/controller/BlLoginLogController.java index 7fe5856e..24cb302f 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/kc/blLoginLog/controller/BlLoginLogController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/kc/blLoginLog/controller/BlLoginLogController.java @@ -183,7 +183,7 @@ public class BlLoginLogController extends JeecgController addLog(@RequestBody SysUser sysUser) { - blLoginLogService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null,null); + blLoginLogService.addLog("33用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null,null); return Result.OK("添加成功!"); } } diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java index 9b52096c..e8ad869c 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/LoginController.java @@ -171,7 +171,7 @@ public class LoginController { userInfo(sysUser, result); // step.5 登录成功删除验证码 - redisUtil.del(CommonConstant.LOGIN_FAIL + username); +// redisUtil.del(CommonConstant.LOGIN_FAIL + username); // step.6 记录用户登录日志 LoginUser loginUser = new LoginUser(); diff --git a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java index ea886c09..733d759d 100644 --- a/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java +++ b/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java @@ -553,7 +553,7 @@ public class SysUserServiceImpl extends ServiceImpl impl // // baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null); try { - blLoginLogService.addLog("用户名: " + sysUser.getRealname() + ",登录成功!", CommonConstant.LOG_TYPE_1, null,sysUser); + blLoginLogService.addLog("44用户名: " + sysUser.getRealname() + ",登录成功!", CommonConstant.LOG_TYPE_1, null,sysUser); }catch (Exception e) { System.out.println("Error---------->: " + sysUser.getUsername()); } diff --git a/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml b/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml index 050a115e..23567a28 100644 --- a/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml +++ b/jeecg-module-system/jeecg-system-start/src/main/resources/application-dev.yml @@ -3,9 +3,9 @@ server: tomcat: max-swallow-size: -1 error: - include-exception: true - include-stacktrace: ALWAYS - include-message: ALWAYS + include-exception: false + include-stacktrace: NEVER + include-message: NEVER servlet: context-path: /jeecg-boot compression: @@ -133,24 +133,21 @@ spring: strict: false #严格匹配数据源,默认false. true未匹配到指定数据源时抛异常,false使用默认数据源 datasource: master: -# url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://127.0.0.1:3306/course_information_center_jeecg_db?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' -# url: jdbc:mysql://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai username: root password: root -# password: ABCabc@123 driver-class-name: com.mysql.cj.jdbc.Driver # 多数据源配置 -# multi-oracle: -# url: jdbc:oracle:thin:@//192.168.2.14:1521/orcl -# username: kczx -# password: kczx -# driver-class-name: oracle.jdbc.OracleDriver + multi-oracle: + url: jdbc:mysql://127.0.0.1:3306/dbsd_zjpt?characterEncoding=UTF-8&useUnicode=true&useSSL=false&tinyInt1isBit=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&sessionVariables=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION' + username: root + password: root + driver-class-name: com.mysql.cj.jdbc.Driver # multi-oracle: -# url: jdbc:oracle:thin:@192.168.2.14:1521:orcl?useUnicode=true&characterEncoding=utf8 -# username: kczx -# password: kczx +# url: jdbc:oracle:thin:@//202.198.129.24:1521/orcl +# username: C##XSKC +# password: mAPP2t2ABAfx7 # driver-class-name: oracle.jdbc.OracleDriver #redis 配置 redis: diff --git a/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml b/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml index 14e76f9f..289fa33a 100644 --- a/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml +++ b/jeecg-module-system/jeecg-system-start/src/main/resources/application-prod.yml @@ -3,9 +3,9 @@ server: tomcat: max-swallow-size: -1 error: - include-exception: true - include-stacktrace: ALWAYS - include-message: ALWAYS + include-exception: false + include-stacktrace: NEVER + include-message: NEVER servlet: context-path: /jeecg-boot compression: diff --git a/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml b/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml index 9a21113b..bdb8ced0 100644 --- a/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml +++ b/jeecg-module-system/jeecg-system-start/src/main/resources/application-test.yml @@ -3,9 +3,9 @@ server: tomcat: max-swallow-size: -1 error: - include-exception: true - include-stacktrace: ALWAYS - include-message: ALWAYS + include-exception: false + include-stacktrace: NEVER + include-message: NEVER servlet: context-path: /jeecg-boot compression: diff --git a/pom.xml b/pom.xml index 25c37077..6d2dc856 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,8 @@ 1.8 UTF-8 + 9.0.90 + 2021.0.3 2021.0.1.0