添加报表统计
This commit is contained in:
parent
5d4b031b5a
commit
f7d32b36be
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbb141.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.tjbb.tjbb141.entity.Tjbb_141;
|
||||
import org.jeecg.modules.tjbb.tjbb141.service.ITjbb_141Service;
|
||||
|
||||
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: tjbb_141
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_141")
|
||||
@RestController
|
||||
@RequestMapping("/tjbb141/tjbb_141")
|
||||
@Slf4j
|
||||
public class Tjbb_141Controller extends JeecgController<Tjbb_141, ITjbb_141Service> {
|
||||
@Autowired
|
||||
private ITjbb_141Service tjbb_141Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbb_141
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_141-分页列表查询")
|
||||
@ApiOperation(value="tjbb_141-分页列表查询", notes="tjbb_141-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Tjbb_141>> queryPageList(Tjbb_141 tjbb_141,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Tjbb_141> queryWrapper = QueryGenerator.initQueryWrapper(tjbb_141, req.getParameterMap());
|
||||
Page<Tjbb_141> page = new Page<Tjbb_141>(pageNo, pageSize);
|
||||
IPage<Tjbb_141> pageList = tjbb_141Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbb_141
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_141-添加")
|
||||
@ApiOperation(value="tjbb_141-添加", notes="tjbb_141-添加")
|
||||
@RequiresPermissions("tjbb141:tjbb_141:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Tjbb_141 tjbb_141) {
|
||||
tjbb_141Service.save(tjbb_141);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbb_141
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_141-编辑")
|
||||
@ApiOperation(value="tjbb_141-编辑", notes="tjbb_141-编辑")
|
||||
@RequiresPermissions("tjbb141:tjbb_141:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Tjbb_141 tjbb_141) {
|
||||
tjbb_141Service.updateById(tjbb_141);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_141-通过id删除")
|
||||
@ApiOperation(value="tjbb_141-通过id删除", notes="tjbb_141-通过id删除")
|
||||
@RequiresPermissions("tjbb141:tjbb_141:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbb_141Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_141-批量删除")
|
||||
@ApiOperation(value="tjbb_141-批量删除", notes="tjbb_141-批量删除")
|
||||
@RequiresPermissions("tjbb141:tjbb_141:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbb_141Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_141-通过id查询")
|
||||
@ApiOperation(value="tjbb_141-通过id查询", notes="tjbb_141-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Tjbb_141> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Tjbb_141 tjbb_141 = tjbb_141Service.getById(id);
|
||||
if(tjbb_141==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbb_141);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbb_141
|
||||
*/
|
||||
@RequiresPermissions("tjbb141:tjbb_141:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_141 tjbb_141) {
|
||||
return super.exportXls(request, tjbb_141, Tjbb_141.class, "tjbb_141");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbb_141Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, Tjbb_141.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
package org.jeecg.modules.tjbb.tjbb141.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: tjbb_141
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_141")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_141对象", description="tjbb_141")
|
||||
public class Tjbb_141 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 xnzydm;
|
||||
/**校内专业名称*/
|
||||
@Excel(name = "校内专业名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业名称")
|
||||
private java.lang.String xnzymc;
|
||||
/**专业名称*/
|
||||
@Excel(name = "专业名称", width = 15)
|
||||
@ApiModelProperty(value = "专业名称")
|
||||
private java.lang.String zymc;
|
||||
/**专业代码*/
|
||||
@Excel(name = "专业代码", width = 15)
|
||||
@ApiModelProperty(value = "专业代码")
|
||||
private java.lang.String zydm;
|
||||
/**所属单位名称*/
|
||||
@Excel(name = "所属单位名称", width = 15)
|
||||
@ApiModelProperty(value = "所属单位名称")
|
||||
private java.lang.String ssdwmc;
|
||||
/**所属单位号*/
|
||||
@Excel(name = "所属单位号", width = 15)
|
||||
@ApiModelProperty(value = "所属单位号")
|
||||
private java.lang.String ssdwh;
|
||||
/**专业设置年份*/
|
||||
@Excel(name = "专业设置年份", width = 15)
|
||||
@ApiModelProperty(value = "专业设置年份")
|
||||
private java.lang.String zysznf;
|
||||
/**学制*/
|
||||
@Excel(name = "学制", width = 15)
|
||||
@ApiModelProperty(value = "学制")
|
||||
private java.lang.String xz;
|
||||
/**允许修业年限*/
|
||||
@Excel(name = "允许修业年限", width = 15)
|
||||
@ApiModelProperty(value = "允许修业年限")
|
||||
private java.lang.String rxxynx;
|
||||
/**授予学位门类*/
|
||||
@Excel(name = "授予学位门类", width = 15)
|
||||
@ApiModelProperty(value = "授予学位门类")
|
||||
private java.lang.String syxwml;
|
||||
/**招生状态*/
|
||||
@Excel(name = "招生状态", width = 15)
|
||||
@ApiModelProperty(value = "招生状态")
|
||||
private java.lang.String zszt;
|
||||
/**是否新专业*/
|
||||
@Excel(name = "是否新专业", width = 15)
|
||||
@ApiModelProperty(value = "是否新专业")
|
||||
private java.lang.String sfxzy;
|
||||
/**是否师范类专业*/
|
||||
@Excel(name = "是否师范类专业", width = 15)
|
||||
@ApiModelProperty(value = "是否师范类专业")
|
||||
private java.lang.String sfsflzy;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbb141.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbb141.entity.Tjbb_141;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_141
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface Tjbb_141Mapper extends BaseMapper<Tjbb_141> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbb141.mapper.Tjbb_141Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbb141.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb141.entity.Tjbb_141;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_141
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbb_141Service extends IService<Tjbb_141> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbb141.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb141.entity.Tjbb_141;
|
||||
import org.jeecg.modules.tjbb.tjbb141.mapper.Tjbb_141Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbb141.service.ITjbb_141Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_141
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class Tjbb_141ServiceImpl extends ServiceImpl<Tjbb_141Mapper, Tjbb_141> implements ITjbb_141Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbb151.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.tjbb.tjbb151.entity.Tjbb_151;
|
||||
import org.jeecg.modules.tjbb.tjbb151.service.ITjbb_151Service;
|
||||
|
||||
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: tjbb_151
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_151")
|
||||
@RestController
|
||||
@RequestMapping("/tjbb151/tjbb_151")
|
||||
@Slf4j
|
||||
public class Tjbb_151Controller extends JeecgController<Tjbb_151, ITjbb_151Service> {
|
||||
@Autowired
|
||||
private ITjbb_151Service tjbb_151Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbb_151
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_151-分页列表查询")
|
||||
@ApiOperation(value="tjbb_151-分页列表查询", notes="tjbb_151-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Tjbb_151>> queryPageList(Tjbb_151 tjbb_151,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Tjbb_151> queryWrapper = QueryGenerator.initQueryWrapper(tjbb_151, req.getParameterMap());
|
||||
Page<Tjbb_151> page = new Page<Tjbb_151>(pageNo, pageSize);
|
||||
IPage<Tjbb_151> pageList = tjbb_151Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbb_151
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_151-添加")
|
||||
@ApiOperation(value="tjbb_151-添加", notes="tjbb_151-添加")
|
||||
@RequiresPermissions("tjbb151:tjbb_151:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Tjbb_151 tjbb_151) {
|
||||
tjbb_151Service.save(tjbb_151);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbb_151
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_151-编辑")
|
||||
@ApiOperation(value="tjbb_151-编辑", notes="tjbb_151-编辑")
|
||||
@RequiresPermissions("tjbb151:tjbb_151:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Tjbb_151 tjbb_151) {
|
||||
tjbb_151Service.updateById(tjbb_151);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_151-通过id删除")
|
||||
@ApiOperation(value="tjbb_151-通过id删除", notes="tjbb_151-通过id删除")
|
||||
@RequiresPermissions("tjbb151:tjbb_151:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbb_151Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_151-批量删除")
|
||||
@ApiOperation(value="tjbb_151-批量删除", notes="tjbb_151-批量删除")
|
||||
@RequiresPermissions("tjbb151:tjbb_151:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbb_151Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_151-通过id查询")
|
||||
@ApiOperation(value="tjbb_151-通过id查询", notes="tjbb_151-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Tjbb_151> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Tjbb_151 tjbb_151 = tjbb_151Service.getById(id);
|
||||
if(tjbb_151==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbb_151);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbb_151
|
||||
*/
|
||||
@RequiresPermissions("tjbb151:tjbb_151:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_151 tjbb_151) {
|
||||
return super.exportXls(request, tjbb_151, Tjbb_151.class, "tjbb_151");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbb_151Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, Tjbb_151.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package org.jeecg.modules.tjbb.tjbb151.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: tjbb_151
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_151")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_151对象", description="tjbb_151")
|
||||
public class Tjbb_151 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 gh;
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String xm;
|
||||
/**性别*/
|
||||
@Excel(name = "性别", width = 15)
|
||||
@ApiModelProperty(value = "性别")
|
||||
private java.lang.String xb;
|
||||
/**出生年月*/
|
||||
@Excel(name = "出生年月", width = 15)
|
||||
@ApiModelProperty(value = "出生年月")
|
||||
private java.lang.String csny;
|
||||
/**入校时间*/
|
||||
@Excel(name = "入校时间", width = 15)
|
||||
@ApiModelProperty(value = "入校时间")
|
||||
private java.lang.String rxsj;
|
||||
/**任职状态*/
|
||||
@Excel(name = "任职状态", width = 15)
|
||||
@ApiModelProperty(value = "任职状态")
|
||||
private java.lang.String rzzt;
|
||||
/**单位号*/
|
||||
@Excel(name = "单位号", width = 15)
|
||||
@ApiModelProperty(value = "单位号")
|
||||
private java.lang.String dwh;
|
||||
/**单位名称*/
|
||||
@Excel(name = "单位名称", width = 15)
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private java.lang.String dwmc;
|
||||
/**学历*/
|
||||
@Excel(name = "学历", width = 15)
|
||||
@ApiModelProperty(value = "学历")
|
||||
private java.lang.String xl;
|
||||
/**最高学位*/
|
||||
@Excel(name = "最高学位", width = 15)
|
||||
@ApiModelProperty(value = "最高学位")
|
||||
private java.lang.String zgxw;
|
||||
/**学缘*/
|
||||
@Excel(name = "学缘", width = 15)
|
||||
@ApiModelProperty(value = "学缘")
|
||||
private java.lang.String xy;
|
||||
/**专业技术职称*/
|
||||
@Excel(name = "专业技术职称", width = 15)
|
||||
@ApiModelProperty(value = "专业技术职称")
|
||||
private java.lang.String zyjszc;
|
||||
/**学科类别*/
|
||||
@Excel(name = "学科类别", width = 15)
|
||||
@ApiModelProperty(value = "学科类别")
|
||||
private java.lang.String xklb;
|
||||
/**政治面貌*/
|
||||
@Excel(name = "政治面貌", width = 15)
|
||||
@ApiModelProperty(value = "政治面貌")
|
||||
private java.lang.String zzmm;
|
||||
/**国籍*/
|
||||
@Excel(name = "国籍", width = 15)
|
||||
@ApiModelProperty(value = "国籍")
|
||||
private java.lang.String gj;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbb151.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbb151.entity.Tjbb_151;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_151
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface Tjbb_151Mapper extends BaseMapper<Tjbb_151> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbb151.mapper.Tjbb_151Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbb151.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb151.entity.Tjbb_151;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_151
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbb_151Service extends IService<Tjbb_151> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbb151.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb151.entity.Tjbb_151;
|
||||
import org.jeecg.modules.tjbb.tjbb151.mapper.Tjbb_151Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbb151.service.ITjbb_151Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_151
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class Tjbb_151ServiceImpl extends ServiceImpl<Tjbb_151Mapper, Tjbb_151> implements ITjbb_151Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbb152.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.tjbb.tjbb152.entity.Tjbb_152;
|
||||
import org.jeecg.modules.tjbb.tjbb152.service.ITjbb_152Service;
|
||||
|
||||
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: tjbb_152
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_152")
|
||||
@RestController
|
||||
@RequestMapping("/tjbb152/tjbb_152")
|
||||
@Slf4j
|
||||
public class Tjbb_152Controller extends JeecgController<Tjbb_152, ITjbb_152Service> {
|
||||
@Autowired
|
||||
private ITjbb_152Service tjbb_152Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbb_152
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_152-分页列表查询")
|
||||
@ApiOperation(value="tjbb_152-分页列表查询", notes="tjbb_152-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Tjbb_152>> queryPageList(Tjbb_152 tjbb_152,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Tjbb_152> queryWrapper = QueryGenerator.initQueryWrapper(tjbb_152, req.getParameterMap());
|
||||
Page<Tjbb_152> page = new Page<Tjbb_152>(pageNo, pageSize);
|
||||
IPage<Tjbb_152> pageList = tjbb_152Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbb_152
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_152-添加")
|
||||
@ApiOperation(value="tjbb_152-添加", notes="tjbb_152-添加")
|
||||
@RequiresPermissions("tjbb152:tjbb_152:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Tjbb_152 tjbb_152) {
|
||||
tjbb_152Service.save(tjbb_152);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbb_152
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_152-编辑")
|
||||
@ApiOperation(value="tjbb_152-编辑", notes="tjbb_152-编辑")
|
||||
@RequiresPermissions("tjbb152:tjbb_152:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Tjbb_152 tjbb_152) {
|
||||
tjbb_152Service.updateById(tjbb_152);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_152-通过id删除")
|
||||
@ApiOperation(value="tjbb_152-通过id删除", notes="tjbb_152-通过id删除")
|
||||
@RequiresPermissions("tjbb152:tjbb_152:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbb_152Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_152-批量删除")
|
||||
@ApiOperation(value="tjbb_152-批量删除", notes="tjbb_152-批量删除")
|
||||
@RequiresPermissions("tjbb152:tjbb_152:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbb_152Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_152-通过id查询")
|
||||
@ApiOperation(value="tjbb_152-通过id查询", notes="tjbb_152-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Tjbb_152> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Tjbb_152 tjbb_152 = tjbb_152Service.getById(id);
|
||||
if(tjbb_152==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbb_152);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbb_152
|
||||
*/
|
||||
@RequiresPermissions("tjbb152:tjbb_152:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_152 tjbb_152) {
|
||||
return super.exportXls(request, tjbb_152, Tjbb_152.class, "tjbb_152");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbb_152Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, Tjbb_152.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
package org.jeecg.modules.tjbb.tjbb152.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: tjbb_152
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_152")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_152对象", description="tjbb_152")
|
||||
public class Tjbb_152 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 gh;
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String xm;
|
||||
/**任教类型*/
|
||||
@Excel(name = "任教类型", width = 15)
|
||||
@ApiModelProperty(value = "任教类型")
|
||||
private java.lang.String rjlx;
|
||||
/**任教专业名称*/
|
||||
@Excel(name = "任教专业名称", width = 15)
|
||||
@ApiModelProperty(value = "任教专业名称")
|
||||
private java.lang.String rjzymc;
|
||||
/**任教专业代码*/
|
||||
@Excel(name = "任教专业代码", width = 15)
|
||||
@ApiModelProperty(value = "任教专业代码")
|
||||
private java.lang.String rjzydm;
|
||||
/**专业任教时间*/
|
||||
@Excel(name = "专业任教时间", width = 15)
|
||||
@ApiModelProperty(value = "专业任教时间")
|
||||
private java.lang.String zyrjsj;
|
||||
/**是否实验技术人员*/
|
||||
@Excel(name = "是否实验技术人员", width = 15)
|
||||
@ApiModelProperty(value = "是否实验技术人员")
|
||||
private java.lang.String sfsyjsry;
|
||||
/**是否双师双能型*/
|
||||
@Excel(name = "是否双师双能型", width = 15)
|
||||
@ApiModelProperty(value = "是否双师双能型")
|
||||
private java.lang.String sfsssnx;
|
||||
/**是否工程背景*/
|
||||
@Excel(name = "是否工程背景", width = 15)
|
||||
@ApiModelProperty(value = "是否工程背景")
|
||||
private java.lang.String sfgcbj;
|
||||
/**是否行业背景*/
|
||||
@Excel(name = "是否行业背景", width = 15)
|
||||
@ApiModelProperty(value = "是否行业背景")
|
||||
private java.lang.String sfhybj;
|
||||
/**是否具有国(境)外一年及以上经历*/
|
||||
@Excel(name = "是否具有国(境)外一年及以上经历", width = 15)
|
||||
@ApiModelProperty(value = "是否具有国(境)外一年及以上经历")
|
||||
private java.lang.String ynysjl;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String count;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package org.jeecg.modules.tjbb.tjbb152.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_152
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface Tjbb_152Mapper extends BaseMapper<Tjbb_152> {
|
||||
|
||||
List<Tjbb_152> getGroupByCountByRjzymc();
|
||||
|
||||
List<Tjbb_152> getGroupByCountByGjzc();
|
||||
|
||||
List<Tjbb_152> getGroupByCountBySbs();
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
<?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.tjbb.tjbb152.mapper.Tjbb_152Mapper">
|
||||
|
||||
<select id="getGroupByCountByRjzymc" resultType="org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152">
|
||||
select b.xnzydm as rjzydm,b.xnzymc as rjzymc,count(rjzymc) as count from tjbb_152 a,tjbb_141 b
|
||||
where a.rjzymc = b.zymc
|
||||
group by b.xnzydm,b.xnzymc
|
||||
</select>
|
||||
|
||||
<select id="getGroupByCountByGjzc" resultType="org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152">
|
||||
select b.xnzydm as rjzydm,b.xnzymc as rjzymc,count(rjzymc) as count from tjbb_152 a,tjbb_141 b,tjbb_151 c
|
||||
where a.rjzymc = b.zymc and a.gh = c.gh and c.zyjszc in ('副教授','教授','其他副高级','其他正高级')
|
||||
group by b.xnzydm,b.xnzymc
|
||||
</select>
|
||||
<select id="getGroupByCountBySbs" resultType="org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152">
|
||||
select b.xnzydm as rjzydm,b.xnzymc as rjzymc,count(rjzymc) as count from tjbb_152 a,tjbb_141 b,tjbb_151 c
|
||||
where a.rjzymc = b.zymc and a.gh = c.gh and c.zgxw in ('硕士','博士')
|
||||
group by b.xnzydm,b.xnzymc
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,21 @@
|
|||
package org.jeecg.modules.tjbb.tjbb152.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_152
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbb_152Service extends IService<Tjbb_152> {
|
||||
|
||||
List<Tjbb_152> getGroupByCountByRjzymc();
|
||||
|
||||
List<Tjbb_152> getGroupByCountByGjzc();
|
||||
|
||||
List<Tjbb_152> getGroupByCountBySbs();
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package org.jeecg.modules.tjbb.tjbb152.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152;
|
||||
import org.jeecg.modules.tjbb.tjbb152.mapper.Tjbb_152Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbb152.service.ITjbb_152Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_152
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class Tjbb_152ServiceImpl extends ServiceImpl<Tjbb_152Mapper, Tjbb_152> implements ITjbb_152Service {
|
||||
|
||||
@Override
|
||||
public List<Tjbb_152> getGroupByCountByRjzymc() {
|
||||
return baseMapper.getGroupByCountByRjzymc();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tjbb_152> getGroupByCountByGjzc() {
|
||||
return baseMapper.getGroupByCountByGjzc();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tjbb_152> getGroupByCountBySbs() {
|
||||
return baseMapper.getGroupByCountBySbs();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbb153.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.tjbb.tjbb153.entity.Tjbb_153;
|
||||
import org.jeecg.modules.tjbb.tjbb153.service.ITjbb_153Service;
|
||||
|
||||
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: tjbb_153
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_153")
|
||||
@RestController
|
||||
@RequestMapping("/tjbb153/tjbb_153")
|
||||
@Slf4j
|
||||
public class Tjbb_153Controller extends JeecgController<Tjbb_153, ITjbb_153Service> {
|
||||
@Autowired
|
||||
private ITjbb_153Service tjbb_153Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbb_153
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_153-分页列表查询")
|
||||
@ApiOperation(value="tjbb_153-分页列表查询", notes="tjbb_153-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Tjbb_153>> queryPageList(Tjbb_153 tjbb_153,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Tjbb_153> queryWrapper = QueryGenerator.initQueryWrapper(tjbb_153, req.getParameterMap());
|
||||
Page<Tjbb_153> page = new Page<Tjbb_153>(pageNo, pageSize);
|
||||
IPage<Tjbb_153> pageList = tjbb_153Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbb_153
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_153-添加")
|
||||
@ApiOperation(value="tjbb_153-添加", notes="tjbb_153-添加")
|
||||
@RequiresPermissions("tjbb153:tjbb_153:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Tjbb_153 tjbb_153) {
|
||||
tjbb_153Service.save(tjbb_153);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbb_153
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_153-编辑")
|
||||
@ApiOperation(value="tjbb_153-编辑", notes="tjbb_153-编辑")
|
||||
@RequiresPermissions("tjbb153:tjbb_153:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Tjbb_153 tjbb_153) {
|
||||
tjbb_153Service.updateById(tjbb_153);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_153-通过id删除")
|
||||
@ApiOperation(value="tjbb_153-通过id删除", notes="tjbb_153-通过id删除")
|
||||
@RequiresPermissions("tjbb153:tjbb_153:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbb_153Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_153-批量删除")
|
||||
@ApiOperation(value="tjbb_153-批量删除", notes="tjbb_153-批量删除")
|
||||
@RequiresPermissions("tjbb153:tjbb_153:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbb_153Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_153-通过id查询")
|
||||
@ApiOperation(value="tjbb_153-通过id查询", notes="tjbb_153-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Tjbb_153> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Tjbb_153 tjbb_153 = tjbb_153Service.getById(id);
|
||||
if(tjbb_153==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbb_153);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbb_153
|
||||
*/
|
||||
@RequiresPermissions("tjbb153:tjbb_153:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_153 tjbb_153) {
|
||||
return super.exportXls(request, tjbb_153, Tjbb_153.class, "tjbb_153");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbb_153Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, Tjbb_153.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package org.jeecg.modules.tjbb.tjbb153.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: tjbb_153
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_153")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_153对象", description="tjbb_153")
|
||||
public class Tjbb_153 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 gh;
|
||||
/**姓名*/
|
||||
@Excel(name = "姓名", width = 15)
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private java.lang.String xm;
|
||||
/**性别*/
|
||||
@Excel(name = "性别", width = 15)
|
||||
@ApiModelProperty(value = "性别")
|
||||
private java.lang.String xb;
|
||||
/**出生年月*/
|
||||
@Excel(name = "出生年月", width = 15)
|
||||
@ApiModelProperty(value = "出生年月")
|
||||
private java.lang.String csny;
|
||||
/**聘任时间*/
|
||||
@Excel(name = "聘任时间", width = 15)
|
||||
@ApiModelProperty(value = "聘任时间")
|
||||
private java.lang.String prsj;
|
||||
/**任职状态*/
|
||||
@Excel(name = "任职状态", width = 15)
|
||||
@ApiModelProperty(value = "任职状态")
|
||||
private java.lang.String rzzt;
|
||||
/**聘期*/
|
||||
@Excel(name = "聘期", width = 15)
|
||||
@ApiModelProperty(value = "聘期")
|
||||
private java.lang.String pq;
|
||||
/**单位号*/
|
||||
@Excel(name = "单位号", width = 15)
|
||||
@ApiModelProperty(value = "单位号")
|
||||
private java.lang.String dwh;
|
||||
/**单位名称*/
|
||||
@Excel(name = "单位名称", width = 15)
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private java.lang.String dwmc;
|
||||
/**学历*/
|
||||
@Excel(name = "学历", width = 15)
|
||||
@ApiModelProperty(value = "学历")
|
||||
private java.lang.String xl;
|
||||
/**最高学位*/
|
||||
@Excel(name = "最高学位", width = 15)
|
||||
@ApiModelProperty(value = "最高学位")
|
||||
private java.lang.String zgxw;
|
||||
/**专业技术职称*/
|
||||
@Excel(name = "专业技术职称", width = 15)
|
||||
@ApiModelProperty(value = "专业技术职称")
|
||||
private java.lang.String zyjszc;
|
||||
/**工作单位类别*/
|
||||
@Excel(name = "工作单位类别", width = 15)
|
||||
@ApiModelProperty(value = "工作单位类别")
|
||||
private java.lang.String gzdwlb;
|
||||
/**承担本科教学任务*/
|
||||
@Excel(name = "承担本科教学任务", width = 15)
|
||||
@ApiModelProperty(value = "承担本科教学任务")
|
||||
private java.lang.String cdbkjxrw;
|
||||
/**地区*/
|
||||
@Excel(name = "地区", width = 15)
|
||||
@ApiModelProperty(value = "地区")
|
||||
private java.lang.String dq;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbb153.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbb153.entity.Tjbb_153;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_153
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface Tjbb_153Mapper extends BaseMapper<Tjbb_153> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbb153.mapper.Tjbb_153Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbb153.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb153.entity.Tjbb_153;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_153
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbb_153Service extends IService<Tjbb_153> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbb153.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb153.entity.Tjbb_153;
|
||||
import org.jeecg.modules.tjbb.tjbb153.mapper.Tjbb_153Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbb153.service.ITjbb_153Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_153
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class Tjbb_153ServiceImpl extends ServiceImpl<Tjbb_153Mapper, Tjbb_153> implements ITjbb_153Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,757 @@
|
|||
package org.jeecg.modules.tjbb.tjbb16.controller;
|
||||
|
||||
import com.alibaba.druid.util.StringUtils;
|
||||
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.poi.ss.usermodel.Workbook;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
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.constant.SymbolConstant;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
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.tjbb.tjbb141.entity.Tjbb_141;
|
||||
import org.jeecg.modules.tjbb.tjbb141.service.ITjbb_141Service;
|
||||
import org.jeecg.modules.tjbb.tjbb151.service.ITjbb_151Service;
|
||||
import org.jeecg.modules.tjbb.tjbb152.entity.Tjbb_152;
|
||||
import org.jeecg.modules.tjbb.tjbb152.service.ITjbb_152Service;
|
||||
import org.jeecg.modules.tjbb.tjbb153.service.ITjbb_153Service;
|
||||
import org.jeecg.modules.tjbb.tjbb16.entity.Tjbb_16;
|
||||
import org.jeecg.modules.tjbb.tjbb16.service.ITjbb_16Service;
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
import org.jeecg.modules.tjbb.tjbb24.service.ITjbb_24Service;
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.entity.TjbbSf11;
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.service.ITjbbSf11Service;
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.entity.TjbbSf3;
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.service.ITjbbSf3Service;
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.entity.TjbbSf5;
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.service.ITjbbSf5Service;
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.service.ITjbbSf6Service;
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.entity.TjbbSf8;
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.service.ITjbbSf8Service;
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.entity.TjbbSf9;
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.service.ITjbbSf9Service;
|
||||
import org.jeecgframework.poi.excel.ExcelExportUtil;
|
||||
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.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.ServletOutputStream;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: tjbb
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tjbb/tjbb")
|
||||
@Slf4j
|
||||
public class TjbbController extends JeecgController<Tjbb_16, ITjbb_16Service> {
|
||||
@Autowired
|
||||
private ITjbb_16Service tjbb_16Service;
|
||||
@Autowired
|
||||
private ITjbb_24Service tjbb_24Service;
|
||||
@Autowired
|
||||
private ITjbb_141Service tjbb_141Service;
|
||||
@Autowired
|
||||
private ITjbb_151Service tjbb_151Service;
|
||||
@Autowired
|
||||
private ITjbb_152Service tjbb_152Service;
|
||||
@Autowired
|
||||
private ITjbb_153Service tjbb_153Service;
|
||||
@Autowired
|
||||
private ITjbbSf3Service tjbbSf3Service;
|
||||
@Autowired
|
||||
private ITjbbSf5Service tjbbSf5Service;
|
||||
@Autowired
|
||||
private ITjbbSf6Service tjbbSf6Service;
|
||||
@Autowired
|
||||
private ITjbbSf8Service tjbbSf8Service;
|
||||
@Autowired
|
||||
private ITjbbSf9Service tjbbSf9Service;
|
||||
@Autowired
|
||||
private ITjbbSf11Service tjbbSf11Service;
|
||||
|
||||
@Resource
|
||||
private JeecgBaseConfig jeecgBaseConfig;
|
||||
|
||||
|
||||
@GetMapping(value = "/list")
|
||||
public Result<Map<String,Object>> queryPageList() {
|
||||
long t16 = tjbb_16Service.count();
|
||||
long t24 = tjbb_24Service.count();
|
||||
long t141 = tjbb_141Service.count();
|
||||
long t151 = tjbb_151Service.count();
|
||||
long t152 = tjbb_152Service.count();
|
||||
long t153 = tjbb_153Service.count();
|
||||
long tsf3 = tjbbSf3Service.count();
|
||||
long tsf5 = tjbbSf5Service.count();
|
||||
long tsf6 = tjbbSf6Service.count();
|
||||
long tsf8 = tjbbSf8Service.count();
|
||||
long tsf9 = tjbbSf9Service.count();
|
||||
long tsf11 = tjbbSf11Service.count();
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("t16",t16);
|
||||
map.put("t24",t24);
|
||||
map.put("t141",t141);
|
||||
map.put("t151",t151);
|
||||
map.put("t152",t152);
|
||||
map.put("t153",t153);
|
||||
map.put("tsf3",tsf3);
|
||||
map.put("tsf5",tsf5);
|
||||
map.put("tsf6",tsf6);
|
||||
map.put("tsf8",tsf8);
|
||||
map.put("tsf9",tsf9);
|
||||
map.put("tsf11",tsf11);
|
||||
return Result.OK(map);
|
||||
}
|
||||
|
||||
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete() {
|
||||
tjbb_16Service.remove(new QueryWrapper<>());
|
||||
tjbb_24Service.remove(new QueryWrapper<>());
|
||||
tjbb_141Service.remove(new QueryWrapper<>());
|
||||
tjbb_151Service.remove(new QueryWrapper<>());
|
||||
tjbb_152Service.remove(new QueryWrapper<>());
|
||||
tjbb_153Service.remove(new QueryWrapper<>());
|
||||
tjbbSf3Service.remove(new QueryWrapper<>());
|
||||
tjbbSf5Service.remove(new QueryWrapper<>());
|
||||
tjbbSf6Service.remove(new QueryWrapper<>());
|
||||
tjbbSf8Service.remove(new QueryWrapper<>());
|
||||
tjbbSf9Service.remove(new QueryWrapper<>());
|
||||
tjbbSf11Service.remove(new QueryWrapper<>());
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_16 tjbb_16,HttpServletResponse response) throws Exception {
|
||||
// Step.1 组装查询条件
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
List<ExcelExportEntity> entityList = new ArrayList<>();
|
||||
|
||||
//获取列头
|
||||
QueryWrapper<Tjbb_141> tjbb141QueryWrapper = new QueryWrapper<>();
|
||||
tjbb141QueryWrapper.eq("sfsflzy","S");
|
||||
tjbb141QueryWrapper.orderByAsc("xnzydm");
|
||||
List<Tjbb_141> headList = tjbb_141Service.list(tjbb141QueryWrapper);
|
||||
|
||||
//表头
|
||||
List<String> heade = new ArrayList<>();
|
||||
heade.add("维度");
|
||||
heade.add("监测指标");
|
||||
heade.add("监测指标1");
|
||||
heade.add("监测指标2");
|
||||
heade.add("一级参考标准");
|
||||
for(Tjbb_141 par : headList){
|
||||
heade.add(par.getXnzymc());
|
||||
}
|
||||
//动态表头
|
||||
for(String data: heade){
|
||||
ExcelExportEntity excelExportEntity = new ExcelExportEntity(data,data);
|
||||
// excelExportEntity.setMergeVertical(true);
|
||||
entityList.add(excelExportEntity);
|
||||
}
|
||||
|
||||
//表数据
|
||||
List<Map<String, Object>> pageList = new ArrayList<>();
|
||||
Map<String,Object> objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","1");
|
||||
objectMap.put("监测指标1","教师教育课程学分");
|
||||
objectMap.put("监测指标2","必修课");
|
||||
objectMap.put("一级参考标准","必修课≥10学分");
|
||||
|
||||
List<TjbbSf5> zbsf5List = tjbbSf5Service.list(new QueryWrapper<>());
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getJsjykcbx).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教师教育课程学分");
|
||||
objectMap.put("监测指标2","总学分");
|
||||
objectMap.put("一级参考标准","总学分≥14学分");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getJsjykcxj).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","2");
|
||||
objectMap.put("监测指标1","人文社会与科学素养课程学分占总学分比例");
|
||||
objectMap.put("监测指标2"," ");
|
||||
objectMap.put("一级参考标准","≥10%");
|
||||
for(Tjbb_141 par : headList){
|
||||
String rwshykxsykc = zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getRwshykxsykc).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String xfzj = zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getXfzj).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
objectMap.put(par.getXnzymc(), StringUtils.isEmpty(xfzj)?null:new DecimalFormat("#.00%").format(Double.parseDouble(rwshykxsykc)/Double.parseDouble(xfzj)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","人文社会与科学素养课程学分");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getRwshykxsykc).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","总学分");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getXfzj).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","3");
|
||||
objectMap.put("监测指标1","学科专业课程学分占总学分比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥50%");
|
||||
for(Tjbb_141 par : headList){
|
||||
String xkzykc = zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getXkzykc).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String xfzj = zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getXfzj).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
objectMap.put(par.getXnzymc(), StringUtils.isEmpty(xfzj)?null:new DecimalFormat("#.00%").format(Double.parseDouble(xkzykc)/Double.parseDouble(xfzj)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","学科专业课程学分");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getXkzykc).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","课程与教学");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","总学分");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getXfzj).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","合作与实践");
|
||||
objectMap.put("监测指标","4");
|
||||
objectMap.put("监测指标1","教育实践时间");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥18周");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getJysjsjzj).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","合作与实践");
|
||||
objectMap.put("监测指标","5");
|
||||
objectMap.put("监测指标1","实习生数与教育实践基地数比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≤20:1");
|
||||
|
||||
List<Tjbb_24> zb24GpzyList = tjbb_24Service.getGroupByCountByXnzydm();
|
||||
for(Tjbb_141 par : headList){
|
||||
String sxss = zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getCjjysjsfssxzs).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String jdzs = zb24GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(Tjbb_24::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
if(!StringUtils.isEmpty(sxss) && !StringUtils.isEmpty(jdzs)){
|
||||
objectMap.put(par.getXnzymc(), StringUtils.isEmpty(jdzs)?null:new DecimalFormat("#.00%").format(Double.parseDouble(sxss)/Double.parseDouble(jdzs)));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","合作与实践");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","实习生数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf5List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf5::getCjjysjsfssxzs).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","合作与实践");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教育实践基地数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb24GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(Tjbb_24::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
List<Tjbb_16> zb16GpzyList = tjbb_16Service.getGroupByCountByXnzydm();
|
||||
List<TjbbSf9> zbsf9GpzyList = tjbbSf9Service.list();
|
||||
List<Tjbb_152> zb152GpzyList = tjbb_152Service.getGroupByCountByRjzymc();
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","6");
|
||||
objectMap.put("监测指标1","生师比");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≤18:1");
|
||||
for(Tjbb_141 par : headList){
|
||||
String bkss = zb16GpzyList.stream().filter(zb->zb.getXnzydldm().equals(par.getXnzydm())).map(Tjbb_16::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String jysss = zbsf9GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf9::getSsyjss).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String jybss = zbsf9GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf9::getBsyjss).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String lxss = zbsf9GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf9::getBzklxss).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String bzyjss = zb152GpzyList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
|
||||
if(!StringUtils.isEmpty(bzyjss) ){
|
||||
if(StringUtils.isEmpty(bkss)){
|
||||
bkss = "0";
|
||||
}
|
||||
if(StringUtils.isEmpty(jysss)){
|
||||
jysss = "0";
|
||||
}
|
||||
if(StringUtils.isEmpty(jybss)){
|
||||
jybss = "0";
|
||||
}
|
||||
if(StringUtils.isEmpty(lxss)){
|
||||
lxss = "0";
|
||||
}
|
||||
Double tj = Double.parseDouble(bkss) + Double.parseDouble(jysss) + Double.parseDouble(jybss) - Double.parseDouble(lxss);
|
||||
objectMap.put(par.getXnzymc(), StringUtils.isEmpty(bzyjss)?null:new DecimalFormat("#.00%").format(tj/Double.parseDouble(bzyjss)));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","专业本科生数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb16GpzyList.stream().filter(zb->zb.getXnzydldm().equals(par.getXnzydm())).map(Tjbb_16::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教育硕士数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf9GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf9::getSsyjss).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教育博士数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf9GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf9::getBsyjss).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","留学生数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf9GpzyList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf9::getBzklxss).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本专业专业教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb152GpzyList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
//此项模板忽略
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","7");
|
||||
objectMap.put("监测指标1","学科课程与教学论教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","有");
|
||||
pageList.add(objectMap);
|
||||
|
||||
|
||||
|
||||
List<Tjbb_152> zb152GpgjList = tjbb_152Service.getGroupByCountByGjzc();
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","8");
|
||||
objectMap.put("监测指标1","具有高级职称教师占专任教师比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥学校平均水平");
|
||||
for(Tjbb_141 par : headList){
|
||||
String gjzc = zb152GpgjList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String allteacher = zb152GpzyList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
if(!StringUtils.isEmpty(allteacher)){
|
||||
if(StringUtils.isEmpty(gjzc)){
|
||||
gjzc = "0";
|
||||
}
|
||||
objectMap.put(par.getXnzymc(),StringUtils.isEmpty(allteacher)?null:new DecimalFormat("#.00%").format(Double.parseDouble(gjzc)/Double.parseDouble(allteacher)));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","高级职称教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb152GpgjList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本专业专业教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb152GpzyList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
|
||||
List<Tjbb_152> zb152SbsList = tjbb_152Service.getGroupByCountBySbs();
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","9");
|
||||
objectMap.put("监测指标1","具有硕博士学位教师占专任教师比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥60%");
|
||||
for(Tjbb_141 par : headList){
|
||||
String gjzc = zb152GpgjList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String allteacher = zb152SbsList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
if(!StringUtils.isEmpty(allteacher)){
|
||||
if(StringUtils.isEmpty(gjzc)){
|
||||
gjzc = "0";
|
||||
}
|
||||
objectMap.put(par.getXnzymc(),StringUtils.isEmpty(allteacher)?null:new DecimalFormat("#.00%").format(Double.parseDouble(gjzc)/Double.parseDouble(allteacher)));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","硕博士学位教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb152SbsList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本专业专业教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb152GpzyList.stream().filter(zb->zb.getRjzydm().equals(par.getXnzydm())).map(Tjbb_152::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
//todo 待完善
|
||||
|
||||
List<TjbbSf8> zbsf8AllList = tjbbSf8Service.getJsAllList();
|
||||
List<TjbbSf8> zbsf8jzjsList = tjbbSf8Service.getJsJzjsList();
|
||||
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","10");
|
||||
objectMap.put("监测指标1","中学兼职教师占教师教育课程教师比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥20%");
|
||||
for(Tjbb_141 par : headList){
|
||||
String jzjss = zbsf8jzjsList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf8::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String alljss = zbsf8AllList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf8::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
if(!StringUtils.isEmpty(alljss)){
|
||||
if(StringUtils.isEmpty(jzjss)){
|
||||
jzjss = "0";
|
||||
}
|
||||
objectMap.put(par.getXnzymc(),StringUtils.isEmpty(alljss)?null:new DecimalFormat("#.00%").format(Double.parseDouble(jzjss)/(Double.parseDouble(alljss))));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本专业中学兼职教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf8jzjsList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf8::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","师资队伍");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本专业教师教育教师");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf8AllList.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf8::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
|
||||
List<TjbbSf3> zbsf3List = tjbbSf3Service.list();
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","11");
|
||||
objectMap.put("监测指标1","教学日常运行支出占生均拨款总额与学费收入之和的比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥13%");
|
||||
for(Tjbb_141 par : headList){
|
||||
String jxrcyxzc = zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getJxrcyxzc).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String sjbkze = zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getSjbkze).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String xfsrzh = zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getXfsrzh).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
if(!StringUtils.isEmpty(jxrcyxzc)){
|
||||
if(StringUtils.isEmpty(sjbkze)){
|
||||
sjbkze = "0";
|
||||
}
|
||||
if(StringUtils.isEmpty(xfsrzh)){
|
||||
xfsrzh = "0";
|
||||
}
|
||||
objectMap.put(par.getXnzymc(),StringUtils.isEmpty(jxrcyxzc)?null:new DecimalFormat("#.00%").format(Double.parseDouble(jxrcyxzc)/(Double.parseDouble(xfsrzh)+Double.parseDouble(sjbkze))));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教学日常运行支出");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getJxrcyxzc).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","生均拨款总额");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getSjbkze).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","学费收入");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getXfsrzh).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","12");
|
||||
objectMap.put("监测指标1","生均教学日常运行支出");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准"," ≥学校平均水平");
|
||||
pageList.add(objectMap);
|
||||
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教学日常运行支出");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getJxrcyxzc).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本科在校生");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb16GpzyList.stream().filter(zb->zb.getXnzydldm().equals(par.getXnzydm())).map(Tjbb_16::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","13");
|
||||
objectMap.put("监测指标1","生均教育实践经费");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥学校平均水平");
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","教育实践经费");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbsf3List.stream().filter(zb->zb.getXnzydm().equals(par.getXnzydm())).map(TjbbSf3::getJysjjf).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","本科在校生");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb16GpzyList.stream().filter(zb->zb.getXnzydldm().equals(par.getXnzydm())).map(Tjbb_16::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
//模板忽略
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","14");
|
||||
objectMap.put("监测指标1","生均教育类纸质图书");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥30册");
|
||||
pageList.add(objectMap);
|
||||
|
||||
//模板忽略
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","每6个实习生配备中学学科教材≥1套");
|
||||
pageList.add(objectMap);
|
||||
|
||||
//模板忽略
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","支持条件");
|
||||
objectMap.put("监测指标","15");
|
||||
objectMap.put("监测指标1","微格教学、语言技能、书写技能、学科实验教学实训室等教学设施");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","有");
|
||||
pageList.add(objectMap);
|
||||
|
||||
List<Tjbb_16> zb16Bjy = tjbb_16Service.getBjyrsList();
|
||||
List<TjbbSf11> zbSf11List = tjbbSf11Service.list();
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","学生发展");
|
||||
objectMap.put("监测指标","16");
|
||||
objectMap.put("监测指标1","教师资格证比例");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","≥75%");
|
||||
for(Tjbb_141 par : headList){
|
||||
String jszgz = zbSf11List.stream().filter(zb->zb.getXnzymc().equals(par.getXnzymc())).map(TjbbSf11::getJszgz).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
String bjyrs = zb16Bjy.stream().filter(zb->zb.getXnzydldm().equals(par.getXnzydm())).map(Tjbb_16::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON));
|
||||
if(!StringUtils.isEmpty(jszgz)){
|
||||
if(StringUtils.isEmpty(bjyrs)){
|
||||
bjyrs = "0";
|
||||
}
|
||||
objectMap.put(par.getXnzymc(),StringUtils.isEmpty(jszgz)?null:new DecimalFormat("#.00%").format(Double.parseDouble(jszgz)/Double.parseDouble(bjyrs)));
|
||||
}
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","学生发展");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","取得教师资格证人数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zbSf11List.stream().filter(zb->zb.getXnzymc().equals(par.getXnzymc())).map(TjbbSf11::getJszgz).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
objectMap = new HashMap<>();
|
||||
objectMap.put("维度","学生发展");
|
||||
objectMap.put("监测指标","");
|
||||
objectMap.put("监测指标1","毕业生人数");
|
||||
objectMap.put("监测指标2","");
|
||||
objectMap.put("一级参考标准","");
|
||||
for(Tjbb_141 par : headList){
|
||||
objectMap.put(par.getXnzymc(),zb16Bjy.stream().filter(zb->zb.getXnzydldm().equals(par.getXnzydm())).map(Tjbb_16::getCount).collect(Collectors.joining(SymbolConstant.SEMICOLON)));
|
||||
}
|
||||
pageList.add(objectMap);
|
||||
|
||||
|
||||
|
||||
|
||||
Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams("2024年师范专业监测数据","导出人:"+sysUser.getRealname(), "2024年师范专业监测数据"),entityList,pageList);
|
||||
ServletOutputStream out = response.getOutputStream();
|
||||
workbook.write(out);
|
||||
out.flush();
|
||||
ModelAndView modelAndView = new ModelAndView();
|
||||
modelAndView.addObject(out);
|
||||
|
||||
return modelAndView;
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
package org.jeecg.modules.tjbb.tjbb16.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.tjbb.tjbb16.entity.Tjbb_16;
|
||||
import org.jeecg.modules.tjbb.tjbb16.service.ITjbb_16Service;
|
||||
|
||||
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: tjbb_16
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_16")
|
||||
@RestController
|
||||
@RequestMapping("/tjbb16/tjbb_16")
|
||||
@Slf4j
|
||||
public class Tjbb_16Controller extends JeecgController<Tjbb_16, ITjbb_16Service> {
|
||||
@Autowired
|
||||
private ITjbb_16Service tjbb_16Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbb_16
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_16-分页列表查询")
|
||||
@ApiOperation(value="tjbb_16-分页列表查询", notes="tjbb_16-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Tjbb_16>> queryPageList(Tjbb_16 tjbb_16,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Tjbb_16> queryWrapper = QueryGenerator.initQueryWrapper(tjbb_16, req.getParameterMap());
|
||||
Page<Tjbb_16> page = new Page<Tjbb_16>(pageNo, pageSize);
|
||||
IPage<Tjbb_16> pageList = tjbb_16Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbb_16
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_16-添加")
|
||||
@ApiOperation(value="tjbb_16-添加", notes="tjbb_16-添加")
|
||||
@RequiresPermissions("tjbb16:tjbb_16:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Tjbb_16 tjbb_16) {
|
||||
tjbb_16Service.save(tjbb_16);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbb_16
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_16-编辑")
|
||||
@ApiOperation(value="tjbb_16-编辑", notes="tjbb_16-编辑")
|
||||
@RequiresPermissions("tjbb16:tjbb_16:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Tjbb_16 tjbb_16) {
|
||||
tjbb_16Service.updateById(tjbb_16);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_16-通过id删除")
|
||||
@ApiOperation(value="tjbb_16-通过id删除", notes="tjbb_16-通过id删除")
|
||||
@RequiresPermissions("tjbb16:tjbb_16:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbb_16Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_16-批量删除")
|
||||
@ApiOperation(value="tjbb_16-批量删除", notes="tjbb_16-批量删除")
|
||||
@RequiresPermissions("tjbb16:tjbb_16:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbb_16Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_16-通过id查询")
|
||||
@ApiOperation(value="tjbb_16-通过id查询", notes="tjbb_16-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Tjbb_16> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Tjbb_16 tjbb_16 = tjbb_16Service.getById(id);
|
||||
if(tjbb_16==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbb_16);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbb_16
|
||||
*/
|
||||
@RequiresPermissions("tjbb16:tjbb_16:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_16 tjbb_16) {
|
||||
return super.exportXls(request, tjbb_16, Tjbb_16.class, "tjbb_16");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel2(request, response, Tjbb_16.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package org.jeecg.modules.tjbb.tjbb16.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: tjbb_16
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_16")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_16对象", description="tjbb_16")
|
||||
public class Tjbb_16 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 xh;
|
||||
/**学生姓名*/
|
||||
@Excel(name = "学生姓名", width = 15)
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private java.lang.String xsxm;
|
||||
/**性别*/
|
||||
@Excel(name = "性别", width = 15)
|
||||
@ApiModelProperty(value = "性别")
|
||||
private java.lang.String xb;
|
||||
/**校内专业(大类)名称*/
|
||||
@Excel(name = "校内专业(大类)名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业(大类)名称")
|
||||
private java.lang.String xnzydlmc;
|
||||
/**校内专业(大类)代码*/
|
||||
@Excel(name = "校内专业(大类)代码", width = 15)
|
||||
@ApiModelProperty(value = "校内专业(大类)代码")
|
||||
private java.lang.String xnzydldm;
|
||||
/**生源类别*/
|
||||
@Excel(name = "生源类别", width = 15)
|
||||
@ApiModelProperty(value = "生源类别")
|
||||
private java.lang.String sylb;
|
||||
/**学生类别*/
|
||||
@Excel(name = "学生类别", width = 15)
|
||||
@ApiModelProperty(value = "学生类别")
|
||||
private java.lang.String xslb;
|
||||
/**年级*/
|
||||
@Excel(name = "年级", width = 15)
|
||||
@ApiModelProperty(value = "年级")
|
||||
private java.lang.String nj;
|
||||
/**入学年份*/
|
||||
@Excel(name = "入学年份", width = 15)
|
||||
@ApiModelProperty(value = "入学年份")
|
||||
private java.lang.String rxnf;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String count;
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.jeecg.modules.tjbb.tjbb16.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbb16.entity.Tjbb_16;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_16
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface Tjbb_16Mapper extends BaseMapper<Tjbb_16> {
|
||||
|
||||
List<Tjbb_16> getGroupByCountByXnzydm();
|
||||
|
||||
List<Tjbb_16> getBjyrsList();
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?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.tjbb.tjbb16.mapper.Tjbb_16Mapper">
|
||||
|
||||
<select id="getGroupByCountByXnzydm" resultType="org.jeecg.modules.tjbb.tjbb16.entity.Tjbb_16">
|
||||
select count(xnzydlmc) as count ,xnzydlmc,xnzydldm from tjbb_16 where xslb = '在校生' GROUP BY xnzydlmc,xnzydldm
|
||||
</select>
|
||||
|
||||
<select id="getBjyrsList" resultType="org.jeecg.modules.tjbb.tjbb16.entity.Tjbb_16">
|
||||
select count(xnzydlmc) as count ,xnzydlmc,xnzydldm from tjbb_16 where xslb = '当年毕结业' GROUP BY xnzydlmc,xnzydldm
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.tjbb.tjbb16.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb16.entity.Tjbb_16;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_16
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbb_16Service extends IService<Tjbb_16> {
|
||||
|
||||
List<Tjbb_16> getGroupByCountByXnzydm();
|
||||
|
||||
List<Tjbb_16> getBjyrsList();
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package org.jeecg.modules.tjbb.tjbb16.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb16.entity.Tjbb_16;
|
||||
import org.jeecg.modules.tjbb.tjbb16.mapper.Tjbb_16Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbb16.service.ITjbb_16Service;
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_16
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class Tjbb_16ServiceImpl extends ServiceImpl<Tjbb_16Mapper, Tjbb_16> implements ITjbb_16Service {
|
||||
|
||||
@Override
|
||||
public List<Tjbb_16> getGroupByCountByXnzydm() {
|
||||
return baseMapper.getGroupByCountByXnzydm();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Tjbb_16> getBjyrsList() {
|
||||
return baseMapper.getBjyrsList();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbb24.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.tjbb.tjbb24.entity.Tjbb_24;
|
||||
import org.jeecg.modules.tjbb.tjbb24.service.ITjbb_24Service;
|
||||
|
||||
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: tjbb_24
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_24")
|
||||
@RestController
|
||||
@RequestMapping("/tjbb24/tjbb_24")
|
||||
@Slf4j
|
||||
public class Tjbb_24Controller extends JeecgController<Tjbb_24, ITjbb_24Service> {
|
||||
@Autowired
|
||||
private ITjbb_24Service tjbb_24Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbb_24
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_24-分页列表查询")
|
||||
@ApiOperation(value="tjbb_24-分页列表查询", notes="tjbb_24-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<Tjbb_24>> queryPageList(Tjbb_24 tjbb_24,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Tjbb_24> queryWrapper = QueryGenerator.initQueryWrapper(tjbb_24, req.getParameterMap());
|
||||
Page<Tjbb_24> page = new Page<Tjbb_24>(pageNo, pageSize);
|
||||
IPage<Tjbb_24> pageList = tjbb_24Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbb_24
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_24-添加")
|
||||
@ApiOperation(value="tjbb_24-添加", notes="tjbb_24-添加")
|
||||
@RequiresPermissions("tjbb24:tjbb_24:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody Tjbb_24 tjbb_24) {
|
||||
tjbb_24Service.save(tjbb_24);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbb_24
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_24-编辑")
|
||||
@ApiOperation(value="tjbb_24-编辑", notes="tjbb_24-编辑")
|
||||
@RequiresPermissions("tjbb24:tjbb_24:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody Tjbb_24 tjbb_24) {
|
||||
tjbb_24Service.updateById(tjbb_24);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_24-通过id删除")
|
||||
@ApiOperation(value="tjbb_24-通过id删除", notes="tjbb_24-通过id删除")
|
||||
@RequiresPermissions("tjbb24:tjbb_24:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbb_24Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_24-批量删除")
|
||||
@ApiOperation(value="tjbb_24-批量删除", notes="tjbb_24-批量删除")
|
||||
@RequiresPermissions("tjbb24:tjbb_24:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbb_24Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_24-通过id查询")
|
||||
@ApiOperation(value="tjbb_24-通过id查询", notes="tjbb_24-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<Tjbb_24> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
Tjbb_24 tjbb_24 = tjbb_24Service.getById(id);
|
||||
if(tjbb_24==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbb_24);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbb_24
|
||||
*/
|
||||
@RequiresPermissions("tjbb24:tjbb_24:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, Tjbb_24 tjbb_24) {
|
||||
return super.exportXls(request, tjbb_24, Tjbb_24.class, "tjbb_24");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbb_24Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, Tjbb_24.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,92 @@
|
|||
package org.jeecg.modules.tjbb.tjbb24.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: tjbb_24
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_24")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_24对象", description="tjbb_24")
|
||||
public class Tjbb_24 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 jdmc;
|
||||
/**地点*/
|
||||
@Excel(name = "地点", width = 15)
|
||||
@ApiModelProperty(value = "地点")
|
||||
private java.lang.String dd;
|
||||
/**建立时间*/
|
||||
@Excel(name = "建立时间", width = 15)
|
||||
@ApiModelProperty(value = "建立时间")
|
||||
private java.lang.String zlsj;
|
||||
/**面向校内专业*/
|
||||
@Excel(name = "面向校内专业", width = 15)
|
||||
@ApiModelProperty(value = "面向校内专业")
|
||||
private java.lang.String mxxnzy;
|
||||
/**校内专业代码*/
|
||||
@Excel(name = "校内专业代码", width = 15)
|
||||
@ApiModelProperty(value = "校内专业代码")
|
||||
private java.lang.String xnzydm;
|
||||
/**是否是创业实习基地*/
|
||||
@Excel(name = "是否是创业实习基地", width = 15)
|
||||
@ApiModelProperty(value = "是否是创业实习基地")
|
||||
private java.lang.String sfscysxjd;
|
||||
/**是否是示范性教育实践基地*/
|
||||
@Excel(name = "是否是示范性教育实践基地", width = 15)
|
||||
@ApiModelProperty(value = "是否是示范性教育实践基地")
|
||||
private java.lang.String sfjyjd;
|
||||
/**当年接纳学生总数(人次)*/
|
||||
@Excel(name = "当年接纳学生总数(人次)", width = 15)
|
||||
@ApiModelProperty(value = "当年接纳学生总数(人次)")
|
||||
private java.lang.String jnxszs;
|
||||
/**是否与行业企业共建*/
|
||||
@Excel(name = "是否与行业企业共建", width = 15)
|
||||
@ApiModelProperty(value = "是否与行业企业共建")
|
||||
private java.lang.String sfyhyqygj;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String count;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package org.jeecg.modules.tjbb.tjbb24.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_24
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface Tjbb_24Mapper extends BaseMapper<Tjbb_24> {
|
||||
|
||||
List<Tjbb_24> getGroupByCountByXnzydm();
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
<?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.tjbb.tjbb24.mapper.Tjbb_24Mapper">
|
||||
|
||||
<select id="getGroupByCountByXnzydm" resultType="org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24">
|
||||
select mxxnzy,xnzydm,count(mxxnzy) as count from tjbb_24 group by mxxnzy,xnzydm
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbb24.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_24
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbb_24Service extends IService<Tjbb_24> {
|
||||
|
||||
List<Tjbb_24> getGroupByCountByXnzydm();
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package org.jeecg.modules.tjbb.tjbb24.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbb24.entity.Tjbb_24;
|
||||
import org.jeecg.modules.tjbb.tjbb24.mapper.Tjbb_24Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbb24.service.ITjbb_24Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_24
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class Tjbb_24ServiceImpl extends ServiceImpl<Tjbb_24Mapper, Tjbb_24> implements ITjbb_24Service {
|
||||
|
||||
@Override
|
||||
public List<Tjbb_24> getGroupByCountByXnzydm() {
|
||||
return baseMapper.getGroupByCountByXnzydm();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf11.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.tjbb.tjbbSf11.entity.TjbbSf11;
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.service.ITjbbSf11Service;
|
||||
|
||||
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: tjbb_sf11
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_sf11")
|
||||
@RestController
|
||||
@RequestMapping("/tjbbSf11/tjbbSf11")
|
||||
@Slf4j
|
||||
public class TjbbSf11Controller extends JeecgController<TjbbSf11, ITjbbSf11Service> {
|
||||
@Autowired
|
||||
private ITjbbSf11Service tjbbSf11Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbbSf11
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf11-分页列表查询")
|
||||
@ApiOperation(value="tjbb_sf11-分页列表查询", notes="tjbb_sf11-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TjbbSf11>> queryPageList(TjbbSf11 tjbbSf11,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TjbbSf11> queryWrapper = QueryGenerator.initQueryWrapper(tjbbSf11, req.getParameterMap());
|
||||
Page<TjbbSf11> page = new Page<TjbbSf11>(pageNo, pageSize);
|
||||
IPage<TjbbSf11> pageList = tjbbSf11Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbbSf11
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf11-添加")
|
||||
@ApiOperation(value="tjbb_sf11-添加", notes="tjbb_sf11-添加")
|
||||
@RequiresPermissions("tjbbSf11:tjbb_sf11:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TjbbSf11 tjbbSf11) {
|
||||
tjbbSf11Service.save(tjbbSf11);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbbSf11
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf11-编辑")
|
||||
@ApiOperation(value="tjbb_sf11-编辑", notes="tjbb_sf11-编辑")
|
||||
@RequiresPermissions("tjbbSf11:tjbb_sf11:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TjbbSf11 tjbbSf11) {
|
||||
tjbbSf11Service.updateById(tjbbSf11);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf11-通过id删除")
|
||||
@ApiOperation(value="tjbb_sf11-通过id删除", notes="tjbb_sf11-通过id删除")
|
||||
@RequiresPermissions("tjbbSf11:tjbb_sf11:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbbSf11Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf11-批量删除")
|
||||
@ApiOperation(value="tjbb_sf11-批量删除", notes="tjbb_sf11-批量删除")
|
||||
@RequiresPermissions("tjbbSf11:tjbb_sf11:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbbSf11Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf11-通过id查询")
|
||||
@ApiOperation(value="tjbb_sf11-通过id查询", notes="tjbb_sf11-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TjbbSf11> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TjbbSf11 tjbbSf11 = tjbbSf11Service.getById(id);
|
||||
if(tjbbSf11==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbbSf11);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbbSf11
|
||||
*/
|
||||
@RequiresPermissions("tjbbSf11:tjbb_sf11:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TjbbSf11 tjbbSf11) {
|
||||
return super.exportXls(request, tjbbSf11, TjbbSf11.class, "tjbb_sf11");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbbSf11Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, TjbbSf11.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf11.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: tjbb_sf11
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_sf11")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_sf11对象", description="tjbb_sf11")
|
||||
public class TjbbSf11 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 xnzymc;
|
||||
/**普通话水平测试一级甲等人数*/
|
||||
@Excel(name = "普通话水平测试一级甲等人数", width = 15)
|
||||
@ApiModelProperty(value = "普通话水平测试一级甲等人数")
|
||||
private java.lang.String yjj;
|
||||
/**普通话水平测试一级乙等人数*/
|
||||
@Excel(name = "普通话水平测试一级乙等人数", width = 15)
|
||||
@ApiModelProperty(value = "普通话水平测试一级乙等人数")
|
||||
private java.lang.String yjy;
|
||||
/**普通话水平测试二级甲等人数*/
|
||||
@Excel(name = "普通话水平测试二级甲等人数", width = 15)
|
||||
@ApiModelProperty(value = "普通话水平测试二级甲等人数")
|
||||
private java.lang.String ejj;
|
||||
/**普通话水平测试二级乙等人数*/
|
||||
@Excel(name = "普通话水平测试二级乙等人数", width = 15)
|
||||
@ApiModelProperty(value = "普通话水平测试二级乙等人数")
|
||||
private java.lang.String ejy;
|
||||
/**普通话水平测试三级甲等人数*/
|
||||
@Excel(name = "普通话水平测试三级甲等人数", width = 15)
|
||||
@ApiModelProperty(value = "普通话水平测试三级甲等人数")
|
||||
private java.lang.String sjj;
|
||||
/**普通话水平测试三级乙等人数*/
|
||||
@Excel(name = "普通话水平测试三级乙等人数", width = 15)
|
||||
@ApiModelProperty(value = "普通话水平测试三级乙等人数")
|
||||
private java.lang.String sjy;
|
||||
/**通过教师资格证考试人数*/
|
||||
@Excel(name = "通过教师资格证考试人数", width = 15)
|
||||
@ApiModelProperty(value = "通过教师资格证考试人数")
|
||||
private java.lang.String jszgz;
|
||||
/**毕业从事教育工作人数*/
|
||||
@Excel(name = "毕业从事教育工作人数", width = 15)
|
||||
@ApiModelProperty(value = "毕业从事教育工作人数")
|
||||
private java.lang.String jygz;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf11.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.entity.TjbbSf11;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf11
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TjbbSf11Mapper extends BaseMapper<TjbbSf11> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbbSf11.mapper.TjbbSf11Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf11.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.entity.TjbbSf11;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf11
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbbSf11Service extends IService<TjbbSf11> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf11.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.entity.TjbbSf11;
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.mapper.TjbbSf11Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbbSf11.service.ITjbbSf11Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf11
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TjbbSf11ServiceImpl extends ServiceImpl<TjbbSf11Mapper, TjbbSf11> implements ITjbbSf11Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf3.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.tjbb.tjbbSf3.entity.TjbbSf3;
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.service.ITjbbSf3Service;
|
||||
|
||||
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: tjbb_sf3
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_sf3")
|
||||
@RestController
|
||||
@RequestMapping("/tjbbSf3/tjbbSf3")
|
||||
@Slf4j
|
||||
public class TjbbSf3Controller extends JeecgController<TjbbSf3, ITjbbSf3Service> {
|
||||
@Autowired
|
||||
private ITjbbSf3Service tjbbSf3Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbbSf3
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf3-分页列表查询")
|
||||
@ApiOperation(value="tjbb_sf3-分页列表查询", notes="tjbb_sf3-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TjbbSf3>> queryPageList(TjbbSf3 tjbbSf3,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TjbbSf3> queryWrapper = QueryGenerator.initQueryWrapper(tjbbSf3, req.getParameterMap());
|
||||
Page<TjbbSf3> page = new Page<TjbbSf3>(pageNo, pageSize);
|
||||
IPage<TjbbSf3> pageList = tjbbSf3Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbbSf3
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf3-添加")
|
||||
@ApiOperation(value="tjbb_sf3-添加", notes="tjbb_sf3-添加")
|
||||
@RequiresPermissions("tjbbSf3:tjbb_sf3:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TjbbSf3 tjbbSf3) {
|
||||
tjbbSf3Service.save(tjbbSf3);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbbSf3
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf3-编辑")
|
||||
@ApiOperation(value="tjbb_sf3-编辑", notes="tjbb_sf3-编辑")
|
||||
@RequiresPermissions("tjbbSf3:tjbb_sf3:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TjbbSf3 tjbbSf3) {
|
||||
tjbbSf3Service.updateById(tjbbSf3);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf3-通过id删除")
|
||||
@ApiOperation(value="tjbb_sf3-通过id删除", notes="tjbb_sf3-通过id删除")
|
||||
@RequiresPermissions("tjbbSf3:tjbb_sf3:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbbSf3Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf3-批量删除")
|
||||
@ApiOperation(value="tjbb_sf3-批量删除", notes="tjbb_sf3-批量删除")
|
||||
@RequiresPermissions("tjbbSf3:tjbb_sf3:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbbSf3Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf3-通过id查询")
|
||||
@ApiOperation(value="tjbb_sf3-通过id查询", notes="tjbb_sf3-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TjbbSf3> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TjbbSf3 tjbbSf3 = tjbbSf3Service.getById(id);
|
||||
if(tjbbSf3==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbbSf3);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbbSf3
|
||||
*/
|
||||
@RequiresPermissions("tjbbSf3:tjbb_sf3:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TjbbSf3 tjbbSf3) {
|
||||
return super.exportXls(request, tjbbSf3, TjbbSf3.class, "tjbb_sf3");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbbSf3Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, TjbbSf3.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf3.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: tjbb_sf3
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_sf3")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_sf3对象", description="tjbb_sf3")
|
||||
public class TjbbSf3 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 xnzydm;
|
||||
/**校内专业名称*/
|
||||
@Excel(name = "校内专业名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业名称")
|
||||
private java.lang.String xnzymc;
|
||||
/**教学日常运行支出*/
|
||||
@Excel(name = "教学日常运行支出", width = 15)
|
||||
@ApiModelProperty(value = "教学日常运行支出")
|
||||
private java.lang.String jxrcyxzc;
|
||||
/**教育实践经费*/
|
||||
@Excel(name = "教育实践经费", width = 15)
|
||||
@ApiModelProperty(value = "教育实践经费")
|
||||
private java.lang.String jysjjf;
|
||||
/**生均拨款总额*/
|
||||
@Excel(name = "生均拨款总额", width = 15)
|
||||
@ApiModelProperty(value = "生均拨款总额")
|
||||
private java.lang.String sjbkze;
|
||||
/**学费收入之和*/
|
||||
@Excel(name = "学费收入之和", width = 15)
|
||||
@ApiModelProperty(value = "学费收入之和")
|
||||
private java.lang.String xfsrzh;
|
||||
/**纸质图书数量*/
|
||||
@Excel(name = "纸质图书数量", width = 15)
|
||||
@ApiModelProperty(value = "纸质图书数量")
|
||||
private java.lang.String zztssl;
|
||||
/**其中:中文图书*/
|
||||
@Excel(name = "其中:中文图书", width = 15)
|
||||
@ApiModelProperty(value = "其中:中文图书")
|
||||
private java.lang.String zwts;
|
||||
/**其中:教材或教师教材参考书*/
|
||||
@Excel(name = "其中:教材或教师教材参考书", width = 15)
|
||||
@ApiModelProperty(value = "其中:教材或教师教材参考书")
|
||||
private java.lang.String cks;
|
||||
/**电子图书数量*/
|
||||
@Excel(name = "电子图书数量", width = 15)
|
||||
@ApiModelProperty(value = "电子图书数量")
|
||||
private java.lang.String dzts;
|
||||
/**教学案例数量*/
|
||||
@Excel(name = "教学案例数量", width = 15)
|
||||
@ApiModelProperty(value = "教学案例数量")
|
||||
private java.lang.String jxalsl;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf3.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.entity.TjbbSf3;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf3
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TjbbSf3Mapper extends BaseMapper<TjbbSf3> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbbSf3.mapper.TjbbSf3Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf3.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.entity.TjbbSf3;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf3
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbbSf3Service extends IService<TjbbSf3> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf3.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.entity.TjbbSf3;
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.mapper.TjbbSf3Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbbSf3.service.ITjbbSf3Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf3
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TjbbSf3ServiceImpl extends ServiceImpl<TjbbSf3Mapper, TjbbSf3> implements ITjbbSf3Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf5.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.tjbb.tjbbSf5.entity.TjbbSf5;
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.service.ITjbbSf5Service;
|
||||
|
||||
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: tjbb_sf5
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_sf5")
|
||||
@RestController
|
||||
@RequestMapping("/tjbbSf5/tjbbSf5")
|
||||
@Slf4j
|
||||
public class TjbbSf5Controller extends JeecgController<TjbbSf5, ITjbbSf5Service> {
|
||||
@Autowired
|
||||
private ITjbbSf5Service tjbbSf5Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbbSf5
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf5-分页列表查询")
|
||||
@ApiOperation(value="tjbb_sf5-分页列表查询", notes="tjbb_sf5-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TjbbSf5>> queryPageList(TjbbSf5 tjbbSf5,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TjbbSf5> queryWrapper = QueryGenerator.initQueryWrapper(tjbbSf5, req.getParameterMap());
|
||||
Page<TjbbSf5> page = new Page<TjbbSf5>(pageNo, pageSize);
|
||||
IPage<TjbbSf5> pageList = tjbbSf5Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbbSf5
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf5-添加")
|
||||
@ApiOperation(value="tjbb_sf5-添加", notes="tjbb_sf5-添加")
|
||||
@RequiresPermissions("tjbbSf5:tjbb_sf5:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TjbbSf5 tjbbSf5) {
|
||||
tjbbSf5Service.save(tjbbSf5);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbbSf5
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf5-编辑")
|
||||
@ApiOperation(value="tjbb_sf5-编辑", notes="tjbb_sf5-编辑")
|
||||
@RequiresPermissions("tjbbSf5:tjbb_sf5:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TjbbSf5 tjbbSf5) {
|
||||
tjbbSf5Service.updateById(tjbbSf5);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf5-通过id删除")
|
||||
@ApiOperation(value="tjbb_sf5-通过id删除", notes="tjbb_sf5-通过id删除")
|
||||
@RequiresPermissions("tjbbSf5:tjbb_sf5:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbbSf5Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf5-批量删除")
|
||||
@ApiOperation(value="tjbb_sf5-批量删除", notes="tjbb_sf5-批量删除")
|
||||
@RequiresPermissions("tjbbSf5:tjbb_sf5:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbbSf5Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf5-通过id查询")
|
||||
@ApiOperation(value="tjbb_sf5-通过id查询", notes="tjbb_sf5-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TjbbSf5> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TjbbSf5 tjbbSf5 = tjbbSf5Service.getById(id);
|
||||
if(tjbbSf5==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbbSf5);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbbSf5
|
||||
*/
|
||||
@RequiresPermissions("tjbbSf5:tjbb_sf5:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TjbbSf5 tjbbSf5) {
|
||||
return super.exportXls(request, tjbbSf5, TjbbSf5.class, "tjbb_sf5");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbbSf5Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, TjbbSf5.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf5.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: tjbb_sf5
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_sf5")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_sf5对象", description="tjbb_sf5")
|
||||
public class TjbbSf5 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 xnzydm;
|
||||
/**校内专业名称*/
|
||||
@Excel(name = "校内专业名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业名称")
|
||||
private java.lang.String xnzymc;
|
||||
/**专业类别*/
|
||||
@Excel(name = "专业类别", width = 15)
|
||||
@ApiModelProperty(value = "专业类别")
|
||||
private java.lang.String zylb;
|
||||
/**学分总计*/
|
||||
@Excel(name = "学分总计", width = 15)
|
||||
@ApiModelProperty(value = "学分总计")
|
||||
private java.lang.String xfzj;
|
||||
/**人文社会与科学素养课程*/
|
||||
@Excel(name = "人文社会与科学素养课程", width = 15)
|
||||
@ApiModelProperty(value = "人文社会与科学素养课程")
|
||||
private java.lang.String rwshykxsykc;
|
||||
/**其中学科专业课程*/
|
||||
@Excel(name = "其中学科专业课程", width = 15)
|
||||
@ApiModelProperty(value = "其中学科专业课程")
|
||||
private java.lang.String xkzykc;
|
||||
/**教师教育课程小计*/
|
||||
@Excel(name = "教师教育课程小计", width = 15)
|
||||
@ApiModelProperty(value = "教师教育课程小计")
|
||||
private java.lang.String jsjykcxj;
|
||||
/**教师教育课程必修*/
|
||||
@Excel(name = "教师教育课程必修", width = 15)
|
||||
@ApiModelProperty(value = "教师教育课程必修")
|
||||
private java.lang.String jsjykcbx;
|
||||
/**其中师德教育类课程*/
|
||||
@Excel(name = "其中师德教育类课程", width = 15)
|
||||
@ApiModelProperty(value = "其中师德教育类课程")
|
||||
private java.lang.String sdjylkc;
|
||||
/**其中信息素养类课程*/
|
||||
@Excel(name = "其中信息素养类课程", width = 15)
|
||||
@ApiModelProperty(value = "其中信息素养类课程")
|
||||
private java.lang.String xxsylkc;
|
||||
/**教育实践时间总计*/
|
||||
@Excel(name = "教育实践时间总计", width = 15)
|
||||
@ApiModelProperty(value = "教育实践时间总计")
|
||||
private java.lang.String jysjsjzj;
|
||||
/**教育实践时间见习*/
|
||||
@Excel(name = "教育实践时间见习", width = 15)
|
||||
@ApiModelProperty(value = "教育实践时间见习")
|
||||
private java.lang.String jysjsjjx;
|
||||
/**教育实践时间研习*/
|
||||
@Excel(name = "教育实践时间研习", width = 15)
|
||||
@ApiModelProperty(value = "教育实践时间研习")
|
||||
private java.lang.String jysjsjyx;
|
||||
/**教育实践时间实习*/
|
||||
@Excel(name = "教育实践时间实习", width = 15)
|
||||
@ApiModelProperty(value = "教育实践时间实习")
|
||||
private java.lang.String jysjsjsx;
|
||||
/**参加教育实践师范生总计*/
|
||||
@Excel(name = "参加教育实践师范生总计", width = 15)
|
||||
@ApiModelProperty(value = "参加教育实践师范生总计")
|
||||
private java.lang.String cjjysjsfszj;
|
||||
/**参加教育实践师范生实习生数*/
|
||||
@Excel(name = "参加教育实践师范生实习生数", width = 15)
|
||||
@ApiModelProperty(value = "参加教育实践师范生实习生数")
|
||||
private java.lang.String cjjysjsfssxzs;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf5.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.entity.TjbbSf5;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf5
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TjbbSf5Mapper extends BaseMapper<TjbbSf5> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbbSf5.mapper.TjbbSf5Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf5.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.entity.TjbbSf5;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf5
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbbSf5Service extends IService<TjbbSf5> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf5.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.entity.TjbbSf5;
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.mapper.TjbbSf5Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbbSf5.service.ITjbbSf5Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf5
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TjbbSf5ServiceImpl extends ServiceImpl<TjbbSf5Mapper, TjbbSf5> implements ITjbbSf5Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf6.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.tjbb.tjbbSf6.entity.TjbbSf6;
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.service.ITjbbSf6Service;
|
||||
|
||||
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: tjbb_sf6
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_sf6")
|
||||
@RestController
|
||||
@RequestMapping("/tjbbSf6/tjbbSf6")
|
||||
@Slf4j
|
||||
public class TjbbSf6Controller extends JeecgController<TjbbSf6, ITjbbSf6Service> {
|
||||
@Autowired
|
||||
private ITjbbSf6Service tjbbSf6Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbbSf6
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf6-分页列表查询")
|
||||
@ApiOperation(value="tjbb_sf6-分页列表查询", notes="tjbb_sf6-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TjbbSf6>> queryPageList(TjbbSf6 tjbbSf6,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TjbbSf6> queryWrapper = QueryGenerator.initQueryWrapper(tjbbSf6, req.getParameterMap());
|
||||
Page<TjbbSf6> page = new Page<TjbbSf6>(pageNo, pageSize);
|
||||
IPage<TjbbSf6> pageList = tjbbSf6Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbbSf6
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf6-添加")
|
||||
@ApiOperation(value="tjbb_sf6-添加", notes="tjbb_sf6-添加")
|
||||
@RequiresPermissions("tjbbSf6:tjbb_sf6:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TjbbSf6 tjbbSf6) {
|
||||
tjbbSf6Service.save(tjbbSf6);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbbSf6
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf6-编辑")
|
||||
@ApiOperation(value="tjbb_sf6-编辑", notes="tjbb_sf6-编辑")
|
||||
@RequiresPermissions("tjbbSf6:tjbb_sf6:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TjbbSf6 tjbbSf6) {
|
||||
tjbbSf6Service.updateById(tjbbSf6);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf6-通过id删除")
|
||||
@ApiOperation(value="tjbb_sf6-通过id删除", notes="tjbb_sf6-通过id删除")
|
||||
@RequiresPermissions("tjbbSf6:tjbb_sf6:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbbSf6Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf6-批量删除")
|
||||
@ApiOperation(value="tjbb_sf6-批量删除", notes="tjbb_sf6-批量删除")
|
||||
@RequiresPermissions("tjbbSf6:tjbb_sf6:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbbSf6Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf6-通过id查询")
|
||||
@ApiOperation(value="tjbb_sf6-通过id查询", notes="tjbb_sf6-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TjbbSf6> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TjbbSf6 tjbbSf6 = tjbbSf6Service.getById(id);
|
||||
if(tjbbSf6==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbbSf6);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbbSf6
|
||||
*/
|
||||
@RequiresPermissions("tjbbSf6:tjbb_sf6:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TjbbSf6 tjbbSf6) {
|
||||
return super.exportXls(request, tjbbSf6, TjbbSf6.class, "tjbb_sf6");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbbSf6Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, TjbbSf6.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,91 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf6.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: tjbb_sf6
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_sf6")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_sf6对象", description="tjbb_sf6")
|
||||
public class TjbbSf6 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 xnzydm;
|
||||
/**校内专业名称*/
|
||||
@Excel(name = "校内专业名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业名称")
|
||||
private java.lang.String xnzymc;
|
||||
/**开课号*/
|
||||
@Excel(name = "开课号", width = 15)
|
||||
@ApiModelProperty(value = "开课号")
|
||||
private java.lang.String kkh;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**课程性质*/
|
||||
@Excel(name = "课程性质", width = 15)
|
||||
@ApiModelProperty(value = "课程性质")
|
||||
private java.lang.String kcxz;
|
||||
/**授课教师*/
|
||||
@Excel(name = "授课教师", width = 15)
|
||||
@ApiModelProperty(value = "授课教师")
|
||||
private java.lang.String skjs;
|
||||
/**授课教师工号*/
|
||||
@Excel(name = "授课教师工号", width = 15)
|
||||
@ApiModelProperty(value = "授课教师工号")
|
||||
private java.lang.String skjsgh;
|
||||
/**学分*/
|
||||
@Excel(name = "学分", width = 15)
|
||||
@ApiModelProperty(value = "学分")
|
||||
private java.lang.String xf;
|
||||
/**年级*/
|
||||
@Excel(name = "年级", width = 15)
|
||||
@ApiModelProperty(value = "年级")
|
||||
private java.lang.String nj;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf6.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.entity.TjbbSf6;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf6
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TjbbSf6Mapper extends BaseMapper<TjbbSf6> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbbSf6.mapper.TjbbSf6Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf6.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.entity.TjbbSf6;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf6
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbbSf6Service extends IService<TjbbSf6> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf6.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.entity.TjbbSf6;
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.mapper.TjbbSf6Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbbSf6.service.ITjbbSf6Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf6
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TjbbSf6ServiceImpl extends ServiceImpl<TjbbSf6Mapper, TjbbSf6> implements ITjbbSf6Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf8.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.tjbb.tjbbSf8.entity.TjbbSf8;
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.service.ITjbbSf8Service;
|
||||
|
||||
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: tjbb_sf8
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_sf8")
|
||||
@RestController
|
||||
@RequestMapping("/tjbbSf8/tjbbSf8")
|
||||
@Slf4j
|
||||
public class TjbbSf8Controller extends JeecgController<TjbbSf8, ITjbbSf8Service> {
|
||||
@Autowired
|
||||
private ITjbbSf8Service tjbbSf8Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbbSf8
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf8-分页列表查询")
|
||||
@ApiOperation(value="tjbb_sf8-分页列表查询", notes="tjbb_sf8-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TjbbSf8>> queryPageList(TjbbSf8 tjbbSf8,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TjbbSf8> queryWrapper = QueryGenerator.initQueryWrapper(tjbbSf8, req.getParameterMap());
|
||||
Page<TjbbSf8> page = new Page<TjbbSf8>(pageNo, pageSize);
|
||||
IPage<TjbbSf8> pageList = tjbbSf8Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbbSf8
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf8-添加")
|
||||
@ApiOperation(value="tjbb_sf8-添加", notes="tjbb_sf8-添加")
|
||||
@RequiresPermissions("tjbbSf8:tjbb_sf8:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TjbbSf8 tjbbSf8) {
|
||||
tjbbSf8Service.save(tjbbSf8);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbbSf8
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf8-编辑")
|
||||
@ApiOperation(value="tjbb_sf8-编辑", notes="tjbb_sf8-编辑")
|
||||
@RequiresPermissions("tjbbSf8:tjbb_sf8:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TjbbSf8 tjbbSf8) {
|
||||
tjbbSf8Service.updateById(tjbbSf8);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf8-通过id删除")
|
||||
@ApiOperation(value="tjbb_sf8-通过id删除", notes="tjbb_sf8-通过id删除")
|
||||
@RequiresPermissions("tjbbSf8:tjbb_sf8:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbbSf8Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf8-批量删除")
|
||||
@ApiOperation(value="tjbb_sf8-批量删除", notes="tjbb_sf8-批量删除")
|
||||
@RequiresPermissions("tjbbSf8:tjbb_sf8:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbbSf8Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf8-通过id查询")
|
||||
@ApiOperation(value="tjbb_sf8-通过id查询", notes="tjbb_sf8-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TjbbSf8> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TjbbSf8 tjbbSf8 = tjbbSf8Service.getById(id);
|
||||
if(tjbbSf8==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbbSf8);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbbSf8
|
||||
*/
|
||||
@RequiresPermissions("tjbbSf8:tjbb_sf8:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TjbbSf8 tjbbSf8) {
|
||||
return super.exportXls(request, tjbbSf8, TjbbSf8.class, "tjbb_sf8");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbbSf8Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, TjbbSf8.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf8.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: tjbb_sf8
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_sf8")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_sf8对象", description="tjbb_sf8")
|
||||
public class TjbbSf8 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 xnzydm;
|
||||
/**校内专业名称*/
|
||||
@Excel(name = "校内专业名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业名称")
|
||||
private java.lang.String xnzymc;
|
||||
/**指导教师工号*/
|
||||
@Excel(name = "指导教师工号", width = 15)
|
||||
@ApiModelProperty(value = "指导教师工号")
|
||||
private java.lang.String zdjsgh;
|
||||
/**指导教师姓名*/
|
||||
@Excel(name = "指导教师姓名", width = 15)
|
||||
@ApiModelProperty(value = "指导教师姓名")
|
||||
private java.lang.String zdjsxm;
|
||||
/**指导本专业参加教育实践师范生数*/
|
||||
@Excel(name = "指导本专业参加教育实践师范生数", width = 15)
|
||||
@ApiModelProperty(value = "指导本专业参加教育实践师范生数")
|
||||
private java.lang.String sfss;
|
||||
/**实践类型*/
|
||||
@Excel(name = "实践类型", width = 15)
|
||||
@ApiModelProperty(value = "实践类型")
|
||||
private java.lang.String sjlx;
|
||||
/**年级*/
|
||||
@Excel(name = "年级", width = 15)
|
||||
@ApiModelProperty(value = "年级")
|
||||
private java.lang.String nj;
|
||||
/**周数*/
|
||||
@Excel(name = "周数", width = 15)
|
||||
@ApiModelProperty(value = "周数")
|
||||
private java.lang.String zs;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String count;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf8.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.entity.TjbbSf8;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf8
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TjbbSf8Mapper extends BaseMapper<TjbbSf8> {
|
||||
|
||||
List<TjbbSf8> getJsAllList();
|
||||
|
||||
List<TjbbSf8> getJsJzjsList();
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<?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.tjbb.tjbbSf8.mapper.TjbbSf8Mapper">
|
||||
|
||||
<select id="getJsAllList" resultType="org.jeecg.modules.tjbb.tjbbSf8.entity.TjbbSf8">
|
||||
select a.xnzydm,count(a.xnzydm) as count from
|
||||
(
|
||||
SELECT
|
||||
distinct
|
||||
xnzydm,
|
||||
SUBSTRING_INDEX( SUBSTRING_INDEX( zdjsgh, ';', n ), ';', - 1 ) AS zdjsgh
|
||||
FROM
|
||||
tjbb_sf8,
|
||||
( SELECT @rownum := @rownum + 1 AS n FROM ( SELECT @rownum := 0 ) r, tjbb_sf8 ) x
|
||||
WHERE
|
||||
1 = 1
|
||||
AND n <= ( LENGTH( zdjsgh ) - LENGTH( REPLACE ( zdjsgh, ';', '' ) ) + 1 )
|
||||
) a GROUP BY a.xnzydm
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getJsJzjsList" resultType="org.jeecg.modules.tjbb.tjbbSf8.entity.TjbbSf8">
|
||||
select a.xnzydm,count(a.xnzydm) as count from (
|
||||
SELECT
|
||||
distinct
|
||||
xnzydm,
|
||||
SUBSTRING_INDEX( SUBSTRING_INDEX( zdjsgh, ';', n ), ';', - 1 ) AS zdjsgh
|
||||
FROM
|
||||
tjbb_sf8,
|
||||
( SELECT @rownum := @rownum + 1 AS n FROM ( SELECT @rownum := 0 ) r, tjbb_sf8 ) x
|
||||
WHERE
|
||||
1 = 1
|
||||
AND n <= ( LENGTH( zdjsgh ) - LENGTH( REPLACE ( zdjsgh, ';', '' ) ) + 1 )
|
||||
) a , (select * from tjbb_153 where gzdwlb = '基础教育学校' and rzzt = '在聘') b
|
||||
where a.zdjsgh = b.gh
|
||||
GROUP BY a.xnzydm
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf8.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.entity.TjbbSf8;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf8
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbbSf8Service extends IService<TjbbSf8> {
|
||||
|
||||
List<TjbbSf8> getJsAllList();
|
||||
|
||||
List<TjbbSf8> getJsJzjsList();
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf8.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.entity.TjbbSf8;
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.mapper.TjbbSf8Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbbSf8.service.ITjbbSf8Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf8
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TjbbSf8ServiceImpl extends ServiceImpl<TjbbSf8Mapper, TjbbSf8> implements ITjbbSf8Service {
|
||||
|
||||
@Override
|
||||
public List<TjbbSf8> getJsAllList() {
|
||||
return baseMapper.getJsAllList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TjbbSf8> getJsJzjsList() {
|
||||
return baseMapper.getJsJzjsList();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf9.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.tjbb.tjbbSf9.entity.TjbbSf9;
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.service.ITjbbSf9Service;
|
||||
|
||||
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: tjbb_sf9
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tjbb_sf9")
|
||||
@RestController
|
||||
@RequestMapping("/tjbbSf9/tjbbSf9")
|
||||
@Slf4j
|
||||
public class TjbbSf9Controller extends JeecgController<TjbbSf9, ITjbbSf9Service> {
|
||||
@Autowired
|
||||
private ITjbbSf9Service tjbbSf9Service;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param tjbbSf9
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf9-分页列表查询")
|
||||
@ApiOperation(value="tjbb_sf9-分页列表查询", notes="tjbb_sf9-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TjbbSf9>> queryPageList(TjbbSf9 tjbbSf9,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TjbbSf9> queryWrapper = QueryGenerator.initQueryWrapper(tjbbSf9, req.getParameterMap());
|
||||
Page<TjbbSf9> page = new Page<TjbbSf9>(pageNo, pageSize);
|
||||
IPage<TjbbSf9> pageList = tjbbSf9Service.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param tjbbSf9
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf9-添加")
|
||||
@ApiOperation(value="tjbb_sf9-添加", notes="tjbb_sf9-添加")
|
||||
@RequiresPermissions("tjbbSf9:tjbb_sf9:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TjbbSf9 tjbbSf9) {
|
||||
tjbbSf9Service.save(tjbbSf9);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param tjbbSf9
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf9-编辑")
|
||||
@ApiOperation(value="tjbb_sf9-编辑", notes="tjbb_sf9-编辑")
|
||||
@RequiresPermissions("tjbbSf9:tjbb_sf9:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TjbbSf9 tjbbSf9) {
|
||||
tjbbSf9Service.updateById(tjbbSf9);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf9-通过id删除")
|
||||
@ApiOperation(value="tjbb_sf9-通过id删除", notes="tjbb_sf9-通过id删除")
|
||||
@RequiresPermissions("tjbbSf9:tjbb_sf9:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
tjbbSf9Service.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tjbb_sf9-批量删除")
|
||||
@ApiOperation(value="tjbb_sf9-批量删除", notes="tjbb_sf9-批量删除")
|
||||
@RequiresPermissions("tjbbSf9:tjbb_sf9:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.tjbbSf9Service.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tjbb_sf9-通过id查询")
|
||||
@ApiOperation(value="tjbb_sf9-通过id查询", notes="tjbb_sf9-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TjbbSf9> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TjbbSf9 tjbbSf9 = tjbbSf9Service.getById(id);
|
||||
if(tjbbSf9==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(tjbbSf9);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param tjbbSf9
|
||||
*/
|
||||
@RequiresPermissions("tjbbSf9:tjbb_sf9:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TjbbSf9 tjbbSf9) {
|
||||
return super.exportXls(request, tjbbSf9, TjbbSf9.class, "tjbb_sf9");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
tjbbSf9Service.remove(new QueryWrapper<>());
|
||||
return super.importExcel2(request, response, TjbbSf9.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf9.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: tjbb_sf9
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("tjbb_sf9")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="tjbb_sf9对象", description="tjbb_sf9")
|
||||
public class TjbbSf9 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 xnzydm;
|
||||
/**校内专业名称*/
|
||||
@Excel(name = "校内专业名称", width = 15)
|
||||
@ApiModelProperty(value = "校内专业名称")
|
||||
private java.lang.String xnzymc;
|
||||
/**普通高职(含专科)学生数*/
|
||||
@Excel(name = "普通高职(含专科)学生数", width = 15)
|
||||
@ApiModelProperty(value = "普通高职(含专科)学生数")
|
||||
private java.lang.String ptgzxss;
|
||||
/**硕士研究生数*/
|
||||
@Excel(name = "硕士研究生数", width = 15)
|
||||
@ApiModelProperty(value = "硕士研究生数")
|
||||
private java.lang.String ssyjss;
|
||||
/**博士研究生数*/
|
||||
@Excel(name = "博士研究生数", width = 15)
|
||||
@ApiModelProperty(value = "博士研究生数")
|
||||
private java.lang.String bsyjss;
|
||||
/**本专科留学生数*/
|
||||
@Excel(name = "本专科留学生数", width = 15)
|
||||
@ApiModelProperty(value = "本专科留学生数")
|
||||
private java.lang.String bzklxss;
|
||||
/**硕士留学生数*/
|
||||
@Excel(name = "硕士留学生数", width = 15)
|
||||
@ApiModelProperty(value = "硕士留学生数")
|
||||
private java.lang.String sslxss;
|
||||
/**博士留学生数*/
|
||||
@Excel(name = "博士留学生数", width = 15)
|
||||
@ApiModelProperty(value = "博士留学生数")
|
||||
private java.lang.String bslxss;
|
||||
/**普通预科生数*/
|
||||
@Excel(name = "普通预科生数", width = 15)
|
||||
@ApiModelProperty(value = "普通预科生数")
|
||||
private java.lang.String ptykss;
|
||||
/**中职在校生数*/
|
||||
@Excel(name = "中职在校生数", width = 15)
|
||||
@ApiModelProperty(value = "中职在校生数")
|
||||
private java.lang.String zzzxss;
|
||||
/**进修生数*/
|
||||
@Excel(name = "进修生数", width = 15)
|
||||
@ApiModelProperty(value = "进修生数")
|
||||
private java.lang.String jxss;
|
||||
/**成人脱产学生数*/
|
||||
@Excel(name = "成人脱产学生数", width = 15)
|
||||
@ApiModelProperty(value = "成人脱产学生数")
|
||||
private java.lang.String crtcxss;
|
||||
/**夜大(业余)学生数*/
|
||||
@Excel(name = "夜大(业余)学生数", width = 15)
|
||||
@ApiModelProperty(value = "夜大(业余)学生数")
|
||||
private java.lang.String ydxss;
|
||||
/**函授学生数*/
|
||||
@Excel(name = "函授学生数", width = 15)
|
||||
@ApiModelProperty(value = "函授学生数")
|
||||
private java.lang.String hsxss;
|
||||
/**网络教育学生数*/
|
||||
@Excel(name = "网络教育学生数", width = 15)
|
||||
@ApiModelProperty(value = "网络教育学生数")
|
||||
private java.lang.String wljxsxs;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf9.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.entity.TjbbSf9;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf9
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TjbbSf9Mapper extends BaseMapper<TjbbSf9> {
|
||||
|
||||
}
|
|
@ -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.tjbb.tjbbSf9.mapper.TjbbSf9Mapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf9.service;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.entity.TjbbSf9;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf9
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITjbbSf9Service extends IService<TjbbSf9> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.tjbb.tjbbSf9.service.impl;
|
||||
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.entity.TjbbSf9;
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.mapper.TjbbSf9Mapper;
|
||||
import org.jeecg.modules.tjbb.tjbbSf9.service.ITjbbSf9Service;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tjbb_sf9
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-11-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TjbbSf9ServiceImpl extends ServiceImpl<TjbbSf9Mapper, TjbbSf9> implements ITjbbSf9Service {
|
||||
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/tjbbSf11/tjbbSf11/list',
|
||||
save='/tjbbSf11/tjbbSf11/add',
|
||||
edit='/tjbbSf11/tjbbSf11/edit',
|
||||
deleteOne = '/tjbbSf11/tjbbSf11/delete',
|
||||
deleteBatch = '/tjbbSf11/tjbbSf11/deleteBatch',
|
||||
importExcel = '/tjbbSf11/tjbbSf11/importExcel',
|
||||
exportXls = '/tjbbSf11/tjbbSf11/exportXls',
|
||||
}
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-spin :spinning="spinning">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-row>
|
||||
<a-col>
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls141">导入表1-4-1专业基本情况数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls151">导入表1-5-1教职工基本信息数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls152">导入表1-5-2教职工其他信息数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls153">导入表1-5-3外聘和兼职教师基本信息数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls16">导入表1-6本科生基本情况数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls24">导入表2-4校内外实习、实践、实训基地数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf3">导入表SF-3师范-3:师范类专业办学基本条件数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf5">导入表SF-5师范-5:师范类专业培养情况数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf6">导入表SF-6师范-6:教师教育课程情况表数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf8">导入表SF-8师范-8:教育实践情况数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf9">导入表SF-9师范-9:师范类专业非本科学生数量基本情况数据</j-upload-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXlssf11">导入表SF-11师范-11:师范类专业应届毕业生情况数据</j-upload-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-row>
|
||||
<a-col>
|
||||
<a-row>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表1-4-1专业基本情况数据:{{dataList.t141}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表1-5-1教职工基本信息数据:{{dataList.t151}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表1-5-2教职工其他信息数据:{{dataList.t152}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表1-5-3外聘和兼职教师基本信息数据:{{dataList.t153}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表1-6本科生基本情况数据:{{dataList.t16}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表2-4校内外实习、实践、实训基地数据:{{dataList.t24}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表SF-3师范-3: {{dataList.tsf3}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表SF-5师范-5: {{dataList.tsf5}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表SF-6师范-6: {{dataList.tsf6}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表SF-8师范-8: {{dataList.tsf8}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表SF-9师范-9: {{dataList.tsf9}}
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
表SF-11师范-11: {{dataList.tsf11}}
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-button @click="deleteAll">删除全部数据</a-button>
|
||||
</a-col>
|
||||
<a-col style="margin-top: 10px;">
|
||||
<a-button @click="handleScsj">生成数据</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-spin>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tjbbSf11-tjbbSf11" setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import JUploadButton from '/@/components/Button/src/JUploadButton.vue';
|
||||
import { useMethods } from '/@/hooks/system/useMethods';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
const { handleExportXls, handleImportXls } = useMethods();
|
||||
|
||||
const spinning = ref<boolean>(false);
|
||||
const dataList = ref<any>([]);
|
||||
|
||||
const { createMessage } = useMessage();
|
||||
|
||||
function onImportXls141(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbb141/tjbb_141/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXls151(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbb151/tjbb_151/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXls152(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbb152/tjbb_152/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXls153(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbb153/tjbb_153/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXls16(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbb16/tjbb_16/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXls24(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbb24/tjbb_24/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXlssf3(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbbSf3/tjbbSf3/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXlssf5(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbbSf5/tjbbSf5/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXlssf6(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbbSf6/tjbbSf6/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXlssf8(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbbSf8/tjbbSf8/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXlssf9(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbbSf9/tjbbSf9/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
function onImportXlssf11(file) {
|
||||
spinning.value = true;
|
||||
let realUrl = "/tjbbSf11/tjbbSf11/importExcel";
|
||||
return handleImportXls(file, realUrl, success);
|
||||
}
|
||||
|
||||
//操作成功
|
||||
function success(){
|
||||
spinning.value = false;
|
||||
getAllData();
|
||||
}
|
||||
|
||||
|
||||
//获取数据情况
|
||||
function getAllData(){
|
||||
defHttp.get({url:'/tjbb/tjbb/list'}).then(res=>{
|
||||
console.log("🚀 ~ defHttp.get ~ res:", res)
|
||||
dataList.value = res;
|
||||
})
|
||||
}
|
||||
|
||||
//删除全部数据
|
||||
function deleteAll(){
|
||||
defHttp.delete({url:'/tjbb/tjbb/delete'}).then(res=>{
|
||||
getAllData();
|
||||
})
|
||||
}
|
||||
|
||||
//生成文件
|
||||
function handleScsj(){
|
||||
var name = "文件名称";
|
||||
var url = "/tjbb/tjbb/exportXls";
|
||||
handleExportXls(name,url);
|
||||
}
|
||||
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getAllData();
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/tjbb141/tjbb_141/list',
|
||||
save='/tjbb141/tjbb_141/add',
|
||||
edit='/tjbb141/tjbb_141/edit',
|
||||
deleteOne = '/tjbb141/tjbb_141/delete',
|
||||
deleteBatch = '/tjbb141/tjbb_141/deleteBatch',
|
||||
importExcel = '/tjbb141/tjbb_141/importExcel',
|
||||
exportXls = '/tjbb141/tjbb_141/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '校内专业代码',
|
||||
align: "center",
|
||||
dataIndex: 'xnzydm'
|
||||
},
|
||||
{
|
||||
title: '校内专业名称',
|
||||
align: "center",
|
||||
dataIndex: 'xnzymc'
|
||||
},
|
||||
{
|
||||
title: '专业名称',
|
||||
align: "center",
|
||||
dataIndex: 'zymc'
|
||||
},
|
||||
{
|
||||
title: '专业代码',
|
||||
align: "center",
|
||||
dataIndex: 'zydm'
|
||||
},
|
||||
{
|
||||
title: '所属单位名称',
|
||||
align: "center",
|
||||
dataIndex: 'ssdwmc'
|
||||
},
|
||||
{
|
||||
title: '所属单位号',
|
||||
align: "center",
|
||||
dataIndex: 'ssdwh'
|
||||
},
|
||||
{
|
||||
title: '专业设置年份',
|
||||
align: "center",
|
||||
dataIndex: 'zysznf'
|
||||
},
|
||||
{
|
||||
title: '学制',
|
||||
align: "center",
|
||||
dataIndex: 'xz'
|
||||
},
|
||||
{
|
||||
title: '允许修业年限',
|
||||
align: "center",
|
||||
dataIndex: 'rxxynx'
|
||||
},
|
||||
{
|
||||
title: '授予学位门类',
|
||||
align: "center",
|
||||
dataIndex: 'syxwml'
|
||||
},
|
||||
{
|
||||
title: '招生状态',
|
||||
align: "center",
|
||||
dataIndex: 'zszt'
|
||||
},
|
||||
{
|
||||
title: '是否新专业',
|
||||
align: "center",
|
||||
dataIndex: 'sfxzy'
|
||||
},
|
||||
{
|
||||
title: '是否师范类专业',
|
||||
align: "center",
|
||||
dataIndex: 'sfsflzy'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
xnzydm: {title: '校内专业代码',order: 0,view: 'text', type: 'string',},
|
||||
xnzymc: {title: '校内专业名称',order: 1,view: 'text', type: 'string',},
|
||||
zymc: {title: '专业名称',order: 2,view: 'text', type: 'string',},
|
||||
zydm: {title: '专业代码',order: 3,view: 'text', type: 'string',},
|
||||
ssdwmc: {title: '所属单位名称',order: 4,view: 'text', type: 'string',},
|
||||
ssdwh: {title: '所属单位号',order: 5,view: 'text', type: 'string',},
|
||||
zysznf: {title: '专业设置年份',order: 6,view: 'text', type: 'string',},
|
||||
xz: {title: '学制',order: 7,view: 'text', type: 'string',},
|
||||
rxxynx: {title: '允许修业年限',order: 8,view: 'text', type: 'string',},
|
||||
syxwml: {title: '授予学位门类',order: 9,view: 'text', type: 'string',},
|
||||
zszt: {title: '招生状态',order: 10,view: 'text', type: 'string',},
|
||||
sfxzy: {title: '是否新专业',order: 11,view: 'text', type: 'string',},
|
||||
sfsflzy: {title: '是否师范类专业',order: 12,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,235 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'tjbb141:tjbb_141:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'tjbb141:tjbb_141:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'tjbb141:tjbb_141:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'tjbb141:tjbb_141:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<Tjbb_141Modal ref="registerModal" @success="handleSuccess"></Tjbb_141Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tjbb141-tjbb_141" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Tjbb_141.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Tjbb_141.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import Tjbb_141Modal from './components/Tjbb_141Modal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'tjbb_141',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "tjbb_141",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'tjbb141:tjbb_141:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'tjbb141:tjbb_141:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,217 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="Tjbb_141Form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="校内专业代码" v-bind="validateInfos.xnzydm" id="Tjbb_141Form-xnzydm" name="xnzydm">
|
||||
<a-input v-model:value="formData.xnzydm" placeholder="请输入校内专业代码" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="校内专业名称" v-bind="validateInfos.xnzymc" id="Tjbb_141Form-xnzymc" name="xnzymc">
|
||||
<a-input v-model:value="formData.xnzymc" placeholder="请输入校内专业名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="专业名称" v-bind="validateInfos.zymc" id="Tjbb_141Form-zymc" name="zymc">
|
||||
<a-input v-model:value="formData.zymc" placeholder="请输入专业名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="专业代码" v-bind="validateInfos.zydm" id="Tjbb_141Form-zydm" name="zydm">
|
||||
<a-input v-model:value="formData.zydm" placeholder="请输入专业代码" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="所属单位名称" v-bind="validateInfos.ssdwmc" id="Tjbb_141Form-ssdwmc" name="ssdwmc">
|
||||
<a-input v-model:value="formData.ssdwmc" placeholder="请输入所属单位名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="所属单位号" v-bind="validateInfos.ssdwh" id="Tjbb_141Form-ssdwh" name="ssdwh">
|
||||
<a-input v-model:value="formData.ssdwh" placeholder="请输入所属单位号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="专业设置年份" v-bind="validateInfos.zysznf" id="Tjbb_141Form-zysznf" name="zysznf">
|
||||
<a-input v-model:value="formData.zysznf" placeholder="请输入专业设置年份" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学制" v-bind="validateInfos.xz" id="Tjbb_141Form-xz" name="xz">
|
||||
<a-input v-model:value="formData.xz" placeholder="请输入学制" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="允许修业年限" v-bind="validateInfos.rxxynx" id="Tjbb_141Form-rxxynx" name="rxxynx">
|
||||
<a-input v-model:value="formData.rxxynx" placeholder="请输入允许修业年限" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="授予学位门类" v-bind="validateInfos.syxwml" id="Tjbb_141Form-syxwml" name="syxwml">
|
||||
<a-input v-model:value="formData.syxwml" placeholder="请输入授予学位门类" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="招生状态" v-bind="validateInfos.zszt" id="Tjbb_141Form-zszt" name="zszt">
|
||||
<a-input v-model:value="formData.zszt" placeholder="请输入招生状态" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否新专业" v-bind="validateInfos.sfxzy" id="Tjbb_141Form-sfxzy" name="sfxzy">
|
||||
<a-input v-model:value="formData.sfxzy" placeholder="请输入是否新专业" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否师范类专业" v-bind="validateInfos.sfsflzy" id="Tjbb_141Form-sfsflzy" name="sfsflzy">
|
||||
<a-input v-model:value="formData.sfsflzy" placeholder="请输入是否师范类专业" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../Tjbb_141.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
xnzydm: '',
|
||||
xnzymc: '',
|
||||
zymc: '',
|
||||
zydm: '',
|
||||
ssdwmc: '',
|
||||
ssdwh: '',
|
||||
zysznf: '',
|
||||
xz: '',
|
||||
rxxynx: '',
|
||||
syxwml: '',
|
||||
zszt: '',
|
||||
sfxzy: '',
|
||||
sfsflzy: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<Tjbb_141Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></Tjbb_141Form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import Tjbb_141Form from './Tjbb_141Form.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/tjbb151/tjbb_151/list',
|
||||
save='/tjbb151/tjbb_151/add',
|
||||
edit='/tjbb151/tjbb_151/edit',
|
||||
deleteOne = '/tjbb151/tjbb_151/delete',
|
||||
deleteBatch = '/tjbb151/tjbb_151/deleteBatch',
|
||||
importExcel = '/tjbb151/tjbb_151/importExcel',
|
||||
exportXls = '/tjbb151/tjbb_151/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '工号',
|
||||
align: "center",
|
||||
dataIndex: 'gh'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
dataIndex: 'xm'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: "center",
|
||||
dataIndex: 'xb'
|
||||
},
|
||||
{
|
||||
title: '出生年月',
|
||||
align: "center",
|
||||
dataIndex: 'csny'
|
||||
},
|
||||
{
|
||||
title: '入校时间',
|
||||
align: "center",
|
||||
dataIndex: 'rxsj'
|
||||
},
|
||||
{
|
||||
title: '任职状态',
|
||||
align: "center",
|
||||
dataIndex: 'rzzt'
|
||||
},
|
||||
{
|
||||
title: '单位号',
|
||||
align: "center",
|
||||
dataIndex: 'dwh'
|
||||
},
|
||||
{
|
||||
title: '单位名称',
|
||||
align: "center",
|
||||
dataIndex: 'dwmc'
|
||||
},
|
||||
{
|
||||
title: '学历',
|
||||
align: "center",
|
||||
dataIndex: 'xl'
|
||||
},
|
||||
{
|
||||
title: '最高学位',
|
||||
align: "center",
|
||||
dataIndex: 'zgxw'
|
||||
},
|
||||
{
|
||||
title: '学缘',
|
||||
align: "center",
|
||||
dataIndex: 'xy'
|
||||
},
|
||||
{
|
||||
title: '专业技术职称',
|
||||
align: "center",
|
||||
dataIndex: 'zyjszc'
|
||||
},
|
||||
{
|
||||
title: '学科类别',
|
||||
align: "center",
|
||||
dataIndex: 'xklb'
|
||||
},
|
||||
{
|
||||
title: '政治面貌',
|
||||
align: "center",
|
||||
dataIndex: 'zzmm'
|
||||
},
|
||||
{
|
||||
title: '国籍',
|
||||
align: "center",
|
||||
dataIndex: 'gj'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
gh: {title: '工号',order: 0,view: 'text', type: 'string',},
|
||||
xm: {title: '姓名',order: 1,view: 'text', type: 'string',},
|
||||
xb: {title: '性别',order: 2,view: 'text', type: 'string',},
|
||||
csny: {title: '出生年月',order: 3,view: 'text', type: 'string',},
|
||||
rxsj: {title: '入校时间',order: 4,view: 'text', type: 'string',},
|
||||
rzzt: {title: '任职状态',order: 5,view: 'text', type: 'string',},
|
||||
dwh: {title: '单位号',order: 6,view: 'text', type: 'string',},
|
||||
dwmc: {title: '单位名称',order: 7,view: 'text', type: 'string',},
|
||||
xl: {title: '学历',order: 8,view: 'text', type: 'string',},
|
||||
zgxw: {title: '最高学位',order: 9,view: 'text', type: 'string',},
|
||||
xy: {title: '学缘',order: 10,view: 'text', type: 'string',},
|
||||
zyjszc: {title: '专业技术职称',order: 11,view: 'text', type: 'string',},
|
||||
xklb: {title: '学科类别',order: 12,view: 'text', type: 'string',},
|
||||
zzmm: {title: '政治面貌',order: 13,view: 'text', type: 'string',},
|
||||
gj: {title: '国籍',order: 14,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,235 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'tjbb151:tjbb_151:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'tjbb151:tjbb_151:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'tjbb151:tjbb_151:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'tjbb151:tjbb_151:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<Tjbb_151Modal ref="registerModal" @success="handleSuccess"></Tjbb_151Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tjbb151-tjbb_151" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Tjbb_151.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Tjbb_151.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import Tjbb_151Modal from './components/Tjbb_151Modal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'tjbb_151',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "tjbb_151",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'tjbb151:tjbb_151:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'tjbb151:tjbb_151:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="Tjbb_151Form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工号" v-bind="validateInfos.gh" id="Tjbb_151Form-gh" name="gh">
|
||||
<a-input v-model:value="formData.gh" placeholder="请输入工号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.xm" id="Tjbb_151Form-xm" name="xm">
|
||||
<a-input v-model:value="formData.xm" placeholder="请输入姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="性别" v-bind="validateInfos.xb" id="Tjbb_151Form-xb" name="xb">
|
||||
<a-input v-model:value="formData.xb" placeholder="请输入性别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="出生年月" v-bind="validateInfos.csny" id="Tjbb_151Form-csny" name="csny">
|
||||
<a-input v-model:value="formData.csny" placeholder="请输入出生年月" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="入校时间" v-bind="validateInfos.rxsj" id="Tjbb_151Form-rxsj" name="rxsj">
|
||||
<a-input v-model:value="formData.rxsj" placeholder="请输入入校时间" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="任职状态" v-bind="validateInfos.rzzt" id="Tjbb_151Form-rzzt" name="rzzt">
|
||||
<a-input v-model:value="formData.rzzt" placeholder="请输入任职状态" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="单位号" v-bind="validateInfos.dwh" id="Tjbb_151Form-dwh" name="dwh">
|
||||
<a-input v-model:value="formData.dwh" placeholder="请输入单位号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="单位名称" v-bind="validateInfos.dwmc" id="Tjbb_151Form-dwmc" name="dwmc">
|
||||
<a-input v-model:value="formData.dwmc" placeholder="请输入单位名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学历" v-bind="validateInfos.xl" id="Tjbb_151Form-xl" name="xl">
|
||||
<a-input v-model:value="formData.xl" placeholder="请输入学历" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="最高学位" v-bind="validateInfos.zgxw" id="Tjbb_151Form-zgxw" name="zgxw">
|
||||
<a-input v-model:value="formData.zgxw" placeholder="请输入最高学位" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学缘" v-bind="validateInfos.xy" id="Tjbb_151Form-xy" name="xy">
|
||||
<a-input v-model:value="formData.xy" placeholder="请输入学缘" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="专业技术职称" v-bind="validateInfos.zyjszc" id="Tjbb_151Form-zyjszc" name="zyjszc">
|
||||
<a-input v-model:value="formData.zyjszc" placeholder="请输入专业技术职称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学科类别" v-bind="validateInfos.xklb" id="Tjbb_151Form-xklb" name="xklb">
|
||||
<a-input v-model:value="formData.xklb" placeholder="请输入学科类别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="政治面貌" v-bind="validateInfos.zzmm" id="Tjbb_151Form-zzmm" name="zzmm">
|
||||
<a-input v-model:value="formData.zzmm" placeholder="请输入政治面貌" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="国籍" v-bind="validateInfos.gj" id="Tjbb_151Form-gj" name="gj">
|
||||
<a-input v-model:value="formData.gj" placeholder="请输入国籍" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../Tjbb_151.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
gh: '',
|
||||
xm: '',
|
||||
xb: '',
|
||||
csny: '',
|
||||
rxsj: '',
|
||||
rzzt: '',
|
||||
dwh: '',
|
||||
dwmc: '',
|
||||
xl: '',
|
||||
zgxw: '',
|
||||
xy: '',
|
||||
zyjszc: '',
|
||||
xklb: '',
|
||||
zzmm: '',
|
||||
gj: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<Tjbb_151Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></Tjbb_151Form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import Tjbb_151Form from './Tjbb_151Form.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/tjbb152/tjbb_152/list',
|
||||
save='/tjbb152/tjbb_152/add',
|
||||
edit='/tjbb152/tjbb_152/edit',
|
||||
deleteOne = '/tjbb152/tjbb_152/delete',
|
||||
deleteBatch = '/tjbb152/tjbb_152/deleteBatch',
|
||||
importExcel = '/tjbb152/tjbb_152/importExcel',
|
||||
exportXls = '/tjbb152/tjbb_152/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '工号',
|
||||
align: "center",
|
||||
dataIndex: 'gh'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
dataIndex: 'xm'
|
||||
},
|
||||
{
|
||||
title: '任教类型',
|
||||
align: "center",
|
||||
dataIndex: 'rjlx'
|
||||
},
|
||||
{
|
||||
title: '任教专业名称',
|
||||
align: "center",
|
||||
dataIndex: 'rjzymc'
|
||||
},
|
||||
{
|
||||
title: '任教专业代码',
|
||||
align: "center",
|
||||
dataIndex: 'rjzydm'
|
||||
},
|
||||
{
|
||||
title: '专业任教时间',
|
||||
align: "center",
|
||||
dataIndex: 'zyrjsj'
|
||||
},
|
||||
{
|
||||
title: '是否实验技术人员',
|
||||
align: "center",
|
||||
dataIndex: 'sfsyjsry'
|
||||
},
|
||||
{
|
||||
title: '是否双师双能型',
|
||||
align: "center",
|
||||
dataIndex: 'sfsssnx'
|
||||
},
|
||||
{
|
||||
title: '是否工程背景',
|
||||
align: "center",
|
||||
dataIndex: 'sfgcbj'
|
||||
},
|
||||
{
|
||||
title: '是否行业背景',
|
||||
align: "center",
|
||||
dataIndex: 'sfhybj'
|
||||
},
|
||||
{
|
||||
title: '是否具有国(境)外一年及以上经历',
|
||||
align: "center",
|
||||
dataIndex: 'ynysjl'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
gh: {title: '工号',order: 0,view: 'text', type: 'string',},
|
||||
xm: {title: '姓名',order: 1,view: 'text', type: 'string',},
|
||||
rjlx: {title: '任教类型',order: 2,view: 'text', type: 'string',},
|
||||
rjzymc: {title: '任教专业名称',order: 3,view: 'text', type: 'string',},
|
||||
rjzydm: {title: '任教专业代码',order: 4,view: 'text', type: 'string',},
|
||||
zyrjsj: {title: '专业任教时间',order: 5,view: 'text', type: 'string',},
|
||||
sfsyjsry: {title: '是否实验技术人员',order: 6,view: 'text', type: 'string',},
|
||||
sfsssnx: {title: '是否双师双能型',order: 7,view: 'text', type: 'string',},
|
||||
sfgcbj: {title: '是否工程背景',order: 8,view: 'text', type: 'string',},
|
||||
sfhybj: {title: '是否行业背景',order: 9,view: 'text', type: 'string',},
|
||||
ynysjl: {title: '是否具有国(境)外一年及以上经历',order: 10,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,235 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'tjbb152:tjbb_152:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'tjbb152:tjbb_152:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'tjbb152:tjbb_152:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'tjbb152:tjbb_152:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<Tjbb_152Modal ref="registerModal" @success="handleSuccess"></Tjbb_152Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tjbb152-tjbb_152" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Tjbb_152.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Tjbb_152.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import Tjbb_152Modal from './components/Tjbb_152Modal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'tjbb_152',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "tjbb_152",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'tjbb152:tjbb_152:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'tjbb152:tjbb_152:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,205 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="Tjbb_152Form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工号" v-bind="validateInfos.gh" id="Tjbb_152Form-gh" name="gh">
|
||||
<a-input v-model:value="formData.gh" placeholder="请输入工号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.xm" id="Tjbb_152Form-xm" name="xm">
|
||||
<a-input v-model:value="formData.xm" placeholder="请输入姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="任教类型" v-bind="validateInfos.rjlx" id="Tjbb_152Form-rjlx" name="rjlx">
|
||||
<a-input v-model:value="formData.rjlx" placeholder="请输入任教类型" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="任教专业名称" v-bind="validateInfos.rjzymc" id="Tjbb_152Form-rjzymc" name="rjzymc">
|
||||
<a-input v-model:value="formData.rjzymc" placeholder="请输入任教专业名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="任教专业代码" v-bind="validateInfos.rjzydm" id="Tjbb_152Form-rjzydm" name="rjzydm">
|
||||
<a-input v-model:value="formData.rjzydm" placeholder="请输入任教专业代码" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="专业任教时间" v-bind="validateInfos.zyrjsj" id="Tjbb_152Form-zyrjsj" name="zyrjsj">
|
||||
<a-input v-model:value="formData.zyrjsj" placeholder="请输入专业任教时间" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否实验技术人员" v-bind="validateInfos.sfsyjsry" id="Tjbb_152Form-sfsyjsry" name="sfsyjsry">
|
||||
<a-input v-model:value="formData.sfsyjsry" placeholder="请输入是否实验技术人员" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否双师双能型" v-bind="validateInfos.sfsssnx" id="Tjbb_152Form-sfsssnx" name="sfsssnx">
|
||||
<a-input v-model:value="formData.sfsssnx" placeholder="请输入是否双师双能型" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否工程背景" v-bind="validateInfos.sfgcbj" id="Tjbb_152Form-sfgcbj" name="sfgcbj">
|
||||
<a-input v-model:value="formData.sfgcbj" placeholder="请输入是否工程背景" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否行业背景" v-bind="validateInfos.sfhybj" id="Tjbb_152Form-sfhybj" name="sfhybj">
|
||||
<a-input v-model:value="formData.sfhybj" placeholder="请输入是否行业背景" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="是否具有国(境)外一年及以上经历" v-bind="validateInfos.ynysjl" id="Tjbb_152Form-ynysjl" name="ynysjl">
|
||||
<a-input v-model:value="formData.ynysjl" placeholder="请输入是否具有国(境)外一年及以上经历" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../Tjbb_152.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
gh: '',
|
||||
xm: '',
|
||||
rjlx: '',
|
||||
rjzymc: '',
|
||||
rjzydm: '',
|
||||
zyrjsj: '',
|
||||
sfsyjsry: '',
|
||||
sfsssnx: '',
|
||||
sfgcbj: '',
|
||||
sfhybj: '',
|
||||
ynysjl: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<Tjbb_152Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></Tjbb_152Form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import Tjbb_152Form from './Tjbb_152Form.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/tjbb153/tjbb_153/list',
|
||||
save='/tjbb153/tjbb_153/add',
|
||||
edit='/tjbb153/tjbb_153/edit',
|
||||
deleteOne = '/tjbb153/tjbb_153/delete',
|
||||
deleteBatch = '/tjbb153/tjbb_153/deleteBatch',
|
||||
importExcel = '/tjbb153/tjbb_153/importExcel',
|
||||
exportXls = '/tjbb153/tjbb_153/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,102 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '工号',
|
||||
align: "center",
|
||||
dataIndex: 'gh'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
dataIndex: 'xm'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: "center",
|
||||
dataIndex: 'xb'
|
||||
},
|
||||
{
|
||||
title: '出生年月',
|
||||
align: "center",
|
||||
dataIndex: 'csny'
|
||||
},
|
||||
{
|
||||
title: '聘任时间',
|
||||
align: "center",
|
||||
dataIndex: 'prsj'
|
||||
},
|
||||
{
|
||||
title: '任职状态',
|
||||
align: "center",
|
||||
dataIndex: 'rzzt'
|
||||
},
|
||||
{
|
||||
title: '聘期',
|
||||
align: "center",
|
||||
dataIndex: 'pq'
|
||||
},
|
||||
{
|
||||
title: '单位号',
|
||||
align: "center",
|
||||
dataIndex: 'dwh'
|
||||
},
|
||||
{
|
||||
title: '单位名称',
|
||||
align: "center",
|
||||
dataIndex: 'dwmc'
|
||||
},
|
||||
{
|
||||
title: '学历',
|
||||
align: "center",
|
||||
dataIndex: 'xl'
|
||||
},
|
||||
{
|
||||
title: '最高学位',
|
||||
align: "center",
|
||||
dataIndex: 'zgxw'
|
||||
},
|
||||
{
|
||||
title: '专业技术职称',
|
||||
align: "center",
|
||||
dataIndex: 'zyjszc'
|
||||
},
|
||||
{
|
||||
title: '工作单位类别',
|
||||
align: "center",
|
||||
dataIndex: 'gzdwlb'
|
||||
},
|
||||
{
|
||||
title: '承担本科教学任务',
|
||||
align: "center",
|
||||
dataIndex: 'cdbkjxrw'
|
||||
},
|
||||
{
|
||||
title: '地区',
|
||||
align: "center",
|
||||
dataIndex: 'dq'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
gh: {title: '工号',order: 0,view: 'text', type: 'string',},
|
||||
xm: {title: '姓名',order: 1,view: 'text', type: 'string',},
|
||||
xb: {title: '性别',order: 2,view: 'text', type: 'string',},
|
||||
csny: {title: '出生年月',order: 3,view: 'text', type: 'string',},
|
||||
prsj: {title: '聘任时间',order: 4,view: 'text', type: 'string',},
|
||||
rzzt: {title: '任职状态',order: 5,view: 'text', type: 'string',},
|
||||
pq: {title: '聘期',order: 6,view: 'text', type: 'string',},
|
||||
dwh: {title: '单位号',order: 7,view: 'text', type: 'string',},
|
||||
dwmc: {title: '单位名称',order: 8,view: 'text', type: 'string',},
|
||||
xl: {title: '学历',order: 9,view: 'text', type: 'string',},
|
||||
zgxw: {title: '最高学位',order: 10,view: 'text', type: 'string',},
|
||||
zyjszc: {title: '专业技术职称',order: 11,view: 'text', type: 'string',},
|
||||
gzdwlb: {title: '工作单位类别',order: 12,view: 'text', type: 'string',},
|
||||
cdbkjxrw: {title: '承担本科教学任务',order: 13,view: 'text', type: 'string',},
|
||||
dq: {title: '地区',order: 14,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,235 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'tjbb153:tjbb_153:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'tjbb153:tjbb_153:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'tjbb153:tjbb_153:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'tjbb153:tjbb_153:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<Tjbb_153Modal ref="registerModal" @success="handleSuccess"></Tjbb_153Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tjbb153-tjbb_153" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Tjbb_153.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Tjbb_153.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import Tjbb_153Modal from './components/Tjbb_153Modal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'tjbb_153',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "tjbb_153",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'tjbb153:tjbb_153:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'tjbb153:tjbb_153:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="Tjbb_153Form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工号" v-bind="validateInfos.gh" id="Tjbb_153Form-gh" name="gh">
|
||||
<a-input v-model:value="formData.gh" placeholder="请输入工号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="姓名" v-bind="validateInfos.xm" id="Tjbb_153Form-xm" name="xm">
|
||||
<a-input v-model:value="formData.xm" placeholder="请输入姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="性别" v-bind="validateInfos.xb" id="Tjbb_153Form-xb" name="xb">
|
||||
<a-input v-model:value="formData.xb" placeholder="请输入性别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="出生年月" v-bind="validateInfos.csny" id="Tjbb_153Form-csny" name="csny">
|
||||
<a-input v-model:value="formData.csny" placeholder="请输入出生年月" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="聘任时间" v-bind="validateInfos.prsj" id="Tjbb_153Form-prsj" name="prsj">
|
||||
<a-input v-model:value="formData.prsj" placeholder="请输入聘任时间" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="任职状态" v-bind="validateInfos.rzzt" id="Tjbb_153Form-rzzt" name="rzzt">
|
||||
<a-input v-model:value="formData.rzzt" placeholder="请输入任职状态" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="聘期" v-bind="validateInfos.pq" id="Tjbb_153Form-pq" name="pq">
|
||||
<a-input v-model:value="formData.pq" placeholder="请输入聘期" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="单位号" v-bind="validateInfos.dwh" id="Tjbb_153Form-dwh" name="dwh">
|
||||
<a-input v-model:value="formData.dwh" placeholder="请输入单位号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="单位名称" v-bind="validateInfos.dwmc" id="Tjbb_153Form-dwmc" name="dwmc">
|
||||
<a-input v-model:value="formData.dwmc" placeholder="请输入单位名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学历" v-bind="validateInfos.xl" id="Tjbb_153Form-xl" name="xl">
|
||||
<a-input v-model:value="formData.xl" placeholder="请输入学历" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="最高学位" v-bind="validateInfos.zgxw" id="Tjbb_153Form-zgxw" name="zgxw">
|
||||
<a-input v-model:value="formData.zgxw" placeholder="请输入最高学位" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="专业技术职称" v-bind="validateInfos.zyjszc" id="Tjbb_153Form-zyjszc" name="zyjszc">
|
||||
<a-input v-model:value="formData.zyjszc" placeholder="请输入专业技术职称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="工作单位类别" v-bind="validateInfos.gzdwlb" id="Tjbb_153Form-gzdwlb" name="gzdwlb">
|
||||
<a-input v-model:value="formData.gzdwlb" placeholder="请输入工作单位类别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="承担本科教学任务" v-bind="validateInfos.cdbkjxrw" id="Tjbb_153Form-cdbkjxrw" name="cdbkjxrw">
|
||||
<a-input v-model:value="formData.cdbkjxrw" placeholder="请输入承担本科教学任务" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="地区" v-bind="validateInfos.dq" id="Tjbb_153Form-dq" name="dq">
|
||||
<a-input v-model:value="formData.dq" placeholder="请输入地区" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../Tjbb_153.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
gh: '',
|
||||
xm: '',
|
||||
xb: '',
|
||||
csny: '',
|
||||
prsj: '',
|
||||
rzzt: '',
|
||||
pq: '',
|
||||
dwh: '',
|
||||
dwmc: '',
|
||||
xl: '',
|
||||
zgxw: '',
|
||||
zyjszc: '',
|
||||
gzdwlb: '',
|
||||
cdbkjxrw: '',
|
||||
dq: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<Tjbb_153Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></Tjbb_153Form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import Tjbb_153Form from './Tjbb_153Form.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/tjbb16/tjbb_16/list',
|
||||
save='/tjbb16/tjbb_16/add',
|
||||
edit='/tjbb16/tjbb_16/edit',
|
||||
deleteOne = '/tjbb16/tjbb_16/delete',
|
||||
deleteBatch = '/tjbb16/tjbb_16/deleteBatch',
|
||||
importExcel = '/tjbb16/tjbb_16/importExcel',
|
||||
exportXls = '/tjbb16/tjbb_16/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '学号',
|
||||
align: "center",
|
||||
dataIndex: 'xh'
|
||||
},
|
||||
{
|
||||
title: '学生姓名',
|
||||
align: "center",
|
||||
dataIndex: 'xsxm'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: "center",
|
||||
dataIndex: 'xb'
|
||||
},
|
||||
{
|
||||
title: '校内专业(大类)名称',
|
||||
align: "center",
|
||||
dataIndex: 'xnzydlmc'
|
||||
},
|
||||
{
|
||||
title: '校内专业(大类)代码',
|
||||
align: "center",
|
||||
dataIndex: 'xnzydldm'
|
||||
},
|
||||
{
|
||||
title: '生源类别',
|
||||
align: "center",
|
||||
dataIndex: 'sylb'
|
||||
},
|
||||
{
|
||||
title: '学生类别',
|
||||
align: "center",
|
||||
dataIndex: 'xslb'
|
||||
},
|
||||
{
|
||||
title: '年级',
|
||||
align: "center",
|
||||
dataIndex: 'nj'
|
||||
},
|
||||
{
|
||||
title: '入学年份',
|
||||
align: "center",
|
||||
dataIndex: 'rxnf'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
xh: {title: '学号',order: 0,view: 'text', type: 'string',},
|
||||
xsxm: {title: '学生姓名',order: 1,view: 'text', type: 'string',},
|
||||
xb: {title: '性别',order: 2,view: 'text', type: 'string',},
|
||||
xnzydlmc: {title: '校内专业(大类)名称',order: 3,view: 'text', type: 'string',},
|
||||
xnzydldm: {title: '校内专业(大类)代码',order: 4,view: 'text', type: 'string',},
|
||||
sylb: {title: '生源类别',order: 5,view: 'text', type: 'string',},
|
||||
xslb: {title: '学生类别',order: 6,view: 'text', type: 'string',},
|
||||
nj: {title: '年级',order: 7,view: 'text', type: 'string',},
|
||||
rxnf: {title: '入学年份',order: 8,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,235 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'tjbb16:tjbb_16:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'tjbb16:tjbb_16:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'tjbb16:tjbb_16:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'tjbb16:tjbb_16:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<Tjbb_16Modal ref="registerModal" @success="handleSuccess"></Tjbb_16Modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="tjbb16-tjbb_16" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Tjbb_16.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Tjbb_16.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import Tjbb_16Modal from './components/Tjbb_16Modal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'tjbb_16',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "tjbb_16",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'tjbb16:tjbb_16:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'tjbb16:tjbb_16:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,193 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="Tjbb_16Form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学号" v-bind="validateInfos.xh" id="Tjbb_16Form-xh" name="xh">
|
||||
<a-input v-model:value="formData.xh" placeholder="请输入学号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学生姓名" v-bind="validateInfos.xsxm" id="Tjbb_16Form-xsxm" name="xsxm">
|
||||
<a-input v-model:value="formData.xsxm" placeholder="请输入学生姓名" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="性别" v-bind="validateInfos.xb" id="Tjbb_16Form-xb" name="xb">
|
||||
<a-input v-model:value="formData.xb" placeholder="请输入性别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="校内专业(大类)名称" v-bind="validateInfos.xnzydlmc" id="Tjbb_16Form-xnzydlmc" name="xnzydlmc">
|
||||
<a-input v-model:value="formData.xnzydlmc" placeholder="请输入校内专业(大类)名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="校内专业(大类)代码" v-bind="validateInfos.xnzydldm" id="Tjbb_16Form-xnzydldm" name="xnzydldm">
|
||||
<a-input v-model:value="formData.xnzydldm" placeholder="请输入校内专业(大类)代码" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="生源类别" v-bind="validateInfos.sylb" id="Tjbb_16Form-sylb" name="sylb">
|
||||
<a-input v-model:value="formData.sylb" placeholder="请输入生源类别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学生类别" v-bind="validateInfos.xslb" id="Tjbb_16Form-xslb" name="xslb">
|
||||
<a-input v-model:value="formData.xslb" placeholder="请输入学生类别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="年级" v-bind="validateInfos.nj" id="Tjbb_16Form-nj" name="nj">
|
||||
<a-input v-model:value="formData.nj" placeholder="请输入年级" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="入学年份" v-bind="validateInfos.rxnf" id="Tjbb_16Form-rxnf" name="rxnf">
|
||||
<a-input v-model:value="formData.rxnf" placeholder="请输入入学年份" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../Tjbb_16.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
xh: '',
|
||||
xsxm: '',
|
||||
xb: '',
|
||||
xnzydlmc: '',
|
||||
xnzydldm: '',
|
||||
sylb: '',
|
||||
xslb: '',
|
||||
nj: '',
|
||||
rxnf: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<Tjbb_16Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></Tjbb_16Form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import Tjbb_16Form from './Tjbb_16Form.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue