This commit is contained in:
1378012178@qq.com 2025-02-05 11:24:04 +08:00
commit 3ffe7c3a17
48 changed files with 1305 additions and 64 deletions

View File

@ -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");
}

View File

@ -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() + "文件路径失败");

View File

@ -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");

View File

@ -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<String, Object> param){
zyInfoStudentService.sckhclxb();//获取维普剩余查重次数
}
/**
* 无参定时任务实现
*/
public void run(){
run(null);
}
}

View File

@ -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<String, Object> param){
//查询数据
List<Vjxythk0015> inDataList = expService.list();
List<Xxhbfxcjmxb0015> 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);
}
}

View File

@ -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<String, Object> param){
//查询数据
List<Vjxythk0016> inDataList = expService.list();
List<Xxhbfxcjb0016> 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);
}
}

View File

@ -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<String, Object> param){
List<ZyInfoStudent> 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);
}
}
}
/**

View File

@ -292,6 +292,7 @@ public class WjxDjxxServiceImpl extends ServiceImpl<WjxDjxxMapper, WjxDjxx> impl
}
} else {
baseMapper.updateErrMsg(user.getUsername(), vid, jsonResult.getString("errormsg"));
return jsonResult.getString("errormsg");
}
}

View File

@ -164,4 +164,6 @@ public class WjxWjxx implements Serializable {
private String yuanTeacherName;
@TableField(exist = false)
private String ts;
@TableField(exist = false)
private String errorMsg;
}

View File

@ -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')

View File

@ -50,7 +50,7 @@ public class WjxWjxxTmlbServiceImpl extends ServiceImpl<WjxWjxxTmlbMapper, WjxWj
@Override
@Transactional(rollbackFor = Exception.class)
public void saveMain(WjxWjxxTmlb wjxWjxxTmlb, List<WjxWjxxTmxx> wjxWjxxTmxxList) {
wjxWjxxTmlb.setWjLeixing("6");
// wjxWjxxTmlb.setWjLeixing("6");
wjxWjxxTmlbMapper.insert(wjxWjxxTmlb);
if(wjxWjxxTmxxList!=null && wjxWjxxTmxxList.size()>0) {
for(WjxWjxxTmxx entity:wjxWjxxTmxxList) {

View File

@ -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<Xxhbfxcjb0016, IXxhbfxcjb0016Service> {
@Autowired
private IXxhbfxcjb0016Service xxhbfxcjb0016Service;
/**
* 分页列表查询
*
* @param xxhbfxcjb0016
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "分项成绩表-分页列表查询")
@ApiOperation(value="分项成绩表-分页列表查询", notes="分项成绩表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<Xxhbfxcjb0016>> queryPageList(Xxhbfxcjb0016 xxhbfxcjb0016,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Xxhbfxcjb0016> queryWrapper = QueryGenerator.initQueryWrapper(xxhbfxcjb0016, req.getParameterMap());
Page<Xxhbfxcjb0016> page = new Page<Xxhbfxcjb0016>(pageNo, pageSize);
IPage<Xxhbfxcjb0016> 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<String> 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<String> 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<String> 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<String> 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<Xxhbfxcjb0016> 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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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<Vjxythk0016> {
}

View File

@ -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<Xxhbfxcjb0016> {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.xxhbfxcjb0016.mapper.Vjxythk0016Mapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.xxhbfxcjb0016.mapper.Xxhbfxcjb0016Mapper">
</mapper>

View File

@ -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<Xxhbfxcjb0016> {
void syncList(List<Xxhbfxcjb0016> outDataList);
}

View File

@ -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<Vjxythk0016> {
}

View File

@ -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<Vjxythk0016Mapper, Vjxythk0016> implements Vjxythk0016Service {
}

View File

@ -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<Xxhbfxcjb0016Mapper, Xxhbfxcjb0016> implements IXxhbfxcjb0016Service {
@Override
public void syncList(List<Xxhbfxcjb0016> outDataList) {
syncList(outDataList, true);
}
@Transactional(rollbackFor = {Exception.class})
@InterceptorIgnore(tenantLine = "true")
public boolean syncList(Collection<Xxhbfxcjb0016> entityList, boolean isDelete) {
QueryWrapper dqw = new QueryWrapper();
if(isDelete){
baseMapper.delete(dqw);
}
return this.saveBatch(entityList, 1000);
}
}

View File

@ -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<Xxhbfxcjmxb0015, IXxhbfxcjmxb0015Service> {
@Autowired
private IXxhbfxcjmxb0015Service xxhbfxcjmxb0015Service;
/**
* 分页列表查询
*
* @param xxhbfxcjmxb0015
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "分项成绩明细表-分页列表查询")
@ApiOperation(value="分项成绩明细表-分页列表查询", notes="分项成绩明细表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<Xxhbfxcjmxb0015>> queryPageList(Xxhbfxcjmxb0015 xxhbfxcjmxb0015,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<Xxhbfxcjmxb0015> queryWrapper = QueryGenerator.initQueryWrapper(xxhbfxcjmxb0015, req.getParameterMap());
Page<Xxhbfxcjmxb0015> page = new Page<Xxhbfxcjmxb0015>(pageNo, pageSize);
IPage<Xxhbfxcjmxb0015> 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<String> 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<String> 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<String> 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<String> 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<Xxhbfxcjmxb0015> 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);
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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<Vjxythk0015> {
}

View File

@ -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<Xxhbfxcjmxb0015> {
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper.Vjxythk0015Mapper">
</mapper>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.kc.xxhbfxcjmxb0015.mapper.Xxhbfxcjmxb0015Mapper">
</mapper>

View File

@ -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<Xxhbfxcjmxb0015> {
void syncList(List<Xxhbfxcjmxb0015> outDataList);
}

View File

@ -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<Vjxythk0015> {
}

View File

@ -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<Vjxythk0015Mapper, Vjxythk0015> implements Vjxythk0015Service {
}

View File

@ -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<Xxhbfxcjmxb0015Mapper, Xxhbfxcjmxb0015> implements IXxhbfxcjmxb0015Service {
@Override
public void syncList(List<Xxhbfxcjmxb0015> outDataList) {
syncList(outDataList, true);
}
@Transactional(rollbackFor = {Exception.class})
@InterceptorIgnore(tenantLine = "true")
public boolean syncList(Collection<Xxhbfxcjmxb0015> entityList, boolean isDelete) {
QueryWrapper dqw = new QueryWrapper();
if(isDelete){
baseMapper.delete(dqw);
}
return this.saveBatch(entityList, 1000);
}
}

View File

@ -670,7 +670,11 @@ public class ZyInfoStudentController extends JeecgController<ZyInfoStudent, IZyI
QueryWrapper<ZyInfoStudent> 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<ZyInfoStudent, IZyI
System.out.println("filPath:"+zyInfoStudent.getFilePath());
System.out.println("docPath:"+docPath);
System.out.println("pdfPath:"+pdfPath);
// PDFUtil.office2PDF(docPath,pdfPath);
// zyInfoStudent.setPdfPath("contract/"+namePath);
PDFUtil.office2PDF(docPath,pdfPath);
zyInfoStudent.setPdfPath("contract/"+namePath);
}else{
ZykInfo zykInfo = new ZykInfo();
zykInfo.setBizId(zyInfoStudent.getId());

View File

@ -0,0 +1,35 @@
package org.jeecg.modules.kc.zyInfoStudent.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
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.jeecg.common.aspect.annotation.Dict;
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: 2024-05-06
* @Version: V1.0
*/
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
public class ZyInfoStudentXbkhcl implements Serializable {
private static final long serialVersionUID = 1L;
private String kid;
private String path;
}

View File

@ -10,6 +10,7 @@ import org.jeecg.modules.kc.zyInfo.entity.ZyInfo;
import org.jeecg.modules.kc.zyInfo.entity.ZyXzryInfo;
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.zyInfoStudentPcz.entity.ZyInfoStudentPcz;
import javax.servlet.http.HttpServletResponse;
@ -55,4 +56,6 @@ public interface ZyInfoStudentMapper extends BaseMapper<ZyInfoStudent> {
List<ZyInfoStudent> getZyStuId(@Param("dto") ZyXzryInfo zyXzryInfo);
List<ZyInfoStudent> getZyStuIdById(@Param("dto") ZyXzryInfo zyXzryInfo);
void insertXbkhcl(ZyInfoStudentXbkhcl zyInfoStudentXbkhcl);
}

View File

@ -230,4 +230,10 @@
WHERE
zyinfo_id = #{dto.zyinfoId} AND xh = #{dto.xh}))
</select>
<insert id="insertXbkhcl">
insert into v_jxyth_k_0016(kid,path) value (#{kid},#{path})
</insert>
</mapper>

View File

@ -69,4 +69,6 @@ public interface IZyInfoStudentService extends IService<ZyInfoStudent> {
List<ZyInfoStudent> getZyStuId(ZyXzryInfo zyXzryInfo);
List<ZyInfoStudent> getZyStuIdById(ZyXzryInfo zyXzryInfo);
void sckhclxb();
}

View File

@ -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<ZyInfoStudentMapper, Z
@Override
public List<ZyInfoStudent> getDocNoPdfList() {
return baseMapper.getDocNoPdfList();
List<ZyInfoStudent> 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<ZyInfoStudentMapper, Z
paramMap.put("TEAXM", kcKechengbiao.getSkjs());//教师姓名
paramMap.put("FXCJBH", zyInfo.getId());//分项成绩编号
paramMap.put("XNXQMC", kcKechengbiao.getXnxq());//学年学期
if(StringUtils.isNotBlank(zyInfo.getContent())){
zyInfo.setContent(zyInfo.getContent().replaceAll("'",""));
}
paramMap.put("ZYYQ", zyInfo.getContent());//作业要求
paramMap.put("CJSJ", DateUtils.formatDate(zyInfo.getCreateTime(), "yyyy-MM-dd"));//创建时间
paramMap.put("FXCJBL", zyInfo.getScore());//比例成绩占比
paramMap.put("KCMC", kcKechengbiao.getKcmc());//课程名称
paramMap.put("KCRWDM", zyInfo.getRwbh());//开课任务编号
if(StringUtils.isNotBlank(zyInfo.getPfbz())){
zyInfo.setPfbz(zyInfo.getPfbz().replaceAll("'",""));
}
paramMap.put("PFBZ", zyInfo.getPfbz());//评分标准
paramMap.put("FXCJDM", zyInfo.getId());//主键
// paramMap.put("OPERATE_STATUS","i");//操作状态
@ -539,6 +571,37 @@ public class ZyInfoStudentServiceImpl extends ServiceImpl<ZyInfoStudentMapper, Z
return baseMapper.getZyStuIdById(zyXzryInfo);
}
@Override
public void sckhclxb() {
QueryWrapper<ZyInfoStudent> 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<ZyInfoStudent> list = baseMapper.selectList(queryWrapper);
String yyyy = DateUtils.formatDate(new Date(), "yyyy");
String mm = DateUtils.formatDate(new Date(), "MM");
for(ZyInfoStudent zyInfoStudentPar2 :list){
Map<String, String> 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<String, String> textMap = new HashMap<String, String>();
//可以设置多个input的namevalue

View File

@ -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);
}

View File

@ -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();

View File

@ -183,7 +183,7 @@ public class BlLoginLogController extends JeecgController<BlLoginLog, IBlLoginLo
@PostMapping(value = "/addLog")
public Result<String> 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("添加成功!");
}
}

View File

@ -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();

View File

@ -553,7 +553,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> 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());
}

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -31,6 +31,8 @@
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<tomcat.version>9.0.90</tomcat.version>
<!-- 微服务 -->
<spring-cloud.version>2021.0.3</spring-cloud.version>
<spring-cloud-alibaba.version>2021.0.1.0</spring-cloud-alibaba.version>