更新10.8
This commit is contained in:
parent
61e7098b6c
commit
b8d21aff62
@ -1,9 +1,16 @@
|
|||||||
package com.ruoyi.cms.controller;
|
package com.ruoyi.cms.controller;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.ruoyi.cms.domain.vo.HitRegInfoExportVo;
|
||||||
import com.ruoyi.cms.domain.vo.HitRegInfoVo;
|
import com.ruoyi.cms.domain.vo.HitRegInfoVo;
|
||||||
|
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||||
|
import com.ruoyi.common.utils.bean.BeanUtils;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -33,6 +40,8 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
@RequestMapping("/system/hit_reg_info")
|
@RequestMapping("/system/hit_reg_info")
|
||||||
public class HitRegInfoController extends BaseController
|
public class HitRegInfoController extends BaseController
|
||||||
{
|
{
|
||||||
|
private static final Logger log = LoggerFactory.getLogger(HitRegInfoController.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IHitRegInfoService hitRegInfoService;
|
private IHitRegInfoService hitRegInfoService;
|
||||||
|
|
||||||
@ -67,9 +76,32 @@ public class HitRegInfoController extends BaseController
|
|||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, HitRegInfo hitRegInfo)
|
public void export(HttpServletResponse response, HitRegInfo hitRegInfo)
|
||||||
{
|
{
|
||||||
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo);
|
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoListExport(hitRegInfo);
|
||||||
ExcelUtil<HitRegInfo> util = new ExcelUtil<HitRegInfo>(HitRegInfo.class);
|
List<HitRegInfoExportVo> list1 = new ArrayList<>();
|
||||||
util.exportExcel(response, list, "报名信息数据");
|
for (HitRegInfo hitRegInfo1 : list) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
//查询指导老师
|
||||||
|
List<HitRegistrationTeachInfo> zdTeacher = hitRegInfo1.getZdTeacher();
|
||||||
|
HitRegInfoExportVo hitRegInfoExportVo = BeanUtil.copyProperties(hitRegInfo1, HitRegInfoExportVo.class);
|
||||||
|
//设置领队老师
|
||||||
|
hitRegInfoExportVo.setLdTeacher(hitRegInfo1.getLdTeacher().getTeacherName());
|
||||||
|
//设置指导老师
|
||||||
|
hitRegInfoExportVo.setZdlTeacher0(zdTeacher.get(0).getTeacherName());
|
||||||
|
if (zdTeacher.size() > 1) {
|
||||||
|
hitRegInfoExportVo.setZdlTeacher1(zdTeacher.get(1).getTeacherName());
|
||||||
|
}
|
||||||
|
hitRegInfoExportVo.setStudent1(hitRegInfo1.getStudentUserss().get(0).getStuName());
|
||||||
|
hitRegInfoExportVo.setStudent2(hitRegInfo1.getStudentUserss().get(1).getStuName());
|
||||||
|
hitRegInfoExportVo.setStudent3(hitRegInfo1.getStudentUserss().get(2).getStuName());
|
||||||
|
list1.add(hitRegInfoExportVo);
|
||||||
|
}catch (Exception e) {
|
||||||
|
log.error("导出错误,团队信息:{}", hitRegInfo1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ExcelUtil<HitRegInfoExportVo> util = new ExcelUtil<HitRegInfoExportVo>(HitRegInfoExportVo.class);
|
||||||
|
util.exportExcel(response, list1, "报名信息数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.cms.domain.vo;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class HitRegInfoExportVo {
|
||||||
|
/** 所属赛区 */
|
||||||
|
@Excel(name = "所属赛区")
|
||||||
|
private String division;
|
||||||
|
|
||||||
|
/** 学校 */
|
||||||
|
@Excel(name = "学校名称")
|
||||||
|
private String schoolName;
|
||||||
|
|
||||||
|
/** 学院 */
|
||||||
|
@Excel(name = "院系名称")
|
||||||
|
private String collegeName;
|
||||||
|
|
||||||
|
/** 团队名称 */
|
||||||
|
@Excel(name = "团队名称")
|
||||||
|
private String teamName;
|
||||||
|
|
||||||
|
/** 盲样邮寄地址 */
|
||||||
|
@Excel(name = "盲样邮寄地址")
|
||||||
|
private String sampleAddress;
|
||||||
|
|
||||||
|
/** 盲样联系人 */
|
||||||
|
@Excel(name = "盲样联系人")
|
||||||
|
private String sampleConcat;
|
||||||
|
|
||||||
|
/** 盲样联第人电话 */
|
||||||
|
@Excel(name = "联系人电话")
|
||||||
|
private String sampleNumber;
|
||||||
|
|
||||||
|
@Excel(name = "审核状态", readConverterExp = "0=未审核,1=审核通过,2=审核不通过,9=待确认")
|
||||||
|
private String auditStatus;
|
||||||
|
|
||||||
|
@Excel(name = "赛事", readConverterExp = "1=化验赛,2=虚拟赛")
|
||||||
|
private String competition;
|
||||||
|
|
||||||
|
@Excel(name = "领队老师")
|
||||||
|
private String ldTeacher;
|
||||||
|
|
||||||
|
@Excel(name = "指导老师0")
|
||||||
|
private String zdlTeacher0;
|
||||||
|
|
||||||
|
@Excel(name = "指导老师1")
|
||||||
|
private String zdlTeacher1;
|
||||||
|
|
||||||
|
@Excel(name = "学生1")
|
||||||
|
private String student1;
|
||||||
|
|
||||||
|
@Excel(name = "学生2")
|
||||||
|
private String student2;
|
||||||
|
|
||||||
|
@Excel(name = "学生3")
|
||||||
|
private String student3;
|
||||||
|
}
|
@ -27,6 +27,13 @@ public interface IHitRegInfoService
|
|||||||
* @return 报名信息集合
|
* @return 报名信息集合
|
||||||
*/
|
*/
|
||||||
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
|
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
|
||||||
|
/**
|
||||||
|
* 导出报名信息列表
|
||||||
|
*
|
||||||
|
* @param hitRegInfo 报名信息
|
||||||
|
* @return 报名信息集合
|
||||||
|
*/
|
||||||
|
public List<HitRegInfo> selectHitRegInfoListExport(HitRegInfo hitRegInfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报名信息
|
* 新增报名信息
|
||||||
|
@ -115,6 +115,48 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
|||||||
}
|
}
|
||||||
return hitRegInfos;
|
return hitRegInfos;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 查询报名信息列表
|
||||||
|
*
|
||||||
|
* @param hitRegInfo 报名信息
|
||||||
|
* @return 报名信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<HitRegInfo> selectHitRegInfoListExport(HitRegInfo hitRegInfo)
|
||||||
|
{
|
||||||
|
Long userId = SecurityUtils.getLoginUser().getUserId();
|
||||||
|
//判断当前登陆人是否是领队老师,如果是查询该老师学校下的战队
|
||||||
|
HitRegistrationTeachInfo teacherInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(userId);
|
||||||
|
if (teacherInfo != null && teacherInfo.getType().equals("1")) {
|
||||||
|
hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
|
||||||
|
}
|
||||||
|
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
|
||||||
|
for (HitRegInfo regInfo : hitRegInfos) {
|
||||||
|
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();
|
||||||
|
hitRegInfoUser.setRegId(regInfo.getId());
|
||||||
|
List<HitRegInfoUser> hitRegInfoUsers = regInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||||
|
for (HitRegInfoUser regInfoUser : hitRegInfoUsers) {
|
||||||
|
switch (regInfoUser.getType()) {
|
||||||
|
case "3": {
|
||||||
|
HitRegistrationTeachInfo hitRegistrationTeachInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(regInfoUser.getUserId());
|
||||||
|
regInfo.setLdTeacher(hitRegistrationTeachInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "2": {
|
||||||
|
HitRegistrationTeachInfo hitRegistrationTeachInfo = teachInfoMapper.selectHitRegistrationTeachInfoByUserId(regInfoUser.getUserId());
|
||||||
|
regInfo.getZdTeacher().add(hitRegistrationTeachInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1":
|
||||||
|
HitCompetitionStudentInfo studentInfo = hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoByUserId(regInfoUser.getUserId());
|
||||||
|
regInfo.getStudentUserss().add(studentInfo);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return hitRegInfos;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增报名信息
|
* 新增报名信息
|
||||||
|
@ -8,6 +8,14 @@ export function listHitRegistrationStudentInfo(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 导出报名信息列表
|
||||||
|
export function listHitRegistrationStudentInfoExport(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/hit_reg_info/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
// 查询报名信息列表学生
|
// 查询报名信息列表学生
|
||||||
export function listHitRegistrationStudentInfoStudent(query) {
|
export function listHitRegistrationStudentInfoStudent(query) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -17,7 +17,7 @@ const service = axios.create({
|
|||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
baseURL: process.env.VUE_APP_BASE_API,
|
baseURL: process.env.VUE_APP_BASE_API,
|
||||||
// 超时 30s
|
// 超时 30s
|
||||||
timeout: 30000
|
timeout: 120000
|
||||||
})
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
|
@ -37,7 +37,8 @@
|
|||||||
<!-- v-hasPermi="['hit:hitRegistrationStudentInfo:remove']"-->
|
<!-- v-hasPermi="['hit:hitRegistrationStudentInfo:remove']"-->
|
||||||
<!-- >删除</el-button>-->
|
<!-- >删除</el-button>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5"> -->
|
||||||
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
plain
|
plain
|
||||||
@ -46,7 +47,7 @@
|
|||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['hit:hitRegistrationStudentInfo:export']"
|
v-hasPermi="['hit:hitRegistrationStudentInfo:export']"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</el-col>-->
|
</el-col>
|
||||||
<!-- <el-col :span="1.5" v-hasPermi="['hit:open']">-->
|
<!-- <el-col :span="1.5" v-hasPermi="['hit:open']">-->
|
||||||
<!-- <el-switch v-model="registerStatus" @change="updateRegisterStatus" active-value="1" inactive-value="0"-->
|
<!-- <el-switch v-model="registerStatus" @change="updateRegisterStatus" active-value="1" inactive-value="0"-->
|
||||||
<!-- active-text="开启报名" inactive-text="关闭报名" >-->
|
<!-- active-text="开启报名" inactive-text="关闭报名" >-->
|
||||||
@ -182,6 +183,7 @@ import {
|
|||||||
delHitRegistrationStudentInfo,
|
delHitRegistrationStudentInfo,
|
||||||
addHitRegistrationStudentInfo,
|
addHitRegistrationStudentInfo,
|
||||||
updateHitRegistrationStudentInfo,
|
updateHitRegistrationStudentInfo,
|
||||||
|
listHitRegistrationStudentInfoExport,
|
||||||
getTeachInfoByIds
|
getTeachInfoByIds
|
||||||
} from "@/api/hit/registrationStudentInfo";
|
} from "@/api/hit/registrationStudentInfo";
|
||||||
import { selectBaseInfo, editStatus } from '@/api/cms/baseInfo'
|
import { selectBaseInfo, editStatus } from '@/api/cms/baseInfo'
|
||||||
@ -467,7 +469,7 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('hit/hitRegistrationStudentInfo/export', {
|
this.download('system/hit_reg_info/export', {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `HitRegistrationStudentInfo_${new Date().getTime()}.xlsx`)
|
}, `HitRegistrationStudentInfo_${new Date().getTime()}.xlsx`)
|
||||||
},
|
},
|
||||||
|
@ -237,7 +237,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="step-box" v-if="active == 4">
|
<div class="step-box" v-if="active == 4">
|
||||||
|
<div class="step-box-title" style="font-size: 18px;margin-top: 8%;color: red">(地区选拔赛前无需上传资料)</div>
|
||||||
<file-upload style="margin-top: 5%" :fileSize="200" :fileType="['zip', 'rar', '7z']"
|
<file-upload style="margin-top: 5%" :fileSize="200" :fileType="['zip', 'rar', '7z']"
|
||||||
v-model="preliminaryForm.hitRegInfo.dsFile"></file-upload>
|
v-model="preliminaryForm.hitRegInfo.dsFile"></file-upload>
|
||||||
<div>
|
<div>
|
||||||
|
Loading…
Reference in New Issue
Block a user