main
Gitea 1 year ago
parent 63bcb45f9b
commit 8be2cc54b3
  1. 398
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  2. 94
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java
  3. 95
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersionMb.java
  4. 32
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersionOptions.java
  5. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/mapper/AwardPersionMapper.java
  6. 5
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/mapper/xml/AwardPersionMapper.xml
  7. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/service/IAwardPersionService.java
  8. 19
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/service/impl/AwardPersionServiceImpl.java

@ -0,0 +1,398 @@
package org.jeecg.modules.demo.awardpersion.controller;
import java.util.ArrayList;
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.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.config.JeecgBaseConfig;
import org.jeecg.modules.demo.annualCompPoint.entity.AnnualCompPoint;
import org.jeecg.modules.demo.annualCompPoint.service.IAnnualCompPointService;
import org.jeecg.modules.demo.annualcompaward.entity.AnnualCompAward;
import org.jeecg.modules.demo.annualcompaward.service.IAnnualCompAwardService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.entity.AnnualCompetitionProjectRegistration;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionMb;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionOptions;
import org.jeecg.modules.demo.awardpersion.service.IAwardPersionService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
import org.jeecgframework.poi.excel.entity.ImportParams;
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
import org.jeecg.common.system.base.controller.JeecgController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
import org.apache.shiro.authz.annotation.RequiresPermissions;
/**
* @Description: 获奖管理
* @Author: jeecg-boot
* @Date: 2023-10-31
* @Version: V1.0
*/
@Api(tags="获奖管理")
@RestController
@RequestMapping("/awardpersion/awardPersion")
@Slf4j
public class AwardPersionController extends JeecgController<AwardPersion, IAwardPersionService> {
@Autowired
private IAwardPersionService awardPersionService;
@Autowired
private IAnnualCompAwardService annualCompAwardService;
@Autowired
private IAnnualCompPointService annualCompPointService;
@Autowired
private IAnnualCompetitionProjectRegistrationService annualCompetitionProjectRegistrationService;
@Resource
private JeecgBaseConfig jeecgBaseConfig;
/**
* 分页列表查询
*
* @param awardPersion
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "获奖管理-分页列表查询")
@ApiOperation(value="获奖管理-分页列表查询", notes="获奖管理-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<AwardPersion>> queryPageList(AwardPersion awardPersion,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<AwardPersion> queryWrapper = QueryGenerator.initQueryWrapper(awardPersion, req.getParameterMap());
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param awardPersion
* @return
*/
@AutoLog(value = "获奖管理-添加")
@ApiOperation(value="获奖管理-添加", notes="获奖管理-添加")
//@RequiresPermissions("awardpersion:award_persion:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody AwardPersion awardPersion,HttpServletRequest req) {
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
queryWrappera.eq("annual_compid",awardPersion.getAnnualCompP());
queryWrappera.eq("enroll_static","2");
queryWrappera.eq("enroll_code",awardPersion.getEnrollCode());
List<AnnualCompetitionProjectRegistration> lista = annualCompetitionProjectRegistrationService.list(queryWrappera);
if(lista.size()==0){
return Result.error("报名编号不存在");
}else {
AnnualCompAward annualCompAward = new AnnualCompAward();
QueryWrapper<AnnualCompAward> queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap());
queryWrapper.eq("annucompid",awardPersion.getAnnualCompP());
List<AnnualCompAward> list = annualCompAwardService.list(queryWrapper);
awardPersion.setAwardid(list.get(0).getId());
awardPersionService.save(awardPersion);
AnnualCompPoint annualCompPoint = annualCompPointService.getById(awardPersion.getAnnualCompP());
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
return Result.OK("添加成功!");
}
}
/**
* 编辑
*
* @param awardPersion
* @return
*/
@AutoLog(value = "获奖管理-编辑")
@ApiOperation(value="获奖管理-编辑", notes="获奖管理-编辑")
//@RequiresPermissions("awardpersion:award_persion:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody AwardPersion awardPersion,HttpServletRequest req) {
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, req.getParameterMap());
queryWrappera.eq("annual_compid",awardPersion.getAnnualCompP());
queryWrappera.eq("enroll_static","2");
queryWrappera.eq("enroll_code",awardPersion.getEnrollCode());
List<AnnualCompetitionProjectRegistration> lista = annualCompetitionProjectRegistrationService.list(queryWrappera);
if(lista.size()==0){
return Result.error("报名编号不存在");
}else {
AnnualCompAward annualCompAward = new AnnualCompAward();
QueryWrapper<AnnualCompAward> queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap());
queryWrapper.eq("annucompid",awardPersion.getAnnualCompP());
List<AnnualCompAward> list = annualCompAwardService.list(queryWrapper);
awardPersion.setAwardid(list.get(0).getId());
awardPersionService.updateById(awardPersion);
return Result.OK("编辑成功!");
}
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "获奖管理-通过id删除")
@ApiOperation(value="获奖管理-通过id删除", notes="获奖管理-通过id删除")
//@RequiresPermissions("awardpersion:award_persion:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
awardPersionService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "获奖管理-批量删除")
@ApiOperation(value="获奖管理-批量删除", notes="获奖管理-批量删除")
//@RequiresPermissions("awardpersion:award_persion:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.awardPersionService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 获取奖项
*
* @param annucompid
* @return
*/
//@AutoLog(value = "获奖管理-通过id查询")
@ApiOperation(value="获取奖项", notes="获取奖项")
@GetMapping(value = "/queryOptions")
public Result<?> queryOptions(@RequestParam(name="annucompid",required=true) String annucompid,HttpServletRequest req) {
AnnualCompAward annualCompAward = new AnnualCompAward();
QueryWrapper<AnnualCompAward> queryWrapper = QueryGenerator.initQueryWrapper(annualCompAward, req.getParameterMap());
queryWrapper.eq("annucompid",annucompid);
List<AnnualCompAward> list = annualCompAwardService.list(queryWrapper);
List<AwardPersionOptions> listarry = new ArrayList<>();
for (int i = 0 ; i<list.size();i++){
if(list.get(i).getIsFirstPrize().equals("Y")){
AwardPersionOptions awardPersionOptions = new AwardPersionOptions();
awardPersionOptions.setLabel(list.get(i).getFirstPrize());
awardPersionOptions.setValue(1);
listarry.add(awardPersionOptions);
}
if(list.get(i).getIsSecondPrize().equals("Y")){
AwardPersionOptions awardPersionOptions = new AwardPersionOptions();
awardPersionOptions.setLabel(list.get(i).getSecondPrize());
awardPersionOptions.setValue(2);
listarry.add(awardPersionOptions);
}
if(list.get(i).getIsThirdPrize().equals("Y")){
AwardPersionOptions awardPersionOptions = new AwardPersionOptions();
awardPersionOptions.setLabel(list.get(i).getThirdPrize());
awardPersionOptions.setValue(3);
listarry.add(awardPersionOptions);
}
if(list.get(i).getIsFourthPrize().equals("Y")){
AwardPersionOptions awardPersionOptions = new AwardPersionOptions();
awardPersionOptions.setLabel(list.get(i).getFourthPrize());
awardPersionOptions.setValue(4);
listarry.add(awardPersionOptions);
}
if(list.get(i).getIsFifthPrize().equals("Y")){
AwardPersionOptions awardPersionOptions = new AwardPersionOptions();
awardPersionOptions.setLabel(list.get(i).getFifthPrize());
awardPersionOptions.setValue(5);
listarry.add(awardPersionOptions);
}
}
if(list.size()==0) {
return Result.error("未找到对应数据");
}
return Result.OK(listarry);
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "获奖管理-通过id查询")
@ApiOperation(value="获奖管理-通过id查询", notes="获奖管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<AwardPersion> queryById(@RequestParam(name="id",required=true) String id) {
AwardPersion awardPersion = awardPersionService.getById(id);
if(awardPersion==null) {
return Result.error("未找到对应数据");
}
return Result.OK(awardPersion);
}
/**
* 导出excel
*
* @param request
* @param awardPersion
*/
//@RequiresPermissions("awardpersion:award_persion:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, AwardPersion awardPersion) {
return super.exportXls(request, awardPersion, AwardPersion.class, "获奖管理");
}
/**
* 导出excel模板
*
*/
//@RequiresPermissions("awardpersion:award_persion:exportXls")
@RequestMapping(value = "/exportXlsMb")
public ModelAndView exportXlsMb(HttpServletRequest request, AwardPersion awardPersion) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
// Step.2 获取导出数据
List<AwardPersionMb> exportList = new ArrayList<>();
// Step.3 AutoPoi 导出Excel
ModelAndView mv = new ModelAndView(new JeecgEntityExcelView());
//此处设置的filename无效 ,前端会重更新设置一下
mv.addObject(NormalExcelConstants.FILE_NAME, "获奖管理模板");
mv.addObject(NormalExcelConstants.CLASS, AwardPersionMb.class);
//update-begin--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置--------------------
ExportParams exportParams=new ExportParams("获奖管理模板" + "报表", "导出人:" + sysUser.getRealname(), "获奖管理模板");
exportParams.setImageBasePath(jeecgBaseConfig.getPath().getUpload());
//update-end--Author:liusq Date:20210126 for:图片导出报错,ImageBasePath未设置----------------------
mv.addObject(NormalExcelConstants.PARAMS,exportParams);
mv.addObject(NormalExcelConstants.DATA_LIST, exportList);
return mv;
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
//@RequiresPermissions("awardpersion:award_persion:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<AwardPersion> list = ExcelImportUtil.importExcel(file.getInputStream(), AwardPersion.class, params);
for(int i = 0 ; i < list.size() ; i++){
AnnualCompetitionProjectRegistration annualCompetitionProjectRegistration = new AnnualCompetitionProjectRegistration();
QueryWrapper<AnnualCompetitionProjectRegistration> queryWrappera = QueryGenerator.initQueryWrapper(annualCompetitionProjectRegistration, request.getParameterMap());
queryWrappera.eq("annual_compid",list.get(i).getAnnualCompP());
queryWrappera.eq("enroll_static","2");
queryWrappera.eq("enroll_code",list.get(i).getEnrollCode());
List<AnnualCompetitionProjectRegistration> lista = annualCompetitionProjectRegistrationService.list(queryWrappera);
if(lista.size()==0){
return Result.error("文件导入失败:第"+(i+1)+"行报名编号不存在");
}
AwardPersion ap = new AwardPersion();
QueryWrapper<AwardPersion> queryWrapperap = QueryGenerator.initQueryWrapper(ap, request.getParameterMap());
queryWrapperap.eq("enroll_code",list.get(i).getEnrollCode());
List<AwardPersion> listap = awardPersionService.list(queryWrapperap);
if(listap.size()>0){
return Result.error("文件导入失败:第"+(i+1)+"行报名编号重复");
}
AnnualCompAward annualCompAward = new AnnualCompAward();
QueryWrapper<AnnualCompAward> queryWrapperaca = QueryGenerator.initQueryWrapper(annualCompAward, request.getParameterMap());
queryWrapperaca.eq("annucompid",list.get(i).getAnnualCompP());
List<AnnualCompAward> listaca = annualCompAwardService.list(queryWrapperaca);
if(listaca.get(0).getFirstPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(1);
list.get(i).setAwardid(listaca.get(0).getId());
}else if(listaca.get(0).getSecondPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(2);
list.get(i).setAwardid(listaca.get(0).getId());
}else if(listaca.get(0).getThirdPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(3);
list.get(i).setAwardid(listaca.get(0).getId());
}else if(listaca.get(0).getFourthPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(4);
list.get(i).setAwardid(listaca.get(0).getId());
}else if(listaca.get(0).getFifthPrize().equals(list.get(i).getAwardname())){
list.get(i).setAwardsort(5);
list.get(i).setAwardid(listaca.get(0).getId());
}else {
return Result.error("文件导入失败:第"+(i+1)+"行奖项名称不存在");
}
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis();
awardPersionService.saveBatch(list);
for (int k = 0 ; k < list.size() ; k++){
AnnualCompPoint annualCompPoint = annualCompPointService.getById(list.get(k).getAnnualCompP());
annualCompPoint.setIsPj(1);
annualCompPointService.updateById(annualCompPoint);
}
//400条 saveBatch消耗时间1592毫秒 循环插入消耗时间1947毫秒
//1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
//update-end-author:taoyan date:20190528 for:批量插入数据
return Result.ok("文件导入成功!数据行数:" + list.size());
} catch (Exception e) {
//update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
String msg = e.getMessage();
log.error(msg, e);
if(msg!=null && msg.indexOf("Duplicate entry")>=0){
return Result.error("文件导入失败:有重复数据!");
}else{
return Result.error("文件导入失败:" + e.getMessage());
}
//update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
//return super.importExcel(request, response, AwardPersion.class);
}
}

@ -0,0 +1,94 @@
package org.jeecg.modules.demo.awardpersion.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: 获奖管理
* @Author: jeecg-boot
* @Date: 2023-10-31
* @Version: V1.0
*/
@Data
@TableName("award_persion")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="award_persion对象", description="获奖管理")
public class AwardPersion implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**年度*/
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id")
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id")
@ApiModelProperty(value = "年度")
private java.lang.String annualid;
/**年度比赛*/
@Excel(name = "年度比赛", width = 15, dictTable = "annual_comp", dicText = "name", dicCode = "id")
@Dict(dictTable = "annual_comp", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "年度比赛")
private java.lang.String annalComp;
/**年度比赛项目*/
@Excel(name = "年度比赛项目", width = 15, dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@ApiModelProperty(value = "年度比赛项目")
private java.lang.String annualCompP;
/**报名编号*/
@Excel(name = "报名编号", width = 15)
@ApiModelProperty(value = "报名编号")
private java.lang.String enrollCode;
/**奖项名称*/
@Excel(name = "奖项名称", width = 15)
@ApiModelProperty(value = "奖项名称")
private java.lang.String awardname;
/**状态*/
@Excel(name = "状态", width = 15, dicCode = "sh_status")
@Dict(dicCode = "sh_status")
@ApiModelProperty(value = "状态")
private java.lang.Integer status;
/**奖项顺序*/
@Excel(name = "奖项顺序", width = 15)
@ApiModelProperty(value = "奖项顺序")
private java.lang.Integer awardsort;
/**奖项*/
@Excel(name = "奖项", width = 15)
@ApiModelProperty(value = "奖项")
private java.lang.String awardid;
}

@ -0,0 +1,95 @@
package org.jeecg.modules.demo.awardpersion.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @Description: 获奖管理
* @Author: jeecg-boot
* @Date: 2023-10-31
* @Version: V1.0
*/
@Data
@TableName("award_persion")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="award_persion对象", description="获奖管理")
public class AwardPersionMb implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private String sysOrgCode;
/**年度*/
@Excel(name = "年度", width = 15, dictTable = "annual", dicText = "annual_name", dicCode = "id")
@Dict(dictTable = "annual", dicText = "annual_name", dicCode = "id")
@ApiModelProperty(value = "年度")
private String annualid;
/**年度比赛*/
@Excel(name = "年度比赛", width = 15, dictTable = "annual_comp", dicText = "name", dicCode = "id")
@Dict(dictTable = "annual_comp", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "年度比赛")
private String annalComp;
/**年度比赛项目*/
@Excel(name = "年度比赛项目", width = 15, dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@Dict(dictTable = "annual_comp_point", dicText = "obj_name", dicCode = "id")
@ApiModelProperty(value = "年度比赛项目")
private String annualCompP;
/**报名编号*/
@Excel(name = "报名编号", width = 15)
@ApiModelProperty(value = "报名编号")
private String enrollCode;
/**奖项名称*/
@Excel(name = "奖项名称", width = 15)
@ApiModelProperty(value = "奖项名称")
private String awardname;
/**状态*/
@Dict(dicCode = "sh_status")
@ApiModelProperty(value = "状态")
private Integer status;
/**奖项顺序*/
@ApiModelProperty(value = "奖项顺序")
private Integer awardsort;
/**奖项*/
@ApiModelProperty(value = "奖项")
private String awardid;
/**学生姓名*/
@Excel(name = "学生姓名", width = 15)
@TableField(exist = false)
private String studentname;
}

@ -0,0 +1,32 @@
package org.jeecg.modules.demo.awardpersion.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="", description="")
public class AwardPersionOptions implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "")
private String label;
@ApiModelProperty(value = "")
private Integer value;
}

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.awardpersion.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 获奖管理
* @Author: jeecg-boot
* @Date: 2023-10-31
* @Version: V1.0
*/
public interface AwardPersionMapper extends BaseMapper<AwardPersion> {
}

@ -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.demo.awardpersion.mapper.AwardPersionMapper">
</mapper>

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.awardpersion.service;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 获奖管理
* @Author: jeecg-boot
* @Date: 2023-10-31
* @Version: V1.0
*/
public interface IAwardPersionService extends IService<AwardPersion> {
}

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.awardpersion.service.impl;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.awardpersion.mapper.AwardPersionMapper;
import org.jeecg.modules.demo.awardpersion.service.IAwardPersionService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 获奖管理
* @Author: jeecg-boot
* @Date: 2023-10-31
* @Version: V1.0
*/
@Service
public class AwardPersionServiceImpl extends ServiceImpl<AwardPersionMapper, AwardPersion> implements IAwardPersionService {
}
Loading…
Cancel
Save