提交111
This commit is contained in:
parent
5a457d5a19
commit
3cf8eaa543
@ -34,7 +34,7 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
||||
/**
|
||||
* 查询大赛学生列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:list')")
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HitCompetitionStudentInfo hitCompetitionStudentInfo)
|
||||
{
|
||||
@ -46,7 +46,7 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
||||
/**
|
||||
* 导出大赛学生列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:export')")
|
||||
|
||||
@Log(title = "大赛学生", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HitCompetitionStudentInfo hitCompetitionStudentInfo)
|
||||
@ -80,7 +80,7 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
||||
/**
|
||||
* 修改大赛学生
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:edit')")
|
||||
|
||||
@Log(title = "大赛学生", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HitCompetitionStudentInfo hitCompetitionStudentInfo)
|
||||
@ -91,7 +91,7 @@ public class HitCompetitionStudentInfoController extends BaseController {
|
||||
/**
|
||||
* 删除大赛学生
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:info:remove')")
|
||||
|
||||
@Log(title = "大赛学生", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
|
@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 报名信息Controller
|
||||
*
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@ -37,7 +37,7 @@ public class HitRegInfoController extends BaseController
|
||||
/**
|
||||
* 查询报名信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:list')")
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HitRegInfo hitRegInfo)
|
||||
{
|
||||
@ -49,7 +49,7 @@ public class HitRegInfoController extends BaseController
|
||||
/**
|
||||
* 导出报名信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:export')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HitRegInfo hitRegInfo)
|
||||
@ -62,7 +62,7 @@ public class HitRegInfoController extends BaseController
|
||||
/**
|
||||
* 获取报名信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:query')")
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -72,7 +72,7 @@ public class HitRegInfoController extends BaseController
|
||||
/**
|
||||
* 新增报名信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:add')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HitRegInfo hitRegInfo)
|
||||
@ -83,18 +83,26 @@ public class HitRegInfoController extends BaseController
|
||||
/**
|
||||
* 修改报名信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:edit')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HitRegInfo hitRegInfo)
|
||||
{
|
||||
return toAjax(hitRegInfoService.updateHitRegInfo(hitRegInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报名信息
|
||||
*/
|
||||
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/edit2")
|
||||
public AjaxResult edit2(@RequestBody HitRegInfo hitRegInfo)
|
||||
{
|
||||
return toAjax(hitRegInfoService.updateHitRegInfo(hitRegInfo));
|
||||
}
|
||||
/**
|
||||
* 删除报名信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:remove')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
|
@ -0,0 +1,105 @@
|
||||
package com.ruoyi.cms.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 报名相关人员信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-01
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/hitRegUser")
|
||||
public class HitRegInfoUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IHitRegInfoUserService hitRegInfoUserService;
|
||||
|
||||
/**
|
||||
* 查询报名相关人员信息列表
|
||||
*/
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
startPage();
|
||||
List<HitRegInfoUser> list = hitRegInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报名相关人员信息列表
|
||||
*/
|
||||
|
||||
@Log(title = "报名相关人员信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
List<HitRegInfoUser> list = hitRegInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||
ExcelUtil<HitRegInfoUser> util = new ExcelUtil<HitRegInfoUser>(HitRegInfoUser.class);
|
||||
util.exportExcel(response, list, "报名相关人员信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取报名相关人员信息详细信息
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(hitRegInfoUserService.selectHitRegInfoUserById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报名相关人员信息
|
||||
*/
|
||||
|
||||
@Log(title = "报名相关人员信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
return toAjax(hitRegInfoUserService.insertHitRegInfoUser(hitRegInfoUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报名相关人员信息
|
||||
*/
|
||||
@Log(title = "报名相关人员信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
return toAjax(hitRegInfoUserService.updateHitRegInfoUser(hitRegInfoUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报名相关人员信息
|
||||
*/
|
||||
|
||||
@Log(title = "报名相关人员信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(hitRegInfoUserService.deleteHitRegInfoUserByIds(ids));
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 报名信息Controller
|
||||
*
|
||||
*
|
||||
* @author 点亮信息
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@ -37,7 +37,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
||||
/**
|
||||
* 查询报名信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:list')")
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HitRegistrationStudentInfo hitRegistrationStudentInfo)
|
||||
{
|
||||
@ -49,7 +49,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
||||
/**
|
||||
* 导出报名信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:export')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HitRegistrationStudentInfo hitRegistrationStudentInfo)
|
||||
@ -62,7 +62,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
||||
/**
|
||||
* 获取报名信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:query')")
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -72,7 +72,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
||||
/**
|
||||
* 新增报名信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:add')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HitRegistrationStudentInfo hitRegistrationStudentInfo)
|
||||
@ -83,7 +83,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
||||
/**
|
||||
* 修改报名信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:edit')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HitRegistrationStudentInfo hitRegistrationStudentInfo)
|
||||
@ -94,7 +94,7 @@ public class HitRegistrationStudentInfoController extends BaseController
|
||||
/**
|
||||
* 删除报名信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:remove')")
|
||||
|
||||
@Log(title = "报名信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
|
@ -17,7 +17,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 教师信息Controller
|
||||
*
|
||||
*
|
||||
* @author 点亮信息
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@ -44,7 +44,7 @@ public class HitRegistrationTeachInfoController extends BaseController
|
||||
/**
|
||||
* 导出教师信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:export')")
|
||||
|
||||
@Log(title = "教师信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HitRegistrationTeachInfo hitRegistrationTeachInfo)
|
||||
@ -57,7 +57,7 @@ public class HitRegistrationTeachInfoController extends BaseController
|
||||
/**
|
||||
* 获取教师信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:query')")
|
||||
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -67,7 +67,7 @@ public class HitRegistrationTeachInfoController extends BaseController
|
||||
/**
|
||||
* 新增教师信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:add')")
|
||||
|
||||
@Log(title = "教师信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HitRegistrationTeachInfo hitRegistrationTeachInfo)
|
||||
@ -78,18 +78,18 @@ public class HitRegistrationTeachInfoController extends BaseController
|
||||
/**
|
||||
* 修改教师信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:edit')")
|
||||
|
||||
@Log(title = "教师信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HitRegistrationTeachInfo hitRegistrationTeachInfo)
|
||||
{
|
||||
public AjaxResult edit(@RequestBody HitRegistrationTeachInfo hitRegistrationTeachInfo) throws Exception {
|
||||
|
||||
return toAjax(hitRegistrationTeachInfoService.updateHitRegistrationTeachInfo(hitRegistrationTeachInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除教师信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:remove')")
|
||||
|
||||
@Log(title = "教师信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
|
@ -32,7 +32,7 @@ public class HitTeamsController extends BaseController {
|
||||
* 初赛预报名
|
||||
*/
|
||||
@PostMapping("/pre-register")
|
||||
public AjaxResult preRegister(@RequestBody Preliminary preliminary){
|
||||
public AjaxResult preRegister(@RequestBody Preliminary preliminary) throws Exception {
|
||||
return toAjax(hitTeamsService.preRegister(preliminary)) ;
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
@ -44,6 +45,7 @@ public class HitCompetitionStudentInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "学生姓名")
|
||||
private String stuName;
|
||||
|
||||
//用户主键
|
||||
private Long userId;
|
||||
|
||||
@ -55,6 +57,7 @@ public class HitCompetitionStudentInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty(value = "院系名称")
|
||||
private String collegeName;
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty(value = "专业")
|
||||
private String major;
|
||||
@ -104,5 +107,15 @@ public class HitCompetitionStudentInfo implements Serializable {
|
||||
private String year;
|
||||
@TableField(exist = false)
|
||||
private HitRegistrationTeachInfo ldTeacherInfo;
|
||||
@TableField(exist = false)
|
||||
private List<HitRegistrationTeachInfo> zdTeacherList;
|
||||
@TableField(exist = false)
|
||||
private List<HitCompetitionStudentInfo> tdStudentList;
|
||||
@TableField(exist = false)
|
||||
private String zdStatus;
|
||||
@TableField(exist = false)
|
||||
private HitRegInfo hitRegInfo;
|
||||
@TableField(exist = false)
|
||||
private String zdTeacherStr;
|
||||
|
||||
}
|
||||
|
@ -8,12 +8,13 @@ import lombok.Data;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 报名信息对象 hit_reg_info
|
||||
*
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@ -57,6 +58,7 @@ public class HitRegInfo extends BaseEntity
|
||||
/** 附件 */
|
||||
@Excel(name = "附件")
|
||||
private String uploadFile;
|
||||
private String dsFile;
|
||||
//0未审核1审核通过2审核拒绝
|
||||
private String auditStatus;
|
||||
|
||||
@ -71,5 +73,16 @@ public class HitRegInfo extends BaseEntity
|
||||
@Excel(name = "大赛时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<HitRegInfoUser> regInfoUsers =new ArrayList<>();
|
||||
@TableField(exist = false)
|
||||
private List<HitRegInfoUser> studentUser =new ArrayList<>();
|
||||
@TableField(exist = false)
|
||||
private List<HitRegistrationTeachInfo> zdTeacher =new ArrayList<>();
|
||||
@TableField(exist = false)
|
||||
private HitRegistrationTeachInfo ldTeacher;
|
||||
@TableField(exist = false)
|
||||
private List<HitCompetitionStudentInfo> studentUserss =new ArrayList<>();
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
package com.ruoyi.cms.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 报名相关人员信息对象 hit_reg_info_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-01
|
||||
*/
|
||||
@Data
|
||||
public class HitRegInfoUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type=IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 团队报名主键 */
|
||||
@Excel(name = "团队报名主键")
|
||||
private Long regId;
|
||||
|
||||
/** 相关人主键 */
|
||||
@Excel(name = "相关人主键")
|
||||
private Long userId;
|
||||
|
||||
/** 相关人名称 */
|
||||
@Excel(name = "相关人名称")
|
||||
private String userName;
|
||||
|
||||
/** 类型 1 学生 2 指导老师 3领队老师 */
|
||||
@Excel(name = "类型 1 学生 2 指导老师 3领队老师")
|
||||
private String type;
|
||||
|
||||
/** 状态0待确认 1已同意 2拒绝 */
|
||||
@Excel(name = "状态0待确认 1已同意 2拒绝")
|
||||
private String status;
|
||||
/** 逻辑删除0未删除1真删除 */
|
||||
private Long delFlag;
|
||||
@TableField(exist = false)
|
||||
private String isOwn;
|
||||
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.ruoyi.cms.domain;
|
||||
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -24,83 +25,33 @@ public class Preliminary {
|
||||
private String schoolName;
|
||||
|
||||
/** 队员1 */
|
||||
private String TeammateOne;
|
||||
private Long TeammateOne;
|
||||
|
||||
/** 队员2 */
|
||||
private String teammateTwo;
|
||||
private Long teammateTwo;
|
||||
|
||||
/** 领队老师 */
|
||||
private String LeaderTeacher;
|
||||
private Long LeaderTeacher;
|
||||
|
||||
/** 指导老师1 */
|
||||
private String teacherOne;
|
||||
|
||||
public String getTeamName() {
|
||||
return teamName;
|
||||
}
|
||||
|
||||
public void setTeamName(String teamName) {
|
||||
this.teamName = teamName;
|
||||
}
|
||||
|
||||
public String getDivision() {
|
||||
return division;
|
||||
}
|
||||
|
||||
public void setDivision(String division) {
|
||||
this.division = division;
|
||||
}
|
||||
|
||||
public String getSchoolName() {
|
||||
return schoolName;
|
||||
}
|
||||
|
||||
public void setSchoolName(String schoolName) {
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public String getTeammateOne() {
|
||||
return TeammateOne;
|
||||
}
|
||||
|
||||
public void setTeammateOne(String teammateOne) {
|
||||
TeammateOne = teammateOne;
|
||||
}
|
||||
|
||||
public String getTeammateTwo() {
|
||||
return teammateTwo;
|
||||
}
|
||||
|
||||
public void setTeammateTwo(String teammateTwo) {
|
||||
this.teammateTwo = teammateTwo;
|
||||
}
|
||||
|
||||
public String getLeaderTeacher() {
|
||||
return LeaderTeacher;
|
||||
}
|
||||
|
||||
public void setLeaderTeacher(String leaderTeacher) {
|
||||
LeaderTeacher = leaderTeacher;
|
||||
}
|
||||
|
||||
public String getTeacherOne() {
|
||||
return teacherOne;
|
||||
}
|
||||
|
||||
public void setTeacherOne(String teacherOne) {
|
||||
this.teacherOne = teacherOne;
|
||||
}
|
||||
|
||||
public String getTeacherTwo() {
|
||||
return teacherTwo;
|
||||
}
|
||||
|
||||
public void setTeacherTwo(String teacherTwo) {
|
||||
this.teacherTwo = teacherTwo;
|
||||
}
|
||||
|
||||
private Long teacherOne;
|
||||
/** 指导老师2 */
|
||||
private String teacherTwo;
|
||||
private Long teacherTwo;
|
||||
/** 盲样联系人 */
|
||||
@Excel(name = "盲样联系人")
|
||||
private String sampleConcat;
|
||||
|
||||
/** 盲样联第人电话 */
|
||||
@Excel(name = "盲样联第人电话")
|
||||
private String sampleNumber;
|
||||
|
||||
/** 盲样邮寄地址 */
|
||||
@Excel(name = "盲样邮寄地址")
|
||||
private String sampleAddress;
|
||||
|
||||
/** 附件 */
|
||||
@Excel(name = "附件")
|
||||
private String uploadFile;
|
||||
|
||||
|
||||
|
||||
|
@ -2,6 +2,7 @@ package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.ruoyi.cms.domain.HitCompetitionStudentInfo;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -22,6 +23,9 @@ public interface HitCompetitionStudentInfoMapper extends BaseMapper<HitCompetiti
|
||||
*/
|
||||
public HitCompetitionStudentInfo selectHitCompetitionStudentInfoById(String id);
|
||||
|
||||
|
||||
public HitCompetitionStudentInfo selectHitCompetitionStudentInfoByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询大赛学生列表
|
||||
*
|
||||
|
@ -4,10 +4,11 @@ import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.cms.domain.HitRegInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 报名信息Mapper接口
|
||||
*
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@ -15,7 +16,7 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
||||
{
|
||||
/**
|
||||
* 查询报名信息
|
||||
*
|
||||
*
|
||||
* @param id 报名信息主键
|
||||
* @return 报名信息
|
||||
*/
|
||||
@ -23,7 +24,7 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
||||
|
||||
/**
|
||||
* 查询报名信息列表
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 报名信息集合
|
||||
*/
|
||||
@ -31,7 +32,7 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
||||
|
||||
/**
|
||||
* 新增报名信息
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -39,7 +40,7 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
||||
|
||||
/**
|
||||
* 修改报名信息
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -47,7 +48,7 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
||||
|
||||
/**
|
||||
* 删除报名信息
|
||||
*
|
||||
*
|
||||
* @param id 报名信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -55,9 +56,13 @@ public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
|
||||
|
||||
/**
|
||||
* 批量删除报名信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoByIds(Long[] ids);
|
||||
HitRegInfo selectHitByUserId(@Param("userId") Long userId,@Param("status") String status,@Param("year") String year);
|
||||
HitRegInfo selectHitByUserId2(@Param("userId") Long userId,@Param("year") String year);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,64 @@
|
||||
package com.ruoyi.cms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 报名相关人员信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-01
|
||||
*/
|
||||
public interface HitRegInfoUserMapper extends BaseMapper<HitRegInfoUser>
|
||||
{
|
||||
/**
|
||||
* 查询报名相关人员信息
|
||||
*
|
||||
* @param id 报名相关人员信息主键
|
||||
* @return 报名相关人员信息
|
||||
*/
|
||||
public HitRegInfoUser selectHitRegInfoUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报名相关人员信息列表
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 报名相关人员信息集合
|
||||
*/
|
||||
public List<HitRegInfoUser> selectHitRegInfoUserList(HitRegInfoUser hitRegInfoUser);
|
||||
|
||||
/**
|
||||
* 新增报名相关人员信息
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHitRegInfoUser(HitRegInfoUser hitRegInfoUser);
|
||||
|
||||
/**
|
||||
* 修改报名相关人员信息
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHitRegInfoUser(HitRegInfoUser hitRegInfoUser);
|
||||
|
||||
/**
|
||||
* 删除报名相关人员信息
|
||||
*
|
||||
* @param id 报名相关人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除报名相关人员信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoUserByIds(Long[] ids);
|
||||
}
|
@ -5,15 +5,15 @@ import com.ruoyi.cms.domain.HitRegInfo;
|
||||
|
||||
/**
|
||||
* 报名信息Service接口
|
||||
*
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
public interface IHitRegInfoService
|
||||
public interface IHitRegInfoService
|
||||
{
|
||||
/**
|
||||
* 查询报名信息
|
||||
*
|
||||
*
|
||||
* @param id 报名信息主键
|
||||
* @return 报名信息
|
||||
*/
|
||||
@ -21,7 +21,7 @@ public interface IHitRegInfoService
|
||||
|
||||
/**
|
||||
* 查询报名信息列表
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 报名信息集合
|
||||
*/
|
||||
@ -29,7 +29,7 @@ public interface IHitRegInfoService
|
||||
|
||||
/**
|
||||
* 新增报名信息
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -37,27 +37,32 @@ public interface IHitRegInfoService
|
||||
|
||||
/**
|
||||
* 修改报名信息
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHitRegInfo(HitRegInfo hitRegInfo);
|
||||
public int updateHitRegInfo2(HitRegInfo hitRegInfo);
|
||||
|
||||
/**
|
||||
* 批量删除报名信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的报名信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除报名信息信息
|
||||
*
|
||||
* @param id 报名信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoById(Long id);
|
||||
|
||||
void createRegInfo(String teamName,Integer teamCreatorId,String teacherId,Long teamId);
|
||||
|
||||
/**
|
||||
* 查询报名信息
|
||||
*
|
||||
* @param
|
||||
* @return 报名信息
|
||||
*/
|
||||
HitRegInfo selectHitByUserId(Long userId,String status);
|
||||
HitRegInfo selectHitByUserId2(Long userId);
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
package com.ruoyi.cms.service;
|
||||
|
||||
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 报名相关人员信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-01
|
||||
*/
|
||||
public interface IHitRegInfoUserService
|
||||
{
|
||||
/**
|
||||
* 查询报名相关人员信息
|
||||
*
|
||||
* @param id 报名相关人员信息主键
|
||||
* @return 报名相关人员信息
|
||||
*/
|
||||
public HitRegInfoUser selectHitRegInfoUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询报名相关人员信息列表
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 报名相关人员信息集合
|
||||
*/
|
||||
public List<HitRegInfoUser> selectHitRegInfoUserList(HitRegInfoUser hitRegInfoUser);
|
||||
|
||||
/**
|
||||
* 新增报名相关人员信息
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHitRegInfoUser(HitRegInfoUser hitRegInfoUser);
|
||||
|
||||
/**
|
||||
* 修改报名相关人员信息
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHitRegInfoUser(HitRegInfoUser hitRegInfoUser);
|
||||
|
||||
/**
|
||||
* 批量删除报名相关人员信息
|
||||
*
|
||||
* @param ids 需要删除的报名相关人员信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoUserByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除报名相关人员信息信息
|
||||
*
|
||||
* @param id 报名相关人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoUserById(Long id);
|
||||
|
||||
/**
|
||||
* 删除报名相关人员信息信息
|
||||
*
|
||||
* @param regId 报名相关人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHitRegInfoUserByRegId(Long regId);
|
||||
}
|
@ -8,15 +8,15 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 教师信息Service接口
|
||||
*
|
||||
*
|
||||
* @author 点亮信息
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
public interface IHitRegistrationTeachInfoService
|
||||
public interface IHitRegistrationTeachInfoService
|
||||
{
|
||||
/**
|
||||
* 查询教师信息
|
||||
*
|
||||
*
|
||||
* @param id 教师信息主键
|
||||
* @return 教师信息
|
||||
*/
|
||||
@ -24,7 +24,7 @@ public interface IHitRegistrationTeachInfoService
|
||||
|
||||
/**
|
||||
* 查询教师信息列表
|
||||
*
|
||||
*
|
||||
* @param hitRegistrationTeachInfo 教师信息
|
||||
* @return 教师信息集合
|
||||
*/
|
||||
@ -32,7 +32,7 @@ public interface IHitRegistrationTeachInfoService
|
||||
|
||||
/**
|
||||
* 新增教师信息
|
||||
*
|
||||
*
|
||||
* @param hitRegistrationTeachInfo 教师信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -40,15 +40,15 @@ public interface IHitRegistrationTeachInfoService
|
||||
|
||||
/**
|
||||
* 修改教师信息
|
||||
*
|
||||
*
|
||||
* @param hitRegistrationTeachInfo 教师信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHitRegistrationTeachInfo(HitRegistrationTeachInfo hitRegistrationTeachInfo);
|
||||
public int updateHitRegistrationTeachInfo(HitRegistrationTeachInfo hitRegistrationTeachInfo) throws Exception;
|
||||
|
||||
/**
|
||||
* 批量删除教师信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的教师信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@ -56,7 +56,7 @@ public interface IHitRegistrationTeachInfoService
|
||||
|
||||
/**
|
||||
* 删除教师信息信息
|
||||
*
|
||||
*
|
||||
* @param id 教师信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -14,5 +14,5 @@ import com.ruoyi.cms.domain.Preliminary;
|
||||
*/
|
||||
public interface IHitTeamsService extends IService<HitTeams> {
|
||||
|
||||
int preRegister(Preliminary preliminary);
|
||||
int preRegister(Preliminary preliminary) throws Exception;
|
||||
}
|
||||
|
@ -1,9 +1,8 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.cms.domain.HitCompetitionStudentInfo;
|
||||
import com.ruoyi.cms.domain.HitTeamMembers;
|
||||
import com.ruoyi.cms.domain.HitTeams;
|
||||
import com.ruoyi.cms.domain.*;
|
||||
import com.ruoyi.cms.domain.vo.TeamsVo;
|
||||
import com.ruoyi.cms.mapper.HitCompetitionStudentInfoMapper;
|
||||
import com.ruoyi.cms.mapper.HitRegistrationTeachInfoMapper;
|
||||
@ -11,11 +10,13 @@ import com.ruoyi.cms.mapper.HitTeamMembersMapper;
|
||||
import com.ruoyi.cms.mapper.HitTeamsMapper;
|
||||
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.cms.service.IHitRegInfoService;
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@ -24,6 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@ -50,6 +52,8 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private ISysDictDataService sysDictDataService;
|
||||
@Autowired
|
||||
private IHitRegInfoService regInfoService;
|
||||
|
||||
|
||||
|
||||
@ -162,17 +166,81 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
|
||||
queryWrapper.eq(HitCompetitionStudentInfo::getUserId, user.getUserId());
|
||||
queryWrapper.likeRight(HitCompetitionStudentInfo::getCreateTime, year);
|
||||
HitCompetitionStudentInfo hitCompetitionStudentInfo = hitCompetitionStudentInfoMapper.selectOne(queryWrapper);
|
||||
String com_region = sysDictDataService.selectDictLabel("com_region", hitCompetitionStudentInfo.getDivision());
|
||||
hitCompetitionStudentInfo.setDivisionLabel(com_region);
|
||||
if (ObjectUtils.isEmpty(hitCompetitionStudentInfo) ) {
|
||||
return new HitCompetitionStudentInfo();
|
||||
}
|
||||
String com_region = sysDictDataService.selectDictLabel("com_region", hitCompetitionStudentInfo.getDivision());
|
||||
hitCompetitionStudentInfo.setDivisionLabel(com_region);
|
||||
//根据学校查询领队老师
|
||||
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper1 =new LambdaQueryWrapper<>();
|
||||
queryWrapper1.eq(HitRegistrationTeachInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName())
|
||||
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType,1).eq(HitRegistrationTeachInfo::getStatus,1);
|
||||
HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectOne(queryWrapper1);
|
||||
hitCompetitionStudentInfo.setLdTeacherInfo(hitRegistrationTeachInfo);
|
||||
//根绝学校查询 团队成员 把自己排除掉 和 指导老师
|
||||
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper2 =new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(HitRegistrationTeachInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName())
|
||||
.likeRight(HitRegistrationTeachInfo::getCreateTime, year).eq(HitRegistrationTeachInfo::getType,0).eq(HitRegistrationTeachInfo::getStatus,1);
|
||||
List<HitRegistrationTeachInfo> hitRegistrationTeachInfos = hitRegistrationTeachInfoMapper.selectList(queryWrapper2);
|
||||
hitCompetitionStudentInfo.setZdTeacherList(hitRegistrationTeachInfos);
|
||||
|
||||
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper3 =new LambdaQueryWrapper<>();
|
||||
queryWrapper3.eq(HitCompetitionStudentInfo::getSchoolName,hitCompetitionStudentInfo.getSchoolName()).ne(HitCompetitionStudentInfo::getUserId,user.getUserId())
|
||||
.likeRight(HitCompetitionStudentInfo::getCreateTime, year).eq(HitCompetitionStudentInfo::getIsPreliminary,1)
|
||||
.and(it->{
|
||||
it.isNull(HitCompetitionStudentInfo::getHitRegId).or().eq(HitCompetitionStudentInfo::getHitRegId,"");
|
||||
});
|
||||
List<HitCompetitionStudentInfo> studentInfos = this.list(queryWrapper3);
|
||||
hitCompetitionStudentInfo.setTdStudentList(studentInfos);
|
||||
//查询是否存在已组队团队
|
||||
HitRegInfo hitRegInfos1 = regInfoService.selectHitByUserId(user.getUserId(), "1");
|
||||
String status="-1";
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfos1)){
|
||||
status = "1";
|
||||
hitCompetitionStudentInfo.setHitRegInfo(hitRegInfos1);
|
||||
List<HitRegInfoUser> teachers = hitRegInfos1.getRegInfoUsers().stream().filter(it -> {
|
||||
return it.getType().equals("2");
|
||||
}).collect(Collectors.toList());
|
||||
String tmpStr ="";
|
||||
for (HitRegInfoUser teacher : teachers) {
|
||||
tmpStr = teacher.getUserName()+",";
|
||||
}
|
||||
hitCompetitionStudentInfo.setZdTeacherStr(tmpStr.substring(0,tmpStr.length()-1));
|
||||
|
||||
}else {
|
||||
//查询是否存在已确认团队 审核中
|
||||
HitRegInfo hitRegInfos2 = regInfoService.selectHitByUserId(user.getUserId(), "0");
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfos2)){
|
||||
status = "0";
|
||||
hitCompetitionStudentInfo.setHitRegInfo(hitRegInfos2);
|
||||
List<HitRegInfoUser> teachers = hitRegInfos2.getRegInfoUsers().stream().filter(it -> {
|
||||
return it.getType().equals("2");
|
||||
}).collect(Collectors.toList());
|
||||
String tmpStr ="";
|
||||
for (HitRegInfoUser teacher : teachers) {
|
||||
tmpStr = teacher.getUserName()+",";
|
||||
}
|
||||
hitCompetitionStudentInfo.setZdTeacherStr(tmpStr.substring(0,tmpStr.length()-1));
|
||||
}else {
|
||||
//查询是否存在待确认团队
|
||||
HitRegInfo hitRegInfos3 = regInfoService.selectHitByUserId(user.getUserId(), "9");
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfos3)){
|
||||
status = "9";
|
||||
hitCompetitionStudentInfo.setHitRegInfo(hitRegInfos3);
|
||||
List<HitRegInfoUser> teachers = hitRegInfos3.getRegInfoUsers().stream().filter(it -> {
|
||||
return it.getType().equals("2");
|
||||
}).collect(Collectors.toList());
|
||||
String tmpStr ="";
|
||||
for (HitRegInfoUser teacher : teachers) {
|
||||
tmpStr =tmpStr+ teacher.getUserName()+",";
|
||||
}
|
||||
hitCompetitionStudentInfo.setZdTeacherStr(tmpStr.substring(0,tmpStr.length()-1));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
hitCompetitionStudentInfo.setZdStatus(status);
|
||||
return hitCompetitionStudentInfo;
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,10 @@ package com.ruoyi.cms.service.impl;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
@ -11,9 +14,13 @@ import com.ruoyi.cms.domain.*;
|
||||
import com.ruoyi.cms.mapper.*;
|
||||
import com.ruoyi.cms.service.ICmsContentService;
|
||||
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
||||
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cms.service.IHitRegInfoService;
|
||||
@ -21,18 +28,16 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 报名信息Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author zcy
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@Service
|
||||
public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
{
|
||||
@Autowired
|
||||
private HitRegInfoMapper hitRegInfoMapper;
|
||||
@Autowired
|
||||
private HitRegistrationStudentInfoMapper studentInfoMapper;
|
||||
@Autowired
|
||||
private HitRegistrationTeachInfoMapper teachInfoMapper;
|
||||
@Autowired
|
||||
private ICmsContentService insertCmsContent;
|
||||
@ -40,15 +45,18 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
private CmsContentMapper cmsContentMapper;
|
||||
@Autowired
|
||||
private HitCompetitionStudentInfoMapper competitionStudentInfo;
|
||||
@Autowired
|
||||
private IHitCompetitionStudentInfoService competitionStudentInfoService;
|
||||
|
||||
@Autowired
|
||||
private HitTeamMembersMapper teamMembersMapper;
|
||||
@Autowired
|
||||
private IHitRegInfoUserService regInfoUserService;
|
||||
@Autowired
|
||||
private HitCompetitionStudentInfoMapper hitCompetitionStudentInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 查询报名信息
|
||||
*
|
||||
*
|
||||
* @param id 报名信息主键
|
||||
* @return 报名信息
|
||||
*/
|
||||
@ -60,7 +68,7 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
|
||||
/**
|
||||
* 查询报名信息列表
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 报名信息
|
||||
*/
|
||||
@ -69,22 +77,35 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
{
|
||||
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
|
||||
for (HitRegInfo regInfo : hitRegInfos) {
|
||||
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitCompetitionStudentInfo::getHitRegId,regInfo.getId());
|
||||
List<HitCompetitionStudentInfo> hitRegistrationStudentInfos = competitionStudentInfo.selectList(queryWrapper);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper2 =new LambdaQueryWrapper<>();
|
||||
queryWrapper2.eq(HitRegistrationTeachInfo::getHitRegId,regInfo.getId()).orderByDesc(HitRegistrationTeachInfo::getType);
|
||||
List<HitRegistrationTeachInfo> teachInfos = teachInfoMapper.selectList(queryWrapper2);
|
||||
regInfo.setStudentInfoList(hitRegistrationStudentInfos);
|
||||
regInfo.setTeacherInfoList(teachInfos);
|
||||
}
|
||||
return hitRegInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报名信息
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 结果
|
||||
*/
|
||||
@ -110,13 +131,14 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
|
||||
/**
|
||||
* 修改报名信息及创建/删除大赛通知信息
|
||||
*
|
||||
*
|
||||
* @param hitRegInfo 报名信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHitRegInfo(HitRegInfo hitRegInfo)
|
||||
{
|
||||
|
||||
hitRegInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
//获取当前年份
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy");
|
||||
@ -205,12 +227,25 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
}
|
||||
content.setContentDetail(contentHeader + contentDetail + contentFooter);
|
||||
insertCmsContent.updateCmsContent(content);
|
||||
if (hitRegInfo.getAuditStatus().equals("2")){
|
||||
//拒绝就要把信息删掉
|
||||
regInfoUserService.deleteHitRegInfoUserByRegId(hitRegInfo.getId());
|
||||
return hitRegInfoMapper.deleteHitRegInfoById(hitRegInfo.getId());
|
||||
|
||||
}else{
|
||||
return hitRegInfoMapper.updateHitRegInfo(hitRegInfo);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateHitRegInfo2(HitRegInfo hitRegInfo) {
|
||||
return hitRegInfoMapper.updateHitRegInfo(hitRegInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除报名信息
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的报名信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@ -220,18 +255,6 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
return hitRegInfoMapper.deleteHitRegInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报名信息信息
|
||||
*
|
||||
* @param id 报名信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHitRegInfoById(Long id)
|
||||
{
|
||||
return hitRegInfoMapper.deleteHitRegInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建报名信息
|
||||
* @param teamName
|
||||
@ -261,6 +284,47 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public HitRegInfo selectHitByUserId(Long userId, String status) {
|
||||
//获取当前用户信息信息
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
HitRegInfo hitRegInfo = hitRegInfoMapper.selectHitByUserId(userId, status,String.valueOf(year));
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfo)){
|
||||
HitRegInfoUser hitRegInfoUser = new HitRegInfoUser();
|
||||
hitRegInfoUser.setRegId(hitRegInfo.getId());
|
||||
List<HitRegInfoUser> hitRegInfoUsers = regInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||
hitRegInfo.setRegInfoUsers(hitRegInfoUsers);
|
||||
List<HitRegInfoUser> collect = hitRegInfoUsers.stream().filter(it -> {
|
||||
return it.getType().equals("1");
|
||||
}).collect(Collectors.toList());
|
||||
for (HitRegInfoUser regInfoUser : collect) {
|
||||
if (regInfoUser.getUserId().equals(user.getUserId())){
|
||||
regInfoUser.setIsOwn("1");
|
||||
}else {
|
||||
regInfoUser.setIsOwn("0");
|
||||
}
|
||||
}
|
||||
hitRegInfo.setStudentUser(collect);
|
||||
}
|
||||
return hitRegInfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HitRegInfo selectHitByUserId2(Long userId) {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
HitRegInfo hitRegInfo = hitRegInfoMapper.selectHitByUserId2(userId,String.valueOf(year));
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfo)){
|
||||
HitRegInfoUser hitRegInfoUser = new HitRegInfoUser();
|
||||
hitRegInfoUser.setRegId(hitRegInfo.getId());
|
||||
List<HitRegInfoUser> hitRegInfoUsers = regInfoUserService.selectHitRegInfoUserList(hitRegInfoUser);
|
||||
hitRegInfo.setRegInfoUsers(hitRegInfoUsers);
|
||||
}
|
||||
return hitRegInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新队员信息
|
||||
* @param teamId
|
||||
|
@ -0,0 +1,137 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.cms.domain.HitRegInfo;
|
||||
import com.ruoyi.cms.domain.HitRegInfoUser;
|
||||
import com.ruoyi.cms.mapper.HitRegInfoUserMapper;
|
||||
import com.ruoyi.cms.service.IHitRegInfoService;
|
||||
import com.ruoyi.cms.service.IHitRegInfoUserService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
||||
/**
|
||||
* 报名相关人员信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2024-09-01
|
||||
*/
|
||||
@Service
|
||||
public class HitRegInfoUserServiceImpl implements IHitRegInfoUserService
|
||||
{
|
||||
@Autowired
|
||||
private HitRegInfoUserMapper hitRegInfoUserMapper;
|
||||
@Autowired
|
||||
private IHitRegInfoService hitRegInfoService;
|
||||
|
||||
/**
|
||||
* 查询报名相关人员信息
|
||||
*
|
||||
* @param id 报名相关人员信息主键
|
||||
* @return 报名相关人员信息
|
||||
*/
|
||||
@Override
|
||||
public HitRegInfoUser selectHitRegInfoUserById(Long id)
|
||||
{
|
||||
return hitRegInfoUserMapper.selectHitRegInfoUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询报名相关人员信息列表
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 报名相关人员信息
|
||||
*/
|
||||
@Override
|
||||
public List<HitRegInfoUser> selectHitRegInfoUserList(HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
return hitRegInfoUserMapper.selectHitRegInfoUserList(hitRegInfoUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增报名相关人员信息
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHitRegInfoUser(HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
hitRegInfoUser.setCreateTime(DateUtils.getNowDate());
|
||||
return hitRegInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改报名相关人员信息
|
||||
*
|
||||
* @param hitRegInfoUser 报名相关人员信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateHitRegInfoUser(HitRegInfoUser hitRegInfoUser)
|
||||
{
|
||||
if (hitRegInfoUser.getStatus().equals("2")){
|
||||
//一个拒绝直接解散
|
||||
Long regId = hitRegInfoUser.getRegId();
|
||||
hitRegInfoService.deleteHitRegInfoByIds(new Long[]{regId});
|
||||
//把人员信息也删除
|
||||
LambdaQueryWrapper<HitRegInfoUser> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitRegInfoUser::getRegId,regId);
|
||||
hitRegInfoUserMapper.delete(queryWrapper);
|
||||
}else {
|
||||
//如果全部同意就要进行下一步
|
||||
hitRegInfoUser.setUpdateTime(DateUtils.getNowDate());
|
||||
hitRegInfoUserMapper.updateHitRegInfoUser(hitRegInfoUser);
|
||||
LambdaQueryWrapper<HitRegInfoUser> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitRegInfoUser::getRegId,hitRegInfoUser.getRegId())
|
||||
.eq(HitRegInfoUser::getType,"1")
|
||||
.eq(HitRegInfoUser::getStatus,"0");
|
||||
List<HitRegInfoUser> hitRegInfoUsers = hitRegInfoUserMapper.selectList(queryWrapper);
|
||||
if (CollectionUtil.isEmpty(hitRegInfoUsers)){
|
||||
//代表全部通过
|
||||
Long regId = hitRegInfoUser.getRegId();
|
||||
HitRegInfo hitRegInfo = hitRegInfoService.selectHitRegInfoById(regId);
|
||||
hitRegInfo.setAuditStatus("0");
|
||||
hitRegInfoService.updateHitRegInfo(hitRegInfo);
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除报名相关人员信息
|
||||
*
|
||||
* @param ids 需要删除的报名相关人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHitRegInfoUserByIds(Long[] ids)
|
||||
{
|
||||
return hitRegInfoUserMapper.deleteHitRegInfoUserByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除报名相关人员信息信息
|
||||
*
|
||||
* @param id 报名相关人员信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHitRegInfoUserById(Long id)
|
||||
{
|
||||
return hitRegInfoUserMapper.deleteHitRegInfoUserById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteHitRegInfoUserByRegId(Long regId) {
|
||||
LambdaQueryWrapper<HitRegInfoUser> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitRegInfoUser::getRegId,regId);
|
||||
return hitRegInfoUserMapper.delete(queryWrapper);
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@ import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.constant.UserConstants;
|
||||
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.exception.user.CaptchaException;
|
||||
@ -23,6 +24,7 @@ import com.ruoyi.framework.manager.factory.AsyncFactory;
|
||||
import com.ruoyi.framework.web.service.SysRegisterService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.cms.mapper.HitRegistrationTeachInfoMapper;
|
||||
@ -31,7 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* 教师信息Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author 点亮信息
|
||||
* @date 2024-08-20
|
||||
*/
|
||||
@ -72,6 +74,12 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy");
|
||||
String currentYear = LocalDate.now().format(formatter);
|
||||
hitRegistrationTeachInfo.setYear(currentYear);
|
||||
//当前教师的学校
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
HitRegistrationTeachInfo hitRegistrationTeachInfo1 = hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoByUserId(loginUser.getUserId());
|
||||
if(ObjectUtils.isNotEmpty(hitRegistrationTeachInfo1)){
|
||||
hitRegistrationTeachInfo.setSchoolName(hitRegistrationTeachInfo1.getSchoolName());
|
||||
}
|
||||
return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo);
|
||||
}
|
||||
|
||||
@ -94,7 +102,19 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHitRegistrationTeachInfo(HitRegistrationTeachInfo hitRegistrationTeachInfo) {
|
||||
public int updateHitRegistrationTeachInfo(HitRegistrationTeachInfo hitRegistrationTeachInfo) throws Exception {
|
||||
if (hitRegistrationTeachInfo.getType().equals("1")&&hitRegistrationTeachInfo.getStatus().equals("1")){
|
||||
//查询系统中是否存在已审核通过的同学校领队老师
|
||||
LambdaQueryWrapper<HitRegistrationTeachInfo> queryWrapper =new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitRegistrationTeachInfo::getType,"1")
|
||||
.eq(HitRegistrationTeachInfo::getSchoolName,hitRegistrationTeachInfo.getSchoolName())
|
||||
.eq(HitRegistrationTeachInfo::getStatus,"1").last("limit 1");
|
||||
HitRegistrationTeachInfo hitRegistrationTeachInfo1 = hitRegistrationTeachInfoMapper.selectOne(queryWrapper);
|
||||
if (ObjectUtils.isNotEmpty(hitRegistrationTeachInfo1)){
|
||||
throw new Exception("已存在领队老师");
|
||||
}
|
||||
|
||||
}
|
||||
hitRegistrationTeachInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return hitRegistrationTeachInfoMapper.updateHitRegistrationTeachInfo(hitRegistrationTeachInfo);
|
||||
}
|
||||
@ -141,7 +161,6 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
||||
String msg = "", username = user.getUsername(), password = user.getPassword();
|
||||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(username);
|
||||
|
||||
// 验证码开关
|
||||
boolean captchaEnabled = configService.selectCaptchaEnabled();
|
||||
if (captchaEnabled) {
|
||||
@ -164,7 +183,14 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
||||
sysUser.setNickName(user.getNickName());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||
sysUser.setUserType(user.getUserType());
|
||||
boolean regFlag = userService.registerUser(sysUser);
|
||||
boolean regFlag ;
|
||||
if (user.getUserType().equals("03")){
|
||||
//领队老师
|
||||
sysUser.setRoleIds(new Long[]{102L});
|
||||
regFlag = userService.insertUser(sysUser)>0;
|
||||
}else {
|
||||
regFlag= userService.registerUser(sysUser);
|
||||
}
|
||||
if (!regFlag) {
|
||||
msg = "注册失败,请联系系统管理人员";
|
||||
} else {
|
||||
@ -179,7 +205,7 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
||||
HitRegistrationTeachInfo teachInfo = user.getHitRegistrationTeachInfo();
|
||||
teachInfo.setRelatedAccounts(user.getUsername());
|
||||
teachInfo.setStatus("1");
|
||||
teachInfo.setType(user.getUserType());
|
||||
teachInfo.setType("0");
|
||||
teachInfo.setTeacherName(user.getNickName());
|
||||
teachInfo.setUserId(sysUser.getUserId());
|
||||
this.insertHitRegistrationTeachInfo(teachInfo);
|
||||
@ -187,7 +213,7 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
|
||||
HitRegistrationTeachInfo teachInfo = user.getHitRegistrationTeachInfo();
|
||||
teachInfo.setRelatedAccounts(user.getUsername());
|
||||
teachInfo.setStatus("0");
|
||||
teachInfo.setType(user.getUserType());
|
||||
teachInfo.setType("1");
|
||||
teachInfo.setTeacherName(user.getNickName());
|
||||
teachInfo.setUserId(sysUser.getUserId());
|
||||
this.insertHitRegistrationTeachInfo(teachInfo);
|
||||
|
@ -47,21 +47,21 @@ public class HitTeamMembersServiceImpl extends ServiceImpl<HitTeamMembersMapper,
|
||||
*/
|
||||
@Override
|
||||
public void createTeamMembers(Preliminary preliminary,Integer teamId) {
|
||||
if (preliminary.getTeammateOne() != null) {
|
||||
insertTeamMembers(preliminary.getTeammateOne(),teamId,0);
|
||||
}
|
||||
if (preliminary.getTeammateTwo() != null) {
|
||||
insertTeamMembers(preliminary.getTeammateTwo(),teamId,0);
|
||||
}
|
||||
if (preliminary.getLeaderTeacher() != null) {
|
||||
insertTeacher(preliminary.getLeaderTeacher(),teamId, 1);
|
||||
}
|
||||
if (preliminary.getTeacherOne() != null) {
|
||||
insertTeacher(preliminary.getTeacherOne(),teamId, 2);
|
||||
}
|
||||
if (preliminary.getTeacherTwo() != null) {
|
||||
insertTeacher(preliminary.getTeacherTwo(),teamId,2);
|
||||
}
|
||||
// if (preliminary.getTeammateOne() != null) {
|
||||
// insertTeamMembers(preliminary.getTeammateOne(),teamId,0);
|
||||
// }
|
||||
// if (preliminary.getTeammateTwo() != null) {
|
||||
// insertTeamMembers(preliminary.getTeammateTwo(),teamId,0);
|
||||
// }
|
||||
// if (preliminary.getLeaderTeacher() != null) {
|
||||
// insertTeacher(preliminary.getLeaderTeacher(),teamId, 1);
|
||||
// }
|
||||
// if (preliminary.getTeacherOne() != null) {
|
||||
// insertTeacher(preliminary.getTeacherOne(),teamId, 2);
|
||||
// }
|
||||
// if (preliminary.getTeacherTwo() != null) {
|
||||
// insertTeacher(preliminary.getTeacherTwo(),teamId,2);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,20 +1,26 @@
|
||||
package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.ruoyi.cms.domain.HitCompetitionStudentInfo;
|
||||
import com.ruoyi.cms.domain.HitTeams;
|
||||
import com.ruoyi.cms.domain.Preliminary;
|
||||
import com.ruoyi.cms.domain.*;
|
||||
import com.ruoyi.cms.mapper.HitCompetitionStudentInfoMapper;
|
||||
import com.ruoyi.cms.mapper.HitRegInfoMapper;
|
||||
import com.ruoyi.cms.mapper.HitRegInfoUserMapper;
|
||||
import com.ruoyi.cms.mapper.HitTeamsMapper;
|
||||
import com.ruoyi.cms.service.IHitCompetitionStudentInfoService;
|
||||
import com.ruoyi.cms.service.IHitRegInfoService;
|
||||
import com.ruoyi.cms.service.IHitTeamMembersService;
|
||||
import com.ruoyi.cms.service.IHitTeamsService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@ -29,16 +35,15 @@ import java.util.Date;
|
||||
public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> implements IHitTeamsService {
|
||||
|
||||
@Autowired
|
||||
private IHitCompetitionStudentInfoService hitStuService;
|
||||
|
||||
private HitCompetitionStudentInfoMapper hitCompetitionStudentInfoMapper;
|
||||
@Autowired
|
||||
private HitTeamsMapper hitTeamsMapper;
|
||||
|
||||
private HitRegInfoMapper hitRegInfoMapper;
|
||||
@Autowired
|
||||
private IHitTeamMembersService hitTeamMembersService;
|
||||
|
||||
private HitRegInfoUserMapper regInfoUserMapper;
|
||||
@Autowired
|
||||
private HitTeamMembersServiceImpl hitTeamMembersServiceImpl;
|
||||
private ISysUserService userService;
|
||||
@Autowired
|
||||
private IHitRegInfoService regInfoService;
|
||||
|
||||
/**
|
||||
* 初赛报名
|
||||
@ -46,33 +51,103 @@ public class HitTeamsServiceImpl extends ServiceImpl<HitTeamsMapper, HitTeams> i
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int preRegister(Preliminary preliminary) {
|
||||
//获取当前学生信息
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int preRegister(Preliminary preliminary) throws Exception {
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
int year = calendar.get(Calendar.YEAR);
|
||||
//判断所选三个队员是否存在待确认
|
||||
if (preliminary.getTeammateOne().equals(preliminary.getTeammateTwo())){
|
||||
throw new Exception("队员不可重复");
|
||||
}
|
||||
HitRegInfo hitRegInfo1 = regInfoService.selectHitByUserId2(preliminary.getTeammateOne());
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfo1)){
|
||||
throw new Exception("队员1已存在组队信息,不可重复组队");
|
||||
}
|
||||
HitRegInfo hitRegInfo2 = regInfoService.selectHitByUserId2(preliminary.getTeammateTwo());
|
||||
if (ObjectUtils.isNotEmpty(hitRegInfo2)){
|
||||
throw new Exception("队员2已存在组队信息,不可重复组队");
|
||||
}
|
||||
//获取当前用户信息信息
|
||||
SysUser user = SecurityUtils.getLoginUser().getUser();
|
||||
|
||||
//查询当前学生报名表id
|
||||
LambdaQueryWrapper<HitCompetitionStudentInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(HitCompetitionStudentInfo::getStudentId, user.getUserName());
|
||||
HitCompetitionStudentInfo hitStu = hitStuService.getOne(queryWrapper);
|
||||
Integer teamCreatorId = hitStu.getId();
|
||||
queryWrapper.eq(HitCompetitionStudentInfo::getUserId, user.getUserId());
|
||||
queryWrapper.likeRight(HitCompetitionStudentInfo::getCreateTime, year);
|
||||
HitCompetitionStudentInfo hitStu = hitCompetitionStudentInfoMapper.selectOne(queryWrapper);
|
||||
HitRegInfo hitRegInfo =new HitRegInfo();
|
||||
hitRegInfo.setSchoolName(preliminary.getSchoolName());
|
||||
hitRegInfo.setCollegeName(hitStu.getCollegeName());
|
||||
hitRegInfo.setDivision(preliminary.getDivision());
|
||||
hitRegInfo.setTeamName(preliminary.getTeamName());
|
||||
hitRegInfo.setSampleAddress(preliminary.getSampleAddress());
|
||||
hitRegInfo.setSampleConcat(preliminary.getSampleConcat());
|
||||
hitRegInfo.setSampleNumber(preliminary.getSampleNumber());
|
||||
hitRegInfo.setUploadFile(preliminary.getUploadFile());
|
||||
hitRegInfo.setAuditStatus("9");
|
||||
hitRegInfo.setCreateTime(new Date());
|
||||
int insert = hitRegInfoMapper.insert(hitRegInfo);
|
||||
//插入人员信息
|
||||
HitRegInfoUser hitRegInfoUser1 =new HitRegInfoUser();
|
||||
hitRegInfoUser1.setRegId(hitRegInfo.getId());
|
||||
hitRegInfoUser1.setUserId(user.getUserId());
|
||||
hitRegInfoUser1.setUserName(user.getNickName());
|
||||
hitRegInfoUser1.setType("1");
|
||||
hitRegInfoUser1.setStatus("0");
|
||||
hitRegInfoUser1.setCreateTime(new Date());
|
||||
regInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser1);
|
||||
|
||||
HitTeams hitTeams = new HitTeams();
|
||||
hitTeams.setTeamName(preliminary.getTeamName());
|
||||
hitTeams.setDivision(preliminary.getDivision());
|
||||
hitTeams.setSchoolName(preliminary.getSchoolName());
|
||||
hitTeams.setTeamCreatorId(teamCreatorId);
|
||||
hitTeams.setCreateTime(LocalDateTime.now());
|
||||
hitTeams.setUpdateTime(LocalDateTime.now());
|
||||
hitTeams.setCreateBy(user.getUserName());
|
||||
hitTeams.setUpdateBy(user.getUserName());
|
||||
//创建团队
|
||||
int insert = hitTeamsMapper.insert(hitTeams);
|
||||
//插入人员信息
|
||||
HitRegInfoUser hitRegInfoUser2 =new HitRegInfoUser();
|
||||
hitRegInfoUser2.setRegId(hitRegInfo.getId());
|
||||
hitRegInfoUser2.setUserId(preliminary.getTeammateOne());
|
||||
SysUser sysUser = userService.selectUserById(preliminary.getTeammateOne());
|
||||
hitRegInfoUser2.setUserName(sysUser.getNickName());
|
||||
hitRegInfoUser2.setType("1");
|
||||
hitRegInfoUser2.setStatus("0");
|
||||
hitRegInfoUser2.setCreateTime(new Date());
|
||||
regInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser2);
|
||||
|
||||
Integer teamId = hitTeams.getId();
|
||||
hitTeamMembersServiceImpl.insertTeamMembers(String.valueOf(teamCreatorId),teamId,1);
|
||||
//创建队友关系等待队友确认
|
||||
hitTeamMembersService.createTeamMembers(preliminary , teamId);
|
||||
//插入人员信息
|
||||
HitRegInfoUser hitRegInfoUser3 =new HitRegInfoUser();
|
||||
hitRegInfoUser3.setRegId(hitRegInfo.getId());
|
||||
hitRegInfoUser3.setUserId(preliminary.getTeammateTwo());
|
||||
SysUser sysUser1 = userService.selectUserById(preliminary.getTeammateTwo());
|
||||
hitRegInfoUser3.setUserName(sysUser1.getNickName());
|
||||
hitRegInfoUser3.setType("1");
|
||||
hitRegInfoUser3.setStatus("0");
|
||||
hitRegInfoUser3.setCreateTime(new Date());
|
||||
regInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser3);
|
||||
|
||||
HitRegInfoUser hitRegInfoUser4 =new HitRegInfoUser();
|
||||
hitRegInfoUser4.setRegId(hitRegInfo.getId());
|
||||
hitRegInfoUser4.setUserId(preliminary.getLeaderTeacher());
|
||||
SysUser sysUser2 = userService.selectUserById(preliminary.getLeaderTeacher());
|
||||
hitRegInfoUser4.setUserName(sysUser2.getNickName());
|
||||
hitRegInfoUser4.setType("3");
|
||||
hitRegInfoUser4.setStatus("0");
|
||||
hitRegInfoUser4.setCreateTime(new Date());
|
||||
regInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser4);
|
||||
|
||||
HitRegInfoUser hitRegInfoUser5 =new HitRegInfoUser();
|
||||
hitRegInfoUser5.setRegId(hitRegInfo.getId());
|
||||
hitRegInfoUser5.setUserId(preliminary.getTeacherOne());
|
||||
SysUser sysUser3 = userService.selectUserById(preliminary.getTeacherOne());
|
||||
hitRegInfoUser5.setUserName(sysUser3.getNickName());
|
||||
hitRegInfoUser5.setType("2");
|
||||
hitRegInfoUser5.setStatus("0");
|
||||
hitRegInfoUser5.setCreateTime(new Date());
|
||||
regInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser5);
|
||||
if (ObjectUtils.isNotEmpty(preliminary.getTeacherTwo())){
|
||||
HitRegInfoUser hitRegInfoUser6 =new HitRegInfoUser();
|
||||
hitRegInfoUser6.setRegId(hitRegInfo.getId());
|
||||
hitRegInfoUser6.setUserId(preliminary.getTeacherTwo());
|
||||
SysUser sysUser4 = userService.selectUserById(preliminary.getTeacherTwo());
|
||||
hitRegInfoUser6.setUserName(sysUser4.getNickName());
|
||||
hitRegInfoUser6.setType("2");
|
||||
hitRegInfoUser6.setStatus("0");
|
||||
hitRegInfoUser6.setCreateTime(new Date());
|
||||
regInfoUserMapper.insertHitRegInfoUser(hitRegInfoUser6);
|
||||
}
|
||||
return insert;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -6,9 +6,9 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://122.51.230.86:3306/hgd_website?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: hgdRoot
|
||||
password: qqzcy@1014
|
||||
url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
|
||||
username: obrhgd
|
||||
password: Obr7890&*()
|
||||
# master:
|
||||
# url: jdbc:mysql://localhost:3306/ry-cms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
@ -17,9 +17,9 @@ spring:
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
enabled: false
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
url:
|
||||
username:
|
||||
password:
|
||||
# 初始连接数
|
||||
initialSize: 5
|
||||
# 最小连接池数量
|
||||
@ -43,7 +43,7 @@ spring:
|
||||
testWhileIdle: true
|
||||
testOnBorrow: false
|
||||
testOnReturn: false
|
||||
webStatFilter:
|
||||
webStatFilter:
|
||||
enabled: true
|
||||
statViewServlet:
|
||||
enabled: true
|
||||
@ -62,4 +62,4 @@ spring:
|
||||
merge-sql: true
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
multi-statement-allow: true
|
||||
|
@ -16,10 +16,10 @@ ruoyi:
|
||||
# 开发环境配置
|
||||
server:
|
||||
# 服务器的HTTP端口,默认为8080
|
||||
port: 8080
|
||||
port: 8081
|
||||
servlet:
|
||||
# 应用的访问路径
|
||||
context-path: /
|
||||
context-path: /hgdWebsite
|
||||
tomcat:
|
||||
# tomcat的URI编码
|
||||
uri-encoding: UTF-8
|
||||
@ -72,7 +72,7 @@ spring:
|
||||
# 端口,默认为6379
|
||||
port: 6379
|
||||
# 数据库索引
|
||||
database: 0
|
||||
database: 9
|
||||
# 密码
|
||||
password:
|
||||
# 连接超时时间
|
||||
|
@ -19,6 +19,7 @@
|
||||
<result property="trialsScore" column="trials_score" />
|
||||
<result property="isPreliminary" column="is_preliminary" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="sex" column="sex" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
@ -28,7 +29,7 @@
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, hit_reg_id, stuName, schoolName, collegeName, major, division, phoneNumber, email, studentIdCard, trialsScore, isPreliminary, remark, del_flag, create_time, create_by, update_time, update_by
|
||||
id, hit_reg_id, stuName, schoolName, collegeName, major, division, phoneNumber, email, studentIdCard, trialsScore, isPreliminary, remark,sex, del_flag, create_time, create_by, update_time, update_by
|
||||
</sql>
|
||||
|
||||
<select id="selectHitCompetitionStudentInfoList" parameterType="HitCompetitionStudentInfo"
|
||||
@ -54,6 +55,11 @@
|
||||
resultType="com.ruoyi.cms.domain.HitCompetitionStudentInfo">
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectHitCompetitionStudentInfoByUserId"
|
||||
resultType="com.ruoyi.cms.domain.HitCompetitionStudentInfo" parameterType="java.lang.Long">
|
||||
select * from hit_competition_student_info
|
||||
where user_id = #{userId} and YEAR(create_time) = YEAR(CURRENT_DATE)
|
||||
</select>
|
||||
|
||||
<insert id="insertHitCompetitionStudentInfo" parameterType="HitCompetitionStudentInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hit_competition_student_info
|
||||
@ -70,6 +76,7 @@
|
||||
<if test="trialsScore != null">trials_score,</if>
|
||||
<if test="isPreliminary != null">is_preliminary,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="sex != null">sex,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
@ -91,6 +98,7 @@
|
||||
<if test="trialsScore != null">#{trialsScore},</if>
|
||||
<if test="isPreliminary != null">#{isPreliminary},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="sex != null">#{sex},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
@ -116,6 +124,7 @@
|
||||
<if test="trialsScore != null">trials_score = #{trialsScore},</if>
|
||||
<if test="isPreliminary != null">is_preliminary = #{isPreliminary},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="sex != null">sex = #{sex},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
|
@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cms.mapper.HitRegInfoMapper">
|
||||
|
||||
|
||||
<resultMap type="HitRegInfo" id="HitRegInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="schoolName" column="school_name" />
|
||||
@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="remark" column="remark" />
|
||||
<result property="auditStatus" column="audit_status" />
|
||||
<result property="uploadFile" column="upload_file" />
|
||||
<result property="dsFile" column="ds_file" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
@ -24,12 +25,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHitRegInfoVo">
|
||||
select id, school_name, college_name, division, team_name, sample_concat, sample_number,audit_status, sample_address, remark, upload_file, del_flag, create_time, create_by, update_time, update_by from hit_reg_info
|
||||
select id, school_name, college_name, division, team_name, sample_concat, sample_number,audit_status, sample_address, remark, upload_file,ds_file, del_flag, create_time, create_by, update_time, update_by from hit_reg_info
|
||||
</sql>
|
||||
|
||||
<select id="selectHitRegInfoList" parameterType="HitRegInfo" resultMap="HitRegInfoResult">
|
||||
<include refid="selectHitRegInfoVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
|
||||
<if test="collegeName != null and collegeName != ''"> and college_name like concat('%', #{collegeName}, '%')</if>
|
||||
<if test="division != null and division != ''"> and division = #{division}</if>
|
||||
@ -42,12 +43,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by audit_status asc,create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectHitRegInfoById" parameterType="Long" resultMap="HitRegInfoResult">
|
||||
<include refid="selectHitRegInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<select id="selectHitByUserId" resultType="com.ruoyi.cms.domain.HitRegInfo">
|
||||
SELECT DISTINCT hri.* from hit_reg_info hri
|
||||
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
||||
WHERE user_id = #{userId} and hri.audit_status= #{status} and hri.create_time like concat(#{year},'%')
|
||||
</select>
|
||||
<select id="selectHitByUserId2" resultType="com.ruoyi.cms.domain.HitRegInfo">
|
||||
SELECT DISTINCT hri.* from hit_reg_info hri
|
||||
LEFT JOIN hit_reg_info_user hriu on hri.id = hriu.reg_id
|
||||
WHERE user_id = #{userId} and hri.audit_status!= 2 and hri.create_time like concat(#{year},'%')
|
||||
</select>
|
||||
<insert id="insertHitRegInfo" parameterType="HitRegInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hit_reg_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@ -97,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="auditStatus != null">audit_status = #{auditStatus},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="uploadFile != null">upload_file = #{uploadFile},</if>
|
||||
<if test="dsFile != null">ds_file = #{dsFile},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
@ -111,9 +122,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHitRegInfoByIds" parameterType="String">
|
||||
delete from hit_reg_info where id in
|
||||
delete from hit_reg_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,98 @@
|
||||
<?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="com.ruoyi.cms.mapper.HitRegInfoUserMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.cms.domain.HitRegInfoUser" id="HitRegInfoUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="regId" column="reg_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="type" column="type" />
|
||||
<result property="status" column="status" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHitRegInfoUserVo">
|
||||
select id, reg_id, user_id, user_name, type, status, del_flag, create_time, create_by, update_time, update_by from hit_reg_info_user
|
||||
</sql>
|
||||
|
||||
<select id="selectHitRegInfoUserList" parameterType="com.ruoyi.cms.domain.HitRegInfoUser" resultMap="HitRegInfoUserResult">
|
||||
<include refid="selectHitRegInfoUserVo"/>
|
||||
<where>
|
||||
<if test="regId != null "> and reg_id = #{regId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHitRegInfoUserById" parameterType="Long" resultMap="HitRegInfoUserResult">
|
||||
<include refid="selectHitRegInfoUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHitRegInfoUser" parameterType="com.ruoyi.cms.domain.HitRegInfoUser">
|
||||
insert into hit_reg_info_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="regId != null">reg_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null">user_name,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="regId != null">#{regId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null">#{userName},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHitRegInfoUser" parameterType="com.ruoyi.cms.domain.HitRegInfoUser">
|
||||
update hit_reg_info_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="regId != null">reg_id = #{regId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null">user_name = #{userName},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHitRegInfoUserById" parameterType="Long">
|
||||
delete from hit_reg_info_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHitRegInfoUserByIds" parameterType="String">
|
||||
delete from hit_reg_info_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cms.mapper.HitRegistrationTeachInfoMapper">
|
||||
|
||||
|
||||
<resultMap type="com.ruoyi.common.core.domain.HitRegistrationTeachInfo" id="HitRegistrationTeachInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="hitRegId" column="hit_reg_id" />
|
||||
@ -32,20 +32,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectHitRegistrationTeachInfoList" parameterType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo" resultMap="HitRegistrationTeachInfoResult">
|
||||
select * from hit_registration_teach_info
|
||||
<where>
|
||||
<where>
|
||||
<if test="hitRegId != null "> and hit_reg_id = #{hitRegId}</if>
|
||||
<if test="teacherName != null and teacherName != ''"> and teacher_name like concat('%', #{teacherName}, '%')</if>
|
||||
<if test="teacherJob != null and teacherJob != ''"> and teacher_job = #{teacherJob}</if>
|
||||
<if test="teacherNumber != null and teacherNumber != ''"> and teacher_number = #{teacherNumber}</if>
|
||||
<if test="teacherEmail != null and teacherEmail != ''"> and teacher_email = #{teacherEmail}</if>
|
||||
<if test="teacherSchool != null and teacherSchool != ''"> and teacher_school = #{teacherSchool}</if>
|
||||
<if test="schoolName != null and schoolName != ''"> and school_name = #{schoolName}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="year != null and year != ''"> and create_time like concat(#{year},'%') </if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectHitRegistrationTeachInfoById" parameterType="Long" resultMap="HitRegistrationTeachInfoResult">
|
||||
<include refid="selectHitRegistrationTeachInfoVo"/>
|
||||
where id = #{id}
|
||||
@ -53,7 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectHitRegistrationTeachInfoByUserId"
|
||||
resultType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo">
|
||||
select * from hit_registration_teach_info
|
||||
where user_id = #{userId}
|
||||
where user_id = #{userId} and YEAR(create_time) = YEAR(CURRENT_DATE)
|
||||
</select>
|
||||
|
||||
<insert id="insertHitRegistrationTeachInfo" parameterType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo">
|
||||
@ -94,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="schoolName != null and schoolName !='' ">#{schoolName},</if>
|
||||
<if test="division != null and division !='' ">#{division},</if>
|
||||
@ -129,9 +130,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHitRegistrationTeachInfoByIds" parameterType="String">
|
||||
delete from hit_registration_teach_info where id in
|
||||
delete from hit_registration_teach_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
@ -87,3 +87,21 @@ export function refuseTeam(teamId){
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
export function editRegUser(data){
|
||||
return request({
|
||||
url: "system/hitRegUser",
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
export function editRegInfo(data){
|
||||
return request({
|
||||
url: "system/hit_reg_info/edit2",
|
||||
method: "put",
|
||||
data
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -90,25 +90,23 @@
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-descriptions :title="'领队老师'" style="margin-left: 10%" >
|
||||
<el-descriptions-item label="老师姓名">{{props.row.teacherInfoList[0].teacherName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师职务">{{props.row.teacherInfoList[0].teacherJob}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师手机号">{{props.row.teacherInfoList[0].teacherNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师邮箱">{{props.row.teacherInfoList[0].teacherEmail}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师所在系及专业">{{props.row.teacherInfoList[0].teacherSchool}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师姓名">{{props.row.ldTeacher.teacherName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师职务">{{props.row.ldTeacher.teacherJob}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师手机号">{{props.row.ldTeacher.teacherNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师邮箱">{{props.row.ldTeacher.teacherEmail}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师所在系及专业">{{props.row.ldTeacher.teacherSchool}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :title="'指导老师'+(index)" v-if="index>0" v-for="(item, index) in props.row.teacherInfoList" style="margin-left: 10%" >
|
||||
<el-descriptions :title="'指导老师'+(index)" v-for="(item, index) in props.row.zdTeacher" style="margin-left: 10%" >
|
||||
<el-descriptions-item label="老师姓名">{{item.teacherName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师职务">{{item.teacherJob}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师手机号">{{item.teacherNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师邮箱">{{item.teacherEmail}}</el-descriptions-item>
|
||||
<el-descriptions-item label="老师所在系及专业">{{item.teacherSchool}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions :title="'学生信息'+(index+1)" v-for="(item, index) in props.row.studentInfoList" style="margin-left: 10%">
|
||||
<el-descriptions :title="'学生信息'+(index+1)" v-for="(item, index) in props.row.studentUserss" style="margin-left: 10%">
|
||||
<!-- <el-descriptions-item label="比赛名称">{{props.row.competitionName}}</el-descriptions-item>-->
|
||||
<el-descriptions-item label="学生姓名">{{item.stuName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生性别">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="item.sex"/>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="学生性别">{{item.sex}}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生专业">{{item.major}}</el-descriptions-item>
|
||||
<el-descriptions-item label="学生手机号">{{item.phoneNumber}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
@ -68,7 +68,12 @@
|
||||
<image-preview :src="scope.row.studentIdCard" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="个人选拔赛分数" align="center" prop="trialsScore" />
|
||||
<el-table-column label="个人选拔赛分数" align="center" prop="trialsScore" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number v-model="scope.row.trialsScore" :precision="2" :step="0.1" ></el-input-number>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否进入初赛" align="center" prop="isPreliminary" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="!scope.row.isPreliminary">待审核</div>
|
||||
@ -321,7 +326,6 @@ export default {
|
||||
data.isPreliminary = type
|
||||
updateInfo(data).then(response => {
|
||||
this.$modal.msgSuccess("成功");
|
||||
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
|
@ -42,7 +42,8 @@
|
||||
|
||||
<el-table v-loading="loading" :data="HitRegistrationTeachInfoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column label="赛区" align="center" prop="division" />
|
||||
<el-table-column label="学校" align="center" prop="schoolName" />
|
||||
<el-table-column label="教师姓名" align="center" prop="teacherName" />
|
||||
<el-table-column label="教师职务" align="center" prop="teacherJob" />
|
||||
<el-table-column label="教师手机号" align="center" prop="teacherNumber" />
|
||||
@ -277,6 +278,7 @@ export default {
|
||||
data.status = status
|
||||
updateHitRegistrationTeachInfo(data).then(response => {
|
||||
this.$modal.msgSuccess("成功");
|
||||
}).finally(res=>{
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
|
||||
<div class="tab-boxs">
|
||||
<div class="tab-boxs" style="justify-content: space-between">
|
||||
<!-- left -->
|
||||
<div class="d-s" @click="toHome">
|
||||
<div class="d-s" style="width: 20%" @click="toHome">
|
||||
<div class="logo-box">
|
||||
<img :src="baseInfo.webImg" />
|
||||
</div>
|
||||
@ -11,7 +11,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- tab -->
|
||||
<div class="d-s">
|
||||
<div class="d-s" style="width: 68%;justify-content: space-between">
|
||||
<div class="x-x" :class="{'active' :tabindex == index }" v-for="(item, index) in tablist " :key="index" @click="tabClick(item.jumpUrl, item.id,index)" >
|
||||
<div>
|
||||
<img v-if="item.iconUrl" :src=" imgurl +item.iconUrl " alt="" style="width: 25px;height: 25px">
|
||||
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- right -->
|
||||
<div class="d-s" style="font-size: 20px; color: #fff;cursor: pointer;width: 170px;justify-content: flex-end">
|
||||
<!-- <div class="d-s" style="font-size: 20px; color: #fff;cursor: pointer;width: 170px;justify-content: flex-end">-->
|
||||
<!-- <i class="el-icon-search" v-if="show_search"></i>-->
|
||||
<!-- <div style="font-size: 18px; margin-left: 15px; " v-if="show_search" @click="show_search = !show_search">搜索-->
|
||||
<!-- </div>-->
|
||||
@ -29,7 +29,7 @@
|
||||
<!-- </el-input>-->
|
||||
<!-- <i class="el-icon-circle-close" v-if="!show_search" style="margin-left: 10px;"-->
|
||||
<!-- @click="show_search = true"></i>-->
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<div class="right-box" v-if="!isLoggedIn">
|
||||
<el-button class="login-button" @click="showLoginDialog = true">登录</el-button>
|
||||
<el-button class="register-button" @click="registerDialog = true">注册</el-button>
|
||||
@ -484,8 +484,6 @@ export default {
|
||||
|
||||
}
|
||||
.x-x {
|
||||
width: 110px;
|
||||
|
||||
cursor: pointer;
|
||||
height: 90px;
|
||||
text-align: center;
|
||||
|
@ -30,6 +30,7 @@
|
||||
<el-step title="初赛报名"></el-step>
|
||||
<el-step title="确认报名团队"></el-step>
|
||||
<el-step title="初赛报名结果"></el-step>
|
||||
<el-step title="比赛资料上传"></el-step>
|
||||
</el-steps>
|
||||
<div class="step-box" v-if="active == 0">
|
||||
<div class="step-box-title">
|
||||
@ -40,6 +41,17 @@
|
||||
<el-form-item label="姓名" prop="stuName">
|
||||
<el-input v-model="signUpForm.stuName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="stuName">
|
||||
<el-select v-model="signUpForm.sex" filterable allow-create default-first-option
|
||||
placeholder="请选择性别">
|
||||
<el-option key="男" label="男"
|
||||
value="男">
|
||||
</el-option>
|
||||
<el-option key="女" label="女"
|
||||
value="女">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属赛区" prop="division">
|
||||
<el-select v-model="signUpForm.division" filterable allow-create default-first-option
|
||||
placeholder="请选择学校名称">
|
||||
@ -83,10 +95,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-box" v-if="active == 1" style="position: relative" >
|
||||
<div class="step-box-title" v-if="signUpForm.trialsScore == null">个人选拔赛成绩未出,请耐心等待</div>
|
||||
<div class="step-box-title" v-if="signUpForm.trialsScore != null && signUpForm.isPreliminary == false">
|
||||
<div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore == null">个人选拔赛成绩未出,请耐心等待</div>
|
||||
<div class="step-box-title" style="font-size: 20px;margin-top: 8%" v-if="signUpForm.trialsScore != null && signUpForm.isPreliminary == false">
|
||||
很遗憾,个人选拔赛未通过,您的个人成绩为 : {{ signUpForm.trialsScore }}</div>
|
||||
<div style="position: absolute;left: 15%; top: 30% " >
|
||||
<div style="position: absolute;left: 15%; top: 30%" v-if="signUpForm.trialsScore" >
|
||||
<div style="font-size: 24px">
|
||||
初赛成绩:
|
||||
</div>
|
||||
@ -95,46 +107,71 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="step-box-title" v-if="signUpForm.trialsScore != null && signUpForm.isPreliminary == true">
|
||||
<div style="margin-top: 25px;width: 600px;margin-left: 30%" v-if=" signUpForm.isPreliminary == true">
|
||||
|
||||
<el-form ref="form" :model="preliminaryForm" label-width="80px">
|
||||
<el-form-item label="赛区">
|
||||
<el-input v-model="preliminaryForm.divisionLabel"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="学校">
|
||||
<el-input v-model="preliminaryForm.schoolName"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="领队老师">-->
|
||||
<!-- <el-input v-model="preliminaryForm.ldTeacherInfo.teacherName"></el-input>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="团队名称">
|
||||
<el-input v-model="preliminaryForm.teamName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="队员1">
|
||||
<el-select v-model="preliminaryForm.teammateOne" placeholder="请选择第一个队友">
|
||||
<el-option v-for="item in teammateList" :key="item.id" :label="item.stuName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="队员2">
|
||||
<el-select v-model="preliminaryForm.teammateTwo" placeholder="请选择第二个队友">
|
||||
<el-option v-for="item in teammateList" :key="item.id" :label="item.stuName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form ref="form" :rules="preliminaryFormRules" :model="preliminaryForm" label-width="150px">
|
||||
<div class="d-s" style="justify-content: space-between">
|
||||
<el-form-item label="赛区" prop="divisionLabel">
|
||||
<el-input v-model="preliminaryForm.divisionLabel"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="指导老师1">
|
||||
<el-select v-model="preliminaryForm.teacherOne" placeholder="请选择指导老师">
|
||||
<el-option v-for="item in teacherList" :key="item.id" :label="item.teacherName" :value="item.id">
|
||||
<el-form-item label="学校" prop="schoolName">
|
||||
<el-input v-model="preliminaryForm.schoolName"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-form-item label="领队老师" prop="ldTeacherInfo.teacherName">
|
||||
<el-input v-model="preliminaryForm.ldTeacherInfo.teacherName"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="团队名称" prop="teamName">
|
||||
<el-input v-model="preliminaryForm.teamName"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-form-item label="队员1" prop="teammateOne">
|
||||
<el-select v-model="preliminaryForm.teammateOne" placeholder="第一个队友">
|
||||
<el-option v-for="item in preliminaryForm.tdStudentList" :key="item.userId" :label="item.stuName" :value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="队员2" prop="teammateTwo">
|
||||
<el-select v-model="preliminaryForm.teammateTwo" placeholder="第二个队友">
|
||||
<el-option v-for="item in preliminaryForm.tdStudentList" :key="item.userId" :label="item.stuName" :value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<div class="d-s">
|
||||
<el-form-item label="指导老师1" prop="teacherOne">
|
||||
<el-select v-model="preliminaryForm.teacherOne" placeholder="指导老师1">
|
||||
<el-option v-for="item in preliminaryForm.zdTeacherList" :key="item.userId" :label="item.teacherName" :value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="指导老师2">
|
||||
<el-select v-model="preliminaryForm.teacherTwo" placeholder="请选择指导老师">
|
||||
<el-option v-for="item in teacherList" :key="item.id" :label="item.teacherName" :value="item.id">
|
||||
<el-form-item label="指导老师2" prop="teacherTwo">
|
||||
<el-select v-model="preliminaryForm.teacherTwo" placeholder="指导老师2">
|
||||
<el-option v-for="item in preliminaryForm.zdTeacherList" :key="item.userId" :label="item.teacherName" :value="item.userId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="d-s">
|
||||
<el-form-item label="盲样联系人" prop="sampleConcat">
|
||||
<el-input v-model="preliminaryForm.sampleConcat"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="盲样联系人手机号" prop="sampleNumber">
|
||||
<el-input v-model="preliminaryForm.sampleNumber"></el-input>
|
||||
</el-form-item>
|
||||
</div>
|
||||
|
||||
<el-form-item label="盲样邮寄地址" prop="sampleAddress">
|
||||
<el-input v-model="preliminaryForm.sampleAddress"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件" prop="uploadFile">
|
||||
<file-upload :fileSize="20" :fileType="['doc','docx','pdf','zip']" v-model="preliminaryForm.uploadFile"></file-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div v-if="signUpForm.trialsScore != null && signUpForm.isPreliminary == true">
|
||||
@ -142,27 +179,76 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-box" v-if="active == 2">
|
||||
<div class="step-box-title" v-if="active == 2 && teammateInfo.isAgreeWith == 0">
|
||||
<span>是否加入队伍{{teammateInfo.teamName }}</span>
|
||||
</div>
|
||||
<div v-if="active == 2 && teammateInfo.isAgreeWith == 0">
|
||||
<el-button type="primary" @click="RefuseToFormTeam">拒绝组队</el-button>
|
||||
<el-button type="primary" @click="AgreeToFormTeam">确认组队</el-button>
|
||||
</div>
|
||||
|
||||
<el-descriptions class="margin-top" title="团队信息" border>
|
||||
<el-descriptions-item label="赛区">{{preliminaryForm.divisionLabel}}</el-descriptions-item>
|
||||
<el-descriptions-item label="学校">{{preliminaryForm.hitRegInfo.schoolName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="领队老师">{{preliminaryForm.ldTeacherInfo.teacherName}}</el-descriptions-item>
|
||||
<el-descriptions-item label="指导老师">{{preliminaryForm.zdTeacherStr}}</el-descriptions-item>
|
||||
<el-descriptions-item label="样品联系人">{{preliminaryForm.hitRegInfo.sampleConcat}}</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人手机号">{{preliminaryForm.hitRegInfo.sampleNumber}}</el-descriptions-item>
|
||||
<el-descriptions-item label="样品邮寄地址">{{preliminaryForm.hitRegInfo.sampleAddress}}</el-descriptions-item>
|
||||
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
:data="preliminaryForm.hitRegInfo.studentUser"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="userName"
|
||||
align="center"
|
||||
label="姓名"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
align="center"
|
||||
label="状态"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status==0">待确认</span>
|
||||
<span v-if="scope.row.status==1">同意</span>
|
||||
<span v-if="scope.row.status==2">拒绝</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center"class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.isOwn =='1'">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-check"
|
||||
@click="regChoose(scope.row,1)"
|
||||
|
||||
>同意</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-close"
|
||||
@click="regChoose(scope.row,2)"
|
||||
|
||||
>拒绝</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div>
|
||||
<div class="step-box" v-if="active == 2 && teammateInfo.isAgreeWith ==1" >
|
||||
<div class="step-box-title" >
|
||||
<span>已加入队伍{{teammateInfo.teamName }},等待其他队友加入</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="step-box" v-if="active == 3">
|
||||
<div class="step-box-title">初赛报名提交成功,请通过大赛通知获取通过信息</div>
|
||||
<div class="step-box-title" style="font-size: 20px;margin-top: 8%">初赛报名提交成功,请通过大赛通知获取通过信息</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step-box" v-if="active == 4">
|
||||
|
||||
<file-upload style="margin-top: 5%" :fileSize="200" :fileType="['zip','rar','7z']" v-model="preliminaryForm.hitRegInfo.dsFile"></file-upload>
|
||||
<div >
|
||||
<el-button style="margin-top: 8%" type="primary" @click="fileSubmit">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- main -->
|
||||
<div v-show="currentActive == 0 || currentActive == 1 || currentActive == 5" v-html="pageContext"></div>
|
||||
@ -175,10 +261,6 @@
|
||||
</div>
|
||||
|
||||
<div v-show="currentActive == 2" class="wrapbox">
|
||||
<!-- <div class="noticeRsr" v-for="(item,index) in noticeList" @click="goDeatail(item)" >-->
|
||||
<!-- <div >{{item.contentTitle}}</div>-->
|
||||
<!-- <div >{{item.publishDate}}</div>-->
|
||||
<!-- </div>-->
|
||||
<div class="n-box" v-for="(item, index) in noticeList" @click="goDeatail(item)">
|
||||
<div>
|
||||
<div class="v-time">{{ item.publishDate }}</div>
|
||||
@ -189,6 +271,7 @@
|
||||
<img :src="imgurl + item.contentImg" style="width: 300px; height: 150px; ">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-show="currentActive == 2 || currentActive == 4 || currentActive === 3">
|
||||
<page-util :category-id="categoryId" @event-message="handleDataFromPage" />
|
||||
@ -211,7 +294,18 @@ import { getPageData, getCategoryByParentId, getbaseInfo } from "@/api/officialW
|
||||
import footers from '@/views/officialWebsite/Components/footer.vue'
|
||||
import headers from '@/views/officialWebsite/Components/header.vue'
|
||||
import PageUtil from '@/views/officialWebsite/Components/page'
|
||||
import { addTeacher, register, getStudentInfoByStuId, getTeamMateInfo, getTeacherInfo, PreliminaryRegistration ,getTeamMate,agreeTeam,refuseTeam} from '@/api/officialWebsite/registerStudent'
|
||||
import {
|
||||
editRegUser,
|
||||
register,
|
||||
getStudentInfoByStuId,
|
||||
getTeamMateInfo,
|
||||
getTeacherInfo,
|
||||
PreliminaryRegistration,
|
||||
getTeamMate,
|
||||
agreeTeam,
|
||||
refuseTeam,
|
||||
editRegInfo
|
||||
} from '@/api/officialWebsite/registerStudent'
|
||||
import { getTab, getbanner } from '@/api/gw/home'
|
||||
import { getToken } from "@/utils/auth";
|
||||
export default {
|
||||
@ -297,6 +391,44 @@ export default {
|
||||
]
|
||||
|
||||
},
|
||||
preliminaryFormRules:{
|
||||
divisionLabel : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
schoolName : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
'ldTeacherInfo.teacherName' : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teamName : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teammateOne : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teammateTwo : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teacherOne : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
teacherTwo : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sampleConcat : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sampleNumber : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
sampleAddress : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
uploadFile : [
|
||||
{ required: true, message: "不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
pageContext: '',
|
||||
nav: [
|
||||
],
|
||||
@ -319,7 +451,6 @@ export default {
|
||||
this.initPageData();
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
created() {
|
||||
console.log('组件创建');
|
||||
@ -327,13 +458,26 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
regChoose(data,status){
|
||||
data.status = status
|
||||
console.log(data)
|
||||
editRegUser(data).then(res=>{
|
||||
this.$modal.msgSuccess("成功")
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
},
|
||||
fileSubmit(){
|
||||
editRegInfo(this.preliminaryForm.hitRegInfo).then(res=>{
|
||||
this.$modal.msgSuccess("成功")
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
},
|
||||
//用户信息
|
||||
loadUserInfo() {
|
||||
if(getToken()){
|
||||
getHomeUserInfo().then(response => {
|
||||
this.signUpForm.studentId = response.data.userName;
|
||||
this.preliminaryForm.division = response.data.division;
|
||||
this.preliminaryForm.schoolName = response.data.schoolName;
|
||||
this.preliminaryForm = response.data;
|
||||
|
||||
this.fetchRegistrationInformation()
|
||||
})
|
||||
@ -344,13 +488,9 @@ export default {
|
||||
fetchRegistrationInformation() {
|
||||
getStudentInfoByStuId(this.signUpForm.studentId)
|
||||
.then(response => {
|
||||
|
||||
this.preliminaryForm = response.data;
|
||||
this.updateSignUpForm(response.data);
|
||||
|
||||
if (response.data.id != null) {
|
||||
this.fetchTeamMateInfo();
|
||||
this.fetchTeacherInfo();
|
||||
}
|
||||
console.log('报名信息:', this.signUpForm);
|
||||
})
|
||||
|
||||
@ -358,71 +498,42 @@ export default {
|
||||
updateSignUpForm(data) {
|
||||
this.preliminaryForm.division = data.division;
|
||||
this.preliminaryForm.divisionLabel = data.divisionLabel;
|
||||
this.preliminaryForm.ldTeacherInfo = data.ldTeacherInfo;
|
||||
if(data.ldTeacherInfo){
|
||||
this.preliminaryForm.leaderTeacher = data.ldTeacherInfo.userId;
|
||||
}else{
|
||||
this.preliminaryForm.ldTeacherInfo ={}
|
||||
}
|
||||
|
||||
this.preliminaryForm.schoolName = data.schoolName;
|
||||
this.active = 1;
|
||||
if(data.id== null){
|
||||
this.preliminaryForm.zdTeacherList = data.zdTeacherList;
|
||||
this.preliminaryForm.tdStudentList = data.tdStudentList;
|
||||
this.preliminaryForm.zdTeacherStr = data.zdTeacherStr;
|
||||
this.active = 1;
|
||||
if (data.zdStatus=='0'){
|
||||
this.active = 3;
|
||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||
}
|
||||
else if (data.zdStatus=='1'){
|
||||
this.active = 4;
|
||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||
if (data.hitRegInfo.dsFile){
|
||||
this.active = 5;
|
||||
}
|
||||
} else if (data.zdStatus=='9'){
|
||||
this.active = 2;
|
||||
this.preliminaryForm.hitRegInfo = data.hitRegInfo
|
||||
}else if(data.id== null){
|
||||
this.active = 0;
|
||||
}else{
|
||||
this.signUpForm = data;
|
||||
}
|
||||
if (this.preliminaryForm.division!= null) {
|
||||
this.fetchTeamMateInfoByUserId();
|
||||
}
|
||||
console.log(data,433, this.preliminaryForm)
|
||||
|
||||
|
||||
},
|
||||
// 根据赛区及学校查询队友信息
|
||||
fetchTeamMateInfo() {
|
||||
getTeamMateInfo(this.preliminaryForm.schoolName, this.preliminaryForm.division)
|
||||
.then(response => {
|
||||
this.teammateList = response.data;
|
||||
console.log('队友信息:', this.preliminaryForm);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取队友信息失败:', error);
|
||||
});
|
||||
},
|
||||
//根据赛区及学校查询老师信息
|
||||
fetchTeacherInfo() {
|
||||
getTeacherInfo(this.preliminaryForm.schoolName, this.preliminaryForm.division)
|
||||
.then(response => {
|
||||
this.teacherList = response.data;
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取老师信息失败:', error);
|
||||
})
|
||||
},
|
||||
// 根据个人信息查询是否有人与我组队
|
||||
fetchTeamMateInfoByUserId() {
|
||||
getTeamMate()
|
||||
.then(response => {
|
||||
this.teammateInfo = response.data;
|
||||
if (this.teammateInfo.teamId != null) {
|
||||
this.active= 2;
|
||||
}
|
||||
for (let i = 0; i < this.teacherList.length; i++) {
|
||||
|
||||
if (this.teacherList[i].hitRegId !=null) {
|
||||
this.active = 3;
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('获取队友信息失败:', error);
|
||||
})
|
||||
},
|
||||
//确认组队按钮
|
||||
AgreeToFormTeam(){
|
||||
agreeTeam(this.teammateInfo.teamId, this.teammateInfo.teamMateId).then(response => {
|
||||
console.log('确认组队成功');
|
||||
})
|
||||
},
|
||||
//拒绝组队按钮
|
||||
RefuseToFormTeam(){
|
||||
refuseTeam(this.teammateInfo.teamId).then(response => {
|
||||
console.log('拒绝组队成功');
|
||||
})
|
||||
},
|
||||
|
||||
// 触发导航
|
||||
getCurrentActive(value) {
|
||||
if (this.currentActive == value) {
|
||||
@ -514,9 +625,8 @@ export default {
|
||||
if (valid) {
|
||||
PreliminaryRegistration(this.preliminaryForm).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
||||
this.$modal.msgSuccess("初赛报名提交成功")
|
||||
this.next();
|
||||
this.fetchRegistrationInformation()
|
||||
} else {
|
||||
this.$modal.msgError("报名失败")
|
||||
}
|
||||
@ -1108,6 +1218,8 @@ export default {
|
||||
max-width: 400px;
|
||||
/* 最大宽度限制 */
|
||||
margin: 0 auto;
|
||||
font-size: 25px;
|
||||
margin-top: 5%;
|
||||
/* 水平居中 */
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user