This commit is contained in:
愉快的大福 2024-08-20 18:02:46 +08:00
parent 6f3c812338
commit d9355f2556
33 changed files with 1342 additions and 765 deletions

View File

@ -40,7 +40,14 @@ public class CMSCategoryAPI extends BaseController {
if (contentQuery.getCategoryId() == null) return success();
return success(categoryService.getContentById(contentQuery));
}
/**
* 获取某个子栏目的内容
*/
@PostMapping("/contentList")
public AjaxResult contentList(@RequestBody CmsContentQuery contentQuery){
if (contentQuery.getCategoryId() == null) return success();
return success(categoryService.contentList(contentQuery));
}
/**
* 获取某个子栏目的内容
*/

View File

@ -49,20 +49,5 @@ public class HitRegistrationStudentInfoAPI extends BaseController
return toAjax(hitRegistrationStudentInfoService.insertHitRegistrationStudentInfo(studentInfo));
}
/**
* 老师信息验证或插入
* @param teachInfo
* @return
*/
@PostMapping("/addTeach")
public AjaxResult addTeach(@RequestBody HitRegistrationTeachInfo teachInfo){
Long id = hitRegistrationTeachInfoService.checkExist(teachInfo);
if (id != null){
return success(id);
}else {
int flag = hitRegistrationTeachInfoService.insertHitRegistrationTeachInfo(teachInfo);
if (flag > 0) return success(teachInfo.getId());
else return error();
}
}
}

View File

@ -0,0 +1,104 @@
package com.ruoyi.cms.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.cms.domain.HitRegInfo;
import com.ruoyi.cms.service.IHitRegInfoService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 报名信息Controller
*
* @author zcy
* @date 2024-08-20
*/
@RestController
@RequestMapping("/system/hit_reg_info")
public class HitRegInfoController extends BaseController
{
@Autowired
private IHitRegInfoService hitRegInfoService;
/**
* 查询报名信息列表
*/
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:list')")
@GetMapping("/list")
public TableDataInfo list(HitRegInfo hitRegInfo)
{
startPage();
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo);
return getDataTable(list);
}
/**
* 导出报名信息列表
*/
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:export')")
@Log(title = "报名信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, HitRegInfo hitRegInfo)
{
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo);
ExcelUtil<HitRegInfo> util = new ExcelUtil<HitRegInfo>(HitRegInfo.class);
util.exportExcel(response, list, "报名信息数据");
}
/**
* 获取报名信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(hitRegInfoService.selectHitRegInfoById(id));
}
/**
* 新增报名信息
*/
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:add')")
@Log(title = "报名信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HitRegInfo hitRegInfo)
{
return toAjax(hitRegInfoService.insertHitRegInfo(hitRegInfo));
}
/**
* 修改报名信息
*/
@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));
}
/**
* 删除报名信息
*/
@PreAuthorize("@ss.hasPermi('system:hit_reg_info:remove')")
@Log(title = "报名信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(hitRegInfoService.deleteHitRegInfoByIds(ids));
}
}

View File

@ -1,15 +1,7 @@
package com.ruoyi.cms.controller;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.bean.BeanUtil;
import com.ruoyi.cms.domain.vo.HitRegistrationStudentInfoVo;
import com.ruoyi.cms.export.HitRegistrationStudentInfoExport;
import com.ruoyi.cms.service.IHitRegistrationTeachInfoService;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -33,56 +25,44 @@ import com.ruoyi.common.core.page.TableDataInfo;
* 报名信息Controller
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
@RestController
@RequestMapping("/hit/hitRegistrationStudentInfo")
@RequestMapping("/HitRegistrationStudentInfo/HitRegistrationStudentInfo")
public class HitRegistrationStudentInfoController extends BaseController
{
@Autowired
private IHitRegistrationStudentInfoService hitRegistrationStudentInfoService;
@Autowired
private IHitRegistrationTeachInfoService hitRegistrationTeachInfoService;
/**
* 查询报名信息列表
*/
// @PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:list')")
// @GetMapping("/list")
// public TableDataInfo list(HitRegistrationStudentInfo hitRegistrationStudentInfo)
// {
// startPage();
// List<HitRegistrationStudentInfo> list = hitRegistrationStudentInfoService.selectHitRegistrationStudentInfoList(hitRegistrationStudentInfo);
// return getDataTable(list);
// }
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:list')")
@GetMapping("/list")
public TableDataInfo list(HitRegistrationStudentInfo hitRegistrationStudentInfo)
{
startPage();
List<HitRegistrationStudentInfo> list = hitRegistrationStudentInfoService.selectHitRegistrationStudentInfoList(hitRegistrationStudentInfo);
return getDataTable(list);
}
/**
* 导出报名信息列表
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:export')")
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:export')")
@Log(title = "报名信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, HitRegistrationStudentInfoVo studentInfoVo)
public void export(HttpServletResponse response, HitRegistrationStudentInfo hitRegistrationStudentInfo)
{
List<HitRegistrationStudentInfoVo> list = hitRegistrationStudentInfoService.selectStudentInfoNew(studentInfoVo);
/** 转换为excel要的字段 */
List<HitRegistrationStudentInfoExport> result = list.stream().map(item -> {
HitRegistrationStudentInfoExport export = new HitRegistrationStudentInfoExport();
BeanUtil.copyProperties(item, export);
export.setLeaderNames(String.join(",", item.getLeaderNames()));
export.setGuideNames(String.join(",", item.getGuideNames()));
return export;
}).collect(Collectors.toList());
ExcelUtil<HitRegistrationStudentInfoExport> util = new ExcelUtil<HitRegistrationStudentInfoExport>(HitRegistrationStudentInfoExport.class);
util.exportExcel(response, result, "报名信息数据");
List<HitRegistrationStudentInfo> list = hitRegistrationStudentInfoService.selectHitRegistrationStudentInfoList(hitRegistrationStudentInfo);
ExcelUtil<HitRegistrationStudentInfo> util = new ExcelUtil<HitRegistrationStudentInfo>(HitRegistrationStudentInfo.class);
util.exportExcel(response, list, "报名信息数据");
}
/**
* 获取报名信息详细信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:query')")
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@ -92,7 +72,7 @@ public class HitRegistrationStudentInfoController extends BaseController
/**
* 新增报名信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:add')")
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:add')")
@Log(title = "报名信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HitRegistrationStudentInfo hitRegistrationStudentInfo)
@ -103,7 +83,7 @@ public class HitRegistrationStudentInfoController extends BaseController
/**
* 修改报名信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:edit')")
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:edit')")
@Log(title = "报名信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody HitRegistrationStudentInfo hitRegistrationStudentInfo)
@ -114,33 +94,11 @@ public class HitRegistrationStudentInfoController extends BaseController
/**
* 删除报名信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:remove')")
@PreAuthorize("@ss.hasPermi('HitRegistrationStudentInfo:HitRegistrationStudentInfo:remove')")
@Log(title = "报名信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(hitRegistrationStudentInfoService.deleteHitRegistrationStudentInfoByIds(ids));
}
/**
* 自定义查询
* @param studentInfoVo
* @return
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationStudentInfo:list')")
@GetMapping("/list")
public TableDataInfo list(HitRegistrationStudentInfoVo studentInfoVo)
{
startPage();
List<HitRegistrationStudentInfoVo> list = hitRegistrationStudentInfoService.selectStudentInfoNew(studentInfoVo);
return getDataTable(list);
}
/**
* 查询老师信息
*/
@GetMapping("/getTeach/{ids}")
public AjaxResult getTeachInfo(@PathVariable Long[] ids){
return success(hitRegistrationTeachInfoService.listByIds(Arrays.asList(ids)));
}
}

View File

@ -25,10 +25,10 @@ import com.ruoyi.common.core.page.TableDataInfo;
* 教师信息Controller
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
@RestController
@RequestMapping("/hit/hitRegistrationTeachInfo")
@RequestMapping("/HitRegistrationTeachInfo/HitRegistrationTeachInfo")
public class HitRegistrationTeachInfoController extends BaseController
{
@Autowired
@ -37,7 +37,7 @@ public class HitRegistrationTeachInfoController extends BaseController
/**
* 查询教师信息列表
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationTeachInfo:list')")
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:list')")
@GetMapping("/list")
public TableDataInfo list(HitRegistrationTeachInfo hitRegistrationTeachInfo)
{
@ -49,7 +49,7 @@ public class HitRegistrationTeachInfoController extends BaseController
/**
* 导出教师信息列表
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationTeachInfo:export')")
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:export')")
@Log(title = "教师信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, HitRegistrationTeachInfo hitRegistrationTeachInfo)
@ -62,7 +62,7 @@ public class HitRegistrationTeachInfoController extends BaseController
/**
* 获取教师信息详细信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationTeachInfo:query')")
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
@ -72,7 +72,7 @@ public class HitRegistrationTeachInfoController extends BaseController
/**
* 新增教师信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationTeachInfo:add')")
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:add')")
@Log(title = "教师信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody HitRegistrationTeachInfo hitRegistrationTeachInfo)
@ -83,7 +83,7 @@ public class HitRegistrationTeachInfoController extends BaseController
/**
* 修改教师信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationTeachInfo:edit')")
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:edit')")
@Log(title = "教师信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody HitRegistrationTeachInfo hitRegistrationTeachInfo)
@ -94,7 +94,7 @@ public class HitRegistrationTeachInfoController extends BaseController
/**
* 删除教师信息
*/
@PreAuthorize("@ss.hasPermi('hit:hitRegistrationTeachInfo:remove')")
@PreAuthorize("@ss.hasPermi('HitRegistrationTeachInfo:HitRegistrationTeachInfo:remove')")
@Log(title = "教师信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)

View File

@ -0,0 +1,70 @@
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;
import java.util.List;
/**
* 报名信息对象 hit_reg_info
*
* @author zcy
* @date 2024-08-20
*/
@Data
public class HitRegInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/** 学校 */
@Excel(name = "学校")
private String schoolName;
/** 学院 */
@Excel(name = "学院")
private String collegeName;
/** 所属赛区 */
@Excel(name = "所属赛区")
private String division;
/** 团队名称(个人赛不需求,可以为空) */
@Excel(name = "团队名称", readConverterExp = "个=人赛不需求,可以为空")
private String teamName;
/** 盲样联系人 */
@Excel(name = "盲样联系人")
private String sampleConcat;
/** 盲样联第人电话 */
@Excel(name = "盲样联第人电话")
private String sampleNumber;
/** 盲样邮寄地址 */
@Excel(name = "盲样邮寄地址")
private String sampleAddress;
/** 附件 */
@Excel(name = "附件")
private String uploadFile;
//0未审核1审核通过2审核拒绝
private String auditStatus;
/** 逻辑删除0未删除1真删除 */
private Long delFlag;
@TableField(exist = false)
private List<HitRegistrationStudentInfo> studentInfoList;
@TableField(exist = false)
private List<HitRegistrationTeachInfo> teacherInfoList;
}

View File

@ -1,78 +1,127 @@
package com.ruoyi.cms.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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;
import lombok.Data;
import java.util.List;
/**
* 报名信息对象 hit_registration_student_info
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
@Data
public class HitRegistrationStudentInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 报名信息ID */
/** 主键 */
@TableId(type = IdType.AUTO)
private Long id;
/** 大赛ID */
@Excel(name = "大赛ID")
private Long competitionId;
/** 报名主键 */
@Excel(name = "报名主键")
private Long hitRegId;
/** 学生姓名 */
@Excel(name = "学生姓名")
/** 姓名 */
@Excel(name = "姓名")
private String stuName;
/** 学生性别01 */
@Excel(name = "学生性别", readConverterExp = "0=1")
private String stuGender;
/** 性别 */
@Excel(name = "性别")
private String sex;
/** 学生专业 */
@Excel(name = "学生专业")
private String stuMajor;
/** 专业 */
@Excel(name = "专业")
private String major;
/** 学生手机号 */
@Excel(name = "学生手机号")
private String stuNumber;
/** 学校及院系名称 */
@Excel(name = "学校及院系名称")
private String schoolName;
/** 所属赛区 */
@Excel(name = "所属赛区")
private String division;
/** 团队名称(个人赛不需求,可以为空) */
@Excel(name = "团队名称", readConverterExp = "个=人赛不需求,可以为空")
private String teamName;
/** 领队教师ID集合 */
@Excel(name = "领队教师ID集合")
private List<Long> leaderIds;
/** 指导老师ID集合 */
@Excel(name = "指导老师ID集合")
private List<Long> guideIds;
/** 电话号码 */
@Excel(name = "电话号码")
private String phoneNumber;
/** 逻辑删除0未删除1真删除 */
private Integer delFlag;
private Long delFlag;
/** 盲样收件人 */
@Excel(name = "盲样收件人")
private String sampleConcat;
public void setId(Long id)
{
this.id = id;
}
/** 盲样收件人电话 */
@Excel(name = "盲样收件人电话")
private String sampleNumber;
public Long getId()
{
return id;
}
public void setHitRegId(Long hitRegId)
{
this.hitRegId = hitRegId;
}
/** 盲样邮寄地址 */
@Excel(name = "盲样邮寄地址")
private String sampleAddress;
public Long getHitRegId()
{
return hitRegId;
}
public void setStuName(String stuName)
{
this.stuName = stuName;
}
public String getStuName()
{
return stuName;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setMajor(String major)
{
this.major = major;
}
public String getMajor()
{
return major;
}
public void setPhoneNumber(String phoneNumber)
{
this.phoneNumber = phoneNumber;
}
public String getPhoneNumber()
{
return phoneNumber;
}
public void setDelFlag(Long delFlag)
{
this.delFlag = delFlag;
}
public Long getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("hitRegId", getHitRegId())
.append("stuName", getStuName())
.append("sex", getSex())
.append("major", getMajor())
.append("phoneNumber", getPhoneNumber())
.append("delFlag", getDelFlag())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.toString();
}
}

View File

@ -1,23 +1,30 @@
package com.ruoyi.cms.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
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;
import lombok.Data;
/**
* 教师信息对象 hit_registration_teach_info
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
@Data
public class HitRegistrationTeachInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 教师ID */
@TableId(type = IdType.AUTO)
private Long id;
/** 报名主键 */
@Excel(name = "报名主键")
private Long hitRegId;
/** 教师姓名 */
@Excel(name = "教师姓名")
private String teacherName;
@ -39,5 +46,111 @@ public class HitRegistrationTeachInfo extends BaseEntity
private String teacherSchool;
/** 逻辑删除0未删除1真删除 */
private Integer delFlag;
private Long delFlag;
/** 0指导老师1领队老师 */
@Excel(name = "0指导老师1领队老师")
private String type;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setHitRegId(Long hitRegId)
{
this.hitRegId = hitRegId;
}
public Long getHitRegId()
{
return hitRegId;
}
public void setTeacherName(String teacherName)
{
this.teacherName = teacherName;
}
public String getTeacherName()
{
return teacherName;
}
public void setTeacherJob(String teacherJob)
{
this.teacherJob = teacherJob;
}
public String getTeacherJob()
{
return teacherJob;
}
public void setTeacherNumber(String teacherNumber)
{
this.teacherNumber = teacherNumber;
}
public String getTeacherNumber()
{
return teacherNumber;
}
public void setTeacherEmail(String teacherEmail)
{
this.teacherEmail = teacherEmail;
}
public String getTeacherEmail()
{
return teacherEmail;
}
public void setTeacherSchool(String teacherSchool)
{
this.teacherSchool = teacherSchool;
}
public String getTeacherSchool()
{
return teacherSchool;
}
public void setDelFlag(Long delFlag)
{
this.delFlag = delFlag;
}
public Long getDelFlag()
{
return delFlag;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("hitRegId", getHitRegId())
.append("teacherName", getTeacherName())
.append("teacherJob", getTeacherJob())
.append("teacherNumber", getTeacherNumber())
.append("teacherEmail", getTeacherEmail())
.append("teacherSchool", getTeacherSchool())
.append("remark", getRemark())
.append("delFlag", getDelFlag())
.append("createTime", getCreateTime())
.append("createBy", getCreateBy())
.append("updateTime", getUpdateTime())
.append("updateBy", getUpdateBy())
.append("type", getType())
.toString();
}
}

View File

@ -34,6 +34,7 @@ public class HitRegistrationStudentInfoVo extends BaseEntity {
/** 学校及院系名称 */
@Excel(name = "学校及院系名称")
private String schoolName;
private String collegeName;
/** 所属赛区 */
@Excel(name = "所属赛区")
@ -85,4 +86,5 @@ public class HitRegistrationStudentInfoVo extends BaseEntity {
/** 时间 */
private Date createTime;
private String uploadFile;
}

View File

@ -29,6 +29,8 @@ public interface CmsContentMapper extends BaseMapper<CmsContent>
* @return 内容集合
*/
public List<CmsContent> selectCmsContentList(CmsContent cmsContent);
public List<CmsContent> contentList(CmsContent cmsContent);
/**
* 查询内容列表

View File

@ -0,0 +1,64 @@
package com.ruoyi.cms.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.cms.domain.HitRegInfo;
import com.ruoyi.cms.domain.HitRegistrationTeachInfo;
/**
* 报名信息Mapper接口
*
* @author zcy
* @date 2024-08-20
*/
public interface HitRegInfoMapper extends BaseMapper<HitRegInfo>
{
/**
* 查询报名信息
*
* @param id 报名信息主键
* @return 报名信息
*/
public HitRegInfo selectHitRegInfoById(Long id);
/**
* 查询报名信息列表
*
* @param hitRegInfo 报名信息
* @return 报名信息集合
*/
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
/**
* 新增报名信息
*
* @param hitRegInfo 报名信息
* @return 结果
*/
public int insertHitRegInfo(HitRegInfo hitRegInfo);
/**
* 修改报名信息
*
* @param hitRegInfo 报名信息
* @return 结果
*/
public int updateHitRegInfo(HitRegInfo hitRegInfo);
/**
* 删除报名信息
*
* @param id 报名信息主键
* @return 结果
*/
public int deleteHitRegInfoById(Long id);
/**
* 批量删除报名信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteHitRegInfoByIds(Long[] ids);
}

View File

@ -4,16 +4,15 @@ import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.domain.HitRegistrationTeachInfo;
import com.ruoyi.cms.domain.vo.HitRegistrationStudentInfoVo;
import com.ruoyi.cms.domain.Imitation;
/**
* 报名信息Mapper接口
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
public interface HitRegistrationStudentInfoMapper extends BaseMapper<HitRegistrationStudentInfo>
public interface HitRegistrationStudentInfoMapper extends BaseMapper<HitRegistrationStudentInfo>
{
/**
* 查询报名信息
@ -62,11 +61,4 @@ public interface HitRegistrationStudentInfoMapper extends BaseMapper<HitRegistra
* @return 结果
*/
public int deleteHitRegistrationStudentInfoByIds(Long[] ids);
/**
* 自定义查询
* @param studentInfoVo
* @return
*/
public List<HitRegistrationStudentInfoVo> selectStudentInfoNew(HitRegistrationStudentInfoVo studentInfoVo);
}

View File

@ -10,9 +10,9 @@ import com.ruoyi.cms.domain.HitRegistrationTeachInfo;
* 教师信息Mapper接口
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
public interface HitRegistrationTeachInfoMapper extends BaseMapper<HitRegistrationTeachInfo>
public interface HitRegistrationTeachInfoMapper extends BaseMapper<HitRegistrationTeachInfo>
{
/**
* 查询教师信息
@ -61,11 +61,4 @@ public interface HitRegistrationTeachInfoMapper extends BaseMapper<HitRegistrati
* @return 结果
*/
public int deleteHitRegistrationTeachInfoByIds(Long[] ids);
/**
* 检查老师信息是否已存在
* @param teachInfo
* @return 数据的ID
*/
Long checkExist(HitRegistrationTeachInfo teachInfo);
}

View File

@ -113,6 +113,9 @@ public interface ICmsCategoryService extends IService<CmsCategory>
*/
public PageInfo<CmsContent> getContentById(CmsContentQuery contentQuery);
public PageInfo<CmsContent> contentList(CmsContentQuery contentQuery);
/**
* 按ID查文章
* @return

View File

@ -0,0 +1,61 @@
package com.ruoyi.cms.service;
import java.util.List;
import com.ruoyi.cms.domain.HitRegInfo;
/**
* 报名信息Service接口
*
* @author zcy
* @date 2024-08-20
*/
public interface IHitRegInfoService
{
/**
* 查询报名信息
*
* @param id 报名信息主键
* @return 报名信息
*/
public HitRegInfo selectHitRegInfoById(Long id);
/**
* 查询报名信息列表
*
* @param hitRegInfo 报名信息
* @return 报名信息集合
*/
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo);
/**
* 新增报名信息
*
* @param hitRegInfo 报名信息
* @return 结果
*/
public int insertHitRegInfo(HitRegInfo hitRegInfo);
/**
* 修改报名信息
*
* @param hitRegInfo 报名信息
* @return 结果
*/
public int updateHitRegInfo(HitRegInfo hitRegInfo);
/**
* 批量删除报名信息
*
* @param ids 需要删除的报名信息主键集合
* @return 结果
*/
public int deleteHitRegInfoByIds(Long[] ids);
/**
* 删除报名信息信息
*
* @param id 报名信息主键
* @return 结果
*/
public int deleteHitRegInfoById(Long id);
}

View File

@ -1,19 +1,15 @@
package com.ruoyi.cms.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.domain.vo.HitRegistrationStudentInfoVo;
/**
* 报名信息Service接口
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
public interface IHitRegistrationStudentInfoService extends IService<HitRegistrationStudentInfo>
public interface IHitRegistrationStudentInfoService
{
/**
* 查询报名信息
@ -62,11 +58,4 @@ public interface IHitRegistrationStudentInfoService extends IService<HitRegistra
* @return 结果
*/
public int deleteHitRegistrationStudentInfoById(Long id);
/**
* 自定义查询
* @param studentInfoVo
* @return
*/
public List<HitRegistrationStudentInfoVo> selectStudentInfoNew(HitRegistrationStudentInfoVo studentInfoVo);
}

View File

@ -1,17 +1,15 @@
package com.ruoyi.cms.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.cms.domain.HitRegistrationTeachInfo;
/**
* 教师信息Service接口
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
public interface IHitRegistrationTeachInfoService extends IService<HitRegistrationTeachInfo>
public interface IHitRegistrationTeachInfoService
{
/**
* 查询教师信息
@ -60,11 +58,4 @@ public interface IHitRegistrationTeachInfoService extends IService<HitRegistrati
* @return 结果
*/
public int deleteHitRegistrationTeachInfoById(Long id);
/**
* 检查老师信息是否已存在
* @param teachInfo
* @return
*/
Long checkExist(HitRegistrationTeachInfo teachInfo);
}

View File

@ -246,6 +246,19 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
content.setStatus("1");
content.setDelFlag(0);
List<CmsContent> contents = contentMapper.selectCmsContentList(content);
return new PageInfo<CmsContent>(contents);
}
@Override
public PageInfo<CmsContent> contentList(CmsContentQuery contentQuery) {
PageHelper.startPage(contentQuery.getPageNum(), contentQuery.getPageSize());
CmsContent content = new CmsContent();
content.setCategoryId(contentQuery.getCategoryId());
content.setStatus("1");
content.setDelFlag(0);
List<CmsContent> contents = contentMapper.contentList(content);
return new PageInfo<CmsContent>(contents);
}
@ -286,6 +299,6 @@ public class CmsCategoryServiceImpl extends ServiceImpl<CmsCategoryMapper, CmsCa
*/
@Override
public List<CmsCategory> getCategoryIdByParentId(Long id){
return baseMapper.selectList(new QueryWrapper<CmsCategory>().eq("parent_id", id));
return baseMapper.selectList(new QueryWrapper<CmsCategory>().eq("parent_id", id).orderByAsc("category_sort"));
}
}

View File

@ -0,0 +1,134 @@
package com.ruoyi.cms.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.domain.HitRegistrationTeachInfo;
import com.ruoyi.cms.mapper.HitRegistrationStudentInfoMapper;
import com.ruoyi.cms.mapper.HitRegistrationTeachInfoMapper;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.cms.mapper.HitRegInfoMapper;
import com.ruoyi.cms.domain.HitRegInfo;
import com.ruoyi.cms.service.IHitRegInfoService;
import org.springframework.transaction.annotation.Transactional;
/**
* 报名信息Service业务层处理
*
* @author zcy
* @date 2024-08-20
*/
@Service
public class HitRegInfoServiceImpl implements IHitRegInfoService
{
@Autowired
private HitRegInfoMapper hitRegInfoMapper;
@Autowired
private HitRegistrationStudentInfoMapper studentInfoMapper;
@Autowired
private HitRegistrationTeachInfoMapper teachInfoMapper;
/**
* 查询报名信息
*
* @param id 报名信息主键
* @return 报名信息
*/
@Override
public HitRegInfo selectHitRegInfoById(Long id)
{
return hitRegInfoMapper.selectHitRegInfoById(id);
}
/**
* 查询报名信息列表
*
* @param hitRegInfo 报名信息
* @return 报名信息
*/
@Override
public List<HitRegInfo> selectHitRegInfoList(HitRegInfo hitRegInfo)
{
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
for (HitRegInfo regInfo : hitRegInfos) {
LambdaQueryWrapper<HitRegistrationStudentInfo> queryWrapper =new LambdaQueryWrapper<>();
queryWrapper.eq(HitRegistrationStudentInfo::getHitRegId,regInfo.getId());
List<HitRegistrationStudentInfo> hitRegistrationStudentInfos = studentInfoMapper.selectList(queryWrapper);
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 结果
*/
@Override
@Transactional(rollbackFor = Exception.class)
public int insertHitRegInfo(HitRegInfo hitRegInfo)
{
hitRegInfo.setCreateTime(DateUtils.getNowDate());
hitRegInfoMapper.insertHitRegInfo(hitRegInfo);
for (HitRegistrationStudentInfo hitRegistrationStudentInfo : hitRegInfo.getStudentInfoList()) {
hitRegistrationStudentInfo.setHitRegId(hitRegInfo.getId());
studentInfoMapper.insert(hitRegistrationStudentInfo);
}
for (HitRegistrationTeachInfo hitRegistrationTeachInfo : hitRegInfo.getTeacherInfoList()) {
if (StringUtils.isNotEmpty(hitRegistrationTeachInfo.getTeacherName())){
hitRegistrationTeachInfo.setHitRegId(hitRegInfo.getId());
teachInfoMapper.insert(hitRegistrationTeachInfo);
}
}
return 1;
}
/**
* 修改报名信息
*
* @param hitRegInfo 报名信息
* @return 结果
*/
@Override
public int updateHitRegInfo(HitRegInfo hitRegInfo)
{
hitRegInfo.setUpdateTime(DateUtils.getNowDate());
return hitRegInfoMapper.updateHitRegInfo(hitRegInfo);
}
/**
* 批量删除报名信息
*
* @param ids 需要删除的报名信息主键
* @return 结果
*/
@Override
public int deleteHitRegInfoByIds(Long[] ids)
{
return hitRegInfoMapper.deleteHitRegInfoByIds(ids);
}
/**
* 删除报名信息信息
*
* @param id 报名信息主键
* @return 结果
*/
@Override
public int deleteHitRegInfoById(Long id)
{
return hitRegInfoMapper.deleteHitRegInfoById(id);
}
}

View File

@ -1,30 +1,24 @@
package com.ruoyi.cms.service.impl;
import cn.hutool.core.lang.Snowflake;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.domain.vo.HitRegistrationStudentInfoVo;
import com.ruoyi.cms.mapper.HitRegistrationStudentInfoMapper;
import com.ruoyi.cms.service.IHitRegistrationStudentInfoService;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import com.ruoyi.cms.mapper.HitRegistrationStudentInfoMapper;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.service.IHitRegistrationStudentInfoService;
/**
* 报名信息Service业务层处理
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
@Service
public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegistrationStudentInfoMapper, HitRegistrationStudentInfo> implements IHitRegistrationStudentInfoService
public class HitRegistrationStudentInfoServiceImpl implements IHitRegistrationStudentInfoService
{
@Autowired
private Snowflake snowflake;
private HitRegistrationStudentInfoMapper hitRegistrationStudentInfoMapper;
/**
* 查询报名信息
@ -35,7 +29,7 @@ public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegist
@Override
public HitRegistrationStudentInfo selectHitRegistrationStudentInfoById(Long id)
{
return baseMapper.selectHitRegistrationStudentInfoById(id);
return hitRegistrationStudentInfoMapper.selectHitRegistrationStudentInfoById(id);
}
/**
@ -47,7 +41,7 @@ public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegist
@Override
public List<HitRegistrationStudentInfo> selectHitRegistrationStudentInfoList(HitRegistrationStudentInfo hitRegistrationStudentInfo)
{
return baseMapper.selectHitRegistrationStudentInfoList(hitRegistrationStudentInfo);
return hitRegistrationStudentInfoMapper.selectHitRegistrationStudentInfoList(hitRegistrationStudentInfo);
}
/**
@ -59,9 +53,8 @@ public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegist
@Override
public int insertHitRegistrationStudentInfo(HitRegistrationStudentInfo hitRegistrationStudentInfo)
{
hitRegistrationStudentInfo.setId(snowflake.nextId());
hitRegistrationStudentInfo.setCreateTime(DateUtils.getNowDate());
return baseMapper.insertHitRegistrationStudentInfo(hitRegistrationStudentInfo);
return hitRegistrationStudentInfoMapper.insertHitRegistrationStudentInfo(hitRegistrationStudentInfo);
}
/**
@ -74,7 +67,7 @@ public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegist
public int updateHitRegistrationStudentInfo(HitRegistrationStudentInfo hitRegistrationStudentInfo)
{
hitRegistrationStudentInfo.setUpdateTime(DateUtils.getNowDate());
return baseMapper.updateHitRegistrationStudentInfo(hitRegistrationStudentInfo);
return hitRegistrationStudentInfoMapper.updateHitRegistrationStudentInfo(hitRegistrationStudentInfo);
}
/**
@ -86,7 +79,7 @@ public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegist
@Override
public int deleteHitRegistrationStudentInfoByIds(Long[] ids)
{
return baseMapper.deleteHitRegistrationStudentInfoByIds(ids);
return hitRegistrationStudentInfoMapper.deleteHitRegistrationStudentInfoByIds(ids);
}
/**
@ -98,16 +91,6 @@ public class HitRegistrationStudentInfoServiceImpl extends ServiceImpl<HitRegist
@Override
public int deleteHitRegistrationStudentInfoById(Long id)
{
return baseMapper.deleteHitRegistrationStudentInfoById(id);
}
/**
* 自定义查询
* @param studentInfoVo
* @return
*/
@Override
public List<HitRegistrationStudentInfoVo> selectStudentInfoNew(HitRegistrationStudentInfoVo studentInfoVo){
return baseMapper.selectStudentInfoNew(studentInfoVo);
return hitRegistrationStudentInfoMapper.deleteHitRegistrationStudentInfoById(id);
}
}

View File

@ -1,11 +1,6 @@
package com.ruoyi.cms.service.impl;
import java.util.List;
import cn.hutool.core.lang.Snowflake;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -17,13 +12,13 @@ import com.ruoyi.cms.service.IHitRegistrationTeachInfoService;
* 教师信息Service业务层处理
*
* @author 点亮信息
* @date 2024-07-26
* @date 2024-08-20
*/
@Service
public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistrationTeachInfoMapper, HitRegistrationTeachInfo> implements IHitRegistrationTeachInfoService
public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeachInfoService
{
@Autowired
private Snowflake snowflake;
private HitRegistrationTeachInfoMapper hitRegistrationTeachInfoMapper;
/**
* 查询教师信息
@ -34,7 +29,7 @@ public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistra
@Override
public HitRegistrationTeachInfo selectHitRegistrationTeachInfoById(Long id)
{
return baseMapper.selectHitRegistrationTeachInfoById(id);
return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoById(id);
}
/**
@ -46,7 +41,7 @@ public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistra
@Override
public List<HitRegistrationTeachInfo> selectHitRegistrationTeachInfoList(HitRegistrationTeachInfo hitRegistrationTeachInfo)
{
return baseMapper.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo);
return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo);
}
/**
@ -58,9 +53,8 @@ public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistra
@Override
public int insertHitRegistrationTeachInfo(HitRegistrationTeachInfo hitRegistrationTeachInfo)
{
hitRegistrationTeachInfo.setId(snowflake.nextId());
hitRegistrationTeachInfo.setCreateTime(DateUtils.getNowDate());
return baseMapper.insertHitRegistrationTeachInfo(hitRegistrationTeachInfo);
return hitRegistrationTeachInfoMapper.insertHitRegistrationTeachInfo(hitRegistrationTeachInfo);
}
/**
@ -73,7 +67,7 @@ public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistra
public int updateHitRegistrationTeachInfo(HitRegistrationTeachInfo hitRegistrationTeachInfo)
{
hitRegistrationTeachInfo.setUpdateTime(DateUtils.getNowDate());
return baseMapper.updateHitRegistrationTeachInfo(hitRegistrationTeachInfo);
return hitRegistrationTeachInfoMapper.updateHitRegistrationTeachInfo(hitRegistrationTeachInfo);
}
/**
@ -85,7 +79,7 @@ public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistra
@Override
public int deleteHitRegistrationTeachInfoByIds(Long[] ids)
{
return baseMapper.deleteHitRegistrationTeachInfoByIds(ids);
return hitRegistrationTeachInfoMapper.deleteHitRegistrationTeachInfoByIds(ids);
}
/**
@ -97,16 +91,6 @@ public class HitRegistrationTeachInfoServiceImpl extends ServiceImpl<HitRegistra
@Override
public int deleteHitRegistrationTeachInfoById(Long id)
{
return baseMapper.deleteHitRegistrationTeachInfoById(id);
}
/**
* 检查老师信息是否已存在
* @param teachInfo
* @return 数据的ID
*/
@Override
public Long checkExist(HitRegistrationTeachInfo teachInfo){
return baseMapper.checkExist(teachInfo);
return hitRegistrationTeachInfoMapper.deleteHitRegistrationTeachInfoById(id);
}
}

View File

@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置
server:
# 服务器的HTTP端口默认为8080
port: 8089
port: 8080
servlet:
# 应用的访问路径
context-path: /

View File

@ -7,7 +7,7 @@
"imageCompressEnable": true, /* ,true */
"imageCompressBorder": 1600, /* */
"imageInsertAlign": "none", /* */
"imageUrlPrefix": "http://122.51.230.86:8001", /* 访 */
"imageUrlPrefix": "http://192.168.31.25:8080", /* 访 */
"imagePathFormat": "image/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
/* {filename} , */
/* {rand:6} , */
@ -43,27 +43,27 @@
"videoActionName": "uploadvideo", /* action */
"videoFieldName": "upfile", /* */
"videoPathFormat": "video/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
"videoUrlPrefix": "http://122.51.230.86:8001", /* 访 */
"videoUrlPrefix": "http://192.168.31.25:8080", /* 访 */
"videoMaxSize": 102400000, /* B100MB */
"videoAllowFiles": [ ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* */
/* */
"fileActionName": "uploadfile", /* controller,action */
"fileFieldName": "upfile", /* */
"filePathFormat": "file/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
"fileUrlPrefix": "http://122.51.230.86:8001", /* 访 */
"fileUrlPrefix": "http://192.168.31.25:8080", /* 访 */
"fileMaxSize": 51200000, /* B50MB */
"fileAllowFiles": [ ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" ], /* */
/* */
"imageManagerActionName": "listimage", /* action */
"imageManagerListPath": "image/", /* */
"imageManagerListSize": 20, /* */
"imageManagerUrlPrefix": "http://122.51.230.86:8001", /* 访 */
"imageManagerUrlPrefix": "http://192.168.31.25:8080", /* 访 */
"imageManagerInsertAlign": "none", /* */
"imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* */
/* */
"fileManagerActionName": "listfile", /* action */
"fileManagerListPath": "file/", /* */
"fileManagerUrlPrefix": "http://122.51.230.86:8001", /* 访 */
"fileManagerUrlPrefix": "http://192.168.31.25:8080", /* 访 */
"fileManagerListSize": 20, /* */
"fileManagerAllowFiles": [ ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" ] /* */
}

View File

@ -73,7 +73,90 @@
</sql>
<select id="selectCmsContentList" parameterType="CmsContent" resultMap="CmsContentResult">
<include refid="selectCmsContentVo"/>
select id,
category_id,
content_type,
image_url,
video_url,
content_title,
content_img,
content_detail,
source,
source_url,
original,
author,
editor,
summary,
tag_name,
status,
publish_date,
offline_date,
is_accessory,
accessory_url,
remark,
del_flag,
create_time,
create_by,
update_time,
update_by,
link_type,
link,
count
from cms_content
<where>
<if test="categoryId != null ">and category_id = #{categoryId}</if>
<if test="contentType != null ">and content_type = #{contentType}</if>
<if test="contentTitle != null and contentTitle != ''">and content_title like concat('%', #{contentTitle},
'%')
</if>
<if test="contentImg != null and contentImg != ''">and content_img = #{contentImg}</if>
<if test="contentDetail != null and contentDetail != ''">and content_detail = #{contentDetail}</if>
<if test="source != null and source != ''">and source = #{source}</if>
<if test="sourceUrl != null and sourceUrl != ''">and source_url = #{sourceUrl}</if>
<if test="original != null ">and original = #{original}</if>
<if test="author != null and author != ''">and author = #{author}</if>
<if test="editor != null and editor != ''">and editor = #{editor}</if>
<if test="summary != null and summary != ''">and summary = #{summary}</if>
<if test="status != null ">and status = #{status}</if>
<if test="publishDate != null ">and publish_date = #{publishDate}</if>
<if test="offlineDate != null ">and offline_date = #{offlineDate}</if>
<if test="isAccessory != null ">and is_accessory = #{isAccessory}</if>
<if test="accessoryUrl != null and accessoryUrl != ''">and accessory_url = #{accessoryUrl}</if>
<if test="delFlag != null">and del_flag = #{delFlag}</if>
</where>
order by create_time desc, update_time desc
</select>
<select id="contentList" parameterType="CmsContent" resultMap="CmsContentResult">
select id,
category_id,
content_type,
image_url,
video_url,
content_title,
content_img,
source,
source_url,
original,
author,
editor,
summary,
tag_name,
status,
publish_date,
offline_date,
is_accessory,
accessory_url,
remark,
del_flag,
create_time,
create_by,
update_time,
update_by,
link_type,
link,
count
from cms_content
<where>
<if test="categoryId != null ">and category_id = #{categoryId}</if>
<if test="contentType != null ">and content_type = #{contentType}</if>

View File

@ -0,0 +1,118 @@
<?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.HitRegInfoMapper">
<resultMap type="HitRegInfo" id="HitRegInfoResult">
<result property="id" column="id" />
<result property="schoolName" column="school_name" />
<result property="collegeName" column="college_name" />
<result property="division" column="division" />
<result property="teamName" column="team_name" />
<result property="sampleConcat" column="sample_concat" />
<result property="sampleNumber" column="sample_number" />
<result property="sampleAddress" column="sample_address" />
<result property="remark" column="remark" />
<result property="auditStatus" column="audit_status" />
<result property="uploadFile" column="upload_file" />
<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="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
</sql>
<select id="selectHitRegInfoList" parameterType="HitRegInfo" resultMap="HitRegInfoResult">
<include refid="selectHitRegInfoVo"/>
<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>
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
<if test="sampleConcat != null and sampleConcat != ''"> and sample_concat = #{sampleConcat}</if>
<if test="sampleNumber != null and sampleNumber != ''"> and sample_number = #{sampleNumber}</if>
<if test="sampleAddress != null and sampleAddress != ''"> and sample_address = #{sampleAddress}</if>
<if test="uploadFile != null and uploadFile != ''"> and upload_file = #{uploadFile}</if>
</where>
order by audit_status asc,create_time desc
</select>
<select id="selectHitRegInfoById" parameterType="Long" resultMap="HitRegInfoResult">
<include refid="selectHitRegInfoVo"/>
where id = #{id}
</select>
<insert id="insertHitRegInfo" parameterType="HitRegInfo" useGeneratedKeys="true" keyProperty="id">
insert into hit_reg_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="schoolName != null and schoolName != ''">school_name,</if>
<if test="collegeName != null">college_name,</if>
<if test="division != null and division != ''">division,</if>
<if test="teamName != null">team_name,</if>
<if test="sampleConcat != null">sample_concat,</if>
<if test="sampleNumber != null">sample_number,</if>
<if test="sampleAddress != null">sample_address,</if>
<if test="remark != null">remark,</if>
<if test="uploadFile != null">upload_file,</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="schoolName != null and schoolName != ''">#{schoolName},</if>
<if test="collegeName != null">#{collegeName},</if>
<if test="division != null and division != ''">#{division},</if>
<if test="teamName != null">#{teamName},</if>
<if test="sampleConcat != null">#{sampleConcat},</if>
<if test="sampleNumber != null">#{sampleNumber},</if>
<if test="sampleAddress != null">#{sampleAddress},</if>
<if test="remark != null">#{remark},</if>
<if test="uploadFile != null">#{uploadFile},</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="updateHitRegInfo" parameterType="HitRegInfo">
update hit_reg_info
<trim prefix="SET" suffixOverrides=",">
<if test="schoolName != null and schoolName != ''">school_name = #{schoolName},</if>
<if test="collegeName != null">college_name = #{collegeName},</if>
<if test="division != null and division != ''">division = #{division},</if>
<if test="teamName != null">team_name = #{teamName},</if>
<if test="sampleConcat != null">sample_concat = #{sampleConcat},</if>
<if test="sampleNumber != null">sample_number = #{sampleNumber},</if>
<if test="sampleAddress != null">sample_address = #{sampleAddress},</if>
<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="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="deleteHitRegInfoById" parameterType="Long">
delete from hit_reg_info where id = #{id}
</delete>
<delete id="deleteHitRegInfoByIds" parameterType="String">
delete from hit_reg_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -6,44 +6,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="HitRegistrationStudentInfo" id="HitRegistrationStudentInfoResult">
<result property="id" column="id" />
<result property="competitionId" column="competition_id" />
<result property="hitRegId" column="hit_reg_id" />
<result property="stuName" column="stu_name" />
<result property="stuGender" column="stu_gender" />
<result property="stuMajor" column="stu_major" />
<result property="stuNumber" column="stu_number" />
<result property="schoolName" column="school_name" />
<result property="division" column="division" />
<result property="teamName" column="team_name" />
<result property="leaderIds" column="leader_ids" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" />
<result property="guideIds" column="guide_ids" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" />
<result property="remark" column="remark" />
<result property="sex" column="sex" />
<result property="major" column="major" />
<result property="phoneNumber" column="phone_number" />
<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" />
<result property="sampleConcat" column="sample_concat" />
<result property="sampleNumber" column="sample_number" />
<result property="sampleAddress" column="sample_address" />
</resultMap>
<sql id="selectHitRegistrationStudentInfoVo">
select id, sample_concat, sample_number, sample_address, competition_id, stu_name, stu_gender, stu_major, stu_number, school_name, division, team_name, leader_ids, guide_ids, remark, del_flag, create_time, create_by, update_time, update_by from hit_registration_student_info
select id, hit_reg_id, stu_name, sex, major, phone_number, del_flag, create_time, create_by, update_time, update_by from hit_registration_student_info
</sql>
<select id="selectHitRegistrationStudentInfoList" parameterType="HitRegistrationStudentInfo" resultMap="HitRegistrationStudentInfoResult">
<include refid="selectHitRegistrationStudentInfoVo"/>
<where>
<if test="competitionId != null "> and competition_id = #{competitionId}</if>
<if test="hitRegId != null "> and hit_reg_id = #{hitRegId}</if>
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
<if test="stuGender != null "> and stu_gender = #{stuGender}</if>
<if test="stuMajor != null and stuMajor != ''"> and stu_major = #{stuMajor}</if>
<if test="stuNumber != null and stuNumber != ''"> and stu_number = #{stuNumber}</if>
<if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
<if test="division != null and division != ''"> and division = #{division}</if>
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
<if test="leaderIds != null and leaderIds != ''"> and leader_ids = #{leaderIds}</if>
<if test="guideIds != null and guideIds != ''"> and guide_ids = #{guideIds}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="major != null and major != ''"> and major = #{major}</if>
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
</where>
</select>
@ -56,64 +42,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into hit_registration_student_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="competitionId != null">competition_id,</if>
<if test="hitRegId != null">hit_reg_id,</if>
<if test="stuName != null and stuName != ''">stu_name,</if>
<if test="stuGender != null">stu_gender,</if>
<if test="stuMajor != null and stuMajor != ''">stu_major,</if>
<if test="stuNumber != null and stuNumber != ''">stu_number,</if>
<if test="schoolName != null and schoolName != ''">school_name,</if>
<if test="division != null and division != ''">division,</if>
<if test="teamName != null">team_name,</if>
<if test="leaderIds != null">leader_ids,</if>
<if test="guideIds != null">guide_ids,</if>
<if test="remark != null">remark,</if>
<if test="sex != null">sex,</if>
<if test="major != null and major != ''">major,</if>
<if test="phoneNumber != null">phone_number,</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>
<if test="sampleConcat != null">sample_concat,</if>
<if test="sampleNumber != null">sample_number,</if>
<if test="sampleAddress != null">sample_address,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="competitionId != null">#{competitionId},</if>
<if test="hitRegId != null">#{hitRegId},</if>
<if test="stuName != null and stuName != ''">#{stuName},</if>
<if test="stuGender != null">#{stuGender},</if>
<if test="stuMajor != null and stuMajor != ''">#{stuMajor},</if>
<if test="stuNumber != null and stuNumber != ''">#{stuNumber},</if>
<if test="schoolName != null and schoolName != ''">#{schoolName},</if>
<if test="division != null and division != ''">#{division},</if>
<if test="teamName != null">#{teamName},</if>
<if test="leaderIds != null">#{leaderIds,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if>
<if test="guideIds != null">#{guideIds,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if>
<if test="remark != null">#{remark},</if>
<if test="sex != null">#{sex},</if>
<if test="major != null and major != ''">#{major},</if>
<if test="phoneNumber != null">#{phoneNumber},</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>
<if test="sampleConcat != null">#{sampleConcat},</if>
<if test="sampleNumber != null">#{sampleNumber},</if>
<if test="sampleAddress != null">#{sampleAddress},</if>
</trim>
</insert>
<update id="updateHitRegistrationStudentInfo" parameterType="HitRegistrationStudentInfo">
update hit_registration_student_info
<trim prefix="SET" suffixOverrides=",">
<if test="competitionId != null">competition_id = #{competitionId},</if>
<if test="hitRegId != null">hit_reg_id = #{hitRegId},</if>
<if test="stuName != null and stuName != ''">stu_name = #{stuName},</if>
<if test="stuGender != null">stu_gender = #{stuGender},</if>
<if test="stuMajor != null and stuMajor != ''">stu_major = #{stuMajor},</if>
<if test="stuNumber != null and stuNumber != ''">stu_number = #{stuNumber},</if>
<if test="schoolName != null and schoolName != ''">school_name = #{schoolName},</if>
<if test="division != null and division != ''">division = #{division},</if>
<if test="teamName != null">team_name = #{teamName},</if>
<if test="leaderIds != null">leader_ids = #{leaderIds,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if>
<if test="guideIds != null">guide_ids = #{guideIds,jdbcType=OTHER,typeHandler=com.ruoyi.system.handler.MysqlTypeHandler},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="major != null and major != ''">major = #{major},</if>
<if test="phoneNumber != null">phone_number = #{phoneNumber},</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>
@ -133,79 +95,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<!-- 自定义-->
<sql id="selectHitRegistrationStudentInfoVoNew">
select
id, sample_concat, sample_number, sample_address, competition_id, stu_name, stu_gender, stu_major, stu_number, school_name, division, team_name, leader_ids, guide_ids, remark,del_flag, create_time, create_by, update_time, update_by,competition_name, competition_type, leader_names, guide_names
from
(SELECT
s.id, s.competition_id, s.stu_name, s.stu_gender, s.stu_major, s.stu_number, s.school_name, s.division, s.team_name, s.leader_ids, s.guide_ids, s.remark, s.del_flag, s.create_time, s.create_by, s.update_time, s.update_by,c.competition_name, c.competition_type, s.sample_concat, s.sample_number, s.sample_address,
CONCAT('[',
GROUP_CONCAT(JSON_QUOTE(t.teacher_name) ORDER BY t.teacher_name SEPARATOR ','),
']') AS leader_names
FROM
hit_registration_student_info s
LEFT JOIN
hit_registration_teach_info t ON JSON_CONTAINS(s.leader_ids, CAST(t.id AS JSON), '$')
LEFT JOIN
hit_competition c on c.id = s.competition_id
GROUP BY
s.id) as t1,
(SELECT
s.id AS student_id,
CONCAT('[',
GROUP_CONCAT(JSON_QUOTE(t.teacher_name) ORDER BY t.teacher_name SEPARATOR ','),
']') AS guide_names
FROM
hit_registration_student_info s
LEFT JOIN
hit_registration_teach_info t ON JSON_CONTAINS(s.guide_ids, CAST(t.id AS JSON), '$')
GROUP BY
s.id) as t2
where t1.id = t2.student_id
</sql>
<resultMap type="hitRegistrationStudentInfoVo" id="StudentInfoVoNew">
<result property="id" column="id" />
<result property="competitionId" column="competition_id" />
<result property="stuName" column="stu_name" />
<result property="stuGender" column="stu_gender" />
<result property="stuMajor" column="stu_major" />
<result property="stuNumber" column="stu_number" />
<result property="schoolName" column="school_name" />
<result property="division" column="division" />
<result property="teamName" column="team_name" />
<result property="leaderIds" column="leader_ids" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" />
<result property="guideIds" column="guide_ids" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" />
<result property="remark" column="remark" />
<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" />
<result property="competitionName" column="competition_name" />
<result property="competitionType" column="competition_type" />
<result property="sampleConcat" column="sample_concat" />
<result property="sampleNumber" column="sample_number" />
<result property="sampleAddress" column="sample_address" />
<result property="leaderNames" column="leader_names" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" />
<result property="guideNames" column="guide_names" javaType="java.util.List" typeHandler="com.ruoyi.system.handler.MysqlTypeHandler" />
</resultMap>
<select id="selectStudentInfoNew" parameterType="hitRegistrationStudentInfoVo" resultMap="StudentInfoVoNew">
<include refid="selectHitRegistrationStudentInfoVoNew"/>
<if test="competitionName != null and competitionName != ''"> and competition_name like concat('%', #{competitionName}, '%')</if>
<if test="stuName != null and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if>
<if test="stuGender != null "> and stu_gender = #{stuGender}</if>
<if test="stuMajor != null and stuMajor != ''"> and stu_major = #{stuMajor}</if>
<if test="stuNumber != null and stuNumber != ''"> and stu_number like concat('%', #{stuNumber}, '%')</if>
<if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
<if test="division != null and division != ''"> and division like concat('%', #{division}, '%')</if>
<if test="teamName != null and teamName != ''"> and team_name like concat('%', #{teamName}, '%')</if>
<if test="teachName != null and teachName != ''"> and (leader_names like concat('%', #{teachName}, '%') or guide_names like concat('%', #{teachName}, '%'))</if>
<if test="competitionType != null">and competition_type = #{competitionType}</if>
<if test="createTime != null">and YEAR(create_time) = YEAR(#{createTime})</if>
order by create_time desc
</select>
</mapper>

View File

@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="HitRegistrationTeachInfo" id="HitRegistrationTeachInfoResult">
<result property="id" column="id" />
<result property="hitRegId" column="hit_reg_id" />
<result property="teacherName" column="teacher_name" />
<result property="teacherJob" column="teacher_job" />
<result property="teacherNumber" column="teacher_number" />
@ -17,20 +18,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="type" column="type" />
</resultMap>
<sql id="selectHitRegistrationTeachInfoVo">
select id, teacher_name, teacher_job, teacher_number, teacher_email, teacher_school, remark, del_flag, create_time, create_by, update_time, update_by from hit_registration_teach_info
select id, hit_reg_id, teacher_name, teacher_job, teacher_number, teacher_email, teacher_school, remark, del_flag, create_time, create_by, update_time, update_by, type from hit_registration_teach_info
</sql>
<select id="selectHitRegistrationTeachInfoList" parameterType="HitRegistrationTeachInfo" resultMap="HitRegistrationTeachInfoResult">
<include refid="selectHitRegistrationTeachInfoVo"/>
<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="type != null and type != ''"> and type = #{type}</if>
</where>
</select>
@ -43,6 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into hit_registration_teach_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="hitRegId != null">hit_reg_id,</if>
<if test="teacherName != null and teacherName != ''">teacher_name,</if>
<if test="teacherJob != null and teacherJob != ''">teacher_job,</if>
<if test="teacherNumber != null and teacherNumber != ''">teacher_number,</if>
@ -54,9 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="type != null">type,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="hitRegId != null">#{hitRegId},</if>
<if test="teacherName != null and teacherName != ''">#{teacherName},</if>
<if test="teacherJob != null and teacherJob != ''">#{teacherJob},</if>
<if test="teacherNumber != null and teacherNumber != ''">#{teacherNumber},</if>
@ -68,12 +75,14 @@ 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>
</trim>
</insert>
<update id="updateHitRegistrationTeachInfo" parameterType="HitRegistrationTeachInfo">
update hit_registration_teach_info
<trim prefix="SET" suffixOverrides=",">
<if test="hitRegId != null">hit_reg_id = #{hitRegId},</if>
<if test="teacherName != null and teacherName != ''">teacher_name = #{teacherName},</if>
<if test="teacherJob != null and teacherJob != ''">teacher_job = #{teacherJob},</if>
<if test="teacherNumber != null and teacherNumber != ''">teacher_number = #{teacherNumber},</if>
@ -85,11 +94,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="type != null">type = #{type},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteHitRegistrationTeachInfoById" parameterType="Long">
delete from hit_registration_teach_info where id = #{id}
</delete>
@ -100,8 +109,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<select id="checkExist" resultType="java.lang.Long" parameterType="hitRegistrationTeachInfo">
select id from hit_registration_teach_info where teacher_name = #{teacherName} and teacher_job = #{teacherJob} and teacher_number = #{teacherNumber} and teacher_email = #{teacherEmail} and teacher_school = #{teacherSchool} limit 1
</select>
</mapper>

View File

@ -115,7 +115,8 @@ public class SecurityConfig
// 静态资源可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
.antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex","/system/dict/data/type/imitation_type").permitAll()
.antMatchers("/api/**", "/ueditor/**","/system/dict/data/type/sys_user_sex","/system/dict/data/type/imitation_type"
,"/system/dict/data/type/school_name").permitAll()
// 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated();
})

Binary file not shown.

View File

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询报名信息列表
export function listHitRegistrationStudentInfo(query) {
return request({
url: '/hit/hitRegistrationStudentInfo/list',
url: '/system/hit_reg_info/list',
method: 'get',
params: query
})
@ -29,7 +29,7 @@ export function addHitRegistrationStudentInfo(data) {
// 修改报名信息
export function updateHitRegistrationStudentInfo(data) {
return request({
url: '/hit/hitRegistrationStudentInfo',
url: '/system/hit_reg_info',
method: 'put',
data: data
})

View File

@ -10,7 +10,7 @@ export function addTeacher(data){
export function register(data){
return request({
url: "/api/registerStudent",
url: "/system/hit_reg_info",
method: "post",
data
})

View File

@ -1,52 +1,22 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
<el-form-item label="学生姓名" prop="stuName">
<el-input
v-model="queryParams.stuName"
placeholder="请输入学生姓名"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="学生专业" prop="stuMajor">
<el-input
v-model="queryParams.stuMajor"
placeholder="请输入学生专业"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="学生手机号" prop="stuNumber">
<el-input
v-model="queryParams.stuNumber"
placeholder="请输入学生手机号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="学校及院系名称" prop="schoolName">
<el-form-item label="学校名称" prop="schoolName">
<el-input
v-model="queryParams.schoolName"
placeholder="请输入学校及院系名称"
placeholder="请输入学校名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="学院名称" prop="collegeName">
<el-input
v-model="queryParams.collegeName"
placeholder="请输入学院名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="大赛类型" prop="">-->
<!-- <el-select-->
<!-- v-model="queryParams.competitionType"-->
<!-- placeholder="大赛类型"-->
<!-- clearable-->
<!-- style="width: 125px">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.competition_type"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="dict.value"-->
<!-- />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="所属赛区" prop="division">
<el-input
v-model="queryParams.division"
@ -63,46 +33,16 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="教师名称" prop="teachName">
<el-input
v-model="queryParams.teachName"
placeholder="请输入团队名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="大赛名称" prop="competitionName">-->
<!-- <el-input-->
<!-- v-model="queryParams.competitionName"-->
<!-- placeholder="请输入团队名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- <el-form-item label="大赛年份" prop="competitionYear">-->
<!-- <el-select v-model="queryParams.createTime" placeholder="请选择">-->
<!-- <el-option-->
<!-- v-for="item in yearList"-->
<!-- :key="item.value"-->
<!-- :label="item.label"-->
<!-- :value="item.value">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="大赛年份" prop="competitionYear">
<el-select v-model="queryParams.createTime" placeholder="请选择">
<el-option
v-for="item in yearList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="学生性别" prop="stuGender">
<el-select
v-model="queryParams.stuGender"
placeholder="学生性别"
clearable
style="width: 125px">
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置刷新</el-button>
@ -110,18 +50,18 @@
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['hit:hitRegistrationStudentInfo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="danger"-->
<!-- plain-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- :disabled="multiple"-->
<!-- @click="handleDelete"-->
<!-- v-hasPermi="['hit:hitRegistrationStudentInfo:remove']"-->
<!-- >删除</el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
@ -130,7 +70,7 @@
@click="handleExport"
v-hasPermi="['hit:hitRegistrationStudentInfo:export']"
>导出</el-button>
</el-col>
</el-col>-->
<el-col :span="1.5">
<el-switch
v-model="registerStatus"
@ -144,66 +84,96 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table @expand-change="getTeachInfo" style="width: 100%; table-layout: auto" v-loading="loading" :data="HitRegistrationStudentInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table style="width: 100%; table-layout: auto" v-loading="loading" :data="HitRegistrationStudentInfoList" @selection-change="handleSelectionChange">
<el-table-column type="expand">
<template slot-scope="props">
<el-descriptions title="学生信息" style="margin-left: 10%">
<!-- <el-descriptions-item label="比赛名称">{{props.row.competitionName}}</el-descriptions-item>-->
<el-descriptions-item label="学生姓名">{{props.row.stuName}}</el-descriptions-item>
<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>
<el-descriptions :title="'指导老师'+(index)" v-if="index>0" v-for="(item, index) in props.row.teacherInfoList" 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-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="props.row.stuGender"/>
<dict-tag :options="dict.type.sys_user_sex" :value="item.sex"/>
</el-descriptions-item>
<el-descriptions-item label="学生专业">{{props.row.stuMajor}}</el-descriptions-item>
<el-descriptions-item label="学生手机号">{{props.row.stuNumber}}</el-descriptions-item>
<el-descriptions-item label="学校及院系名称">{{props.row.schoolName}}</el-descriptions-item>
<el-descriptions-item label="所属赛区">{{props.row.division}}</el-descriptions-item>
<el-descriptions-item label="团队名称">{{props.row.teamName}}</el-descriptions-item>
</el-descriptions>
<el-descriptions :title="'领队教师' + (index + 1)" v-for="(item, index) in leaderTeachList" style="margin-left: 10%" v-show="leaderTeachList !== null && leaderTeachList.length !== 0">
<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 guideTeachList" style="margin-left: 10%" v-show="guideTeachList !== null && guideTeachList.length !== 0">
<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="盲样邮寄地址" style="margin-left: 10%">
<el-descriptions-item label="收件人">{{props.row.sampleConcat}}</el-descriptions-item>
<el-descriptions-item label="联系电话">{{props.row.sampleNumber}}</el-descriptions-item>
<el-descriptions-item label="邮寄地址">{{props.row.sampleAddress}}</el-descriptions-item>
<el-descriptions-item label="学生专业">{{item.major}}</el-descriptions-item>
<el-descriptions-item label="学生手机号">{{item.phoneNumber}}</el-descriptions-item>
</el-descriptions>
</template>
</el-table-column>
<!-- <el-table-column label="比赛名称" align="center" prop="competitionName" />-->
<el-table-column label="学生姓名" align="center" prop="stuName" />
<el-table-column label="学生性别" align="center" prop="stuGender" width="100px">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.stuGender"/>
<el-table-column label="所属赛区" align="center" prop="division" />
<el-table-column label="学校名称" align="center" prop="schoolName" />
<el-table-column label="院系名称" align="center" prop="collegeName" />
<el-table-column label="团队名称" align="center" prop="teamName" />
<el-table-column label="盲样邮寄地址" align="center" prop="sampleAddress" />
<el-table-column label="收件人" align="center" prop="sampleConcat" />
<el-table-column label="联系电话" align="center" prop="sampleAddress" />
<el-table-column label="附件" align="center" prop="uploadFile" >
<template slot-scope="props">
<el-link :href="`${baseUrl}${props.row.uploadFile}`" type="primary" :underline="false" target="_blank">
<span class="el-icon-document"> 下载 </span>
</el-link>
</template>
</el-table-column>
<el-table-column label="学生专业" align="center" prop="stuMajor" />
<el-table-column label="学生手机号" align="center" prop="stuNumber" />
<el-table-column label="学校及院系名称" align="center" prop="schoolName" width="120px"/>
<el-table-column label="所属赛区" align="center" prop="division" />
<el-table-column label="团队名称" align="center" prop="teamName" />
<el-table-column label="领队教师" align="center" prop="leaderNames" />
<el-table-column label="指导教师" align="center" prop="guideNames" width="120px" />
<el-table-column label="报名时间" align="center" prop="createTime" >
<template slot-scope="props">
{{props.row.createTime.substring(0,11)}}
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="auditStatus" >
<template slot-scope="props">
<div v-if="props.row.auditStatus=='0'" style="color:#007bff;"> 待审核</div>
<div v-if="props.row.auditStatus=='1'" style="color:green;"> 通过</div>
<div v-if="props.row.auditStatus=='2'" style="color:red;"> 拒绝</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['hit:hitRegistrationStudentInfo:remove']"
>删除</el-button>
<el-popconfirm
title="确定当前操作?"
v-if="scope.row.auditStatus=='0'||scope.row.auditStatus=='2'"
@confirm="auditData(scope.row,'1')"
>
<el-button
size="mini"
type="text"
slot="reference"
>通过</el-button>
</el-popconfirm>
<el-popconfirm
title="确定当前操作?"
style="margin-left: 10px"
v-if="scope.row.auditStatus=='0'||scope.row.auditStatus=='1'"
@confirm="auditData(scope.row,'2')"
>
<el-button
size="mini"
type="text"
slot="reference"
>拒绝</el-button>
</el-popconfirm>
</template>
</el-table-column>
</el-table>
@ -236,6 +206,7 @@ export default {
data() {
return {
yearList: [],
baseUrl: process.env.VUE_APP_BASE_API,
registerStatus:"",
leaderTeachList:[],
guideTeachList:[],
@ -318,10 +289,7 @@ export default {
this.loading = true;
listHitRegistrationStudentInfo(this.queryParams).then(response => {
this.HitRegistrationStudentInfoList = response.rows;
this.HitRegistrationStudentInfoList.forEach(item => {
if (item.leaderNames !== null) item.leaderNames = item.leaderNames.join(",");
if (item.guideNames !== null) item.guideNames = item.guideNames.join(",");
})
this.total = response.total;
this.loading = false;
});
@ -387,6 +355,14 @@ export default {
this.title = "修改报名信息";
});
},
auditData(data,status){
data.auditStatus = status
updateHitRegistrationStudentInfo(data).then(response => {
this.$modal.msgSuccess("成功");
this.getList();
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {

View File

@ -30,18 +30,35 @@
<!-- 基础信息-->
<div class="kuang">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="所属赛区" prop="division">
<el-col :span="6">
<el-form-item label="所属赛区" prop="division">
<el-input v-model="ruleForm.division"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="学校及院系名称" prop="schoolName">
<el-input v-model="ruleForm.schoolName"></el-input>
<el-col :span="6">
<el-form-item label="学校名称" prop="schoolName">
<el-select
v-model="ruleForm.schoolName"
filterable
allow-create
default-first-option
placeholder="请选择学校名称">
<el-option
v-for="item in dict.type.school_name"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="参赛团队名称" prop="teamName">
<el-col :span="6">
<el-form-item label="院系名称" prop="collegeName">
<el-input v-model="ruleForm.collegeName"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="参赛团队名称" prop="teamName">
<el-input v-model="ruleForm.teamName"></el-input>
</el-form-item>
</el-col>
@ -50,112 +67,97 @@
<!-- 领队老师信息-->
<div class="kuang ">
<h2 class="tab_title tab_down_line">领队老师</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="teachers.0.teacherName">
<el-input v-model="ruleForm.teachers[0].teacherName"></el-input>
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="姓名" prop="teacherInfoList.0.teacherName">
<el-input v-model="ruleForm.teacherInfoList[0].teacherName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务" prop="teachers.0.teacherJob">
<el-input v-model="ruleForm.teachers[0].teacherJob"></el-input>
<el-form-item style="width: 33%" label="职务" prop="teacherInfoList.0.teacherJob">
<el-input v-model="ruleForm.teacherInfoList[0].teacherJob"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" prop="teachers.0.teacherNumber">
<el-input v-model="ruleForm.teachers[0].teacherNumber"></el-input>
<el-form-item style="width: 33%" label="手机号" prop="teacherInfoList.0.teacherNumber">
<el-input v-model="ruleForm.teacherInfoList[0].teacherNumber"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="E-mail" prop="teachers.0.teacherEmail">
<el-input v-model="ruleForm.teachers[0].teacherEmail"></el-input>
<el-form-item style="width: 33%" label="E-mail" prop="teacherInfoList.0.teacherEmail">
<el-input v-model="ruleForm.teacherInfoList[0].teacherEmail"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在系及专业" prop="teachers.0.teacherSchool">
<el-input v-model="ruleForm.teachers[0].teacherSchool"></el-input>
<el-form-item style="width: 33%" label="所在系及专业" prop="teacherInfoList.0.teacherSchool">
<el-input v-model="ruleForm.teacherInfoList[0].teacherSchool"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<!-- 指导老师①信息-->
<div class="kuang ">
<div class="kuang">
<h2 class="tab_title tab_down_line">指导老师①</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="teachers.1.teacherName">
<el-input v-model="ruleForm.teachers[1].teacherName"></el-input>
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="姓名" prop="teacherInfoList.1.teacherName">
<el-input v-model="ruleForm.teacherInfoList[1].teacherName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务" prop="teachers.1.teacherJob">
<el-input v-model="ruleForm.teachers[1].teacherJob"></el-input>
<el-form-item style="width: 33%" label="职务" prop="teacherInfoList.1.teacherJob">
<el-input v-model="ruleForm.teacherInfoList[1].teacherJob"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" prop="teachers.1.teacherNumber">
<el-input v-model="ruleForm.teachers[1].teacherNumber"></el-input>
<el-form-item style="width: 33%" label="手机号" prop="teacherInfoList.1.teacherNumber">
<el-input v-model="ruleForm.teacherInfoList[1].teacherNumber"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="E-mail" prop="teachers.1.teacherEmail">
<el-input v-model="ruleForm.teachers[1].teacherEmail"></el-input>
<el-form-item style="width: 33%" label="E-mail" prop="teacherInfoList.1.teacherEmail">
<el-input v-model="ruleForm.teacherInfoList[1].teacherEmail"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在系及专业" prop="teachers.1.teacherSchool">
<el-input v-model="ruleForm.teachers[1].teacherSchool"></el-input>
<el-form-item style="width: 33%" label="所在系及专业" prop="teacherInfoList.1.teacherSchool">
<el-input v-model="ruleForm.teacherInfoList[1].teacherSchool"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<!-- 指导老师②信息-->
<div class="kuang ">
<h2 class="tab_title tab_down_line">指导老师②</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="teachers.2.teacherName">
<el-input v-model="ruleForm.teachers[2].teacherName"></el-input>
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="姓名" prop="teacherInfoList.2.teacherName">
<el-input v-model="ruleForm.teacherInfoList[2].teacherName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="职务" prop="teachers.2.teacherJob">
<el-input v-model="ruleForm.teachers[2].teacherJob"></el-input>
<el-form-item style="width: 33%" label="职务" prop="teacherInfoList.2.teacherJob">
<el-input v-model="ruleForm.teacherInfoList[2].teacherJob"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" prop="teachers.2.teacherNumber">
<el-input v-model="ruleForm.teachers[2].teacherNumber"></el-input>
<el-form-item style="width: 33%" label="手机号" prop="teacherInfoList.2.teacherNumber">
<el-input v-model="ruleForm.teacherInfoList[2].teacherNumber"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="E-mail" prop="teachers.2.teacherEmail">
<el-input v-model="ruleForm.teachers[2].teacherEmail"></el-input>
<el-form-item style="width: 33%" label="E-mail" prop="teacherInfoList.2.teacherEmail">
<el-input v-model="ruleForm.teacherInfoList[2].teacherEmail"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所在系及专业" prop="teachers.2.teacherSchool">
<el-input v-model="ruleForm.teachers[2].teacherSchool"></el-input>
<el-form-item style="width: 33%" label="所在系及专业" prop="teacherInfoList.2.teacherSchool">
<el-input v-model="ruleForm.teacherInfoList[2].teacherSchool"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<!-- 参赛人信息1-->
<div class="kuang ">
<h2 class="tab_title tab_down_line">参赛人信息①</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="stuName">
<el-input v-model="ruleForm.stuName"></el-input>
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="姓名" prop="studentInfoList.0.stuName">
<el-input v-model="ruleForm.studentInfoList[0].stuName "></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="stuGender">
<el-form-item style="width: 33%" label="性别" prop="studentInfoList.0.sex">
<el-select
v-model="ruleForm.stuGender"
v-model="ruleForm.studentInfoList[0].sex "
placeholder="学生性别"
clearable
>
@ -167,117 +169,114 @@
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="专业" prop="stuMajor">
<el-input v-model="ruleForm.stuMajor"></el-input>
<el-form-item style="width: 33%" label="专业" prop="studentInfoList.0.major">
<el-input v-model="ruleForm.studentInfoList[0].major "></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" prop="stuNumber">
<el-input v-model="ruleForm.stuNumber"></el-input>
<el-form-item style="width: 33%" label="手机号" prop="studentInfoList.0.phoneNumber">
<el-input v-model="ruleForm.studentInfoList[0].phoneNumber "></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<!-- 参赛人信息2-->
<div class="kuang ">
<h2 class="tab_title tab_down_line">参赛人信息②</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="stuName">
<el-input v-model="ruleForm.stuName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="stuGender">
<el-select
v-model="ruleForm.stuGender"
placeholder="学生性别"
clearable
>
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="专业" prop="stuMajor">
<el-input v-model="ruleForm.stuMajor"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" prop="stuNumber">
<el-input v-model="ruleForm.stuNumber"></el-input>
</el-form-item>
</el-col>
</el-row>
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="姓名" prop="studentInfoList.1.stuName">
<el-input v-model="ruleForm.studentInfoList[1].stuName "></el-input>
</el-form-item>
<el-form-item style="width: 33%" label="性别" prop="studentInfoList.1.sex">
<el-select
v-model="ruleForm.studentInfoList[1].sex "
placeholder="学生性别"
clearable
>
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item style="width: 33%" label="专业" prop="studentInfoList.1.major">
<el-input v-model="ruleForm.studentInfoList[1].major "></el-input>
</el-form-item>
<el-form-item style="width: 33%" label="手机号" prop="studentInfoList.1.phoneNumber">
<el-input v-model="ruleForm.studentInfoList[1].phoneNumber "></el-input>
</el-form-item>
</div>
</div>
<!-- 参赛人信息3-->
<div class="kuang ">
<h2 class="tab_title tab_down_line">参赛人信息③</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="姓名" prop="stuName">
<el-input v-model="ruleForm.stuName"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="性别" prop="stuGender">
<el-select
v-model="ruleForm.stuGender"
placeholder="学生性别"
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="姓名" prop="studentInfoList.2.stuName">
<el-input v-model="ruleForm.studentInfoList[2].stuName "></el-input>
</el-form-item>
clearable
>
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="专业" prop="stuMajor">
<el-input v-model="ruleForm.stuMajor"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="手机号" prop="stuNumber">
<el-input v-model="ruleForm.stuNumber"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-form-item style="width: 33%" label="性别" prop="studentInfoList.2.sex">
<el-select
v-model="ruleForm.studentInfoList[2].sex "
placeholder="学生性别"
clearable
>
<el-option
v-for="dict in dict.type.sys_user_sex"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item style="width: 33%" label="专业" prop="studentInfoList.2.major">
<el-input v-model="ruleForm.studentInfoList[2].major "></el-input>
</el-form-item>
<el-form-item style="width: 33%" label="手机号" prop="studentInfoList.2.phoneNumber">
<el-input v-model="ruleForm.studentInfoList[2].phoneNumber "></el-input>
</el-form-item>
</div>
</div>
<!-- 盲样邮寄地址 -->
<div class="kuang">
<h2 class="tab_title tab_down_line">盲样邮寄地址</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="收件人" prop="sampleConcat">
<div style="display: flex;flex-wrap: wrap ">
<el-form-item style="width: 33%" label="收件人" prop="sampleConcat">
<el-input v-model="ruleForm.sampleConcat"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系电话" prop="sampleNumber">
<el-form-item style="width: 33%" label="联系电话" prop="sampleNumber">
<el-input v-model="ruleForm.sampleNumber"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="邮寄地址" prop="sampleAddress">
<el-form-item style="width: 33%" label="邮寄地址" prop="sampleAddress">
<el-input v-model="ruleForm.sampleAddress"></el-input>
</el-form-item>
</div>
</div>
<!-- 附件上传 -->
<div class="kuang">
<h2 class="tab_title tab_down_line">附件上传</h2>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="附件" prop="uploadFile">
<fileUpload :limit="1" :fileType="['doc','docx']" :isShowTip="false" v-model="ruleForm.uploadFile"></fileUpload>
<el-link href="/static/附件2_报名表.docx" type="primary">下载模版</el-link>
</el-form-item>
</el-col>
</el-row>
</div>
<!-- 提交按钮 -->
<div style="text-align: center">
<el-form-item>
@ -287,31 +286,22 @@
</el-form>
</div>
<!-- main -->
<div v-show="currentActive == 3" v-html="pageContext"></div>
<div v-for="(item, index) in nav " :key=index>
<div class="about-conts-item1" v-show="currentActive == index">
<div v-show="currentActive == 0 || currentActive == 1 " class="neirong" v-html="pageContext"></div>
</div>
</div>
<div v-show="currentActive == 2 " class="wrapbox">
<div v-show="currentActive == 0 || currentActive == 1 ||currentActive == 5 " v-html="pageContext"></div>
<div v-show="currentActive == 3 || currentActive == 4" class="wrapbox">
<div class="rsr" v-for="(item,index) in otherList" @click="goDeatail(item)" >
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
<div class="size-t">{{item.contentTitle}}</div>
</div>
</div>
<div v-show="currentActive == 4 " class="wrapbox">
<div class="newRsr" v-for="(item,index) in otherList" @click="goDeatail(item)" >
<img :src=" imgurl + item.contentImg" style="width: 255px;height: 220px">
<div class="size-t">{{item.contentTitle}}</div>
</div>
</div>
<div v-show="currentActive == 5 " class="wrapbox">
<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>
<div v-show="currentActive == 2 || currentActive == 4 || currentActive === 5" >
<div v-show="currentActive == 2 || currentActive == 4 || currentActive === 3" >
<page-util :category-id="categoryId" @event-message="handleDataFromPage" />
</div>
<div class="anniu" v-show="registerStatus == 1 && currentActive == 0" @click="toRegister" >
@ -341,7 +331,7 @@ export default {
SwiperSlide,
"page-util": PageUtil
},
dicts: ["sys_user_sex"],
dicts: ["sys_user_sex","school_name"],
name: 'HelloWorld',
data() {
@ -352,55 +342,62 @@ export default {
ruleForm: {
division: null,
schoolName: null,
collegeName:null,
teamName: null,
teachers: [
teacherInfoList: [
{
teacherName: null,
teacherJob: null,
teacherNumber: null,
teacherEmail: null,
teacherSchool: null
teacherSchool: null,
type:1
},
{
teacherName: null,
teacherJob: null,
teacherNumber: null,
teacherEmail: null,
teacherSchool: null
teacherSchool: null,
type:0
},
{
teacherName: null,
teacherJob: null,
teacherNumber: null,
teacherEmail: null,
teacherSchool: null
teacherSchool: null,
type:0
}
],
stuName: null,
stuGender: null,
stuMajor: null,
stuNumber: null,
leaderIds: [],
guideIds: [],
studentInfoList:[{
stuName:null,
sex:null,
major:null,
phoneNumber:null,
},{
stuName:null,
sex:null,
major:null,
phoneNumber:null,
},{
stuName:null,
sex:null,
major:null,
phoneNumber:null,
}],
sampleConcat: null,
sampleNumber: null,
sampleAddress: null
},
rules: {
stuName: [
{ required: true, message: "姓名不能为空", trigger: "blur" }
],
stuGender: [
{ required: true, message: "性别不能为空", trigger: "blur" }
],
stuMajor: [
{ required: true, message: "专业不能为空", trigger: "blur" }
],
stuNumber: [
{ required: true, message: "手机号不能为空", trigger: "blur" }
],
schoolName: [
{ required: true, message: "学校及院系名称不能为空", trigger: "blur" }
{ required: true, message: "学校名称不能为空", trigger: "blur" }
],
collegeName: [
{ required: true, message: "院系名称不能为空", trigger: "blur" }
],
division: [
{ required: true, message: "所属赛区不能为空", trigger: "blur" }
@ -417,6 +414,10 @@ export default {
sampleAddress: [
{ required: true, message: "邮寄地址不能为空", trigger: "blur" }
],
uploadFile: [
{ required: true, message: "附件必须上传", trigger: "blur" }
],
},
pageContext: '',
nav: [
@ -458,23 +459,38 @@ export default {
}
},
createRules(){
for (let i = 0; i < 3; i++){
this.rules[`teachers.${i}.teacherName`] = [
for (let i = 0; i < 2; i++){
this.rules[`teacherInfoList.${i}.teacherName`] = [
{required: true, message: '姓名不能为空', trigger: "blur"}
]
this.rules[`teachers.${i}.teacherJob`] = [
this.rules[`teacherInfoList.${i}.teacherJob`] = [
{required: true, message: '职务不能为空', trigger: "blur"}
]
this.rules[`teachers.${i}.teacherNumber`] = [
this.rules[`teacherInfoList.${i}.teacherNumber`] = [
{required: true, message: '电话不能为空', trigger: "blur"}
]
this.rules[`teachers.${i}.teacherEmail`] = [
this.rules[`teacherInfoList.${i}.teacherEmail`] = [
{required: true, message: 'mail不能为空', trigger: "blur"}
]
this.rules[`teachers.${i}.teacherSchool`] = [
this.rules[`teacherInfoList.${i}.teacherSchool`] = [
{required: true, message: '所在系及专业不能为空', trigger: "blur"}
]
}
for (let i = 0; i < 3; i++){
this.rules[`studentInfoList.${i}.stuName`] = [
{required: true, message: '姓名不能为空', trigger: "blur"}
]
this.rules[`studentInfoList.${i}.sex`] = [
{required: true, message: '性别不能为空', trigger: "blur"}
]
this.rules[`studentInfoList.${i}.major`] = [
{required: true, message: '专业不能为空', trigger: "blur"}
]
this.rules[`studentInfoList.${i}.phoneNumber`] = [
{required: true, message: '手机号不能为空', trigger: "blur"}
]
}
},
//
getCurrentActive(value) {
@ -485,9 +501,7 @@ export default {
this.currentActive = value
this.categoryId = ""
if (value === 5){
this.categoryId = this.getNoticeId()
}else if (value === 0 || value === 1 || value === 3) {
if (value === 0 || value === 1 || value === 5) {
this.pageContext = ""
this.getContentDetail()
}else{
@ -524,33 +538,28 @@ export default {
})
},
handleDataFromPage(data){
if (this.currentActive === 2 || this.currentActive == 4){
if (this.currentActive === 3 || this.currentActive == 4){
this.otherList = data
}
if (this.currentActive === 5){
if (this.currentActive === 2){
this.noticeList = data
}
},
toRegister(){
if (this.registerStatus === '1') this.currentActive = 6;
},
downloadFile(fileName){
console.log("尝试下载文件...");
const attachmentUrl = "/static/"+fileName;
},
submitForm(){
this.$refs["form"].validate(valid => {
if (valid){
const leader = this.ruleForm.teachers[0]
const guides = this.ruleForm.teachers.slice(1)
addTeacher(leader).then(res => {
this.ruleForm.leaderIds.push(res.data)
})
guides.forEach(item => {
addTeacher(item).then(res => {
this.ruleForm.guideIds.push(res.data)
})
})
register(this.ruleForm).then(res => {
if (res.code === 200){
this.reset();
this.$modal.msgSuccess("报名成功")
this.$modal.msgSuccess("报名提交成功,请等待公告通知")
}else (
this.$modal.msgError("报名失败")
)
@ -564,8 +573,9 @@ export default {
this.ruleForm = {
division: null,
schoolName: null,
collegeName: null,
teamName: null,
teachers: [
teacherInfoList: [
{
teacherName: null,
teacherJob: null,