加学生姓名学号

main
Gitea 1 year ago
parent 45a7b7dcd4
commit 67027f384a
  1. 17
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/controller/AwardPersionController.java
  2. 14
      jeecg-boot-master/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/awardpersion/entity/AwardPersion.java

@ -25,7 +25,9 @@ import org.jeecg.modules.demo.annualcomp.service.IAnnualCompService;
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.entity.TeamManagement;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.IAnnualCompetitionProjectRegistrationService;
import org.jeecg.modules.demo.annualcompetitionprojectregistration.service.ITeamManagementService;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersion;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionMb;
import org.jeecg.modules.demo.awardpersion.entity.AwardPersionOptions;
@ -38,6 +40,8 @@ import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.comp.entity.Comp;
import org.jeecg.modules.demo.comp.service.ICompService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -78,6 +82,10 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
private ICompService compService;
@Autowired
private IAnnualCompService annualCompService;
@Autowired
private ITeamManagementService teamManagementService;
@Autowired
private ISysUserService sysUserService;
@Resource
private JeecgBaseConfig jeecgBaseConfig;
@ -120,6 +128,15 @@ public class AwardPersionController extends JeecgController<AwardPersion, IAward
Page<AwardPersion> page = new Page<AwardPersion>(pageNo, pageSize);
IPage<AwardPersion> pageList = awardPersionService.page(page, queryWrapper);
for(int i = 0 ; i < pageList.getRecords().size();i++){
TeamManagement teamManagement = new TeamManagement();
QueryWrapper<TeamManagement> queryWrappertm = QueryGenerator.initQueryWrapper(teamManagement, req.getParameterMap());
queryWrappertm.eq("enroll_code",pageList.getRecords().get(i).getEnrollCode());
List<TeamManagement> listtm = teamManagementService.list(queryWrappertm);
SysUser sysUser = sysUserService.getById(listtm.get(0).getUserId());
pageList.getRecords().get(i).setStudentcode(sysUser.getUsername());
pageList.getRecords().get(i).setStudentname(sysUser.getRealname());
}
return Result.OK(pageList);
}

@ -4,10 +4,8 @@ import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
@ -91,4 +89,12 @@ public class AwardPersion implements Serializable {
@Excel(name = "奖项", width = 15)
@ApiModelProperty(value = "奖项")
private java.lang.String awardid;
/**学生姓名*/
@Excel(name = "学生姓名", width = 15)
@TableField(exist = false)
private String studentname;
/**学生学号*/
@Excel(name = "学生学号", width = 15)
@TableField(exist = false)
private String studentcode;
}

Loading…
Cancel
Save