Compare commits
10 Commits
133dff7c72
...
a23b5acac5
| Author | SHA1 | Date |
|---|---|---|
|
|
a23b5acac5 | |
|
|
6c9afd77c5 | |
|
|
006f2e80e4 | |
|
|
94ace3d13e | |
|
|
fde032f491 | |
|
|
ec498256c1 | |
|
|
290816dea1 | |
|
|
79c9bdb60e | |
|
|
50ab1a41fe | |
|
|
ce1e459408 |
|
|
@ -80,6 +80,8 @@
|
|||
<artifactId>hutool-http</artifactId>
|
||||
<version>${hutool.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,311 @@
|
|||
package org.jeecg.modules.kc.blZycc.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
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 com.alibaba.fastjson.JSONObject;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.blZycc.entity.BlZycc;
|
||||
import org.jeecg.modules.kc.blZycc.service.IBlZyccService;
|
||||
|
||||
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.jeecg.modules.tools.AuthService;
|
||||
import org.jeecg.modules.tools.Global;
|
||||
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.beans.factory.annotation.Value;
|
||||
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: bl_zycc
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="bl_zycc")
|
||||
@RestController
|
||||
@RequestMapping("/blZycc/blZycc")
|
||||
@Slf4j
|
||||
public class BlZyccController extends JeecgController<BlZycc, IBlZyccService> {
|
||||
@Autowired
|
||||
private IBlZyccService blZyccService;
|
||||
@Autowired
|
||||
private AuthService authService;
|
||||
|
||||
private static String uploadpath;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
public void setUploadPath(String uploadPath) {
|
||||
this.uploadpath = uploadPath;
|
||||
}
|
||||
// private static AuthService authService = SpringContextUtils.getBean(AuthService.class);
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param blZycc
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_zycc-分页列表查询")
|
||||
@ApiOperation(value="bl_zycc-分页列表查询", notes="bl_zycc-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<BlZycc>> queryPageList(BlZycc blZycc,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BlZycc> queryWrapper = QueryGenerator.initQueryWrapper(blZycc, req.getParameterMap());
|
||||
Page<BlZycc> page = new Page<BlZycc>(pageNo, pageSize);
|
||||
IPage<BlZycc> pageList = blZyccService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param blZycc
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_zycc-添加")
|
||||
@ApiOperation(value="bl_zycc-添加", notes="bl_zycc-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody BlZycc blZycc) {
|
||||
blZyccService.save(blZycc);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param blZycc
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_zycc-编辑")
|
||||
@ApiOperation(value="bl_zycc-编辑", notes="bl_zycc-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody BlZycc blZycc) {
|
||||
blZyccService.updateById(blZycc);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_zycc-通过id删除")
|
||||
@ApiOperation(value="bl_zycc-通过id删除", notes="bl_zycc-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
blZyccService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_zycc-批量删除")
|
||||
@ApiOperation(value="bl_zycc-批量删除", notes="bl_zycc-批量删除")
|
||||
@RequiresPermissions("blZycc:bl_zycc:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.blZyccService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_zycc-通过id查询")
|
||||
@ApiOperation(value="bl_zycc-通过id查询", notes="bl_zycc-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<BlZycc> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BlZycc blZycc = blZyccService.getById(id);
|
||||
if(blZycc==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(blZycc);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param blZycc
|
||||
*/
|
||||
@RequiresPermissions("blZycc:bl_zycc:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BlZycc blZycc) {
|
||||
return super.exportXls(request, blZycc, BlZycc.class, "bl_zycc");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("blZycc:bl_zycc:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BlZycc.class);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "维普外网上传")
|
||||
@ApiOperation(value="维普外网上传", notes="维普外网上传")
|
||||
@PostMapping(value = "/zyccUpload")
|
||||
public Result<BlZycc> zyccUpload(@RequestBody BlZycc blZycc) {
|
||||
BlZycc blZyccPar =blZyccService.zyccUpload(blZycc);
|
||||
return Result.OK(blZyccPar);
|
||||
}
|
||||
|
||||
@AutoLog(value = "维普外网开始检测")
|
||||
@ApiOperation(value="维普外网开始检测", notes="维普外网开始检测")
|
||||
@PostMapping(value = "/wwKsjc")
|
||||
public Result<String> wwKsjc(@RequestBody BlZycc blZycc) {
|
||||
blZyccService.wwKsjc(blZycc);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@AutoLog(value = "维普外网检测结果")
|
||||
@ApiOperation(value="维普外网检测结果", notes="维普外网检测结果")
|
||||
@PostMapping(value = "/wwCxjcjg")
|
||||
public Result<Map<String,String>> wwCxjcjg(@RequestBody BlZycc blZycc) {
|
||||
Map<String,String> map = blZyccService.wwCxjcjg(blZycc);
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@AutoLog(value = "小范围比对上传")
|
||||
@ApiOperation(value="小范围比对上传", notes="小范围比对上传")
|
||||
@PostMapping(value = "/xfwbdUpload")
|
||||
public Result<BlZycc> xfwbdUpload(@RequestBody BlZycc blZycc) {
|
||||
blZycc.setPaperid(blZycc.getXnpaperid());
|
||||
blZycc.setFilePath(blZycc.getXnfilePath());
|
||||
BlZycc blZyccPar = blZyccService.xfwbdUpload(blZycc);
|
||||
return Result.OK(blZyccPar);
|
||||
}
|
||||
|
||||
@AutoLog(value = "小范围比对开始检测")
|
||||
@ApiOperation(value="小范围比对开始检测", notes="小范围比对开始检测")
|
||||
@PostMapping(value = "/xfwbdKsjc")
|
||||
public Result<String> xfwbdKsjc(@RequestBody BlZycc blZycc) {
|
||||
blZyccService.xfwbdKsjc(blZycc);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@AutoLog(value = "小范围比对查询检测结果")
|
||||
@ApiOperation(value="小范围比对查询检测结果", notes="小范围比对查询检测结果")
|
||||
@PostMapping(value = "/xfwbdCxjcjg")
|
||||
public Result<Map<String,String>> xfwbdCxjcjg(@RequestBody BlZycc blZycc) {
|
||||
blZycc.setPaperid(blZycc.getXnpaperid());
|
||||
Map<String,String> map = blZyccService.xfwbdCxjcjg(blZycc);
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@AutoLog(value = "维普aigc上传")
|
||||
@ApiOperation(value="维普aigc上传", notes="维普aigc上传")
|
||||
@PostMapping(value = "/aigcUpload")
|
||||
public Result<BlZycc> aigcUpload(@RequestBody BlZycc blZycc) {
|
||||
blZycc.setPaperid(blZycc.getAigcpaperid());
|
||||
blZycc.setFilePath(blZycc.getAigcfilePath());
|
||||
BlZycc blZyccPar = blZyccService.aigcUpload(blZycc);
|
||||
return Result.OK(blZyccPar);
|
||||
}
|
||||
|
||||
@AutoLog(value = "AIGC开始检测")
|
||||
@ApiOperation(value="AIGC开始检测", notes="AIGC开始检测")
|
||||
@PostMapping(value = "/aigcKsjc")
|
||||
public Result<String> aigcKsjc(@RequestBody BlZycc blZycc) {
|
||||
blZyccService.aigcKsjc(blZycc);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
@AutoLog(value = "AIGC获取检测结果")
|
||||
@ApiOperation(value="AIGC获取检测结果", notes="AIGC获取检测结果")
|
||||
@PostMapping(value = "/aigcCxjcjg")
|
||||
public Result<Map<String,String>> aigcCxjcjg(@RequestBody BlZycc blZycc) {
|
||||
blZycc.setPaperid(blZycc.getAigcpaperid());
|
||||
Map<String,String> map = blZyccService.aigcCxjcjg(blZycc);
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@AutoLog(value = "获取图片比对人数接口")
|
||||
@ApiOperation(value="获取图片比对人数接口", notes="获取图片比对人数接口")
|
||||
@PostMapping(value = "/getPicPerno")
|
||||
public Result<Map<String,String>> getPicPerno(@RequestBody BlZycc blZycc) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
// String sign = authService.getAuth();
|
||||
// System.out.println("sign:--->"+sign);
|
||||
String filePath = uploadpath+"/"+blZycc.getFacefilePath();
|
||||
String ret = authService.faceDetect(filePath);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
JSONObject object2= JSONObject.parseObject(object.get("result").toString());
|
||||
map.put("facenum",object2.getString("face_num"));
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "获取图片比对人数接口")
|
||||
@ApiOperation(value="获取图片比对人数接口", notes="获取图片比对人数接口")
|
||||
@PostMapping(value = "/getRlltj")
|
||||
public Result<Map<String,String>> getRlltj(@RequestBody BlZycc blZycc) {
|
||||
Map<String,String> map = new HashMap<>();
|
||||
// String sign = authService.getAuth();
|
||||
// System.out.println("sign:--->"+sign);
|
||||
String filePath = uploadpath+"/"+blZycc.getRllfilePath();
|
||||
String ret = authService.body_num(filePath);
|
||||
map.put("ret--->",ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
// JSONObject object2= JSONObject.parseObject(object.get("result").toString());
|
||||
map.put("personnum",object.getString("person_num"));
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package org.jeecg.modules.kc.blZycc.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: bl_zycc
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_zycc")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="bl_zycc对象", description="bl_zycc")
|
||||
public class BlZycc 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;
|
||||
/**filePath*/
|
||||
@Excel(name = "filePath", width = 15)
|
||||
@ApiModelProperty(value = "filePath")
|
||||
private java.lang.String filePath;
|
||||
|
||||
private String paperid;
|
||||
private String cateid;
|
||||
private String catename;
|
||||
private String content;
|
||||
// private String message;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String xnpaperid;
|
||||
@TableField(exist = false)
|
||||
private String aigcpaperid;
|
||||
@TableField(exist = false)
|
||||
private String xnfilePath;
|
||||
@TableField(exist = false)
|
||||
private String aigcfilePath;
|
||||
@TableField(exist = false)
|
||||
private String message;
|
||||
@TableField(exist = false)
|
||||
private String facefilePath;
|
||||
@TableField(exist = false)
|
||||
private String rllfilePath;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.blZycc.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.blZycc.entity.BlZycc;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: bl_zycc
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BlZyccMapper extends BaseMapper<BlZycc> {
|
||||
|
||||
}
|
||||
|
|
@ -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.blZycc.mapper.BlZyccMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.jeecg.modules.kc.blZycc.service;
|
||||
|
||||
import org.jeecg.modules.kc.blZycc.entity.BlZycc;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: bl_zycc
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBlZyccService extends IService<BlZycc> {
|
||||
|
||||
public BlZycc zyccUpload(BlZycc blZycc);
|
||||
public String wwKsjc(BlZycc blZycc);
|
||||
public Map<String,String> wwCxjcjg(BlZycc blZycc);
|
||||
|
||||
BlZycc aigcUpload(BlZycc blZycc);
|
||||
|
||||
BlZycc xfwbdUpload(BlZycc blZycc);
|
||||
|
||||
public String xfwbdKsjc(BlZycc blZycc);
|
||||
|
||||
public Map<String,String> xfwbdCxjcjg(BlZycc blZycc);
|
||||
|
||||
public String aigcKsjc(BlZycc blZycc);
|
||||
|
||||
public Map<String,String> aigcCxjcjg(BlZycc blZycc);
|
||||
}
|
||||
|
|
@ -0,0 +1,598 @@
|
|||
package org.jeecg.modules.kc.blZycc.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.util.PmsUtil;
|
||||
import org.jeecg.modules.kc.blZycc.entity.BlZycc;
|
||||
import org.jeecg.modules.kc.blZycc.mapper.BlZyccMapper;
|
||||
import org.jeecg.modules.kc.blZycc.service.IBlZyccService;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.activation.MimetypesFileTypeMap;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: bl_zycc
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BlZyccServiceImpl extends ServiceImpl<BlZyccMapper, BlZycc> implements IBlZyccService {
|
||||
|
||||
|
||||
private static String uploadpath;//SpringContextUtils.getApplicationContext().getEnvironment().getProperty("jeecg.path.upload")
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
public void setUploadPath(String uploadPath) {
|
||||
this.uploadpath = uploadPath;
|
||||
}
|
||||
|
||||
private static String weipuId;
|
||||
|
||||
@Value("${weipu.userId}")
|
||||
public void setWeipuId(String weipuId) {
|
||||
this.weipuId = weipuId;
|
||||
}
|
||||
|
||||
|
||||
private static String weipuKey;
|
||||
@Value("${weipu.userKey}")
|
||||
public void setWeipuKey(String weipuKey) {
|
||||
this.weipuKey = weipuKey;
|
||||
}
|
||||
|
||||
private static String cateid = "20241111111111";//范围库唯一标识
|
||||
private static String catename = "测试库";//范围库名称
|
||||
|
||||
//维普外网上传
|
||||
@Override
|
||||
public BlZycc zyccUpload(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/toole/jianceorgan/papersubmit.aspx";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String fileName = uploadpath+"/"+blZycc.getFilePath();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
|
||||
String title = titlePar.split("_")[0];
|
||||
textMap.put("title", title);
|
||||
textMap.put("author", "测试作者A");
|
||||
//设置file的name,路径
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
fileMap.put("file", fileName);
|
||||
String contentType = "";//image/png
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1-------->"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
String listpaper = object.getString("listpaper");
|
||||
JSONArray jsonArray = (JSONArray) JSONArray.parse(listpaper);
|
||||
JSONObject object2= jsonArray.getJSONObject(0);
|
||||
String paperid = object2.getString("paperid");
|
||||
System.out.println("2-------->"+paperid);
|
||||
blZycc.setPaperid(paperid);
|
||||
baseMapper.insert(blZycc);
|
||||
|
||||
//提交后直接开始检测
|
||||
String message = wwKsjc(blZycc);
|
||||
System.out.println("21-------->"+message);
|
||||
blZycc.setMessage(message);
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
}
|
||||
return blZycc;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String wwKsjc(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/toole/jianceorgan/paperbegincheck.aspx";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = blZycc.getPaperid();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("paperids", paperid);//资源id
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1--xfwbdKsjc------>"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
String message = object.getString("message");
|
||||
if("true".equals(object.getString("success"))){//返回值只有{"success":true,"message":"提交比对成功,资源开始比对..."}
|
||||
System.out.println("message----->"+message);
|
||||
}else{
|
||||
System.out.println("3--xfwbdKsjc------>");
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,String> wwCxjcjg(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/toole/jianceorgan/paperlist.aspx";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = blZycc.getPaperid();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("paperids", paperid);//资源id,可多个,用逗号分割
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1-------->"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
//{"success":true,"message":"查询成功", "datalist":[{"dataid":568,"message":"","paperguid":"5c384d6bd69y9ba9","papertitle":"","filestateid":2,"paperword":1958,"percentage":0,"duplicatepercentage":0,"quotepercentage":0,"paichupercentage":0,"selfyypercentage":0,"ownpercentage":100,"authorpercentage":0,"checkdate":"2024-04-13 13:51:51","paperviewurl":"https://vims.fanyu.com/toole/smallcheck/getonlineurl?guid=5c384d6bd69y9ba9","paperdownurl":"https://vims.fanyu.com/toole/smallcheck/getdownloadurl?guid=5c384d6bd69y9ba9"}]}
|
||||
//filestateid 检测状态{0未检测,1检测中,2检测完成, 3检测失败}
|
||||
String listpaper = object.getString("listpaper");
|
||||
JSONArray jsonArray = (JSONArray) JSONArray.parse(listpaper);
|
||||
JSONObject object2= jsonArray.getJSONObject(0);
|
||||
String filestateid = object2.getString("filestateid");
|
||||
if(StringUtils.equals(filestateid,"0")){
|
||||
System.out.println(paperid+":未检测");
|
||||
}else if(StringUtils.equals(filestateid,"1")){
|
||||
System.out.println(paperid+":检测中");
|
||||
}else if(StringUtils.equals(filestateid,"2")){
|
||||
System.out.println(paperid+":检测完成");
|
||||
}else if(StringUtils.equals(filestateid,"3")){
|
||||
System.out.println(paperid+":检测失败;"+object2.getString("message"));
|
||||
}else{
|
||||
System.out.println(paperid+":当前状态:"+filestateid+";"+object2.getString("message"));
|
||||
}
|
||||
System.out.println("listpaper----->"+listpaper);//结果结合
|
||||
System.out.println("object2----->"+object2);//实际单挑数据结果
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("duplicatepercentage",object2.getString("duplicatepercentage"));//复写率
|
||||
map.put("paperdownurl",object2.getString("paperdownurl"));//报告下载地址
|
||||
map.put("paperword",object2.getString("paperword"));//论文字数
|
||||
map.put("paichupercentage",object2.getString("paichupercentage"));//他引率
|
||||
map.put("paperviewurl",object2.getString("paperviewurl"));//报告在线查看地址
|
||||
map.put("papertitle",object2.getString("papertitle"));//论文标题
|
||||
map.put("ownpercentage",object2.getString("ownpercentage"));//自写率
|
||||
map.put("percentage",object2.getString("percentage"));//相似率
|
||||
map.put("paperguid",object2.getString("paperguid"));//报告编号
|
||||
map.put("quotepercentage",object2.getString("quotepercentage"));//引用率
|
||||
map.put("selfyypercentage",object2.getString("selfyypercentage"));//自引率
|
||||
map.put("authorpercentage",object2.getString("authorpercentage"));//专业术语率
|
||||
map.put("checkdate",object2.getString("checkdate"));//检测时间
|
||||
map.put("papermsg",object2.getString("papermsg"));//其他信息
|
||||
map.put("filestateid",object2.getString("filestateid"));//检测状态0:未检测;1:检测中;2:检测完成;3:检测失败;
|
||||
map.put("message",object.getString("message"));
|
||||
|
||||
return map;
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("success","false");
|
||||
map.put("message",object.getString("message"));
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//小范围比对上传文档
|
||||
@Override
|
||||
public BlZycc xfwbdUpload(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/toole/smallcheck/submitData";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String fileName = uploadpath+"/"+blZycc.getFilePath();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
|
||||
String title = titlePar.split("_")[0];
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("title", title);//标题
|
||||
textMap.put("author", "test01");//作者
|
||||
textMap.put("cateid", cateid);//范围库唯一标识
|
||||
textMap.put("catename", catename);//范围库名称
|
||||
//设置file的name,路径
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
fileMap.put("file", fileName);
|
||||
String contentType = "";//image/png
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1-------->"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
String listpaper = object.getString("datainfo");
|
||||
JSONObject object2= JSON.parseObject(listpaper);
|
||||
String paperid = object2.getString("dataid");//资源id 后续提交比对/删除文档会试用
|
||||
System.out.println("2-------->"+paperid);
|
||||
blZycc.setPaperid(paperid);
|
||||
blZycc.setXnpaperid(paperid);
|
||||
blZycc.setCateid(cateid);
|
||||
blZycc.setCatename(catename);
|
||||
baseMapper.insert(blZycc);
|
||||
|
||||
//提交后直接开始检测
|
||||
String message = xfwbdKsjc(blZycc);
|
||||
System.out.println("21-------->"+message);
|
||||
blZycc.setMessage(message);
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
}
|
||||
return blZycc;
|
||||
}
|
||||
|
||||
//小范围比对开始检测
|
||||
@Override
|
||||
public String xfwbdKsjc(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/toole/smallcheck/beginCheck";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = blZycc.getPaperid();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("cateid", cateid);//比对库的id
|
||||
textMap.put("dataids", paperid);//资源id
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1--xfwbdKsjc------>"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
// if("true".equals(object.getString("success"))){//返回值只有{"success":true,"message":"提交比对成功,资源开始比对..."}
|
||||
//
|
||||
// }else{
|
||||
// System.out.println("3--xfwbdKsjc------>");
|
||||
// }
|
||||
String message = object.getString("message");
|
||||
return message;
|
||||
}
|
||||
|
||||
//小范围比对查询检测结果
|
||||
@Override
|
||||
public Map<String,String> xfwbdCxjcjg(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/toole/smallcheck/searchCheckStatus";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = blZycc.getPaperid();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("cateid", cateid);//比对库的id
|
||||
textMap.put("dataids", paperid);//资源id
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1-------->"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
//{"success":true,"message":"查询成功", "datalist":[{"dataid":568,"message":"","paperguid":"5c384d6bd69y9ba9","papertitle":"","filestateid":2,"paperword":1958,"percentage":0,"duplicatepercentage":0,"quotepercentage":0,"paichupercentage":0,"selfyypercentage":0,"ownpercentage":100,"authorpercentage":0,"checkdate":"2024-04-13 13:51:51","paperviewurl":"https://vims.fanyu.com/toole/smallcheck/getonlineurl?guid=5c384d6bd69y9ba9","paperdownurl":"https://vims.fanyu.com/toole/smallcheck/getdownloadurl?guid=5c384d6bd69y9ba9"}]}
|
||||
//filestateid 检测状态{0未检测,1检测中,2检测完成, 3检测失败}
|
||||
String listpaper = object.getString("datalist");
|
||||
JSONArray jsonArray = (JSONArray) JSONArray.parse(listpaper);
|
||||
JSONObject object2= jsonArray.getJSONObject(0);
|
||||
String filestateid = object2.getString("filestateid");
|
||||
if(StringUtils.equals(filestateid,"0")){
|
||||
System.out.println(paperid+":未检测");
|
||||
}else if(StringUtils.equals(filestateid,"1")){
|
||||
System.out.println(paperid+":检测中");
|
||||
}else if(StringUtils.equals(filestateid,"2")){
|
||||
System.out.println(paperid+":检测完成");
|
||||
}else if(StringUtils.equals(filestateid,"3")){
|
||||
System.out.println(paperid+":检测失败;"+object2.getString("message"));
|
||||
}else{
|
||||
System.out.println(paperid+":当前状态:"+filestateid+";"+object2.getString("message"));
|
||||
}
|
||||
System.out.println("listpaper----->"+listpaper);//结果结合
|
||||
System.out.println("object2----->"+object2);//实际单挑数据结果
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("duplicatepercentage",object2.getString("duplicatepercentage"));//复写率
|
||||
map.put("paperdownurl",object2.getString("paperdownurl"));//报告下载地址
|
||||
map.put("paperword",object2.getString("paperword"));//论文字数
|
||||
map.put("paichupercentage",object2.getString("paichupercentage"));//他引率
|
||||
map.put("paperviewurl",object2.getString("paperviewurl"));//报告在线查看地址
|
||||
map.put("papertitle",object2.getString("papertitle"));//论文标题
|
||||
map.put("ownpercentage",object2.getString("ownpercentage"));//自写率
|
||||
map.put("percentage",object2.getString("percentage"));//相似率
|
||||
map.put("paperguid",object2.getString("paperguid"));//报告编号
|
||||
map.put("quotepercentage",object2.getString("quotepercentage"));//引用率
|
||||
map.put("selfyypercentage",object2.getString("selfyypercentage"));//自引率
|
||||
map.put("authorpercentage",object2.getString("authorpercentage"));//专业术语率
|
||||
map.put("checkdate",object2.getString("checkdate"));//检测时间
|
||||
map.put("papermsg",object2.getString("papermsg"));//其他信息
|
||||
map.put("filestateid",object2.getString("filestateid"));//检测状态0:未检测;1:检测中;2:检测完成;3:检测失败;
|
||||
map.put("message",object.getString("message"));
|
||||
|
||||
return map;
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("success","false");
|
||||
map.put("message",object.getString("message"));
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//aigc上传
|
||||
@Override
|
||||
public BlZycc aigcUpload(BlZycc blZycc) {
|
||||
|
||||
String url = "https://vims.fanyu.com/tool/AIGCCheck/paperSubmit";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String fileName = uploadpath+"/"+blZycc.getFilePath();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
String titlePar =fileName.substring(fileName.lastIndexOf("/")+1,fileName.length());
|
||||
String title = titlePar.split("_")[0];
|
||||
textMap.put("title", title);
|
||||
textMap.put("number", "202405112244");
|
||||
textMap.put("author", "测试作者B");
|
||||
//设置file的name,路径
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
fileMap.put("file", fileName);
|
||||
String contentType = "";//image/png
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1-------->"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
|
||||
|
||||
String listpaper = object.getString("listPaper");
|
||||
JSONArray jsonArray = (JSONArray) JSONArray.parse(listpaper);
|
||||
JSONObject object2= jsonArray.getJSONObject(0);
|
||||
String paperid = object2.getString("paperid");
|
||||
System.out.println("2-------->"+paperid);
|
||||
blZycc.setPaperid(paperid);
|
||||
blZycc.setAigcpaperid(paperid);
|
||||
baseMapper.insert(blZycc);
|
||||
|
||||
//提交后直接开始检测
|
||||
String message = aigcKsjc(blZycc);
|
||||
System.out.println("21-------->"+message);
|
||||
blZycc.setMessage(message);
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
}
|
||||
return blZycc;
|
||||
}
|
||||
|
||||
//aigc开始检测
|
||||
@Override
|
||||
public String aigcKsjc(BlZycc blZycc) {
|
||||
|
||||
String url = "https://vims.fanyu.com/tool/AIGCCheck/paperBeginCheck\n";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = blZycc.getPaperid();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("paperids", paperid);//资源id
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1--xfwbdKsjc------>"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
// if("true".equals(object.getString("success"))){//返回值只有{"success":true,"message":"提交比对成功,资源开始比对..."}
|
||||
// String message = object.getString("message");
|
||||
// System.out.println("message----->"+message);
|
||||
// }else{
|
||||
// System.out.println("3--xfwbdKsjc------>");
|
||||
// }
|
||||
String message = object.getString("message");
|
||||
return message;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String,String> aigcCxjcjg(BlZycc blZycc) {
|
||||
String url = "https://vims.fanyu.com/tool/AIGCCheck/searchPaper";
|
||||
//文件路径,文件存在,不存在的话需要先下载下来
|
||||
String paperid = blZycc.getPaperid();
|
||||
Map<String, String> textMap = new HashMap<String, String>();
|
||||
//可以设置多个input的name,value
|
||||
String sign = getSign();
|
||||
textMap.put("userid", weipuId);
|
||||
textMap.put("sign", sign);
|
||||
textMap.put("paperids", paperid);//资源id,可多个,用逗号分割
|
||||
String contentType = "";//image/png
|
||||
Map<String, String> fileMap = new HashMap<String, String>();
|
||||
String ret = formUpload(url, textMap, fileMap,contentType);
|
||||
System.out.println("1-------->"+ret);
|
||||
JSONObject object= JSONObject.parseObject(ret);
|
||||
if("true".equals(object.getString("success"))){
|
||||
//{"success":true,"message":"查询成功", "datalist":[{"dataid":568,"message":"","paperguid":"5c384d6bd69y9ba9","papertitle":"","filestateid":2,"paperword":1958,"percentage":0,"duplicatepercentage":0,"quotepercentage":0,"paichupercentage":0,"selfyypercentage":0,"ownpercentage":100,"authorpercentage":0,"checkdate":"2024-04-13 13:51:51","paperviewurl":"https://vims.fanyu.com/toole/smallcheck/getonlineurl?guid=5c384d6bd69y9ba9","paperdownurl":"https://vims.fanyu.com/toole/smallcheck/getdownloadurl?guid=5c384d6bd69y9ba9"}]}
|
||||
//filestateid 检测状态{0未检测,1检测中,2检测完成, 3检测失败}
|
||||
String listpaper = object.getString("listpaper");
|
||||
JSONArray jsonArray = (JSONArray) JSONArray.parse(listpaper);
|
||||
JSONObject object2= jsonArray.getJSONObject(0);
|
||||
String filestateid = object2.getString("filestateid");
|
||||
if(StringUtils.equals(filestateid,"0")){
|
||||
System.out.println(paperid+":未检测");
|
||||
}else if(StringUtils.equals(filestateid,"1")){
|
||||
System.out.println(paperid+":检测中");
|
||||
}else if(StringUtils.equals(filestateid,"2")){
|
||||
System.out.println(paperid+":检测完成");
|
||||
}else if(StringUtils.equals(filestateid,"3")){
|
||||
System.out.println(paperid+":检测失败;"+object2.getString("message"));
|
||||
}else{
|
||||
System.out.println(paperid+":当前状态:"+filestateid+";"+object2.getString("message"));
|
||||
}
|
||||
System.out.println("listpaper----->"+listpaper);//结果结合
|
||||
System.out.println("object2----->"+object2);//实际单挑数据结果
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
|
||||
|
||||
map.put("paperguid",object2.getString("paperguid"));//报告编号
|
||||
map.put("papertitle",object2.getString("papertitle"));//论文标题
|
||||
map.put("filestateid",object2.getString("filestateid"));//检测状态0:未检测;1:检测中;2:检测完成;3:检测失败;
|
||||
map.put("checkdate",object2.getString("checkdate"));//检测时间
|
||||
map.put("paperword",object2.getString("paperword"));//论文字数
|
||||
map.put("aiRate",object2.getString("aiRate"));//疑似ai全文占比
|
||||
map.put("humanRate",object2.getString("humanRate"));//人工占比
|
||||
map.put("paperviewurl",object2.getString("paperviewurl"));//报告在线查看地址
|
||||
map.put("paperdownurl",object2.getString("paperdownurl"));//报告下载地址
|
||||
map.put("papermsg",object2.getString("papermsg"));//其他信息
|
||||
|
||||
// map.put("duplicatepercentage",object2.getString("duplicatepercentage"));//复写率
|
||||
// map.put("paichupercentage",object2.getString("paichupercentage"));//他引率
|
||||
// map.put("ownpercentage",object2.getString("ownpercentage"));//自写率
|
||||
// map.put("percentage",object2.getString("percentage"));//相似率
|
||||
// map.put("quotepercentage",object2.getString("quotepercentage"));//引用率
|
||||
// map.put("selfyypercentage",object2.getString("selfyypercentage"));//自引率
|
||||
// map.put("authorpercentage",object2.getString("authorpercentage"));//专业术语率
|
||||
map.put("message",object.getString("message"));
|
||||
|
||||
return map;
|
||||
}else{
|
||||
System.out.println("3-------->");
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("success","false");
|
||||
map.put("message",object.getString("message"));
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//生成sign
|
||||
public static String getSign() {
|
||||
String userid = weipuId;
|
||||
String key = weipuKey;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH");
|
||||
String time = sdf.format( new Date());
|
||||
String md5Text = userid + key + time;
|
||||
String sign = org.springframework.util.DigestUtils.md5DigestAsHex((md5Text).getBytes()).toLowerCase();
|
||||
return sign;
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
* @param urlStr
|
||||
* @param textMap
|
||||
* @param fileMap
|
||||
* @param contentType 没有传入文件类型默认采用application/octet-stream
|
||||
* contentType非空采用filename匹配默认的图片类型
|
||||
* @return 返回response数据
|
||||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static String formUpload(String urlStr, Map<String, String> textMap,
|
||||
Map<String, String> fileMap,String contentType) {
|
||||
String res = "";
|
||||
HttpURLConnection conn = null;
|
||||
// boundary就是request头和上传文件内容的分隔符
|
||||
String BOUNDARY = "---------------------------123821742118716";
|
||||
try {
|
||||
URL url = new URL(urlStr);
|
||||
conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setConnectTimeout(5000);
|
||||
conn.setReadTimeout(30000);
|
||||
conn.setDoOutput(true);
|
||||
conn.setDoInput(true);
|
||||
conn.setUseCaches(false);
|
||||
conn.setRequestMethod("POST");
|
||||
conn.setRequestProperty("Connection", "Keep-Alive");
|
||||
conn.setRequestProperty("Content-Type","multipart/form-data; boundary=" + BOUNDARY);
|
||||
OutputStream out = new DataOutputStream(conn.getOutputStream());
|
||||
// text
|
||||
if (textMap != null) {
|
||||
StringBuffer strBuf = new StringBuffer();
|
||||
Iterator iter = textMap.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Map.Entry entry = (Map.Entry) iter.next();
|
||||
String inputName = (String) entry.getKey();
|
||||
String inputValue = (String) entry.getValue();
|
||||
if (inputValue == null) {
|
||||
continue;
|
||||
}
|
||||
strBuf.append("\r\n").append("--").append(BOUNDARY).append("\r\n");
|
||||
strBuf.append("Content-Disposition: form-data; name=\"" + inputName + "\"\r\n\r\n");
|
||||
strBuf.append(inputValue);
|
||||
}
|
||||
out.write(strBuf.toString().getBytes(StandardCharsets.UTF_8));
|
||||
}
|
||||
// file
|
||||
if (fileMap != null) {
|
||||
Iterator iter = fileMap.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Map.Entry entry = (Map.Entry) iter.next();
|
||||
String inputName = (String) entry.getKey();
|
||||
String inputValue = (String) entry.getValue();
|
||||
if (inputValue == null) {
|
||||
continue;
|
||||
}
|
||||
File file = new File(inputValue);
|
||||
String filename = file.getName();
|
||||
|
||||
//没有传入文件类型,同时根据文件获取不到类型,默认采用application/octet-stream
|
||||
contentType = new MimetypesFileTypeMap().getContentType(file);
|
||||
//contentType非空采用filename匹配默认的图片类型
|
||||
if(!"".equals(contentType)){
|
||||
if (filename.endsWith(".png")) {
|
||||
contentType = "image/png";
|
||||
}else if (filename.endsWith(".jpg") || filename.endsWith(".jpeg") || filename.endsWith(".jpe")) {
|
||||
contentType = "image/jpeg";
|
||||
}else if (filename.endsWith(".gif")) {
|
||||
contentType = "image/gif";
|
||||
}else if (filename.endsWith(".ico")) {
|
||||
contentType = "image/image/x-icon";
|
||||
}
|
||||
}
|
||||
if (contentType == null || "".equals(contentType)) {
|
||||
contentType = "application/octet-stream";
|
||||
}
|
||||
StringBuffer strBuf = new StringBuffer();
|
||||
strBuf.append("\r\n").append("--").append(BOUNDARY).append("\r\n");
|
||||
strBuf.append("Content-Disposition: form-data; name=\"" + inputName + "\"; filename=\"" + filename + "\"\r\n");
|
||||
strBuf.append("Content-Type:" + contentType + "\r\n\r\n");
|
||||
out.write(strBuf.toString().getBytes());
|
||||
DataInputStream in = new DataInputStream(new FileInputStream(file));
|
||||
int bytes = 0;
|
||||
byte[] bufferOut = new byte[1024];
|
||||
while ((bytes = in.read(bufferOut)) != -1) {
|
||||
out.write(bufferOut, 0, bytes);
|
||||
}
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
byte[] endData = ("\r\n--" + BOUNDARY + "--\r\n").getBytes();
|
||||
out.write(endData);
|
||||
out.flush();
|
||||
out.close();
|
||||
// 读取返回数据
|
||||
StringBuffer strBuf = new StringBuffer();
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
|
||||
String line = null;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
strBuf.append(line).append("\n");
|
||||
}
|
||||
res = strBuf.toString();
|
||||
reader.close();
|
||||
reader = null;
|
||||
} catch (Exception e) {
|
||||
System.out.println("发送POST请求出错。" + urlStr);
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (conn != null) {
|
||||
conn.disconnect();
|
||||
conn = null;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
|
@ -77,6 +77,8 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
||||
@Autowired
|
||||
private IKcEvaluationService kcEvaluationService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
|
|
@ -478,7 +480,8 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
// queryWrapper.apply("(zt = '在职' or (zt= '退休' and ytkcs-0 >0))");
|
||||
// queryWrapper.apply("dwmc in (select kkdw from kc_kkdw21_view)");
|
||||
// Step.2 获取导出数据
|
||||
List<KcExportConfigTpkwcqkjzglx> exportList = service.list(queryWrapper);
|
||||
queryWrapper.groupBy("gh,xm");
|
||||
List<KcExportConfigTpkwcqkjzglx> exportList = service.groupTklxList(queryWrapper);
|
||||
|
||||
Set<String> xqxnSet = exportList.stream().filter(x -> StringUtils.isNotBlank(x.getXqxn())).map(KcExportConfigTpkwcqkjzglx::getXqxn).collect(Collectors.toSet());
|
||||
//根据当前学期学年,硬合并出来一个数据
|
||||
|
|
@ -494,17 +497,47 @@ public class KcExportConfigTpkwcqkjzglxController extends JeecgController<KcExpo
|
|||
tjMap.put(x.getXnxq() + "-" + x.getJgh(),x);
|
||||
});
|
||||
|
||||
//------------评课统计---2024-02-29新增的-------------------
|
||||
QueryWrapper<KcEvaluation> kcEvaluationQueryWrapper = new QueryWrapper<>();
|
||||
kcEvaluationQueryWrapper.eq("xqxn",object.getXqxn());
|
||||
kcEvaluationQueryWrapper.eq(StringUtils.isNotBlank(object.getDwmc()),"dwmc",object.getDwmc());
|
||||
kcEvaluationQueryWrapper.apply("(zt = '在职' or (zt= '退休' and ytkcs-0 >0))");
|
||||
kcEvaluationQueryWrapper.groupBy("a.gh");
|
||||
|
||||
// where xqxn = #{xqxn} and (zt = '在职' or (zt= '退休' and ytkcs-0 >0))
|
||||
// <if test="code != null">
|
||||
// and tklx in (${code})
|
||||
// </if>
|
||||
// <if test="dwmc != null and dwmc != ''">
|
||||
// and dwmc = #{dwmc}
|
||||
// </if>
|
||||
// GROUP BY a.tklx,a.gh,a.xm,a.dwmc,a.ytkcs,a.rjzy
|
||||
|
||||
List<KcEvaluation> pktjList = kcEvaluationService.findTkcsTj(kcEvaluationQueryWrapper);
|
||||
Map<String,KcEvaluation> pktjMap = Maps.newHashMap();
|
||||
pktjList.forEach(x -> {
|
||||
pktjMap.put(x.getXnxq() + "-" + x.getUpuserid(),x);
|
||||
});
|
||||
//------------评课统计---2024-02-29新增的-------------------
|
||||
|
||||
//根据当前学期学年,硬合并出来一个数据
|
||||
exportList.forEach(x -> {
|
||||
x.setTkxttj("0");
|
||||
x.setYskcs("0");
|
||||
if(tjMap.containsKey(x.getXqxn() + "-" + x.getGh())){
|
||||
KcTkcstj tkcstj = tjMap.get(x.getXqxn() + "-" + x.getGh());
|
||||
x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0"));
|
||||
// x.setTkxttj(StringUtils.defaultString(tkcstj.getTkxttj(),"0"));
|
||||
x.setYskcs(StringUtils.defaultString(tkcstj.getYskcs(),"0"));
|
||||
//x.setXqxn(kcXqxnHistory.getTitle());
|
||||
}
|
||||
//------------评课统计---2024-02-29新增的-------------------
|
||||
if(pktjMap.containsKey(x.getXqxn() + "-" + x.getGh())){
|
||||
KcEvaluation pkcstj = pktjMap.get(x.getXqxn() + "-" + x.getGh());
|
||||
x.setTkxttj(StringUtils.defaultString(pkcstj.getPkNum()+"","0"));
|
||||
}
|
||||
//------------评课统计---2024-02-29新增的-------------------
|
||||
});
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
|
|
|
|||
|
|
@ -44,4 +44,6 @@ public interface KcExportConfigTpkwcqkjzglxMapper extends BaseMapper<KcExportCon
|
|||
KcExportConfigTpkwcqkjzglx getDqxqtjlist(KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx);
|
||||
|
||||
List<KcExportConfigTpkwcqkjzglx> getBxqSaveList(KcExportConfigTpkwcqkjzglx kcExportConfigTpkwcqkjzglx);
|
||||
|
||||
List<KcExportConfigTpkwcqkjzglx> groupTklxList(@Param(Constants.WRAPPER) QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,6 +82,9 @@
|
|||
<if test='kcExportConfigTpkwcqkjzglx.type != null and kcExportConfigTpkwcqkjzglx.type == "2"'>
|
||||
and ytkcs -0 > sjtkcs - 0
|
||||
</if>
|
||||
<if test='kcExportConfigTpkwcqkjzglx.xm != null and kcExportConfigTpkwcqkjzglx.xm != ""'>
|
||||
and xm like concat('%',#{kcExportConfigTpkwcqkjzglx.xm} ,'%')
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
|
@ -102,8 +105,8 @@
|
|||
SELECT
|
||||
kc.dwjc as dwmc,
|
||||
total.total_sum,
|
||||
ready.ready_sum,
|
||||
round(ready.ready_sum / total.total_sum,2) as ytkcs
|
||||
ifnull(ready.ready_sum,'0') as ready_sum,
|
||||
round( ifnull(ready.ready_sum,'0') / total.total_sum, 2 ) AS ytkcs
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
|
|
@ -155,7 +158,7 @@
|
|||
count( 'x' ) AS pj_sum
|
||||
FROM
|
||||
kc_evaluation a,
|
||||
( SELECT start_time, end_time FROM kc_xqxn_history WHERE title = '2023秋' ) b,
|
||||
( SELECT bxqkssj AS start_time, bxqjssj AS end_time FROM kc_sys_config WHERE id = '1') b,
|
||||
(
|
||||
SELECT
|
||||
xqxn,
|
||||
|
|
@ -233,7 +236,10 @@
|
|||
select a.tklx,a.gh,a.xm,a.dwmc,a.ytkcs,a.rjzy,count(c.upuserid) as sjtkcs from kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN kc_xqxn_history b on a.xqxn = b.title
|
||||
LEFT JOIN kc_evaluation c on a.gh = c.upuserid and c.up_date BETWEEN b.start_time and b.end_time
|
||||
where xqxn = #{xqxn} and (zt = '在职' or (zt= '退休' and ytkcs-0 >0)) and tklx in (${code})
|
||||
where xqxn = #{xqxn} and (zt = '在职' or (zt= '退休' and ytkcs-0 >0))
|
||||
<if test="code != null">
|
||||
and tklx in (${code})
|
||||
</if>
|
||||
<if test="dwmc != null and dwmc != ''">
|
||||
and dwmc = #{dwmc}
|
||||
</if>
|
||||
|
|
@ -270,7 +276,7 @@
|
|||
xm,
|
||||
sf,
|
||||
zt,
|
||||
ytkcs,
|
||||
ytkcs,+
|
||||
rjzy,
|
||||
#{xqxn} AS xqxn
|
||||
FROM
|
||||
|
|
@ -279,4 +285,10 @@
|
|||
xqxn = #{type}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="groupTklxList" resultType="org.jeecg.modules.kc.config.entity.KcExportConfigTpkwcqkjzglx">
|
||||
select max(id) as id,gh,GROUP_CONCAT(tklx) as tklx,dwmc,xm,sf,zt,max(ytkcs) as ytkcs,rjzy,xqxn
|
||||
from kc_export_config_tpkwcqkjzglx
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -42,4 +42,6 @@ public interface IKcExportConfigTpkwcqkjzglxService extends IService<KcExportCon
|
|||
|
||||
//获取是否有本学期数据
|
||||
List<KcExportConfigTpkwcqkjzglx> getSfybxqsj();
|
||||
|
||||
List<KcExportConfigTpkwcqkjzglx> groupTklxList(QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -251,8 +251,11 @@ public class KcExportConfigTpkwcqkjzglxServiceImpl extends ServiceImpl<KcExportC
|
|||
Xxhbuser xxhbUser = xxhbuserService.getOne(uqw);
|
||||
kcExportConfigTpkwcqkjzglx.setDwmc(xxhbUser.getDwmc());
|
||||
}
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
kcExportConfigTpkwcqkjzglx.setXqxn(kcSysConfig.getFlag1());
|
||||
if(StringUtils.isEmpty(kcExportConfigTpkwcqkjzglx.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
kcExportConfigTpkwcqkjzglx.setXqxn(kcSysConfig.getFlag1());
|
||||
}
|
||||
|
||||
|
||||
IPage<KcExportConfigTpkwcqkjzglx> infolist = baseMapper.getListByCode(page,kcExportConfigTpkwcqkjzglx);
|
||||
return infolist;
|
||||
|
|
@ -336,9 +339,13 @@ public class KcExportConfigTpkwcqkjzglxServiceImpl extends ServiceImpl<KcExportC
|
|||
Xxhbuser xxhbUser = xxhbuserService.getOne(uqw);
|
||||
kcExportConfigTpkwcqkjzglxXytktj.setDwmc(xxhbUser.getDwmc());
|
||||
}
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
kcExportConfigTpkwcqkjzglxXytktj.setXqxn(kcSysConfig.getFlag1());
|
||||
// KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
// kcExportConfigTpkwcqkjzglxXytktj.setXqxn(kcSysConfig.getFlag1());
|
||||
|
||||
if(StringUtils.isEmpty(kcExportConfigTpkwcqkjzglxXytktj.getXqxn())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
kcExportConfigTpkwcqkjzglxXytktj.setXqxn(kcSysConfig.getFlag1());
|
||||
}
|
||||
List<KcExportConfigTpkwcqkjzglxXytktj> infolist = baseMapper.getListByCodeXytktj(kcExportConfigTpkwcqkjzglxXytktj);
|
||||
return infolist;
|
||||
}
|
||||
|
|
@ -367,4 +374,9 @@ public class KcExportConfigTpkwcqkjzglxServiceImpl extends ServiceImpl<KcExportC
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcExportConfigTpkwcqkjzglx> groupTklxList(QueryWrapper<KcExportConfigTpkwcqkjzglx> queryWrapper) {
|
||||
return baseMapper.groupTklxList(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ public class RefreshLiveServer extends BaseSync {
|
|||
}else{
|
||||
v.setType("yellow");
|
||||
}
|
||||
v.setForceState(v.getType());
|
||||
});
|
||||
kcZhihuijiaoshiStateLogService.saveBatch(stateLogMap.values());
|
||||
//更新全部的修改时间(新规则,分批展示时间)
|
||||
|
|
|
|||
|
|
@ -107,6 +107,73 @@ public class SyncEvaluationsYbtkbStat extends BaseSync {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<KcEvaluationsStat> ybtkb2list = kcEvaluationsStatService.getYbtkbTwoSyncList();
|
||||
for(KcEvaluationsStat KcEvaluationsStat:ybtkb2list){
|
||||
KcEvaluationsStat.setXqxn(kcSysConfig.getFlag1());
|
||||
List<KcEvaluationsStat> entityList = kcEvaluationsStatService.getYbtkbJxsjSyncList(KcEvaluationsStat);
|
||||
if(entityList!=null && entityList.size()>0){
|
||||
KcEvaluationsStat entity = entityList.get(0);
|
||||
String col1726 = entity.getCol1726();
|
||||
if(col1726.length()>0){
|
||||
System.out.println("ybtkb----"+entity.getCol00());
|
||||
String arr[] = col1726.split("@");
|
||||
try {
|
||||
entity.setCol18(arr[1]);
|
||||
}catch (Exception e){
|
||||
entity.setCol18("");
|
||||
}
|
||||
try {
|
||||
entity.setCol19(arr[2]);
|
||||
}catch (Exception e){
|
||||
entity.setCol19("");
|
||||
}
|
||||
try {
|
||||
entity.setCol20(arr[3]);
|
||||
}catch (Exception e){
|
||||
entity.setCol20("");
|
||||
}
|
||||
try {
|
||||
entity.setCol21(arr[4]);
|
||||
}catch (Exception e){
|
||||
entity.setCol21("");
|
||||
}
|
||||
try {
|
||||
entity.setCol22(arr[5]);
|
||||
}catch (Exception e){
|
||||
entity.setCol22("");
|
||||
}
|
||||
try {
|
||||
entity.setCol23(arr[6]);
|
||||
}catch (Exception e){
|
||||
entity.setCol23("");
|
||||
}
|
||||
try {
|
||||
entity.setCol24(arr[7]);
|
||||
}catch (Exception e){
|
||||
entity.setCol24("");
|
||||
}
|
||||
try {
|
||||
entity.setCol25(arr[8]);
|
||||
}catch (Exception e){
|
||||
entity.setCol25("");
|
||||
}
|
||||
try {
|
||||
entity.setCol26(arr[9]);
|
||||
}catch (Exception e){
|
||||
entity.setCol26("");
|
||||
}
|
||||
try {
|
||||
entity.setCol1726(arr[0]);
|
||||
}catch (Exception e){
|
||||
entity.setCol1726("");
|
||||
}
|
||||
kcEvaluationsStatService.save(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//最后的保存
|
||||
// kcEvaluationsStatService.saveBatch(inslist);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package org.jeecg.modules.kc.grab.SynchronizationService;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
|
|
@ -11,6 +12,8 @@ import org.jeecg.modules.kc.kcKetangbiaoSkrqLog.entity.KcKetangbiaoSkrqLog;
|
|||
import org.jeecg.modules.kc.kcKetangbiaoSkrqLog.service.IKcKetangbiaoSkrqLogService;
|
||||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.kcTtksdpz.entity.KcTtksdpz;
|
||||
import org.jeecg.modules.kc.kcTtksdpz.service.IKcTtksdpzService;
|
||||
import org.jeecg.modules.kc.kcXqxnHistory.service.IKcXqxnHistoryService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
|
|
@ -51,6 +54,9 @@ public class SyncKcktStat extends BaseSync {
|
|||
@Autowired
|
||||
private IKcKetangbiaoSkrqLogService kcKetangbiaoSkrqLogService;
|
||||
|
||||
@Autowired
|
||||
private IKcTtksdpzService kcTtksdpzService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
|
|
@ -73,109 +79,178 @@ public class SyncKcktStat extends BaseSync {
|
|||
//-----------------修改课程表数据------------------------
|
||||
KcKechengbiao kcKechengbiao = new KcKechengbiao();
|
||||
kcKechengbiao.setXqxn(kcSysConfig.getFlag1());
|
||||
kcKechengbiao.setSkjs("刘婷");
|
||||
List<KcKechengbiao> kckblist = kcKechengbiaoService.getKechengbiaoList(kcKechengbiao);
|
||||
for(KcKechengbiao KcKechengbiaoPar:kckblist){
|
||||
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||
kcKechengbiaoQueryWrapper.eq("kcbh",KcKechengbiaoPar.getKcbh());
|
||||
kcKechengbiaoQueryWrapper.eq("kcmc",KcKechengbiaoPar.getKcmc());
|
||||
kcKechengbiaoQueryWrapper.eq("jgh",KcKechengbiaoPar.getJgh());
|
||||
kcKechengbiaoQueryWrapper.eq("skjs",KcKechengbiaoPar.getSkjs());
|
||||
kcKechengbiaoQueryWrapper.eq("rwbh",KcKechengbiaoPar.getRwbh());
|
||||
kcKechengbiaoQueryWrapper.eq("kkdwid",KcKechengbiaoPar.getKkdwid());
|
||||
kcKechengbiaoQueryWrapper.eq("kcxz",KcKechengbiaoPar.getKcxz());
|
||||
// kcKechengbiaoQueryWrapper.eq("skdd",KcKechengbiaoPar.getSkdd());
|
||||
kcKechengbiaoQueryWrapper.eq("sksj",KcKechengbiaoPar.getSksj());
|
||||
kcKechengbiaoQueryWrapper.eq("jkzc",KcKechengbiaoPar.getJkzc());
|
||||
kcKechengbiaoQueryWrapper.eq("xf",KcKechengbiaoPar.getXf());
|
||||
kcKechengbiaoQueryWrapper.eq("xnxq",KcKechengbiaoPar.getXnxq());
|
||||
kcKechengbiaoQueryWrapper.eq("kcdl",KcKechengbiaoPar.getKcdl());
|
||||
List<KcKechengbiao> KcKechengbiaoInsList = kcKechengbiaoService.list(kcKechengbiaoQueryWrapper);
|
||||
if(KcKechengbiaoInsList!=null&&KcKechengbiaoInsList.size()>0){
|
||||
for(KcKechengbiao KcKechengbiao : KcKechengbiaoInsList){
|
||||
String id = KcKechengbiao.getId();
|
||||
BeanUtils.copyProperties(KcKechengbiaoPar,KcKechengbiao);
|
||||
KcKechengbiao.setId(id);
|
||||
kcKechengbiaoService.updateById(KcKechengbiao);
|
||||
// List<KcKechengbiao> kckblist = kcKechengbiaoService.getKechengbiaoList(kcKechengbiao);
|
||||
// for(KcKechengbiao KcKechengbiaoPar:kckblist){
|
||||
// QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||
// kcKechengbiaoQueryWrapper.eq("kcbh",KcKechengbiaoPar.getKcbh());
|
||||
// kcKechengbiaoQueryWrapper.eq("kcmc",KcKechengbiaoPar.getKcmc());
|
||||
// kcKechengbiaoQueryWrapper.eq("jgh",KcKechengbiaoPar.getJgh());
|
||||
// kcKechengbiaoQueryWrapper.eq("skjs",KcKechengbiaoPar.getSkjs());
|
||||
// kcKechengbiaoQueryWrapper.eq("rwbh",KcKechengbiaoPar.getRwbh());
|
||||
// kcKechengbiaoQueryWrapper.eq("kkdwid",KcKechengbiaoPar.getKkdwid());
|
||||
// kcKechengbiaoQueryWrapper.eq("kcxz",KcKechengbiaoPar.getKcxz());
|
||||
//// kcKechengbiaoQueryWrapper.eq("skdd",KcKechengbiaoPar.getSkdd());
|
||||
// kcKechengbiaoQueryWrapper.eq("sksj",KcKechengbiaoPar.getSksj());
|
||||
// kcKechengbiaoQueryWrapper.eq("jkzc",KcKechengbiaoPar.getJkzc());
|
||||
// kcKechengbiaoQueryWrapper.eq("xf",KcKechengbiaoPar.getXf());
|
||||
// kcKechengbiaoQueryWrapper.eq("xnxq",KcKechengbiaoPar.getXnxq());
|
||||
// kcKechengbiaoQueryWrapper.eq("kcdl",KcKechengbiaoPar.getKcdl());
|
||||
// List<KcKechengbiao> KcKechengbiaoInsList = kcKechengbiaoService.list(kcKechengbiaoQueryWrapper);
|
||||
// if(KcKechengbiaoInsList!=null&&KcKechengbiaoInsList.size()>0){
|
||||
// for(KcKechengbiao KcKechengbiao : KcKechengbiaoInsList){
|
||||
// String id = KcKechengbiao.getId();
|
||||
// BeanUtils.copyProperties(KcKechengbiaoPar,KcKechengbiao);
|
||||
// KcKechengbiao.setId(id);
|
||||
// kcKechengbiaoService.updateById(KcKechengbiao);
|
||||
// }
|
||||
// }else{
|
||||
// kcKechengbiaoService.saveOne(KcKechengbiaoPar);
|
||||
// }
|
||||
// }
|
||||
// //-----------------初始化数据------------------------
|
||||
//
|
||||
// //------------------去除课程表重复数据 20231024新增-----------------
|
||||
// KcKechengbiao KcKechengbiao = new KcKechengbiao();
|
||||
// KcKechengbiao.setXqxn(kcSysConfig.getFlag1());
|
||||
// kcKechengbiaoService.removeCfsj(KcKechengbiao);
|
||||
// //------------------去除课程表重复数据 20231024新增-----------------
|
||||
//
|
||||
//
|
||||
//
|
||||
// //-----------------所有的数据都变成无效 20240321------------
|
||||
// KcKechengbiao kcbAll = new KcKechengbiao();
|
||||
// kcbAll.setXnxq(kcSysConfig.getFlag1());
|
||||
// kcKechengbiaoService.updateAllFlag(kcbAll);//所有的数据都变成无效
|
||||
// kcKechengbiaoService.updateYxByXxhbkckb(kcbAll);//根据条件变成有效数据
|
||||
//
|
||||
// //-----------------所有的数据都变成无效 20240321------------
|
||||
//
|
||||
//
|
||||
//
|
||||
// //------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
|
||||
// KcKechengbiao ktbExculde = new KcKechengbiao();
|
||||
// ktbExculde.setXnxq(kcSysConfig.getFlag1());
|
||||
// kcKechengbiaoService.updateKechengExculde(ktbExculde);
|
||||
// //------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// //-------------------删除本年的课程数据冰倩是当天及以后的----------------------
|
||||
// QueryWrapper<KcKetangbiao> KcKetangbiaoQueryWrapper = new QueryWrapper<>();
|
||||
// KcKetangbiaoQueryWrapper.eq("xnxq",kcSysConfig.getFlag1());
|
||||
// KcKetangbiaoQueryWrapper.ge("skrq",DateUtils.formatDate(dateNow,"yyyy-MM-dd"));
|
||||
// kcKetangbiaoService.remove(KcKetangbiaoQueryWrapper);
|
||||
// //-------------------删除本年的课程数据冰倩是当天及以后的----------------------
|
||||
//
|
||||
// String bxqkssj = kcSysConfig.getBxqkssj();
|
||||
// //插入数据
|
||||
// KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
// kcKetangbiao.setXnxq(kcSysConfig.getFlag1());
|
||||
// kcKetangbiao.setFlag("0");
|
||||
// List<KcKetangbiao> list = kcKetangbiaoService.selectSyncList(kcKetangbiao);
|
||||
// List<KcKetangbiao> arrayList = new ArrayList<>();
|
||||
// for(int i=0;i<list.size();i++){
|
||||
// KcKetangbiao kcKetangbiaoOld = list.get(i);
|
||||
// try {
|
||||
// String jkzc[] = kcKetangbiaoOld.getJkzc().split(",");
|
||||
// String week = kcKetangbiaoOld.getWeek();
|
||||
// for(int j=0;j<jkzc.length;j++){
|
||||
// KcKetangbiao kcKetangbiaoAddNew = new KcKetangbiao();
|
||||
// int djz = Integer.parseInt(jkzc[j]);
|
||||
// BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
|
||||
// kcKetangbiaoAddNew.setId(null);
|
||||
// //skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+week
|
||||
// int addSj = (djz -1 )*7+Integer.parseInt(week)-1;
|
||||
// Date date = DateUtils.parseDate(bxqkssj,"yyyy-MM-dd");
|
||||
// Calendar c = Calendar.getInstance();
|
||||
// c.setTime(date);
|
||||
// c.add(Calendar.DAY_OF_MONTH, addSj);
|
||||
// String skrq = DateUtils.formatDate(c,"yyyy-MM-dd");
|
||||
// String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
// //判断生成数据的skrq是否大于等于当前日期,如果满足则进行新增,否则不动
|
||||
// if(DateUtils.parseDate(skrq,"yyyy-MM-dd").getTime()>=DateUtils.parseDate(dasj,"yyyy-MM-dd").getTime()){
|
||||
// kcKetangbiaoAddNew.setSkrq(skrq);
|
||||
// kcKetangbiaoAddNew.setDijizhou(djz);
|
||||
// kcKetangbiaoAddNew.setXnxq(kcSysConfig.getFlag1());
|
||||
// arrayList.add(kcKetangbiaoAddNew);
|
||||
// }
|
||||
// }
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// kcKetangbiaoService.saveBatch(arrayList);
|
||||
//
|
||||
// //修改智慧教室关联的课堂表id-- 清洗智慧教室数据
|
||||
// kcKetangbiaoService.updateJsbh();
|
||||
//
|
||||
// //修改智慧教室关联的课堂表id-- 清洗智慧教室数据
|
||||
// KcKetangbiao kcKetangbiaoup = new KcKetangbiao();
|
||||
// kcKetangbiaoup.setSkxs(1);
|
||||
// kcKetangbiaoup.setXnxq(kcSysConfig.getFlag1());
|
||||
// kcKetangbiaoService.updateSkxs(kcKetangbiaoup);
|
||||
//
|
||||
// //修改调停课时间
|
||||
// String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
//
|
||||
// QueryWrapper<KcKetangbiaoSkrqLog> kcKetangbiaoSkrqLogQueryWrapper = new QueryWrapper<>();
|
||||
// kcKetangbiaoSkrqLogQueryWrapper.ge("jsrq",dasj);
|
||||
// List<KcKetangbiaoSkrqLog> list1 = kcKetangbiaoSkrqLogService.list(kcKetangbiaoSkrqLogQueryWrapper);
|
||||
// for(KcKetangbiaoSkrqLog KcKetangbiaoSkrqLog:list1){
|
||||
// UpdateWrapper<KcKetangbiao> KcKetangbiaoUpdateWrapper = new UpdateWrapper<>();
|
||||
// KcKetangbiaoUpdateWrapper.set("skrq",KcKetangbiaoSkrqLog.getTzrq());
|
||||
// KcKetangbiaoUpdateWrapper.eq("skrq",KcKetangbiaoSkrqLog.getSkrq());
|
||||
// kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//---------------------20240416新增手动调停课逻辑------------------
|
||||
try {
|
||||
String dqsj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
QueryWrapper<KcTtksdpz> kcTtksdpzQueryWrapper = new QueryWrapper<>();
|
||||
kcTtksdpzQueryWrapper.eq("fjsj",dqsj);
|
||||
List<KcTtksdpz> sdpzList = kcTtksdpzService.list(kcTtksdpzQueryWrapper);
|
||||
// 停课:代表在放假时间内,不上课
|
||||
// 调课:放假时间上调课时间内的课程
|
||||
for(KcTtksdpz kcTtksdpz:sdpzList){
|
||||
String tklx = kcTtksdpz.getTklx();
|
||||
if(StringUtils.equals("0",tklx)){//调课
|
||||
String fjsj = DateUtils.formatDate(kcTtksdpz.getFjsj(),"yyyy-MM-dd");//放假时间
|
||||
String tksj = DateUtils.formatDate(kcTtksdpz.getTksj(),"yyyy-MM-dd");//调课时间
|
||||
|
||||
//更具调课时间修改成放假时间
|
||||
UpdateWrapper<KcKetangbiao> KcKetangbiaoUpdateWrapper = new UpdateWrapper<>();
|
||||
KcKetangbiaoUpdateWrapper.set("skrq",fjsj);
|
||||
KcKetangbiaoUpdateWrapper.set("is_delete","0");
|
||||
KcKetangbiaoUpdateWrapper.eq("skrq",tksj);
|
||||
kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper);
|
||||
|
||||
kcTtksdpz.setZxsj(dateNow);
|
||||
kcTtksdpz.setZxsql1("update kc_ketangbiao set skrq = '"+fjsj+"' , is_delete = '0' where skrq = '"+tksj+"'");
|
||||
kcTtksdpzService.updateById(kcTtksdpz);
|
||||
}else if(StringUtils.equals("1",tklx)){//停课
|
||||
String fjsj = DateUtils.formatDate(kcTtksdpz.getFjsj(),"yyyy-MM-dd");//放假时间
|
||||
|
||||
//更具调课时间修改成放假时间
|
||||
UpdateWrapper<KcKetangbiao> KcKetangbiaoUpdateWrapper = new UpdateWrapper<>();
|
||||
KcKetangbiaoUpdateWrapper.set("is_delete","1");
|
||||
KcKetangbiaoUpdateWrapper.eq("skrq",fjsj);
|
||||
kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper);
|
||||
|
||||
kcTtksdpz.setZxsj(dateNow);
|
||||
kcTtksdpz.setZxsql1("update kc_ketangbiao set is_delete = '0' where skrq = '"+fjsj+"'");
|
||||
kcTtksdpzService.updateById(kcTtksdpz);
|
||||
}
|
||||
}else{
|
||||
kcKechengbiaoService.saveOne(KcKechengbiaoPar);
|
||||
}
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
//-----------------初始化数据------------------------
|
||||
|
||||
//------------------去除课程表重复数据 20231024新增-----------------
|
||||
KcKechengbiao KcKechengbiao = new KcKechengbiao();
|
||||
KcKechengbiao.setXqxn(kcSysConfig.getFlag1());
|
||||
kcKechengbiaoService.removeCfsj(KcKechengbiao);
|
||||
//------------------去除课程表重复数据 20231024新增-----------------
|
||||
//---------------------20240416新增手动调停课逻辑------------------
|
||||
|
||||
//-------------------删除本年的课程数据冰倩是当天及以后的----------------------
|
||||
QueryWrapper<KcKetangbiao> KcKetangbiaoQueryWrapper = new QueryWrapper<>();
|
||||
KcKetangbiaoQueryWrapper.eq("xnxq",kcSysConfig.getFlag1());
|
||||
KcKetangbiaoQueryWrapper.ge("skrq",DateUtils.formatDate(dateNow,"yyyy-MM-dd"));
|
||||
kcKetangbiaoService.remove(KcKetangbiaoQueryWrapper);
|
||||
//-------------------删除本年的课程数据冰倩是当天及以后的----------------------
|
||||
|
||||
String bxqkssj = kcSysConfig.getBxqkssj();
|
||||
//插入数据
|
||||
KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
kcKetangbiao.setXnxq(kcSysConfig.getFlag1());
|
||||
List<KcKetangbiao> list = kcKetangbiaoService.selectSyncList(kcKetangbiao);
|
||||
List<KcKetangbiao> arrayList = new ArrayList<>();
|
||||
for(int i=0;i<list.size();i++){
|
||||
KcKetangbiao kcKetangbiaoOld = list.get(i);
|
||||
try {
|
||||
String jkzc[] = kcKetangbiaoOld.getJkzc().split(",");
|
||||
String week = kcKetangbiaoOld.getWeek();
|
||||
for(int j=0;j<jkzc.length;j++){
|
||||
KcKetangbiao kcKetangbiaoAddNew = new KcKetangbiao();
|
||||
int djz = Integer.parseInt(jkzc[j]);
|
||||
BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
|
||||
kcKetangbiaoAddNew.setId(null);
|
||||
//skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+week
|
||||
int addSj = (djz -1 )*7+Integer.parseInt(week)-1;
|
||||
Date date = DateUtils.parseDate(bxqkssj,"yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(date);
|
||||
c.add(Calendar.DAY_OF_MONTH, addSj);
|
||||
String skrq = DateUtils.formatDate(c,"yyyy-MM-dd");
|
||||
String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
//判断生成数据的skrq是否大于等于当前日期,如果满足则进行新增,否则不动
|
||||
if(DateUtils.parseDate(skrq,"yyyy-MM-dd").getTime()>=DateUtils.parseDate(dasj,"yyyy-MM-dd").getTime()){
|
||||
kcKetangbiaoAddNew.setSkrq(skrq);
|
||||
kcKetangbiaoAddNew.setDijizhou(djz);
|
||||
kcKetangbiaoAddNew.setXnxq(kcSysConfig.getFlag1());
|
||||
arrayList.add(kcKetangbiaoAddNew);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
kcKetangbiaoService.saveBatch(arrayList);
|
||||
|
||||
//修改智慧教室关联的课堂表id-- 清洗智慧教室数据
|
||||
kcKetangbiaoService.updateJsbh();
|
||||
|
||||
//修改智慧教室关联的课堂表id-- 清洗智慧教室数据
|
||||
KcKetangbiao kcKetangbiaoup = new KcKetangbiao();
|
||||
kcKetangbiaoup.setSkxs(1);
|
||||
kcKetangbiaoup.setXnxq(kcSysConfig.getFlag1());
|
||||
kcKetangbiaoService.updateSkxs(kcKetangbiaoup);
|
||||
|
||||
//修改调停课时间
|
||||
String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
|
||||
QueryWrapper<KcKetangbiaoSkrqLog> kcKetangbiaoSkrqLogQueryWrapper = new QueryWrapper<>();
|
||||
kcKetangbiaoSkrqLogQueryWrapper.ge("jsrq",dasj);
|
||||
List<KcKetangbiaoSkrqLog> list1 = kcKetangbiaoSkrqLogService.list(kcKetangbiaoSkrqLogQueryWrapper);
|
||||
for(KcKetangbiaoSkrqLog KcKetangbiaoSkrqLog:list1){
|
||||
UpdateWrapper<KcKetangbiao> KcKetangbiaoUpdateWrapper = new UpdateWrapper<>();
|
||||
KcKetangbiaoUpdateWrapper.set("skrq",KcKetangbiaoSkrqLog.getTzrq());
|
||||
KcKetangbiaoUpdateWrapper.eq("skrq",KcKetangbiaoSkrqLog.getSkrq());
|
||||
kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
import org.jeecg.modules.kc.kcKetangbiaoSkrqLog.entity.KcKetangbiaoSkrqLog;
|
||||
import org.jeecg.modules.kc.kcKetangbiaoSkrqLog.service.IKcKetangbiaoSkrqLogService;
|
||||
import org.jeecg.modules.kc.kcSysConfig.entity.KcSysConfig;
|
||||
import org.jeecg.modules.kc.kcSysConfig.service.IKcSysConfigService;
|
||||
import org.jeecg.modules.kc.kcXqxnHistory.service.IKcXqxnHistoryService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoHisService;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoHisService;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 更具原始数据表初始化课程表
|
||||
*/
|
||||
@Slf4j
|
||||
public class SyncKcktStatCopy extends BaseSync {
|
||||
|
||||
@Autowired
|
||||
private IKcKechengbiaoService kcKechengbiaoService;
|
||||
|
||||
@Autowired
|
||||
private IKcSysConfigService kcSysConfigService;
|
||||
|
||||
@Autowired
|
||||
private IKcKechengbiaoHisService kcKechengbiaoHisService;
|
||||
|
||||
@Autowired
|
||||
private IKcKetangbiaoService kcKetangbiaoService;
|
||||
|
||||
@Autowired
|
||||
private IKcKetangbiaoHisService kcKetangbiaoHisService;
|
||||
|
||||
@Autowired
|
||||
private IKcXqxnHistoryService kcXqxnHistoryService;
|
||||
|
||||
@Autowired
|
||||
private IKcKetangbiaoSkrqLogService kcKetangbiaoSkrqLogService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
run(getParamMap());
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 有参定时任务实现
|
||||
* @param param
|
||||
*/
|
||||
public void run(Map<String, Object> param){
|
||||
try {
|
||||
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
Date dateNow = new Date();
|
||||
|
||||
|
||||
//-----------------修改课程表数据------------------------
|
||||
KcKechengbiao kcKechengbiao = new KcKechengbiao();
|
||||
kcKechengbiao.setXqxn(kcSysConfig.getFlag1());
|
||||
// kcKechengbiao.setSkjs("刘婷");
|
||||
List<KcKechengbiao> kckblist = kcKechengbiaoService.getKechengbiaoList(kcKechengbiao);
|
||||
for(KcKechengbiao KcKechengbiaoPar:kckblist){
|
||||
QueryWrapper<KcKechengbiao> kcKechengbiaoQueryWrapper = new QueryWrapper<>();
|
||||
kcKechengbiaoQueryWrapper.eq("kcbh",KcKechengbiaoPar.getKcbh());
|
||||
kcKechengbiaoQueryWrapper.eq("kcmc",KcKechengbiaoPar.getKcmc());
|
||||
kcKechengbiaoQueryWrapper.eq("jgh",KcKechengbiaoPar.getJgh());
|
||||
kcKechengbiaoQueryWrapper.eq("skjs",KcKechengbiaoPar.getSkjs());
|
||||
kcKechengbiaoQueryWrapper.eq("rwbh",KcKechengbiaoPar.getRwbh());
|
||||
kcKechengbiaoQueryWrapper.eq("kkdwid",KcKechengbiaoPar.getKkdwid());
|
||||
kcKechengbiaoQueryWrapper.eq("kcxz",KcKechengbiaoPar.getKcxz());
|
||||
// kcKechengbiaoQueryWrapper.eq("skdd",KcKechengbiaoPar.getSkdd());
|
||||
kcKechengbiaoQueryWrapper.eq("sksj",KcKechengbiaoPar.getSksj());
|
||||
kcKechengbiaoQueryWrapper.eq("jkzc",KcKechengbiaoPar.getJkzc());
|
||||
kcKechengbiaoQueryWrapper.eq("xf",KcKechengbiaoPar.getXf());
|
||||
kcKechengbiaoQueryWrapper.eq("xnxq",KcKechengbiaoPar.getXnxq());
|
||||
kcKechengbiaoQueryWrapper.eq("kcdl",KcKechengbiaoPar.getKcdl());
|
||||
List<KcKechengbiao> KcKechengbiaoInsList = kcKechengbiaoService.list(kcKechengbiaoQueryWrapper);
|
||||
if(KcKechengbiaoInsList!=null&&KcKechengbiaoInsList.size()>0){
|
||||
for(KcKechengbiao KcKechengbiao : KcKechengbiaoInsList){
|
||||
String id = KcKechengbiao.getId();
|
||||
BeanUtils.copyProperties(KcKechengbiaoPar,KcKechengbiao);
|
||||
KcKechengbiao.setId(id);
|
||||
kcKechengbiaoService.updateById(KcKechengbiao);
|
||||
}
|
||||
}else{
|
||||
kcKechengbiaoService.saveOne(KcKechengbiaoPar);
|
||||
}
|
||||
}
|
||||
//-----------------初始化数据------------------------
|
||||
|
||||
//------------------去除课程表重复数据 20231024新增-----------------
|
||||
KcKechengbiao KcKechengbiao = new KcKechengbiao();
|
||||
KcKechengbiao.setXqxn(kcSysConfig.getFlag1());
|
||||
kcKechengbiaoService.removeCfsj(KcKechengbiao);
|
||||
//------------------去除课程表重复数据 20231024新增-----------------
|
||||
|
||||
|
||||
|
||||
//-----------------所有的数据都变成无效 20240321------------
|
||||
// KcKechengbiao kcbAll = new KcKechengbiao();
|
||||
// kcbAll.setXnxq(kcSysConfig.getFlag1());
|
||||
// kcKechengbiaoService.updateAllFlag(kcbAll);//所有的数据都变成无效
|
||||
// kcKechengbiaoService.updateYxByXxhbkckb(kcbAll);//根据条件变成有效数据
|
||||
|
||||
//-----------------所有的数据都变成无效 20240321------------
|
||||
|
||||
|
||||
|
||||
//------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
|
||||
KcKechengbiao ktbExculde = new KcKechengbiao();
|
||||
ktbExculde.setXnxq(kcSysConfig.getFlag1());
|
||||
kcKechengbiaoService.updateKechengExculde(ktbExculde);
|
||||
//------------------刨除指定表的数据 20240314新增 修改flag标志位----------------
|
||||
|
||||
|
||||
|
||||
|
||||
//-------------------删除本年的课程数据冰倩是当天及以后的----------------------
|
||||
QueryWrapper<KcKetangbiao> KcKetangbiaoQueryWrapper = new QueryWrapper<>();
|
||||
KcKetangbiaoQueryWrapper.eq("xnxq",kcSysConfig.getFlag1());
|
||||
KcKetangbiaoQueryWrapper.ge("skrq",DateUtils.formatDate(dateNow,"yyyy-MM-dd"));
|
||||
kcKetangbiaoService.remove(KcKetangbiaoQueryWrapper);
|
||||
//-------------------删除本年的课程数据冰倩是当天及以后的----------------------
|
||||
|
||||
String bxqkssj = kcSysConfig.getBxqkssj();
|
||||
//插入数据
|
||||
KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
kcKetangbiao.setXnxq(kcSysConfig.getFlag1());
|
||||
kcKetangbiao.setFlag("0");
|
||||
List<KcKetangbiao> list = kcKetangbiaoService.selectSyncList(kcKetangbiao);
|
||||
List<KcKetangbiao> arrayList = new ArrayList<>();
|
||||
for(int i=0;i<list.size();i++){
|
||||
KcKetangbiao kcKetangbiaoOld = list.get(i);
|
||||
try {
|
||||
String jkzc[] = kcKetangbiaoOld.getJkzc().split(",");
|
||||
String week = kcKetangbiaoOld.getWeek();
|
||||
for(int j=0;j<jkzc.length;j++){
|
||||
KcKetangbiao kcKetangbiaoAddNew = new KcKetangbiao();
|
||||
int djz = Integer.parseInt(jkzc[j]);
|
||||
BeanUtils.copyProperties(kcKetangbiaoOld,kcKetangbiaoAddNew);
|
||||
kcKetangbiaoAddNew.setId(null);
|
||||
//skrq 生成规则,取本学开始时间(kc_sys_config.bxqkssj)+(jkzc-1)*7+week
|
||||
int addSj = (djz -1 )*7+Integer.parseInt(week)-1;
|
||||
Date date = DateUtils.parseDate(bxqkssj,"yyyy-MM-dd");
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(date);
|
||||
c.add(Calendar.DAY_OF_MONTH, addSj);
|
||||
String skrq = DateUtils.formatDate(c,"yyyy-MM-dd");
|
||||
String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
//判断生成数据的skrq是否大于等于当前日期,如果满足则进行新增,否则不动
|
||||
if(DateUtils.parseDate(skrq,"yyyy-MM-dd").getTime()>=DateUtils.parseDate(dasj,"yyyy-MM-dd").getTime()){
|
||||
kcKetangbiaoAddNew.setSkrq(skrq);
|
||||
kcKetangbiaoAddNew.setDijizhou(djz);
|
||||
kcKetangbiaoAddNew.setXnxq(kcSysConfig.getFlag1());
|
||||
arrayList.add(kcKetangbiaoAddNew);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
kcKetangbiaoService.saveBatch(arrayList);
|
||||
|
||||
//修改智慧教室关联的课堂表id-- 清洗智慧教室数据
|
||||
kcKetangbiaoService.updateJsbh();
|
||||
|
||||
//修改智慧教室关联的课堂表id-- 清洗智慧教室数据
|
||||
KcKetangbiao kcKetangbiaoup = new KcKetangbiao();
|
||||
kcKetangbiaoup.setSkxs(1);
|
||||
kcKetangbiaoup.setXnxq(kcSysConfig.getFlag1());
|
||||
kcKetangbiaoService.updateSkxs(kcKetangbiaoup);
|
||||
|
||||
//修改调停课时间
|
||||
String dasj = DateUtils.formatDate(dateNow,"yyyy-MM-dd");
|
||||
|
||||
QueryWrapper<KcKetangbiaoSkrqLog> kcKetangbiaoSkrqLogQueryWrapper = new QueryWrapper<>();
|
||||
kcKetangbiaoSkrqLogQueryWrapper.ge("jsrq",dasj);
|
||||
List<KcKetangbiaoSkrqLog> list1 = kcKetangbiaoSkrqLogService.list(kcKetangbiaoSkrqLogQueryWrapper);
|
||||
for(KcKetangbiaoSkrqLog KcKetangbiaoSkrqLog:list1){
|
||||
UpdateWrapper<KcKetangbiao> KcKetangbiaoUpdateWrapper = new UpdateWrapper<>();
|
||||
KcKetangbiaoUpdateWrapper.set("skrq",KcKetangbiaoSkrqLog.getTzrq());
|
||||
KcKetangbiaoUpdateWrapper.eq("skrq",KcKetangbiaoSkrqLog.getSkrq());
|
||||
kcKetangbiaoService.update(KcKetangbiaoUpdateWrapper);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参定时任务实现
|
||||
*/
|
||||
public void run(){
|
||||
run(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,17 +1,27 @@
|
|||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TJwKckb;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITJwKckbService;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbkckbService;
|
||||
import org.jeecg.modules.kc.kcJieci.entity.KcJieci;
|
||||
import org.jeecg.modules.kc.kcJieci.service.IKcJieciService;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||
import org.jeecg.modules.kc.xxhbkckbOra.entity.XxhbkckbOra;
|
||||
import org.jeecg.modules.kc.xxhbkckbOra.service.IXxhbkckbOraService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -23,7 +33,14 @@ public class SyncTJwKckb extends BaseSync {
|
|||
|
||||
@Autowired
|
||||
private IXxhbkckbService impService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private IXxhbkckbOraService xxhbkckbOraService;
|
||||
|
||||
@Autowired
|
||||
private IKcJieciPipeiService kcJieciPipeiService;
|
||||
@Autowired
|
||||
private IKcJieciService kcJieciService;
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
|
|
@ -43,21 +60,71 @@ public class SyncTJwKckb extends BaseSync {
|
|||
public void run(Map<String, Object> param){
|
||||
//查询数据
|
||||
List<TJwKckb> inDataList = expService.list();
|
||||
List<Xxhbkckb> outDataList = Lists.newArrayList();
|
||||
List<XxhbkckbOra> outDataList = Lists.newArrayList();
|
||||
|
||||
//清洗数据
|
||||
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbkckb.class)));
|
||||
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, XxhbkckbOra.class)));
|
||||
|
||||
//保存到胃
|
||||
try {
|
||||
xxhbkckbOraService.syncList(outDataList);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
//查询异常的节次数据
|
||||
List<XxhbkckbOra> oraList = xxhbkckbOraService.getSksjList();
|
||||
List<KcJieciPipei> kcJieciPipeiList = new ArrayList<>();
|
||||
for(int i=0;i<oraList.size();i++){
|
||||
KcJieciPipei par = new KcJieciPipei();
|
||||
par.setExpCol(oraList.get(i).getSksj());
|
||||
kcJieciPipeiList.add(par);
|
||||
}
|
||||
//不为空则插入数据
|
||||
if(kcJieciPipeiList != null){
|
||||
kcJieciPipeiService.saveBatch(kcJieciPipeiList);
|
||||
}
|
||||
|
||||
//查询全部ora数据
|
||||
List<XxhbkckbOra> list = xxhbkckbOraService.list();
|
||||
List<Xxhbkckb> importDataList = Lists.newArrayList();
|
||||
for(XxhbkckbOra par:list){
|
||||
String sksjArr = par.getSksj();//获取授课事件结合,例如:7010203040506070809101112
|
||||
if(StringUtils.isEmpty(sksjArr)){
|
||||
continue;
|
||||
}
|
||||
String week = sksjArr.substring(0,1);//获取周几上课,例如:7
|
||||
String sksj = sksjArr.substring(1,sksjArr.length());//获取具体的上课节次,例如:010203040506070809101112
|
||||
|
||||
QueryWrapper<KcJieciPipei> kcJieciPipeiQueryWrapper = new QueryWrapper<>();
|
||||
kcJieciPipeiQueryWrapper.eq("exp_col",sksj);
|
||||
kcJieciPipeiQueryWrapper.last("limit 1");
|
||||
KcJieciPipei kcJieciPipei = kcJieciPipeiService.getOne(kcJieciPipeiQueryWrapper);//根据当前节次获取对应的正确节次数据
|
||||
//组装拆分后的数据,封装到xxhbkckb表中
|
||||
if(kcJieciPipei != null && StringUtils.isNotBlank(kcJieciPipei.getNorCol())){
|
||||
String norCol[] = StringUtils.split(kcJieciPipei.getNorCol(),"|");
|
||||
for(String nor : norCol){
|
||||
Xxhbkckb xxhbkckb = new Xxhbkckb();
|
||||
BeanUtil.copyProperties(par,xxhbkckb);
|
||||
xxhbkckb.setId(null);
|
||||
xxhbkckb.setSksj(week+nor);
|
||||
importDataList.add(xxhbkckb);
|
||||
}
|
||||
}
|
||||
}
|
||||
//保存到胃
|
||||
int syncnum=0;
|
||||
String errorMessage = "";
|
||||
try {
|
||||
impService.syncList(outDataList);
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
impService.remove(dqw);
|
||||
impService.syncList(importDataList);
|
||||
syncnum = outDataList.size();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
errorMessage = e.getMessage();
|
||||
}
|
||||
|
||||
Xxhbkckb Xxhbkckb = impService.getSumnum();
|
||||
int mysqlnum=Xxhbkckb.getMysqlnum();
|
||||
Xxhbsynclog xxhbsynclog = new Xxhbsynclog();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,81 @@
|
|||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TJwKckb;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITJwKckbService;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkckb;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbkckbService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class SyncTJwKckbCopy extends BaseSync {
|
||||
|
||||
@Autowired
|
||||
private ITJwKckbService expService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbkckbService impService;
|
||||
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
run(getParamMap());
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 有参定时任务实现
|
||||
* @param param
|
||||
*/
|
||||
public void run(Map<String, Object> param){
|
||||
//查询数据
|
||||
List<TJwKckb> inDataList = expService.list();
|
||||
List<Xxhbkckb> outDataList = Lists.newArrayList();
|
||||
|
||||
//清洗数据
|
||||
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbkckb.class)));
|
||||
|
||||
//保存到胃
|
||||
int syncnum=0;
|
||||
String errorMessage = "";
|
||||
try {
|
||||
impService.syncList(outDataList);
|
||||
syncnum = outDataList.size();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
errorMessage = e.getMessage();
|
||||
}
|
||||
Xxhbkckb Xxhbkckb = impService.getSumnum();
|
||||
int mysqlnum=Xxhbkckb.getMysqlnum();
|
||||
Xxhbsynclog xxhbsynclog = new Xxhbsynclog();
|
||||
xxhbsynclog.setSyncRowNum(String.valueOf(outDataList.size()));
|
||||
xxhbsynclog.setOratabname("T_JW_KCKB");//oracle表名
|
||||
xxhbsynclog.setOratabnum(inDataList.size());//oracle表数量
|
||||
xxhbsynclog.setTablenum(mysqlnum);//mysql表数量
|
||||
xxhbsynclog.setSyncnum(syncnum);//本次同步数据量
|
||||
xxhbsynclog.setSynctype("0");//同步类型 0全量 1增量
|
||||
xxhbsynclog.setErrormessage(errorMessage);
|
||||
saveLog(xxhbsynclog, Xxhbkckb.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参定时任务实现
|
||||
*/
|
||||
public void run(){
|
||||
run(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ public class SyncWechartTsxx extends BaseSync {
|
|||
queryWrapper.ge("scheduleddatetime",DateUtils.formatDate(nowTime2,"yyyy-MM-dd HH:mm:ss"));
|
||||
queryWrapper.le("scheduleddatetime",DateUtils.formatDate(nowTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
queryWrapper.eq("status","0");
|
||||
List<KcMessagelistcopy> list =kcMessagelistcopyService.list();
|
||||
List<KcMessagelistcopy> list =kcMessagelistcopyService.list(queryWrapper);
|
||||
for(KcMessagelistcopy KcMessagelistcopy:list){
|
||||
|
||||
// 模板参数
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi,
|
|||
TimeInterval timer = DateUtil.timer();
|
||||
Page<KcZhihuijiaoshi> page = new Page<>(pageNo, pageSize);
|
||||
queryWrapper.orderByAsc("sort");
|
||||
queryWrapper.orderByDesc("xm");
|
||||
IPage<KcZhihuijiaoshi> pageList = kcZhihuijiaoshiService.page(page, queryWrapper);
|
||||
|
||||
log.info("01: {}",timer.intervalRestart());
|
||||
|
|
|
|||
|
|
@ -79,6 +79,12 @@ public class KcZhihuijiaoshiStateLogController extends JeecgController<KcZhihuij
|
|||
}
|
||||
Page<KcZhihuijiaoshiStateLog> page = new Page<>(pageNo, pageSize);
|
||||
IPage<KcZhihuijiaoshiStateLog> pageList = kcZhihuijiaoshiStateLogService.page(page, queryWrapper);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,176 @@
|
|||
package org.jeecg.modules.kc.kcEvaluationsHisrecord.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.kcEvaluationsHisrecord.entity.KcEvaluationsHisrecord;
|
||||
import org.jeecg.modules.kc.kcEvaluationsHisrecord.service.IKcEvaluationsHisrecordService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 历史听课数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="历史听课数据")
|
||||
@RestController
|
||||
@RequestMapping("/kcEvaluationsHisrecord/kcEvaluationsHisrecord")
|
||||
@Slf4j
|
||||
public class KcEvaluationsHisrecordController extends JeecgController<KcEvaluationsHisrecord, IKcEvaluationsHisrecordService> {
|
||||
@Autowired
|
||||
private IKcEvaluationsHisrecordService kcEvaluationsHisrecordService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcEvaluationsHisrecord
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "历史听课数据-分页列表查询")
|
||||
@ApiOperation(value="历史听课数据-分页列表查询", notes="历史听课数据-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcEvaluationsHisrecord>> queryPageList(KcEvaluationsHisrecord kcEvaluationsHisrecord,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcEvaluationsHisrecord> queryWrapper = QueryGenerator.initQueryWrapper(kcEvaluationsHisrecord, req.getParameterMap());
|
||||
Page<KcEvaluationsHisrecord> page = new Page<KcEvaluationsHisrecord>(pageNo, pageSize);
|
||||
IPage<KcEvaluationsHisrecord> pageList = kcEvaluationsHisrecordService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcEvaluationsHisrecord
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "历史听课数据-添加")
|
||||
@ApiOperation(value="历史听课数据-添加", notes="历史听课数据-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcEvaluationsHisrecord kcEvaluationsHisrecord) {
|
||||
kcEvaluationsHisrecordService.save(kcEvaluationsHisrecord);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcEvaluationsHisrecord
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "历史听课数据-编辑")
|
||||
@ApiOperation(value="历史听课数据-编辑", notes="历史听课数据-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcEvaluationsHisrecord kcEvaluationsHisrecord) {
|
||||
kcEvaluationsHisrecordService.updateById(kcEvaluationsHisrecord);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "历史听课数据-通过id删除")
|
||||
@ApiOperation(value="历史听课数据-通过id删除", notes="历史听课数据-通过id删除")
|
||||
@RequiresPermissions("kcEvaluationsHisrecord:kc_evaluations_hisrecord:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcEvaluationsHisrecordService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "历史听课数据-批量删除")
|
||||
@ApiOperation(value="历史听课数据-批量删除", notes="历史听课数据-批量删除")
|
||||
@RequiresPermissions("kcEvaluationsHisrecord:kc_evaluations_hisrecord:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcEvaluationsHisrecordService.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<KcEvaluationsHisrecord> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcEvaluationsHisrecord kcEvaluationsHisrecord = kcEvaluationsHisrecordService.getById(id);
|
||||
if(kcEvaluationsHisrecord==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcEvaluationsHisrecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcEvaluationsHisrecord
|
||||
*/
|
||||
@RequiresPermissions("kcEvaluationsHisrecord:kc_evaluations_hisrecord:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcEvaluationsHisrecord kcEvaluationsHisrecord) {
|
||||
return super.exportXls(request, kcEvaluationsHisrecord, KcEvaluationsHisrecord.class, "历史听课数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcEvaluationsHisrecord:kc_evaluations_hisrecord:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcEvaluationsHisrecord.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
package org.jeecg.modules.kc.kcEvaluationsHisrecord.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 历史听课数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_evaluations_hisrecord")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_evaluations_hisrecord对象", description="历史听课数据")
|
||||
public class KcEvaluationsHisrecord implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**学年学期*/
|
||||
@Excel(name = "学年学期", width = 15)
|
||||
@ApiModelProperty(value = "学年学期")
|
||||
private java.lang.String xnxq;
|
||||
/**课程编号*/
|
||||
@Excel(name = "课程编号", width = 15)
|
||||
@ApiModelProperty(value = "课程编号")
|
||||
private java.lang.String kcbh;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**开课院系*/
|
||||
@Excel(name = "开课院系", width = 15)
|
||||
@ApiModelProperty(value = "开课院系")
|
||||
private java.lang.String kkdw;
|
||||
/**上课教师*/
|
||||
@Excel(name = "上课教师", width = 15)
|
||||
@ApiModelProperty(value = "上课教师")
|
||||
private java.lang.String skjs;
|
||||
/**听课教师*/
|
||||
@Excel(name = "听课教师", width = 15)
|
||||
@ApiModelProperty(value = "听课教师")
|
||||
private java.lang.String tkjs;
|
||||
/**课堂教学总体印象评价(综合评分)*/
|
||||
@Excel(name = "课堂教学总体印象评价(综合评分)", width = 15)
|
||||
@ApiModelProperty(value = "课堂教学总体印象评价(综合评分)")
|
||||
private java.lang.String col01;
|
||||
/**无迟到、早退、旷课现象(学生情况)*/
|
||||
@Excel(name = "无迟到、早退、旷课现象(学生情况)", width = 15)
|
||||
@ApiModelProperty(value = "无迟到、早退、旷课现象(学生情况)")
|
||||
private java.lang.String col02;
|
||||
/**课堂教学秩序好、无喧闹、打瞌睡、发短信、玩手机等现象(学生情况)*/
|
||||
@Excel(name = "课堂教学秩序好、无喧闹、打瞌睡、发短信、玩手机等现象(学生情况)", width = 15)
|
||||
@ApiModelProperty(value = "课堂教学秩序好、无喧闹、打瞌睡、发短信、玩手机等现象(学生情况)")
|
||||
private java.lang.String col03;
|
||||
/**上课认真听讲、积极思考,主动与老师交流互动(学生情况)*/
|
||||
@Excel(name = "上课认真听讲、积极思考,主动与老师交流互动(学生情况)", width = 15)
|
||||
@ApiModelProperty(value = "上课认真听讲、积极思考,主动与老师交流互动(学生情况)")
|
||||
private java.lang.String col04;
|
||||
/**讲课有热情、精神饱满,能够调动学生情绪,课堂气氛活跃(教师情况)*/
|
||||
@Excel(name = "讲课有热情、精神饱满,能够调动学生情绪,课堂气氛活跃(教师情况)", width = 15)
|
||||
@ApiModelProperty(value = "讲课有热情、精神饱满,能够调动学生情绪,课堂气氛活跃(教师情况)")
|
||||
private java.lang.String col05;
|
||||
/**教学目标明确,内容丰富,重点突出,语言表达清楚(教师情况)*/
|
||||
@Excel(name = "教学目标明确,内容丰富,重点突出,语言表达清楚(教师情况)", width = 15)
|
||||
@ApiModelProperty(value = "教学目标明确,内容丰富,重点突出,语言表达清楚(教师情况)")
|
||||
private java.lang.String col06;
|
||||
/**授课有启发性,能给予学生思考、联想、创新的启迪(教师情况)*/
|
||||
@Excel(name = "授课有启发性,能给予学生思考、联想、创新的启迪(教师情况)", width = 15)
|
||||
@ApiModelProperty(value = "授课有启发性,能给予学生思考、联想、创新的启迪(教师情况)")
|
||||
private java.lang.String col07;
|
||||
/**能有效利用各种教学媒体,课件或板书使用效果好(教师情况)*/
|
||||
@Excel(name = "能有效利用各种教学媒体,课件或板书使用效果好(教师情况)", width = 15)
|
||||
@ApiModelProperty(value = "能有效利用各种教学媒体,课件或板书使用效果好(教师情况)")
|
||||
private java.lang.String col08;
|
||||
/**仪表得体,按时上下课,严格要求学生(教师情况)*/
|
||||
@Excel(name = "仪表得体,按时上下课,严格要求学生(教师情况)", width = 15)
|
||||
@ApiModelProperty(value = "仪表得体,按时上下课,严格要求学生(教师情况)")
|
||||
private java.lang.String col09;
|
||||
/**意见或建议*/
|
||||
@Excel(name = "意见或建议", width = 15)
|
||||
@ApiModelProperty(value = "意见或建议")
|
||||
private java.lang.String col10;
|
||||
/**数据来源*/
|
||||
@Excel(name = "数据来源", width = 15)
|
||||
@ApiModelProperty(value = "数据来源")
|
||||
private java.lang.String source;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcEvaluationsHisrecord.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcEvaluationsHisrecord.entity.KcEvaluationsHisrecord;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 历史听课数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcEvaluationsHisrecordMapper extends BaseMapper<KcEvaluationsHisrecord> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcEvaluationsHisrecord.mapper.KcEvaluationsHisrecordMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcEvaluationsHisrecord.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcEvaluationsHisrecord.entity.KcEvaluationsHisrecord;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 历史听课数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcEvaluationsHisrecordService extends IService<KcEvaluationsHisrecord> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcEvaluationsHisrecord.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcEvaluationsHisrecord.entity.KcEvaluationsHisrecord;
|
||||
import org.jeecg.modules.kc.kcEvaluationsHisrecord.mapper.KcEvaluationsHisrecordMapper;
|
||||
import org.jeecg.modules.kc.kcEvaluationsHisrecord.service.IKcEvaluationsHisrecordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 历史听课数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcEvaluationsHisrecordServiceImpl extends ServiceImpl<KcEvaluationsHisrecordMapper, KcEvaluationsHisrecord> implements IKcEvaluationsHisrecordService {
|
||||
|
||||
}
|
||||
|
|
@ -16,6 +16,8 @@ import org.jeecg.common.api.vo.Result;
|
|||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbuser;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbuserService;
|
||||
import org.jeecg.modules.kc.kcEvaluationsStat.entity.KcEvaluationsStat;
|
||||
import org.jeecg.modules.kc.kcEvaluationsStat.service.IKcEvaluationsStatService;
|
||||
|
||||
|
|
@ -24,6 +26,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
|
|
@ -55,6 +58,11 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
public class KcEvaluationsStatController extends JeecgController<KcEvaluationsStat, IKcEvaluationsStatService> {
|
||||
@Autowired
|
||||
private IKcEvaluationsStatService kcEvaluationsStatService;
|
||||
@Autowired
|
||||
private IXxhbuserService xxhbuserService;
|
||||
|
||||
@Autowired
|
||||
private SysBaseApiImpl sysBaseApi;
|
||||
|
||||
@Value("${jeecg.path.upload}")
|
||||
private String upLoadPath;
|
||||
|
|
@ -78,7 +86,19 @@ public class KcEvaluationsStatController extends JeecgController<KcEvaluationsSt
|
|||
kcEvaluationsStat.setCol13("*"+kcEvaluationsStat.getCol13()+"*");
|
||||
}
|
||||
|
||||
QueryWrapper<KcEvaluationsStat> queryWrapper = QueryGenerator.initQueryWrapper(kcEvaluationsStat, req.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
System.out.println("--->"+JSON.toJSONString(sysUser));
|
||||
|
||||
List<String> roleList = sysBaseApi.getRolesByUsername(sysUser.getUsername());
|
||||
String adminRole = "1";//0 admin 1教务秘书
|
||||
for(String role :roleList){
|
||||
if(org.apache.commons.lang.StringUtils.equals("admin",role)){
|
||||
adminRole = "0";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QueryWrapper<KcEvaluationsStat> queryWrapper = QueryGenerator.initQueryWrapper("a",kcEvaluationsStat, req.getParameterMap());
|
||||
if(StringUtils.isNotBlank(kcEvaluationsStat.getSzkc())){
|
||||
String szkc = kcEvaluationsStat.getSzkc();
|
||||
if(StringUtils.equals("1",szkc)){
|
||||
|
|
@ -87,6 +107,15 @@ public class KcEvaluationsStatController extends JeecgController<KcEvaluationsSt
|
|||
queryWrapper.eq("col59","否");
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals("1",adminRole)){
|
||||
QueryWrapper<Xxhbuser> xxhbuserQueryWrapper = new QueryWrapper<>();
|
||||
xxhbuserQueryWrapper.eq("gh",sysUser.getUsername());
|
||||
xxhbuserQueryWrapper.last("limit 1");
|
||||
Xxhbuser xxhbuser = xxhbuserService.getOne(xxhbuserQueryWrapper);
|
||||
queryWrapper.eq("col10",xxhbuser.getDwmc());
|
||||
}
|
||||
queryWrapper.eq(StringUtils.isNotBlank(kcEvaluationsStat.getSkjsdw()),"b.dwmc",kcEvaluationsStat.getSkjsdw());
|
||||
|
||||
// queryWrapper.eq(StringUtils.isNotBlank(kcEvaluationsStat.getSzkc()),"c.szkc",kcEvaluationsStat.getSzkc());
|
||||
Page<KcEvaluationsStat> page = new Page<KcEvaluationsStat>(pageNo, pageSize);
|
||||
IPage<KcEvaluationsStat> pageList = kcEvaluationsStatService.page(page, queryWrapper);
|
||||
|
|
|
|||
|
|
@ -264,6 +264,8 @@ public class KcEvaluationsStat implements Serializable {
|
|||
@TableField(exist = false)
|
||||
@Dict(dicCode = "yn")
|
||||
private java.lang.String szkc;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String skjsdw;//授课教师单位
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,4 +31,6 @@ public interface KcEvaluationsStatMapper extends BaseMapper<KcEvaluationsStat> {
|
|||
List<KcEvaluationsStat> getLbpjbSyncList();
|
||||
|
||||
List<KcEvaluationsStat> getLbpjbJxsjSyncList(KcEvaluationsStat kcEvaluationsStat);
|
||||
|
||||
List<KcEvaluationsStat> getYbtkbTwoSyncList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,17 @@
|
|||
FROM kc_evaluation EV, KC_EVALUATIONS EVS
|
||||
WHERE ev.id = evs.evaluationid
|
||||
AND ev.evaluationver = '3'
|
||||
and ev.source != '2'
|
||||
and ev.up_date > '2024-02-01'
|
||||
</select>
|
||||
|
||||
<select id="getYbtkbTwoSyncList" resultType="org.jeecg.modules.kc.kcEvaluationsStat.entity.KcEvaluationsStat">
|
||||
SELECT DISTINCT ev.id as col00
|
||||
FROM kc_evaluation EV, KC_EVALUATIONS EVS
|
||||
WHERE ev.id = evs.evaluationid
|
||||
AND ev.evaluationver = '3'
|
||||
and ev.source = '2'
|
||||
and ev.up_date > '2024-02-01'
|
||||
</select>
|
||||
|
||||
<select id="getXstkbSyncList" resultType="org.jeecg.modules.kc.kcEvaluationsStat.entity.KcEvaluationsStat">
|
||||
|
|
@ -1133,4 +1144,11 @@ select max(id) as id,gh,xqxn from KC_EXPORT_CONFIG_TPKWCQKJZGLX where xqxn = #{x
|
|||
<update id="updateHuanhang">
|
||||
update kc_evaluations set textanscontent = REPLACE(textanscontent, '\n', ' ')
|
||||
</update>
|
||||
|
||||
<select id="selectPage" resultType="org.jeecg.modules.kc.kcEvaluationsStat.entity.KcEvaluationsStat">
|
||||
select a.*,b.dwmc as skjsdw from kc_evaluations_stat a
|
||||
left join xxhbuser b on a.col05 = b.gh
|
||||
${ew.customSqlSegment}
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -30,4 +30,6 @@ public interface IKcEvaluationsStatService extends IService<KcEvaluationsStat> {
|
|||
List<KcEvaluationsStat> getLbpjbSyncList();
|
||||
|
||||
List<KcEvaluationsStat> getLbpjbJxsjSyncList(KcEvaluationsStat kcEvaluationsStat);
|
||||
|
||||
List<KcEvaluationsStat> getYbtkbTwoSyncList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,4 +62,9 @@ public class KcEvaluationsStatServiceImpl extends ServiceImpl<KcEvaluationsStatM
|
|||
public List<KcEvaluationsStat> getLbpjbJxsjSyncList(KcEvaluationsStat kcEvaluationsStat) {
|
||||
return baseMapper.getLbpjbJxsjSyncList(kcEvaluationsStat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcEvaluationsStat> getYbtkbTwoSyncList() {
|
||||
return baseMapper.getYbtkbTwoSyncList();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -191,18 +191,34 @@ public class KcGongkaikeController extends JeecgController<KcGongkaike, IKcGongk
|
|||
String xnxq = kcGongkaike.getXnxq();
|
||||
|
||||
QueryWrapper<KcGongkaike> queryWrapper = QueryGenerator.initQueryWrapper(kcGongkaike, req.getParameterMap());
|
||||
if(StringUtils.isEmpty(xnxq)){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.ge("rq",kcSysConfig.getBxqkssj());
|
||||
queryWrapper.le("rq",kcSysConfig.getBxqjssj());
|
||||
}else{QueryWrapper<KcXqxnHistory> kcXqxnHistoryQueryWrapper = new QueryWrapper<>();
|
||||
kcXqxnHistoryQueryWrapper.eq("title",xnxq);
|
||||
KcXqxnHistory KcXqxnHistory = kcXqxnHistoryService.getOne(kcXqxnHistoryQueryWrapper);queryWrapper.ge("rq",KcXqxnHistory.getStartTime());
|
||||
queryWrapper.le("rq",KcXqxnHistory.getEndTime());
|
||||
}
|
||||
// if(StringUtils.isEmpty(xnxq)){
|
||||
// KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
// queryWrapper.ge("rq",kcSysConfig.getBxqkssj());
|
||||
// queryWrapper.le("rq",kcSysConfig.getBxqjssj());
|
||||
// }else{QueryWrapper<KcXqxnHistory> kcXqxnHistoryQueryWrapper = new QueryWrapper<>();
|
||||
// kcXqxnHistoryQueryWrapper.eq("title",xnxq);
|
||||
// KcXqxnHistory KcXqxnHistory = kcXqxnHistoryService.getOne(kcXqxnHistoryQueryWrapper);queryWrapper.ge("rq",KcXqxnHistory.getStartTime());
|
||||
// queryWrapper.le("rq",KcXqxnHistory.getEndTime());
|
||||
// }
|
||||
Page<KcGongkaike> page = new Page<KcGongkaike>(pageNo, pageSize);
|
||||
IPage<KcGongkaike> pageList = kcGongkaikeService.getIndexList(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "批量修改前台是否展示")
|
||||
@ApiOperation(value="批量修改前台是否展示", notes="批量修改前台是否展示")
|
||||
@RequestMapping(value = "/editBatch", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> editBatch(@RequestBody KcGongkaike kcGongkaike) {
|
||||
String ids[] = kcGongkaike.getId().split(",");
|
||||
String sfxs = kcGongkaike.getSfxs();
|
||||
for(String id:ids){
|
||||
KcGongkaike kcGongkaikePar = new KcGongkaike();
|
||||
kcGongkaikePar.setId(id);
|
||||
kcGongkaikePar.setSfxs(sfxs);
|
||||
kcGongkaikeService.updateById(kcGongkaikePar);
|
||||
}
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,176 @@
|
|||
package org.jeecg.modules.kc.kcJieciPipei.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.kcJieciPipei.entity.KcJieciPipei;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 节次匹配数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="节次匹配数据")
|
||||
@RestController
|
||||
@RequestMapping("/kcJieciPipei/kcJieciPipei")
|
||||
@Slf4j
|
||||
public class KcJieciPipeiController extends JeecgController<KcJieciPipei, IKcJieciPipeiService> {
|
||||
@Autowired
|
||||
private IKcJieciPipeiService kcJieciPipeiService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcJieciPipei
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "节次匹配数据-分页列表查询")
|
||||
@ApiOperation(value="节次匹配数据-分页列表查询", notes="节次匹配数据-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcJieciPipei>> queryPageList(KcJieciPipei kcJieciPipei,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcJieciPipei> queryWrapper = QueryGenerator.initQueryWrapper(kcJieciPipei, req.getParameterMap());
|
||||
Page<KcJieciPipei> page = new Page<KcJieciPipei>(pageNo, pageSize);
|
||||
IPage<KcJieciPipei> pageList = kcJieciPipeiService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcJieciPipei
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "节次匹配数据-添加")
|
||||
@ApiOperation(value="节次匹配数据-添加", notes="节次匹配数据-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcJieciPipei kcJieciPipei) {
|
||||
kcJieciPipeiService.save(kcJieciPipei);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcJieciPipei
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "节次匹配数据-编辑")
|
||||
@ApiOperation(value="节次匹配数据-编辑", notes="节次匹配数据-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcJieciPipei kcJieciPipei) {
|
||||
kcJieciPipeiService.updateById(kcJieciPipei);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "节次匹配数据-通过id删除")
|
||||
@ApiOperation(value="节次匹配数据-通过id删除", notes="节次匹配数据-通过id删除")
|
||||
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcJieciPipeiService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "节次匹配数据-批量删除")
|
||||
@ApiOperation(value="节次匹配数据-批量删除", notes="节次匹配数据-批量删除")
|
||||
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcJieciPipeiService.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<KcJieciPipei> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcJieciPipei kcJieciPipei = kcJieciPipeiService.getById(id);
|
||||
if(kcJieciPipei==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcJieciPipei);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcJieciPipei
|
||||
*/
|
||||
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcJieciPipei kcJieciPipei) {
|
||||
return super.exportXls(request, kcJieciPipei, KcJieciPipei.class, "节次匹配数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcJieciPipei:kc_jieci_pipei:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcJieciPipei.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package org.jeecg.modules.kc.kcJieciPipei.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 节次匹配数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_jieci_pipei")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_jieci_pipei对象", description="节次匹配数据")
|
||||
public class KcJieciPipei 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 expCol;
|
||||
/**正确数据*/
|
||||
@Excel(name = "正确数据", width = 15)
|
||||
@ApiModelProperty(value = "正确数据")
|
||||
private java.lang.String norCol;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcJieciPipei.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 节次匹配数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcJieciPipeiMapper extends BaseMapper<KcJieciPipei> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcJieciPipei.mapper.KcJieciPipeiMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcJieciPipei.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 节次匹配数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcJieciPipeiService extends IService<KcJieciPipei> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcJieciPipei.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcJieciPipei.entity.KcJieciPipei;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.mapper.KcJieciPipeiMapper;
|
||||
import org.jeecg.modules.kc.kcJieciPipei.service.IKcJieciPipeiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 节次匹配数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcJieciPipeiServiceImpl extends ServiceImpl<KcJieciPipeiMapper, KcJieciPipei> implements IKcJieciPipeiService {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
package org.jeecg.modules.kc.kcKechengExclude.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.kcKechengExclude.entity.KcKechengExclude;
|
||||
import org.jeecg.modules.kc.kcKechengExclude.service.IKcKechengExcludeService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 课程刨除数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课程刨除数据")
|
||||
@RestController
|
||||
@RequestMapping("/kcKechengExclude/kcKechengExclude")
|
||||
@Slf4j
|
||||
public class KcKechengExcludeController extends JeecgController<KcKechengExclude, IKcKechengExcludeService> {
|
||||
@Autowired
|
||||
private IKcKechengExcludeService kcKechengExcludeService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcKechengExclude
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课程刨除数据-分页列表查询")
|
||||
@ApiOperation(value="课程刨除数据-分页列表查询", notes="课程刨除数据-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcKechengExclude>> queryPageList(KcKechengExclude kcKechengExclude,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKechengExclude> queryWrapper = QueryGenerator.initQueryWrapper(kcKechengExclude, req.getParameterMap());
|
||||
Page<KcKechengExclude> page = new Page<KcKechengExclude>(pageNo, pageSize);
|
||||
IPage<KcKechengExclude> pageList = kcKechengExcludeService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcKechengExclude
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程刨除数据-添加")
|
||||
@ApiOperation(value="课程刨除数据-添加", notes="课程刨除数据-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcKechengExclude kcKechengExclude) {
|
||||
kcKechengExcludeService.save(kcKechengExclude);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcKechengExclude
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程刨除数据-编辑")
|
||||
@ApiOperation(value="课程刨除数据-编辑", notes="课程刨除数据-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcKechengExclude kcKechengExclude) {
|
||||
kcKechengExcludeService.updateById(kcKechengExclude);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程刨除数据-通过id删除")
|
||||
@ApiOperation(value="课程刨除数据-通过id删除", notes="课程刨除数据-通过id删除")
|
||||
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcKechengExcludeService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程刨除数据-批量删除")
|
||||
@ApiOperation(value="课程刨除数据-批量删除", notes="课程刨除数据-批量删除")
|
||||
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcKechengExcludeService.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<KcKechengExclude> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcKechengExclude kcKechengExclude = kcKechengExcludeService.getById(id);
|
||||
if(kcKechengExclude==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcKechengExclude);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcKechengExclude
|
||||
*/
|
||||
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcKechengExclude kcKechengExclude) {
|
||||
return super.exportXls(request, kcKechengExclude, KcKechengExclude.class, "课程刨除数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcKechengExclude:kc_kecheng_exclude:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcKechengExclude.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package org.jeecg.modules.kc.kcKechengExclude.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 课程刨除数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_kecheng_exclude")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_kecheng_exclude对象", description="课程刨除数据")
|
||||
public class KcKechengExclude implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**开课单位*/
|
||||
@Excel(name = "开课单位", width = 15)
|
||||
@ApiModelProperty(value = "开课单位")
|
||||
private java.lang.String kkdw;
|
||||
/**课程性质*/
|
||||
@Excel(name = "课程性质", width = 15)
|
||||
@ApiModelProperty(value = "课程性质")
|
||||
private java.lang.String kcxz;
|
||||
/**上课地点*/
|
||||
@Excel(name = "上课地点", width = 15)
|
||||
@ApiModelProperty(value = "上课地点")
|
||||
private java.lang.String skdd;
|
||||
/**授课时间*/
|
||||
@Excel(name = "授课时间", width = 15)
|
||||
@ApiModelProperty(value = "授课时间")
|
||||
private java.lang.String sksj;
|
||||
/**授课周次*/
|
||||
@Excel(name = "授课周次", width = 15)
|
||||
@ApiModelProperty(value = "授课周次")
|
||||
private java.lang.String jkzc;
|
||||
/**学年学期【orcl】*/
|
||||
@Excel(name = "学年学期【orcl】", width = 15)
|
||||
@ApiModelProperty(value = "学年学期【orcl】")
|
||||
private java.lang.String xnxq;
|
||||
/**课程大类*/
|
||||
@Excel(name = "课程大类", width = 15)
|
||||
@ApiModelProperty(value = "课程大类")
|
||||
private java.lang.String kcdl;
|
||||
/**是否前台展示*/
|
||||
@Excel(name = "是否前台展示", width = 15)
|
||||
@ApiModelProperty(value = "是否前台展示")
|
||||
private java.lang.String sfqtzs;
|
||||
/**学年学期【系统自用】*/
|
||||
@Excel(name = "学年学期【系统自用】", width = 15)
|
||||
@ApiModelProperty(value = "学年学期【系统自用】")
|
||||
private java.lang.String xqxn;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcKechengExclude.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课程刨除数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcKechengExcludeMapper extends BaseMapper<KcKechengExclude> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcKechengExclude.mapper.KcKechengExcludeMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcKechengExclude.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课程刨除数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcKechengExcludeService extends IService<KcKechengExclude> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcKechengExclude.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcKechengExclude.entity.KcKechengExclude;
|
||||
import org.jeecg.modules.kc.kcKechengExclude.mapper.KcKechengExcludeMapper;
|
||||
import org.jeecg.modules.kc.kcKechengExclude.service.IKcKechengExcludeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 课程刨除数据
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-21
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcKechengExcludeServiceImpl extends ServiceImpl<KcKechengExcludeMapper, KcKechengExclude> implements IKcKechengExcludeService {
|
||||
|
||||
}
|
||||
|
|
@ -13,8 +13,10 @@ import cn.hutool.core.date.DateTime;
|
|||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
|
||||
|
|
@ -26,6 +28,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.service.IKcTingkeBmdService;
|
||||
import org.jeecg.modules.kc.kcXqxnHistory.entity.KcXqxnHistory;
|
||||
import org.jeecg.modules.kc.kcXqxnHistory.service.IKcXqxnHistoryService;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
|
||||
|
|
@ -79,6 +83,8 @@ public class KcSysConfigController extends JeecgController<KcSysConfig, IKcSysCo
|
|||
private IKcKetangbiaoHisService kcKetangbiaoHisService;
|
||||
@Autowired
|
||||
private IKcXqxnHistoryService kcXqxnHistoryService;
|
||||
@Autowired
|
||||
private IKcTingkeBmdService kcTingkeBmdService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
|
@ -187,8 +193,16 @@ public class KcSysConfigController extends JeecgController<KcSysConfig, IKcSysCo
|
|||
@GetMapping(value = "/queryById")
|
||||
public Result<KcSysConfig> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById(id);
|
||||
if(kcSysConfig==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<KcTingkeBmd> query = new QueryWrapper<KcTingkeBmd>();
|
||||
query.eq("jgh", user.getUsername());
|
||||
query.eq("xnxq", kcSysConfig.getFlag1());
|
||||
query.last("limit 1");
|
||||
KcTingkeBmd kcTingkeBmd = kcTingkeBmdService.getOne(query);
|
||||
if(kcTingkeBmd==null) {
|
||||
kcSysConfig.setSfbmd("n");
|
||||
}else{
|
||||
kcSysConfig.setSfbmd("y");
|
||||
}
|
||||
return Result.OK(kcSysConfig);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,8 @@ 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 com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
|
@ -103,9 +101,17 @@ public class KcSysConfig implements Serializable {
|
|||
@Excel(name = "今日课堂-说明文字", width = 15)
|
||||
@ApiModelProperty(value = "今日课堂-说明文字")
|
||||
private java.lang.String jrktTitle;
|
||||
/**今日课堂-说明文字*/
|
||||
@Excel(name = "白名单-说明文字", width = 15)
|
||||
@ApiModelProperty(value = "白名单-说明文字")
|
||||
private java.lang.String bmdTitle;
|
||||
/**智慧教室播放错误提示文字*/
|
||||
@Excel(name = "智慧教室播放错误提示文字", width = 15)
|
||||
@ApiModelProperty(value = "智慧教室播放错误提示文字")
|
||||
private java.lang.String videoPlayErrTitle;
|
||||
private java.lang.String flag9;//今日课表听课按钮
|
||||
|
||||
//是否白名单 y是 n否
|
||||
@TableField(exist = false)
|
||||
private String sfbmd;//是否白名单
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,276 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.controller;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.io.IOException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.vo.LoginUser;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.vo.KcTingkeBmdPage;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.service.IKcTingkeBmdService;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.service.IKcTingkeBmdKcxxService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
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 com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 听课白名单教师信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="听课白名单教师信息")
|
||||
@RestController
|
||||
@RequestMapping("/kcTingkeBmd/kcTingkeBmd")
|
||||
@Slf4j
|
||||
public class KcTingkeBmdController {
|
||||
@Autowired
|
||||
private IKcTingkeBmdService kcTingkeBmdService;
|
||||
@Autowired
|
||||
private IKcTingkeBmdKcxxService kcTingkeBmdKcxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcTingkeBmd
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "听课白名单教师信息-分页列表查询")
|
||||
@ApiOperation(value="听课白名单教师信息-分页列表查询", notes="听课白名单教师信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcTingkeBmd>> queryPageList(KcTingkeBmd kcTingkeBmd,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcTingkeBmd> queryWrapper = QueryGenerator.initQueryWrapper(kcTingkeBmd, req.getParameterMap());
|
||||
Page<KcTingkeBmd> page = new Page<KcTingkeBmd>(pageNo, pageSize);
|
||||
IPage<KcTingkeBmd> pageList = kcTingkeBmdService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcTingkeBmdPage
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "听课白名单教师信息-添加")
|
||||
@ApiOperation(value="听课白名单教师信息-添加", notes="听课白名单教师信息-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcTingkeBmdPage kcTingkeBmdPage) {
|
||||
KcTingkeBmd kcTingkeBmd = new KcTingkeBmd();
|
||||
BeanUtils.copyProperties(kcTingkeBmdPage, kcTingkeBmd);
|
||||
kcTingkeBmdService.saveMain(kcTingkeBmd, kcTingkeBmdPage.getKcTingkeBmdKcxxList());
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcTingkeBmdPage
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "听课白名单教师信息-编辑")
|
||||
@ApiOperation(value="听课白名单教师信息-编辑", notes="听课白名单教师信息-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcTingkeBmdPage kcTingkeBmdPage) {
|
||||
KcTingkeBmd kcTingkeBmd = new KcTingkeBmd();
|
||||
BeanUtils.copyProperties(kcTingkeBmdPage, kcTingkeBmd);
|
||||
KcTingkeBmd kcTingkeBmdEntity = kcTingkeBmdService.getById(kcTingkeBmd.getId());
|
||||
if(kcTingkeBmdEntity==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
kcTingkeBmdService.updateMain(kcTingkeBmd, kcTingkeBmdPage.getKcTingkeBmdKcxxList());
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "听课白名单教师信息-通过id删除")
|
||||
@ApiOperation(value="听课白名单教师信息-通过id删除", notes="听课白名单教师信息-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcTingkeBmdService.delMain(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "听课白名单教师信息-批量删除")
|
||||
@ApiOperation(value="听课白名单教师信息-批量删除", notes="听课白名单教师信息-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcTingkeBmdService.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "听课白名单教师信息-通过id查询")
|
||||
@ApiOperation(value="听课白名单教师信息-通过id查询", notes="听课白名单教师信息-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<KcTingkeBmd> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcTingkeBmd kcTingkeBmd = kcTingkeBmdService.getById(id);
|
||||
if(kcTingkeBmd==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcTingkeBmd);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "分配的课程通过主表ID查询")
|
||||
@ApiOperation(value="分配的课程主表ID查询", notes="分配的课程-通主表ID查询")
|
||||
@GetMapping(value = "/queryKcTingkeBmdKcxxByMainId")
|
||||
public Result<List<KcTingkeBmdKcxx>> queryKcTingkeBmdKcxxListByMainId(@RequestParam(name="id",required=true) String id) {
|
||||
List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList = kcTingkeBmdKcxxService.selectByMainId(id);
|
||||
return Result.OK(kcTingkeBmdKcxxList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcTingkeBmd
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcTingkeBmd kcTingkeBmd) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
QueryWrapper<KcTingkeBmd> queryWrapper = QueryGenerator.initQueryWrapper(kcTingkeBmd, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//配置选中数据查询条件
|
||||
String selections = request.getParameter("selections");
|
||||
if(oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
queryWrapper.in("id",selectionList);
|
||||
}
|
||||
//Step.2 获取导出数据
|
||||
List<KcTingkeBmd> kcTingkeBmdList = kcTingkeBmdService.list(queryWrapper);
|
||||
|
||||
// Step.3 组装pageList
|
||||
List<KcTingkeBmdPage> pageList = new ArrayList<KcTingkeBmdPage>();
|
||||
for (KcTingkeBmd main : kcTingkeBmdList) {
|
||||
KcTingkeBmdPage vo = new KcTingkeBmdPage();
|
||||
BeanUtils.copyProperties(main, vo);
|
||||
List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList = kcTingkeBmdKcxxService.selectByMainId(main.getId());
|
||||
vo.setKcTingkeBmdKcxxList(kcTingkeBmdKcxxList);
|
||||
pageList.add(vo);
|
||||
}
|
||||
|
||||
// Step.4 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "听课白名单教师信息列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, KcTingkeBmdPage.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("听课白名单教师信息数据", "导出人:"+sysUser.getRealname(), "听课白名单教师信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcTingkeBmd:kc_tingke_bmd:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
// 获取上传文件对象
|
||||
MultipartFile file = entity.getValue();
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<KcTingkeBmdPage> list = ExcelImportUtil.importExcel(file.getInputStream(), KcTingkeBmdPage.class, params);
|
||||
for (KcTingkeBmdPage page : list) {
|
||||
KcTingkeBmd po = new KcTingkeBmd();
|
||||
BeanUtils.copyProperties(page, po);
|
||||
kcTingkeBmdService.saveMain(po, page.getKcTingkeBmdKcxxList());
|
||||
}
|
||||
return Result.OK("文件导入成功!数据行数:" + list.size());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
return Result.error("文件导入失败:"+e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.OK("文件导入失败!");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="听课白名单教师信息-通过jgh查询", notes="听课白名单教师信息-通过id查询")
|
||||
@GetMapping(value = "/getBmdInfo")
|
||||
public Result<String> getBmdInfo(@RequestParam(name="jgh",required=true) String jgh) {
|
||||
QueryWrapper<KcTingkeBmd> query = new QueryWrapper<KcTingkeBmd>();
|
||||
query.eq("jgh", jgh);
|
||||
query.last("limit 1");
|
||||
KcTingkeBmd kcTingkeBmd = kcTingkeBmdService.getOne(query);
|
||||
if(kcTingkeBmd==null) {
|
||||
return Result.OK("n");
|
||||
}else{
|
||||
return Result.OK("y");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
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;
|
||||
|
||||
/**
|
||||
* @Description: 听课白名单教师信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="kc_tingke_bmd对象", description="听课白名单教师信息")
|
||||
@Data
|
||||
@TableName("kc_tingke_bmd")
|
||||
public class KcTingkeBmd implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**sysOrgCode*/
|
||||
@ApiModelProperty(value = "sysOrgCode")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**教师姓名*/
|
||||
@Excel(name = "教师姓名", width = 15)
|
||||
@ApiModelProperty(value = "教师姓名")
|
||||
private java.lang.String jsxm;
|
||||
/**所属学院*/
|
||||
@Excel(name = "所属学院", width = 15)
|
||||
@ApiModelProperty(value = "所属学院")
|
||||
private java.lang.String ssxy;
|
||||
/**学年学期*/
|
||||
@Excel(name = "学年学期", width = 15)
|
||||
@ApiModelProperty(value = "学年学期")
|
||||
private java.lang.String xnxq;
|
||||
|
||||
/**kssj*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "kssj")
|
||||
private Date kssj;
|
||||
/**jssj*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "jssj")
|
||||
private Date jssj;
|
||||
}
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
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 java.util.Date;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* @Description: 分配的课程
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="kc_tingke_bmd_kcxx对象", description="分配的课程")
|
||||
@Data
|
||||
@TableName("kc_tingke_bmd_kcxx")
|
||||
public class KcTingkeBmdKcxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**sysOrgCode*/
|
||||
@ApiModelProperty(value = "sysOrgCode")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**白名单id*/
|
||||
@ApiModelProperty(value = "白名单id")
|
||||
private java.lang.String bmdId;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**授课地点*/
|
||||
@Excel(name = "授课地点", width = 15)
|
||||
@ApiModelProperty(value = "授课地点")
|
||||
private java.lang.String skdd;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15)
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String hh;
|
||||
/**授课日期*/
|
||||
@Excel(name = "授课日期", width = 15)
|
||||
@ApiModelProperty(value = "授课日期")
|
||||
private java.lang.String skrq;
|
||||
/**学年学期*/
|
||||
@Excel(name = "学年学期", width = 15)
|
||||
@ApiModelProperty(value = "学年学期")
|
||||
private java.lang.String xnxq;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**开课单位*/
|
||||
@Excel(name = "开课单位", width = 15)
|
||||
@ApiModelProperty(value = "开课单位")
|
||||
private java.lang.String kkdw;
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 分配的课程
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcTingkeBmdKcxxMapper extends BaseMapper<KcTingkeBmdKcxx> {
|
||||
|
||||
/**
|
||||
* 通过主表id删除子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<KcTingkeBmdKcxx>
|
||||
*/
|
||||
public List<KcTingkeBmdKcxx> selectByMainId(@Param("mainId") String mainId);
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 听课白名单教师信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcTingkeBmdMapper extends BaseMapper<KcTingkeBmd> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?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.kcTingkeBmd.mapper.KcTingkeBmdKcxxMapper">
|
||||
|
||||
<delete id="deleteByMainId" parameterType="java.lang.String">
|
||||
DELETE
|
||||
FROM kc_tingke_bmd_kcxx
|
||||
WHERE
|
||||
bmd_id = #{mainId} </delete>
|
||||
|
||||
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx">
|
||||
SELECT *
|
||||
FROM kc_tingke_bmd_kcxx
|
||||
WHERE
|
||||
bmd_id = #{mainId} </select>
|
||||
</mapper>
|
||||
|
|
@ -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.kcTingkeBmd.mapper.KcTingkeBmdMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 分配的课程
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcTingkeBmdKcxxService extends IService<KcTingkeBmdKcxx> {
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<KcTingkeBmdKcxx>
|
||||
*/
|
||||
public List<KcTingkeBmdKcxx> selectByMainId(String mainId);
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 听课白名单教师信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcTingkeBmdService extends IService<KcTingkeBmd> {
|
||||
|
||||
/**
|
||||
* 添加一对多
|
||||
*
|
||||
* @param kcTingkeBmd
|
||||
* @param kcTingkeBmdKcxxList
|
||||
*/
|
||||
public void saveMain(KcTingkeBmd kcTingkeBmd,List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList) ;
|
||||
|
||||
/**
|
||||
* 修改一对多
|
||||
*
|
||||
* @param kcTingkeBmd
|
||||
* @param kcTingkeBmdKcxxList
|
||||
*/
|
||||
public void updateMain(KcTingkeBmd kcTingkeBmd,List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList);
|
||||
|
||||
/**
|
||||
* 删除一对多
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void delMain (String id);
|
||||
|
||||
/**
|
||||
* 批量删除一对多
|
||||
*
|
||||
* @param idList
|
||||
*/
|
||||
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.mapper.KcTingkeBmdKcxxMapper;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.service.IKcTingkeBmdKcxxService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* @Description: 分配的课程
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcTingkeBmdKcxxServiceImpl extends ServiceImpl<KcTingkeBmdKcxxMapper, KcTingkeBmdKcxx> implements IKcTingkeBmdKcxxService {
|
||||
|
||||
@Autowired
|
||||
private KcTingkeBmdKcxxMapper kcTingkeBmdKcxxMapper;
|
||||
|
||||
@Override
|
||||
public List<KcTingkeBmdKcxx> selectByMainId(String mainId) {
|
||||
return kcTingkeBmdKcxxMapper.selectByMainId(mainId);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.mapper.KcTingkeBmdKcxxMapper;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.mapper.KcTingkeBmdMapper;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.service.IKcTingkeBmdService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @Description: 听课白名单教师信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcTingkeBmdServiceImpl extends ServiceImpl<KcTingkeBmdMapper, KcTingkeBmd> implements IKcTingkeBmdService {
|
||||
|
||||
@Autowired
|
||||
private KcTingkeBmdMapper kcTingkeBmdMapper;
|
||||
@Autowired
|
||||
private KcTingkeBmdKcxxMapper kcTingkeBmdKcxxMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void saveMain(KcTingkeBmd kcTingkeBmd, List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList) {
|
||||
kcTingkeBmdMapper.insert(kcTingkeBmd);
|
||||
if(kcTingkeBmdKcxxList!=null && kcTingkeBmdKcxxList.size()>0) {
|
||||
for(KcTingkeBmdKcxx entity:kcTingkeBmdKcxxList) {
|
||||
//外键设置
|
||||
entity.setId(null);
|
||||
entity.setBmdId(kcTingkeBmd.getId());
|
||||
kcTingkeBmdKcxxMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateMain(KcTingkeBmd kcTingkeBmd,List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList) {
|
||||
kcTingkeBmdMapper.updateById(kcTingkeBmd);
|
||||
|
||||
//1.先删除子表数据
|
||||
kcTingkeBmdKcxxMapper.deleteByMainId(kcTingkeBmd.getId());
|
||||
|
||||
//2.子表数据重新插入
|
||||
if(kcTingkeBmdKcxxList!=null && kcTingkeBmdKcxxList.size()>0) {
|
||||
for(KcTingkeBmdKcxx entity:kcTingkeBmdKcxxList) {
|
||||
//外键设置
|
||||
entity.setBmdId(kcTingkeBmd.getId());
|
||||
kcTingkeBmdKcxxMapper.insert(entity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delMain(String id) {
|
||||
kcTingkeBmdKcxxMapper.deleteByMainId(id);
|
||||
kcTingkeBmdMapper.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delBatchMain(Collection<? extends Serializable> idList) {
|
||||
for(Serializable id:idList) {
|
||||
kcTingkeBmdKcxxMapper.deleteByMainId(id.toString());
|
||||
kcTingkeBmdMapper.deleteById(id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package org.jeecg.modules.kc.kcTingkeBmd.vo;
|
||||
|
||||
import java.util.List;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmdKcxx;
|
||||
import lombok.Data;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecgframework.poi.excel.annotation.ExcelEntity;
|
||||
import org.jeecgframework.poi.excel.annotation.ExcelCollection;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.util.Date;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 听课白名单教师信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-03-07
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value="kc_tingke_bmdPage对象", description="听课白名单教师信息")
|
||||
public class KcTingkeBmdPage {
|
||||
|
||||
/**id*/
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**sysOrgCode*/
|
||||
@ApiModelProperty(value = "sysOrgCode")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**教师姓名*/
|
||||
@Excel(name = "教师姓名", width = 15)
|
||||
@ApiModelProperty(value = "教师姓名")
|
||||
private java.lang.String jsxm;
|
||||
/**所属学院*/
|
||||
@Excel(name = "所属学院", width = 15)
|
||||
@ApiModelProperty(value = "所属学院")
|
||||
private java.lang.String ssxy;
|
||||
/**学年学期*/
|
||||
@Excel(name = "学年学期", width = 15)
|
||||
@ApiModelProperty(value = "学年学期")
|
||||
private java.lang.String xnxq;
|
||||
|
||||
/**kssj*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "kssj")
|
||||
private Date kssj;
|
||||
/**jssj*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "jssj")
|
||||
private Date jssj;
|
||||
|
||||
@ExcelCollection(name="分配的课程")
|
||||
@ApiModelProperty(value = "分配的课程")
|
||||
private List<KcTingkeBmdKcxx> kcTingkeBmdKcxxList;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
package org.jeecg.modules.kc.kcTtksdpz.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.kcTtksdpz.entity.KcTtksdpz;
|
||||
import org.jeecg.modules.kc.kcTtksdpz.service.IKcTtksdpzService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 调停课配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="调停课配置")
|
||||
@RestController
|
||||
@RequestMapping("/kcTtksdpz/kcTtksdpz")
|
||||
@Slf4j
|
||||
public class KcTtksdpzController extends JeecgController<KcTtksdpz, IKcTtksdpzService> {
|
||||
@Autowired
|
||||
private IKcTtksdpzService kcTtksdpzService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcTtksdpz
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "调停课配置-分页列表查询")
|
||||
@ApiOperation(value="调停课配置-分页列表查询", notes="调停课配置-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcTtksdpz>> queryPageList(KcTtksdpz kcTtksdpz,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcTtksdpz> queryWrapper = QueryGenerator.initQueryWrapper(kcTtksdpz, req.getParameterMap());
|
||||
Page<KcTtksdpz> page = new Page<KcTtksdpz>(pageNo, pageSize);
|
||||
IPage<KcTtksdpz> pageList = kcTtksdpzService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcTtksdpz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调停课配置-添加")
|
||||
@ApiOperation(value="调停课配置-添加", notes="调停课配置-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcTtksdpz kcTtksdpz) {
|
||||
kcTtksdpzService.save(kcTtksdpz);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcTtksdpz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调停课配置-编辑")
|
||||
@ApiOperation(value="调停课配置-编辑", notes="调停课配置-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcTtksdpz kcTtksdpz) {
|
||||
kcTtksdpzService.updateById(kcTtksdpz);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调停课配置-通过id删除")
|
||||
@ApiOperation(value="调停课配置-通过id删除", notes="调停课配置-通过id删除")
|
||||
@RequiresPermissions("kcTtksdpz:kc_ttksdpz:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcTtksdpzService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "调停课配置-批量删除")
|
||||
@ApiOperation(value="调停课配置-批量删除", notes="调停课配置-批量删除")
|
||||
@RequiresPermissions("kcTtksdpz:kc_ttksdpz:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcTtksdpzService.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<KcTtksdpz> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcTtksdpz kcTtksdpz = kcTtksdpzService.getById(id);
|
||||
if(kcTtksdpz==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcTtksdpz);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcTtksdpz
|
||||
*/
|
||||
@RequiresPermissions("kcTtksdpz:kc_ttksdpz:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcTtksdpz kcTtksdpz) {
|
||||
return super.exportXls(request, kcTtksdpz, KcTtksdpz.class, "调停课配置");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcTtksdpz:kc_ttksdpz:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcTtksdpz.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package org.jeecg.modules.kc.kcTtksdpz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 调停课配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_ttksdpz")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_ttksdpz对象", description="调停课配置")
|
||||
public class KcTtksdpz implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**操作人*/
|
||||
@ApiModelProperty(value = "操作人")
|
||||
private java.lang.String createBy;
|
||||
/**操作时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "操作时间")
|
||||
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, dicCode = "tklx_type")
|
||||
@Dict(dicCode = "tklx_type")
|
||||
@ApiModelProperty(value = "调课类型")
|
||||
private java.lang.String tklx;
|
||||
/**放假时间*/
|
||||
@Excel(name = "放假时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "放假时间")
|
||||
private java.util.Date fjsj;
|
||||
/**调课时间*/
|
||||
@Excel(name = "调课时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "调课时间")
|
||||
private java.util.Date tksj;
|
||||
/**执行时间*/
|
||||
@Excel(name = "执行时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "执行时间")
|
||||
private java.util.Date zxsj;
|
||||
/**执行sql1*/
|
||||
@Excel(name = "执行sql1", width = 15)
|
||||
@ApiModelProperty(value = "执行sql1")
|
||||
private java.lang.String zxsql1;
|
||||
/**执行sql2*/
|
||||
@Excel(name = "执行sql2", width = 15)
|
||||
@ApiModelProperty(value = "执行sql2")
|
||||
private java.lang.String zxsql2;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.kcTtksdpz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.kcTtksdpz.entity.KcTtksdpz;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 调停课配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcTtksdpzMapper extends BaseMapper<KcTtksdpz> {
|
||||
|
||||
}
|
||||
|
|
@ -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.kcTtksdpz.mapper.KcTtksdpzMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.kcTtksdpz.service;
|
||||
|
||||
import org.jeecg.modules.kc.kcTtksdpz.entity.KcTtksdpz;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 调停课配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcTtksdpzService extends IService<KcTtksdpz> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.kcTtksdpz.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.kcTtksdpz.entity.KcTtksdpz;
|
||||
import org.jeecg.modules.kc.kcTtksdpz.mapper.KcTtksdpzMapper;
|
||||
import org.jeecg.modules.kc.kcTtksdpz.service.IKcTtksdpzService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 调停课配置
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-16
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcTtksdpzServiceImpl extends ServiceImpl<KcTtksdpzMapper, KcTtksdpz> implements IKcTtksdpzService {
|
||||
|
||||
}
|
||||
|
|
@ -98,15 +98,73 @@ public class KcWechatSendLogController extends JeecgController<KcWechatSendLog,
|
|||
}
|
||||
|
||||
|
||||
// appId
|
||||
private static final String appId = "wx59920eb69d611d7f";//东师
|
||||
// // appId
|
||||
// private static final String appId = "wx59920eb69d611d7f";//东师
|
||||
//
|
||||
// // appIdSecret
|
||||
// private static final String appIdSecret = "bf0c19af0e956f447ede4dd902ea63b7";//东师
|
||||
|
||||
// appId
|
||||
private static final String appId = "wx031697a8ca09a5ce";//东师
|
||||
|
||||
private static final String agentid = "1000065";//
|
||||
// appIdSecret
|
||||
private static final String appIdSecret = "bf0c19af0e956f447ede4dd902ea63b7";//东师
|
||||
private static final String appIdSecret = "6Qhnge3xfzAQMDX2TcjEyE0vUGP96hP9OTYUsYBze2Y";//东师
|
||||
|
||||
//微信通知点击后跳转的页面
|
||||
private static final String domainTo = "https://zxkccx.webvpn.nenu.edu.cn";
|
||||
|
||||
|
||||
|
||||
public void sendWxmessage(KcWechatSendLog kcWechatSendLog) {
|
||||
String openId = kcWechatSendLog.getOpenid();//曹老师账号
|
||||
System.out.println("openId:"+openId+"");
|
||||
if(StringUtils.isNotEmpty(openId)){
|
||||
try {
|
||||
String urlToken = "https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid="+ appId +"&corpsecret=" + appIdSecret;
|
||||
System.out.println("urlToken: "+ urlToken);
|
||||
String res = HttpUtil.get(urlToken);
|
||||
JSONObject jsonObjectToken = JSONObject.parseObject(res);
|
||||
System.out.println("jsonObjectToken:{}"+ jsonObjectToken);
|
||||
String accessToken = jsonObjectToken.getString("access_token");
|
||||
System.out.println("accessToken:{}"+ accessToken);
|
||||
|
||||
// 微信的基础accessToken
|
||||
String url = "https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=" + accessToken;
|
||||
Map<String, Object> sendMag = new HashMap<>();
|
||||
|
||||
// 1、xx老师,你好,您本学期(2023秋)听课要求为:5次,当前实际听课次数:3次,请尽快完成本学期的听课任务。
|
||||
String html = kcWechatSendLog.getYtkcs();
|
||||
html = html + "\n<a href=\""+domainTo+"\">查看</a>";
|
||||
sendMag.put("content", html);//授课老师推送内容
|
||||
RestTemplate restTemplate = new RestTemplate();
|
||||
//拼接base参数
|
||||
Map<String, Object> sendBody = new HashMap<>();
|
||||
sendBody.put("touser", openId); // openId
|
||||
sendBody.put("msgtype", "text"); // 消息类型,此时固定为:text
|
||||
sendBody.put("agentid", agentid); // 企业id
|
||||
sendBody.put("text",sendMag); //发送内容
|
||||
ResponseEntity<String> forEntity = restTemplate.postForEntity(url, sendBody, String.class);
|
||||
JSONObject jsonObject2 = JSONObject.parseObject(forEntity.getBody());
|
||||
System.out.println("jsonObject2 : " + jsonObject2);
|
||||
String messageCode = jsonObject2.getString("errcode");
|
||||
String msgId = jsonObject2.getString("msgid");
|
||||
System.out.println("messageCode : " + messageCode + ", msgId: " +msgId);
|
||||
kcWechatSendLog.setRemark(jsonObject2.toString());
|
||||
kcWechatSendLogService.updateById(kcWechatSendLog);
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
kcWechatSendLog.setRemark(e.getMessage());
|
||||
kcWechatSendLogService.updateById(kcWechatSendLog);
|
||||
}
|
||||
}else{
|
||||
kcWechatSendLog.setRemark("未获取到openid");
|
||||
kcWechatSendLogService.updateById(kcWechatSendLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void sendWxmessage2(KcWechatSendLog kcWechatSendLog) {
|
||||
String openId = kcWechatSendLog.getOpenid();//曹老师账号
|
||||
System.out.println("openId:"+openId+"");
|
||||
if(StringUtils.isNotEmpty(openId)){
|
||||
|
|
|
|||
|
|
@ -132,6 +132,12 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
queryWrapper.ge("skrq",getBxqStartTime());//<=
|
||||
queryWrapper.le("skrq",getBxqEndTime());//>=
|
||||
}
|
||||
if(StringUtils.isNotEmpty(kcKetangbiao.getStartTime())){
|
||||
queryWrapper.ge("skrq",kcKetangbiao.getStartTime());//<=
|
||||
}
|
||||
if(StringUtils.isNotEmpty(kcKetangbiao.getEndTime())){
|
||||
queryWrapper.le("skrq",kcKetangbiao.getEndTime());//>=
|
||||
}
|
||||
queryWrapper.apply(StringUtils.isNotBlank(kcKetangbiao.getYwmc())," (skjs like '%"+kcKetangbiao.getYwmc()+"%' or kcmc like '%"+kcKetangbiao.getYwmc()+"%')");
|
||||
queryWrapper.ne(StringUtils.isNotBlank(kcKetangbiao.getYwskxs()),"skxs",kcKetangbiao.getYwskxs());
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
|
|
@ -829,28 +835,17 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
|
||||
|
||||
@ApiOperation(value="统计年度课程信息数量", notes="统计年度课程信息数量")
|
||||
@GetMapping(value = "/getKtcountList")
|
||||
public Result<?> getKtcountList(KcKetangbiao kcKetangbiao,
|
||||
@GetMapping(value = "/getKccountList")
|
||||
public Result<?> getKccountList(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKetangbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKetangbiao, req.getParameterMap());
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
if(StringUtils.isBlank(kcKetangbiao.getXnxq())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.ge("skrq",kcSysConfig.getBxqkssj());
|
||||
queryWrapper.le("skrq",kcSysConfig.getBxqjssj()+" 23:59:59");
|
||||
}else{
|
||||
QueryWrapper<KcXqxnHistory> kcXqxnHistoryQueryWrapper = new QueryWrapper<KcXqxnHistory>();
|
||||
kcXqxnHistoryQueryWrapper.eq("title",kcKetangbiao.getXnxq());
|
||||
kcXqxnHistoryQueryWrapper.last("limit 1");
|
||||
KcXqxnHistory KcXqxnHistory = kcXqxnHistoryService.getOne(kcXqxnHistoryQueryWrapper);
|
||||
queryWrapper.ge("skrq",KcXqxnHistory.getStartTime());
|
||||
queryWrapper.le("skrq",KcXqxnHistory.getEndTime()+" 23:59:59");
|
||||
kcKetangbiao.setXnxq(kcSysConfig.getFlag1());
|
||||
}
|
||||
queryWrapper.orderByDesc("xnxq");
|
||||
queryWrapper.groupBy("kkdw");
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.getKtcountList(page,queryWrapper);
|
||||
IPage<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.getKccountList(page,kcKetangbiao);
|
||||
return Result.OK(kcKetangbiaoList);
|
||||
}
|
||||
|
||||
|
|
@ -867,19 +862,9 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
// Step.2 获取导出数据
|
||||
if(StringUtils.isBlank(object.getXnxq())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
queryWrapper.ge("skrq",kcSysConfig.getBxqkssj());
|
||||
queryWrapper.le("skrq",kcSysConfig.getBxqjssj()+" 23:59:59");
|
||||
}else{
|
||||
QueryWrapper<KcXqxnHistory> kcXqxnHistoryQueryWrapper = new QueryWrapper<KcXqxnHistory>();
|
||||
kcXqxnHistoryQueryWrapper.eq("title",object.getXnxq());
|
||||
kcXqxnHistoryQueryWrapper.last("limit 1");
|
||||
KcXqxnHistory KcXqxnHistory = kcXqxnHistoryService.getOne(kcXqxnHistoryQueryWrapper);
|
||||
queryWrapper.ge("skrq",KcXqxnHistory.getStartTime());
|
||||
queryWrapper.le("skrq",KcXqxnHistory.getEndTime()+" 23:59:59");
|
||||
object.setXnxq(kcSysConfig.getFlag1());
|
||||
}
|
||||
queryWrapper.orderByDesc("xnxq");
|
||||
queryWrapper.groupBy("kkdw");
|
||||
List<KcKetangbiaoNum> exportList = service.getKtcountExportList(queryWrapper);
|
||||
List<KcKetangbiaoNum> exportList = service.getKccountExportList(object);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
|
|
@ -896,4 +881,51 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
}
|
||||
|
||||
|
||||
@ApiOperation(value="统计年度课程信息数量", notes="统计年度课程信息数量")
|
||||
@GetMapping(value = "/getKtcountList")
|
||||
public Result<?> getKtcountList(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcKetangbiao> queryWrapper = QueryGenerator.initQueryWrapper(kcKetangbiao, req.getParameterMap());
|
||||
if(StringUtils.isBlank(kcKetangbiao.getXnxq())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
kcKetangbiao.setXnxq(kcSysConfig.getFlag1());
|
||||
}
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.getKtcountList(page,kcKetangbiao);
|
||||
return Result.OK(kcKetangbiaoList);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportKtnumXls")
|
||||
public ModelAndView exportKtnumXls(HttpServletRequest request, KcKetangbiaoNum kcKetangbiaoNum) {
|
||||
return exportKtnumXls(request, kcKetangbiaoNum, KcKetangbiaoNum.class, "课堂统计");
|
||||
}
|
||||
protected ModelAndView exportKtnumXls(HttpServletRequest request, KcKetangbiaoNum object, Class<KcKetangbiaoNum> clazz, String title) {
|
||||
// Step.1 组装查询条件
|
||||
QueryWrapper<KcKetangbiaoNum> queryWrapper = QueryGenerator.initQueryWrapper(object, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
// Step.2 获取导出数据
|
||||
if(StringUtils.isBlank(object.getXnxq())){
|
||||
KcSysConfig kcSysConfig = kcSysConfigService.getById("1");
|
||||
object.setXnxq(kcSysConfig.getFlag1());
|
||||
}
|
||||
List<KcKetangbiaoNum> exportList = service.getKtcountExportList(object);
|
||||
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, title);
|
||||
mv.addObject(NormalExcelConstants.CLASS, clazz);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams(title + "报表", "导出人:" + sysUser.getRealname(), title);
|
||||
// exportParams.setImageBasePath(upLoadPath);
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ public class KcKechengbiao implements Serializable {
|
|||
private java.lang.String kcdl;
|
||||
private java.lang.String szkc;//思政课程
|
||||
private String xqxn;
|
||||
private String flag;
|
||||
|
||||
/**课程名称或教师名*/
|
||||
@TableField(exist = false)
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ public class KcKetangbiao implements Serializable {
|
|||
/**是否停课*/
|
||||
@Excel(name = "是否停课", width = 15)
|
||||
@ApiModelProperty(value = "是否停课")
|
||||
@Dict(dicCode = "sftk_kc")
|
||||
private java.lang.Integer sftk;
|
||||
/**停课原因*/
|
||||
@Excel(name = "停课原因", width = 15)
|
||||
|
|
@ -223,6 +224,7 @@ public class KcKetangbiao implements Serializable {
|
|||
/**上课形式,0-线上,1-线下,2-线上线下混合*/
|
||||
@Excel(name = "上课形式,0-线上,1-线下,2-线上线下混合", width = 15)
|
||||
@ApiModelProperty(value = "上课形式,0-线上,1-线下,2-线上线下混合")
|
||||
@Dict(dicCode = "sftk_kc")
|
||||
private java.lang.Integer skxs;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
|
|
@ -320,4 +322,25 @@ public class KcKetangbiao implements Serializable {
|
|||
@TableField(exist = false)
|
||||
private KcJiaoshirongliang jiaoshirongliang;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String zhjs;
|
||||
@TableField(exist = false)
|
||||
private String bmdId;
|
||||
@TableField(exist = false)
|
||||
private String a1;
|
||||
@TableField(exist = false)
|
||||
private String a2;
|
||||
@TableField(exist = false)
|
||||
private String a3;
|
||||
@TableField(exist = false)
|
||||
private String a4;
|
||||
@TableField(exist = false)
|
||||
private String a5;
|
||||
@TableField(exist = false)
|
||||
private String a6;
|
||||
@TableField(exist = false)
|
||||
private String a7;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String flag;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,27 @@ public class KcKetangbiaoNum implements Serializable {
|
|||
@Excel(name = "开课数量", width = 15)
|
||||
private String num;
|
||||
|
||||
@Excel(name = "专业教育选修课", width = 15)
|
||||
private String a2;
|
||||
|
||||
@Excel(name = "专业教育必修课", width = 15)
|
||||
private String a1;
|
||||
|
||||
@Excel(name = "通识教育必修课", width = 15)
|
||||
private String a6;
|
||||
|
||||
@Excel(name = "通识教育选修课", width = 15)
|
||||
private String a7;
|
||||
|
||||
@Excel(name = "教师教育必修课", width = 15)
|
||||
private String a4;
|
||||
|
||||
@Excel(name = "教师教育选修课", width = 15)
|
||||
private String a5;
|
||||
|
||||
@Excel(name = "发展方向课", width = 15)
|
||||
private String a3;
|
||||
|
||||
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
|
|
|||
|
|
@ -33,4 +33,10 @@ public interface KcKechengbiaoMapper extends BaseMapper<KcKechengbiao> {
|
|||
void saveOne(KcKechengbiao kcKechengbiaoPar);
|
||||
|
||||
void removeCfsj(KcKechengbiao kcKechengbiao);
|
||||
|
||||
void updateKechengExculde(KcKechengbiao ktbExculde);
|
||||
|
||||
void updateAllFlag(KcKechengbiao kcKechengbiao);
|
||||
|
||||
void updateYxByXxhbkckb(KcKechengbiao kcbAll);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,11 @@ public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
|||
|
||||
void updateSkxs(KcKetangbiao kcKetangbiaoup);
|
||||
|
||||
IPage<Map<String, Object>> getKtcountList(Page<Map<String, Object>> page, @Param(Constants.WRAPPER)QueryWrapper queryWrapper);
|
||||
IPage<Map<String, Object>> getKtcountList(Page<Map<String, Object>> page, @Param(Constants.ENTITY) KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<KcKetangbiaoNum> getKtcountExportList(@Param(Constants.WRAPPER)QueryWrapper<KcKetangbiaoNum> queryWrapper);
|
||||
List<KcKetangbiaoNum> getKtcountExportList(KcKetangbiaoNum kcKetangbiao);
|
||||
|
||||
IPage<Map<String, Object>> getKccountList(Page<Map<String, Object>> page, @Param(Constants.ENTITY) KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<KcKetangbiaoNum> getKccountExportList(KcKetangbiaoNum kcKetangbiao);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,4 +101,39 @@
|
|||
kc_kechengbiao t where t.xqxn = #{xqxn}
|
||||
GROUP BY kcbh,kcmc,skjs,rwbh,kkdw,kcxz,sksj,kkdwid,xq,jgh,jzglb,sfcj,xqxn)a)
|
||||
</delete>
|
||||
|
||||
<update id="updateKechengExculde">
|
||||
update kc_kechengbiao kc,kc_kecheng_exclude kce
|
||||
set kc.flag = '1'
|
||||
where kc.xqxn = #{xnxq}
|
||||
and kce.sfqtzs in ('否','待定')
|
||||
and ifnull(kc.xqxn,'a') = ifnull(kce.xqxn,'a')
|
||||
and ifnull(kc.kcmc,'a') = ifnull(kce.kcmc,'a')
|
||||
and ifnull(kc.jgh,'a')=ifnull(kce.jgh,'a')
|
||||
and ifnull(kc.skjs,'a')=ifnull(kce.skjs,'a')
|
||||
and ifnull(kc.kkdw,'a')=ifnull(kce.kkdw,'a')
|
||||
and ifnull(kc.kcxz,'a')=ifnull(kce.kcxz,'a')
|
||||
and ifnull(kc.skdd,'a')=ifnull(kce.skdd,'a')
|
||||
and ifnull(kc.sksj,'a')=ifnull(kce.sksj,'a')
|
||||
and ifnull(replace(kc.jkzc,',',''),'a')=ifnull(replace(kce.jkzc,',',''),'a')
|
||||
and ifnull(kc.xnxq,'a') = ifnull(kce.xnxq,'a')
|
||||
</update>
|
||||
<update id="updateAllFlag">
|
||||
update kc_kechengbiao kc
|
||||
set kc.flag = '1'
|
||||
where kc.xqxn = #{xnxq}
|
||||
</update>
|
||||
<update id="updateYxByXxhbkckb">
|
||||
update xxhbkckb a,kc_kechengbiao b
|
||||
set b.flag = '0'
|
||||
where 1=1
|
||||
and a.kcbh = b.kcbh
|
||||
and a.xm = b.skjs
|
||||
and a.KKDW = b.kkdw
|
||||
and a.skdd = b.skdd
|
||||
and a.sksj = b.sksj
|
||||
and a.XNXQ = b.xnxq
|
||||
and b.jkzc = substring(a.jkzc,2,length(a.jkzc)-2)
|
||||
and a.XNXQ = b.xnxq
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -35,7 +35,9 @@
|
|||
|
||||
<select id="getKclblist" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
select ktb.*,if(yy.id is null,0,1) as sfyy,yy.isdeleted, case when js.jsbh is NULL then 0 else 1 end sfyzhjs,
|
||||
if(jc.hhjs is null,'00:00:00',concat(substr(jc.hhjs,1,2),':',substr(jc.hhjs,3,4),':00')) as jssj,kcb.szkc,IF(tkxx.kcmc is null,'0','1') as sftkb,tkxx.tksy
|
||||
if(jc.hhks is null,'00:00:00',concat(substr(jc.hhks,1,2),':',substr(jc.hhks,3,4),':00')) as xjkssj,
|
||||
if(jc.hhjs is null,'00:00:00',concat(substr(jc.hhjs,1,2),':',substr(jc.hhjs,3,4),':00')) as jssj,
|
||||
kcb.szkc,IF(tkxx.kcmc is null,'0','1') as sftkb,tkxx.tksy
|
||||
from kc_ketangbiao ktb
|
||||
left join (select * from kc_yuyue where userid = #{kcKetangbiao.userid}) yy on ktb.id = yy.ketangbiaoid
|
||||
LEFT JOIN (SELECT DISTINCT jsbh, jsmc from kc_zhihuijiaoshi where sfyx=0) js on ktb.jsbh = js.jsbh
|
||||
|
|
@ -87,12 +89,21 @@
|
|||
<if test="kcKetangbiao.sfyzhjs!=null and kcKetangbiao.sfyzhjs!=''">
|
||||
and js.jsbh is not NULL
|
||||
</if>
|
||||
<if test='kcKetangbiao.zhjs!=null and kcKetangbiao.zhjs!="" and kcKetangbiao.zhjs=="1"'>
|
||||
and js.jsbh is not NULL
|
||||
</if>
|
||||
<if test='kcKetangbiao.zhjs!=null and kcKetangbiao.zhjs!="" and kcKetangbiao.zhjs=="0"'>
|
||||
and js.jsbh is NULL
|
||||
</if>
|
||||
<if test="kcKetangbiao.jzwh!=null and kcKetangbiao.jzwh!=''">
|
||||
and jxljbxx.jzwh = #{kcKetangbiao.jzwh}
|
||||
</if>
|
||||
<if test="kcKetangbiao.sftkb!=null and kcKetangbiao.sftkb!=''">
|
||||
and IF(tkxx.kcmc is null,'0','1') = 0
|
||||
</if>
|
||||
<if test="kcKetangbiao.bmdId !=null and kcKetangbiao.bmdId !=''">
|
||||
and (ktb.kcmc,ktb.skjs,ktb.skdd,ktb.hh,ktb.skrq) in (select kcmc,skjs,skdd,hh,skrq from kc_tingke_bmd_kcxx where bmd_id in (${kcKetangbiao.bmdId}))
|
||||
</if>
|
||||
</where>
|
||||
order by ktb.hh asc,kkdw.id asc,IF(tkxx.kcmc is null,'0','1') asc
|
||||
</select>
|
||||
|
|
@ -151,6 +162,9 @@
|
|||
<if test="xnxq!=null and xnxq!=''">
|
||||
and xqxn = #{xnxq}
|
||||
</if>
|
||||
<if test="flag!=null and flag!=''">
|
||||
and flag = #{flag}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getIndexYkktstjYkkttkktList" resultType="java.util.Map">
|
||||
|
|
@ -640,11 +654,152 @@
|
|||
</update>
|
||||
|
||||
<select id="getKtcountList" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
select xnxq,kkdw,count('*') as num from kc_ketangbiao
|
||||
${ew.customSqlSegment}
|
||||
select xnxq,kkdw,sum(kksl) as num,sum(a1) as a1,sum(a2) as a2,sum(a3) as a3,sum(a4) as a4,sum(a5) as a5, sum(a6) as a6, sum(a7) as a7
|
||||
from (
|
||||
select xnxq,kkdw,count('*') as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq}
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,count('*') as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '专业教育必修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,count('*') as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '专业教育选修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,count('*') as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '发展方向课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,count('*') as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '教师教育必修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,count('*') as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '教师教育选修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,count('*') as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '通识教育必修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,count('*') as a7 from kc_ketangbiao
|
||||
where xnxq = #{et.xnxq} and kcxz = '通识教育选修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
|
||||
) t GROUP BY xnxq,kkdw
|
||||
</select>
|
||||
<select id="getKtcountExportList" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiaoNum">
|
||||
select xnxq,kkdw,count('*') as num from kc_ketangbiao
|
||||
${ew.customSqlSegment}
|
||||
select xnxq as xnxq,kkdw,sum(kksl) as num,sum(a1) as a1,sum(a2) as a2,sum(a3) as a3,sum(a4) as a4,sum(a5) as a5, sum(a6) as a6, sum(a7) as a7
|
||||
from (
|
||||
select xnxq,kkdw,count('*') as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq}
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,count('*') as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '专业教育必修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,count('*') as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '专业教育选修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,count('*') as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '发展方向课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,count('*') as a4,0 as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '教师教育必修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,count('*') as a5,0 as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '教师教育选修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,count('*') as a6,0 as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '通识教育必修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
union
|
||||
select xnxq,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,count('*') as a7 from kc_ketangbiao
|
||||
where xnxq = #{xnxq} and kcxz = '通识教育选修课'
|
||||
GROUP BY xnxq,kkdw
|
||||
|
||||
) t GROUP BY xnxq,kkdw
|
||||
</select>
|
||||
|
||||
<select id="getKccountList" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
|
||||
select xqxn as xnxq,kkdw,sum(kksl) as num,sum(a1) as a1,sum(a2) as a2,sum(a3) as a3,sum(a4) as a4,sum(a5) as a5, sum(a6) as a6, sum(a7) as a7
|
||||
from (
|
||||
select xqxn,kkdw,count('*') as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq}
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,count('*') as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '专业教育必修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,count('*') as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '专业教育选修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,count('*') as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '发展方向课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,count('*') as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '教师教育必修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,count('*') as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '教师教育选修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,count('*') as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '通识教育必修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,count('*') as a7 from kc_kechengbiao
|
||||
where xqxn = #{et.xnxq} and kcxz = '通识教育选修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
|
||||
) t GROUP BY xqxn,kkdw
|
||||
</select>
|
||||
<select id="getKccountExportList" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiaoNum">
|
||||
select xqxn as xnxq,kkdw,sum(kksl) as num,sum(a1) as a1,sum(a2) as a2,sum(a3) as a3,sum(a4) as a4,sum(a5) as a5, sum(a6) as a6, sum(a7) as a7
|
||||
from (
|
||||
select xqxn,kkdw,count('*') as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq}
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,count('*') as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '专业教育必修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,count('*') as a2,0 as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '专业教育选修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,count('*') as a3,0 as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '发展方向课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,count('*') as a4,0 as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '教师教育必修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,count('*') as a5,0 as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '教师教育选修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,count('*') as a6,0 as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '通识教育必修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
union
|
||||
select xqxn,kkdw,0 as kksl,0 as a1 ,0 as a2,0 as a3,0 as a4,0 as a5,0 as a6,count('*') as a7 from kc_kechengbiao
|
||||
where xqxn = #{xnxq} and kcxz = '通识教育选修课'
|
||||
GROUP BY xqxn,kkdw
|
||||
|
||||
) t GROUP BY xqxn,kkdw
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -31,4 +31,10 @@ public interface IKcKechengbiaoService extends IService<KcKechengbiao> {
|
|||
void saveOne(KcKechengbiao kcKechengbiaoPar);
|
||||
|
||||
void removeCfsj(KcKechengbiao kcKechengbiao);
|
||||
|
||||
void updateKechengExculde(KcKechengbiao ktbExculde);
|
||||
|
||||
void updateAllFlag(KcKechengbiao kcKechengbiao);
|
||||
|
||||
void updateYxByXxhbkckb(KcKechengbiao kcbAll);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,11 @@ public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
|||
|
||||
void updateSkxs(KcKetangbiao kcKetangbiaoup);
|
||||
|
||||
IPage<Map<String, Object>> getKtcountList(Page<Map<String, Object>> page, QueryWrapper qw);
|
||||
IPage<Map<String, Object>> getKtcountList(Page<Map<String, Object>> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<KcKetangbiaoNum> getKtcountExportList(QueryWrapper<KcKetangbiaoNum> queryWrapper);
|
||||
List<KcKetangbiaoNum> getKtcountExportList(KcKetangbiaoNum object);
|
||||
|
||||
IPage<Map<String, Object>> getKccountList(Page<Map<String, Object>> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<KcKetangbiaoNum> getKccountExportList(KcKetangbiaoNum object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,4 +61,18 @@ public class KcKechengbiaoServiceImpl extends ServiceImpl<KcKechengbiaoMapper, K
|
|||
baseMapper.removeCfsj(kcKechengbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateKechengExculde(KcKechengbiao ktbExculde) {
|
||||
baseMapper.updateKechengExculde(ktbExculde); }
|
||||
|
||||
@Override
|
||||
public void updateAllFlag(KcKechengbiao kcKechengbiao) {
|
||||
baseMapper.updateAllFlag(kcKechengbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateYxByXxhbkckb(KcKechengbiao kcbAll) {
|
||||
baseMapper.updateYxByXxhbkckb(kcbAll);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,10 +3,16 @@ package org.jeecg.modules.kc.ktgl.service.impl;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.entity.KcTingkeBmd;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.mapper.KcTingkeBmdKcxxMapper;
|
||||
import org.jeecg.modules.kc.kcTingkeBmd.mapper.KcTingkeBmdMapper;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiaoNum;
|
||||
import org.jeecg.modules.kc.ktgl.mapper.KcKetangbiaoMapper;
|
||||
import org.jeecg.modules.kc.ktgl.service.IKcKetangbiaoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
@ -23,8 +29,26 @@ import java.util.Map;
|
|||
@Service
|
||||
public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcKetangbiao> implements IKcKetangbiaoService {
|
||||
|
||||
@Autowired
|
||||
private KcTingkeBmdMapper kcTingkeBmdMapper;
|
||||
@Autowired
|
||||
private KcTingkeBmdKcxxMapper kcTingkeBmdKcxxMapper;
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
|
||||
LoginUser user = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//获取当前用户是否有白名单权限
|
||||
QueryWrapper<KcTingkeBmd> kcTingkeBmdQueryWrapper = new QueryWrapper<>();
|
||||
kcTingkeBmdQueryWrapper.eq("jgh",user.getUsername());
|
||||
List<KcTingkeBmd> list = kcTingkeBmdMapper.selectList(kcTingkeBmdQueryWrapper);
|
||||
String bmdId = "";
|
||||
for(int i = 0; i < list.size(); i++){
|
||||
bmdId = list.get(i).getId()+",";
|
||||
}
|
||||
if(bmdId.indexOf(",")>-1){
|
||||
bmdId = bmdId.substring(0,bmdId.length()-1);
|
||||
}
|
||||
kcKetangbiao.setBmdId(bmdId);
|
||||
return baseMapper.getKclblist(page,kcKetangbiao);
|
||||
}
|
||||
|
||||
|
|
@ -134,12 +158,22 @@ public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcK
|
|||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> getKtcountList(Page<Map<String, Object>> page, QueryWrapper qw) {
|
||||
return baseMapper.getKtcountList(page,qw);
|
||||
public IPage<Map<String, Object>> getKtcountList(Page<Map<String, Object>> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getKtcountList(page,kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcKetangbiaoNum> getKtcountExportList(QueryWrapper<KcKetangbiaoNum> queryWrapper) {
|
||||
return baseMapper.getKtcountExportList(queryWrapper);
|
||||
public List<KcKetangbiaoNum> getKtcountExportList(KcKetangbiaoNum object) {
|
||||
return baseMapper.getKtcountExportList(object);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> getKccountList(Page<Map<String, Object>> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getKccountList(page,kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcKetangbiaoNum> getKccountExportList(KcKetangbiaoNum object) {
|
||||
return baseMapper.getKccountExportList(object);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,8 @@ public interface KcEvaluationMapper extends BaseMapper<KcEvaluation> {
|
|||
List<KcEvaluation> findTj(@Param(Constants.WRAPPER) QueryWrapper<KcEvaluation> queryWrapper);
|
||||
|
||||
KcBdgxbcopy getOpenId(String skjs);
|
||||
|
||||
List<KcEvaluation> getCountlist(KcEvaluation kcEvaluation);
|
||||
|
||||
List<KcEvaluation> findTkcsTj(@Param(Constants.WRAPPER) QueryWrapper<KcEvaluation> kcEvaluationQueryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
SELECT pk.*, au.assess1 as tksf,xnxq.title as xqxn,if(kcb.szkc='1','是','否') as szkc FROM
|
||||
(
|
||||
SELECT
|
||||
k.id,c.gh as userid, c.xm as username, c.dwh as college, k.kkdw, k.kcmc, k.kcxz, k.skjs, k.week as zc, k.hh as jc, p.up_date, p.up_time, p.id AS evaId, p.evaluationver,
|
||||
k.id,c.gh as userid, c.xm as username, c.dwmc as college, k.kkdw, k.kcmc, k.kcxz, k.skjs, k.week as zc, k.hh as jc, p.up_date, p.up_time, p.id AS evaId, p.evaluationver,
|
||||
k.bz,k.skrq,k.kechengbiaoid,
|
||||
p.source
|
||||
FROM kc_ketangbiao k, kc_evaluation p, xxhbuser c
|
||||
|
|
@ -310,11 +310,10 @@
|
|||
FROM (
|
||||
SELECT ev.upuserid, cu.xm as upuser, count( ev.id ) sjtksl, count( CASE WHEN kt.kkdw = '马列教研室' THEN 1 END ) mltksl, cu.dwmc AS tkdw,kt.skrq
|
||||
FROM
|
||||
kc_evaluation ev,
|
||||
kc_evaluation ev
|
||||
left join kc_ketangbiao kt on ev.minkcid = kt.id
|
||||
left join xxhbuser cu on ev.upuserid = cu.gh
|
||||
|
||||
left join kc_kechengbiao kcb on pk.kechengbiaoid = kcb.id
|
||||
WHERE 1=1
|
||||
<if test="startTime != null and startTime != ''">
|
||||
<!-- and ev.up_date >= #{kcEvaluation.startTime}-->
|
||||
|
|
@ -351,8 +350,8 @@
|
|||
( select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,round(max(ytkcs-0),0) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN sys_dict_item b on a.tklx = b.item_value and dict_id = '1682386362753224705'
|
||||
and a.xqxn = (select flag1 from kc_sys_config where id = 1)
|
||||
<if test="kcEvaluation.tksf != null and kcEvaluation.tksf != ''">
|
||||
AND b.item_value = #{kcEvaluation.tksf}
|
||||
<if test="tksf != null and tksf != ''">
|
||||
AND b.item_value = #{tksf}
|
||||
</if>
|
||||
GROUP BY gh,xm) au
|
||||
on tk.upuserid = au.usercode
|
||||
|
|
@ -363,7 +362,7 @@
|
|||
SELECT pk.*, au.assess1 as tksf,xnxq.title as xqxn,if(kcb.szkc='1','是','否') as szkc FROM
|
||||
(
|
||||
SELECT
|
||||
k.id,c.gh as userid, c.xm as username, c.dwh as college, k.kkdw, k.kcmc, k.kcxz, k.skjs, k.week as zc, k.hh as jc, p.up_date, p.up_time, p.id AS evaId, p.evaluationver,
|
||||
k.id,c.gh as userid, c.xm as username, c.dwmc as college, k.kkdw, k.kcmc, k.kcxz, k.skjs, k.week as zc, k.hh as jc, p.up_date, p.up_time, p.id AS evaId, p.evaluationver,
|
||||
k.bz,k.skrq,k.kechengbiaoid,
|
||||
p.source
|
||||
FROM kc_ketangbiao k, kc_evaluation p, xxhbuser c
|
||||
|
|
@ -564,6 +563,21 @@
|
|||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="findTkcsTj" resultType="org.jeecg.modules.kc.qa.entity.KcEvaluation">
|
||||
SELECT
|
||||
a.gh upuserid,
|
||||
count( c.upuserid ) AS pkNum,
|
||||
xqxn as xnxq
|
||||
FROM
|
||||
kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN kc_xqxn_history b ON a.xqxn = b.title
|
||||
LEFT JOIN kc_evaluation c ON a.gh = c.upuserid
|
||||
AND c.up_date BETWEEN b.start_time
|
||||
AND b.end_time
|
||||
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<select id="getOpenId" resultType="org.jeecg.modules.kc.KcBdgxbcopy.entity.KcBdgxbcopy">
|
||||
SELECT a.* from choice.bdgxbcopy a
|
||||
left join xxhbuser b on a.userid = b.gh where b.xm = #{username} and a.openid is not null limit 1
|
||||
|
|
|
|||
|
|
@ -42,4 +42,8 @@ public interface IKcEvaluationService extends IService<KcEvaluation> {
|
|||
IPage<KcEvaluation> queryPkZuJiPage(Page<KcEvaluation> page, QueryWrapper<KcEvaluation> queryWrapper);
|
||||
|
||||
List<KcEvaluation> findTj(QueryWrapper<KcEvaluation> queryWrapper);
|
||||
|
||||
List<KcEvaluation> getCountlist(KcEvaluation kcEvaluation);
|
||||
|
||||
List<KcEvaluation> findTkcsTj(QueryWrapper<KcEvaluation> kcEvaluationQueryWrapper);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,6 +155,16 @@ public class KcEvaluationServiceImpl extends ServiceImpl<KcEvaluationMapper, KcE
|
|||
return baseMapper.findTj(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcEvaluation> getCountlist(KcEvaluation kcEvaluation) {
|
||||
return baseMapper.getCountlist(kcEvaluation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcEvaluation> findTkcsTj(QueryWrapper<KcEvaluation> kcEvaluationQueryWrapper) {
|
||||
return baseMapper.findTkcsTj(kcEvaluationQueryWrapper);
|
||||
}
|
||||
|
||||
// appId
|
||||
private static final String appId = "wx59920eb69d611d7f";//东师
|
||||
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ public class KcTingkeController extends JeecgController<KcTingke, IKcTingkeServi
|
|||
}else if("1".equals(kcTingke.getPj())){
|
||||
queryWrapper.apply("score is not null");
|
||||
}
|
||||
queryWrapper.orderByDesc("a.tingketime");
|
||||
Page<KcTingke> page = new Page<KcTingke>(pageNo, pageSize);
|
||||
IPage<Map<String,Object>> pageList = kcTingkeService.indexListPage(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
|
|
|
|||
|
|
@ -93,14 +93,23 @@
|
|||
<if test="kcxz!=null and kcxz!=''">
|
||||
AND kcxz = #{kcxz}
|
||||
</if>
|
||||
<if test="username!=null and username!=''">
|
||||
AND (tk.username like CONCAT('%',#{username},'%') or tk.userid like CONCAT('%',#{username},'%'))
|
||||
</if>
|
||||
<if test="userid!=null and userid!=''">
|
||||
AND tk.userid =#{userid}
|
||||
</if>
|
||||
GROUP BY tk.userid, tk.username, college
|
||||
) tk LEFT JOIN (
|
||||
SELECT usercode, username, GROUP_CONCAT( assess1 SEPARATOR ',' ) tksf1, GROUP_CONCAT( assess2 SEPARATOR ',' ) tksf2, max( tkyq ) tkyq,assesscode,dwmc
|
||||
FROM kc_assessuser
|
||||
|
||||
select gh as usercode,xm as username,GROUP_CONCAT( b.item_text SEPARATOR ',' ) as tksf1 ,max(ytkcs-0) as tkyq from kc_export_config_tpkwcqkjzglx a
|
||||
LEFT JOIN sys_dict_item b on a.tklx = b.item_value and dict_id = '1682386362753224705'
|
||||
and a.xqxn = (select flag1 from kc_sys_config where id = 1)
|
||||
WHERE 1 = 1
|
||||
<if test="tksf!=null and tksf!=''">
|
||||
AND assesscode = #{tksf}
|
||||
and b.item_value = #{tksf}
|
||||
</if>
|
||||
WHERE 1 = 1 GROUP BY usercode, username
|
||||
GROUP BY gh,xm
|
||||
) au ON tk.userid = au.usercode
|
||||
ORDER BY sjtksl DESC
|
||||
</select>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,203 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.controller;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
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.wjxWjxx.entity.WjxWjxx;
|
||||
import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService;
|
||||
|
||||
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.jeecg.modules.tools.AuthService;
|
||||
import org.jeecg.modules.tools.WjxAuthService;
|
||||
import org.jeecg.modules.tools.baidu.Base64Util;
|
||||
import org.jeecg.modules.tools.baidu.FileUtil;
|
||||
import org.jeecg.modules.tools.baidu.HttpUtil;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 问卷信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="问卷信息")
|
||||
@RestController
|
||||
@RequestMapping("/wjxWjxx/wjxWjxx")
|
||||
@Slf4j
|
||||
public class WjxWjxxController extends JeecgController<WjxWjxx, IWjxWjxxService> {
|
||||
@Autowired
|
||||
private IWjxWjxxService wjxWjxxService;
|
||||
|
||||
@Autowired
|
||||
private WjxAuthService wjxAuthService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param wjxWjxx
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "问卷信息-分页列表查询")
|
||||
@ApiOperation(value="问卷信息-分页列表查询", notes="问卷信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<WjxWjxx>> queryPageList(WjxWjxx wjxWjxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<WjxWjxx> queryWrapper = QueryGenerator.initQueryWrapper(wjxWjxx, req.getParameterMap());
|
||||
Page<WjxWjxx> page = new Page<WjxWjxx>(pageNo, pageSize);
|
||||
IPage<WjxWjxx> pageList = wjxWjxxService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param wjxWjxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问卷信息-添加")
|
||||
@ApiOperation(value="问卷信息-添加", notes="问卷信息-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody WjxWjxx wjxWjxx) {
|
||||
wjxWjxxService.save(wjxWjxx);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param wjxWjxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问卷信息-编辑")
|
||||
@ApiOperation(value="问卷信息-编辑", notes="问卷信息-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody WjxWjxx wjxWjxx) {
|
||||
wjxWjxxService.updateById(wjxWjxx);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问卷信息-通过id删除")
|
||||
@ApiOperation(value="问卷信息-通过id删除", notes="问卷信息-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
wjxWjxxService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "问卷信息-批量删除")
|
||||
@ApiOperation(value="问卷信息-批量删除", notes="问卷信息-批量删除")
|
||||
@RequiresPermissions("wjxWjxx:wjx_wjxx:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.wjxWjxxService.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<WjxWjxx> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
WjxWjxx wjxWjxx = wjxWjxxService.getById(id);
|
||||
if(wjxWjxx==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(wjxWjxx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param wjxWjxx
|
||||
*/
|
||||
@RequiresPermissions("wjxWjxx:wjx_wjxx:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, WjxWjxx wjxWjxx) {
|
||||
return super.exportXls(request, wjxWjxx, WjxWjxx.class, "问卷信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("wjxWjxx:wjx_wjxx:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, WjxWjxx.class);
|
||||
}
|
||||
|
||||
@ApiOperation(value="问卷信息-通过id查询", notes="问卷信息-通过id查询")
|
||||
@GetMapping(value = "/getWjxLogin")
|
||||
public Result<WjxWjxx> getWjxLogin() {
|
||||
try {
|
||||
// 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。
|
||||
String accessToken = wjxAuthService.getAuth();
|
||||
System.out.println(accessToken);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return Result.OK(null);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="发布问卷", notes="发布问卷")
|
||||
@GetMapping(value = "/fbwj")
|
||||
public Result<WjxWjxx> fbwj(@RequestParam(name="id",required=true) String id) {
|
||||
WjxWjxx wjxWjxx = wjxWjxxService.fbwj(id);
|
||||
return Result.OK(wjxWjxx);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 问卷信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("wjx_wjxx")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="wjx_wjxx对象", description="问卷信息")
|
||||
public class WjxWjxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**修改人*/
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private java.lang.String updateBy;
|
||||
/**修改时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private java.util.Date updateTime;
|
||||
/**创建账号*/
|
||||
@Excel(name = "创建账号", width = 15)
|
||||
@ApiModelProperty(value = "创建账号")
|
||||
private java.lang.String creater;
|
||||
/**问卷类型*/
|
||||
@Excel(name = "问卷类型", width = 15)
|
||||
@ApiModelProperty(value = "问卷类型")
|
||||
private java.lang.Integer atype;
|
||||
/**问卷名称*/
|
||||
@Excel(name = "问卷名称", width = 15)
|
||||
@ApiModelProperty(value = "问卷名称")
|
||||
private java.lang.String title;
|
||||
/**问卷描述*/
|
||||
@Excel(name = "问卷描述", width = 15)
|
||||
@ApiModelProperty(value = "问卷描述")
|
||||
private java.lang.String content;
|
||||
/**是否发布问卷*/
|
||||
@Excel(name = "是否发布问卷", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "yn")
|
||||
@ApiModelProperty(value = "是否发布问卷")
|
||||
private java.lang.String qpublish;
|
||||
/**是否图片压缩*/
|
||||
@Excel(name = "是否图片压缩", width = 15)
|
||||
@ApiModelProperty(value = "是否图片压缩")
|
||||
private java.lang.String compressImg;
|
||||
/**题目列表*/
|
||||
@Excel(name = "题目列表", width = 15)
|
||||
@ApiModelProperty(value = "题目列表")
|
||||
private java.lang.String questions;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 问卷信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface WjxWjxxMapper extends BaseMapper<WjxWjxx> {
|
||||
|
||||
}
|
||||
|
|
@ -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.wjxWjxx.mapper.WjxWjxxMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.service;
|
||||
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 问卷信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IWjxWjxxService extends IService<WjxWjxx> {
|
||||
|
||||
WjxWjxx fbwj(String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,207 @@
|
|||
package org.jeecg.modules.kc.wjxWjxx.service.impl;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.kc.wjxWjxx.entity.WjxWjxx;
|
||||
import org.jeecg.modules.kc.wjxWjxx.mapper.WjxWjxxMapper;
|
||||
import org.jeecg.modules.kc.wjxWjxx.service.IWjxWjxxService;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmlbMapper;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper;
|
||||
import org.jeecg.modules.tools.baidu.HttpUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
|
||||
import static cn.hutool.crypto.digest.DigestUtil.sha1;
|
||||
|
||||
/**
|
||||
* @Description: 问卷信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class WjxWjxxServiceImpl extends ServiceImpl<WjxWjxxMapper, WjxWjxx> implements IWjxWjxxService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private WjxWjxxTmlbMapper wjxWjxxTmlbMapper;
|
||||
@Autowired
|
||||
private WjxWjxxTmxxMapper wjxWjxxTmxxMapper;
|
||||
|
||||
@Override
|
||||
public WjxWjxx fbwj(String id) {
|
||||
|
||||
WjxWjxx wjxWjxx = baseMapper.selectById(id);
|
||||
|
||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<>();
|
||||
wjxWjxxTmlbQueryWrapper.eq("main_id", id);
|
||||
List<WjxWjxxTmlb> wjxWjxxTmlbList =wjxWjxxTmlbMapper.selectList(wjxWjxxTmlbQueryWrapper);
|
||||
|
||||
// Map<String,Object> questionsMap = new HashMap<>();
|
||||
// questionsMap.put("q_index","1");
|
||||
// questionsMap.put("q_type","3");
|
||||
// questionsMap.put("q_title",wjxWjxx.getTitle());
|
||||
// questionsMap.put("q_score","0");
|
||||
// questionsMap.put("is_requir","true");
|
||||
// questionsMap.put("q_subtype","3");
|
||||
// questionsMap.put("q_ceshi","false");
|
||||
// questionsMap.put("is_zhenbie","false");
|
||||
// questionsMap.put("min_time","0");
|
||||
// questionsMap.put("max_time","0");
|
||||
List<Map<String,Object>> questionsList = new ArrayList<>();
|
||||
for(WjxWjxxTmlb wWjxWjxxTmlb:wjxWjxxTmlbList){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("q_index",wWjxWjxxTmlb.getWjIndex());
|
||||
map.put("q_type",wWjxWjxxTmlb.getWjType());
|
||||
map.put("q_title",wWjxWjxxTmlb.getWjTitle());
|
||||
map.put("is_requir",true);
|
||||
// map.put("q_score",0);
|
||||
|
||||
//---------------没用的参数------------------
|
||||
// map.put("q_subtype",3);
|
||||
// map.put("q_ceshi","false");
|
||||
// map.put("q_parsing","解析测试");
|
||||
// map.put("prompt","提示测试");
|
||||
|
||||
// map.put("is_zhenbie","false");
|
||||
// map.put("min_time","0");
|
||||
// map.put("max_time","0");
|
||||
//---------------没用的参数------------------
|
||||
|
||||
|
||||
List<Map<String,Object>> itemsList = new ArrayList<>();
|
||||
List<WjxWjxxTmxx> tmxxList = wjxWjxxTmxxMapper.selectByMainId(wWjxWjxxTmlb.getId());
|
||||
for(WjxWjxxTmxx wjxWjxxTmxx:tmxxList){
|
||||
Map<String,Object> tmxxMap = new HashMap<>();
|
||||
tmxxMap.put("q_index",wjxWjxxTmxx.getWjIndex());
|
||||
tmxxMap.put("item_index",wjxWjxxTmxx.getItemIndex());
|
||||
tmxxMap.put("item_title",wjxWjxxTmxx.getItemTitle());
|
||||
tmxxMap.put("item_selected",Boolean.parseBoolean(wjxWjxxTmxx.getItemSelected()));
|
||||
tmxxMap.put("item_score",0);
|
||||
JSONObject json = new JSONObject(tmxxMap);
|
||||
itemsList.add(json);
|
||||
}
|
||||
map.put("items",itemsList);
|
||||
JSONObject json = new JSONObject(map);
|
||||
questionsList.add(json);
|
||||
}
|
||||
|
||||
|
||||
Long unixTimestamp = Instant.now().getEpochSecond();
|
||||
String ts = unixTimestamp.toString();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
//-----------题目必穿参数-------------
|
||||
map.put("atype",1);
|
||||
map.put("title",wjxWjxx.getTitle());
|
||||
map.put("desc",wjxWjxx.getContent());
|
||||
map.put("publish",true);
|
||||
map.put("questions",questionsList.toString());
|
||||
//-----------题目必穿参数-------------
|
||||
//-----------题目没用参数-------------
|
||||
// map.put("creater","jwctest");
|
||||
// map.put("compress_img","false");
|
||||
//-----------题目没用参数-------------
|
||||
|
||||
|
||||
//----------固定传参---------------
|
||||
map.put("appid","1321039");
|
||||
map.put("ts",ts);
|
||||
map.put("action","1000101");
|
||||
//----------固定传参---------------
|
||||
//---------------没用的参数------------------
|
||||
// map.put("encode","SHA1");
|
||||
// map.put("nocache","0");
|
||||
//---------------没用的参数------------------
|
||||
|
||||
|
||||
System.out.println("---->"+map);
|
||||
|
||||
String appkey = "55328ebd11964fc8b40c10011bcb425d";
|
||||
// StringBuilder toSign = new StringBuilder();
|
||||
// for (Map.Entry entry:map.entrySet()) {
|
||||
// if(StringUtils.isNotBlank(entry.getValue().toString())){
|
||||
// toSign.append(entry.getValue().toString());
|
||||
// }
|
||||
// }
|
||||
String sign = "";
|
||||
try {
|
||||
sign = generateSignature(map, appkey,"SHA1");
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.out.println("sign: "+sign);
|
||||
map.put("sign",sign);
|
||||
System.out.println("map:"+map.toString());
|
||||
String url = "https://www.wjx.cn/openapi/default.aspx";
|
||||
try {
|
||||
JSONObject json = new JSONObject(map);
|
||||
System.out.println("json:"+json.toString());
|
||||
String result = HttpUtil.post(url, "" , "application/json", json.toString());
|
||||
System.out.println(result);
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
// public void cjwj(){
|
||||
// String appkey = "":
|
||||
// String appid = "":
|
||||
// String ts= "":
|
||||
// String acction = "":
|
||||
// Map<String,String> map = new HashMap<String, String>();
|
||||
// map.put("appid",appid);
|
||||
// map.put("ts", ts);
|
||||
// map.put("action",acction);
|
||||
// String sign = generateSignature(map, appkey,"SHA1");
|
||||
// }
|
||||
|
||||
public String generateSignature(final Map<String, Object> data, String key, String signType) throws Exception {
|
||||
Set<String> keySet = data.keySet();
|
||||
String[] keyArray = keySet.toArray(new String[keySet.size()]);
|
||||
Arrays.sort(keyArray);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (String k : keyArray) {
|
||||
if (data.get(k).toString().length() > 0) // 参数值为空,则不参与签名
|
||||
sb.append(data.get(k).toString());
|
||||
}
|
||||
sb.append(key);
|
||||
if ("SHA1".equals(signType)) {
|
||||
return getSHA1(sb.toString()).toUpperCase();
|
||||
}
|
||||
else {
|
||||
throw new Exception(String.format("Invalid sign_type: %s", signType));
|
||||
}
|
||||
}
|
||||
|
||||
public String getSHA1(String input) {
|
||||
try {
|
||||
MessageDigest sha1 = MessageDigest.getInstance("SHA-1");
|
||||
byte[] bytes = sha1.digest(input.getBytes());
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (byte b : bytes) {
|
||||
sb.append(String.format("%02x", b));//十六进制
|
||||
}
|
||||
return sb.toString();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,283 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.controller;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.io.IOException;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.vo.LoginUser;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.wjxWjxxTmlb.entity.WjxWjxxTmxx;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.vo.WjxWjxxTmlbPage;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.service.IWjxWjxxTmlbService;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.service.IWjxWjxxTmxxService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
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 com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 题目信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="题目信息")
|
||||
@RestController
|
||||
@RequestMapping("/wjxWjxxTmlb/wjxWjxxTmlb")
|
||||
@Slf4j
|
||||
public class WjxWjxxTmlbController {
|
||||
@Autowired
|
||||
private IWjxWjxxTmlbService wjxWjxxTmlbService;
|
||||
@Autowired
|
||||
private IWjxWjxxTmxxService wjxWjxxTmxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param wjxWjxxTmlb
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "题目信息-分页列表查询")
|
||||
@ApiOperation(value="题目信息-分页列表查询", notes="题目信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<WjxWjxxTmlb>> queryPageList(WjxWjxxTmlb wjxWjxxTmlb,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<WjxWjxxTmlb> queryWrapper = QueryGenerator.initQueryWrapper(wjxWjxxTmlb, req.getParameterMap());
|
||||
Page<WjxWjxxTmlb> page = new Page<WjxWjxxTmlb>(pageNo, pageSize);
|
||||
IPage<WjxWjxxTmlb> pageList = wjxWjxxTmlbService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "题目信息-添加")
|
||||
@ApiOperation(value="题目信息-添加", notes="题目信息-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody List<WjxWjxxTmlbPage> list) {
|
||||
if(list.size()>0){
|
||||
String mainId = list.get(0).getMainId();
|
||||
|
||||
QueryWrapper<WjxWjxxTmlb> wjxWjxxTmlbQueryWrapper = new QueryWrapper<WjxWjxxTmlb>();
|
||||
wjxWjxxTmlbQueryWrapper.eq("main_id",mainId);
|
||||
List<WjxWjxxTmlb> list2 = wjxWjxxTmlbService.list(wjxWjxxTmlbQueryWrapper);
|
||||
for(WjxWjxxTmlb WjxWjxxTmlb:list2){
|
||||
wjxWjxxTmlbService.removeByMainId(WjxWjxxTmlb.getId());
|
||||
}
|
||||
|
||||
for(WjxWjxxTmlbPage wjxWjxxTmlbPage:list){
|
||||
WjxWjxxTmlb wjxWjxxTmlb = new WjxWjxxTmlb();
|
||||
BeanUtils.copyProperties(wjxWjxxTmlbPage, wjxWjxxTmlb);
|
||||
wjxWjxxTmlbService.saveMain(wjxWjxxTmlb, wjxWjxxTmlbPage.getWjxWjxxTmxxList());
|
||||
}
|
||||
}
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param wjxWjxxTmlbPage
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "题目信息-编辑")
|
||||
@ApiOperation(value="题目信息-编辑", notes="题目信息-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody WjxWjxxTmlbPage wjxWjxxTmlbPage) {
|
||||
WjxWjxxTmlb wjxWjxxTmlb = new WjxWjxxTmlb();
|
||||
BeanUtils.copyProperties(wjxWjxxTmlbPage, wjxWjxxTmlb);
|
||||
WjxWjxxTmlb wjxWjxxTmlbEntity = wjxWjxxTmlbService.getById(wjxWjxxTmlb.getId());
|
||||
if(wjxWjxxTmlbEntity==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
wjxWjxxTmlbService.updateMain(wjxWjxxTmlb, wjxWjxxTmlbPage.getWjxWjxxTmxxList());
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "题目信息-通过id删除")
|
||||
@ApiOperation(value="题目信息-通过id删除", notes="题目信息-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
wjxWjxxTmlbService.delMain(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "题目信息-批量删除")
|
||||
@ApiOperation(value="题目信息-批量删除", notes="题目信息-批量删除")
|
||||
@RequiresPermissions("wjxWjxxTmlb:wjx_wjxx_tmlb:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.wjxWjxxTmlbService.delBatchMain(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "题目信息-通过id查询")
|
||||
@ApiOperation(value="题目信息-通过id查询", notes="题目信息-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<WjxWjxxTmlb> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
WjxWjxxTmlb wjxWjxxTmlb = wjxWjxxTmlbService.getById(id);
|
||||
if(wjxWjxxTmlb==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(wjxWjxxTmlb);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "选项信息通过主表ID查询")
|
||||
@ApiOperation(value="选项信息主表ID查询", notes="选项信息-通主表ID查询")
|
||||
@GetMapping(value = "/queryWjxWjxxTmxxByMainId")
|
||||
public Result<List<WjxWjxxTmxx>> queryWjxWjxxTmxxListByMainId(@RequestParam(name="id",required=true) String id) {
|
||||
List<WjxWjxxTmxx> wjxWjxxTmxxList = wjxWjxxTmxxService.selectByMainId(id);
|
||||
return Result.OK(wjxWjxxTmxxList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param wjxWjxxTmlb
|
||||
*/
|
||||
@RequiresPermissions("wjxWjxxTmlb:wjx_wjxx_tmlb:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, WjxWjxxTmlb wjxWjxxTmlb) {
|
||||
// Step.1 组装查询条件查询数据
|
||||
QueryWrapper<WjxWjxxTmlb> queryWrapper = QueryGenerator.initQueryWrapper(wjxWjxxTmlb, request.getParameterMap());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//配置选中数据查询条件
|
||||
String selections = request.getParameter("selections");
|
||||
if(oConvertUtils.isNotEmpty(selections)) {
|
||||
List<String> selectionList = Arrays.asList(selections.split(","));
|
||||
queryWrapper.in("id",selectionList);
|
||||
}
|
||||
//Step.2 获取导出数据
|
||||
List<WjxWjxxTmlb> wjxWjxxTmlbList = wjxWjxxTmlbService.list(queryWrapper);
|
||||
|
||||
// Step.3 组装pageList
|
||||
List<WjxWjxxTmlbPage> pageList = new ArrayList<WjxWjxxTmlbPage>();
|
||||
for (WjxWjxxTmlb main : wjxWjxxTmlbList) {
|
||||
WjxWjxxTmlbPage vo = new WjxWjxxTmlbPage();
|
||||
BeanUtils.copyProperties(main, vo);
|
||||
List<WjxWjxxTmxx> wjxWjxxTmxxList = wjxWjxxTmxxService.selectByMainId(main.getId());
|
||||
vo.setWjxWjxxTmxxList(wjxWjxxTmxxList);
|
||||
pageList.add(vo);
|
||||
}
|
||||
|
||||
// Step.4 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "题目信息列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, WjxWjxxTmlbPage.class);
|
||||
mv.addObject(NormalExcelConstants.PARAMS, new ExportParams("题目信息数据", "导出人:"+sysUser.getRealname(), "题目信息"));
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, pageList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("wjxWjxxTmlb:wjx_wjxx_tmlb:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
|
||||
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
|
||||
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
|
||||
// 获取上传文件对象
|
||||
MultipartFile file = entity.getValue();
|
||||
ImportParams params = new ImportParams();
|
||||
params.setTitleRows(2);
|
||||
params.setHeadRows(1);
|
||||
params.setNeedSave(true);
|
||||
try {
|
||||
List<WjxWjxxTmlbPage> list = ExcelImportUtil.importExcel(file.getInputStream(), WjxWjxxTmlbPage.class, params);
|
||||
for (WjxWjxxTmlbPage page : list) {
|
||||
WjxWjxxTmlb po = new WjxWjxxTmlb();
|
||||
BeanUtils.copyProperties(page, po);
|
||||
wjxWjxxTmlbService.saveMain(po, page.getWjxWjxxTmxxList());
|
||||
}
|
||||
return Result.OK("文件导入成功!数据行数:" + list.size());
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
return Result.error("文件导入失败:"+e.getMessage());
|
||||
} finally {
|
||||
try {
|
||||
file.getInputStream().close();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return Result.OK("文件导入失败!");
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="选项信息主表ID查询", notes="选项信息-通主表ID查询")
|
||||
@GetMapping(value = "/queryByMainId")
|
||||
public Result<List<WjxWjxxTmlb>> queryByMainId(@RequestParam(name="id",required=true) String id) {
|
||||
List<WjxWjxxTmlb> WjxWjxxTmlbList = wjxWjxxTmlbService.queryByMainId(id);
|
||||
return Result.OK(WjxWjxxTmlbList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* @Description: 题目信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="wjx_wjxx_tmlb对象", description="题目信息")
|
||||
@Data
|
||||
@TableName("wjx_wjxx_tmlb")
|
||||
public class WjxWjxxTmlb implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**修改人*/
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private java.lang.String updateBy;
|
||||
/**修改时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private java.util.Date updateTime;
|
||||
/**问卷id*/
|
||||
@Excel(name = "问卷id", width = 15)
|
||||
@ApiModelProperty(value = "问卷id")
|
||||
private java.lang.String mainId;
|
||||
/**题目编号*/
|
||||
@Excel(name = "题目编号", width = 15)
|
||||
@ApiModelProperty(value = "题目编号")
|
||||
private java.lang.Integer wjIndex;
|
||||
/**题目类型*/
|
||||
@Excel(name = "题目类型", width = 15)
|
||||
@ApiModelProperty(value = "题目类型")
|
||||
private java.lang.Integer wjType;
|
||||
/**题目细分类*/
|
||||
@Excel(name = "题目细分类", width = 15)
|
||||
@ApiModelProperty(value = "题目细分类")
|
||||
private java.lang.Integer wjSubtype;
|
||||
/**问题标题*/
|
||||
@Excel(name = "问题标题", width = 15)
|
||||
@ApiModelProperty(value = "问题标题")
|
||||
private java.lang.String wjTitle;
|
||||
/**是否必填*/
|
||||
@Excel(name = "是否必填", width = 15)
|
||||
@ApiModelProperty(value = "是否必填")
|
||||
private java.lang.String isRequir;
|
||||
/**是否是考试*/
|
||||
@Excel(name = "是否是考试", width = 15)
|
||||
@ApiModelProperty(value = "是否是考试")
|
||||
private java.lang.String wjCeshi;
|
||||
/**问题分值*/
|
||||
@Excel(name = "问题分值", width = 15)
|
||||
@ApiModelProperty(value = "问题分值")
|
||||
private java.lang.Double wjScore;
|
||||
/**题目解析*/
|
||||
@Excel(name = "题目解析", width = 15)
|
||||
@ApiModelProperty(value = "题目解析")
|
||||
private java.lang.String wjParsing;
|
||||
/**填写提示*/
|
||||
@Excel(name = "填写提示", width = 15)
|
||||
@ApiModelProperty(value = "填写提示")
|
||||
private java.lang.String prompt;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String itemSelected;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<WjxWjxxTmxx> wjxWjxxTmxxList;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
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 java.util.Date;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* @Description: 选项信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@ApiModel(value="wjx_wjxx_tmxx对象", description="选项信息")
|
||||
@Data
|
||||
@TableName("wjx_wjxx_tmxx")
|
||||
public class WjxWjxxTmxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**修改人*/
|
||||
@ApiModelProperty(value = "修改人")
|
||||
private java.lang.String updateBy;
|
||||
/**修改时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private java.util.Date updateTime;
|
||||
/**问题编号*/
|
||||
@ApiModelProperty(value = "问题编号")
|
||||
private java.lang.Integer wjIndex;
|
||||
/**选项编号*/
|
||||
@Excel(name = "选项编号", width = 15)
|
||||
@ApiModelProperty(value = "选项编号")
|
||||
private java.lang.Integer itemIndex;
|
||||
/**选项标题*/
|
||||
@Excel(name = "选项标题", width = 15)
|
||||
@ApiModelProperty(value = "选项标题")
|
||||
private java.lang.String itemTitle;
|
||||
/**选项文字描述*/
|
||||
@Excel(name = "选项文字描述", width = 15)
|
||||
@ApiModelProperty(value = "选项文字描述")
|
||||
private java.lang.String itemImageText;
|
||||
/**正确答案*/
|
||||
@Excel(name = "正确答案", width = 15)
|
||||
@ApiModelProperty(value = "正确答案")
|
||||
private java.lang.String itemSelected;
|
||||
/**选项分值*/
|
||||
@Excel(name = "选项分值", width = 15)
|
||||
@ApiModelProperty(value = "选项分值")
|
||||
private java.lang.Double itemScore;
|
||||
|
||||
private String mainId;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 题目信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface WjxWjxxTmlbMapper extends BaseMapper<WjxWjxxTmlb> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @Description: 选项信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface WjxWjxxTmxxMapper extends BaseMapper<WjxWjxxTmxx> {
|
||||
|
||||
/**
|
||||
* 通过主表id删除子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean deleteByMainId(@Param("mainId") String mainId);
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<WjxWjxxTmxx>
|
||||
*/
|
||||
public List<WjxWjxxTmxx> selectByMainId(@Param("mainId") String mainId);
|
||||
}
|
||||
|
|
@ -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.wjxWjxxTmlb.mapper.WjxWjxxTmlbMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<?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.wjxWjxxTmlb.mapper.WjxWjxxTmxxMapper">
|
||||
|
||||
<delete id="deleteByMainId" parameterType="java.lang.String">
|
||||
DELETE
|
||||
FROM wjx_wjxx_tmxx
|
||||
WHERE
|
||||
main_id = #{mainId} </delete>
|
||||
|
||||
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx">
|
||||
SELECT *
|
||||
FROM wjx_wjxx_tmxx
|
||||
WHERE
|
||||
main_id = #{mainId} </select>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.service;
|
||||
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 题目信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IWjxWjxxTmlbService extends IService<WjxWjxxTmlb> {
|
||||
|
||||
/**
|
||||
* 添加一对多
|
||||
*
|
||||
* @param wjxWjxxTmlb
|
||||
* @param wjxWjxxTmxxList
|
||||
*/
|
||||
public void saveMain(WjxWjxxTmlb wjxWjxxTmlb,List<WjxWjxxTmxx> wjxWjxxTmxxList) ;
|
||||
|
||||
/**
|
||||
* 修改一对多
|
||||
*
|
||||
* @param wjxWjxxTmlb
|
||||
* @param wjxWjxxTmxxList
|
||||
*/
|
||||
public void updateMain(WjxWjxxTmlb wjxWjxxTmlb,List<WjxWjxxTmxx> wjxWjxxTmxxList);
|
||||
|
||||
/**
|
||||
* 删除一对多
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void delMain (String id);
|
||||
|
||||
/**
|
||||
* 批量删除一对多
|
||||
*
|
||||
* @param idList
|
||||
*/
|
||||
public void delBatchMain (Collection<? extends Serializable> idList);
|
||||
|
||||
void removeByMainId(String id);
|
||||
|
||||
List<WjxWjxxTmlb> queryByMainId(String id);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package org.jeecg.modules.kc.wjxWjxxTmlb.service;
|
||||
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmlb;
|
||||
import org.jeecg.modules.kc.wjxWjxxTmlb.entity.WjxWjxxTmxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 选项信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-04-26
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IWjxWjxxTmxxService extends IService<WjxWjxxTmxx> {
|
||||
|
||||
/**
|
||||
* 通过主表id查询子表数据
|
||||
*
|
||||
* @param mainId 主表id
|
||||
* @return List<WjxWjxxTmxx>
|
||||
*/
|
||||
public List<WjxWjxxTmxx> selectByMainId(String mainId);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue