资环数据采集
This commit is contained in:
parent
c4d0792c3d
commit
3001603bf7
|
@ -84,6 +84,7 @@ public class ShiroConfig {
|
|||
}
|
||||
|
||||
// 配置不会被拦截的链接 顺序判断
|
||||
filterChainDefinitionMap.put("/dataMonitorApi/**", "anon"); //订单推送通知
|
||||
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
|
||||
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
|
||||
|
|
|
@ -1,111 +0,0 @@
|
|||
package org.jeecg.modules.demo.api.controller;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.*;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.demo.blClsfzs.entity.BlClsfzs;
|
||||
import org.jeecg.modules.demo.blClsfzs.service.IBlClsfzsService;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Author: jeecg-boot
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/webApi")
|
||||
@Slf4j
|
||||
public class ZhApiController extends JeecgController<BlClsfzs, IBlClsfzsService> {
|
||||
|
||||
public static void main(String[] args) {
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("_limit", "10");
|
||||
params.put("_page", "2");
|
||||
params.put("key", "XIAev9qlj-UOAEJ4");
|
||||
params.put("noncestr", "123456");
|
||||
String secret = "SE0l1BuC8SSCxO11pvTIvjCF_X6HP_ih";
|
||||
String sign = SignUtil.generateSign(params, secret);
|
||||
System.out.println(sign);
|
||||
params.put("sign", sign);
|
||||
String url = "http://hb.muin.cc/open/unusual/device/dtuStat";
|
||||
postUrl(url,params);
|
||||
}
|
||||
|
||||
|
||||
public static String postUrl(String url,Map<String,Object> map){
|
||||
|
||||
Gson gson = new Gson();
|
||||
String map2 = gson.toJson(map);
|
||||
System.out.println(map2);
|
||||
try {
|
||||
URL obj = new URL(url);
|
||||
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
|
||||
|
||||
// 设置请求方法为 POST
|
||||
con.setRequestMethod("POST");
|
||||
|
||||
// 设置请求头
|
||||
con.setRequestProperty("Content-Type", "application/json"); // 声明发送 JSON
|
||||
con.setRequestProperty("Accept", "application/json"); // 声明期望接收 JSON
|
||||
con.setDoOutput(true); // 允许写入请求体
|
||||
|
||||
// 写入 JSON 请求体
|
||||
try (OutputStream os = con.getOutputStream()) {
|
||||
byte[] input = map2.getBytes("utf-8");
|
||||
os.write(input, 0, input.length);
|
||||
}
|
||||
|
||||
// 获取响应码
|
||||
int responseCode = con.getResponseCode();
|
||||
System.out.println("Response Code: " + responseCode);
|
||||
|
||||
// 读取响应(成功时)
|
||||
if (responseCode == HttpURLConnection.HTTP_OK) { // 200
|
||||
try (BufferedReader br = new BufferedReader(
|
||||
new InputStreamReader(con.getInputStream(), "UTF-8"))) {
|
||||
StringBuilder response = new StringBuilder();
|
||||
String responseLine;
|
||||
while ((responseLine = br.readLine()) != null) {
|
||||
response.append(responseLine.trim());
|
||||
}
|
||||
System.out.println("Response: " + response.toString());
|
||||
}
|
||||
} else { // 错误时读取错误流
|
||||
try (BufferedReader br = new BufferedReader(
|
||||
new InputStreamReader(con.getErrorStream(), "UTF-8"))) {
|
||||
StringBuilder errorResponse = new StringBuilder();
|
||||
String errorLine;
|
||||
while ((errorLine = br.readLine()) != null) {
|
||||
errorResponse.append(errorLine.trim());
|
||||
}
|
||||
System.out.println("Error Response: " + errorResponse.toString());
|
||||
}
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String mapToUrlParams(Map<String, Object> map) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (Map.Entry<String, Object> entry : map.entrySet()) {
|
||||
if (sb.length() > 0) {
|
||||
sb.append("&");
|
||||
}
|
||||
sb.append(entry.getKey()).append("=").append(entry.getValue());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
package org.jeecg.modules.demo.blClsfzs.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 org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.query.QueryRuleEnum;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.blClsfzs.entity.BlClsfzs;
|
||||
import org.jeecg.modules.demo.blClsfzs.service.IBlClsfzsService;
|
||||
|
||||
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: bl_clsfzs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-02-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="bl_clsfzs")
|
||||
@RestController
|
||||
@RequestMapping("/blClsfzs/blClsfzs")
|
||||
@Slf4j
|
||||
public class BlClsfzsController extends JeecgController<BlClsfzs, IBlClsfzsService> {
|
||||
@Autowired
|
||||
private IBlClsfzsService blClsfzsService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param blClsfzs
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_clsfzs-分页列表查询")
|
||||
@ApiOperation(value="bl_clsfzs-分页列表查询", notes="bl_clsfzs-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<BlClsfzs>> queryPageList(BlClsfzs blClsfzs,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BlClsfzs> queryWrapper = QueryGenerator.initQueryWrapper(blClsfzs, req.getParameterMap());
|
||||
Page<BlClsfzs> page = new Page<BlClsfzs>(pageNo, pageSize);
|
||||
IPage<BlClsfzs> pageList = blClsfzsService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param blClsfzs
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_clsfzs-添加")
|
||||
@ApiOperation(value="bl_clsfzs-添加", notes="bl_clsfzs-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody BlClsfzs blClsfzs) {
|
||||
blClsfzsService.save(blClsfzs);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param blClsfzs
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_clsfzs-编辑")
|
||||
@ApiOperation(value="bl_clsfzs-编辑", notes="bl_clsfzs-编辑")
|
||||
@RequiresPermissions("blClsfzs:bl_clsfzs:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody BlClsfzs blClsfzs) {
|
||||
blClsfzsService.updateById(blClsfzs);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_clsfzs-通过id删除")
|
||||
@ApiOperation(value="bl_clsfzs-通过id删除", notes="bl_clsfzs-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
blClsfzsService.removeById(id);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "bl_clsfzs-批量删除")
|
||||
@ApiOperation(value="bl_clsfzs-批量删除", notes="bl_clsfzs-批量删除")
|
||||
@RequiresPermissions("blClsfzs:bl_clsfzs:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.blClsfzsService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_clsfzs-通过id查询")
|
||||
@ApiOperation(value="bl_clsfzs-通过id查询", notes="bl_clsfzs-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<BlClsfzs> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BlClsfzs blClsfzs = blClsfzsService.getById(id);
|
||||
if(blClsfzs==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(blClsfzs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param blClsfzs
|
||||
*/
|
||||
@RequiresPermissions("blClsfzs:bl_clsfzs:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BlClsfzs blClsfzs) {
|
||||
return super.exportXls(request, blClsfzs, BlClsfzs.class, "bl_clsfzs");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("blClsfzs:bl_clsfzs:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BlClsfzs.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
package org.jeecg.modules.demo.blClsfzs.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 org.jeecg.common.constant.ProvinceCityArea;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
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_clsfzs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-02-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_clsfzs")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="bl_clsfzs对象", description="bl_clsfzs")
|
||||
public class BlClsfzs implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Integer id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**kcrwdm*/
|
||||
@Excel(name = "kcrwdm", width = 15)
|
||||
@ApiModelProperty(value = "kcrwdm")
|
||||
private java.lang.String kcrwdm;
|
||||
/**clType*/
|
||||
@Excel(name = "clType", width = 15)
|
||||
@ApiModelProperty(value = "clType")
|
||||
private java.lang.String clType;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.blClsfzs.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.blClsfzs.entity.BlClsfzs;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: bl_clsfzs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-02-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BlClsfzsMapper extends BaseMapper<BlClsfzs> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.blClsfzs.mapper.BlClsfzsMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
package org.jeecg.modules.demo.blClsfzs.service;
|
||||
|
||||
import org.jeecg.modules.demo.blClsfzs.entity.BlClsfzs;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: bl_clsfzs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-02-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBlClsfzsService extends IService<BlClsfzs> {
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package org.jeecg.modules.demo.blClsfzs.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.demo.blClsfzs.entity.BlClsfzs;
|
||||
import org.jeecg.modules.demo.blClsfzs.mapper.BlClsfzsMapper;
|
||||
import org.jeecg.modules.demo.blClsfzs.service.IBlClsfzsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: bl_clsfzs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-02-19
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class BlClsfzsServiceImpl extends ServiceImpl<BlClsfzsMapper, BlClsfzs> implements IBlClsfzsService {
|
||||
|
||||
}
|
|
@ -1,217 +0,0 @@
|
|||
package org.jeecg.modules.demo.blJbzdjs.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
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.apache.commons.lang.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.oConvertUtils;
|
||||
import org.jeecg.modules.demo.blJbzdjs.entity.BlJbzdjs;
|
||||
import org.jeecg.modules.demo.blJbzdjs.service.IBlJbzdjsService;
|
||||
|
||||
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.demo.zjSqxx.entity.ZjSqxx;
|
||||
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
|
||||
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: bl_jbzdjs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/blJbzdjs/blJbzdjs")
|
||||
@Slf4j
|
||||
public class BlJbzdjsController extends JeecgController<BlJbzdjs, IBlJbzdjsService> {
|
||||
@Autowired
|
||||
private IBlJbzdjsService blJbzdjsService;
|
||||
@Autowired
|
||||
private IZjSqxxService zjSqxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param blJbzdjs
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<BlJbzdjs>> queryPageList(BlJbzdjs blJbzdjs,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
blJbzdjs.setDwmc(loginUser.getDepartIds());
|
||||
|
||||
QueryWrapper<BlJbzdjs> queryWrapper = QueryGenerator.initQueryWrapper(blJbzdjs, req.getParameterMap());
|
||||
Page<BlJbzdjs> page = new Page<BlJbzdjs>(pageNo, pageSize);
|
||||
IPage<BlJbzdjs> pageList = blJbzdjsService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 专家分页列表查询
|
||||
*
|
||||
* @param blJbzdjs
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/zjList")
|
||||
public Result<IPage<BlJbzdjs>> zjList(BlJbzdjs blJbzdjs,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","4");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
if(zjSqxx!=null){
|
||||
blJbzdjs.setDwmc(zjSqxx.getKkdw());
|
||||
}
|
||||
QueryWrapper<BlJbzdjs> queryWrapper = QueryGenerator.initQueryWrapper(blJbzdjs, req.getParameterMap());
|
||||
Page<BlJbzdjs> page = new Page<BlJbzdjs>(pageNo, pageSize);
|
||||
IPage<BlJbzdjs> pageList = blJbzdjsService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param blJbzdjs
|
||||
* @return
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody BlJbzdjs blJbzdjs) {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
blJbzdjs.setDwmc(loginUser.getDepartIds());
|
||||
blJbzdjsService.save(blJbzdjs);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param blJbzdjs
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody BlJbzdjs blJbzdjs) {
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
blJbzdjs.setDwmc(loginUser.getDepartIds());
|
||||
blJbzdjsService.updateById(blJbzdjs);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
blJbzdjsService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.blJbzdjsService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "bl_jbzdjs-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<BlJbzdjs> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BlJbzdjs blJbzdjs = blJbzdjsService.getById(id);
|
||||
if(blJbzdjs==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(blJbzdjs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param blJbzdjs
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BlJbzdjs blJbzdjs) {
|
||||
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
if(StringUtils.indexOf(loginUser.getRoleCode(),"admin")>-1){
|
||||
|
||||
}else{
|
||||
blJbzdjs.setDwmc(loginUser.getDepartIds());
|
||||
}
|
||||
|
||||
return super.exportXls(request, blJbzdjs, BlJbzdjs.class, "bl_jbzdjs");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("blJbzdjs:bl_jbzdjs:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BlJbzdjs.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,99 +0,0 @@
|
|||
package org.jeecg.modules.demo.blJbzdjs.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: bl_jbzdjs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_jbzdjs")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="bl_jbzdjs对象", description="bl_jbzdjs")
|
||||
public class BlJbzdjs 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 HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@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 HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**学院*/
|
||||
@Excel(name = "学院", width = 15)
|
||||
@ApiModelProperty(value = "学院")
|
||||
private java.lang.String dwmc;
|
||||
/**制度名称*/
|
||||
@Excel(name = "制度名称", width = 15)
|
||||
@ApiModelProperty(value = "制度名称")
|
||||
private java.lang.String zdmc;
|
||||
/**修订时间*/
|
||||
@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;
|
||||
/**对应的学校上位文件*/
|
||||
@Excel(name = "对应的学校上位文件", width = 15, dicCode = "yn")
|
||||
@Dict(dicCode = "zd_swwj")
|
||||
@ApiModelProperty(value = "对应的学校上位文件")
|
||||
private java.lang.String sfyz;
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15, dicCode = "zd_status")
|
||||
@Dict(dicCode = "zd_status")
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String status;
|
||||
/**年度*/
|
||||
@Excel(name = "年度", width = 15)
|
||||
@ApiModelProperty(value = "年度")
|
||||
private java.lang.String years;
|
||||
/**修订情况*/
|
||||
@Dict(dicCode = "zd_xdqk")
|
||||
@ApiModelProperty(value = "修订情况")
|
||||
private java.lang.String yearsType;
|
||||
/**附件*/
|
||||
@ApiModelProperty(value = "附件")
|
||||
private java.lang.String filePath;
|
||||
/**文件服务器*/
|
||||
@ApiModelProperty(value = "文件服务器")
|
||||
private java.lang.String ftpPath;
|
||||
/**修订情况说明*/
|
||||
@ApiModelProperty(value = "修订情况说明")
|
||||
private java.lang.String xdqksmPath;
|
||||
/**文件服务器修订情况说明位置*/
|
||||
@ApiModelProperty(value = "文件服务器修订情况说明位置")
|
||||
private java.lang.String ftpXdqksmPath;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.blJbzdjs.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.blJbzdjs.entity.BlJbzdjs;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: bl_jbzdjs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BlJbzdjsMapper extends BaseMapper<BlJbzdjs> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.blJbzdjs.mapper.BlJbzdjsMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
package org.jeecg.modules.demo.blJbzdjs.service;
|
||||
|
||||
import org.jeecg.modules.demo.blJbzdjs.entity.BlJbzdjs;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: bl_jbzdjs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBlJbzdjsService extends IService<BlJbzdjs> {
|
||||
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package org.jeecg.modules.demo.blJbzdjs.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.blJbzdjs.entity.BlJbzdjs;
|
||||
import org.jeecg.modules.demo.blJbzdjs.mapper.BlJbzdjsMapper;
|
||||
import org.jeecg.modules.demo.blJbzdjs.service.IBlJbzdjsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: bl_jbzdjs
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class BlJbzdjsServiceImpl extends ServiceImpl<BlJbzdjsMapper, BlJbzdjs> implements IBlJbzdjsService {
|
||||
|
||||
}
|
|
@ -1,176 +0,0 @@
|
|||
package org.jeecg.modules.demo.blKckhclbl.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.demo.blKckhclbl.entity.BlKckhclbl;
|
||||
import org.jeecg.modules.demo.blKckhclbl.service.IBlKckhclblService;
|
||||
|
||||
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-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课程考核材料补录信息")
|
||||
@RestController
|
||||
@RequestMapping("/blKckhclbl/blKckhclbl")
|
||||
@Slf4j
|
||||
public class BlKckhclblController extends JeecgController<BlKckhclbl, IBlKckhclblService> {
|
||||
@Autowired
|
||||
private IBlKckhclblService blKckhclblService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param blKckhclbl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课程考核材料补录信息-分页列表查询")
|
||||
@ApiOperation(value="课程考核材料补录信息-分页列表查询", notes="课程考核材料补录信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<BlKckhclbl>> queryPageList(BlKckhclbl blKckhclbl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<BlKckhclbl> queryWrapper = QueryGenerator.initQueryWrapper(blKckhclbl, req.getParameterMap());
|
||||
Page<BlKckhclbl> page = new Page<BlKckhclbl>(pageNo, pageSize);
|
||||
IPage<BlKckhclbl> pageList = blKckhclblService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param blKckhclbl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程考核材料补录信息-添加")
|
||||
@ApiOperation(value="课程考核材料补录信息-添加", notes="课程考核材料补录信息-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody BlKckhclbl blKckhclbl) {
|
||||
blKckhclblService.save(blKckhclbl);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param blKckhclbl
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程考核材料补录信息-编辑")
|
||||
@ApiOperation(value="课程考核材料补录信息-编辑", notes="课程考核材料补录信息-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody BlKckhclbl blKckhclbl) {
|
||||
blKckhclblService.updateById(blKckhclbl);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程考核材料补录信息-通过id删除")
|
||||
@ApiOperation(value="课程考核材料补录信息-通过id删除", notes="课程考核材料补录信息-通过id删除")
|
||||
@RequiresPermissions("blKckhclbl:bl_kckhclbl:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
blKckhclblService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程考核材料补录信息-批量删除")
|
||||
@ApiOperation(value="课程考核材料补录信息-批量删除", notes="课程考核材料补录信息-批量删除")
|
||||
@RequiresPermissions("blKckhclbl:bl_kckhclbl:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.blKckhclblService.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<BlKckhclbl> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
BlKckhclbl blKckhclbl = blKckhclblService.getById(id);
|
||||
if(blKckhclbl==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(blKckhclbl);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param blKckhclbl
|
||||
*/
|
||||
@RequiresPermissions("blKckhclbl:bl_kckhclbl:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, BlKckhclbl blKckhclbl) {
|
||||
return super.exportXls(request, blKckhclbl, BlKckhclbl.class, "课程考核材料补录信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("blKckhclbl:bl_kckhclbl:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, BlKckhclbl.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
package org.jeecg.modules.demo.blKckhclbl.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-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("bl_kckhclbl")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="bl_kckhclbl对象", description="课程考核材料补录信息")
|
||||
public class BlKckhclbl 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 HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@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 HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**课程任务代码*/
|
||||
@Excel(name = "课程任务代码", width = 15)
|
||||
@ApiModelProperty(value = "课程任务代码")
|
||||
private java.lang.String kcrwdm;
|
||||
/**补录类型*/
|
||||
@Excel(name = "补录类型", width = 15, dicCode = "kckhcl_bltype")
|
||||
@Dict(dicCode = "kckhcl_bltype")
|
||||
@ApiModelProperty(value = "补录类型")
|
||||
private java.lang.String blType;
|
||||
/**补录附件*/
|
||||
@Excel(name = "补录附件", width = 15)
|
||||
@ApiModelProperty(value = "补录附件")
|
||||
private java.lang.String blFilePath;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.blKckhclbl.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.blKckhclbl.entity.BlKckhclbl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课程考核材料补录信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface BlKckhclblMapper extends BaseMapper<BlKckhclbl> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.blKckhclbl.mapper.BlKckhclblMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
package org.jeecg.modules.demo.blKckhclbl.service;
|
||||
|
||||
import org.jeecg.modules.demo.blKckhclbl.entity.BlKckhclbl;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课程考核材料补录信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IBlKckhclblService extends IService<BlKckhclbl> {
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package org.jeecg.modules.demo.blKckhclbl.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.demo.blKckhclbl.entity.BlKckhclbl;
|
||||
import org.jeecg.modules.demo.blKckhclbl.mapper.BlKckhclblMapper;
|
||||
import org.jeecg.modules.demo.blKckhclbl.service.IBlKckhclblService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 课程考核材料补录信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-12-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class BlKckhclblServiceImpl extends ServiceImpl<BlKckhclblMapper, BlKckhclbl> implements IBlKckhclblService {
|
||||
|
||||
}
|
|
@ -1,68 +0,0 @@
|
|||
//package org.jeecg.modules.demo.cloud.controller;
|
||||
//
|
||||
//import com.alibaba.csp.sentinel.annotation.SentinelResource;
|
||||
//import io.swagger.annotations.Api;
|
||||
//import io.swagger.annotations.ApiOperation;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.jeecg.common.api.vo.Result;
|
||||
//import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
//import org.jeecg.common.system.vo.DictModel;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.web.bind.annotation.GetMapping;
|
||||
//import org.springframework.web.bind.annotation.RequestMapping;
|
||||
//import org.springframework.web.bind.annotation.RestController;
|
||||
//import javax.annotation.Resource;
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// *
|
||||
// */
|
||||
//@Slf4j
|
||||
//@Api(tags = "【微服务】单元测试")
|
||||
//@RestController
|
||||
//@RequestMapping("/test")
|
||||
//public class JcloudDemoFeignController {
|
||||
// @Resource
|
||||
// private ISysBaseAPI sysBaseApi;
|
||||
//// @Autowired
|
||||
//// private ErpHelloApi erpHelloApi;
|
||||
//
|
||||
// /**
|
||||
// * 测试
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// @GetMapping("/callSystem")
|
||||
// //@SentinelResource(value = "remoteDict",fallback = "getDefaultHandler")
|
||||
// @ApiOperation(value = "通过feign调用system服务", notes = "测试jeecg-demo服务,是否通过fegin调用system服务接口")
|
||||
// public Result getRemoteDict() {
|
||||
// List<DictModel> list = sysBaseApi.queryAllDict();
|
||||
// return Result.OK(list);
|
||||
// }
|
||||
//
|
||||
//
|
||||
//// /**
|
||||
//// * 测试调用 erp 微服务接口
|
||||
//// * 【如何测试:通过archetype生成微服务模块,快速集成测试】
|
||||
//// * https://help.jeecg.com/java/springcloud/archetype.html
|
||||
//// * @return
|
||||
//// */
|
||||
//// @GetMapping("/callErp")
|
||||
//// @ApiOperation(value = "测试feign erp", notes = "测试feign erp")
|
||||
//// public Result callErp() {
|
||||
//// log.info("call erp 服务");
|
||||
//// String res = erpHelloApi.callHello();
|
||||
//// return Result.OK(res);
|
||||
//// }
|
||||
//
|
||||
// /**
|
||||
// * 熔断,默认回调函数
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// public Result<Object> getDefaultHandler() {
|
||||
// log.info("测试JcloudDemoController-remoteDict 熔断降级");
|
||||
// return Result.error("测试JcloudDemoController-remoteDict 熔断降级");
|
||||
// }
|
||||
//
|
||||
//}
|
|
@ -1,33 +0,0 @@
|
|||
package org.jeecg.modules.demo.cloud.controller;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.demo.cloud.service.JcloudDemoService;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 服务端提供方——feign接口
|
||||
* 【提供给system-start调用测试,看feign是否畅通】
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/test")
|
||||
public class JcloudDemoProviderController {
|
||||
|
||||
@Resource
|
||||
private JcloudDemoService jcloudDemoService;
|
||||
|
||||
@GetMapping("/getMessage")
|
||||
public String getMessage(@RequestParam(name = "name") String name) {
|
||||
String msg = jcloudDemoService.getMessage(name);
|
||||
log.info(" 微服务被调用:{} ",msg);
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.cloud.service;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
|
||||
/**
|
||||
* @Description: JcloudDemoService接口
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
public interface JcloudDemoService {
|
||||
|
||||
/**
|
||||
* 获取信息(测试)
|
||||
* @param name 姓名
|
||||
* @return "Hello," + name
|
||||
*/
|
||||
String getMessage(String name);
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package org.jeecg.modules.demo.cloud.service.impl;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.demo.cloud.service.JcloudDemoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* @Description: JcloudDemoServiceImpl实现类
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Service
|
||||
public class JcloudDemoServiceImpl implements JcloudDemoService {
|
||||
@Override
|
||||
public String getMessage(String name) {
|
||||
String resMsg = "Hello,我是jeecg-demo服务节点,收到你的消息:【 "+ name +" 】";
|
||||
return resMsg;
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
//
|
||||
//package org.jeecg.modules.demo.cloud.xxljob;
|
||||
//
|
||||
//import com.xxl.job.core.biz.model.ReturnT;
|
||||
//import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//import org.jeecg.common.config.mqtoken.UserTokenContext;
|
||||
//import org.jeecg.common.constant.CommonConstant;
|
||||
//import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
//import org.jeecg.common.system.util.JwtUtil;
|
||||
//import org.jeecg.common.util.RedisUtil;
|
||||
//import org.jeecg.common.util.SpringContextUtils;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//
|
||||
///**
|
||||
// * xxl-job定时任务测试
|
||||
// */
|
||||
//@Slf4j
|
||||
//@Component
|
||||
//public class TestJobHandler {
|
||||
// @Autowired
|
||||
// ISysBaseAPI sysBaseApi;
|
||||
//
|
||||
// /**
|
||||
// * 简单任务
|
||||
// *
|
||||
// * 测试:无token调用feign接口
|
||||
// *
|
||||
// * @param params
|
||||
// * @return
|
||||
// */
|
||||
//
|
||||
// @XxlJob(value = "testJob")
|
||||
// public ReturnT<String> demoJobHandler(String params) {
|
||||
// //1.生成临时令牌Token到线程中
|
||||
// UserTokenContext.setToken(getTemporaryToken());
|
||||
//
|
||||
// log.info("我是 jeecg-demo 服务里的定时任务 testJob , 我执行了...............................");
|
||||
// log.info("我调用 jeecg-system 服务的字典接口:{}",sysBaseApi.queryAllDict());
|
||||
// //。。。此处可以写多个feign接口调用
|
||||
//
|
||||
// //2.使用完,删除临时令牌Token
|
||||
// UserTokenContext.remove();
|
||||
// return ReturnT.SUCCESS;
|
||||
// }
|
||||
//
|
||||
// public void init() {
|
||||
// log.info("init");
|
||||
// }
|
||||
//
|
||||
// public void destroy() {
|
||||
// log.info("destory");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 获取临时令牌
|
||||
// *
|
||||
// * 模拟登陆接口,获取模拟 Token
|
||||
// * @return
|
||||
// */
|
||||
// public static String getTemporaryToken() {
|
||||
// RedisUtil redisUtil = SpringContextUtils.getBean(RedisUtil.class);
|
||||
// // 模拟登录生成Token
|
||||
// String token = JwtUtil.sign("??", "??");
|
||||
// // 设置Token缓存有效时间为 5 分钟
|
||||
// redisUtil.set(CommonConstant.PREFIX_USER_TOKEN + token, token);
|
||||
// redisUtil.expire(CommonConstant.PREFIX_USER_TOKEN + token, 5 * 60 * 1000);
|
||||
// return token;
|
||||
// }
|
||||
//
|
||||
//}
|
||||
//
|
|
@ -1,176 +0,0 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.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.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import org.jeecg.modules.demo.downKccldbxz.service.IDownKccldbxzService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课程材料打包下载")
|
||||
@RestController
|
||||
@RequestMapping("/downKccldbxz/downKccldbxz")
|
||||
@Slf4j
|
||||
public class DownKccldbxzController extends JeecgController<DownKccldbxz, IDownKccldbxzService> {
|
||||
@Autowired
|
||||
private IDownKccldbxzService downKccldbxzService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param downKccldbxz
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课程材料打包下载-分页列表查询")
|
||||
@ApiOperation(value="课程材料打包下载-分页列表查询", notes="课程材料打包下载-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DownKccldbxz>> queryPageList(DownKccldbxz downKccldbxz,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DownKccldbxz> queryWrapper = QueryGenerator.initQueryWrapper(downKccldbxz, req.getParameterMap());
|
||||
Page<DownKccldbxz> page = new Page<DownKccldbxz>(pageNo, pageSize);
|
||||
IPage<DownKccldbxz> pageList = downKccldbxzService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param downKccldbxz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程材料打包下载-添加")
|
||||
@ApiOperation(value="课程材料打包下载-添加", notes="课程材料打包下载-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DownKccldbxz downKccldbxz) {
|
||||
downKccldbxzService.saveDownload(downKccldbxz);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param downKccldbxz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程材料打包下载-编辑")
|
||||
@ApiOperation(value="课程材料打包下载-编辑", notes="课程材料打包下载-编辑")
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DownKccldbxz downKccldbxz) {
|
||||
downKccldbxzService.updateById(downKccldbxz);
|
||||
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) {
|
||||
downKccldbxzService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程材料打包下载-批量删除")
|
||||
@ApiOperation(value="课程材料打包下载-批量删除", notes="课程材料打包下载-批量删除")
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.downKccldbxzService.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<DownKccldbxz> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DownKccldbxz downKccldbxz = downKccldbxzService.getById(id);
|
||||
if(downKccldbxz==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(downKccldbxz);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param downKccldbxz
|
||||
*/
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DownKccldbxz downKccldbxz) {
|
||||
return super.exportXls(request, downKccldbxz, DownKccldbxz.class, "课程材料打包下载");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DownKccldbxz.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("down_kccldbxz")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="down_kccldbxz对象", description="课程材料打包下载")
|
||||
public class DownKccldbxz 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 HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@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 HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**条件*/
|
||||
@Excel(name = "条件", width = 15)
|
||||
@ApiModelProperty(value = "条件")
|
||||
private java.lang.String title;
|
||||
/**学年学期*/
|
||||
@Excel(name = "学年学期", width = 15)
|
||||
@ApiModelProperty(value = "学年学期")
|
||||
private java.lang.String xnxq;
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15, dicCode = "down_status")
|
||||
@Dict(dicCode = "down_status")
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String status;
|
||||
/**附件地址*/
|
||||
@Excel(name = "附件地址", width = 15)
|
||||
@ApiModelProperty(value = "附件地址")
|
||||
private java.lang.String filePath;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kkyxmc;//开课院校名称
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kcmc;//课程名称
|
||||
|
||||
@TableField(exist = false)
|
||||
private String rkjs;//任课教师
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DownKccldbxzMapper extends BaseMapper<DownKccldbxz> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.downKccldbxz.mapper.DownKccldbxzMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,15 +0,0 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.service;
|
||||
|
||||
import org.jeecg.modules.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDownKccldbxzService extends IService<DownKccldbxz> {
|
||||
|
||||
void saveDownload(DownKccldbxz downKccldbxz);
|
||||
}
|
|
@ -1,410 +0,0 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.config.JeecgBaseConfig;
|
||||
import org.jeecg.modules.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import org.jeecg.modules.demo.downKccldbxz.mapper.DownKccldbxzMapper;
|
||||
import org.jeecg.modules.demo.downKccldbxz.service.IDownKccldbxzService;
|
||||
import org.jeecg.modules.demo.utils.ZipFiles;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.IXxhbjwxtjxrwService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.IXxhbjwxtxsmdService;
|
||||
import org.jeecg.modules.utils.SFTPUtil;
|
||||
import org.jeecg.modules.utils.SftpConfig;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DownKccldbxzServiceImpl extends ServiceImpl<DownKccldbxzMapper, DownKccldbxz> implements IDownKccldbxzService {
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtjxrwService xxhbjwxtjxrwService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtscwjxxService xxhbjwxtscwjxxService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtxsmdService xxhbjwxtxsmdService;
|
||||
|
||||
@Value(value = "${jeecg.path.upload}")
|
||||
private String downloadpath;
|
||||
|
||||
@Resource
|
||||
private JeecgBaseConfig jeecgBaseConfig;
|
||||
|
||||
@Autowired
|
||||
SftpConfig sftpConfig;
|
||||
@Override
|
||||
public void saveDownload(DownKccldbxz downKccldbxz) {
|
||||
downKccldbxz.setStatus("1");
|
||||
String title = downKccldbxz.getXnxq()+"-";
|
||||
if(StringUtils.isNotBlank(downKccldbxz.getXnxq())){
|
||||
title = downKccldbxz.getXnxq()+"-";
|
||||
}
|
||||
if (StringUtils.isNotBlank(downKccldbxz.getKkyxmc())){
|
||||
title = title + downKccldbxz.getKkyxmc()+"-";
|
||||
}
|
||||
if (StringUtils.isNotBlank(downKccldbxz.getKcmc())){
|
||||
title = title + downKccldbxz.getKcmc()+"-";
|
||||
}
|
||||
if (StringUtils.isNotBlank(downKccldbxz.getRkjs())){
|
||||
title = title + downKccldbxz.getRkjs()+"-";
|
||||
}
|
||||
if (StringUtils.isBlank(title)){
|
||||
title = "整体课程材料打包-";
|
||||
}
|
||||
//6位随机数
|
||||
String random = String.valueOf((int)((Math.random()*9+1)*100000));
|
||||
title = title + random;
|
||||
downKccldbxz.setTitle(title);
|
||||
baseMapper.insert(downKccldbxz);
|
||||
|
||||
|
||||
QueryWrapper<Xxhbjwxtjxrw> xxhbjwxtjxrwQueryWrapper = new QueryWrapper<>();
|
||||
xxhbjwxtjxrwQueryWrapper.eq("file_shztmc","审核通过");
|
||||
xxhbjwxtjxrwQueryWrapper.eq("xnxqmc",downKccldbxz.getXnxq());
|
||||
xxhbjwxtjxrwQueryWrapper.eq(StringUtils.isNotBlank(downKccldbxz.getKkyxmc()),"kkyxmc",downKccldbxz.getKkyxmc());
|
||||
xxhbjwxtjxrwQueryWrapper.like(StringUtils.isNotBlank(downKccldbxz.getKcmc()),"kcmc",downKccldbxz.getKcmc());
|
||||
xxhbjwxtjxrwQueryWrapper.like(StringUtils.isNotBlank(downKccldbxz.getRkjs()),"teaxm",downKccldbxz.getRkjs());
|
||||
List<Xxhbjwxtjxrw> list = xxhbjwxtjxrwService.list(xxhbjwxtjxrwQueryWrapper);
|
||||
|
||||
String finalTitle = title;
|
||||
|
||||
final String[] sfysj = {"0"};//是否有数据 0没数据 1有数据
|
||||
list.forEach(item->{
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> xxhbjwxtscwQueryWrapper = new QueryWrapper<>();
|
||||
xxhbjwxtscwQueryWrapper.eq("kcrwdm",item.getKcrwdm());
|
||||
List<Xxhbjwxtscwjxx> list2 = xxhbjwxtscwjxxService.list(xxhbjwxtscwQueryWrapper);
|
||||
String downPath = getDownloadPath("downloadTemp/"+ finalTitle+"/"+item.getKcmc()+"/"+item.getTeaxm());
|
||||
//下载所有的文件信心
|
||||
list2.forEach(item2->{
|
||||
sfysj[0] = "1";
|
||||
String imgPath = item2.getPath();
|
||||
String imgArrPath[] = imgPath.split("/");
|
||||
String path = downPath+"/"+imgArrPath[imgArrPath.length-2];
|
||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
String localFilePath = map.get("fileName");
|
||||
System.out.println("------------------------>" + localFilePath);
|
||||
});
|
||||
//生产excle
|
||||
String directoryPath = downPath;
|
||||
exportXls(item, getDownloadPath(directoryPath), "学生成绩");
|
||||
});
|
||||
if(sfysj[0].equals("0")){
|
||||
downKccldbxz.setStatus("3");
|
||||
baseMapper.updateById(downKccldbxz);
|
||||
return;
|
||||
}
|
||||
|
||||
// 指定要打包的文件夹路径
|
||||
String sourceFolderPath = getDownloadPath("downloadTemp/"+title);
|
||||
// 指定输出zip文件的路径
|
||||
String outputZipPath = getDownloadPath("downloadTemp/"+title+".zip");
|
||||
|
||||
// 调用方法进行打包
|
||||
zipFolder(sourceFolderPath, outputZipPath);
|
||||
|
||||
downKccldbxz.setFilePath("downloadTemp/"+title+".zip");
|
||||
downKccldbxz.setStatus("2");
|
||||
baseMapper.updateById(downKccldbxz);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private String getDownloadPath(String path){
|
||||
String filePath = "";
|
||||
// if(StringUtils.isNotBlank(path)){
|
||||
// return "";
|
||||
// }
|
||||
int idx = path.indexOf(downloadpath);
|
||||
if(idx==-1){
|
||||
filePath = downloadpath + File.separator + path;
|
||||
}else{
|
||||
filePath = path;
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
|
||||
|
||||
public static void zipFolder(String sourceFolderPath, String outputZipPath) {
|
||||
FileOutputStream fos = null;
|
||||
ZipOutputStream zipOut = null;
|
||||
try {
|
||||
fos = new FileOutputStream(outputZipPath);
|
||||
zipOut = new ZipOutputStream(fos);
|
||||
addSourceFolderToZip(sourceFolderPath, zipOut, ""); // 第三个参数为空字符串,表示根目录下的文件夹将被直接包含在zip文件中
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (zipOut != null) {
|
||||
zipOut.close();
|
||||
}
|
||||
if (fos != null) {
|
||||
fos.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addSourceFolderToZip(String sourceFolderPath, ZipOutputStream zipOut, String pathInZip) throws IOException {
|
||||
File folder = new File(sourceFolderPath);
|
||||
try {
|
||||
if (folder.exists() && folder.isDirectory()) {
|
||||
for (File file : folder.listFiles()) {
|
||||
if (file.isDirectory()) {
|
||||
addSourceFolderToZip(file.getPath(), zipOut, pathInZip + file.getName() + "/"); // 对子文件夹递归调用
|
||||
} else {
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
ZipEntry zipEntry = new ZipEntry(pathInZip + file.getName()); // 添加文件到zip条目中,并保持其路径结构
|
||||
zipOut.putNextEntry(zipEntry);
|
||||
byte[] bytes = new byte[1024]; // 缓冲区大小1024字节
|
||||
int length;
|
||||
while ((length = fis.read(bytes)) >= 0) { // 读取文件内容并写入到zip输出流中
|
||||
zipOut.write(bytes, 0, length);
|
||||
}
|
||||
fis.close(); // 关闭文件输入流
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("目录不存在"+sourceFolderPath);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected String exportXls(Xxhbjwxtjxrw xxhbjwxtjxrw, String directoryPath, String title) {
|
||||
// 创建一个Excel工作簿
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
// 创建一个工作表sheet
|
||||
Sheet sheet = workbook.createSheet(title);
|
||||
// 创建行(Row)和单元格(Cell)
|
||||
Row row = sheet.createRow(0); // 创建第一行
|
||||
for(int i=0;i<4;i++){
|
||||
Cell cell = row.createCell(i); // 在第一行的第一列创建单元格
|
||||
if(i == 0){
|
||||
cell.setCellValue("序号"); // 设置单元格的值
|
||||
//设置单元格宽度为100px
|
||||
sheet.setColumnWidth(i, 10 * 256);
|
||||
}else if(i == 1){
|
||||
cell.setCellValue("学号"); // 设置单元格的值
|
||||
sheet.setColumnWidth(i, 15 * 256);
|
||||
}else if(i == 2){
|
||||
cell.setCellValue("姓名"); // 设置单元格的值
|
||||
sheet.setColumnWidth(i, 15 * 256);
|
||||
}else if(i == 3){
|
||||
cell.setCellValue("成绩"); // 设置单元格的值
|
||||
sheet.setColumnWidth(i, 15 * 256);
|
||||
}
|
||||
//设置单元格背景色为浅灰色
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
//设置单元格边框为黑色
|
||||
cellStyle.setBorderTop(BorderStyle.THIN);
|
||||
cellStyle.setBorderBottom(BorderStyle.THIN);
|
||||
cellStyle.setBorderLeft(BorderStyle.THIN);
|
||||
cellStyle.setBorderRight(BorderStyle.THIN);
|
||||
//设置文字居中
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setFillBackgroundColor(IndexedColors.WHITE.getIndex());
|
||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
|
||||
cell.setCellStyle(cellStyle);
|
||||
}
|
||||
|
||||
QueryWrapper<Xxhbjwxtxsmd> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("kcrwdm",xxhbjwxtjxrw.getKcrwdm());
|
||||
List<Xxhbjwxtxsmd> list = xxhbjwxtxsmdService.list(queryWrapper);
|
||||
String sfjx = "0";//是否继续,有数据返回1,没数据返回0
|
||||
for(int i=0;i<list.size();i++){
|
||||
Row row1 = sheet.createRow(i+1); // 创建第一行
|
||||
Xxhbjwxtxsmd xxhbjwxtxsmd = list.get(i);
|
||||
sfjx = "1";
|
||||
for(int j=0;j<4;j++){
|
||||
Cell cell = row1.createCell(j); // 在第一行的第一列创建单元格
|
||||
if(j==0){
|
||||
cell.setCellValue(i); // 设置单元格的值
|
||||
}else if(j==1){
|
||||
cell.setCellValue(xxhbjwxtxsmd.getXsbh()); // 设置单元格的值
|
||||
}else if(j==2){
|
||||
cell.setCellValue(xxhbjwxtxsmd.getXsxm()); // 设置单元格的值
|
||||
}else if(j==3){
|
||||
cell.setCellValue(xxhbjwxtxsmd.getZcj()); // 设置单元格的值
|
||||
}
|
||||
//设置单元格背景色为浅灰色
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
//设置单元格边框为黑色
|
||||
cellStyle.setBorderBottom(BorderStyle.THIN);
|
||||
cellStyle.setBorderRight(BorderStyle.THIN);
|
||||
//设置文字居中
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setFillBackgroundColor(IndexedColors.WHITE.getIndex());
|
||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
cell.setCellStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals("0",sfjx)){
|
||||
return "0";
|
||||
}
|
||||
|
||||
// 指定保存文件的目录和文件名
|
||||
// String directoryPath = "D:/opt/upFiles/downloadTemp/"; // 替换为你的目标目录路径
|
||||
String fileName = title+".xlsx"; // 文件名
|
||||
// String filePath = directoryPath; // 完整的文件路径
|
||||
String filePath = directoryPath +"/"+ fileName;
|
||||
File file = new File(filePath);
|
||||
//判断目录是否存在,不存在则递归创建文件夹
|
||||
if (!file.getParentFile().exists()) {
|
||||
file.getParentFile().mkdirs();
|
||||
}
|
||||
filePath = directoryPath +"/"+ fileName;
|
||||
// 将Excel写入文件系统
|
||||
try (FileOutputStream outputStream = new FileOutputStream(filePath)) {
|
||||
workbook.write(outputStream); // 写入数据到文件
|
||||
workbook.close(); // 关闭工作簿,释放资源
|
||||
System.out.println("Excel file has been created successfully.");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("Error occurred while creating the Excel file.");
|
||||
}
|
||||
return "1";
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
// 创建一个Excel工作簿
|
||||
Workbook workbook = new XSSFWorkbook();
|
||||
// 创建一个工作表sheet
|
||||
Sheet sheet = workbook.createSheet("学生成绩");
|
||||
|
||||
// 创建行(Row)和单元格(Cell)
|
||||
Row row = sheet.createRow(0); // 创建第一行
|
||||
for(int i=0;i<4;i++){
|
||||
Cell cell = row.createCell(i); // 在第一行的第一列创建单元格
|
||||
if(i == 0){
|
||||
cell.setCellValue("序号"); // 设置单元格的值
|
||||
//设置单元格宽度为100px
|
||||
sheet.setColumnWidth(i, 10 * 256);
|
||||
}else if(i == 1){
|
||||
cell.setCellValue("学号"); // 设置单元格的值
|
||||
sheet.setColumnWidth(i, 15 * 256);
|
||||
}else if(i == 2){
|
||||
cell.setCellValue("姓名"); // 设置单元格的值
|
||||
sheet.setColumnWidth(i, 15 * 256);
|
||||
}else if(i == 3){
|
||||
cell.setCellValue("成绩"); // 设置单元格的值
|
||||
sheet.setColumnWidth(i, 15 * 256);
|
||||
}
|
||||
//设置单元格背景色为浅灰色
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
cellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
//设置单元格边框为黑色
|
||||
cellStyle.setBorderTop(BorderStyle.THIN);
|
||||
cellStyle.setBorderBottom(BorderStyle.THIN);
|
||||
cellStyle.setBorderLeft(BorderStyle.THIN);
|
||||
cellStyle.setBorderRight(BorderStyle.THIN);
|
||||
//设置文字居中
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setFillBackgroundColor(IndexedColors.WHITE.getIndex());
|
||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
|
||||
cell.setCellStyle(cellStyle);
|
||||
}
|
||||
|
||||
for(int i=0;i<10;i++){
|
||||
Row row1 = sheet.createRow(i+1); // 创建第一行
|
||||
for(int j=0;j<4;j++){
|
||||
Cell cell = row1.createCell(j); // 在第一行的第一列创建单元格
|
||||
if(j==0){
|
||||
cell.setCellValue(i); // 设置单元格的值
|
||||
}else{
|
||||
cell.setCellValue("Hello"+i+"----"+j+""); // 设置单元格的值
|
||||
}
|
||||
|
||||
//设置单元格背景色为浅灰色
|
||||
CellStyle cellStyle = workbook.createCellStyle();
|
||||
//设置单元格边框为黑色
|
||||
cellStyle.setBorderBottom(BorderStyle.THIN);
|
||||
cellStyle.setBorderRight(BorderStyle.THIN);
|
||||
//设置文字居中
|
||||
cellStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
cellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
cellStyle.setWrapText(true);
|
||||
cellStyle.setFillBackgroundColor(IndexedColors.WHITE.getIndex());
|
||||
cellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
cell.setCellStyle(cellStyle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 指定保存文件的目录和文件名
|
||||
String directoryPath = "D:/opt/upFiles/downloadTemp/"; // 替换为你的目标目录路径
|
||||
String fileName = "example.xlsx"; // 文件名
|
||||
String filePath = directoryPath + fileName; // 完整的文件路径
|
||||
|
||||
// 将Excel写入文件系统
|
||||
try (FileOutputStream outputStream = new FileOutputStream(filePath)) {
|
||||
workbook.write(outputStream); // 写入数据到文件
|
||||
workbook.close(); // 关闭工作簿,释放资源
|
||||
System.out.println("Excel file has been created successfully.");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("Error occurred while creating the Excel file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
package org.jeecg.modules.demo.gpt.cache;
|
||||
|
||||
import cn.hutool.cache.CacheUtil;
|
||||
import cn.hutool.cache.impl.TimedCache;
|
||||
import cn.hutool.core.date.DateUnit;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
||||
|
||||
/**
|
||||
* 聊天记录本地缓存
|
||||
* @author chenrui
|
||||
* @date 2024/1/26 20:06
|
||||
*/
|
||||
public class LocalCache {
|
||||
/**
|
||||
* 缓存时长
|
||||
*/
|
||||
public static final long TIMEOUT = 5 * DateUnit.MINUTE.getMillis();
|
||||
/**
|
||||
* 清理间隔
|
||||
*/
|
||||
private static final long CLEAN_TIMEOUT = 5 * DateUnit.MINUTE.getMillis();
|
||||
/**
|
||||
* 缓存对象
|
||||
*/
|
||||
public static final TimedCache<String, Object> CACHE = CacheUtil.newTimedCache(TIMEOUT);
|
||||
|
||||
static {
|
||||
//启动定时任务
|
||||
CACHE.schedulePrune(CLEAN_TIMEOUT);
|
||||
}
|
||||
}
|
||||
|
||||
//update-end---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
|
@ -1,74 +0,0 @@
|
|||
package org.jeecg.modules.demo.gpt.controller;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.demo.gpt.service.ChatService;
|
||||
import org.jeecg.modules.demo.gpt.vo.ChatHistoryVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
||||
|
||||
/**
|
||||
* @Description: chatGpt-聊天接口
|
||||
* @Author: chenrui
|
||||
* @Date: 2024/1/9 16:30
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/test/ai/chat")
|
||||
public class ChatController {
|
||||
|
||||
@Autowired
|
||||
ChatService chatService;
|
||||
|
||||
/**
|
||||
* 创建sse连接
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/send")
|
||||
public SseEmitter createConnect(@RequestParam(name = "topicId", required = false) String topicId, @RequestParam(name = "message", required = true) String message) {
|
||||
SseEmitter sse = chatService.createChat();
|
||||
chatService.sendMessage(topicId, message);
|
||||
return sse;
|
||||
}
|
||||
|
||||
//update-begin---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
/**
|
||||
* 保存聊天记录
|
||||
* @param chatHistoryVO
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/2/22 13:54
|
||||
*/
|
||||
@PostMapping(value = "/history/save")
|
||||
@ResponseBody
|
||||
public Result<?> saveHistory(@RequestBody ChatHistoryVO chatHistoryVO) {
|
||||
return chatService.saveHistory(chatHistoryVO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询聊天记录
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/2/22 14:03
|
||||
*/
|
||||
@GetMapping(value = "/history/get")
|
||||
@ResponseBody
|
||||
public Result<ChatHistoryVO> getHistoryByTopic() {
|
||||
return chatService.getHistoryByTopic();
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
|
||||
/**
|
||||
* 关闭连接
|
||||
*/
|
||||
@GetMapping(value = "/close")
|
||||
public void closeConnect() {
|
||||
chatService.closeChat();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
|
@ -1,136 +0,0 @@
|
|||
package org.jeecg.modules.demo.gpt.listeners;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.unfbx.chatgpt.entity.chat.ChatCompletionResponse;
|
||||
import com.unfbx.chatgpt.entity.chat.Message;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.Response;
|
||||
import okhttp3.ResponseBody;
|
||||
import okhttp3.sse.EventSource;
|
||||
import okhttp3.sse.EventSourceListener;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
||||
/**
|
||||
* OpenAI的SSE监听
|
||||
* @author chenrui
|
||||
* @date 2024/1/26 20:06
|
||||
*/
|
||||
@Slf4j
|
||||
public class OpenAISSEEventSourceListener extends EventSourceListener {
|
||||
|
||||
private long tokens;
|
||||
|
||||
private SseEmitter sseEmitter;
|
||||
|
||||
private String topicId;
|
||||
|
||||
public OpenAISSEEventSourceListener(SseEmitter sseEmitter) {
|
||||
this.sseEmitter = sseEmitter;
|
||||
}
|
||||
|
||||
public OpenAISSEEventSourceListener(String topicId,SseEmitter sseEmitter){
|
||||
this.topicId = topicId;
|
||||
this.sseEmitter = sseEmitter;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void onOpen(@NotNull EventSource eventSource, @NotNull Response response) {
|
||||
log.info("OpenAI建立sse连接...");
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void onEvent(@NotNull EventSource eventSource, String id, String type, @NotNull String data) {
|
||||
log.debug("OpenAI返回数据:{}", data);
|
||||
tokens += 1;
|
||||
if (data.equals("[DONE]")) {
|
||||
log.info("OpenAI返回数据结束了");
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id("[TOKENS]")
|
||||
.data("<br/><br/>tokens:" + tokens())
|
||||
.reconnectTime(3000));
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id("[DONE]")
|
||||
.data("[DONE]")
|
||||
.reconnectTime(3000));
|
||||
// 传输完成后自动关闭sse
|
||||
sseEmitter.complete();
|
||||
return;
|
||||
}
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
ChatCompletionResponse completionResponse = mapper.readValue(data, ChatCompletionResponse.class); // 读取Json
|
||||
try {
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id(this.topicId)
|
||||
.data(completionResponse.getChoices().get(0).getDelta())
|
||||
.reconnectTime(3000));
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(),e);
|
||||
eventSource.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onClosed(@NotNull EventSource eventSource) {
|
||||
log.info("流式输出返回值总共{}tokens", tokens() - 2);
|
||||
log.info("OpenAI关闭sse连接...");
|
||||
}
|
||||
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public void onFailure(@NotNull EventSource eventSource, Throwable t, Response response) {
|
||||
String errMsg = "";
|
||||
ResponseBody body = null == response ? null:response.body();
|
||||
if (Objects.nonNull(body)) {
|
||||
log.error("OpenAI sse连接异常data:{},异常:{}", body.string(), t.getMessage());
|
||||
errMsg = body.string();
|
||||
} else {
|
||||
log.error("OpenAI sse连接异常data:{},异常:{}", response, t.getMessage());
|
||||
errMsg = t.getMessage();
|
||||
}
|
||||
eventSource.cancel();
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id("[ERR]")
|
||||
.data(Message.builder().content(explainErr(errMsg)).build())
|
||||
.reconnectTime(3000));
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id("[DONE]")
|
||||
.data("[DONE]")
|
||||
.reconnectTime(3000));
|
||||
sseEmitter.complete();
|
||||
}
|
||||
|
||||
private String explainErr(String errMsg){
|
||||
if(StringUtils.isEmpty(errMsg)){
|
||||
return "";
|
||||
}
|
||||
if(errMsg.contains("Rate limit")){
|
||||
return "请求频率太快了,请等待20秒再试.";
|
||||
}
|
||||
return errMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
* tokens
|
||||
* @return
|
||||
*/
|
||||
public long tokens() {
|
||||
return tokens;
|
||||
}
|
||||
}
|
||||
|
||||
//update-end---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
|
@ -1,56 +0,0 @@
|
|||
package org.jeecg.modules.demo.gpt.service;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.demo.gpt.vo.ChatHistoryVO;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
||||
|
||||
/**
|
||||
* AI助手聊天Service
|
||||
* @author chenrui
|
||||
* @date 2024/1/26 20:08
|
||||
*/
|
||||
public interface ChatService {
|
||||
/**
|
||||
* 创建SSE
|
||||
* @return
|
||||
*/
|
||||
SseEmitter createChat();
|
||||
|
||||
/**
|
||||
* 关闭SSE
|
||||
*/
|
||||
void closeChat();
|
||||
|
||||
/**
|
||||
* 客户端发送消息到服务端
|
||||
*
|
||||
* @param topicId
|
||||
* @param message
|
||||
* @author chenrui
|
||||
* @date 2024/1/26 20:01
|
||||
*/
|
||||
void sendMessage(String topicId, String message);
|
||||
|
||||
//update-begin---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
/**
|
||||
* 保存聊天记录
|
||||
* @param chatHistoryVO
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/2/22 13:37
|
||||
*/
|
||||
Result<?> saveHistory(ChatHistoryVO chatHistoryVO);
|
||||
|
||||
/**
|
||||
* 查询聊天记录
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/2/22 13:59
|
||||
*/
|
||||
Result<ChatHistoryVO> getHistoryByTopic();
|
||||
//update-end---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
}
|
||||
|
||||
//update-end---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
|
@ -1,233 +0,0 @@
|
|||
package org.jeecg.modules.demo.gpt.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.unfbx.chatgpt.OpenAiStreamClient;
|
||||
import com.unfbx.chatgpt.entity.chat.ChatCompletion;
|
||||
import com.unfbx.chatgpt.entity.chat.Message;
|
||||
import com.unfbx.chatgpt.exception.BaseException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.exception.JeecgBootException;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.common.util.UUIDGenerator;
|
||||
import org.jeecg.modules.demo.gpt.cache.LocalCache;
|
||||
import org.jeecg.modules.demo.gpt.listeners.OpenAISSEEventSourceListener;
|
||||
import org.jeecg.modules.demo.gpt.service.ChatService;
|
||||
import org.jeecg.modules.demo.gpt.vo.ChatHistoryVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
||||
|
||||
/**
|
||||
* AI助手聊天Service
|
||||
* @author chenrui
|
||||
* @date 2024/1/26 20:07
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class ChatServiceImpl implements ChatService {
|
||||
|
||||
//update-begin---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
private static final String CACHE_KEY_PREFIX = "ai:chart:";
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final String CACHE_KEY_MSG_CONTEXT = "msg_content";
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final String CACHE_KEY_MSG_HISTORY = "msg_history";
|
||||
|
||||
@Autowired
|
||||
RedisTemplate redisTemplate;
|
||||
//update-end---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
|
||||
private OpenAiStreamClient openAiStreamClient = null;
|
||||
|
||||
//update-begin---author:chenrui ---date:20240131 for:[QQYUN-8212]fix 没有配置启动报错------------
|
||||
|
||||
/**
|
||||
* 防止client不能成功注入
|
||||
* @return
|
||||
* @author chenrui
|
||||
* @date 2024/2/3 23:08
|
||||
*/
|
||||
private OpenAiStreamClient ensureClient(){
|
||||
if (null == this.openAiStreamClient){
|
||||
//update-begin---author:chenrui ---date:20240625 for:[TV360X-1570]给于更友好的提示,提示未配置ai------------
|
||||
try {
|
||||
this.openAiStreamClient = SpringContextUtils.getBean(OpenAiStreamClient.class);
|
||||
} catch (Exception ignored) {
|
||||
sendErrorMsg("如果您想使用AI助手,请先设置相应配置!");
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240625 for:[TV360X-1570]给于更友好的提示,提示未配置ai------------
|
||||
}
|
||||
return this.openAiStreamClient;
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240131 for:[QQYUN-8212]fix 没有配置启动报错------------
|
||||
|
||||
private String getUserId() {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
return sysUser.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SseEmitter createChat() {
|
||||
String uid = getUserId();
|
||||
//默认30秒超时,设置为0L则永不超时
|
||||
SseEmitter sseEmitter = new SseEmitter(-0L);
|
||||
//完成后回调
|
||||
sseEmitter.onCompletion(() -> {
|
||||
log.info("[{}]结束连接...................",uid);
|
||||
LocalCache.CACHE.remove(uid);
|
||||
});
|
||||
//超时回调
|
||||
sseEmitter.onTimeout(() -> {
|
||||
log.info("[{}]连接超时...................", uid);
|
||||
});
|
||||
//异常回调
|
||||
sseEmitter.onError(
|
||||
throwable -> {
|
||||
try {
|
||||
log.info("[{}]连接异常,{}", uid, throwable.toString());
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id(uid)
|
||||
.name("发生异常!")
|
||||
.data(Message.builder().content("发生异常请重试!").build())
|
||||
.reconnectTime(3000));
|
||||
LocalCache.CACHE.put(uid, sseEmitter);
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
}
|
||||
);
|
||||
try {
|
||||
sseEmitter.send(SseEmitter.event().reconnectTime(5000));
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
LocalCache.CACHE.put(uid, sseEmitter);
|
||||
log.info("[{}]创建sse连接成功!", uid);
|
||||
return sseEmitter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChat() {
|
||||
String uid = getUserId();
|
||||
SseEmitter sse = (SseEmitter) LocalCache.CACHE.get(uid);
|
||||
if (sse != null) {
|
||||
sse.complete();
|
||||
//移除
|
||||
LocalCache.CACHE.remove(uid);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String topicId, String message) {
|
||||
String uid = getUserId();
|
||||
if (StrUtil.isBlank(message)) {
|
||||
log.info("参数异常,message为null");
|
||||
throw new BaseException("参数异常,message不能为空~");
|
||||
}
|
||||
if (StrUtil.isBlank(topicId)) {
|
||||
topicId = UUIDGenerator.generate();
|
||||
}
|
||||
//update-begin---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
log.info("话题id:{}", topicId);
|
||||
String cacheKey = CACHE_KEY_PREFIX + uid + "_" + topicId;
|
||||
String messageContext = (String) redisTemplate.opsForHash().get(cacheKey, CACHE_KEY_MSG_CONTEXT);
|
||||
List<Message> msgHistory = new ArrayList<>();
|
||||
if (StrUtil.isNotBlank(messageContext)) {
|
||||
List<Message> messages = JSONArray.parseArray(messageContext, Message.class);
|
||||
msgHistory = messages == null ? new ArrayList<>() : messages;
|
||||
}
|
||||
Message currentMessage = Message.builder().content(message).role(Message.Role.USER).build();
|
||||
msgHistory.add(currentMessage);
|
||||
|
||||
SseEmitter sseEmitter = (SseEmitter) LocalCache.CACHE.get(uid);
|
||||
if (sseEmitter == null) {
|
||||
log.info("聊天消息推送失败uid:[{}],没有创建连接,请重试。", uid);
|
||||
throw new JeecgBootException("聊天消息推送失败uid:[{}],没有创建连接,请重试。~");
|
||||
}
|
||||
//update-begin---author:chenrui ---date:20240625 for:[TV360X-1570]给于更友好的提示,提示未配置ai------------
|
||||
OpenAiStreamClient client = ensureClient();
|
||||
if (null != client) {
|
||||
OpenAISSEEventSourceListener openAIEventSourceListener = new OpenAISSEEventSourceListener(topicId, sseEmitter);
|
||||
ChatCompletion completion = ChatCompletion
|
||||
.builder()
|
||||
.messages(msgHistory)
|
||||
.model(ChatCompletion.Model.GPT_3_5_TURBO.getName())
|
||||
.build();
|
||||
client.streamChatCompletion(completion, openAIEventSourceListener);
|
||||
redisTemplate.opsForHash().put(cacheKey, CACHE_KEY_MSG_CONTEXT, JSONUtil.toJsonStr(msgHistory));
|
||||
//update-end---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
Result.ok(completion.tokens());
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240625 for:[TV360X-1570]给于更友好的提示,提示未配置ai------------
|
||||
}
|
||||
|
||||
//update-begin---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
@Override
|
||||
public Result<?> saveHistory(ChatHistoryVO chatHistoryVO) {
|
||||
String uid = getUserId();
|
||||
String cacheKey = CACHE_KEY_PREFIX + CACHE_KEY_MSG_HISTORY + ":" + uid;
|
||||
redisTemplate.opsForValue().set(cacheKey, chatHistoryVO.getContent());
|
||||
return Result.OK("保存成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<ChatHistoryVO> getHistoryByTopic() {
|
||||
String uid = getUserId();
|
||||
String cacheKey = CACHE_KEY_PREFIX + CACHE_KEY_MSG_HISTORY + ":" + uid;
|
||||
String historyContent = (String) redisTemplate.opsForValue().get(cacheKey);
|
||||
ChatHistoryVO chatHistoryVO = new ChatHistoryVO();
|
||||
chatHistoryVO.setContent(historyContent);
|
||||
return Result.OK(chatHistoryVO);
|
||||
}
|
||||
//update-end---author:chenrui ---date:20240223 for:[QQYUN-8225]聊天记录保存------------
|
||||
|
||||
/**
|
||||
* 发送异常消息给前端
|
||||
* [TV360X-1570]给于更友好的提示,提示未配置ai
|
||||
*
|
||||
* @param msg
|
||||
* @author chenrui
|
||||
* @date 2024/6/25 10:38
|
||||
*/
|
||||
private void sendErrorMsg(String msg) {
|
||||
String uid = getUserId();
|
||||
SseEmitter sseEmitter = (SseEmitter) LocalCache.CACHE.get(uid);
|
||||
if (sseEmitter == null) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id("[ERR]")
|
||||
.data(Message.builder().content(msg).build())
|
||||
.reconnectTime(3000));
|
||||
sseEmitter.send(SseEmitter.event()
|
||||
.id("[DONE]")
|
||||
.data("[DONE]")
|
||||
.reconnectTime(3000));
|
||||
sseEmitter.complete();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//update-end---author:chenrui ---date:20240126 for:【QQYUN-7932】AI助手------------
|
|
@ -1,25 +0,0 @@
|
|||
package org.jeecg.modules.demo.gpt.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 聊天记录
|
||||
* @Author: chenrui
|
||||
* @Date: 2024/2/22 13:36
|
||||
*/
|
||||
@Data
|
||||
public class ChatHistoryVO implements Serializable {
|
||||
private static final long serialVersionUID = 3238429500037511283L;
|
||||
|
||||
/**
|
||||
* 话题id
|
||||
*/
|
||||
String topicId;
|
||||
|
||||
/**
|
||||
* 聊天记录内容
|
||||
*/
|
||||
String content;
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.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.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.service.IKcDetectionDetailedService;
|
||||
|
||||
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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="人流识别")
|
||||
@RestController
|
||||
@RequestMapping("/kcDetectionDetailed/kcDetectionDetailed")
|
||||
@Slf4j
|
||||
public class KcDetectionDetailedController extends JeecgController<KcDetectionDetailed, IKcDetectionDetailedService> {
|
||||
@Autowired
|
||||
private IKcDetectionDetailedService kcDetectionDetailedService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcDetectionDetailed
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "人流识别-分页列表查询")
|
||||
@ApiOperation(value="人流识别-分页列表查询", notes="人流识别-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcDetectionDetailed>> queryPageList(KcDetectionDetailed kcDetectionDetailed,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcDetectionDetailed> queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionDetailed, req.getParameterMap());
|
||||
Page<KcDetectionDetailed> page = new Page<KcDetectionDetailed>(pageNo, pageSize);
|
||||
IPage<KcDetectionDetailed> pageList = kcDetectionDetailedService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcDetectionDetailed
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-添加")
|
||||
@ApiOperation(value="人流识别-添加", notes="人流识别-添加")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcDetectionDetailed kcDetectionDetailed) {
|
||||
kcDetectionDetailedService.save(kcDetectionDetailed);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcDetectionDetailed
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-编辑")
|
||||
@ApiOperation(value="人流识别-编辑", notes="人流识别-编辑")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcDetectionDetailed kcDetectionDetailed) {
|
||||
kcDetectionDetailedService.updateById(kcDetectionDetailed);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-通过id删除")
|
||||
@ApiOperation(value="人流识别-通过id删除", notes="人流识别-通过id删除")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcDetectionDetailedService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-批量删除")
|
||||
@ApiOperation(value="人流识别-批量删除", notes="人流识别-批量删除")
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcDetectionDetailedService.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<KcDetectionDetailed> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcDetectionDetailed kcDetectionDetailed = kcDetectionDetailedService.getById(id);
|
||||
if(kcDetectionDetailed==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcDetectionDetailed);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcDetectionDetailed
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcDetectionDetailed kcDetectionDetailed) {
|
||||
return super.exportXls(request, kcDetectionDetailed, KcDetectionDetailed.class, "人流识别");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionDetailed:kc_detection_detailed:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcDetectionDetailed.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,93 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_detection_detailed")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_detection_detailed对象", description="人流识别")
|
||||
public class KcDetectionDetailed implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
/**教室人数检测-主表ID[kc_detection_main.id]*/
|
||||
@Excel(name = "教室人数检测-主表ID[kc_detection_main.id]", width = 15)
|
||||
@ApiModelProperty(value = "教室人数检测-主表ID[kc_detection_main.id]")
|
||||
private java.lang.String pid;
|
||||
/**任务编号(课堂)*/
|
||||
@Excel(name = "任务编号(课堂)", width = 15)
|
||||
@ApiModelProperty(value = "任务编号(课堂)")
|
||||
private java.lang.String rwbh;
|
||||
/**课程编号*/
|
||||
@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 jsbh;
|
||||
/**学年学期内部用*/
|
||||
@Excel(name = "学年学期内部用", width = 15)
|
||||
@ApiModelProperty(value = "学年学期内部用")
|
||||
private java.lang.String xnxq;
|
||||
/**检测url*/
|
||||
@Excel(name = "检测url", width = 15)
|
||||
@ApiModelProperty(value = "检测url")
|
||||
private java.lang.String detectionUrl;
|
||||
/**截取图片结果URL*/
|
||||
@Excel(name = "截取图片结果URL", width = 15)
|
||||
@ApiModelProperty(value = "截取图片结果URL")
|
||||
private java.lang.String detectionOutImgUrl;
|
||||
/**截取图片计算人数返回结果*/
|
||||
@Excel(name = "截取图片计算人数返回结果", width = 15)
|
||||
@ApiModelProperty(value = "截取图片计算人数返回结果")
|
||||
private java.lang.String detectionOutImgRes;
|
||||
/**检测次数(当前是第几次)*/
|
||||
@Excel(name = "检测次数(当前是第几次)", width = 15)
|
||||
@ApiModelProperty(value = "检测次数(当前是第几次)")
|
||||
private java.lang.Integer detectionNum;
|
||||
/**当次检测人数*/
|
||||
@Excel(name = "当次检测人数", width = 15)
|
||||
@ApiModelProperty(value = "当次检测人数")
|
||||
private java.lang.Integer num;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcDetectionDetailedMapper extends BaseMapper<KcDetectionDetailed> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.kcDetectionDetailed.mapper.KcDetectionDetailedMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcDetectionDetailedService extends IService<KcDetectionDetailed> {
|
||||
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionDetailed.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.mapper.KcDetectionDetailedMapper;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.service.IKcDetectionDetailedService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcDetectionDetailedServiceImpl extends ServiceImpl<KcDetectionDetailedMapper, KcDetectionDetailed> implements IKcDetectionDetailedService {
|
||||
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.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.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.service.IKcDetectionMainService;
|
||||
|
||||
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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="人流识别")
|
||||
@RestController
|
||||
@RequestMapping("/kcDetectionMain/kcDetectionMain")
|
||||
@Slf4j
|
||||
public class KcDetectionMainController extends JeecgController<KcDetectionMain, IKcDetectionMainService> {
|
||||
@Autowired
|
||||
private IKcDetectionMainService kcDetectionMainService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcDetectionMain
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "人流识别-分页列表查询")
|
||||
@ApiOperation(value="人流识别-分页列表查询", notes="人流识别-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcDetectionMain>> queryPageList(KcDetectionMain kcDetectionMain,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcDetectionMain> queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionMain, req.getParameterMap());
|
||||
Page<KcDetectionMain> page = new Page<KcDetectionMain>(pageNo, pageSize);
|
||||
IPage<KcDetectionMain> pageList = kcDetectionMainService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcDetectionMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-添加")
|
||||
@ApiOperation(value="人流识别-添加", notes="人流识别-添加")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcDetectionMain kcDetectionMain) {
|
||||
kcDetectionMainService.save(kcDetectionMain);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcDetectionMain
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-编辑")
|
||||
@ApiOperation(value="人流识别-编辑", notes="人流识别-编辑")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcDetectionMain kcDetectionMain) {
|
||||
kcDetectionMainService.updateById(kcDetectionMain);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-通过id删除")
|
||||
@ApiOperation(value="人流识别-通过id删除", notes="人流识别-通过id删除")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcDetectionMainService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "人流识别-批量删除")
|
||||
@ApiOperation(value="人流识别-批量删除", notes="人流识别-批量删除")
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcDetectionMainService.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<KcDetectionMain> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcDetectionMain kcDetectionMain = kcDetectionMainService.getById(id);
|
||||
if(kcDetectionMain==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcDetectionMain);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcDetectionMain
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcDetectionMain kcDetectionMain) {
|
||||
return super.exportXls(request, kcDetectionMain, KcDetectionMain.class, "人流识别");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcDetectionMain:kc_detection_main:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcDetectionMain.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_detection_main")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_detection_main对象", description="人流识别")
|
||||
public class KcDetectionMain implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**创建时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**更新时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private java.util.Date updateTime;
|
||||
/**任务编号(课堂)*/
|
||||
@Excel(name = "任务编号(课堂)", width = 15)
|
||||
@ApiModelProperty(value = "任务编号(课堂)")
|
||||
private java.lang.String rwbh;
|
||||
/**课程编号*/
|
||||
@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 jsbh;
|
||||
/**学年学期内部用*/
|
||||
@Excel(name = "学年学期内部用", width = 15)
|
||||
@ApiModelProperty(value = "学年学期内部用")
|
||||
private java.lang.String xnxq;
|
||||
/**检测url*/
|
||||
@Excel(name = "检测url", width = 15)
|
||||
@ApiModelProperty(value = "检测url")
|
||||
private java.lang.String detectionUrl;
|
||||
/**检测次数*/
|
||||
@Excel(name = "检测次数", width = 15)
|
||||
@ApiModelProperty(value = "检测次数")
|
||||
private java.lang.Integer detectionNum;
|
||||
/**人数(累加)*/
|
||||
@Excel(name = "人数(累加)", width = 15)
|
||||
@ApiModelProperty(value = "人数(累加)")
|
||||
private java.lang.Integer allNum;
|
||||
/**平均数*/
|
||||
@Excel(name = "平均数", width = 15)
|
||||
@ApiModelProperty(value = "平均数")
|
||||
private java.lang.Integer averageNum;
|
||||
/**课堂信息*/
|
||||
@Excel(name = "课堂信息", width = 15)
|
||||
@ApiModelProperty(value = "课堂信息")
|
||||
private java.lang.String ketangbiaoInfo;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcDetectionMainMapper extends BaseMapper<KcDetectionMain> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.kcDetectionMain.mapper.KcDetectionMainMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcDetectionMainService extends IService<KcDetectionMain> {
|
||||
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcDetectionMain.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.mapper.KcDetectionMainMapper;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.service.IKcDetectionMainService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 人流识别
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcDetectionMainServiceImpl extends ServiceImpl<KcDetectionMainMapper, KcDetectionMain> implements IKcDetectionMainService {
|
||||
|
||||
}
|
|
@ -1,192 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcJieci.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.demo.kcJieci.entity.KcJieci;
|
||||
import org.jeecg.modules.demo.kcJieci.service.IKcJieciService;
|
||||
|
||||
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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="上课节次")
|
||||
@RestController
|
||||
@RequestMapping("/kcJieci/kcJieci")
|
||||
@Slf4j
|
||||
public class KcJieciController extends JeecgController<KcJieci, IKcJieciService> {
|
||||
@Autowired
|
||||
private IKcJieciService kcJieciService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcJieci
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "上课节次-分页列表查询")
|
||||
@ApiOperation(value="上课节次-分页列表查询", notes="上课节次-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcJieci>> queryPageList(KcJieci kcJieci,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcJieci> queryWrapper = QueryGenerator.initQueryWrapper(kcJieci, req.getParameterMap());
|
||||
Page<KcJieci> page = new Page<KcJieci>(pageNo, pageSize);
|
||||
IPage<KcJieci> pageList = kcJieciService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcJieci
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-添加")
|
||||
@ApiOperation(value="上课节次-添加", notes="上课节次-添加")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcJieci kcJieci) {
|
||||
kcJieciService.save(kcJieci);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcJieci
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-编辑")
|
||||
@ApiOperation(value="上课节次-编辑", notes="上课节次-编辑")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcJieci kcJieci) {
|
||||
kcJieciService.updateById(kcJieci);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-通过id删除")
|
||||
@ApiOperation(value="上课节次-通过id删除", notes="上课节次-通过id删除")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcJieciService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上课节次-批量删除")
|
||||
@ApiOperation(value="上课节次-批量删除", notes="上课节次-批量删除")
|
||||
@RequiresPermissions("kcJieci:kc_jieci:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcJieciService.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<KcJieci> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcJieci kcJieci = kcJieciService.getById(id);
|
||||
if(kcJieci==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcJieci);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcJieci
|
||||
*/
|
||||
@RequiresPermissions("kcJieci:kc_jieci:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcJieci kcJieci) {
|
||||
return super.exportXls(request, kcJieci, KcJieci.class, "上课节次");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcJieci:kc_jieci:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcJieci.class);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="kc_jieci-首页获取节次信息", notes="kc_jieci-首页获取节次信息")
|
||||
@GetMapping(value = "/getIndexJcList")
|
||||
public Result<List<KcJieci>> getIndexJcList(KcJieci kcJieci) {
|
||||
List<KcJieci> pageList = kcJieciService.getIndexJcList(kcJieci);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="可线上听课课堂-提前半小时", notes="可线上听课课堂-提前半小时")
|
||||
@GetMapping(value = "/getIndexJcXskcList")
|
||||
public Result<List<KcJieci>> getIndexJcXskcList(KcJieci kcJieci) {
|
||||
List<KcJieci> pageList = kcJieciService.getIndexJcXskcList(kcJieci);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcJieci.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_jieci")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_jieci对象", description="上课节次")
|
||||
public class KcJieci implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Integer id;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15)
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String jieci;
|
||||
/**节次开始时间*/
|
||||
@Excel(name = "节次开始时间", width = 15)
|
||||
@ApiModelProperty(value = "节次开始时间")
|
||||
private java.lang.String hhks;
|
||||
/**节次结束时间*/
|
||||
@Excel(name = "节次结束时间", width = 15)
|
||||
@ApiModelProperty(value = "节次结束时间")
|
||||
private java.lang.String hhjs;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kssj;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String type;
|
||||
@TableField(exist = false)
|
||||
private String sjsksj;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcJieci.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcJieci.entity.KcJieci;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcJieciMapper extends BaseMapper<KcJieci> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.kcJieci.mapper.KcJieciMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,19 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcJieci.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcJieci.entity.KcJieci;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcJieciService extends IService<KcJieci> {
|
||||
|
||||
List<KcJieci> getIndexJcList(KcJieci kcJieci);
|
||||
|
||||
List<KcJieci> getIndexJcXskcList(KcJieci kcJieci);
|
||||
}
|
|
@ -1,225 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcJieci.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.demo.kcJieci.entity.KcJieci;
|
||||
import org.jeecg.modules.demo.kcJieci.mapper.KcJieciMapper;
|
||||
import org.jeecg.modules.demo.kcJieci.service.IKcJieciService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 上课节次
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class KcJieciServiceImpl extends ServiceImpl<KcJieciMapper, KcJieci> implements IKcJieciService {
|
||||
|
||||
|
||||
@Override
|
||||
public List<KcJieci> getIndexJcList(KcJieci kcJieci) {
|
||||
QueryWrapper<KcJieci> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("LENGTH(jieci)>2");
|
||||
queryWrapper.orderByAsc("id");
|
||||
List<KcJieci> list = baseMapper.selectList(queryWrapper);
|
||||
List<KcJieci> resList = new ArrayList<>();
|
||||
String dqsj = DateUtils.getDate("HHmm");//获取当前时间的小时和分钟
|
||||
String sjkssj = "";//实际开始时间 用于判断正在上课和即将上课的文字切换
|
||||
String minDate = list.get(0).getHhks();//最小开始时间
|
||||
String maxDate = list.get(5).getHhjs();//最大结束时间
|
||||
String dqkssj = DateUtils.getDate("yyyy-MM-dd");//当前开始时间
|
||||
String dqjc = "";//当前节次
|
||||
String xyjkssj = "";//当前开始时间
|
||||
String xyjjc = "";//当前节次
|
||||
Calendar calendarMin = Calendar.getInstance();
|
||||
calendarMin.setTime(DateUtil.parse(dqkssj+" "+minDate.substring(0,2)+":"+minDate.substring(2,4)+":00","yyyy-MM-dd HH:mm:ss"));
|
||||
//从当前日期减去30分钟
|
||||
calendarMin.add(Calendar.MINUTE, -30);
|
||||
minDate = DateUtil.format(calendarMin.getTime(),"HHmm") ;
|
||||
|
||||
if(Integer.parseInt(dqsj)<Integer.parseInt(minDate)){
|
||||
//如果当前时间小于第一节开始时间则当前时间赋值为昨天,节次为最后一节
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = "";
|
||||
//下一节赋值为当天第一节
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
if(Integer.parseInt(dqsj)>Integer.parseInt(maxDate)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = "";
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
for(int i=0;i<list.size();i++){
|
||||
String kssj = "";
|
||||
String jssj = "";
|
||||
|
||||
kssj = list.get(i).getHhks();
|
||||
jssj = list.get(i).getHhjs();
|
||||
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.setTime(DateUtil.parse(dqkssj+" "+kssj.substring(0,2)+":"+kssj.substring(2,4)+":00","yyyy-MM-dd HH:mm:ss"));
|
||||
//从当前日期减去15分钟
|
||||
calendar2.add(Calendar.MINUTE, -30);
|
||||
kssj = DateUtil.format(calendar2.getTime(),"HHmm") ;
|
||||
sjkssj = list.get(i).getHhks();
|
||||
//
|
||||
// if(i==list.size()-1){
|
||||
// kssj = list.get(i).getHhks();
|
||||
// jssj = list.get(i).getHhjs();
|
||||
// }else{
|
||||
// kssj = list.get(i).getHhks();
|
||||
// jssj = list.get(i+1).getHhks();
|
||||
// }
|
||||
if(Integer.parseInt(dqsj)>=Integer.parseInt(kssj)&&Integer.parseInt(dqsj)<Integer.parseInt(jssj)){
|
||||
dqjc = list.get(i).getJieci();
|
||||
if(i==list.size()-1){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqjc = list.get(i).getJieci();
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(i+1).getJieci();
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(Integer.parseInt(dqsj)>=1130&&Integer.parseInt(dqsj)<=1300){
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = "05、06";
|
||||
}
|
||||
if(Integer.parseInt(dqsj)>=1645&&Integer.parseInt(dqsj)<=1730){
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = "09、10";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
KcJieci kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(dqkssj);
|
||||
kcJieciRes.setJieci(dqjc);
|
||||
kcJieciRes.setType("1");
|
||||
if(StringUtils.isNotBlank(sjkssj)){
|
||||
kcJieciRes.setSjsksj(dqkssj+" "+sjkssj.substring(0,2)+":"+sjkssj.substring(2,4)+":00");
|
||||
}
|
||||
resList.add(kcJieciRes);
|
||||
kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(xyjkssj);
|
||||
kcJieciRes.setJieci(xyjjc);
|
||||
kcJieciRes.setType("2");
|
||||
resList.add(kcJieciRes);
|
||||
return resList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KcJieci> getIndexJcXskcList(KcJieci kcJieci) {
|
||||
QueryWrapper<KcJieci> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.apply("LENGTH(jieci)>2");
|
||||
queryWrapper.orderByAsc("id");
|
||||
List<KcJieci> list = baseMapper.selectList(queryWrapper);
|
||||
List<KcJieci> resList = new ArrayList<>();
|
||||
String dqsj = DateUtils.getDate("HHmm");//获取当前时间的小时和分钟
|
||||
String minDate = list.get(0).getHhks();//最小开始时间
|
||||
String maxDate = list.get(5).getHhjs();//最大结束时间
|
||||
String dqkssj = "";//当前开始时间
|
||||
String dqjc = "";//当前节次
|
||||
String xyjkssj = "";//当前开始时间
|
||||
String xyjjc = "";//当前节次
|
||||
if(Integer.parseInt(dqsj)<Integer.parseInt(minDate)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间小于第一节开始时间则当前时间赋值为昨天,节次为最后一节
|
||||
dqkssj = simpleDateFormat.format(calendar.getTime());
|
||||
dqjc = "";
|
||||
//下一节赋值为当天第一节
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
if(Integer.parseInt(dqsj)>Integer.parseInt(maxDate)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = "";
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
for(int i=0;i<list.size();i++){
|
||||
String kssj = "";
|
||||
String jssj = "";
|
||||
kssj = list.get(i).getHhks();
|
||||
jssj = list.get(i).getHhjs();
|
||||
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.setTime(DateUtil.parse(dqkssj+" "+kssj.substring(0,2)+":"+kssj.substring(2,4)+":00","yyyy-MM-dd HH:mm:ss"));
|
||||
//从当前日期减去15分钟
|
||||
calendar2.add(Calendar.MINUTE, -15);
|
||||
kssj = DateUtil.format(calendar2.getTime(),"HHmm") ;
|
||||
|
||||
// if(i==0){
|
||||
// kssj = list.get(i).getHhks();
|
||||
// jssj = list.get(i).getHhjs();
|
||||
// }else{
|
||||
// kssj = list.get(i-1).getHhjs();
|
||||
// jssj = list.get(i).getHhjs();
|
||||
// }
|
||||
if(Integer.parseInt(dqsj)>=Integer.parseInt(kssj)&&Integer.parseInt(dqsj)<Integer.parseInt(jssj)){
|
||||
|
||||
dqjc = list.get(i).getJieci();
|
||||
if(i==list.size()-1){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");//设置格式
|
||||
Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
|
||||
calendar.add(Calendar.DAY_OF_MONTH, +1); //当前时间减去一天,即一天前的时间
|
||||
//如果当前时间大于最后一节课则赋值给最后一节课
|
||||
dqkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
dqjc = list.get(i).getJieci();
|
||||
//下一节课赋值给明天第一节
|
||||
xyjkssj = simpleDateFormat.format(calendar.getTime());
|
||||
xyjjc = list.get(0).getJieci();
|
||||
}else{
|
||||
xyjkssj = DateUtils.getDate("yyyy-MM-dd");
|
||||
xyjjc = list.get(i+1).getJieci();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
KcJieci kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(dqkssj);
|
||||
kcJieciRes.setJieci(dqjc);
|
||||
kcJieciRes.setType("1");
|
||||
resList.add(kcJieciRes);
|
||||
kcJieciRes = new KcJieci();
|
||||
kcJieciRes.setKssj(xyjkssj);
|
||||
kcJieciRes.setJieci(xyjjc);
|
||||
kcJieciRes.setType("2");
|
||||
resList.add(kcJieciRes);
|
||||
return resList;
|
||||
}
|
||||
}
|
|
@ -1,297 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
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.apache.commons.lang.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.oConvertUtils;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.service.IKcKetangbiaoService;
|
||||
|
||||
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.demo.zjSqxx.entity.ZjSqxx;
|
||||
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
|
||||
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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课堂表")
|
||||
@RestController
|
||||
@RequestMapping("/kcKetangbiao/kcKetangbiao")
|
||||
@Slf4j
|
||||
public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKetangbiaoService> {
|
||||
@Autowired
|
||||
private IKcKetangbiaoService kcKetangbiaoService;
|
||||
|
||||
@Autowired
|
||||
private IZjSqxxService zjSqxxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课堂表-分页列表查询")
|
||||
@ApiOperation(value="课堂表-分页列表查询", notes="课堂表-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcKetangbiao>> queryPageList(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<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="课堂表-分页列表查询", notes="课堂表-分页列表查询")
|
||||
@GetMapping(value = "/getKclblist")
|
||||
public Result<IPage<KcKetangbiao>> getKclblist(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","1");
|
||||
zjSqxxQueryWrapper.eq("sqzt","0");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
kcKetangbiao.setXnxq(zjSqxx.getXnxq());
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
kcKetangbiao.setInKkdw(zjSqxx.getKkdw());
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKcmc())){
|
||||
kcKetangbiao.setInKcmc(zjSqxx.getKcmc());
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return Result.error("您未在授权期限内,不能进行查询!");
|
||||
}
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getKclblist(page, kcKetangbiao);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="课堂表-分页列表查询", notes="课堂表-分页列表查询")
|
||||
@GetMapping(value = "/getYylist")
|
||||
public Result<IPage<KcKetangbiao>> getYylist(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","1");
|
||||
zjSqxxQueryWrapper.eq("sqzt","0");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
kcKetangbiao.setXnxq(zjSqxx.getXnxq());
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
kcKetangbiao.setInKkdw(zjSqxx.getKkdw());
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKcmc())){
|
||||
kcKetangbiao.setInKcmc(zjSqxx.getKcmc());
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return Result.error("您未在授权期限内,不能进行查询!");
|
||||
}
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getYylist(page, kcKetangbiao);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂表-添加")
|
||||
@ApiOperation(value="课堂表-添加", notes="课堂表-添加")
|
||||
@RequiresPermissions("kcKetangbiao:kc_ketangbiao:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcKetangbiao kcKetangbiao) {
|
||||
kcKetangbiaoService.save(kcKetangbiao);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcKetangbiao
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂表-编辑")
|
||||
@ApiOperation(value="课堂表-编辑", notes="课堂表-编辑")
|
||||
@RequiresPermissions("kcKetangbiao:kc_ketangbiao:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcKetangbiao kcKetangbiao) {
|
||||
kcKetangbiaoService.updateById(kcKetangbiao);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂表-通过id删除")
|
||||
@ApiOperation(value="课堂表-通过id删除", notes="课堂表-通过id删除")
|
||||
@RequiresPermissions("kcKetangbiao:kc_ketangbiao:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcKetangbiaoService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课堂表-批量删除")
|
||||
@ApiOperation(value="课堂表-批量删除", notes="课堂表-批量删除")
|
||||
@RequiresPermissions("kcKetangbiao:kc_ketangbiao:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcKetangbiaoService.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<KcKetangbiao> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcKetangbiao kcKetangbiao = kcKetangbiaoService.getById(id);
|
||||
if(kcKetangbiao==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcKetangbiao);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcKetangbiao
|
||||
*/
|
||||
@RequiresPermissions("kcKetangbiao:kc_ketangbiao:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcKetangbiao kcKetangbiao) {
|
||||
return super.exportXls(request, kcKetangbiao, KcKetangbiao.class, "课堂表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcKetangbiao:kc_ketangbiao:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcKetangbiao.class);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="课堂管理-子表-通过id查询", notes="课堂管理-子表-通过id查询")
|
||||
@GetMapping(value = "/queryAllDataById")
|
||||
public Result<KcKetangbiao> queryAllDataById(@RequestParam(name="id",required=true) String id) {
|
||||
KcKetangbiao kcKetangbiao = kcKetangbiaoService.queryAllDataById(id);
|
||||
return Result.OK(kcKetangbiao);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="选择课程名称集合", notes="选择课程名称集合")
|
||||
@GetMapping(value = "/checklist")
|
||||
public Result<IPage<KcKetangbiao>> checklist(KcKetangbiao kcKetangbiao,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
|
||||
IPage<KcKetangbiao> pageList = kcKetangbiaoService.checklist(page, kcKetangbiao);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="获取教师职称", notes="获取教师职称")
|
||||
@GetMapping(value = "/getTeacherZhicheng")
|
||||
public Result<KcKetangbiao> getTeacherZhicheng(KcKetangbiao kcKetangbiao) {
|
||||
KcKetangbiao pageList = kcKetangbiaoService.getTeacherZhicheng(kcKetangbiao);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,361 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.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.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_ketangbiao")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_ketangbiao对象", description="课堂表")
|
||||
public class KcKetangbiao implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
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 = "创建日期")
|
||||
@TableField(exist = false)
|
||||
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.String sysOrgCode;
|
||||
/**课程编号*/
|
||||
@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 xf;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**职称*/
|
||||
@Excel(name = "职称", width = 15)
|
||||
@ApiModelProperty(value = "职称")
|
||||
private java.lang.String zc;
|
||||
/**教职工类别*/
|
||||
@Excel(name = "教职工类别", width = 15)
|
||||
@ApiModelProperty(value = "教职工类别")
|
||||
private java.lang.String jzglb;
|
||||
/**选课人数*/
|
||||
@Excel(name = "选课人数", width = 15)
|
||||
@ApiModelProperty(value = "选课人数")
|
||||
private java.lang.String xkrs;
|
||||
/**评课人数*/
|
||||
@Excel(name = "评课人数", width = 15)
|
||||
@ApiModelProperty(value = "评课人数")
|
||||
private java.lang.String pkrs;
|
||||
/**任务编号*/
|
||||
@Excel(name = "任务编号", width = 15)
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
private java.lang.String rwbh;
|
||||
/**开课单位*/
|
||||
// @Excel(name = "开课单位", width = 15, dicCode = "tkrszdw_view,college,college")
|
||||
// @Dict(dicCode = "tkrszdw_view,college,college")
|
||||
@ApiModelProperty(value = "开课单位")
|
||||
private java.lang.String kkdw;
|
||||
/**课程性质*/
|
||||
@Excel(name = "课程性质", width = 15, dicCode = "kcxz")
|
||||
@Dict(dicCode = "kcxz")
|
||||
@ApiModelProperty(value = "课程性质")
|
||||
private java.lang.String kcxz;
|
||||
/**教室编号*/
|
||||
@Excel(name = "教室编号", width = 15)
|
||||
private String jsbh;
|
||||
/**上课地点*/
|
||||
@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;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15, dicCode = "skjc")
|
||||
@Dict(dicCode = "skjc")
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String hh;
|
||||
/**周几*/
|
||||
@Excel(name = "周几", width = 15, dicCode = "week")
|
||||
@Dict(dicCode = "week")
|
||||
@ApiModelProperty(value = "周几")
|
||||
private java.lang.String week;
|
||||
/**开始时间*/
|
||||
@Excel(name = "开始时间", width = 15)
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private java.lang.String hhks;
|
||||
/**结束时间*/
|
||||
@Excel(name = "结束时间", width = 15)
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private java.lang.String hhjs;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.String dsz;
|
||||
/**课堂开始日期*/
|
||||
@Excel(name = "课堂开始日期", width = 15)
|
||||
@ApiModelProperty(value = "课堂开始日期")
|
||||
private java.lang.String wwks;
|
||||
/**课堂结束日期*/
|
||||
@Excel(name = "课堂结束日期", width = 15)
|
||||
@ApiModelProperty(value = "课堂结束日期")
|
||||
private java.lang.String wwjs;
|
||||
/**直播方式*/
|
||||
@Excel(name = "直播方式", width = 15, dicCode = "skpt")
|
||||
@Dict(dicCode = "skpt")
|
||||
@ApiModelProperty(value = "直播方式")
|
||||
private java.lang.String zbfs;
|
||||
/**会议id*/
|
||||
@Excel(name = "会议id", width = 15)
|
||||
@ApiModelProperty(value = "会议id")
|
||||
private java.lang.String hyid;
|
||||
/**会议号*/
|
||||
@Excel(name = "会议号", width = 15)
|
||||
@ApiModelProperty(value = "会议号")
|
||||
private java.lang.String hyh;
|
||||
/**会议密码*/
|
||||
@Excel(name = "会议密码", width = 15)
|
||||
@ApiModelProperty(value = "会议密码")
|
||||
private java.lang.String hymm;
|
||||
/**课程链接*/
|
||||
@Excel(name = "课程链接", width = 15)
|
||||
@ApiModelProperty(value = "课程链接")
|
||||
private java.lang.String kclj;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String beizhu;
|
||||
/**直播平台*/
|
||||
@Excel(name = "直播平台", width = 15)
|
||||
@ApiModelProperty(value = "直播平台")
|
||||
private java.lang.String zbpx;
|
||||
/**开课单位id*/
|
||||
@Excel(name = "开课单位id", width = 15)
|
||||
@ApiModelProperty(value = "开课单位id")
|
||||
private java.lang.Integer kkdwid;
|
||||
/**上课日期*/
|
||||
@Excel(name = "上课日期", width = 15)
|
||||
@ApiModelProperty(value = "上课日期")
|
||||
private java.lang.String skrq;
|
||||
/**课程表id*/
|
||||
@Excel(name = "课程表id", width = 15)
|
||||
@ApiModelProperty(value = "课程表id")
|
||||
private java.lang.Integer kechengbiaoid;
|
||||
/**听课次数*/
|
||||
@Excel(name = "听课次数", width = 15)
|
||||
@ApiModelProperty(value = "听课次数")
|
||||
private java.lang.Integer tingkecishu;
|
||||
/**开课周次*/
|
||||
@Excel(name = "开课周次", width = 15, dicCode = "skzc")
|
||||
@Dict(dicCode = "skzc")
|
||||
@ApiModelProperty(value = "开课周次")
|
||||
private java.lang.String kkzc;
|
||||
/**第几周*/
|
||||
@Excel(name = "第几周", width = 15)
|
||||
@ApiModelProperty(value = "第几周")
|
||||
private java.lang.Integer dijizhou;
|
||||
/**未知*/
|
||||
@Excel(name = "未知", width = 15)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.String jkzc1;
|
||||
/**是否停课*/
|
||||
@Excel(name = "是否停课", width = 15)
|
||||
@ApiModelProperty(value = "是否停课")
|
||||
@Dict(dicCode = "sftk_kc")
|
||||
private java.lang.Integer sftk;
|
||||
/**停课原因*/
|
||||
@Excel(name = "停课原因", width = 15)
|
||||
@ApiModelProperty(value = "停课原因")
|
||||
private java.lang.String tkyy;
|
||||
/**补课计划*/
|
||||
@Excel(name = "补课计划", width = 15)
|
||||
@ApiModelProperty(value = "补课计划")
|
||||
private java.lang.String bkjh;
|
||||
/**是否出镜,0-出镜,1-不出镜*/
|
||||
@Excel(name = "是否出镜,0-出镜,1-不出镜", width = 15)
|
||||
@ApiModelProperty(value = "是否出镜,0-出镜,1-不出镜")
|
||||
private java.lang.Integer sfcj;
|
||||
/**上课形式,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)
|
||||
@ApiModelProperty(value = "未知")
|
||||
private java.lang.Integer kechengbiao1;
|
||||
/**是否新生课 0 = 是*/
|
||||
@Excel(name = "是否新生课 0 = 是", width = 15)
|
||||
@ApiModelProperty(value = "是否新生课 0 = 是")
|
||||
private java.lang.String sfxsk;
|
||||
/**教工号*/
|
||||
@Excel(name = "教工号", width = 15)
|
||||
@ApiModelProperty(value = "教工号")
|
||||
private java.lang.String jgh;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String bz;
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String zt;
|
||||
/**是否删除(0:未删除,1:已删除)*/
|
||||
@Excel(name = "是否删除(0:未删除,1:已删除)", width = 15)
|
||||
@ApiModelProperty(value = "是否删除(0:未删除,1:已删除)")
|
||||
private java.lang.Integer isDelete;
|
||||
private java.lang.String xnxq;
|
||||
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String jssj;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywmc;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywTime;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String ywskxs;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String sfyy;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String userid;
|
||||
@TableField(exist = false)
|
||||
private java.lang.Integer isdeleted;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String startTime;
|
||||
@TableField(exist = false)
|
||||
private String endTime;
|
||||
@TableField(exist = false)
|
||||
private String xh;
|
||||
@TableField(exist = false)
|
||||
private String xjkssj;
|
||||
@TableField(exist = false)
|
||||
private String stars;
|
||||
@TableField(exist = false)
|
||||
private String ts;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String zhjsId;
|
||||
@TableField(exist = false)
|
||||
private String sfyzhjs;
|
||||
@TableField(exist = false)
|
||||
private String jzwh;
|
||||
@TableField(exist = false)
|
||||
private String szkc;
|
||||
|
||||
@TableField(exist = false)
|
||||
private boolean searchByNowXqxn;
|
||||
@TableField(exist = false)
|
||||
private String score;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String jspjPjf;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String xspjPjf;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sbType;
|
||||
@TableField(exist = false)
|
||||
private String title;
|
||||
@TableField(exist = false)
|
||||
private String notes;
|
||||
@TableField(exist = false)
|
||||
private String sftkb;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String tksy;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String num;
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String inKkdw;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String inKcmc;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private KcDetectionMain detectionMain;
|
||||
@TableField(exist = false)
|
||||
private KcDetectionDetailed kcDetectionDetailed;
|
||||
@TableField(exist = false)
|
||||
private List<KcDetectionDetailed> zqrsList;
|
||||
|
||||
}
|
|
@ -1,28 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课堂表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
||||
|
||||
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> checklist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> getYylist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
KcKetangbiao getTeacherZhicheng(KcKetangbiao kcKetangbiao);
|
||||
}
|
|
@ -1,197 +0,0 @@
|
|||
<?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.demo.kcKetangbiao.mapper.KcKetangbiaoMapper">
|
||||
|
||||
<select id="getKclblist" parameterType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao" resultType="org.jeecg.modules.demo.kcKetangbiao.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.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.kcmc = yy.kcmc and ktb.skjs = yy.skjs and ktb.rwbh = yy.rwbh and ktb.xnxq and yy.xqxn
|
||||
LEFT JOIN (SELECT DISTINCT jsbh, jsmc from kc_zhihuijiaoshi where sfyx=0) js on ktb.jsbh = js.jsbh
|
||||
left join xxhbjsjbxx jsjbxx on jsjbxx.jsmc = ktb.skdd
|
||||
left join xxhbjxljbxx jxljbxx on jsjbxx.jxlh = jxljbxx.jzwh
|
||||
left join kc_jieci jc on ktb.hh = jc.jieci
|
||||
left join kc_kechengbiao kcb on kcb.kcmc = ktb.kcmc and kcb.kcxz = ktb.kcxz and kcb.skjs = ktb.skjs and kcb.skdd=ktb.skdd and kcb.kkdw = ktb.kkdw and kcb.kcbh = ktb.kcbh and kcb.id = ktb.kechengbiaoid
|
||||
left join (select distinct tkxx.xm,tkxx.kcmc,concat(substring(tkxx.skrq,1,4),'-',substring(tkxx.skrq,5,2),'-',substring(tkxx.skrq,7,2)) as skrq,tkxx.skjs,tkxx.tksy from xxhbtkxx tkxx where tkxx.tklx != '3' and tkxx.skrq is not null) tkxx
|
||||
on ktb.kcmc =tkxx.kcmc and ktb.skrq = tkxx.skrq and ktb.skdd=tkxx.skjs and ktb.skjs = tkxx.xm
|
||||
left join kc_kkdw kkdw on ktb.kkdw = kkdw.kkdw
|
||||
<where>
|
||||
and ktb.is_delete = 0
|
||||
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
|
||||
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )
|
||||
</if>
|
||||
<if test="kcKetangbiao.skxs!=null and kcKetangbiao.skxs!=''">
|
||||
and ktb.skxs = #{kcKetangbiao.skxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skrq!=null and kcKetangbiao.skrq!=''">
|
||||
and ktb.skrq = #{kcKetangbiao.skrq}
|
||||
</if>
|
||||
<if test="kcKetangbiao.hh!=null and kcKetangbiao.hh!=''">
|
||||
and ktb.hh in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.hh.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="kcKetangbiao.inKkdw!=null and kcKetangbiao.inKkdw!=''">
|
||||
and ktb.kkdw in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.inKkdw.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="kcKetangbiao.inKcmc!=null and kcKetangbiao.inKcmc!=''">
|
||||
and ktb.kcmc in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.inKcmc.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<if test="kcKetangbiao.zbpx!=null and kcKetangbiao.zbpx!=''">
|
||||
and ktb.zbpx = #{kcKetangbiao.zbpx}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.kcxz!=null and kcKetangbiao.kcxz!=''">
|
||||
and ktb.kcxz = #{kcKetangbiao.kcxz}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skdd!=null and kcKetangbiao.skdd!=''">
|
||||
and ktb.skdd like concat('%',#{kcKetangbiao.skdd},'%')
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<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>
|
||||
<select id="getYylist" parameterType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao" resultType="org.jeecg.modules.demo.kcKetangbiao.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.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 kc_yuyue yy on ktb.kcmc = yy.kcmc and ktb.skjs = yy.skjs and ktb.rwbh = yy.rwbh and ktb.xnxq and yy.xqxn
|
||||
LEFT JOIN (SELECT DISTINCT jsbh, jsmc from kc_zhihuijiaoshi where sfyx=0) js on ktb.jsbh = js.jsbh
|
||||
left join xxhbjsjbxx jsjbxx on jsjbxx.jsmc = ktb.skdd
|
||||
left join xxhbjxljbxx jxljbxx on jsjbxx.jxlh = jxljbxx.jzwh
|
||||
left join kc_jieci jc on ktb.hh = jc.jieci
|
||||
left join kc_kechengbiao kcb on kcb.kcmc = ktb.kcmc and kcb.kcxz = ktb.kcxz and kcb.skjs = ktb.skjs and kcb.skdd=ktb.skdd and kcb.kkdw = ktb.kkdw and kcb.kcbh = ktb.kcbh and kcb.id = ktb.kechengbiaoid
|
||||
left join (select distinct tkxx.xm,tkxx.kcmc,concat(substring(tkxx.skrq,1,4),'-',substring(tkxx.skrq,5,2),'-',substring(tkxx.skrq,7,2)) as skrq,tkxx.skjs,tkxx.tksy from xxhbtkxx tkxx where tkxx.tklx != '3' and tkxx.skrq is not null) tkxx
|
||||
on ktb.kcmc =tkxx.kcmc and ktb.skrq = tkxx.skrq and ktb.skdd=tkxx.skjs and ktb.skjs = tkxx.xm
|
||||
left join kc_kkdw kkdw on ktb.kkdw = kkdw.kkdw
|
||||
<where>
|
||||
and ktb.is_delete = 0
|
||||
and yy.userid = #{kcKetangbiao.userid}
|
||||
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
|
||||
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )
|
||||
</if>
|
||||
<if test="kcKetangbiao.skxs!=null and kcKetangbiao.skxs!=''">
|
||||
and ktb.skxs = #{kcKetangbiao.skxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skrq!=null and kcKetangbiao.skrq!=''">
|
||||
and ktb.skrq = #{kcKetangbiao.skrq}
|
||||
</if>
|
||||
<if test="kcKetangbiao.hh!=null and kcKetangbiao.hh!=''">
|
||||
and ktb.hh in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.hh.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="kcKetangbiao.inKkdw!=null and kcKetangbiao.inKkdw!=''">
|
||||
and ktb.kkdw in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.inKkdw.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="kcKetangbiao.inKcmc!=null and kcKetangbiao.inKcmc!=''">
|
||||
and ktb.kcmc in
|
||||
<foreach item="item" index="index" collection="kcKetangbiao.inKcmc.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<if test="kcKetangbiao.zbpx!=null and kcKetangbiao.zbpx!=''">
|
||||
and ktb.zbpx = #{kcKetangbiao.zbpx}
|
||||
</if>
|
||||
<if test="kcKetangbiao.ywskxs!=null and kcKetangbiao.ywskxs!=''">
|
||||
and ktb.skxs != #{kcKetangbiao.ywskxs}
|
||||
</if>
|
||||
<if test="kcKetangbiao.kcxz!=null and kcKetangbiao.kcxz!=''">
|
||||
and ktb.kcxz = #{kcKetangbiao.kcxz}
|
||||
</if>
|
||||
<if test="kcKetangbiao.skdd!=null and kcKetangbiao.skdd!=''">
|
||||
and ktb.skdd like concat('%',#{kcKetangbiao.skdd},'%')
|
||||
</if>
|
||||
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
|
||||
and ktb.kkdw = #{kcKetangbiao.kkdw}
|
||||
</if>
|
||||
<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>
|
||||
|
||||
<select id="checklist" parameterType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao" resultType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao">
|
||||
select kcmc as id,kcmc from kc_ketangbiao a , kc_sys_config b where a.xnxq = b.flag1
|
||||
<if test="kcKetangbiao.kcmc!=null and kcKetangbiao.kcmc!=''">
|
||||
and a.kcmc like concat('%',#{kcKetangbiao.kcmc},'%')
|
||||
</if>
|
||||
GROUP BY kcmc
|
||||
order by kcmc asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getTeacherZhicheng" parameterType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao" resultType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao">
|
||||
select * from kc_ketangbiao a ,kc_sys_config b
|
||||
where a.xnxq = b.flag1
|
||||
and a.jgh = #{jgh}
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
|
@ -1,26 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.service;
|
||||
|
||||
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.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课堂表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
||||
|
||||
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
KcKetangbiao queryAllDataById(String id);
|
||||
|
||||
IPage<KcKetangbiao> checklist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
IPage<KcKetangbiao> getYylist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
|
||||
|
||||
KcKetangbiao getTeacherZhicheng(KcKetangbiao kcKetangbiao);
|
||||
}
|
|
@ -1,119 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcKetangbiao.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
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.commons.lang.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
|
||||
import org.jeecg.modules.demo.kcDetectionDetailed.mapper.KcDetectionDetailedMapper;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
|
||||
import org.jeecg.modules.demo.kcDetectionMain.mapper.KcDetectionMainMapper;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.mapper.KcKetangbiaoMapper;
|
||||
import org.jeecg.modules.demo.kcKetangbiao.service.IKcKetangbiaoService;
|
||||
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
|
||||
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 课堂表
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcKetangbiao> implements IKcKetangbiaoService {
|
||||
|
||||
|
||||
@Autowired
|
||||
public KcDetectionMainMapper kcDetectionMainMapper;
|
||||
@Autowired
|
||||
public KcDetectionDetailedMapper kcDetectionDetailedMapper;
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getKclblist(page, kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KcKetangbiao queryAllDataById(String id) {
|
||||
KcKetangbiao kcKetangbiao = baseMapper.selectById(id);
|
||||
//查询对应教室数据
|
||||
// QueryWrapper<KcJiaoshirongliang> jiaoshirongliangQw = new QueryWrapper<>();
|
||||
// jiaoshirongliangQw.eq("jsbh",kcKetangbiao.getJsbh());
|
||||
// jiaoshirongliangQw.last("limit 1");
|
||||
// KcJiaoshirongliang jiaoshirongliang = kcJiaoshirongliangService.getOne(jiaoshirongliangQw);
|
||||
// kcKetangbiao.setJiaoshirongliang(jiaoshirongliang);
|
||||
|
||||
//查询教学大纲
|
||||
String rwbh = kcKetangbiao.getRwbh();
|
||||
String xqxn = kcKetangbiao.getXnxq();
|
||||
// QueryWrapper<ZyJxdg> queryWrapper = new QueryWrapper<ZyJxdg>();
|
||||
// queryWrapper.eq("rwbh",rwbh);
|
||||
// queryWrapper.eq("xqxn",xqxn);
|
||||
// queryWrapper.last("limit 1");
|
||||
// ZyJxdg zyJxdg = zyJxdgService.getOne(queryWrapper);
|
||||
// kcKetangbiao.setZyJxdg(zyJxdg);
|
||||
|
||||
//查询
|
||||
DateTime now = DateTime.now();
|
||||
String nowStr = now.toString("yyyy-MM-dd");
|
||||
QueryWrapper<KcDetectionMain> kdmQw = new QueryWrapper<>();
|
||||
kdmQw.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
|
||||
kdmQw.lambda().eq(KcDetectionMain::getRwbh, rwbh);
|
||||
kdmQw.lambda().eq(KcDetectionMain::getXnxq, xqxn);
|
||||
|
||||
kdmQw.last("limit 1");
|
||||
KcDetectionMain detectionMain = kcDetectionMainMapper.selectOne(kdmQw);
|
||||
kcKetangbiao.setDetectionMain(detectionMain);
|
||||
|
||||
try {
|
||||
if (detectionMain != null) {
|
||||
QueryWrapper<KcDetectionDetailed> rsQw = new QueryWrapper<>();
|
||||
rsQw.eq("pid", detectionMain.getId());
|
||||
rsQw.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
|
||||
rsQw.orderByDesc("create_time");
|
||||
rsQw.last("limit 1");
|
||||
KcDetectionDetailed kcDetectionDetailed = kcDetectionDetailedMapper.selectOne(rsQw);
|
||||
kcKetangbiao.setKcDetectionDetailed(kcDetectionDetailed);
|
||||
QueryWrapper<KcDetectionDetailed> rsQwList = new QueryWrapper<>();
|
||||
rsQwList.eq("pid", detectionMain.getId());
|
||||
rsQwList.apply("create_time >= '" + nowStr + " 00:00:00' and create_time <= '" + nowStr + " 23:59:59'");
|
||||
rsQwList.orderByDesc("create_time");
|
||||
List<KcDetectionDetailed> zqrsList = kcDetectionDetailedMapper.selectList(rsQwList);
|
||||
kcKetangbiao.setZqrsList(zqrsList);
|
||||
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return kcKetangbiao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> checklist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.checklist(page,kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<KcKetangbiao> getYylist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getYylist(page,kcKetangbiao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public KcKetangbiao getTeacherZhicheng(KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getTeacherZhicheng(kcKetangbiao);
|
||||
}
|
||||
}
|
|
@ -1,187 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.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.demo.kcYuyue.entity.KcYuyue;
|
||||
import org.jeecg.modules.demo.kcYuyue.service.IKcYuyueService;
|
||||
|
||||
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-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="预约")
|
||||
@RestController
|
||||
@RequestMapping("/kcYuyue/kcYuyue")
|
||||
@Slf4j
|
||||
public class KcYuyueController extends JeecgController<KcYuyue, IKcYuyueService> {
|
||||
@Autowired
|
||||
private IKcYuyueService kcYuyueService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "预约-分页列表查询")
|
||||
@ApiOperation(value="预约-分页列表查询", notes="预约-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcYuyue>> queryPageList(KcYuyue kcYuyue,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcYuyue> queryWrapper = QueryGenerator.initQueryWrapper(kcYuyue, req.getParameterMap());
|
||||
Page<KcYuyue> page = new Page<KcYuyue>(pageNo, pageSize);
|
||||
IPage<KcYuyue> pageList = kcYuyueService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-添加")
|
||||
@ApiOperation(value="预约-添加", notes="预约-添加")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.save(kcYuyue);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "预约-添加")
|
||||
@ApiOperation(value="预约-添加", notes="预约-添加")
|
||||
@PostMapping(value = "/addNew")
|
||||
public Result<String> addNew(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.addNew(kcYuyue);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcYuyue
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-编辑")
|
||||
@ApiOperation(value="预约-编辑", notes="预约-编辑")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcYuyue kcYuyue) {
|
||||
kcYuyueService.updateById(kcYuyue);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-通过id删除")
|
||||
@ApiOperation(value="预约-通过id删除", notes="预约-通过id删除")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcYuyueService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "预约-批量删除")
|
||||
@ApiOperation(value="预约-批量删除", notes="预约-批量删除")
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcYuyueService.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<KcYuyue> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcYuyue kcYuyue = kcYuyueService.getById(id);
|
||||
if(kcYuyue==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcYuyue);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcYuyue
|
||||
*/
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcYuyue kcYuyue) {
|
||||
return super.exportXls(request, kcYuyue, KcYuyue.class, "预约");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcYuyue:kc_yuyue:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcYuyue.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,92 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.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-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_yuyue")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_yuyue对象", description="预约")
|
||||
public class KcYuyue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**课堂表id*/
|
||||
@Excel(name = "课堂表id", width = 15)
|
||||
@ApiModelProperty(value = "课堂表id")
|
||||
private java.lang.String ketangbiaoid;
|
||||
/**账号*/
|
||||
@Excel(name = "账号", width = 15)
|
||||
@ApiModelProperty(value = "账号")
|
||||
private java.lang.String userid;
|
||||
/**用户名*/
|
||||
@Excel(name = "用户名", width = 15)
|
||||
@ApiModelProperty(value = "用户名")
|
||||
private java.lang.String username;
|
||||
/**授课日期*/
|
||||
@Excel(name = "授课日期", width = 15)
|
||||
@ApiModelProperty(value = "授课日期")
|
||||
private java.lang.String skrq;
|
||||
/**节次*/
|
||||
@Excel(name = "节次", width = 15)
|
||||
@ApiModelProperty(value = "节次")
|
||||
private java.lang.String hh;
|
||||
/**直播平台*/
|
||||
@Excel(name = "直播平台", width = 15)
|
||||
@ApiModelProperty(value = "直播平台")
|
||||
private java.lang.String zbpx;
|
||||
/**链接*/
|
||||
@Excel(name = "链接", width = 15)
|
||||
@ApiModelProperty(value = "链接")
|
||||
private java.lang.String link;
|
||||
/**是否删除*/
|
||||
@Excel(name = "是否删除", width = 15)
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private java.lang.Integer isdeleted;
|
||||
/**预约时间*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "预约时间")
|
||||
private java.util.Date createTime;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**任务编号*/
|
||||
@Excel(name = "任务编号", width = 15)
|
||||
@ApiModelProperty(value = "任务编号")
|
||||
private java.lang.String rwbh;
|
||||
/**学期学年*/
|
||||
@Excel(name = "学期学年", width = 15)
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
private java.lang.String xqxn;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcYuyue.entity.KcYuyue;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 预约
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcYuyueMapper extends BaseMapper<KcYuyue> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.kcYuyue.mapper.KcYuyueMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,15 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcYuyue.entity.KcYuyue;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 预约
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcYuyueService extends IService<KcYuyue> {
|
||||
|
||||
void addNew(KcYuyue kcYuyue);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcYuyue.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.demo.kcYuyue.entity.KcYuyue;
|
||||
import org.jeecg.modules.demo.kcYuyue.mapper.KcYuyueMapper;
|
||||
import org.jeecg.modules.demo.kcYuyue.service.IKcYuyueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 预约
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class KcYuyueServiceImpl extends ServiceImpl<KcYuyueMapper, KcYuyue> implements IKcYuyueService {
|
||||
|
||||
@Override
|
||||
public void addNew(KcYuyue kcYuyue) {
|
||||
baseMapper.insert(kcYuyue);
|
||||
}
|
||||
}
|
|
@ -1,178 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.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.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.service.IKcZhihuijiaoshiService;
|
||||
|
||||
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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="智慧教师")
|
||||
@RestController
|
||||
@RequestMapping("/kcZhihuijiaoshi/kcZhihuijiaoshi")
|
||||
@Slf4j
|
||||
public class KcZhihuijiaoshiController extends JeecgController<KcZhihuijiaoshi, IKcZhihuijiaoshiService> {
|
||||
@Autowired
|
||||
private IKcZhihuijiaoshiService kcZhihuijiaoshiService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param kcZhihuijiaoshi
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "智慧教师-分页列表查询")
|
||||
@ApiOperation(value="智慧教师-分页列表查询", notes="智慧教师-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<KcZhihuijiaoshi>> queryPageList(KcZhihuijiaoshi kcZhihuijiaoshi,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<KcZhihuijiaoshi> queryWrapper = QueryGenerator.initQueryWrapper(kcZhihuijiaoshi, req.getParameterMap());
|
||||
Page<KcZhihuijiaoshi> page = new Page<KcZhihuijiaoshi>(pageNo, pageSize);
|
||||
IPage<KcZhihuijiaoshi> pageList = kcZhihuijiaoshiService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param kcZhihuijiaoshi
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-添加")
|
||||
@ApiOperation(value="智慧教师-添加", notes="智慧教师-添加")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody KcZhihuijiaoshi kcZhihuijiaoshi) {
|
||||
kcZhihuijiaoshiService.save(kcZhihuijiaoshi);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param kcZhihuijiaoshi
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-编辑")
|
||||
@ApiOperation(value="智慧教师-编辑", notes="智慧教师-编辑")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody KcZhihuijiaoshi kcZhihuijiaoshi) {
|
||||
kcZhihuijiaoshiService.updateById(kcZhihuijiaoshi);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-通过id删除")
|
||||
@ApiOperation(value="智慧教师-通过id删除", notes="智慧教师-通过id删除")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
kcZhihuijiaoshiService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "智慧教师-批量删除")
|
||||
@ApiOperation(value="智慧教师-批量删除", notes="智慧教师-批量删除")
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.kcZhihuijiaoshiService.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<KcZhihuijiaoshi> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
KcZhihuijiaoshi kcZhihuijiaoshi = kcZhihuijiaoshiService.getById(id);
|
||||
if(kcZhihuijiaoshi==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(kcZhihuijiaoshi);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param kcZhihuijiaoshi
|
||||
*/
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, KcZhihuijiaoshi kcZhihuijiaoshi) {
|
||||
return super.exportXls(request, kcZhihuijiaoshi, KcZhihuijiaoshi.class, "智慧教师");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("kcZhihuijiaoshi:kc_zhihuijiaoshi:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, KcZhihuijiaoshi.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,119 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.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-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("kc_zhihuijiaoshi")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="kc_zhihuijiaoshi对象", description="智慧教师")
|
||||
public class KcZhihuijiaoshi implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.Integer id;
|
||||
/**创建人登录名称*/
|
||||
@ApiModelProperty(value = "创建人登录名称")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人登录名称*/
|
||||
@ApiModelProperty(value = "更新人登录名称")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**校区*/
|
||||
@Excel(name = "校区", width = 15)
|
||||
@ApiModelProperty(value = "校区")
|
||||
private java.lang.String xq;
|
||||
/**教学楼ID*/
|
||||
@Excel(name = "教学楼ID", width = 15)
|
||||
@ApiModelProperty(value = "教学楼ID")
|
||||
private java.lang.String jxlId;
|
||||
/**教学楼名称*/
|
||||
@Excel(name = "教学楼名称", width = 15)
|
||||
@ApiModelProperty(value = "教学楼名称")
|
||||
private java.lang.String jxlName;
|
||||
/**教室编号*/
|
||||
@Excel(name = "教室编号", width = 15)
|
||||
@ApiModelProperty(value = "教室编号")
|
||||
private java.lang.String jsbh;
|
||||
/**教室名称*/
|
||||
@Excel(name = "教室名称", width = 15)
|
||||
@ApiModelProperty(value = "教室名称")
|
||||
private java.lang.String jsmc;
|
||||
/**项目*/
|
||||
@Excel(name = "项目", width = 15)
|
||||
@ApiModelProperty(value = "项目")
|
||||
private java.lang.String xm;
|
||||
/**新ip*/
|
||||
@Excel(name = "新ip", width = 15)
|
||||
@ApiModelProperty(value = "新ip")
|
||||
private java.lang.String ip;
|
||||
/**播放地址(http)*/
|
||||
@Excel(name = "播放地址(http)", width = 15)
|
||||
@ApiModelProperty(value = "播放地址(http)")
|
||||
private java.lang.String pullUrl;
|
||||
/**推流地址(rtmp)*/
|
||||
@Excel(name = "推流地址(rtmp)", width = 15)
|
||||
@ApiModelProperty(value = "推流地址(rtmp)")
|
||||
private java.lang.String pushUrl;
|
||||
/**账号*/
|
||||
@Excel(name = "账号", width = 15)
|
||||
@ApiModelProperty(value = "账号")
|
||||
private java.lang.String user;
|
||||
/**密码*/
|
||||
@Excel(name = "密码", width = 15)
|
||||
@ApiModelProperty(value = "密码")
|
||||
private java.lang.String mima;
|
||||
/**厂商名称*/
|
||||
@Excel(name = "厂商名称", width = 15)
|
||||
@ApiModelProperty(value = "厂商名称")
|
||||
private java.lang.String changshang;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String bz;
|
||||
/**是否有效 0-有效 1-无效*/
|
||||
@Excel(name = "是否有效 0-有效 1-无效", width = 15)
|
||||
@ApiModelProperty(value = "是否有效 0-有效 1-无效")
|
||||
private java.lang.String sfyx;
|
||||
/**sort*/
|
||||
@Excel(name = "sort", width = 15)
|
||||
@ApiModelProperty(value = "sort")
|
||||
private java.lang.Integer sort;
|
||||
/**开放听课后台统计状态*/
|
||||
@Excel(name = "开放听课后台统计状态", width = 15)
|
||||
@ApiModelProperty(value = "开放听课后台统计状态")
|
||||
private java.lang.String tjKftkzt;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 智慧教师
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface KcZhihuijiaoshiMapper extends BaseMapper<KcZhihuijiaoshi> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.kcZhihuijiaoshi.mapper.KcZhihuijiaoshiMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,14 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.service;
|
||||
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 智慧教师
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IKcZhihuijiaoshiService extends IService<KcZhihuijiaoshi> {
|
||||
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package org.jeecg.modules.demo.kcZhihuijiaoshi.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.entity.KcZhihuijiaoshi;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.mapper.KcZhihuijiaoshiMapper;
|
||||
import org.jeecg.modules.demo.kcZhihuijiaoshi.service.IKcZhihuijiaoshiService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 智慧教师
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-02
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
@DS("multi-datasource1")
|
||||
public class KcZhihuijiaoshiServiceImpl extends ServiceImpl<KcZhihuijiaoshiMapper, KcZhihuijiaoshi> implements IKcZhihuijiaoshiService {
|
||||
|
||||
}
|
|
@ -1,591 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.controller;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
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.oConvertUtils;
|
||||
import org.jeecg.config.JeecgBaseConfig;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhcl;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclCj;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclXq;
|
||||
import org.jeecg.modules.demo.lwKhcl.service.ILwKhclService;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz;
|
||||
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
|
||||
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.params.ExcelExportEntity;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecgframework.poi.util.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="lw_khcl")
|
||||
@RestController
|
||||
@RequestMapping("/lwKhcl/lwKhcl")
|
||||
@Slf4j
|
||||
public class LwKhclController extends JeecgController<LwKhcl, ILwKhclService> {
|
||||
@Autowired
|
||||
private ILwKhclService lwKhclService;
|
||||
@Resource
|
||||
private JeecgBaseConfig jeecgBaseConfig;
|
||||
@Autowired
|
||||
private IZjSqxxService zjSqxxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lwKhcl
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "lw_khcl-分页列表查询")
|
||||
@ApiOperation(value="lw_khcl-分页列表查询", notes="lw_khcl-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<LwKhcl>> queryPageList(LwKhcl lwKhcl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inBylwLb = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKclb())){
|
||||
inBylwLb = zjSqxx.getKclb();
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return Result.error("您未在授权期限内,不能进行查询!");
|
||||
}
|
||||
String bynf = req.getParameter("bynf");
|
||||
String ssyxmc = req.getParameter("ssyxmc");
|
||||
String ssxnzymc = req.getParameter("ssxnzymc");
|
||||
Page<LwKhcl> page = new Page<LwKhcl>(pageNo, pageSize);
|
||||
IPage<LwKhcl> pageList = lwKhclService.getPage(page, bynf, ssyxmc, ssxnzymc, inBynf, inSsyxmc, inBylwLb);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/listAll")
|
||||
public Result<IPage<LwKhcl>> listAll(LwKhcl lwKhcl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
|
||||
String ktbg = lwKhcl.getKtbg();
|
||||
String zqjc = lwKhcl.getZqjc();
|
||||
String lwzg = lwKhcl.getLwzg();
|
||||
String lwcj = lwKhcl.getBylwCjPar();
|
||||
lwKhcl.setKtbg(null);
|
||||
lwKhcl.setZqjc(null);
|
||||
lwKhcl.setLwzg(null);
|
||||
|
||||
|
||||
QueryWrapper<LwKhcl> queryWrapper = QueryGenerator.initQueryWrapper(lwKhcl, req.getParameterMap());
|
||||
if(StringUtils.isNotBlank(ktbg)){
|
||||
if(StringUtils.equals(ktbg,"1")){
|
||||
queryWrapper.isNotNull("ktbg");
|
||||
}else{
|
||||
queryWrapper.isNull("ktbg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(zqjc)){
|
||||
if(StringUtils.equals(zqjc,"1")){
|
||||
queryWrapper.isNotNull("zqjc");
|
||||
}else{
|
||||
queryWrapper.isNull("zqjc");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwzg)){
|
||||
if(StringUtils.equals(lwzg,"1")){
|
||||
queryWrapper.isNotNull("lwzg");
|
||||
}else{
|
||||
queryWrapper.isNull("lwzg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwcj)){
|
||||
try {
|
||||
if(StringUtils.equals(lwcj,"1")){
|
||||
queryWrapper.ge("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"2")){
|
||||
queryWrapper.ge("bylw_cj",80);
|
||||
queryWrapper.lt("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"3")){
|
||||
queryWrapper.ge("bylw_cj",70);
|
||||
queryWrapper.lt("bylw_cj",80);
|
||||
}else if(StringUtils.equals(lwcj,"4")){
|
||||
queryWrapper.ge("bylw_cj",60);
|
||||
queryWrapper.lt("bylw_cj",70);
|
||||
}else if(StringUtils.equals(lwcj,"5")){
|
||||
queryWrapper.lt("bylw_cj",60);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
Page<LwKhcl> page = new Page<LwKhcl>(pageNo, pageSize);
|
||||
IPage<LwKhcl> pageList = lwKhclService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
* @param request
|
||||
* @param lwKhcl
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LwKhcl lwKhcl) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inBylwLb = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKclb())){
|
||||
inBylwLb = zjSqxx.getKclb();
|
||||
}
|
||||
}
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return mv;
|
||||
}
|
||||
String bynf = request.getParameter("bynf");
|
||||
String ssyxmc = request.getParameter("ssyxmc");
|
||||
String ssxnzymc = request.getParameter("ssxnzymc");
|
||||
List<LwKhcl> exportList = lwKhclService.getList(bynf, ssyxmc, ssxnzymc, inBynf, inSsyxmc, inBylwLb);
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "论文考核材料列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, LwKhcl.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams("论文考核材料", "导出人:" + sysUser.getRealname(), "sheet1");
|
||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/expor2tXls")
|
||||
public ModelAndView expor2tXls(HttpServletRequest request, LwKhcl lwKhcl) {
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String ktbg = lwKhcl.getKtbg();
|
||||
String zqjc = lwKhcl.getZqjc();
|
||||
String lwzg = lwKhcl.getLwzg();
|
||||
String lwcj = lwKhcl.getBylwCjPar();
|
||||
lwKhcl.setKtbg(null);
|
||||
lwKhcl.setZqjc(null);
|
||||
lwKhcl.setLwzg(null);
|
||||
|
||||
|
||||
QueryWrapper<LwKhcl> queryWrapper = QueryGenerator.initQueryWrapper(lwKhcl, request.getParameterMap());
|
||||
if(StringUtils.isNotBlank(ktbg)){
|
||||
if(StringUtils.equals(ktbg,"1")){
|
||||
queryWrapper.isNotNull("ktbg");
|
||||
}else{
|
||||
queryWrapper.isNull("ktbg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(zqjc)){
|
||||
if(StringUtils.equals(zqjc,"1")){
|
||||
queryWrapper.isNotNull("zqjc");
|
||||
}else{
|
||||
queryWrapper.isNull("zqjc");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwzg)){
|
||||
if(StringUtils.equals(lwzg,"1")){
|
||||
queryWrapper.isNotNull("lwzg");
|
||||
}else{
|
||||
queryWrapper.isNull("lwzg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwcj)){
|
||||
try {
|
||||
if(StringUtils.equals(lwcj,"1")){
|
||||
queryWrapper.ge("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"2")){
|
||||
queryWrapper.ge("bylw_cj",80);
|
||||
queryWrapper.lt("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"3")){
|
||||
queryWrapper.ge("bylw_cj",70);
|
||||
queryWrapper.lt("bylw_cj",80);
|
||||
}else if(StringUtils.equals(lwcj,"4")){
|
||||
queryWrapper.ge("bylw_cj",60);
|
||||
queryWrapper.lt("bylw_cj",70);
|
||||
}else if(StringUtils.equals(lwcj,"5")){
|
||||
queryWrapper.lt("bylw_cj",60);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
List<LwKhcl> exportList = lwKhclService.list(queryWrapper);
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "论文考核材料列表");
|
||||
mv.addObject(NormalExcelConstants.CLASS, LwKhcl.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams("论文考核材料", "导出人:" + sysUser.getRealname(), "sheet1");
|
||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lwKhclCj
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "lw_khcl-分页列表查询")
|
||||
@ApiOperation(value="lw_khcl-分页列表查询", notes="lw_khcl-分页列表查询")
|
||||
@GetMapping(value = "/cjList")
|
||||
public Result<IPage<LwKhclCj>> queryCjPageList(LwKhclCj lwKhclCj,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inBylwLb = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKclb())){
|
||||
inBylwLb = zjSqxx.getKclb();
|
||||
}
|
||||
}
|
||||
String bynf = req.getParameter("bynf");
|
||||
String ssyxmc = req.getParameter("ssyxmc");
|
||||
String ssxnzymc = req.getParameter("ssxnzymc");
|
||||
String xsxm = req.getParameter("xsxm");
|
||||
String zdjsxm = req.getParameter("zdjsxm");
|
||||
String bylwTm = req.getParameter("bylwTm");
|
||||
Page<LwKhclCj> page = new Page<LwKhclCj>(pageNo, pageSize);
|
||||
IPage<LwKhclCj> pageList = lwKhclService.getCjPage(page, bynf, ssyxmc, ssxnzymc, xsxm, zdjsxm, bylwTm, inBynf, inSsyxmc, inBylwLb);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
* @param request
|
||||
* @param lwKhclCj
|
||||
*/
|
||||
@RequestMapping(value = "/cjExportXls")
|
||||
public ModelAndView cjExportXls(HttpServletRequest request, LwKhclCj lwKhclCj) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inBylwLb = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKclb())){
|
||||
inBylwLb = zjSqxx.getKclb();
|
||||
}
|
||||
}
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return mv;
|
||||
}
|
||||
String bynf = request.getParameter("bynf");
|
||||
String ssyxmc = request.getParameter("ssyxmc");
|
||||
String ssxnzymc = request.getParameter("ssxnzymc");
|
||||
String xsxm = request.getParameter("xsxm");
|
||||
String zdjsxm = request.getParameter("zdjsxm");
|
||||
String bylwTm = request.getParameter("bylwTm");
|
||||
List<LwKhclCj> exportList = lwKhclService.getCjList(bynf, ssyxmc, ssxnzymc, xsxm, zdjsxm, bylwTm, inBynf, inSsyxmc, inBylwLb);
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "论文考核材料成绩");
|
||||
mv.addObject(NormalExcelConstants.CLASS, LwKhclCj.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams("论文考核材料成绩", "导出人:" + sysUser.getRealname(), "sheet1");
|
||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lwKhclXq
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "lw_khcl-分页列表查询")
|
||||
@ApiOperation(value="lw_khcl-分页列表查询", notes="lw_khcl-分页列表查询")
|
||||
@GetMapping(value = "/xqList")
|
||||
public Result<IPage<LwKhclXq>> queryXqPageList(LwKhclXq lwKhclXq,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inBylwLb = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKclb())){
|
||||
inBylwLb = zjSqxx.getKclb();
|
||||
}
|
||||
}
|
||||
String xsxh = req.getParameter("xsxh");
|
||||
String xsxm = req.getParameter("xsxm");
|
||||
String ssxnzymc = req.getParameter("ssxnzymc");
|
||||
String ktbg = req.getParameter("ktbg");
|
||||
String zqjc = req.getParameter("zqjc");
|
||||
String lwzg = req.getParameter("lwzg");
|
||||
Page<LwKhclXq> page = new Page<LwKhclXq>(pageNo, pageSize);
|
||||
IPage<LwKhclXq> pageList = lwKhclService.getXqPage(page, xsxh,xsxm,ssxnzymc,ktbg,zqjc,lwzg, inBynf, inSsyxmc, inBylwLb);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
* @param request
|
||||
* @param lwKhclXq
|
||||
*/
|
||||
@RequestMapping(value = "/xqExportXls")
|
||||
public ModelAndView xqExportXls(HttpServletRequest request, LwKhclXq lwKhclXq) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inBylwLb = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKclb())){
|
||||
inBylwLb = zjSqxx.getKclb();
|
||||
}
|
||||
}
|
||||
// Step.3 AutoPoi 导出Excel
|
||||
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return mv;
|
||||
}
|
||||
String xsxh = request.getParameter("xsxh");
|
||||
String xsxm = request.getParameter("xsxm");
|
||||
String ssxnzymc = request.getParameter("ssxnzymc");
|
||||
String ktbg = request.getParameter("ktbg");
|
||||
String zqjc = request.getParameter("zqjc");
|
||||
String lwzg = request.getParameter("lwzg");
|
||||
List<LwKhclXq> exportList = lwKhclService.getXqList(xsxh,xsxm,ssxnzymc,ktbg,zqjc,lwzg, inBynf, inSsyxmc, inBylwLb);
|
||||
//此处设置的filename无效 ,前端会重更新设置一下
|
||||
mv.addObject(NormalExcelConstants.FILE_NAME, "论文考核材料成绩");
|
||||
mv.addObject(NormalExcelConstants.CLASS, LwKhclXq.class);
|
||||
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
|
||||
ExportParams exportParams=new ExportParams("论文考核材料成绩", "导出人:" + sysUser.getRealname(), "sheet1");
|
||||
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
|
||||
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
|
||||
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
|
||||
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
|
||||
return mv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="lw_khcl-分页列表查询", notes="lw_khcl-分页列表查询")
|
||||
@GetMapping(value = "/getXkList")
|
||||
public Result<IPage<LwKhcl>> getXkList(LwKhcl lwKhcl,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
|
||||
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
|
||||
zjSqxxQueryWrapper.eq("sqfw","2");
|
||||
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
|
||||
String sfjx = "0";
|
||||
String inBynf = "";
|
||||
String inSsyxmc = "";
|
||||
String inZydl = "";
|
||||
if(zjSqxx!=null){
|
||||
Date date = new Date();
|
||||
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
|
||||
sfjx = "1";
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
|
||||
inBynf = zjSqxx.getXnxq();
|
||||
lwKhcl.setInBynf(inBynf);
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
|
||||
inSsyxmc = zjSqxx.getKkdw();
|
||||
lwKhcl.setInSsyxmc(inSsyxmc);
|
||||
}
|
||||
if(StringUtils.isNotBlank(zjSqxx.getZydl())){
|
||||
inZydl = zjSqxx.getZydl();
|
||||
lwKhcl.setInZydl(inZydl);
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals("1",sfjx)){
|
||||
return Result.error("您未在授权期限内,不能进行查询!");
|
||||
}
|
||||
|
||||
|
||||
lwKhcl.setCreateBy(sysUser.getUsername());
|
||||
Page<LwKhcl> page = new Page<LwKhcl>(pageNo, pageSize);
|
||||
IPage<LwKhcl> pageList = lwKhclService.getXkList(page, lwKhcl);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,139 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lw_khcl")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="lw_khcl对象", description="lw_khcl")
|
||||
public class LwKhcl implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
|
||||
|
||||
@Excel(name = "院系名称", width = 25)
|
||||
@ApiModelProperty(value = "院系名称")
|
||||
private String ssyxmc;
|
||||
|
||||
@Excel(name = "校内专业", width = 35)
|
||||
@ApiModelProperty(value = "校内专业")
|
||||
private String ssxnzymc;
|
||||
|
||||
@Excel(name = "学生学号", width = 35)
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private String xsxh;
|
||||
|
||||
@Excel(name = "学生姓名", width = 35)
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private String xsxm;
|
||||
|
||||
@Excel(name = "论文题目", width = 35)
|
||||
@ApiModelProperty(value = "论文题目")
|
||||
private String bylwTm;
|
||||
|
||||
@Excel(name = "指导教师姓名", width = 35)
|
||||
@ApiModelProperty(value = "指导教师姓名")
|
||||
private String zdjsxm;
|
||||
|
||||
@Excel(name = "职称", width = 35)
|
||||
@ApiModelProperty(value = "职称")
|
||||
private String zdjszc;
|
||||
|
||||
@Excel(name = "毕业年份", width = 15)
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private String bynf;
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "班级")
|
||||
private String bj;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "毕业论文(设计)类别")
|
||||
private String bylwLb;
|
||||
|
||||
@ApiModelProperty(value = "毕业论文(设计)成绩")
|
||||
private String bylwCj;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "是否实现电子化管理")
|
||||
private String sfsxdzhgl;
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String gjc;
|
||||
|
||||
@ApiModelProperty(value = "查重结果")
|
||||
private String ccjg;
|
||||
|
||||
@ApiModelProperty(value = "开题报告")
|
||||
private String ktbg;
|
||||
|
||||
@ApiModelProperty(value = "开题报告审核意见")
|
||||
private String ktbgshyj;
|
||||
|
||||
@ApiModelProperty(value = "中期检查")
|
||||
private String zqjc;
|
||||
|
||||
@ApiModelProperty(value = "论文终稿")
|
||||
private String lwzg;
|
||||
|
||||
@ApiModelProperty(value = "论文终稿Pdf")
|
||||
private String lwzgPdf;
|
||||
|
||||
@ApiModelProperty(value = "检测报告等材料")
|
||||
private String jcbgdcl;
|
||||
|
||||
@ApiModelProperty(value = "入库日期")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "终稿查重相似率")
|
||||
private String ccjgxsl;
|
||||
@ApiModelProperty(value = "终稿下载路径")
|
||||
private String ccjgdown;
|
||||
@ApiModelProperty(value = "知道记录单")
|
||||
private String zdjld;
|
||||
|
||||
/**答辩记录单*/
|
||||
@ApiModelProperty(value = "答辩记录单")
|
||||
private java.lang.String dbjld;
|
||||
private String zfx;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String sfxk;
|
||||
@TableField(exist = false)
|
||||
private String createBy;
|
||||
@TableField(exist = false)
|
||||
private String inBynf;
|
||||
@TableField(exist = false)
|
||||
private String inSsyxmc;
|
||||
@TableField(exist = false)
|
||||
private String bylwCjPar;
|
||||
@TableField(exist = false)
|
||||
private String inZydl;
|
||||
|
||||
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lw_khcl")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="lw_khcl对象", description="lw_khcl")
|
||||
public class LwKhclCj implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
/**学生学号*/
|
||||
@Excel(name = "学生学号", width = 15)
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private String xsxh;
|
||||
/**学生姓名*/
|
||||
@Excel(name = "学生姓名", width = 15)
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private String xsxm;
|
||||
/**毕业年份*/
|
||||
@Excel(name = "毕业年份", width = 15)
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private String bynf;
|
||||
/**班级*/
|
||||
@Excel(name = "班级", width = 15)
|
||||
@ApiModelProperty(value = "班级")
|
||||
private String bj;
|
||||
/**毕业论文(设计)题目*/
|
||||
@Excel(name = "毕业论文(设计)题目", width = 30)
|
||||
@ApiModelProperty(value = "毕业论文(设计)题目")
|
||||
private String bylwTm;
|
||||
/**毕业论文(设计)类别*/
|
||||
@Excel(name = "毕业论文(设计)类别", width = 30)
|
||||
@ApiModelProperty(value = "毕业论文(设计)类别")
|
||||
private String bylwLb;
|
||||
/**毕业论文(设计)成绩*/
|
||||
@Excel(name = "毕业论文(设计)成绩", width = 15)
|
||||
@ApiModelProperty(value = "毕业论文(设计)成绩")
|
||||
private String bylwCj;
|
||||
/**指导教师姓名*/
|
||||
@Excel(name = "指导教师姓名", width = 15)
|
||||
@ApiModelProperty(value = "指导教师姓名")
|
||||
private String zdjsxm;
|
||||
/**指导教师职称*/
|
||||
@Excel(name = "指导教师职称", width = 15)
|
||||
@ApiModelProperty(value = "指导教师职称")
|
||||
private String zdjszc;
|
||||
/**所属院系名称*/
|
||||
@Excel(name = "所属院系名称", width = 20)
|
||||
@ApiModelProperty(value = "所属院系名称")
|
||||
private String ssyxmc;
|
||||
/**所属校内专业(大类)名称*/
|
||||
@Excel(name = "所属校内专业(大类)名称", width = 20)
|
||||
@ApiModelProperty(value = "所属校内专业(大类)名称")
|
||||
private String ssxnzymc;
|
||||
/**是否实现电子化管理*/
|
||||
@Excel(name = "是否实现电子化管理", width = 15)
|
||||
@ApiModelProperty(value = "是否实现电子化管理")
|
||||
private String sfsxdzhgl;
|
||||
/**关键词*/
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String gjc;
|
||||
/**查重结果*/
|
||||
@ApiModelProperty(value = "查重结果")
|
||||
private String ccjg;
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 论文考核原始视图-附件信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("v_file_up_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="v_file_up_info对象", description="v_file_up_info")
|
||||
public class LwKhclFileInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private String xsxh;
|
||||
|
||||
@ApiModelProperty(value = "文件类型")
|
||||
private String fileType;
|
||||
|
||||
@ApiModelProperty(value = "上传日期")
|
||||
private String uploadDateTime;
|
||||
|
||||
@ApiModelProperty(value = "文件路径")
|
||||
private String filePath;
|
||||
|
||||
@ApiModelProperty(value = "文件名称")
|
||||
private String fileName;
|
||||
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 论文考核原始视图-学生信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("v_student_info")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="v_student_info对象", description="v_student_info")
|
||||
public class LwKhclStudentInfo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private String xsxh;
|
||||
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private String xsxm;
|
||||
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private String bynf;
|
||||
|
||||
@ApiModelProperty(value = "班级")
|
||||
private String bj;
|
||||
|
||||
@ApiModelProperty(value = "毕业论文(设计)题目")
|
||||
private String bylwTm;
|
||||
|
||||
@ApiModelProperty(value = "毕业论文(设计)类别")
|
||||
private String bylwLb;
|
||||
|
||||
@ApiModelProperty(value = "毕业论文(设计)成绩")
|
||||
private String bylwCj;
|
||||
|
||||
@ApiModelProperty(value = "指导教师姓名")
|
||||
private String zdjsxm;
|
||||
|
||||
@ApiModelProperty(value = "指导教师职称")
|
||||
private String zdjszc;
|
||||
|
||||
@ApiModelProperty(value = "所属院系名称")
|
||||
private String ssyxmc;
|
||||
|
||||
@ApiModelProperty(value = "所属校内专业(大类)名称")
|
||||
private String ssxnzymc;
|
||||
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private String gjc;
|
||||
|
||||
@ApiModelProperty(value = "查重结果")
|
||||
private String ccjg;
|
||||
|
||||
@ApiModelProperty(value = "入库日期")
|
||||
private String createTime;
|
||||
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lw_khcl")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="lw_khcl对象", description="lw_khcl")
|
||||
public class LwKhclXq implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private String id;
|
||||
/**学生学号*/
|
||||
@Excel(name = "学生学号", width = 15)
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private String xsxh;
|
||||
/**学生姓名*/
|
||||
@Excel(name = "学生姓名", width = 15)
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private String xsxm;
|
||||
/**毕业年份*/
|
||||
@Excel(name = "毕业年份", width = 15)
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private String bynf;
|
||||
/**班级*/
|
||||
@Excel(name = "班级", width = 15)
|
||||
@ApiModelProperty(value = "班级")
|
||||
private String bj;
|
||||
/**毕业论文(设计)题目*/
|
||||
@Excel(name = "毕业论文(设计)题目", width = 30)
|
||||
@ApiModelProperty(value = "毕业论文(设计)题目")
|
||||
private String bylwTm;
|
||||
/**毕业论文(设计)类别*/
|
||||
@Excel(name = "毕业论文(设计)类别", width = 30)
|
||||
@ApiModelProperty(value = "毕业论文(设计)类别")
|
||||
private String bylwLb;
|
||||
// @Excel(name = "开题报告", width = 30)
|
||||
@ApiModelProperty(value = "开题报告")
|
||||
private String ktbg;
|
||||
/**开题报告审核意见*/
|
||||
// @Excel(name = "开题报告审核意见", width = 30)
|
||||
@ApiModelProperty(value = "开题报告审核意见")
|
||||
private String ktbgshyj;
|
||||
/**中期检查*/
|
||||
// @Excel(name = "中期检查", width = 30)
|
||||
@ApiModelProperty(value = "中期检查")
|
||||
private String zqjc;
|
||||
/**论文终稿*/
|
||||
// @Excel(name = "论文终稿", width = 30)
|
||||
@ApiModelProperty(value = "论文终稿")
|
||||
private String lwzg;
|
||||
// @Excel(name = "论文终稿Pdf", width = 30)
|
||||
@ApiModelProperty(value = "论文终稿Pdf")
|
||||
private String lwzgPdf;
|
||||
/**检测报告等材料*/
|
||||
// @Excel(name = "检测报告等材料", width = 30)
|
||||
@ApiModelProperty(value = "检测报告等材料")
|
||||
private String jcbgdcl;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclFileInfo;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LwKhclFileInfoMapper extends BaseMapper<LwKhclFileInfo> {
|
||||
List<LwKhclFileInfo> getList(@Param("createTime")String createTime,@Param("xsxh")String xsxh);
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhcl;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclCj;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclXq;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LwKhclMapper extends BaseMapper<LwKhcl> {
|
||||
List<LwKhcl> getPage(Page<LwKhcl> page,
|
||||
@Param("bynf")String bynf,
|
||||
@Param("ssyxmc")String ssyxmc,
|
||||
@Param("ssxnzymc")String ssxnzymc,
|
||||
@Param("inBynf")String inBynf,
|
||||
@Param("inSsyxmc")String inSsyxmc,
|
||||
@Param("inBylwLb")String inBylwLb);
|
||||
|
||||
List<LwKhclCj> getCjPage(Page<LwKhclCj> page,
|
||||
@Param("bynf")String bynf,
|
||||
@Param("ssyxmc")String ssyxmc,
|
||||
@Param("ssxnzymc")String ssxnzymc,
|
||||
@Param("xsxm")String xsxm,
|
||||
@Param("zdjsxm")String zdjsxm,
|
||||
@Param("bylwTm")String bylwTm,
|
||||
@Param("inBynf")String inBynf,
|
||||
@Param("inSsyxmc")String inSsyxmc,
|
||||
@Param("inBylwLb")String inBylwLb);
|
||||
|
||||
List<LwKhclXq> getXqPage(Page<LwKhclXq> page,
|
||||
@Param("xsxh")String xsxh,
|
||||
@Param("xsxm")String xsxm,
|
||||
@Param("ssxnzymc")String ssxnzymc,
|
||||
@Param("ktbg")String ktbg,
|
||||
@Param("zqjc")String zqjc,
|
||||
@Param("lwzg")String lwzg,
|
||||
@Param("inBynf")String inBynf,
|
||||
@Param("inSsyxmc")String inSsyxmc,
|
||||
@Param("inBylwLb")String inBylwLb);
|
||||
|
||||
IPage<LwKhcl> getXkList(Page<LwKhcl> page, @Param("lwKhcl") LwKhcl lwKhcl);
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclFileInfo;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclStudentInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LwKhclStudentInfoMapper extends BaseMapper<LwKhclStudentInfo> {
|
||||
List<LwKhclStudentInfo> getList(@Param("createTime")String createTime);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<?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.demo.lwKhcl.mapper.LwKhclFileInfoMapper">
|
||||
|
||||
<select id="getList" parameterType="String" resultType="org.jeecg.modules.demo.lwKhcl.entity.LwKhclFileInfo">
|
||||
select *
|
||||
from v_file_up_info
|
||||
where 1=1
|
||||
<if test="createTime!=null and createTime!=''">
|
||||
and DATE_FORMAT(upload_date_time,'%Y-%m-%d %H:%i:%s') > DATE_FORMAT(#{createTime},'%Y-%m-%d %H:%i:%s')
|
||||
</if>
|
||||
<if test="xsxh!=null and xsxh!=''">
|
||||
and xsxh = #{xsxh}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,220 +0,0 @@
|
|||
<?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.demo.lwKhcl.mapper.LwKhclMapper">
|
||||
|
||||
<select id="getPage" parameterType="String" resultType="org.jeecg.modules.demo.lwKhcl.entity.LwKhcl">
|
||||
select bynf,ssyxmc,ssxnzymc
|
||||
from lw_khcl
|
||||
where 1=1
|
||||
<if test="bynf!=null and bynf!=''">
|
||||
and bynf = #{bynf}
|
||||
</if>
|
||||
<if test="ssyxmc!=null and ssyxmc!=''">
|
||||
<bind name="bindssyxmc" value="'%'+ssyxmc+'%'"/>
|
||||
and ssyxmc like #{bindssyxmc}
|
||||
</if>
|
||||
<if test="ssxnzymc!=null and ssxnzymc!=''">
|
||||
<bind name="bindssxnzymc" value="'%'+ssxnzymc+'%'"/>
|
||||
and ssxnzymc like #{bindssxnzymc}
|
||||
</if>
|
||||
<if test="inBynf!=null and inBynf!=''">
|
||||
and bynf in
|
||||
<foreach item="item" index="index" collection="inBynf.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="inSsyxmc!=null and inSsyxmc!=''">
|
||||
and ssyxmc in
|
||||
<foreach item="item" index="index" collection="inSsyxmc.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="inBylwLb!=null and inBylwLb!=''">
|
||||
and bylw_lb in
|
||||
<foreach item="item" index="index" collection="inBylwLb.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
group by bynf,ssyxmc,ssxnzymc
|
||||
order by bynf DESC
|
||||
</select>
|
||||
|
||||
<select id="getCjPage" parameterType="String" resultType="org.jeecg.modules.demo.lwKhcl.entity.LwKhclCj">
|
||||
select *
|
||||
from lw_khcl
|
||||
where bynf = #{bynf}
|
||||
and ssyxmc = #{ssyxmc}
|
||||
and ssxnzymc = #{ssxnzymc}
|
||||
<if test="xsxm!=null and xsxm!=''">
|
||||
<bind name="bindxsxm" value="'%'+xsxm+'%'"/>
|
||||
and xsxm like #{bindxsxm}
|
||||
</if>
|
||||
<if test="zdjsxm!=null and zdjsxm!=''">
|
||||
<bind name="bindzdjsxm" value="'%'+zdjsxm+'%'"/>
|
||||
and zdjsxm like #{bindzdjsxm}
|
||||
</if>
|
||||
<if test="bylwTm!=null and bylwTm!=''">
|
||||
<bind name="bindbylwTm" value="'%'+bylwTm+'%'"/>
|
||||
and bylwTm like #{bindbylwTm}
|
||||
</if>
|
||||
<if test="inBynf!=null and inBynf!=''">
|
||||
and bynf in
|
||||
<foreach item="item" index="index" collection="inBynf.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="inSsyxmc!=null and inSsyxmc!=''">
|
||||
and ssyxmc in
|
||||
<foreach item="item" index="index" collection="inSsyxmc.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="inBylwLb!=null and inBylwLb!=''">
|
||||
and bylw_lb in
|
||||
<foreach item="item" index="index" collection="inBylwLb.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by xsxh
|
||||
</select>
|
||||
|
||||
<select id="getXqPage" parameterType="String" resultType="org.jeecg.modules.demo.lwKhcl.entity.LwKhclXq">
|
||||
select *
|
||||
from lw_khcl
|
||||
where xsxh = #{xsxh}
|
||||
<if test="xsxm!=null and xsxm!=''">
|
||||
<bind name="bindxsxm" value="'%'+xsxm+'%'"/>
|
||||
and xsxm like #{bindxsxm}
|
||||
</if>
|
||||
<if test="ssxnzymc!=null and ssxnzymc!=''">
|
||||
<bind name="bindssxnzymc" value="'%'+ssxnzymc+'%'"/>
|
||||
and ssxnzymc like #{bindssxnzymc}
|
||||
</if>
|
||||
<if test="ktbg!=null and ktbg==1">
|
||||
and ktbg is not null
|
||||
</if>
|
||||
<if test="ktbg!=null and ktbg==0">
|
||||
and ktbg is null
|
||||
</if>
|
||||
<if test="zqjc!=null and zqjc==1">
|
||||
and zqjc is not null
|
||||
</if>
|
||||
<if test="zqjc!=null and zqjc==0">
|
||||
and zqjc is null
|
||||
</if>
|
||||
<if test="lwzg!=null and lwzg==1">
|
||||
and lwzg is not null
|
||||
</if>
|
||||
<if test="lwzg!=null and lwzg==0">
|
||||
and lwzg is null
|
||||
</if>
|
||||
<if test="inBynf!=null and inBynf!=''">
|
||||
and bynf in
|
||||
<foreach item="item" index="index" collection="inBynf.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="inSsyxmc!=null and inSsyxmc!=''">
|
||||
and ssyxmc in
|
||||
<foreach item="item" index="index" collection="inSsyxmc.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="inBylwLb!=null and inBylwLb!=''">
|
||||
and bylw_lb in
|
||||
<foreach item="item" index="index" collection="inBylwLb.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
order by xsxh
|
||||
</select>
|
||||
|
||||
<select id="getXkList" resultType="org.jeecg.modules.demo.lwKhcl.entity.LwKhcl">
|
||||
select a.*,if(b.id is not null ,1,0) as sfxk from lw_khcl a
|
||||
LEFT JOIN lw_khcl_xz b on a.id = b.main_id and b.create_by = #{lwKhcl.createBy}
|
||||
<where>
|
||||
|
||||
|
||||
<if test="lwKhcl.ssyxmc != null and lwKhcl.ssyxmc != ''">
|
||||
and a.ssyxmc like concat('%',#{lwKhcl.ssyxmc},'%')
|
||||
</if>
|
||||
<if test="lwKhcl.ssxnzymc != null and lwKhcl.ssxnzymc != ''">
|
||||
and a.ssxnzymc like concat('%',#{lwKhcl.ssxnzymc},'%')
|
||||
</if>
|
||||
|
||||
<if test="lwKhcl.xsxh != null and lwKhcl.xsxh != ''">
|
||||
and a.xsxh like concat('%',#{lwKhcl.xsxh},'%')
|
||||
</if>
|
||||
<if test="lwKhcl.xsxm != null and lwKhcl.xsxm != ''">
|
||||
and a.xsxm like concat('%',#{lwKhcl.xsxm},'%')
|
||||
</if>
|
||||
<if test="lwKhcl.bylwTm != null and lwKhcl.bylwTm != ''">
|
||||
and a.bylw_tm like concat('%',#{lwKhcl.bylwTm},'%')
|
||||
</if>
|
||||
<if test="lwKhcl.bylwCj != null and lwKhcl.bylwCj != ''">
|
||||
and a.bylw_cj = #{lwKhcl.bylwCj}
|
||||
</if>
|
||||
<if test="lwKhcl.zdjsxm != null and lwKhcl.zdjsxm != ''">
|
||||
and a.zdjsxm like concat('%',#{lwKhcl.zdjsxm},'%')
|
||||
</if>
|
||||
<if test="lwKhcl.zdjszc != null and lwKhcl.zdjszc != ''">
|
||||
and a.zdjszc like concat('%',#{lwKhcl.zdjszc},'%')
|
||||
</if>
|
||||
|
||||
<if test="lwKhcl.inSsyxmc != null and lwKhcl.inSsyxmc != ''">
|
||||
and a.ssyxmc in
|
||||
<foreach item="item" index="index" collection="lwKhcl.inSsyxmc.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="lwKhcl.inBynf != null and lwKhcl.inBynf != ''">
|
||||
and a.bynf in
|
||||
<foreach item="item" index="index" collection="lwKhcl.inBynf.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="lwKhcl.inZydl != null and lwKhcl.inZydl != ''">
|
||||
and a.ssxnzymc in
|
||||
<foreach item="item" index="index" collection="lwKhcl.inZydl.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test='lwKhcl.lwzg != null and lwKhcl.lwzg == 1'>
|
||||
and a.lwzg is not null
|
||||
</if>
|
||||
<if test='lwKhcl.lwzg != null and lwKhcl.lwzg == 0'>
|
||||
and a.lwzg is null
|
||||
</if>
|
||||
<if test='lwKhcl.zqjc != null and lwKhcl.zqjc == 1'>
|
||||
and a.zqjc is not null
|
||||
</if>
|
||||
<if test='lwKhcl.zqjc != null and lwKhcl.zqjc == 0'>
|
||||
and a.zqjc is null
|
||||
</if>
|
||||
<if test='lwKhcl.ktbg != null and lwKhcl.ktbg == 1'>
|
||||
and a.ktbg is not null
|
||||
</if>
|
||||
<if test='lwKhcl.ktbg != null and lwKhcl.ktbg == 0'>
|
||||
and a.ktbg is null
|
||||
</if>
|
||||
|
||||
<if test='lwKhcl.bylwCjPar != null and lwKhcl.bylwCjPar == 1'>
|
||||
and a.bylw_cj >= 90
|
||||
</if>
|
||||
<if test='lwKhcl.bylwCjPar != null and lwKhcl.bylwCjPar == 2'>
|
||||
and a.bylw_cj >= 80 and a.bylw_cj < 90
|
||||
</if>
|
||||
<if test='lwKhcl.bylwCjPar != null and lwKhcl.bylwCjPar == 3'>
|
||||
and a.bylw_cj >= 70 and a.bylw_cj < 80
|
||||
</if>
|
||||
<if test='lwKhcl.bylwCjPar != null and lwKhcl.bylwCjPar == 4'>
|
||||
and a.bylw_cj >= 60 and a.bylw_cj < 70
|
||||
</if>
|
||||
<if test='lwKhcl.bylwCjPar != null and lwKhcl.bylwCjPar == 5'>
|
||||
and a.bylw_cj < 60
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,16 +0,0 @@
|
|||
<?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.demo.lwKhcl.mapper.LwKhclStudentInfoMapper">
|
||||
|
||||
<select id="getList" parameterType="String" resultType="org.jeecg.modules.demo.lwKhcl.entity.LwKhclStudentInfo">
|
||||
select a.*
|
||||
from v_student_info a
|
||||
<if test="createTime!=null and createTime!=''">
|
||||
where a.xsxh in (
|
||||
select distinct xsxh from v_file_up_info b
|
||||
where DATE_FORMAT(b.upload_date_time,'%Y-%m-%d %H:%i:%s') > DATE_FORMAT(#{createTime},'%Y-%m-%d %H:%i:%s')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -1,16 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclFileInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILwKhclFileInfoService extends IService<LwKhclFileInfo> {
|
||||
List<LwKhclFileInfo> getList(String createTime, String xsxh);
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.service;
|
||||
|
||||
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.jeecg.modules.demo.lwKhcl.entity.LwKhcl;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclCj;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclXq;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILwKhclService extends IService<LwKhcl> {
|
||||
Page<LwKhcl> getPage(Page<LwKhcl> page, String bynf, String ssyxmc, String ssxnzymc, String inBynf, String inSsyxmc, String inBylwLb);
|
||||
List<LwKhcl> getList(String bynf, String ssyxmc, String ssxnzymc, String inBynf, String inSsyxmc, String inBylwLb);
|
||||
|
||||
Page<LwKhclCj> getCjPage(Page<LwKhclCj> page, String bynf, String ssyxmc, String ssxnzymc, String xsxm, String zdjsxm, String bylwTm, String inBynf, String inSsyxmc, String inBylwLb);
|
||||
List<LwKhclCj> getCjList(String bynf, String ssyxmc, String ssxnzymc, String xsxm, String zdjsxm, String bylwTm, String inBynf, String inSsyxmc, String inBylwLb);
|
||||
|
||||
Page<LwKhclXq> getXqPage(Page<LwKhclXq> page, String xsxh, String xsxm, String ssxnzymc, String ktbg, String zqjc, String lwzg, String inBynf, String inSsyxmc, String inBylwLb);
|
||||
List<LwKhclXq> getXqList(String xsxh, String xsxm, String ssxnzymc, String ktbg, String zqjc, String lwzg, String inBynf, String inSsyxmc, String inBylwLb);
|
||||
|
||||
IPage<LwKhcl> getXkList(Page<LwKhcl> page, LwKhcl lwKhcl);
|
||||
|
||||
void syncList(List<LwKhcl> impList);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclStudentInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILwKhclStudentInfoService extends IService<LwKhclStudentInfo> {
|
||||
List<LwKhclStudentInfo> getList(String createTime);
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclFileInfo;
|
||||
import org.jeecg.modules.demo.lwKhcl.mapper.LwKhclFileInfoMapper;
|
||||
import org.jeecg.modules.demo.lwKhcl.service.ILwKhclFileInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LwKhclFileInfoServiceImpl extends ServiceImpl<LwKhclFileInfoMapper, LwKhclFileInfo> implements ILwKhclFileInfoService {
|
||||
|
||||
@Override
|
||||
public List<LwKhclFileInfo> getList(String createTime,String xsxh){
|
||||
return baseMapper.getList(createTime,xsxh);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.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.jeecg.modules.demo.lwKhcl.entity.LwKhcl;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclCj;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclXq;
|
||||
import org.jeecg.modules.demo.lwKhcl.mapper.LwKhclMapper;
|
||||
import org.jeecg.modules.demo.lwKhcl.service.ILwKhclService;
|
||||
import org.jeecg.modules.demo.zyHuizong.entity.ZyHuizong;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LwKhclServiceImpl extends ServiceImpl<LwKhclMapper, LwKhcl> implements ILwKhclService {
|
||||
|
||||
@Override
|
||||
public Page<LwKhcl> getPage(Page<LwKhcl> page, String bynf, String ssyxmc, String ssxnzymc, String inBynf, String inSsyxmc, String inBylwLb){
|
||||
return page.setRecords(baseMapper.getPage(page, bynf, ssyxmc, ssxnzymc, inBynf, inSsyxmc, inBylwLb));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LwKhcl> getList(String bynf, String ssyxmc, String ssxnzymc, String inBynf, String inSsyxmc, String inBylwLb){
|
||||
return baseMapper.getPage(null, bynf, ssyxmc, ssxnzymc, inBynf, inSsyxmc, inBylwLb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<LwKhclCj> getCjPage(Page<LwKhclCj> page, String bynf, String ssyxmc, String ssxnzymc, String xsxm, String zdjsxm, String bylwTm, String inBynf, String inSsyxmc, String inBylwLb){
|
||||
return page.setRecords(baseMapper.getCjPage(page, bynf, ssyxmc, ssxnzymc, xsxm, zdjsxm, bylwTm, inBynf, inSsyxmc, inBylwLb));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LwKhclCj> getCjList(String bynf, String ssyxmc, String ssxnzymc, String xsxm, String zdjsxm, String bylwTm, String inBynf, String inSsyxmc, String inBylwLb){
|
||||
return baseMapper.getCjPage(null, bynf, ssyxmc, ssxnzymc, xsxm, zdjsxm, bylwTm, inBynf, inSsyxmc, inBylwLb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<LwKhclXq> getXqPage(Page<LwKhclXq> page, String xsxh, String xsxm, String ssxnzymc, String ktbg, String zqjc, String lwzg, String inBynf, String inSsyxmc, String inBylwLb){
|
||||
return page.setRecords(baseMapper.getXqPage(page, xsxh ,xsxm, ssxnzymc, ktbg, zqjc, lwzg, inBynf, inSsyxmc, inBylwLb));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LwKhclXq> getXqList(String xsxh, String xsxm, String ssxnzymc, String ktbg, String zqjc, String lwzg, String inBynf, String inSsyxmc, String inBylwLb){
|
||||
return baseMapper.getXqPage(null, xsxh ,xsxm, ssxnzymc, ktbg, zqjc, lwzg, inBynf, inSsyxmc, inBylwLb);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<LwKhcl> getXkList(Page<LwKhcl> page, LwKhcl lwKhcl) {
|
||||
return baseMapper.getXkList(page,lwKhcl);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncList(List<LwKhcl> impList) {
|
||||
syncList(impList, true);
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<LwKhcl> entityList, boolean isDelete) {
|
||||
return this.saveBatch(entityList, 1000);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhcl.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhcl;
|
||||
import org.jeecg.modules.demo.lwKhcl.entity.LwKhclStudentInfo;
|
||||
import org.jeecg.modules.demo.lwKhcl.mapper.LwKhclStudentInfoMapper;
|
||||
import org.jeecg.modules.demo.lwKhcl.service.ILwKhclStudentInfoService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-05
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LwKhclStudentInfoServiceImpl extends ServiceImpl<LwKhclStudentInfoMapper, LwKhclStudentInfo> implements ILwKhclStudentInfoService {
|
||||
|
||||
@Override
|
||||
public List<LwKhclStudentInfo> getList(String createTime){
|
||||
return baseMapper.getList(createTime);
|
||||
}
|
||||
}
|
|
@ -1,322 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhclXz.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
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.apache.commons.lang.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.oConvertUtils;
|
||||
import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz;
|
||||
import org.jeecg.modules.demo.lwKhclXz.service.ILwKhclXzService;
|
||||
|
||||
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.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
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: lw_khcl_xz
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-10-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="lw_khcl_xz")
|
||||
@RestController
|
||||
@RequestMapping("/lwKhclXz/lwKhclXz")
|
||||
@Slf4j
|
||||
public class LwKhclXzController extends JeecgController<LwKhclXz, ILwKhclXzService> {
|
||||
@Autowired
|
||||
private ILwKhclXzService lwKhclXzService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param lwKhclXz
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "lw_khcl_xz-分页列表查询")
|
||||
@ApiOperation(value="lw_khcl_xz-分页列表查询", notes="lw_khcl_xz-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<LwKhclXz>> queryPageList(LwKhclXz lwKhclXz,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
String ktbg = lwKhclXz.getKtbg();
|
||||
String zqjc = lwKhclXz.getZqjc();
|
||||
String lwzg = lwKhclXz.getLwzg();
|
||||
String lwcj = lwKhclXz.getBylwCjPar();
|
||||
lwKhclXz.setKtbg(null);
|
||||
lwKhclXz.setZqjc(null);
|
||||
lwKhclXz.setLwzg(null);
|
||||
|
||||
|
||||
QueryWrapper<LwKhclXz> queryWrapper = QueryGenerator.initQueryWrapper(lwKhclXz, req.getParameterMap());
|
||||
//获取当前用户
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
queryWrapper.eq("create_by",sysUser.getUsername());
|
||||
if(StringUtils.isNotBlank(ktbg)){
|
||||
if(StringUtils.equals(ktbg,"1")){
|
||||
queryWrapper.isNotNull("ktbg");
|
||||
}else{
|
||||
queryWrapper.isNull("ktbg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(zqjc)){
|
||||
if(StringUtils.equals(zqjc,"1")){
|
||||
queryWrapper.isNotNull("zqjc");
|
||||
}else{
|
||||
queryWrapper.isNull("zqjc");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwzg)){
|
||||
if(StringUtils.equals(lwzg,"1")){
|
||||
queryWrapper.isNotNull("lwzg");
|
||||
}else{
|
||||
queryWrapper.isNull("lwzg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwcj)){
|
||||
try {
|
||||
if(StringUtils.equals(lwcj,"1")){
|
||||
queryWrapper.ge("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"2")){
|
||||
queryWrapper.ge("bylw_cj",80);
|
||||
queryWrapper.lt("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"3")){
|
||||
queryWrapper.ge("bylw_cj",70);
|
||||
queryWrapper.lt("bylw_cj",80);
|
||||
}else if(StringUtils.equals(lwcj,"4")){
|
||||
queryWrapper.ge("bylw_cj",60);
|
||||
queryWrapper.lt("bylw_cj",70);
|
||||
}else if(StringUtils.equals(lwcj,"5")){
|
||||
queryWrapper.lt("bylw_cj",60);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Page<LwKhclXz> page = new Page<LwKhclXz>(pageNo, pageSize);
|
||||
IPage<LwKhclXz> pageList = lwKhclXzService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(value = "/listAll")
|
||||
public Result<IPage<LwKhclXz>> listAll(LwKhclXz lwKhclXz,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
String ktbg = lwKhclXz.getKtbg();
|
||||
String zqjc = lwKhclXz.getZqjc();
|
||||
String lwzg = lwKhclXz.getLwzg();
|
||||
String lwcj = lwKhclXz.getBylwCjPar();
|
||||
lwKhclXz.setKtbg(null);
|
||||
lwKhclXz.setZqjc(null);
|
||||
lwKhclXz.setLwzg(null);
|
||||
|
||||
|
||||
QueryWrapper<LwKhclXz> queryWrapper = QueryGenerator.initQueryWrapper(lwKhclXz, req.getParameterMap());
|
||||
if(StringUtils.isNotBlank(ktbg)){
|
||||
if(StringUtils.equals(ktbg,"1")){
|
||||
queryWrapper.isNotNull("ktbg");
|
||||
}else{
|
||||
queryWrapper.isNull("ktbg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(zqjc)){
|
||||
if(StringUtils.equals(zqjc,"1")){
|
||||
queryWrapper.isNotNull("zqjc");
|
||||
}else{
|
||||
queryWrapper.isNull("zqjc");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwzg)){
|
||||
if(StringUtils.equals(lwzg,"1")){
|
||||
queryWrapper.isNotNull("lwzg");
|
||||
}else{
|
||||
queryWrapper.isNull("lwzg");
|
||||
}
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(lwcj)){
|
||||
try {
|
||||
if(StringUtils.equals(lwcj,"1")){
|
||||
queryWrapper.ge("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"2")){
|
||||
queryWrapper.ge("bylw_cj",80);
|
||||
queryWrapper.lt("bylw_cj",90);
|
||||
}else if(StringUtils.equals(lwcj,"3")){
|
||||
queryWrapper.ge("bylw_cj",70);
|
||||
queryWrapper.lt("bylw_cj",80);
|
||||
}else if(StringUtils.equals(lwcj,"4")){
|
||||
queryWrapper.ge("bylw_cj",60);
|
||||
queryWrapper.lt("bylw_cj",70);
|
||||
}else if(StringUtils.equals(lwcj,"5")){
|
||||
queryWrapper.lt("bylw_cj",60);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Page<LwKhclXz> page = new Page<LwKhclXz>(pageNo, pageSize);
|
||||
IPage<LwKhclXz> pageList = lwKhclXzService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param lwKhclXz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "lw_khcl_xz-添加")
|
||||
@ApiOperation(value="lw_khcl_xz-添加", notes="lw_khcl_xz-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody LwKhclXz lwKhclXz) {
|
||||
lwKhclXz.setCreateTime(new Date());
|
||||
lwKhclXzService.save(lwKhclXz);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param lwKhclXz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "lw_khcl_xz-编辑")
|
||||
@ApiOperation(value="lw_khcl_xz-编辑", notes="lw_khcl_xz-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody LwKhclXz lwKhclXz) {
|
||||
lwKhclXzService.updateById(lwKhclXz);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "lw_khcl_xz-通过id删除")
|
||||
@ApiOperation(value="lw_khcl_xz-通过id删除", notes="lw_khcl_xz-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
lwKhclXzService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "lw_khcl_xz-批量删除")
|
||||
@ApiOperation(value="lw_khcl_xz-批量删除", notes="lw_khcl_xz-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.lwKhclXzService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "lw_khcl_xz-通过id查询")
|
||||
@ApiOperation(value="lw_khcl_xz-通过id查询", notes="lw_khcl_xz-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<LwKhclXz> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
LwKhclXz lwKhclXz = lwKhclXzService.getById(id);
|
||||
if(lwKhclXz==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(lwKhclXz);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param lwKhclXz
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, LwKhclXz lwKhclXz) {
|
||||
return super.exportXls(request, lwKhclXz, LwKhclXz.class, "lw_khcl_xz");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("lwKhclXz:lw_khcl_xz:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, LwKhclXz.class);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping(value = "/getLwBatchDown")
|
||||
public Result<?> getLwBatchDown(@RequestBody LwKhclXz lwKhclXz, HttpServletResponse response) {
|
||||
lwKhclXz = lwKhclXzService.getLwBatchDown(lwKhclXz,response);
|
||||
return Result.ok(lwKhclXz);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhclXz.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: lw_khcl_xz
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-10-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lw_khcl_xz")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="lw_khcl_xz对象", description="lw_khcl_xz")
|
||||
public class LwKhclXz implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
/**学生学号*/
|
||||
@Excel(name = "学生学号", width = 15)
|
||||
@ApiModelProperty(value = "学生学号")
|
||||
private java.lang.String xsxh;
|
||||
/**学生姓名*/
|
||||
@Excel(name = "学生姓名", width = 15)
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private java.lang.String xsxm;
|
||||
/**毕业年份*/
|
||||
@Excel(name = "毕业年份", width = 15)
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private java.lang.String bynf;
|
||||
/**班级*/
|
||||
@Excel(name = "班级", width = 15)
|
||||
@ApiModelProperty(value = "班级")
|
||||
private java.lang.String bj;
|
||||
/**毕业论文(设计)题目*/
|
||||
@Excel(name = "毕业论文(设计)题目", width = 15)
|
||||
@ApiModelProperty(value = "毕业论文(设计)题目")
|
||||
private java.lang.String bylwTm;
|
||||
/**毕业论文(设计)类别*/
|
||||
@Excel(name = "毕业论文(设计)类别", width = 15)
|
||||
@ApiModelProperty(value = "毕业论文(设计)类别")
|
||||
private java.lang.String bylwLb;
|
||||
/**毕业论文(设计)成绩*/
|
||||
@Excel(name = "毕业论文(设计)成绩", width = 15)
|
||||
@ApiModelProperty(value = "毕业论文(设计)成绩")
|
||||
private java.lang.String bylwCj;
|
||||
/**指导教师姓名*/
|
||||
@Excel(name = "指导教师姓名", width = 15)
|
||||
@ApiModelProperty(value = "指导教师姓名")
|
||||
private java.lang.String zdjsxm;
|
||||
/**指导教师职称*/
|
||||
@Excel(name = "指导教师职称", width = 15)
|
||||
@ApiModelProperty(value = "指导教师职称")
|
||||
private java.lang.String zdjszc;
|
||||
/**所属院系名称*/
|
||||
@Excel(name = "所属院系名称", width = 15)
|
||||
@ApiModelProperty(value = "所属院系名称")
|
||||
private java.lang.String ssyxmc;
|
||||
/**所属校内专业(大类)名称*/
|
||||
@Excel(name = "所属校内专业(大类)名称", width = 15)
|
||||
@ApiModelProperty(value = "所属校内专业(大类)名称")
|
||||
private java.lang.String ssxnzymc;
|
||||
/**是否实现电子化管理*/
|
||||
@Excel(name = "是否实现电子化管理", width = 15)
|
||||
@ApiModelProperty(value = "是否实现电子化管理")
|
||||
private java.lang.String sfsxdzhgl;
|
||||
/**关键词*/
|
||||
@Excel(name = "关键词", width = 15)
|
||||
@ApiModelProperty(value = "关键词")
|
||||
private java.lang.String gjc;
|
||||
/**查重结果*/
|
||||
@Excel(name = "查重结果", width = 15)
|
||||
@ApiModelProperty(value = "查重结果")
|
||||
private java.lang.String ccjg;
|
||||
/**开题报告*/
|
||||
@Excel(name = "开题报告", width = 15)
|
||||
@ApiModelProperty(value = "开题报告")
|
||||
private java.lang.String ktbg;
|
||||
/**开题报告审核意见*/
|
||||
@Excel(name = "开题报告审核意见", width = 15)
|
||||
@ApiModelProperty(value = "开题报告审核意见")
|
||||
private java.lang.String ktbgshyj;
|
||||
/**中期检查*/
|
||||
@Excel(name = "中期检查", width = 15)
|
||||
@ApiModelProperty(value = "中期检查")
|
||||
private java.lang.String zqjc;
|
||||
/**答辩记录单*/
|
||||
@Excel(name = "答辩记录单", width = 15)
|
||||
@ApiModelProperty(value = "答辩记录单")
|
||||
private java.lang.String dbjld;
|
||||
/**论文终稿*/
|
||||
@Excel(name = "论文终稿", width = 15)
|
||||
@ApiModelProperty(value = "论文终稿")
|
||||
private java.lang.String lwzg;
|
||||
/**论文终稿PDF*/
|
||||
@Excel(name = "论文终稿PDF", width = 15)
|
||||
@ApiModelProperty(value = "论文终稿PDF")
|
||||
private java.lang.String lwzgPdf;
|
||||
/**检测报告等材料*/
|
||||
@Excel(name = "检测报告等材料", width = 15)
|
||||
@ApiModelProperty(value = "检测报告等材料")
|
||||
private java.lang.String jcbgdcl;
|
||||
/**入库日期*/
|
||||
@ApiModelProperty(value = "入库日期")
|
||||
private Date createTime;
|
||||
/**论文考核材料id*/
|
||||
@Excel(name = "论文考核材料id", width = 15)
|
||||
@ApiModelProperty(value = "论文考核材料id")
|
||||
private java.lang.String mainId;
|
||||
@ApiModelProperty(value = "终稿查重相似率")
|
||||
private String ccjgxsl;
|
||||
@ApiModelProperty(value = "终稿下载路径")
|
||||
private String ccjgdown;
|
||||
@ApiModelProperty(value = "知道记录单")
|
||||
private String zdjld;
|
||||
|
||||
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private Date updateTime;
|
||||
private String zfx;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String downLoadPath;
|
||||
@TableField(exist = false)
|
||||
private String downName;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String bylwCjPar;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhclXz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl_xz
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-10-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface LwKhclXzMapper extends BaseMapper<LwKhclXz> {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
<?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.demo.lwKhclXz.mapper.LwKhclXzMapper">
|
||||
|
||||
</mapper>
|
|
@ -1,17 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhclXz.service;
|
||||
|
||||
import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl_xz
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-10-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ILwKhclXzService extends IService<LwKhclXz> {
|
||||
|
||||
LwKhclXz getLwBatchDown(LwKhclXz lwKhclXz, HttpServletResponse response);
|
||||
}
|
|
@ -1,254 +0,0 @@
|
|||
package org.jeecg.modules.demo.lwKhclXz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.modules.demo.lwKhclXz.entity.LwKhclXz;
|
||||
import org.jeecg.modules.demo.lwKhclXz.mapper.LwKhclXzMapper;
|
||||
import org.jeecg.modules.demo.lwKhclXz.service.ILwKhclXzService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.utils.SFTPUtil;
|
||||
import org.jeecg.modules.utils.SftpConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URLConnection;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import javax.net.ssl.HttpsURLConnection;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: lw_khcl_xz
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-10-09
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class LwKhclXzServiceImpl extends ServiceImpl<LwKhclXzMapper, LwKhclXz> implements ILwKhclXzService {
|
||||
|
||||
@Value(value = "${jeecg.path.webapp}")
|
||||
private String downloadpath;
|
||||
|
||||
@Autowired
|
||||
SftpConfig sftpConfig;
|
||||
@Override
|
||||
public LwKhclXz getLwBatchDown(LwKhclXz lwKhclXz, HttpServletResponse response) {
|
||||
|
||||
String downPath[] = new String[5];
|
||||
LwKhclXz lwKhclXzInfo = baseMapper.selectById(lwKhclXz.getId());
|
||||
// 其余处理略
|
||||
InputStream inputStream = null;
|
||||
OutputStream outputStream = null;
|
||||
try{
|
||||
|
||||
|
||||
String ktbg = lwKhclXzInfo.getKtbg();
|
||||
String ktbgshyj = lwKhclXzInfo.getKtbgshyj();
|
||||
// String zqjc = lwKhclXzInfo.getZqjc();
|
||||
String lwzg = lwKhclXzInfo.getLwzg();
|
||||
String zdjld = lwKhclXzInfo.getZdjld();
|
||||
String ccjgdown = lwKhclXzInfo.getCcjgdown();
|
||||
// downPath[0] =ktbg;
|
||||
// downPath[1] =ktbgshyj;
|
||||
// downPath[2] =zqjc;
|
||||
// downPath[3] =lwzg;
|
||||
// downPath[4] =zdjld;
|
||||
// downPath[5] =ccjgdown;
|
||||
|
||||
|
||||
if(StringUtils.isNotBlank(ktbg)){
|
||||
String imgPath = ktbg;
|
||||
int index = imgPath.lastIndexOf("/");
|
||||
String path = "temp";
|
||||
if(index != -1){
|
||||
path = imgPath.substring(0,index);
|
||||
}
|
||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
String localFilePath = map.get("fileName");
|
||||
System.out.println(localFilePath);
|
||||
downPath[0] =localFilePath.replace(downloadpath,"");
|
||||
}
|
||||
if(StringUtils.isNotBlank(ktbgshyj)){
|
||||
String imgPath = ktbgshyj;
|
||||
int index = imgPath.lastIndexOf("/");
|
||||
String path = "temp";
|
||||
if(index != -1){
|
||||
path = imgPath.substring(0,index);
|
||||
}
|
||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
String localFilePath = map.get("fileName");
|
||||
downPath[1] =localFilePath.replace(downloadpath,"");
|
||||
}
|
||||
// if(StringUtils.isNotBlank(zqjc)){
|
||||
// String imgPath = zqjc;
|
||||
// int index = imgPath.lastIndexOf("/");
|
||||
// String path = "temp";
|
||||
// if(index != -1){
|
||||
// path = imgPath.substring(0,index);
|
||||
// }
|
||||
// Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
// String localFilePath = map.get("fileName");
|
||||
// downPath[2] =localFilePath.replace(downloadpath,"");
|
||||
// }
|
||||
if(StringUtils.isNotBlank(lwzg)){
|
||||
String imgPath = lwzg;
|
||||
int index = imgPath.lastIndexOf("/");
|
||||
String path = "temp";
|
||||
if(index != -1){
|
||||
path = imgPath.substring(0,index);
|
||||
}
|
||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
String localFilePath = map.get("fileName");
|
||||
downPath[2] =localFilePath.replace(downloadpath,"");
|
||||
}
|
||||
if(StringUtils.isNotBlank(zdjld)){
|
||||
String imgPath = zdjld;
|
||||
int index = imgPath.lastIndexOf("/");
|
||||
String path = "temp";
|
||||
if(index != -1){
|
||||
path = imgPath.substring(0,index);
|
||||
}
|
||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
String localFilePath = map.get("fileName");
|
||||
downPath[3] =localFilePath.replace(downloadpath,"");
|
||||
}
|
||||
if(StringUtils.isNotBlank(ccjgdown)){
|
||||
String savePath = downloadpath+"/bylw/"+lwKhclXzInfo.getXsxm()+ DateUtils.getCurrentTimestamp()+ "论文材料.zip";
|
||||
downloadWangluoFile(ccjgdown,savePath);
|
||||
downPath[4] =savePath.replace(downloadpath,"/");
|
||||
}
|
||||
|
||||
|
||||
}catch (Exception e){
|
||||
}finally {
|
||||
SFTPUtil.disChannel();
|
||||
SFTPUtil.disSession();
|
||||
}
|
||||
|
||||
if (inputStream != null) {
|
||||
try {
|
||||
inputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
if (outputStream != null) {
|
||||
try {
|
||||
outputStream.close();
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
String files[] = new String[downPath.length];
|
||||
String name = "/"+lwKhclXz.getDownName()+".zip";
|
||||
String zipFileName = downloadpath+name;
|
||||
|
||||
for(int i=0;i<downPath.length;i++) {
|
||||
String imgPath = downPath[i];
|
||||
if(StringUtils.isNotBlank(imgPath)){
|
||||
String downImgPath = downloadpath + imgPath;
|
||||
files[i] = downImgPath;
|
||||
}
|
||||
}
|
||||
try {
|
||||
zipFiles(zipFileName, files);
|
||||
System.out.println("Files zipped successfully!");
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
LwKhclXz par2 = new LwKhclXz();
|
||||
par2.setDownLoadPath(name);
|
||||
return par2;
|
||||
}
|
||||
|
||||
private String getDownloadPath(String path){
|
||||
String filePath = "";
|
||||
// if(StringUtils.isNotBlank(path)){
|
||||
// return "";
|
||||
// }
|
||||
int idx = path.indexOf(downloadpath);
|
||||
if(idx==-1){
|
||||
filePath = downloadpath + File.separator + path;
|
||||
}else{
|
||||
filePath = path;
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
public static void zipFiles(String zipFileName, String... files) throws IOException {
|
||||
FileOutputStream fos = new FileOutputStream(zipFileName);
|
||||
ZipOutputStream zos = new ZipOutputStream(fos);
|
||||
|
||||
for (String file : files) {
|
||||
try {
|
||||
File srcFile = new File(file);
|
||||
FileInputStream fis = new FileInputStream(srcFile);
|
||||
|
||||
ZipEntry zipEntry = new ZipEntry(srcFile.getName());
|
||||
zos.putNextEntry(zipEntry);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int length;
|
||||
while ((length = fis.read(buffer)) > 0) {
|
||||
zos.write(buffer, 0, length);
|
||||
}
|
||||
|
||||
fis.close();
|
||||
zos.closeEntry();
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
zos.close();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void downloadWangluoFile(String fileURL, String savePath) throws IOException {
|
||||
// String fileURL = "https://vims.fanyu.com/toole/jianceorgan/getDownloadUrl?guid=ff9040ddamrg9k46"; // 要下载的文件URL
|
||||
// String savePath = "D://a.zip"; // 下载后保存的文件路径
|
||||
try {
|
||||
URL url = new URL(fileURL);
|
||||
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
|
||||
connection.connect();
|
||||
|
||||
int responseCode = connection.getResponseCode();
|
||||
if (responseCode == HttpsURLConnection.HTTP_OK) {
|
||||
InputStream inputStream = new BufferedInputStream(connection.getInputStream());
|
||||
FileOutputStream outputStream = new FileOutputStream(savePath);
|
||||
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
outputStream.write(buffer, 0, bytesRead);
|
||||
}
|
||||
|
||||
outputStream.close();
|
||||
inputStream.close();
|
||||
System.out.println("文件下载完成!");
|
||||
} else {
|
||||
System.out.println("无法连接到文件URL。响应代码:" + responseCode);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,220 +0,0 @@
|
|||
package org.jeecg.modules.demo.mock;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.swing.filechooser.FileSystemView;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: MockController
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mock/api")
|
||||
@Slf4j
|
||||
public class MockController {
|
||||
|
||||
private final String JSON_PATH = "classpath:org/jeecg/modules/demo/mock/json";
|
||||
|
||||
/**
|
||||
* 通用json访问接口
|
||||
* 格式: http://localhost:8080/jeecg-boot/api/json/{filename}
|
||||
* @param filename
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/json/{filename}", method = RequestMethod.GET)
|
||||
public String getJsonData(@PathVariable("filename") String filename) {
|
||||
String jsonpath = "classpath:org/jeecg/modules/demo/mock/json/"+filename+".json";
|
||||
return readJson(jsonpath);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/asynTreeList")
|
||||
public Result asynTreeList(String id) {
|
||||
String json = readJson(JSON_PATH + "/asyn_tree_list_" + id + ".json");
|
||||
return Result.OK(JSON.parseArray(json));
|
||||
}
|
||||
|
||||
@GetMapping(value = "/user")
|
||||
public String user() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/user.json");
|
||||
}
|
||||
|
||||
/**
|
||||
* 老的登录获取用户信息接口
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/user/info")
|
||||
public String userInfo() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/user_info.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/role")
|
||||
public String role() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/role.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/service")
|
||||
public String service() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/service.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/permission")
|
||||
public String permission() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/permission.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/permission/no-pager")
|
||||
public String permissionNoPage() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/permission_no_page.json");
|
||||
}
|
||||
|
||||
/**
|
||||
* 省市县
|
||||
*/
|
||||
@GetMapping(value = "/area")
|
||||
public String area() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/area.json");
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试报表数据
|
||||
*/
|
||||
@GetMapping(value = "/report/getYearCountInfo")
|
||||
public String getYearCountInfo() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
|
||||
}
|
||||
@GetMapping(value = "/report/getMonthCountInfo")
|
||||
public String getMonthCountInfo() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
|
||||
}
|
||||
@GetMapping(value = "/report/getCntrNoCountInfo")
|
||||
public String getCntrNoCountInfo() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
|
||||
}
|
||||
@GetMapping(value = "/report/getCabinetCountInfo")
|
||||
public String getCabinetCountInfo() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/getCntrNoCountInfo.json");
|
||||
}
|
||||
@GetMapping(value = "/report/getTubiao")
|
||||
public String getTubiao() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/getTubiao.json");
|
||||
}
|
||||
|
||||
/**
|
||||
* 实时磁盘监控
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryDiskInfo")
|
||||
public Result<List<Map<String,Object>>> queryDiskInfo(HttpServletRequest request, HttpServletResponse response){
|
||||
Result<List<Map<String,Object>>> res = new Result<>();
|
||||
try {
|
||||
// 当前文件系统类
|
||||
FileSystemView fsv = FileSystemView.getFileSystemView();
|
||||
// 列出所有windows 磁盘
|
||||
File[] fs = File.listRoots();
|
||||
log.info("查询磁盘信息:"+fs.length+"个");
|
||||
List<Map<String,Object>> list = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < fs.length; i++) {
|
||||
if(fs[i].getTotalSpace()==0) {
|
||||
continue;
|
||||
}
|
||||
Map<String,Object> map = new HashMap<>(5);
|
||||
map.put("name", fsv.getSystemDisplayName(fs[i]));
|
||||
map.put("max", fs[i].getTotalSpace());
|
||||
map.put("rest", fs[i].getFreeSpace());
|
||||
map.put("restPPT", fs[i].getFreeSpace()*100/fs[i].getTotalSpace());
|
||||
list.add(map);
|
||||
log.info(map.toString());
|
||||
}
|
||||
res.setResult(list);
|
||||
res.success("查询成功");
|
||||
} catch (Exception e) {
|
||||
res.error500("查询失败"+e.getMessage());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* 工作台首页的数据
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/list/search/projects")
|
||||
public String projects() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_projects.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/workplace/activity")
|
||||
public String activity() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_activity.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/workplace/teams")
|
||||
public String teams() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_teams.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/workplace/radar")
|
||||
public String radar() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/workplace_radar.json");
|
||||
}
|
||||
|
||||
@GetMapping(value = "/task/process")
|
||||
public String taskProcess() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/task_process.json");
|
||||
}
|
||||
//-------------------------------------------------------------------------------------------
|
||||
|
||||
//author:lvdandan-----date:20190315---for:添加数据日志json----
|
||||
/**
|
||||
* 数据日志
|
||||
*/
|
||||
public String sysDataLogJson() {
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/sysdatalog.json");
|
||||
}
|
||||
//author:lvdandan-----date:20190315---for:添加数据日志json----
|
||||
|
||||
//--update-begin--author:wangshuai-----date:20201023---for:返回用户信息json数据----
|
||||
/**
|
||||
* 用户信息
|
||||
*/
|
||||
@GetMapping(value = "/getUserInfo")
|
||||
public String getUserInfo(){
|
||||
return readJson("classpath:org/jeecg/modules/demo/mock/json/userinfo.json");
|
||||
}
|
||||
//--update-end--author:wangshuai-----date:20201023---for:返回用户信息json数据----
|
||||
/**
|
||||
* 读取json格式文件
|
||||
* @param jsonSrc
|
||||
* @return
|
||||
*/
|
||||
private String readJson(String jsonSrc) {
|
||||
String json = "";
|
||||
try {
|
||||
//File jsonFile = ResourceUtils.getFile(jsonSrc);
|
||||
//json = FileUtils.re.readFileToString(jsonFile);
|
||||
//换个写法,解决springboot读取jar包中文件的问题
|
||||
InputStream stream = getClass().getClassLoader().getResourceAsStream(jsonSrc.replace("classpath:", ""));
|
||||
json = IOUtils.toString(stream,"UTF-8");
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage(),e);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue