Merge branch 'master' of https://gitee.com/mini-org-project/course_information_center_java
This commit is contained in:
commit
026ad2d4e0
|
@ -0,0 +1,70 @@
|
|||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.compress.utils.Lists;
|
||||
import org.jeecg.modules.kc.grab.SynchronizationService.base.BaseSync;
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TFwdtShryxx;
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TJwKcxxb;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITFwdtShryxxService;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITJwKcxxbService;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbkcxxb;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbshryxx;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbsynclog;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbkcxxbService;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbshryxxService;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
public class SyncTFwdtShryxx extends BaseSync {
|
||||
|
||||
@Autowired
|
||||
private ITFwdtShryxxService expService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbshryxxService impService;
|
||||
|
||||
/**
|
||||
* 若参数变量名修改 QuartzJobController中也需对应修改
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) {
|
||||
start();
|
||||
run(getParamMap());
|
||||
end();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 有参定时任务实现
|
||||
* @param param
|
||||
*/
|
||||
public void run(Map<String, Object> param){
|
||||
//查询数据
|
||||
List<TFwdtShryxx> inDataList = expService.list();
|
||||
List<Xxhbshryxx> outDataList = Lists.newArrayList();
|
||||
|
||||
//清洗数据
|
||||
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbshryxx.class)));
|
||||
|
||||
//保存到胃
|
||||
impService.syncList(outDataList);
|
||||
|
||||
Xxhbsynclog xxhbsynclog = new Xxhbsynclog();
|
||||
xxhbsynclog.setSyncRowNum(String.valueOf(outDataList.size()));
|
||||
saveLog(xxhbsynclog, Xxhbshryxx.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 无参定时任务实现
|
||||
*/
|
||||
public void run(){
|
||||
run(null);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,163 @@
|
|||
package org.jeecg.modules.kc.grab.exports.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
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.modules.kc.grab.exports.entity.TFwdtShryxx;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITFwdtShryxxService;
|
||||
|
||||
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.common.system.base.controller.JeecgController;
|
||||
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 org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="同步数据表(shryxx)")
|
||||
@RestController
|
||||
@RequestMapping("/grab/xxhbshryxx")
|
||||
@Slf4j
|
||||
public class TFwdtShryxxController extends JeecgController<TFwdtShryxx, ITFwdtShryxxService> {
|
||||
@Autowired
|
||||
private ITFwdtShryxxService xxhbshryxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param xxhbshryxx
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "同步数据表(shryxx)-分页列表查询")
|
||||
@ApiOperation(value="同步数据表(shryxx)-分页列表查询", notes="同步数据表(shryxx)-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TFwdtShryxx>> queryPageList(TFwdtShryxx xxhbshryxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TFwdtShryxx> queryWrapper = QueryGenerator.initQueryWrapper(xxhbshryxx, req.getParameterMap());
|
||||
Page<TFwdtShryxx> page = new Page<TFwdtShryxx>(pageNo, pageSize);
|
||||
IPage<TFwdtShryxx> pageList = xxhbshryxxService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param xxhbshryxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-添加")
|
||||
@ApiOperation(value="同步数据表(shryxx)-添加", notes="同步数据表(shryxx)-添加")
|
||||
@RequiresPermissions("grab:xxhbshryxx:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TFwdtShryxx xxhbshryxx) {
|
||||
xxhbshryxxService.save(xxhbshryxx);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param xxhbshryxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-编辑")
|
||||
@ApiOperation(value="同步数据表(shryxx)-编辑", notes="同步数据表(shryxx)-编辑")
|
||||
@RequiresPermissions("grab:xxhbshryxx:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TFwdtShryxx xxhbshryxx) {
|
||||
xxhbshryxxService.updateById(xxhbshryxx);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-通过id删除")
|
||||
@ApiOperation(value="同步数据表(shryxx)-通过id删除", notes="同步数据表(shryxx)-通过id删除")
|
||||
@RequiresPermissions("grab:xxhbshryxx:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
xxhbshryxxService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-批量删除")
|
||||
@ApiOperation(value="同步数据表(shryxx)-批量删除", notes="同步数据表(shryxx)-批量删除")
|
||||
@RequiresPermissions("grab:xxhbshryxx:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.xxhbshryxxService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "同步数据表(shryxx)-通过id查询")
|
||||
@ApiOperation(value="同步数据表(shryxx)-通过id查询", notes="同步数据表(shryxx)-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TFwdtShryxx> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TFwdtShryxx xxhbshryxx = xxhbshryxxService.getById(id);
|
||||
if(xxhbshryxx==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(xxhbshryxx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param xxhbshryxx
|
||||
*/
|
||||
@RequiresPermissions("grab:xxhbshryxx:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TFwdtShryxx xxhbshryxx) {
|
||||
return super.exportXls(request, xxhbshryxx, TFwdtShryxx.class, "同步数据表(shryxx)");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("grab:xxhbshryxx:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TFwdtShryxx.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package org.jeecg.modules.kc.grab.exports.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("t_fwdt_shryxx")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="TFwdtShryxx对象", description="同步数据表(shryxx)")
|
||||
public class TFwdtShryxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**工号*/
|
||||
@Excel(name = "工号", width = 15)
|
||||
@ApiModelProperty(value = "工号")
|
||||
private java.lang.String gh;
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String xm;
|
||||
/**单位号*/
|
||||
@Excel(name = "单位号", width = 15)
|
||||
@ApiModelProperty(value = "单位号")
|
||||
private java.lang.String dwh;
|
||||
/**职务代码*/
|
||||
@Excel(name = "职务代码", width = 15)
|
||||
@ApiModelProperty(value = "职务代码")
|
||||
private java.lang.String zwdm;
|
||||
/**职务名称*/
|
||||
@Excel(name = "职务名称", width = 15)
|
||||
@ApiModelProperty(value = "职务名称")
|
||||
private java.lang.String zwmc;
|
||||
/**年级*/
|
||||
@Excel(name = "年级", width = 15)
|
||||
@ApiModelProperty(value = "年级")
|
||||
private java.lang.String nj;
|
||||
/**时间戳*/
|
||||
@Excel(name = "时间戳", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "时间戳")
|
||||
private java.util.Date timestamps;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.grab.exports.mapper;
|
||||
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TFwdtShryxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TFwdtShryxxMapper extends BaseMapper<TFwdtShryxx> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.grab.exports.mapper.TFwdtShryxxMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.grab.exports.service;
|
||||
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TFwdtShryxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITFwdtShryxxService extends IService<TFwdtShryxx> {
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.jeecg.modules.kc.grab.exports.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.jeecg.modules.kc.grab.exports.entity.TFwdtShryxx;
|
||||
import org.jeecg.modules.kc.grab.exports.mapper.TFwdtShryxxMapper;
|
||||
import org.jeecg.modules.kc.grab.exports.service.ITFwdtShryxxService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@DS("multi-oracle")
|
||||
@Service
|
||||
public class TFwdtShryxxServiceImpl extends ServiceImpl<TFwdtShryxxMapper, TFwdtShryxx> implements ITFwdtShryxxService {
|
||||
|
||||
}
|
|
@ -0,0 +1,162 @@
|
|||
package org.jeecg.modules.kc.grab.imports.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbshryxx;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbshryxxService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="同步数据表(shryxx)")
|
||||
@RestController
|
||||
@RequestMapping("/grab/imports/xxhbshryxx")
|
||||
@Slf4j
|
||||
public class XxhbshryxxController extends JeecgController<Xxhbshryxx, IXxhbshryxxService> {
|
||||
@Autowired
|
||||
private IXxhbshryxxService xxhbshryxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param xxhbshryxx
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "同步数据表(shryxx)-分页列表查询")
|
||||
@ApiOperation(value="同步数据表(shryxx)-分页列表查询", notes="同步数据表(shryxx)-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Xxhbshryxx>> queryPageList(Xxhbshryxx xxhbshryxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Xxhbshryxx> queryWrapper = QueryGenerator.initQueryWrapper(xxhbshryxx, req.getParameterMap());
|
||||
Page<Xxhbshryxx> page = new Page<Xxhbshryxx>(pageNo, pageSize);
|
||||
IPage<Xxhbshryxx> pageList = xxhbshryxxService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param xxhbshryxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-添加")
|
||||
@ApiOperation(value="同步数据表(shryxx)-添加", notes="同步数据表(shryxx)-添加")
|
||||
@RequiresPermissions("grab:xxhbshryxx:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Xxhbshryxx xxhbshryxx) {
|
||||
xxhbshryxxService.save(xxhbshryxx);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param xxhbshryxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-编辑")
|
||||
@ApiOperation(value="同步数据表(shryxx)-编辑", notes="同步数据表(shryxx)-编辑")
|
||||
@RequiresPermissions("grab:xxhbshryxx:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Xxhbshryxx xxhbshryxx) {
|
||||
xxhbshryxxService.updateById(xxhbshryxx);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-通过id删除")
|
||||
@ApiOperation(value="同步数据表(shryxx)-通过id删除", notes="同步数据表(shryxx)-通过id删除")
|
||||
@RequiresPermissions("grab:xxhbshryxx:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
xxhbshryxxService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "同步数据表(shryxx)-批量删除")
|
||||
@ApiOperation(value="同步数据表(shryxx)-批量删除", notes="同步数据表(shryxx)-批量删除")
|
||||
@RequiresPermissions("grab:xxhbshryxx:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.xxhbshryxxService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "同步数据表(shryxx)-通过id查询")
|
||||
@ApiOperation(value="同步数据表(shryxx)-通过id查询", notes="同步数据表(shryxx)-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Xxhbshryxx> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Xxhbshryxx xxhbshryxx = xxhbshryxxService.getById(id);
|
||||
if(xxhbshryxx==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(xxhbshryxx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param xxhbshryxx
|
||||
*/
|
||||
@RequiresPermissions("grab:xxhbshryxx:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Xxhbshryxx xxhbshryxx) {
|
||||
return super.exportXls(request, xxhbshryxx, Xxhbshryxx.class, "同步数据表(shryxx)");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("grab:xxhbshryxx:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, Xxhbshryxx.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
package org.jeecg.modules.kc.grab.imports.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("xxhbshryxx")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="xxhbshryxx对象", description="同步数据表(shryxx)")
|
||||
public class Xxhbshryxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**工号*/
|
||||
@Excel(name = "工号", width = 15)
|
||||
@ApiModelProperty(value = "工号")
|
||||
private java.lang.String gh;
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String xm;
|
||||
/**单位号*/
|
||||
@Excel(name = "单位号", width = 15)
|
||||
@ApiModelProperty(value = "单位号")
|
||||
private java.lang.String dwh;
|
||||
/**职务代码*/
|
||||
@Excel(name = "职务代码", width = 15)
|
||||
@ApiModelProperty(value = "职务代码")
|
||||
private java.lang.String zwdm;
|
||||
/**职务名称*/
|
||||
@Excel(name = "职务名称", width = 15)
|
||||
@ApiModelProperty(value = "职务名称")
|
||||
private java.lang.String zwmc;
|
||||
/**年级*/
|
||||
@Excel(name = "年级", width = 15)
|
||||
@ApiModelProperty(value = "年级")
|
||||
private java.lang.String nj;
|
||||
/**时间戳*/
|
||||
@Excel(name = "时间戳", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "时间戳")
|
||||
private java.util.Date timestamps;
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.grab.imports.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbshryxx;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface XxhbshryxxMapper extends BaseMapper<Xxhbshryxx> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.grab.imports.mapper.XxhbshryxxMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,30 @@
|
|||
package org.jeecg.modules.kc.grab.imports.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbshryxx;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IXxhbshryxxService extends IService<Xxhbshryxx> {
|
||||
/**
|
||||
* 同步数据
|
||||
* @param entityList
|
||||
* @return
|
||||
*/
|
||||
boolean syncList(Collection<Xxhbshryxx> entityList);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param entityList
|
||||
* @param isDelete
|
||||
* @return
|
||||
*/
|
||||
boolean syncList(Collection<Xxhbshryxx> entityList, boolean isDelete);
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package org.jeecg.modules.kc.grab.imports.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.kc.grab.imports.entity.Xxhbshryxx;
|
||||
import org.jeecg.modules.kc.grab.imports.mapper.XxhbshryxxMapper;
|
||||
import org.jeecg.modules.kc.grab.imports.service.IXxhbshryxxService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* @Description: 同步数据表(shryxx)
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-05-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class XxhbshryxxServiceImpl extends ServiceImpl<XxhbshryxxMapper, Xxhbshryxx> implements IXxhbshryxxService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<Xxhbshryxx> entityList) {
|
||||
return syncList(entityList, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<Xxhbshryxx> entityList, boolean isDelete) {
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
if(isDelete){
|
||||
baseMapper.delete(dqw);
|
||||
}
|
||||
return this.saveBatch(entityList, 1000);
|
||||
}
|
||||
}
|
|
@ -245,8 +245,6 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
if(listTjIndex != null && !listTjIndex.isEmpty()){
|
||||
rmap.put("yiKaiKeTangNew",listTjIndex.get(0));
|
||||
}
|
||||
|
||||
|
||||
return Result.OK(rmap);
|
||||
}
|
||||
|
||||
|
@ -258,12 +256,13 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-今日课堂总数详情", notes="课堂管理-子表-今日课堂总数详情")
|
||||
@GetMapping(value = "/jrktzsList")
|
||||
public Result<?> jrktzsList(String skrq) {
|
||||
public Result<?> jrktzsList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//第一句-今日课堂-总数
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.select("*");
|
||||
qw.eq("skrq", skrq);
|
||||
List<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.listMaps(qw);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.pageMaps(page,qw);
|
||||
return Result.OK(kcKetangbiaoList);
|
||||
}
|
||||
|
||||
|
@ -275,13 +274,14 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-今日课堂已下课数详情", notes="课堂管理-子表-今日课堂已下课数详情")
|
||||
@GetMapping(value = "/jrktyxkList")
|
||||
public Result<?> jrktyxkList(String skrq) {
|
||||
public Result<?> jrktyxkList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//第一句-今日课堂-已下课数
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.select("*");
|
||||
qw.eq("skrq", skrq);
|
||||
qw.apply("date_format( now(), '%H%i' ) > hhjs");
|
||||
List<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.listMaps(qw);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.pageMaps(page,qw);
|
||||
return Result.OK(kcKetangbiaoList);
|
||||
}
|
||||
|
||||
|
@ -293,13 +293,14 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-今日课堂上课中详情", notes="课堂管理-子表-今日课堂上课中详情")
|
||||
@GetMapping(value = "/skzList")
|
||||
public Result<?> skzList(String skrq) {
|
||||
public Result<?> skzList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//第一句-今日课堂-上课中
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.select("*");
|
||||
qw.eq("skrq", skrq);
|
||||
qw.apply("date_format( now(), '%H%i' ) < hhjs AND date_format( now(), '%H%i' ) > hhks");
|
||||
List<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.listMaps(qw);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiaoList = kcKetangbiaoService.pageMaps(page,qw);
|
||||
return Result.OK(kcKetangbiaoList);
|
||||
}
|
||||
|
||||
|
@ -311,13 +312,14 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-已开课堂总数详情", notes="课堂管理-子表-已开课堂总数详情")
|
||||
@GetMapping(value = "/ykktzsList")
|
||||
public Result<?> ykktzsList(String skrq) {
|
||||
public Result<?> ykktzsList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//查询第三句-已开课堂总数
|
||||
QueryWrapper qw3 = new QueryWrapper();
|
||||
qw3.select("*");
|
||||
qw3.ge("skrq",startTime);//<=
|
||||
qw3.le("skrq",skrq);//>=
|
||||
List<Map<String, Object>> kcKetangbiao3List = kcKetangbiaoService.listMaps(qw3);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiao3List = kcKetangbiaoService.pageMaps(page,qw3);
|
||||
return Result.OK(kcKetangbiao3List);
|
||||
}
|
||||
|
||||
|
@ -329,12 +331,13 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-已开课堂听课课堂详情", notes="课堂管理-子表-已开课堂听课课堂详情")
|
||||
@GetMapping(value = "/ykkttkktList")
|
||||
public Result<?> ykkttkktList(String skrq) {
|
||||
public Result<?> ykkttkktList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//查询第三句-已开课堂听课课堂
|
||||
KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
kcKetangbiao.setStartTime(startTime);
|
||||
kcKetangbiao.setEndTime(skrq);
|
||||
List<Map<String, Object>> listTjIndex = kcKetangbiaoService.getIndexYkktstjYkkttkktList(kcKetangbiao);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> listTjIndex = kcKetangbiaoService.getIndexYkktstjYkkttkktList(page,kcKetangbiao);
|
||||
return Result.OK(listTjIndex);
|
||||
}
|
||||
|
||||
|
@ -346,12 +349,13 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-已开课堂听课课堂详情", notes="课堂管理-子表-已开课堂听课课堂详情")
|
||||
@GetMapping(value = "/ykkttkrcList")
|
||||
public Result<?> ykkttkrcList(String skrq) {
|
||||
public Result<?> ykkttkrcList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//查询第三句-已开课堂听课课堂
|
||||
KcKetangbiao kcKetangbiao = new KcKetangbiao();
|
||||
kcKetangbiao.setStartTime(startTime);
|
||||
kcKetangbiao.setEndTime(skrq);
|
||||
List<Map<String, Object>> listTjIndex = kcKetangbiaoService.getIndexYkktstjYkkttkrcList(kcKetangbiao);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> listTjIndex = kcKetangbiaoService.getIndexYkktstjYkkttkrcList(page,kcKetangbiao);
|
||||
return Result.OK(listTjIndex);
|
||||
}
|
||||
|
||||
|
@ -363,9 +367,10 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-已开课堂听课课堂详情", notes="课堂管理-子表-已开课堂听课课堂详情")
|
||||
@GetMapping(value = "/jrtkktsList")
|
||||
public Result<?> jrtkktsList(String skrq) {
|
||||
public Result<?> jrtkktsList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//查询第三句-已开课堂听课课堂
|
||||
List<Map<String, Object>> kcKetangbiao2List = kcKetangbiaoService.selectJrTkJrtkktsList(skrq);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiao2List = kcKetangbiaoService.selectJrTkJrtkktsList(page,skrq);
|
||||
return Result.OK(kcKetangbiao2List);
|
||||
}
|
||||
|
||||
|
@ -378,9 +383,10 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
|
|||
*/
|
||||
@ApiOperation(value="课堂管理-子表-已开课堂听课课堂详情", notes="课堂管理-子表-已开课堂听课课堂详情")
|
||||
@GetMapping(value = "/jrtktkrcList")
|
||||
public Result<?> jrtktkrcList(String skrq) {
|
||||
public Result<?> jrtktkrcList(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,String skrq) {
|
||||
//查询第三句-已开课堂听课课堂
|
||||
List<Map<String, Object>> kcKetangbiao2List = kcKetangbiaoService.selectJrTkJrtktkrcList(skrq);
|
||||
Page<Map<String, Object>> page = new Page<>(pageNo, pageSize);
|
||||
IPage<Map<String, Object>> kcKetangbiao2List = kcKetangbiaoService.selectJrTkJrtktkrcList(page,skrq);
|
||||
return Result.OK(kcKetangbiao2List);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@ public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
|
|||
|
||||
void saveHis(KcKetangbiao kcKetangbiaohis);
|
||||
|
||||
List<Map<String, Object>> getIndexYkktstjYkkttkktList(KcKetangbiao kcKetangbiao);
|
||||
List<Map<String, Object>> getIndexYkktstjYkkttkktList(Page<Map<String, Object>> page, @Param(Constants.ENTITY) KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<Map<String, Object>> getIndexYkktstjYkkttkrcList(KcKetangbiao kcKetangbiao);
|
||||
List<Map<String, Object>> getIndexYkktstjYkkttkrcList(Page<Map<String, Object>> page, @Param(Constants.ENTITY) KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<Map<String, Object>> selectJrTkJrtkktsList(String skrq);
|
||||
List<Map<String, Object>> selectJrTkJrtkktsList(Page<Map<String, Object>> page, @Param("skrq") String skrq);
|
||||
|
||||
List<Map<String, Object>> selectJrTkJrtktkrcList(String skrq);
|
||||
List<Map<String, Object>> selectJrTkJrtktkrcList(Page<Map<String, Object>> page, @Param("skrq") String skrq);
|
||||
}
|
||||
|
|
|
@ -144,11 +144,11 @@
|
|||
*
|
||||
FROM kc_ketangbiao k, kc_tingke t WHERE k.id = t.kechengbiaoid
|
||||
and t.tingketime > '1'
|
||||
<if test="startTime != '' and startTime != null">
|
||||
AND skrq >= #{startTime}
|
||||
<if test="et.startTime != '' and et.startTime != null">
|
||||
AND skrq >= #{et.startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null">
|
||||
AND skrq <= #{endTime}
|
||||
<if test="et.endTime != '' and et.endTime != null">
|
||||
AND skrq <= #{et.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
@ -157,11 +157,11 @@
|
|||
*
|
||||
FROM kc_ketangbiao k, kc_tingke t WHERE k.id = t.kechengbiaoid
|
||||
and t.tingketime > '1'
|
||||
<if test="startTime != '' and startTime != null">
|
||||
AND skrq >= #{startTime}
|
||||
<if test="et.startTime != '' and et.startTime != null">
|
||||
AND skrq >= #{et.startTime}
|
||||
</if>
|
||||
<if test="endTime != '' and endTime != null">
|
||||
AND skrq <= #{endTime}
|
||||
<if test="et.endTime != '' and et.endTime != null">
|
||||
AND skrq <= #{et.endTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
|
|
@ -33,11 +33,11 @@ public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
|
|||
*/
|
||||
void saveHis(KcKetangbiao kcKetangbiaohis);
|
||||
|
||||
List<Map<String, Object>> getIndexYkktstjYkkttkktList(KcKetangbiao kcKetangbiao);
|
||||
IPage<Map<String, Object>> getIndexYkktstjYkkttkktList(Page<Map<String, Object>> page,KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<Map<String, Object>> getIndexYkktstjYkkttkrcList(KcKetangbiao kcKetangbiao);
|
||||
IPage<Map<String, Object>> getIndexYkktstjYkkttkrcList(Page<Map<String, Object>> page,KcKetangbiao kcKetangbiao);
|
||||
|
||||
List<Map<String, Object>> selectJrTkJrtkktsList(String skrq);
|
||||
IPage<Map<String, Object>> selectJrTkJrtkktsList(Page<Map<String, Object>> page,String skrq);
|
||||
|
||||
List<Map<String, Object>> selectJrTkJrtktkrcList(String skrq);
|
||||
IPage<Map<String, Object>> selectJrTkJrtktkrcList(Page<Map<String, Object>> page,String skrq);
|
||||
}
|
||||
|
|
|
@ -53,22 +53,22 @@ public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcK
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getIndexYkktstjYkkttkktList(KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getIndexYkktstjYkkttkktList(kcKetangbiao);
|
||||
public IPage<Map<String, Object>> getIndexYkktstjYkkttkktList(Page<Map<String, Object>> page, KcKetangbiao kcKetangbiao) {
|
||||
return page.setRecords(baseMapper.getIndexYkktstjYkkttkktList(page, kcKetangbiao));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getIndexYkktstjYkkttkrcList(KcKetangbiao kcKetangbiao) {
|
||||
return baseMapper.getIndexYkktstjYkkttkrcList(kcKetangbiao);
|
||||
public IPage<Map<String, Object>> getIndexYkktstjYkkttkrcList(Page<Map<String, Object>> page, KcKetangbiao kcKetangbiao) {
|
||||
return page.setRecords(baseMapper.getIndexYkktstjYkkttkrcList(page, kcKetangbiao));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectJrTkJrtkktsList(String skrq) {
|
||||
return baseMapper.selectJrTkJrtkktsList(skrq);
|
||||
public IPage<Map<String, Object>> selectJrTkJrtkktsList(Page<Map<String, Object>> page, String skrq) {
|
||||
return page.setRecords(baseMapper.selectJrTkJrtkktsList(page, skrq));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectJrTkJrtktkrcList(String skrq) {
|
||||
return baseMapper.selectJrTkJrtktkrcList(skrq);
|
||||
public IPage<Map<String, Object>> selectJrTkJrtktkrcList(Page<Map<String, Object>> page, String skrq) {
|
||||
return page.setRecords(baseMapper.selectJrTkJrtktkrcList(page, skrq));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue