完成报名模块,优化了部分模块的代码
This commit is contained in:
parent
f612d41347
commit
77bdc1809a
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"la_course_type": [
|
||||
{
|
||||
"id" : 1,
|
||||
"type_name" : "公共基础课",
|
||||
"description" : "",
|
||||
"sort_order" : 2,
|
||||
"create_time" : 1763519631
|
||||
},
|
||||
{
|
||||
"id" : 3,
|
||||
"type_name" : "选修课",
|
||||
"description" : "",
|
||||
"sort_order" : 5,
|
||||
"create_time" : 1763519643
|
||||
},
|
||||
{
|
||||
"id" : 4,
|
||||
"type_name" : "实践课程",
|
||||
"description" : "",
|
||||
"sort_order" : 3,
|
||||
"create_time" : 1763519649
|
||||
},
|
||||
{
|
||||
"id" : 5,
|
||||
"type_name" : "通识教育课",
|
||||
"description" : "",
|
||||
"sort_order" : 13,
|
||||
"create_time" : 1763519655
|
||||
},
|
||||
{
|
||||
"id" : 14,
|
||||
"type_name" : "专业课",
|
||||
"description" : "",
|
||||
"sort_order" : 4,
|
||||
"create_time" : 1763971765
|
||||
}
|
||||
]}
|
||||
|
|
@ -0,0 +1,443 @@
|
|||
{
|
||||
"la_major": [
|
||||
{
|
||||
"id" : 1,
|
||||
"major_code" : "TESTSQM",
|
||||
"major_name" : "剑气操控",
|
||||
"major_english_name" : "Sword Qi Manipulation",
|
||||
"college_id" : 1,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 0,
|
||||
"update_time" : 1762936107,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 7,
|
||||
"major_code" : "TESTSFL",
|
||||
"major_name" : "御剑飞行",
|
||||
"major_english_name" : "Sword Flight",
|
||||
"college_id" : 1,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762936167,
|
||||
"update_time" : 1762936167,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 8,
|
||||
"major_code" : "TESTSAC",
|
||||
"major_name" : "剑阵合击",
|
||||
"major_english_name" : "Synergy and Combat",
|
||||
"college_id" : 1,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762936264,
|
||||
"update_time" : 1762936264,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 9,
|
||||
"major_code" : "TESTHSC",
|
||||
"major_name" : "心剑蕴养",
|
||||
"major_english_name" : "Heart Sword Cultivation",
|
||||
"college_id" : 1,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762937878,
|
||||
"update_time" : 1762937878,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 10,
|
||||
"major_code" : "TESTSBP",
|
||||
"major_name" : "灵植药理",
|
||||
"major_english_name" : "Spiritual Botanicals and Pharmacology",
|
||||
"college_id" : 2,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996259,
|
||||
"update_time" : 1762996259,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 11,
|
||||
"major_code" : "TESTAFC",
|
||||
"major_name" : "火候掌控",
|
||||
"major_english_name" : "Art of Fire Control",
|
||||
"college_id" : 2,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996321,
|
||||
"update_time" : 1762996321,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 12,
|
||||
"major_code" : "TESTAFD",
|
||||
"major_name" : "丹方推演",
|
||||
"major_english_name" : "Alchemical Formulation and Deduction",
|
||||
"college_id" : 2,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996353,
|
||||
"update_time" : 1762996353,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 13,
|
||||
"major_code" : "TESTTAA",
|
||||
"major_name" : "毒理解毒",
|
||||
"major_english_name" : "Toxin Theory and Antidote Formulation",
|
||||
"college_id" : 2,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996426,
|
||||
"update_time" : 1762996426,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 14,
|
||||
"major_code" : "TESTSCA",
|
||||
"major_name" : "符文书画",
|
||||
"major_english_name" : "Sigil Calligraphy and Art",
|
||||
"college_id" : 3,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996457,
|
||||
"update_time" : 1762996457,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 15,
|
||||
"major_code" : "TESTSFC",
|
||||
"major_name" : "灵力导引",
|
||||
"major_english_name" : "Spiritual Force Channeling",
|
||||
"college_id" : 3,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996507,
|
||||
"update_time" : 1762996507,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 16,
|
||||
"major_code" : "TESTISA",
|
||||
"major_name" : "瞬发符篆",
|
||||
"major_english_name" : "Instant Sigil Activation",
|
||||
"college_id" : 3,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996546,
|
||||
"update_time" : 1762996546,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 17,
|
||||
"major_code" : "TESTCTA",
|
||||
"major_name" : "组合符阵",
|
||||
"major_english_name" : "Composite Talisman Arrays",
|
||||
"college_id" : 3,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996575,
|
||||
"update_time" : 1762996575,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 18,
|
||||
"major_code" : "TESTSOI",
|
||||
"major_name" : "灵矿辨识",
|
||||
"major_english_name" : "Spiritual Ore Identification",
|
||||
"college_id" : 4,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996610,
|
||||
"update_time" : 1762996610,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 19,
|
||||
"major_code" : "TESTARI",
|
||||
"major_name" : "阵法篆刻",
|
||||
"major_english_name" : "Array Inscription",
|
||||
"college_id" : 4,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996684,
|
||||
"update_time" : 1762996684,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 20,
|
||||
"major_code" : "TESTAPC",
|
||||
"major_name" : "法宝个性化定制",
|
||||
"major_english_name" : "Artifact Personalization and Customization",
|
||||
"college_id" : 4,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996714,
|
||||
"update_time" : 1762996714,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 21,
|
||||
"major_code" : "TESTPAA",
|
||||
"major_name" : "傀儡机关术",
|
||||
"major_english_name" : "Puppetry and Artifice",
|
||||
"college_id" : 4,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996736,
|
||||
"update_time" : 1762996736,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 22,
|
||||
"major_code" : "TESTFDF",
|
||||
"major_name" : "基础阵法",
|
||||
"major_english_name" : "Fundamental Formations",
|
||||
"college_id" : 5,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996764,
|
||||
"update_time" : 1762996764,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 23,
|
||||
"major_code" : "TESTEKA",
|
||||
"major_name" : "困杀大阵",
|
||||
"major_english_name" : "Entrapment and Killing Arrays",
|
||||
"college_id" : 5,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996791,
|
||||
"update_time" : 1762996791,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 24,
|
||||
"major_code" : "TESTSPA",
|
||||
"major_name" : "空间阵法",
|
||||
"major_english_name" : "Spatial Arrays",
|
||||
"college_id" : 5,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996823,
|
||||
"update_time" : 1763516930,
|
||||
"delete_time" : null
|
||||
},
|
||||
{
|
||||
"id" : 25,
|
||||
"major_code" : "TESTSDN",
|
||||
"major_name" : "护宗大阵设计与维护",
|
||||
"major_english_name" : "Sect Protection Arrays: Design and Maintenance",
|
||||
"college_id" : 5,
|
||||
"major_type" : 1,
|
||||
"discipline_category" : "",
|
||||
"study_duration" : 4,
|
||||
"major_description" : "",
|
||||
"credit_requirement" : 0.00,
|
||||
"established_year" : 0,
|
||||
"student_count" : 0,
|
||||
"director_id" : 0,
|
||||
"contact_phone" : "",
|
||||
"enrollment_status" : 1,
|
||||
"major_status" : 1,
|
||||
"sort_order" : 0,
|
||||
"create_time" : 1762996859,
|
||||
"update_time" : 1763516927,
|
||||
"delete_time" : null
|
||||
}
|
||||
]}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -66,4 +66,19 @@ public class ClassController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "矫正班级人数")
|
||||
@ApiOperation(value = "矫正班级人数")
|
||||
@PostMapping("/check")
|
||||
public AjaxResult<Object> check(@Validated @RequestBody IdValidate idValidate){
|
||||
iClassService.check(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "矫正所有班级人数")
|
||||
@ApiOperation(value = "矫正所有班级人数")
|
||||
@PostMapping("/check.all")
|
||||
public AjaxResult<Object> checkAll(){
|
||||
iClassService.checkAll();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,20 +18,22 @@ import org.springframework.validation.annotation.Validated;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("adminapi/version")
|
||||
@Api(tags = "培养方案版本管理")
|
||||
@Api(tags = "培养方案版本管理", value = "每个专业至少会有一个版本,同时有且只有一个“当前启用版本”")
|
||||
public class CurriculumVersionController {
|
||||
|
||||
@Resource
|
||||
ICurriculumVersionService iCurriculumVersionService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="培养方案版本列表")
|
||||
public AjaxResult<PageResult<CurriculumVersionListedVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated CurriculumVersionSearchValidate searchValidate) {
|
||||
PageResult<CurriculumVersionListedVo> list = iCurriculumVersionService.list(pageValidate, searchValidate);
|
||||
@ApiOperation(
|
||||
value="培养方案版本列表",
|
||||
notes = "访问时必须带有专业id,若专业id存在,但版本不存在,会创建一个空的版本,并且设置为“当前启用”")
|
||||
public AjaxResult<List<CurriculumVersionListedVo>> list(@Validated CurriculumVersionSearchValidate searchValidate) {
|
||||
List<CurriculumVersionListedVo> list = iCurriculumVersionService.list(searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +46,7 @@ public class CurriculumVersionController {
|
|||
|
||||
@Log(title = "培养方案版本新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="培养方案版本新增")
|
||||
@ApiOperation(value="培养方案版本新增",notes = "若将该版本设为“当前版本”,则其同专业版本会自动设置为“非当前版本”")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody CurriculumVersionCreateValidate createValidate) {
|
||||
iCurriculumVersionService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
|
|
@ -52,7 +54,7 @@ public class CurriculumVersionController {
|
|||
|
||||
@Log(title = "培养方案版本编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="培养方案版本编辑")
|
||||
@ApiOperation(value="培养方案版本编辑",notes = "若将该版本设为“当前版本”,则其同专业版本会自动设置为“非当前版本”")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody CurriculumVersionUpdateValidate updateValidate) {
|
||||
iCurriculumVersionService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
|
|
@ -60,10 +62,11 @@ public class CurriculumVersionController {
|
|||
|
||||
@Log(title = "培养方案版本删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="培养方案版本删除")
|
||||
@ApiOperation(
|
||||
value="培养方案版本删除",
|
||||
notes = "不可删除正在使用的版本。删除是逻辑删除,后续可以做撤销删除。因为版本被逻辑删除了,所以也相当于其中的方案也被逻辑删除了。")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iCurriculumVersionService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
return iCurriculumVersionService.del(idValidate.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,9 @@ public class MajorCurriculumController {
|
|||
IMajorCurriculumService iMajorCurriculumService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="专业培养计划列表")
|
||||
@ApiOperation(
|
||||
value = "专业培养计划列表",
|
||||
notes = "访问该表的前提是要有专业ID和版本ID和修读学期,“版本管理”会保证每个培养计划表默认存在至少1个版本")
|
||||
public AjaxResult<PageResult<MajorCurriculumListedVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated MajorCurriculumSearchValidate searchValidate) {
|
||||
PageResult<MajorCurriculumListedVo> list = iMajorCurriculumService.list(pageValidate, searchValidate);
|
||||
|
|
@ -44,7 +46,7 @@ public class MajorCurriculumController {
|
|||
|
||||
@Log(title = "专业培养计划新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="专业培养计划新增")
|
||||
@ApiOperation(value="专业培养计划新增",notes = "若新增培养计划参数只携带专业id而没有带版本,会添加到“当前启用”版本")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody MajorCurriculumCreateValidate createValidate) {
|
||||
iMajorCurriculumService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,69 @@
|
|||
package com.mdd.admin.controller;
|
||||
|
||||
import com.mdd.admin.aop.Log;
|
||||
import com.mdd.admin.service.IStudentBaseInfoService;
|
||||
import com.mdd.admin.validate.commons.IdValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoUpdateValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoSearchValidate;
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.vo.StudentBaseInfoListedVo;
|
||||
import com.mdd.admin.vo.StudentBaseInfoDetailVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("adminapi/stuBaseInfo")
|
||||
@Api(tags = "学生基本信息管理")
|
||||
public class StudentBaseInfoController {
|
||||
|
||||
@Resource
|
||||
IStudentBaseInfoService iStudentBaseInfoService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="学生基本信息列表")
|
||||
public AjaxResult<PageResult<StudentBaseInfoListedVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated StudentBaseInfoSearchValidate searchValidate) {
|
||||
PageResult<StudentBaseInfoListedVo> list = iStudentBaseInfoService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="学生基本信息详情")
|
||||
public AjaxResult<StudentBaseInfoDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
StudentBaseInfoDetailVo detail = iStudentBaseInfoService.detail(id);
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
@Log(title = "学生基本信息新增")
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value="学生基本信息新增")
|
||||
public AjaxResult<Object> add(@Validated @RequestBody StudentBaseInfoCreateValidate createValidate) {
|
||||
iStudentBaseInfoService.add(createValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "学生基本信息编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="学生基本信息编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody StudentBaseInfoUpdateValidate updateValidate) {
|
||||
iStudentBaseInfoService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "学生基本信息删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="学生基本信息删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iStudentBaseInfoService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
package com.mdd.admin.controller;
|
||||
|
||||
import com.mdd.admin.aop.Log;
|
||||
import com.mdd.admin.service.IStudentRegistrationService;
|
||||
import com.mdd.admin.validate.commons.IdValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationUpdateValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationSearchValidate;
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.vo.StudentRegistrationListedVo;
|
||||
import com.mdd.admin.vo.StudentRegistrationDetailVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("adminapi/stuRegistration")
|
||||
@Api(tags = "学生注册状态管理")
|
||||
public class StudentRegistrationController {
|
||||
|
||||
@Resource
|
||||
IStudentRegistrationService iStudentRegistrationService;
|
||||
|
||||
@GetMapping("/list")
|
||||
@ApiOperation(value="学生注册状态列表")
|
||||
public AjaxResult<PageResult<StudentRegistrationListedVo>> list(@Validated PageValidate pageValidate,
|
||||
@Validated StudentRegistrationSearchValidate searchValidate) {
|
||||
PageResult<StudentRegistrationListedVo> list = iStudentRegistrationService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list.registration")
|
||||
@ApiOperation(value = "学生报名信息待审核列表")
|
||||
public AjaxResult<PageResult<StudentRegistrationListedVo>> listRegistration(
|
||||
@Validated PageValidate pageValidate,
|
||||
@Validated StudentRegistrationSearchValidate searchValidate){
|
||||
searchValidate.setApprovalStatus(0);
|
||||
PageResult<StudentRegistrationListedVo> list = iStudentRegistrationService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list.admission")
|
||||
@ApiOperation(value = "学生待录取列表")
|
||||
public AjaxResult<PageResult<StudentRegistrationListedVo>> listAdmission(
|
||||
@Validated PageValidate pageValidate,
|
||||
@Validated StudentRegistrationSearchValidate searchValidate){
|
||||
searchValidate.setApprovalStatus(1);
|
||||
searchValidate.setAdmissionStatus(0);
|
||||
PageResult<StudentRegistrationListedVo> list = iStudentRegistrationService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list.payment")
|
||||
@ApiOperation(value = "学生待缴费列表")
|
||||
public AjaxResult<PageResult<StudentRegistrationListedVo>> listPayment(
|
||||
@Validated PageValidate pageValidate,
|
||||
@Validated StudentRegistrationSearchValidate searchValidate){
|
||||
searchValidate.setApprovalStatus(1);
|
||||
searchValidate.setAdmissionStatus(1);
|
||||
searchValidate.setApprovalStatus(0);
|
||||
PageResult<StudentRegistrationListedVo> list = iStudentRegistrationService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/list.enrollment")
|
||||
@ApiOperation(value = "学生待入学列表")
|
||||
public AjaxResult<PageResult<StudentRegistrationListedVo>> listEnrollment(
|
||||
@Validated PageValidate pageValidate,
|
||||
@Validated StudentRegistrationSearchValidate searchValidate){
|
||||
searchValidate.setApprovalStatus(1);
|
||||
searchValidate.setAdmissionStatus(1);
|
||||
searchValidate.setApprovalStatus(1);
|
||||
searchValidate.setRegistrationStatus(0);
|
||||
PageResult<StudentRegistrationListedVo> list = iStudentRegistrationService.list(pageValidate, searchValidate);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/detail")
|
||||
@ApiOperation(value="学生注册状态详情")
|
||||
public AjaxResult<StudentRegistrationDetailVo> detail(@Validated @IDMust() @RequestParam("id") Integer id) {
|
||||
StudentRegistrationDetailVo detail = iStudentRegistrationService.detail(id);
|
||||
return AjaxResult.success(detail);
|
||||
}
|
||||
|
||||
@Log(title = "学生注册状态编辑")
|
||||
@PostMapping("/edit")
|
||||
@ApiOperation(value="学生注册状态编辑")
|
||||
public AjaxResult<Object> edit(@Validated @RequestBody StudentRegistrationUpdateValidate updateValidate) {
|
||||
iStudentRegistrationService.edit(updateValidate);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "学生注册状态删除")
|
||||
@PostMapping("/del")
|
||||
@ApiOperation(value="学生注册状态删除")
|
||||
public AjaxResult<Object> del(@Validated @RequestBody IdValidate idValidate) {
|
||||
iStudentRegistrationService.del(idValidate.getId());
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Log(title = "随机报名信息生成")
|
||||
@PostMapping("/genreginfo")
|
||||
@ApiOperation(value = "随机报名信息生成", notes = "参数num为要生成的数量")
|
||||
public AjaxResult<Object> genRegInfo(Integer num) {
|
||||
iStudentRegistrationService.genRegInfo(num);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
|
@ -49,13 +49,6 @@ public class TeacherCourseController {
|
|||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
// @Log(title = "教师可授课程编辑")
|
||||
// @PostMapping("/edit")
|
||||
// @ApiOperation(value="教师可授课程编辑")
|
||||
// public AjaxResult<Object> edit(@Validated @RequestBody TeacherCourseUpdateValidate updateValidate) {
|
||||
// iTeacherCourseService.edit(updateValidate);
|
||||
// return AjaxResult.success();
|
||||
// }
|
||||
|
||||
@Log(title = "教师可授课程删除")
|
||||
@PostMapping("/del")
|
||||
|
|
|
|||
|
|
@ -57,4 +57,13 @@ public interface IClassService {
|
|||
*/
|
||||
void del(Integer id);
|
||||
|
||||
/**
|
||||
* 班级删除
|
||||
*
|
||||
* @author LikeAdmin
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void check(Integer id);
|
||||
|
||||
void checkAll();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,11 @@ import com.mdd.admin.validate.major.CurriculumVersionUpdateValidate;
|
|||
import com.mdd.admin.validate.major.CurriculumVersionSearchValidate;
|
||||
import com.mdd.admin.vo.major.CurriculumVersionListedVo;
|
||||
import com.mdd.admin.vo.major.CurriculumVersionDetailVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 培养方案版本服务接口类
|
||||
* @author gyp
|
||||
|
|
@ -18,11 +21,10 @@ public interface ICurriculumVersionService {
|
|||
* 培养方案版本列表
|
||||
*
|
||||
* @author gyp
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<CurriculumVersionListedVo>
|
||||
*/
|
||||
PageResult<CurriculumVersionListedVo> list(PageValidate pageValidate, CurriculumVersionSearchValidate searchValidate);
|
||||
List<CurriculumVersionListedVo> list(CurriculumVersionSearchValidate searchValidate);
|
||||
|
||||
/**
|
||||
* 培养方案版本详情
|
||||
|
|
@ -55,6 +57,6 @@ public interface ICurriculumVersionService {
|
|||
* @author gyp
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void del(Integer id);
|
||||
AjaxResult<Object> del(Integer id);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
package com.mdd.admin.service;
|
||||
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoUpdateValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoSearchValidate;
|
||||
import com.mdd.admin.vo.StudentBaseInfoListedVo;
|
||||
import com.mdd.admin.vo.StudentBaseInfoDetailVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
|
||||
/**
|
||||
* 学生基本信息服务接口类
|
||||
* @author gyp
|
||||
*/
|
||||
public interface IStudentBaseInfoService {
|
||||
|
||||
/**
|
||||
* 学生基本信息列表
|
||||
*
|
||||
* @author gyp
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<StudentBaseInfoListedVo>
|
||||
*/
|
||||
PageResult<StudentBaseInfoListedVo> list(PageValidate pageValidate, StudentBaseInfoSearchValidate searchValidate);
|
||||
|
||||
/**
|
||||
* 学生基本信息详情
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键ID
|
||||
* @return StudentBaseInfoDetailVo
|
||||
*/
|
||||
StudentBaseInfoDetailVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 学生基本信息新增
|
||||
*
|
||||
* @author gyp
|
||||
* @param createValidate 参数
|
||||
*/
|
||||
void add(StudentBaseInfoCreateValidate createValidate);
|
||||
|
||||
/**
|
||||
* 学生基本信息编辑
|
||||
*
|
||||
* @author gyp
|
||||
* @param updateValidate 参数
|
||||
*/
|
||||
void edit(StudentBaseInfoUpdateValidate updateValidate);
|
||||
|
||||
/**
|
||||
* 学生基本信息删除
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.mdd.admin.service;
|
||||
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationCreateValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationUpdateValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationSearchValidate;
|
||||
import com.mdd.admin.vo.StudentRegistrationListedVo;
|
||||
import com.mdd.admin.vo.StudentRegistrationDetailVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
|
||||
/**
|
||||
* 学生注册状态服务接口类
|
||||
* @author gyp
|
||||
*/
|
||||
public interface IStudentRegistrationService {
|
||||
|
||||
/**
|
||||
* 学生注册状态列表
|
||||
*
|
||||
* @author gyp
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<StudentRegistrationListedVo>
|
||||
*/
|
||||
PageResult<StudentRegistrationListedVo> list(PageValidate pageValidate, StudentRegistrationSearchValidate searchValidate);
|
||||
|
||||
/**
|
||||
* 学生注册状态详情
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键ID
|
||||
* @return StudentRegistrationDetailVo
|
||||
*/
|
||||
StudentRegistrationDetailVo detail(Integer id);
|
||||
|
||||
/**
|
||||
* 学生注册状态新增
|
||||
*
|
||||
* @author gyp
|
||||
* @param createValidate 参数
|
||||
*/
|
||||
void add(StudentRegistrationCreateValidate createValidate);
|
||||
|
||||
/**
|
||||
* 学生注册状态编辑
|
||||
*
|
||||
* @author gyp
|
||||
* @param updateValidate 参数
|
||||
*/
|
||||
void edit(StudentRegistrationUpdateValidate updateValidate);
|
||||
|
||||
/**
|
||||
* 学生注册状态删除
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键ID
|
||||
*/
|
||||
void del(Integer id);
|
||||
|
||||
void genRegInfo(Integer num);
|
||||
}
|
||||
|
|
@ -14,9 +14,11 @@ import com.mdd.common.core.PageResult;
|
|||
import com.mdd.common.entity.Class;
|
||||
import com.mdd.common.entity.College;
|
||||
import com.mdd.common.entity.Major;
|
||||
import com.mdd.common.entity.StudentInfo;
|
||||
import com.mdd.common.mapper.ClassMapper;
|
||||
import com.mdd.common.mapper.CollegeMapper;
|
||||
import com.mdd.common.mapper.MajorMapper;
|
||||
import com.mdd.common.mapper.StudentInfoMapper;
|
||||
import com.mdd.common.util.TimeUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -39,6 +41,8 @@ public class ClassServiceImpl implements IClassService {
|
|||
private CollegeMapper collegeMapper;
|
||||
@Autowired
|
||||
private MajorMapper majorMapper;
|
||||
@Autowired
|
||||
private StudentInfoMapper studentInfoMapper;
|
||||
|
||||
/**
|
||||
* 班级列表
|
||||
|
|
@ -179,4 +183,31 @@ public class ClassServiceImpl implements IClassService {
|
|||
classMapper.delete(new QueryWrapper<Class>().eq("id", id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void check(Integer id) {
|
||||
Class model = classMapper.selectOne(
|
||||
new QueryWrapper<Class>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
// 查询该班级学生人数
|
||||
QueryWrapper<StudentInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("class_id", id);
|
||||
List<StudentInfo> list = studentInfoMapper.selectList(queryWrapper);
|
||||
model.setStudentCount(list.size());
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
classMapper.updateById(model);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkAll() {
|
||||
// 获取所有班级id
|
||||
List<Class> list = classMapper.selectList(null);
|
||||
for (Class model : list) {
|
||||
check(model.getId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,15 +10,19 @@ import com.mdd.admin.validate.major.CurriculumVersionUpdateValidate;
|
|||
import com.mdd.admin.validate.major.CurriculumVersionSearchValidate;
|
||||
import com.mdd.admin.vo.major.CurriculumVersionListedVo;
|
||||
import com.mdd.admin.vo.major.CurriculumVersionDetailVo;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.CurriculumVersion;
|
||||
import com.mdd.common.mapper.CurriculumVersionMapper;
|
||||
import com.mdd.common.mapper.MajorMapper;
|
||||
import com.mdd.common.util.TimeUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -30,22 +34,23 @@ public class CurriculumVersionServiceImpl implements ICurriculumVersionService {
|
|||
|
||||
@Resource
|
||||
CurriculumVersionMapper curriculumVersionMapper;
|
||||
@Autowired
|
||||
private MajorMapper majorMapper;
|
||||
|
||||
/**
|
||||
* 培养方案版本列表
|
||||
*
|
||||
* @author gyp
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<CurriculumVersionListedVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<CurriculumVersionListedVo> list(PageValidate pageValidate, CurriculumVersionSearchValidate searchValidate) {
|
||||
Integer page = pageValidate.getPage_no();
|
||||
Integer limit = pageValidate.getPage_size();
|
||||
public List<CurriculumVersionListedVo> list(CurriculumVersionSearchValidate searchValidate) {
|
||||
Integer majorId = searchValidate.getMajorId();
|
||||
if(!majorExist(majorId)) throw new RuntimeException("该专业不存在");
|
||||
|
||||
QueryWrapper<CurriculumVersion> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.orderByDesc("id");
|
||||
queryWrapper.orderByDesc("id").isNull("delete_time");
|
||||
|
||||
curriculumVersionMapper.setSearch(queryWrapper, searchValidate, new String[]{
|
||||
"=:majorId@major_id:int",
|
||||
|
|
@ -54,18 +59,38 @@ public class CurriculumVersionServiceImpl implements ICurriculumVersionService {
|
|||
"=:isCurrent@is_current:int",
|
||||
});
|
||||
|
||||
IPage<CurriculumVersion> iPage = curriculumVersionMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||
|
||||
List<CurriculumVersionListedVo> list = new LinkedList<>();
|
||||
for(CurriculumVersion item : iPage.getRecords()) {
|
||||
List<CurriculumVersionListedVo> listVo = new LinkedList<>();
|
||||
List<CurriculumVersion> list = curriculumVersionMapper.selectList(queryWrapper);
|
||||
// 若查找不到版本,新建版本
|
||||
if(list.isEmpty()) {
|
||||
CurriculumVersionCreateValidate createValidate = new CurriculumVersionCreateValidate();
|
||||
createValidate.setMajorId(majorId);
|
||||
createValidate.setVersionCode("Default");
|
||||
createValidate.setVersionName("默认");
|
||||
createValidate.setIsCurrent(1); // 设置为当前启用
|
||||
add(createValidate);
|
||||
QueryWrapper<CurriculumVersion> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("major_id", majorId);
|
||||
CurriculumVersion newVersion = curriculumVersionMapper.selectOne(queryWrapper2);
|
||||
CurriculumVersionListedVo newVersionVo = new CurriculumVersionListedVo();
|
||||
BeanUtils.copyProperties(newVersion, newVersionVo);
|
||||
listVo.add(newVersionVo);
|
||||
}
|
||||
else {
|
||||
for (CurriculumVersion item : list) {
|
||||
CurriculumVersionListedVo vo = new CurriculumVersionListedVo();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(item.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(item.getUpdateTime()));
|
||||
list.add(vo);
|
||||
listVo.add(vo);
|
||||
}
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
return listVo;
|
||||
}
|
||||
|
||||
private boolean majorExist(@NotNull(message = "专业ID不能为空") Integer majorId) {
|
||||
return majorMapper.selectById(majorId)!=null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -98,14 +123,19 @@ public class CurriculumVersionServiceImpl implements ICurriculumVersionService {
|
|||
@Override
|
||||
public void add(CurriculumVersionCreateValidate createValidate) {
|
||||
CurriculumVersion model = new CurriculumVersion();
|
||||
model.setMajorId(createValidate.getMajorId());
|
||||
model.setVersionName(createValidate.getVersionName());
|
||||
model.setVersionCode(createValidate.getVersionCode());
|
||||
model.setDescription(createValidate.getDescription());
|
||||
model.setIsCurrent(createValidate.getIsCurrent());
|
||||
BeanUtils.copyProperties(createValidate, model);
|
||||
model.setIsCurrent(0); // 默认设置为“非当前版本”
|
||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
curriculumVersionMapper.insert(model);
|
||||
|
||||
// 若将新版本设置为“当前版本”,则调用edit修改新版本为“当前版本”
|
||||
if(createValidate.getIsCurrent() != null && createValidate.getIsCurrent() == 1) {
|
||||
CurriculumVersionUpdateValidate updateValidate = new CurriculumVersionUpdateValidate();
|
||||
BeanUtils.copyProperties(model, updateValidate);
|
||||
updateValidate.setIsCurrent(1);
|
||||
edit(updateValidate);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -123,12 +153,27 @@ public class CurriculumVersionServiceImpl implements ICurriculumVersionService {
|
|||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setId(updateValidate.getId());
|
||||
model.setMajorId(updateValidate.getMajorId());
|
||||
model.setVersionName(updateValidate.getVersionName());
|
||||
model.setVersionCode(updateValidate.getVersionCode());
|
||||
model.setDescription(updateValidate.getDescription());
|
||||
model.setIsCurrent(updateValidate.getIsCurrent());
|
||||
if(model.getIsCurrent() == 1 && updateValidate.getIsCurrent() == 0) {
|
||||
throw new RuntimeException("至少存在一个“当前版本”");
|
||||
}
|
||||
|
||||
BeanUtils.copyProperties(updateValidate, model);
|
||||
// 若要将当前版本设置为“当前版本”,在启用修改前,先将该专业方案其他版本修改为“非当前版本”
|
||||
Integer isCurrent = updateValidate.getIsCurrent();
|
||||
if(isCurrent != null && isCurrent == 1) {
|
||||
// 查找当前专业方案的“当前版本”
|
||||
QueryWrapper<CurriculumVersion> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("major_id", model.getMajorId()).eq("is_current", 1);
|
||||
CurriculumVersion curVersion = curriculumVersionMapper.selectOne(queryWrapper);
|
||||
// 修改该版本为“非当前版本”
|
||||
if(curVersion != null) {
|
||||
curVersion.setIsCurrent(0);
|
||||
curVersion.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
curriculumVersionMapper.updateById(curVersion);
|
||||
}
|
||||
|
||||
}
|
||||
// 继续对当前版本的修改
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
curriculumVersionMapper.updateById(model);
|
||||
}
|
||||
|
|
@ -140,15 +185,19 @@ public class CurriculumVersionServiceImpl implements ICurriculumVersionService {
|
|||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
public AjaxResult<Object> del(Integer id) {
|
||||
CurriculumVersion model = curriculumVersionMapper.selectOne(
|
||||
new QueryWrapper<CurriculumVersion>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
curriculumVersionMapper.delete(new QueryWrapper<CurriculumVersion>().eq("id", id));
|
||||
if(model.getIsCurrent() == 1) {
|
||||
return AjaxResult.failed("不可删除使用中的版本");
|
||||
}
|
||||
model.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
curriculumVersionMapper.updateById(model);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,14 +11,8 @@ import com.mdd.admin.validate.major.MajorCurriculumSearchValidate;
|
|||
import com.mdd.admin.vo.major.MajorCurriculumListedVo;
|
||||
import com.mdd.admin.vo.major.MajorCurriculumDetailVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.Course;
|
||||
import com.mdd.common.entity.CurriculumVersion;
|
||||
import com.mdd.common.entity.Major;
|
||||
import com.mdd.common.entity.MajorCurriculum;
|
||||
import com.mdd.common.mapper.CourseMapper;
|
||||
import com.mdd.common.mapper.CurriculumVersionMapper;
|
||||
import com.mdd.common.mapper.MajorCurriculumMapper;
|
||||
import com.mdd.common.mapper.MajorMapper;
|
||||
import com.mdd.common.entity.*;
|
||||
import com.mdd.common.mapper.*;
|
||||
import com.mdd.common.util.TimeUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -43,6 +37,8 @@ public class MajorCurriculumServiceImpl implements IMajorCurriculumService {
|
|||
private CourseMapper courseMapper;
|
||||
@Autowired
|
||||
private CurriculumVersionMapper curriculumVersionMapper;
|
||||
@Autowired
|
||||
private CourseTypeMapper courseTypeMapper;
|
||||
|
||||
/**
|
||||
* 专业培养计划列表
|
||||
|
|
@ -63,6 +59,7 @@ public class MajorCurriculumServiceImpl implements IMajorCurriculumService {
|
|||
majorCurriculumMapper.setSearch(queryWrapper, searchValidate, new String[]{
|
||||
"=:versionId@version_id:int",
|
||||
"=:majorId@major_id:int",
|
||||
"=:semester@semester:int",
|
||||
"=:courseId@course_id:int",
|
||||
"=:credits:str",
|
||||
"=:assessmentType@assessment_type:int",
|
||||
|
|
@ -82,6 +79,8 @@ public class MajorCurriculumServiceImpl implements IMajorCurriculumService {
|
|||
vo.setMajorName(major.getMajorName());
|
||||
Course course = courseMapper.selectById(vo.getCourseId());
|
||||
vo.setCourseName(course.getCourseName());
|
||||
CourseType courseType = courseTypeMapper.selectById(vo.getCourseType());
|
||||
vo.setCourseTypeName(courseType.getTypeName());
|
||||
CurriculumVersion curriculumVersion = curriculumVersionMapper.selectById(vo.getVersionId());
|
||||
vo.setVersionName(curriculumVersion.getVersionName());
|
||||
vo.setVersionCode(curriculumVersion.getVersionCode());
|
||||
|
|
@ -115,6 +114,8 @@ public class MajorCurriculumServiceImpl implements IMajorCurriculumService {
|
|||
vo.setMajorName(major.getMajorName());
|
||||
Course course = courseMapper.selectById(vo.getCourseId());
|
||||
vo.setCourseName(course.getCourseName());
|
||||
CourseType courseType = courseTypeMapper.selectById(vo.getCourseType());
|
||||
vo.setCourseTypeName(courseType.getTypeName());
|
||||
CurriculumVersion curriculumVersion = curriculumVersionMapper.selectById(vo.getVersionId());
|
||||
vo.setVersionName(curriculumVersion.getVersionName());
|
||||
vo.setVersionCode(curriculumVersion.getVersionCode());
|
||||
|
|
@ -131,17 +132,7 @@ public class MajorCurriculumServiceImpl implements IMajorCurriculumService {
|
|||
@Override
|
||||
public void add(MajorCurriculumCreateValidate createValidate) {
|
||||
MajorCurriculum model = new MajorCurriculum();
|
||||
model.setVersionId(createValidate.getVersionId());
|
||||
model.setMajorId(createValidate.getMajorId());
|
||||
model.setCourseId(createValidate.getCourseId());
|
||||
model.setSemester(createValidate.getSemester());
|
||||
model.setCourseType(createValidate.getCourseType());
|
||||
model.setCredits(createValidate.getCredits());
|
||||
model.setTotalHours(createValidate.getTotalHours());
|
||||
model.setTheoryHours(createValidate.getTheoryHours());
|
||||
model.setPracticeHours(createValidate.getPracticeHours());
|
||||
model.setAssessmentType(createValidate.getAssessmentType());
|
||||
model.setStatus(createValidate.getStatus());
|
||||
BeanUtils.copyProperties(createValidate, model);
|
||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
majorCurriculumMapper.insert(model);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,187 @@
|
|||
package com.mdd.admin.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.github.yulichang.query.MPJQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.service.IStudentBaseInfoService;
|
||||
import com.mdd.admin.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoUpdateValidate;
|
||||
import com.mdd.admin.validate.StudentBaseInfoSearchValidate;
|
||||
import com.mdd.admin.vo.StudentBaseInfoListedVo;
|
||||
import com.mdd.admin.vo.StudentBaseInfoDetailVo;
|
||||
import com.mdd.common.config.GlobalConfig;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.StudentBaseInfo;
|
||||
import com.mdd.common.mapper.StudentBaseInfoMapper;
|
||||
import com.mdd.common.util.ListUtils;
|
||||
import com.mdd.common.util.TimeUtils;
|
||||
import com.mdd.common.util.UrlUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生基本信息实现类
|
||||
* @author gyp
|
||||
*/
|
||||
@Service
|
||||
public class StudentBaseInfoServiceImpl implements IStudentBaseInfoService {
|
||||
|
||||
@Resource
|
||||
StudentBaseInfoMapper studentBaseInfoMapper;
|
||||
|
||||
/**
|
||||
* 学生基本信息列表
|
||||
*
|
||||
* @author gyp
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<StudentBaseInfoListedVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<StudentBaseInfoListedVo> list(PageValidate pageValidate, StudentBaseInfoSearchValidate searchValidate) {
|
||||
Integer page = pageValidate.getPage_no();
|
||||
Integer limit = pageValidate.getPage_size();
|
||||
|
||||
QueryWrapper<StudentBaseInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.orderByDesc("id");
|
||||
|
||||
studentBaseInfoMapper.setSearch(queryWrapper, searchValidate, new String[]{
|
||||
"=:userId@user_id:int",
|
||||
"like:name:str",
|
||||
"=:gender:int",
|
||||
"=:idCard@id_card:str",
|
||||
"=:nationality:str",
|
||||
"=:politicalStatus@political_status:int",
|
||||
"=:phone:str",
|
||||
"=:nativePlace@native_place:str",
|
||||
"=:schoolType@school_type:int",
|
||||
"=:graduationYear@graduation_year:int",
|
||||
"=:academicQualification@academic_qualification:int",
|
||||
});
|
||||
|
||||
IPage<StudentBaseInfo> iPage = studentBaseInfoMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||
|
||||
List<StudentBaseInfoListedVo> list = new LinkedList<>();
|
||||
for(StudentBaseInfo item : iPage.getRecords()) {
|
||||
StudentBaseInfoListedVo vo = new StudentBaseInfoListedVo();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(item.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(item.getUpdateTime()));
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生基本信息详情
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键参数
|
||||
* @return StudentBaseInfo
|
||||
*/
|
||||
@Override
|
||||
public StudentBaseInfoDetailVo detail(Integer id) {
|
||||
StudentBaseInfo model = studentBaseInfoMapper.selectOne(
|
||||
new QueryWrapper<StudentBaseInfo>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在");
|
||||
|
||||
StudentBaseInfoDetailVo vo = new StudentBaseInfoDetailVo();
|
||||
BeanUtils.copyProperties(model, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生基本信息新增
|
||||
*
|
||||
* @author gyp
|
||||
* @param createValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(StudentBaseInfoCreateValidate createValidate) {
|
||||
StudentBaseInfo model = new StudentBaseInfo();
|
||||
model.setName(createValidate.getName());
|
||||
model.setGender(createValidate.getGender());
|
||||
model.setIdCard(createValidate.getIdCard());
|
||||
model.setBirthday(createValidate.getBirthday());
|
||||
model.setNationality(createValidate.getNationality());
|
||||
model.setPoliticalStatus(createValidate.getPoliticalStatus());
|
||||
model.setPhone(createValidate.getPhone());
|
||||
model.setEmail(createValidate.getEmail());
|
||||
model.setEmergencyContact(createValidate.getEmergencyContact());
|
||||
model.setEmergencyPhone(createValidate.getEmergencyPhone());
|
||||
model.setRelationship(createValidate.getRelationship());
|
||||
model.setHomeAddress(createValidate.getHomeAddress());
|
||||
model.setNativePlace(createValidate.getNativePlace());
|
||||
model.setPreviousSchool(createValidate.getPreviousSchool());
|
||||
model.setSchoolType(createValidate.getSchoolType());
|
||||
model.setGraduationYear(createValidate.getGraduationYear());
|
||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
studentBaseInfoMapper.insert(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生基本信息编辑
|
||||
*
|
||||
* @author gyp
|
||||
* @param updateValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void edit(StudentBaseInfoUpdateValidate updateValidate) {
|
||||
StudentBaseInfo model = studentBaseInfoMapper.selectOne(
|
||||
new QueryWrapper<StudentBaseInfo>()
|
||||
.eq("id", updateValidate.getId())
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setId(updateValidate.getId());
|
||||
model.setName(updateValidate.getName());
|
||||
model.setGender(updateValidate.getGender());
|
||||
model.setIdCard(updateValidate.getIdCard());
|
||||
model.setBirthday(updateValidate.getBirthday());
|
||||
model.setNationality(updateValidate.getNationality());
|
||||
model.setPoliticalStatus(updateValidate.getPoliticalStatus());
|
||||
model.setPhone(updateValidate.getPhone());
|
||||
model.setEmail(updateValidate.getEmail());
|
||||
model.setEmergencyContact(updateValidate.getEmergencyContact());
|
||||
model.setEmergencyPhone(updateValidate.getEmergencyPhone());
|
||||
model.setRelationship(updateValidate.getRelationship());
|
||||
model.setHomeAddress(updateValidate.getHomeAddress());
|
||||
model.setNativePlace(updateValidate.getNativePlace());
|
||||
model.setPreviousSchool(updateValidate.getPreviousSchool());
|
||||
model.setSchoolType(updateValidate.getSchoolType());
|
||||
model.setGraduationYear(updateValidate.getGraduationYear());
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
studentBaseInfoMapper.updateById(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生基本信息删除
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
StudentBaseInfo model = studentBaseInfoMapper.selectOne(
|
||||
new QueryWrapper<StudentBaseInfo>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
studentBaseInfoMapper.delete(new QueryWrapper<StudentBaseInfo>().eq("id", id));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -2,7 +2,6 @@ package com.mdd.admin.service.impl;
|
|||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.query.MPJQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
|
|
@ -12,7 +11,6 @@ import com.mdd.admin.validate.StudentInfoUpdateValidate;
|
|||
import com.mdd.admin.validate.StudentInfoSearchValidate;
|
||||
import com.mdd.admin.vo.StudentInfoListedVo;
|
||||
import com.mdd.admin.vo.StudentInfoDetailVo;
|
||||
import com.mdd.common.config.GlobalConfig;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.Class;
|
||||
import com.mdd.common.entity.College;
|
||||
|
|
@ -34,8 +32,6 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
|
|
@ -149,6 +145,12 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
*/
|
||||
@Override
|
||||
public void add(StudentInfoCreateValidate createValidate) {
|
||||
// 查询班级是否满人
|
||||
Class clazz = classMapper.selectById(createValidate.getClassId());
|
||||
if(clazz == null) throw new RuntimeException("班级不存在");
|
||||
if(clazz.getStudentCount()>=clazz.getMaxStudentCount()) throw new RuntimeException("班级已满人");
|
||||
clazz.setStudentCount(clazz.getStudentCount()+1);
|
||||
|
||||
StudentInfo model = new StudentInfo();
|
||||
model.setName(createValidate.getName());
|
||||
model.setGender(createValidate.getGender());
|
||||
|
|
@ -176,6 +178,7 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
studentInfoMapper.insert(model);
|
||||
classMapper.updateById(clazz);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -222,6 +225,7 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
model.setVerifiedTime(updateValidate.getVerifiedTime());
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
studentInfoMapper.updateById(model);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -244,25 +248,23 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
|
||||
@Override
|
||||
public void createRandomInfo(Integer num) {
|
||||
if (num == null) throw new NullPointerException("未发送数量");
|
||||
if (num == null) return;
|
||||
for (int i = 0; i < num; i++) {
|
||||
// 生成随机姓名
|
||||
String name = SimpleRandomGenerator.randomName();
|
||||
// 生成随机身份证号
|
||||
String idCard = SimpleRandomGenerator.randomIdCard();
|
||||
// 生成随机编号
|
||||
Random random = ThreadLocalRandom.current();
|
||||
Integer sn = random.nextInt(900000) + 100000;
|
||||
String account = "T" + sn.toString();
|
||||
|
||||
// 生成用户
|
||||
Integer userId = createRandomUser(name, idCard, sn);
|
||||
User user = new User();
|
||||
String idCard = createRandomUser(user);
|
||||
String name = user.getRealName();
|
||||
String studentNumber = user.getAccount();
|
||||
Integer userId = user.getId();
|
||||
|
||||
// 生成学生信息
|
||||
Random random = ThreadLocalRandom.current();
|
||||
StudentInfoCreateValidate createValidate = new StudentInfoCreateValidate();
|
||||
createValidate.setUserId(userId);
|
||||
createValidate.setName(name);
|
||||
createValidate.setGender(SimpleRandomGenerator.extractGenderFromIdCard(idCard));
|
||||
createValidate.setStudentNumber(account);
|
||||
createValidate.setGender(RandomUtil.genderFromIdCard(idCard));
|
||||
createValidate.setStudentNumber(studentNumber);
|
||||
Class clazz = getRandomEntity(classMapper);
|
||||
if (clazz == null) {throw new RuntimeException("为随机学生分配班级信息错误");}
|
||||
createValidate.setClassId(clazz.getId());
|
||||
|
|
@ -274,7 +276,7 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
createValidate.setExpectedGraduationYear(enrollmentYear + 4);
|
||||
createValidate.setStudentStatus(1);
|
||||
createValidate.setIdCard(idCard);
|
||||
createValidate.setBirthday(SimpleRandomGenerator.extractBirthdayFromIdCard(idCard));
|
||||
createValidate.setBirthday(RandomUtil.StrBirthdayFromIdCard(idCard));
|
||||
createValidate.setPoliticalStatus(random.nextInt(3) + 1);
|
||||
createValidate.setIsVerified(1);
|
||||
createValidate.setVerifiedBy(1);
|
||||
|
|
@ -339,8 +341,19 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
return grade;
|
||||
}
|
||||
|
||||
private Integer createRandomUser(String name, String idCard, Integer sn) {
|
||||
User user = new User();
|
||||
/**
|
||||
* 生成随机的用户信息,返回身份证号
|
||||
* 由于user实体不存储身份证号,但生成的用户账户是根据身份证后六位生成的,故需要让方法返回一个身份证号
|
||||
* */
|
||||
public String createRandomUser(User user) {
|
||||
// 生成随机姓名
|
||||
String name = RandomUtil.randomName();
|
||||
// 生成随机身份证号
|
||||
String idCard = RandomUtil.randomIdCard();
|
||||
// 生成随机编号
|
||||
Random random = ThreadLocalRandom.current();
|
||||
Integer sn = random.nextInt(900000) + 100000;
|
||||
|
||||
user.setNickname(name);
|
||||
user.setRealName(name);
|
||||
user.setAccount("T" + sn.toString());
|
||||
|
|
@ -353,97 +366,12 @@ public class StudentInfoServiceImpl implements IStudentInfoService {
|
|||
user.setAvatar(defaultAvatar);
|
||||
user.setChannel(0);
|
||||
user.setIsNewUser(1);
|
||||
user.setSex(SimpleRandomGenerator.extractGenderFromIdCard(idCard));
|
||||
user.setSex(RandomUtil.genderFromIdCard(idCard));
|
||||
user.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
user.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
userMapper.insert(user);
|
||||
User user2 = userMapper.selectOne(new QueryWrapper<User>().eq("account", user.getAccount()));
|
||||
return user2.getId();
|
||||
return idCard;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SimpleRandomGenerator {
|
||||
private static final String[] SURNAMES = {"李", "王", "张", "刘", "陈", "杨", "赵", "黄", "周"};
|
||||
private static final String[] MALE_NAMES = {"伟", "强", "磊", "洋", "勇", "军", "杰", "涛", "斌"};
|
||||
private static final String[] FEMALE_NAMES = {"芳", "娜", "敏", "静", "丽", "艳", "娟", "玲", "霞"};
|
||||
private static final String[] AREA_CODES = {"110101", "310101", "440101", "440301"};
|
||||
|
||||
private static final Random random = new Random();
|
||||
|
||||
public static String randomName() {
|
||||
String surname = SURNAMES[random.nextInt(SURNAMES.length)];
|
||||
String[] names = random.nextBoolean() ? MALE_NAMES : FEMALE_NAMES;
|
||||
String givenName = names[random.nextInt(names.length)];
|
||||
// 50%概率使用双字名
|
||||
if (random.nextBoolean()) {
|
||||
givenName += names[random.nextInt(names.length)];
|
||||
}
|
||||
return surname + givenName;
|
||||
}
|
||||
|
||||
public static String randomIdCard() {
|
||||
String area = AREA_CODES[random.nextInt(AREA_CODES.length)];
|
||||
// 生成1990-2005年出生的日期
|
||||
int year = 1990 + random.nextInt(16);
|
||||
int month = 1 + random.nextInt(12);
|
||||
int day = 1 + random.nextInt(28);
|
||||
String birth = String.format("%04d%02d%02d", year, month, day);
|
||||
String sequence = String.format("%03d", random.nextInt(1000));
|
||||
return area + birth + sequence + "X"; // 简化版本,校验码固定为X
|
||||
}
|
||||
|
||||
/**
|
||||
* 从身份证号提取生日
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 生日字符串,格式:yyyy-MM-dd
|
||||
* @throws IllegalArgumentException 如果身份证号格式不正确
|
||||
*/
|
||||
public static String extractBirthdayFromIdCard(String idCard) {
|
||||
if (idCard == null || idCard.length() != 18) {
|
||||
throw new IllegalArgumentException("身份证号必须为18位");
|
||||
}
|
||||
|
||||
try {
|
||||
String year = idCard.substring(6, 10);
|
||||
String month = idCard.substring(10, 12);
|
||||
String day = idCard.substring(12, 14);
|
||||
|
||||
// 验证日期是否合法
|
||||
LocalDate date = LocalDate.of(
|
||||
Integer.parseInt(year),
|
||||
Integer.parseInt(month),
|
||||
Integer.parseInt(day)
|
||||
);
|
||||
|
||||
return date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("身份证号中的日期格式不正确", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从身份证号提取性别
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 性别:"男1" 或 "女2"
|
||||
* @throws IllegalArgumentException 如果身份证号格式不正确
|
||||
*/
|
||||
public static Integer extractGenderFromIdCard(String idCard) {
|
||||
if (idCard == null || idCard.length() != 18) {
|
||||
throw new IllegalArgumentException("身份证号必须为18位");
|
||||
}
|
||||
|
||||
try {
|
||||
// 获取第17位(顺序码的最后一位)
|
||||
char genderCode = idCard.charAt(16);
|
||||
int genderNum = Character.getNumericValue(genderCode);
|
||||
|
||||
// 奇数表示男性,偶数表示女性
|
||||
return (genderNum % 2 == 1) ? 1 : 2;
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("无法从身份证号提取性别信息", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
package com.mdd.admin.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mdd.admin.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mdd.admin.validate.commons.PageValidate;
|
||||
import com.mdd.admin.service.IStudentRegistrationService;
|
||||
import com.mdd.admin.validate.StudentRegistrationCreateValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationUpdateValidate;
|
||||
import com.mdd.admin.validate.StudentRegistrationSearchValidate;
|
||||
import com.mdd.admin.vo.StudentRegistrationListedVo;
|
||||
import com.mdd.admin.vo.StudentRegistrationDetailVo;
|
||||
import com.mdd.common.core.PageResult;
|
||||
import com.mdd.common.entity.StudentBaseInfo;
|
||||
import com.mdd.common.entity.StudentRegistration;
|
||||
import com.mdd.common.mapper.StudentBaseInfoMapper;
|
||||
import com.mdd.common.mapper.StudentRegistrationMapper;
|
||||
import com.mdd.common.util.RandomUtil;
|
||||
import com.mdd.common.util.TimeUtils;
|
||||
import io.netty.util.internal.ThreadLocalRandom;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 学生注册状态实现类
|
||||
* @author gyp
|
||||
*/
|
||||
@Service
|
||||
public class StudentRegistrationServiceImpl implements IStudentRegistrationService {
|
||||
|
||||
@Resource
|
||||
StudentRegistrationMapper studentRegistrationMapper;
|
||||
|
||||
@Resource
|
||||
StudentInfoServiceImpl studentInfoService;
|
||||
@Autowired
|
||||
private StudentBaseInfoServiceImpl studentBaseInfoServiceImpl;
|
||||
@Autowired
|
||||
private StudentBaseInfoMapper studentBaseInfoMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 学生注册状态列表
|
||||
*
|
||||
* @author gyp
|
||||
* @param pageValidate 分页参数
|
||||
* @param searchValidate 搜索参数
|
||||
* @return PageResult<StudentRegistrationListedVo>
|
||||
*/
|
||||
@Override
|
||||
public PageResult<StudentRegistrationListedVo> list(PageValidate pageValidate, StudentRegistrationSearchValidate searchValidate) {
|
||||
Integer page = pageValidate.getPage_no();
|
||||
Integer limit = pageValidate.getPage_size();
|
||||
|
||||
QueryWrapper<StudentRegistration> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.orderByDesc("id");
|
||||
|
||||
studentRegistrationMapper.setSearch(queryWrapper, searchValidate, new String[]{
|
||||
"=:baseInfoId@base_info_id:int",
|
||||
"=:applicationNumber@application_number:str",
|
||||
"=:invitationCode@invitation_code:str",
|
||||
"=:intendedCollegeId@intended_college_id:int",
|
||||
"=:intendedMajorId@intended_major_id:int",
|
||||
"=:admissionStatus@admission_status:int",
|
||||
"=:paymentStatus@payment_status:int",
|
||||
"=:registrationStatus@registration_status:int",
|
||||
"=:approvalStatus@approval_status:int",
|
||||
"=:approvedBy@approved_by:int",
|
||||
"=:applicationTime@application_time:long",
|
||||
"=:admissionTime@admission_time:long",
|
||||
"=:paymentTime@payment_time:long",
|
||||
"=:registrationTime@registration_time:long",
|
||||
});
|
||||
|
||||
IPage<StudentRegistration> iPage = studentRegistrationMapper.selectPage(new Page<>(page, limit), queryWrapper);
|
||||
|
||||
List<StudentRegistrationListedVo> list = new LinkedList<>();
|
||||
for(StudentRegistration item : iPage.getRecords()) {
|
||||
StudentRegistrationListedVo vo = new StudentRegistrationListedVo();
|
||||
BeanUtils.copyProperties(item, vo);
|
||||
vo.setCreateTime(TimeUtils.timestampToDate(item.getCreateTime()));
|
||||
vo.setUpdateTime(TimeUtils.timestampToDate(item.getUpdateTime()));
|
||||
list.add(vo);
|
||||
}
|
||||
|
||||
return PageResult.iPageHandle(iPage.getTotal(), iPage.getCurrent(), iPage.getSize(), list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生注册状态详情
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键参数
|
||||
* @return StudentRegistration
|
||||
*/
|
||||
@Override
|
||||
public StudentRegistrationDetailVo detail(Integer id) {
|
||||
StudentRegistration model = studentRegistrationMapper.selectOne(
|
||||
new QueryWrapper<StudentRegistration>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在");
|
||||
|
||||
StudentRegistrationDetailVo vo = new StudentRegistrationDetailVo();
|
||||
BeanUtils.copyProperties(model, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生注册状态新增
|
||||
*
|
||||
* @author gyp
|
||||
* @param createValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void add(StudentRegistrationCreateValidate createValidate) {
|
||||
StudentRegistration model = new StudentRegistration();
|
||||
model.setBaseInfoId(createValidate.getBaseInfoId());
|
||||
model.setApplicationNumber(createValidate.getApplicationNumber());
|
||||
model.setInvitationCode(createValidate.getInvitationCode());
|
||||
model.setAdmissionStatus(createValidate.getAdmissionStatus());
|
||||
model.setPaymentStatus(createValidate.getPaymentStatus());
|
||||
model.setRegistrationStatus(createValidate.getRegistrationStatus());
|
||||
model.setApprovalStatus(createValidate.getApprovalStatus());
|
||||
model.setApplicationTime(createValidate.getApplicationTime());
|
||||
model.setCreateTime(System.currentTimeMillis() / 1000);
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
studentRegistrationMapper.insert(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生注册状态编辑
|
||||
*
|
||||
* @author gyp
|
||||
* @param updateValidate 参数
|
||||
*/
|
||||
@Override
|
||||
public void edit(StudentRegistrationUpdateValidate updateValidate) {
|
||||
StudentRegistration model = studentRegistrationMapper.selectOne(
|
||||
new QueryWrapper<StudentRegistration>()
|
||||
.eq("id", updateValidate.getId())
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
model.setId(updateValidate.getId());
|
||||
model.setBaseInfoId(updateValidate.getBaseInfoId());
|
||||
model.setApplicationNumber(updateValidate.getApplicationNumber());
|
||||
model.setInvitationCode(updateValidate.getInvitationCode());
|
||||
model.setAdmissionStatus(updateValidate.getAdmissionStatus());
|
||||
model.setPaymentStatus(updateValidate.getPaymentStatus());
|
||||
model.setRegistrationStatus(updateValidate.getRegistrationStatus());
|
||||
model.setApprovalStatus(updateValidate.getApprovalStatus());
|
||||
model.setRejectionReason(updateValidate.getRejectionReason());
|
||||
model.setApplicationTime(updateValidate.getApplicationTime());
|
||||
model.setAdmissionTime(updateValidate.getAdmissionTime());
|
||||
model.setPaymentTime(updateValidate.getPaymentTime());
|
||||
model.setRegistrationTime(updateValidate.getRegistrationTime());
|
||||
model.setUpdateTime(System.currentTimeMillis() / 1000);
|
||||
studentRegistrationMapper.updateById(model);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学生注册状态删除
|
||||
*
|
||||
* @author gyp
|
||||
* @param id 主键ID
|
||||
*/
|
||||
@Override
|
||||
public void del(Integer id) {
|
||||
StudentRegistration model = studentRegistrationMapper.selectOne(
|
||||
new QueryWrapper<StudentRegistration>()
|
||||
.eq("id", id)
|
||||
.last("limit 1"));
|
||||
|
||||
Assert.notNull(model, "数据不存在!");
|
||||
|
||||
studentRegistrationMapper.delete(new QueryWrapper<StudentRegistration>().eq("id", id));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 创建随机报名注册信息
|
||||
* */
|
||||
@Override
|
||||
public void genRegInfo(Integer num) {
|
||||
Random random = ThreadLocalRandom.current();
|
||||
for (int i = 0; i < num; i++) {
|
||||
String name = RandomUtil.randomName();
|
||||
String idCard = RandomUtil.randomIdCard();
|
||||
LocalDate birthday = RandomUtil.birthdayFromIdCard(idCard);
|
||||
Integer gender = RandomUtil.genderFromIdCard(idCard);
|
||||
StudentBaseInfoCreateValidate createValidate = new StudentBaseInfoCreateValidate();
|
||||
createValidate.setName(name);
|
||||
createValidate.setIdCard(idCard);
|
||||
createValidate.setGender(gender);
|
||||
createValidate.setBirthday(birthday);
|
||||
createValidate.setEmail("123456test@mz.com");
|
||||
createValidate.setNationality("汉族");
|
||||
createValidate.setPhone(RandomUtil.randomPhone());
|
||||
createValidate.setHomeAddress("测试家庭住址");
|
||||
createValidate.setNativePlace("北京");
|
||||
createValidate.setPoliticalStatus(random.nextInt(3));
|
||||
createValidate.setEmergencyContact(RandomUtil.randomName());
|
||||
createValidate.setEmergencyPhone(RandomUtil.randomPhone());
|
||||
createValidate.setRelationship("紧急联系人测试");
|
||||
createValidate.setPreviousSchool("测试学校");
|
||||
createValidate.setSchoolType(random.nextInt(2)+1);
|
||||
createValidate.setGraduationYear(2025);
|
||||
StudentBaseInfo model1 = new StudentBaseInfo();
|
||||
BeanUtils.copyProperties(createValidate, model1);
|
||||
studentBaseInfoMapper.insert(model1);
|
||||
|
||||
Long currentTime = System.currentTimeMillis()/1000;
|
||||
StudentRegistration model2 = new StudentRegistration();
|
||||
model2.setBaseInfoId(model1.getId());
|
||||
model2.setApplicationNumber("test"+ model1.getIdCard().substring(13)); // 设置报考编号
|
||||
model2.setInvitationCode(createValidate.getInvitationCode());
|
||||
model2.setApplicationTime(currentTime);
|
||||
model2.setCreateTime(currentTime);
|
||||
model2.setUpdateTime(currentTime);
|
||||
studentRegistrationMapper.insert(model2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生基本信息创建参数")
|
||||
public class StudentBaseInfoCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "姓名参数缺失")
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "性别参数缺失")
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@NotNull(message = "身份证参数缺失")
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@NotNull(message = "出生日期参数缺失")
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private LocalDate birthday;
|
||||
|
||||
@NotNull(message = "民族参数缺失")
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@NotNull(message = "政治面貌参数缺失")
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@NotNull(message = "手机号码参数缺失")
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "紧急联系人参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@NotNull(message = "紧急联系人电话参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@NotNull(message = "与联系人的关系参数缺失")
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@NotNull(message = "家庭住址参数缺失")
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@NotNull(message = "籍贯参数缺失")
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@NotNull(message = "毕业学校参数缺失")
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@NotNull(message = "学校类型参数缺失")
|
||||
@ApiModelProperty(value = "学校类型:1-普高 2-中职")
|
||||
private Integer schoolType;
|
||||
|
||||
@NotNull(message = "毕业年份参数缺失")
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生基本信息搜素参数")
|
||||
public class StudentBaseInfoSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "关联用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty(value = "学校类型:1-普通高中 2-职业高中 3-中专 4-大专 5-本科 6-其他")
|
||||
private Integer schoolType;
|
||||
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@ApiModelProperty(value = "学历:1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-博士")
|
||||
private Integer academicQualification;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
|
||||
/**
|
||||
* 学生基本信息参数
|
||||
* @author gyp
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生基本信息更新参数")
|
||||
public class StudentBaseInfoUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "userId参数缺失")
|
||||
@ApiModelProperty(value = "关联用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "gender参数缺失")
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@NotNull(message = "idCard参数缺失")
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@NotNull(message = "birthday参数缺失")
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private LocalDate birthday;
|
||||
|
||||
@NotNull(message = "nationality参数缺失")
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@NotNull(message = "politicalStatus参数缺失")
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@NotNull(message = "phone参数缺失")
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@NotNull(message = "email参数缺失")
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "emergencyContact参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@NotNull(message = "emergencyPhone参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@NotNull(message = "relationship参数缺失")
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@NotNull(message = "homeAddress参数缺失")
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@NotNull(message = "nativePlace参数缺失")
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@NotNull(message = "postalCode参数缺失")
|
||||
@ApiModelProperty(value = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
@NotNull(message = "previousSchool参数缺失")
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@NotNull(message = "schoolType参数缺失")
|
||||
@ApiModelProperty(value = "学校类型:1-普通高中 2-职业高中 3-中专 4-大专 5-本科 6-其他")
|
||||
private Integer schoolType;
|
||||
|
||||
@NotNull(message = "graduationYear参数缺失")
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@NotNull(message = "academicQualification参数缺失")
|
||||
@ApiModelProperty(value = "学历:1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-博士")
|
||||
private Integer academicQualification;
|
||||
|
||||
@NotNull(message = "majorStudied参数缺失")
|
||||
@ApiModelProperty(value = "原所学专业")
|
||||
private String majorStudied;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生注册状态创建参数")
|
||||
public class StudentRegistrationCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "userId参数缺失")
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@NotNull(message = "baseInfoId参数缺失")
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@NotNull(message = "applicationNumber参数缺失")
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@NotNull(message = "intendedCollegeId参数缺失")
|
||||
@ApiModelProperty(value = "意向学院ID")
|
||||
private Integer intendedCollegeId;
|
||||
|
||||
@NotNull(message = "intendedMajorId参数缺失")
|
||||
@ApiModelProperty(value = "意向专业ID")
|
||||
private Integer intendedMajorId;
|
||||
|
||||
@NotNull(message = "admissionStatus参数缺失")
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@NotNull(message = "paymentStatus参数缺失")
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@NotNull(message = "registrationStatus参数缺失")
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@NotNull(message = "approvalStatus参数缺失")
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@NotNull(message = "applicationTime参数缺失")
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生注册状态搜素参数")
|
||||
public class StudentRegistrationSearchValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "审核人ID")
|
||||
private Integer approvedBy;
|
||||
|
||||
@ApiModelProperty(value = "录取操作员ID")
|
||||
private Integer admissionBy;
|
||||
|
||||
@ApiModelProperty(value = "缴费审查人ID")
|
||||
private Integer paymentReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "入学登记审查人ID")
|
||||
private Integer registrationReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
|
||||
@ApiModelProperty(value = "入学登记时间")
|
||||
private Long registrationTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
package com.mdd.admin.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import java.io.Serializable;
|
||||
import javax.validation.constraints.*;
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
|
||||
/**
|
||||
* 学生注册状态参数
|
||||
* @author gyp
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生注册状态更新参数")
|
||||
public class StudentRegistrationUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "userId参数缺失")
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@NotNull(message = "baseInfoId参数缺失")
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@NotNull(message = "applicationNumber参数缺失")
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@NotNull(message = "invitationCode参数缺失")
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@NotNull(message = "intendedCollegeId参数缺失")
|
||||
@ApiModelProperty(value = "意向学院ID")
|
||||
private Integer intendedCollegeId;
|
||||
|
||||
@NotNull(message = "intendedMajorId参数缺失")
|
||||
@ApiModelProperty(value = "意向专业ID")
|
||||
private Integer intendedMajorId;
|
||||
|
||||
@NotNull(message = "admissionStatus参数缺失")
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@NotNull(message = "paymentStatus参数缺失")
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@NotNull(message = "registrationStatus参数缺失")
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@NotNull(message = "approvalStatus参数缺失")
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String rejectionReason;
|
||||
|
||||
@NotNull(message = "applicationTime参数缺失")
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
|
||||
@ApiModelProperty(value = "入学登记时间")
|
||||
private Long registrationTime;
|
||||
|
||||
}
|
||||
|
|
@ -3,6 +3,8 @@ package com.mdd.admin.validate.major;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
|
|
@ -11,12 +13,15 @@ public class CurriculumVersionCreateValidate implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "专业id不为空")
|
||||
@ApiModelProperty(value = "专业ID")
|
||||
private Integer majorId;
|
||||
|
||||
@NotNull(message = "版本名称不为空")
|
||||
@ApiModelProperty(value = "版本名称")
|
||||
private String versionName;
|
||||
|
||||
@NotNull(message = "版本代码不为空不为空")
|
||||
@ApiModelProperty(value = "版本代码")
|
||||
private String versionCode;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.mdd.admin.validate.major;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
|
|
@ -11,6 +13,7 @@ public class CurriculumVersionSearchValidate implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "专业ID不能为空")
|
||||
@ApiModelProperty(value = "专业ID")
|
||||
private Integer majorId;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.mdd.admin.validate.major;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -15,34 +17,21 @@ public class MajorCurriculumCreateValidate implements Serializable {
|
|||
@ApiModelProperty(value = "培养方案版本ID")
|
||||
private Integer versionId;
|
||||
|
||||
@NotNull(message = "专业id不为空")
|
||||
@ApiModelProperty(value = "专业ID")
|
||||
private Integer majorId;
|
||||
|
||||
@NotNull(message = "课程id不为空")
|
||||
@ApiModelProperty(value = "课程ID")
|
||||
private Integer courseId;
|
||||
|
||||
@NotNull(message = "修读学期不为空")
|
||||
@ApiModelProperty(value = "建议修读学期:1-大一上,2-大一下,...,8-大四下")
|
||||
private Integer semester;
|
||||
|
||||
@ApiModelProperty(value = "课程类型:1-必修,2-选修,3-限选")
|
||||
private Integer courseType;
|
||||
|
||||
@ApiModelProperty(value = "学分")
|
||||
private BigDecimal credits;
|
||||
|
||||
@ApiModelProperty(value = "总学时")
|
||||
private String totalHours;
|
||||
|
||||
@ApiModelProperty(value = "理论学时")
|
||||
private Integer theoryHours;
|
||||
|
||||
@ApiModelProperty(value = "实践学时")
|
||||
private Integer practiceHours;
|
||||
|
||||
@ApiModelProperty(value = "考核方式:1-考试,2-考查")
|
||||
private Integer assessmentType;
|
||||
|
||||
@ApiModelProperty(value = "状态:1-启用,0-停用")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ package com.mdd.admin.validate.major;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
|
|
@ -12,12 +14,18 @@ public class MajorCurriculumSearchValidate implements Serializable {
|
|||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "版本不能为空")
|
||||
@ApiModelProperty(value = "培养方案版本ID")
|
||||
private Integer versionId;
|
||||
|
||||
@NotNull(message = "专业ID不能为空")
|
||||
@ApiModelProperty(value = "专业ID")
|
||||
private Integer majorId;
|
||||
|
||||
@NotNull(message = "修读学期不能为空")
|
||||
@ApiModelProperty(value = "修读学期")
|
||||
private String semester;
|
||||
|
||||
@ApiModelProperty(value = "课程ID")
|
||||
private Integer courseId;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,80 @@
|
|||
package com.mdd.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生基本信息详情Vo")
|
||||
public class StudentBaseInfoDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "关联用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private Date birthday;
|
||||
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty(value = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@ApiModelProperty(value = "学校类型:1-普通高中 2-职业高中 3-中专 4-大专 5-本科 6-其他")
|
||||
private Integer schoolType;
|
||||
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@ApiModelProperty(value = "学历:1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-博士")
|
||||
private Integer academicQualification;
|
||||
|
||||
@ApiModelProperty(value = "原所学专业")
|
||||
private String majorStudied;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.mdd.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生基本信息列表Vo")
|
||||
public class StudentBaseInfoListedVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "关联用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private Date birthday;
|
||||
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty(value = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@ApiModelProperty(value = "学校类型:1-普通高中 2-职业高中 3-中专 4-大专 5-本科 6-其他")
|
||||
private Integer schoolType;
|
||||
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@ApiModelProperty(value = "学历:1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-博士")
|
||||
private Integer academicQualification;
|
||||
|
||||
@ApiModelProperty(value = "原所学专业")
|
||||
private String majorStudied;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
package com.mdd.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生注册状态详情Vo")
|
||||
public class StudentRegistrationDetailVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@ApiModelProperty(value = "意向学院ID")
|
||||
private Integer intendedCollegeId;
|
||||
|
||||
@ApiModelProperty(value = "意向专业ID")
|
||||
private Integer intendedMajorId;
|
||||
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String rejectionReason;
|
||||
|
||||
@ApiModelProperty(value = "审核人ID")
|
||||
private Integer approvedBy;
|
||||
|
||||
@ApiModelProperty(value = "录取操作员ID")
|
||||
private Integer admissionBy;
|
||||
|
||||
@ApiModelProperty(value = "缴费审查人ID")
|
||||
private Integer paymentReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "入学登记审查人ID")
|
||||
private Integer registrationReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
|
||||
@ApiModelProperty(value = "入学登记时间")
|
||||
private Long registrationTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
package com.mdd.admin.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生注册状态列表Vo")
|
||||
public class StudentRegistrationListedVo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@ApiModelProperty(value = "意向学院ID")
|
||||
private Integer intendedCollegeId;
|
||||
|
||||
@ApiModelProperty(value = "意向专业ID")
|
||||
private Integer intendedMajorId;
|
||||
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "审核人ID")
|
||||
private Integer approvedBy;
|
||||
|
||||
@ApiModelProperty(value = "录取操作员ID")
|
||||
private Integer admissionBy;
|
||||
|
||||
@ApiModelProperty(value = "缴费审查人ID")
|
||||
private Integer paymentReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "入学登记审查人ID")
|
||||
private Integer registrationReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
private Integer approvedTime;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String rejectionReason;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
|
||||
@ApiModelProperty(value = "入学登记时间")
|
||||
private Long registrationTime;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private String updateTime;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -28,6 +28,9 @@ public class CourseListedVo implements Serializable {
|
|||
@ApiModelProperty(value = "课程类型名")
|
||||
private String courseTypeName;
|
||||
|
||||
@ApiModelProperty(value = "课程描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "学分")
|
||||
private BigDecimal credits;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,14 +40,17 @@ public class MajorCurriculumDetailVo implements Serializable {
|
|||
@ApiModelProperty(value = "建议修读学期:1-大一上,2-大一下,...,8-大四下")
|
||||
private Integer semester;
|
||||
|
||||
@ApiModelProperty(value = "课程类型:1-必修,2-选修,3-限选")
|
||||
@ApiModelProperty(value = "课程类型")
|
||||
private Integer courseType;
|
||||
|
||||
@ApiModelProperty(value = "课程类型名")
|
||||
private String courseTypeName;
|
||||
|
||||
@ApiModelProperty(value = "学分")
|
||||
private BigDecimal credits;
|
||||
|
||||
@ApiModelProperty(value = "总学时")
|
||||
private String totalHours;
|
||||
private Integer totalHours;
|
||||
|
||||
@ApiModelProperty(value = "理论学时")
|
||||
private Integer theoryHours;
|
||||
|
|
|
|||
|
|
@ -40,14 +40,17 @@ public class MajorCurriculumListedVo implements Serializable {
|
|||
@ApiModelProperty(value = "建议修读学期:1-大一上,2-大一下,...,8-大四下")
|
||||
private Integer semester;
|
||||
|
||||
@ApiModelProperty(value = "课程类型:1-必修,2-选修,3-限选")
|
||||
@ApiModelProperty(value = "课程类型")
|
||||
private Integer courseType;
|
||||
|
||||
@ApiModelProperty(value = "课程类型名")
|
||||
private String courseTypeName;
|
||||
|
||||
@ApiModelProperty(value = "学分")
|
||||
private BigDecimal credits;
|
||||
|
||||
@ApiModelProperty(value = "总学时")
|
||||
private String totalHours;
|
||||
private Integer totalHours;
|
||||
|
||||
@ApiModelProperty(value = "理论学时")
|
||||
private Integer theoryHours;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ spring:
|
|||
matching-strategy: ant_path_matcher
|
||||
# 数据源配置
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/la??useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&sql_mode=ANSI_QUOTES
|
||||
url: jdbc:mysql://localhost:3306/la?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&sql_mode=ANSI_QUOTES
|
||||
type: com.zaxxer.hikari.HikariDataSource # 数据源类型
|
||||
driver-class-name: com.mysql.jdbc.Driver # MySql的驱动
|
||||
username: root # 数据库账号
|
||||
|
|
|
|||
|
|
@ -0,0 +1,83 @@
|
|||
package com.mdd.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生基本信息实体")
|
||||
public class StudentBaseInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private LocalDate birthday;
|
||||
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@ApiModelProperty(value = "学校类型:1-普高 2-中职")
|
||||
private Integer schoolType;
|
||||
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.mdd.common.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生注册状态实体")
|
||||
public class StudentRegistration implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value="id", type= IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "审核人ID")
|
||||
private Integer approvedBy;
|
||||
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
private Integer approvedTime;
|
||||
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@ApiModelProperty(value = "录取操作员ID")
|
||||
private Integer admissionBy;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@ApiModelProperty(value = "缴费审查人ID")
|
||||
private Integer paymentReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@ApiModelProperty(value = "入学登记审查人ID")
|
||||
private Integer registrationReviewBy;
|
||||
|
||||
@ApiModelProperty(value = "入学登记时间")
|
||||
private Long registrationTime;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String rejectionReason;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Long updateTime;
|
||||
|
||||
@ApiModelProperty(value = "删除时间")
|
||||
private Long deleteTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.mdd.common.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
/**
|
||||
* 进度枚举
|
||||
* */
|
||||
@Getter
|
||||
public enum ProgressEnum {
|
||||
WAITING(0, "审核中"),
|
||||
APPROVED(1, "已通过"),
|
||||
REFUSE(2, "审核不通过");
|
||||
|
||||
private final int code;
|
||||
private final String msg;
|
||||
ProgressEnum(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.mdd.common.mapper;
|
||||
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.StudentBaseInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 学生基本信息Mapper
|
||||
* @author gyp
|
||||
*/
|
||||
@Mapper
|
||||
public interface StudentBaseInfoMapper extends IBaseMapper<StudentBaseInfo> {
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.mdd.common.mapper;
|
||||
|
||||
import com.mdd.common.core.basics.IBaseMapper;
|
||||
import com.mdd.common.entity.StudentRegistration;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 学生注册状态Mapper
|
||||
* @author gyp
|
||||
*/
|
||||
@Mapper
|
||||
public interface StudentRegistrationMapper extends IBaseMapper<StudentRegistration> {
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
package com.mdd.common.util;
|
||||
|
||||
import io.netty.util.internal.ThreadLocalRandom;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* 随机工具
|
||||
* */
|
||||
public class RandomUtil {
|
||||
private static final String[] SURNAMES = {"李", "王", "张", "刘", "陈", "杨", "赵", "黄", "周"};
|
||||
private static final String[] MALE_NAMES = {"伟", "强", "磊", "洋", "勇", "军", "杰", "涛", "斌"};
|
||||
private static final String[] FEMALE_NAMES = {"芳", "娜", "敏", "静", "丽", "艳", "娟", "玲", "霞"};
|
||||
private static final String[] AREA_CODES = {"110101", "310101", "440101", "440301"};
|
||||
|
||||
// 中国主流运营商号段
|
||||
private static final String[] MOBILE_PREFIXES = {
|
||||
// 中国移动
|
||||
"134", "135", "136", "137", "138", "139",
|
||||
"147", "150", "151", "152", "157", "158", "159",
|
||||
"172", "178", "182", "183", "184", "187", "188", "198",
|
||||
|
||||
// 中国联通
|
||||
"130", "131", "132", "145", "146", "155", "156", "166",
|
||||
"171", "175", "176", "185", "186",
|
||||
|
||||
// 中国电信
|
||||
"133", "149", "153", "173", "177", "180", "181", "189", "191", "199"
|
||||
};
|
||||
|
||||
private static final Random random = ThreadLocalRandom.current();
|
||||
|
||||
/**
|
||||
*
|
||||
* 生成随机姓名
|
||||
* */
|
||||
public static String randomName() {
|
||||
String surname = SURNAMES[random.nextInt(SURNAMES.length)];
|
||||
String[] names = random.nextBoolean() ? MALE_NAMES : FEMALE_NAMES;
|
||||
String givenName = names[random.nextInt(names.length)];
|
||||
// 50%概率使用双字名
|
||||
if (random.nextBoolean()) {
|
||||
givenName += names[random.nextInt(names.length)];
|
||||
}
|
||||
return surname + givenName;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* 生成随机身份证号
|
||||
* */
|
||||
public static String randomIdCard() {
|
||||
String area = AREA_CODES[random.nextInt(AREA_CODES.length)];
|
||||
int year = 2003 + random.nextInt(16);
|
||||
int month = 1 + random.nextInt(12);
|
||||
int day = 1 + random.nextInt(28);
|
||||
String birth = String.format("%04d%02d%02d", year, month, day);
|
||||
String sequence = String.format("%03d", random.nextInt(1000));
|
||||
return area + birth + sequence + "X"; // 简化版本,校验码固定为X
|
||||
}
|
||||
|
||||
/**
|
||||
* 从身份证号提取生日
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 生日 类型:LocalDate
|
||||
* @throws IllegalArgumentException 如果身份证号格式不正确
|
||||
*/
|
||||
public static LocalDate birthdayFromIdCard(String idCard) {
|
||||
if (idCard == null || idCard.length() != 18) {
|
||||
throw new IllegalArgumentException("身份证号必须为18位");
|
||||
}
|
||||
|
||||
try {
|
||||
String year = idCard.substring(6, 10);
|
||||
String month = idCard.substring(10, 12);
|
||||
String day = idCard.substring(12, 14);
|
||||
|
||||
// 验证日期是否合法
|
||||
|
||||
return LocalDate.of(
|
||||
Integer.parseInt(year),
|
||||
Integer.parseInt(month),
|
||||
Integer.parseInt(day)
|
||||
);
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("身份证号中的日期格式不正确", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从身份证号提取生日
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 生日字符串,格式:yyyy-MM-dd
|
||||
* @throws IllegalArgumentException 如果身份证号格式不正确
|
||||
*/
|
||||
public static String StrBirthdayFromIdCard(String idCard) {
|
||||
if (idCard == null || idCard.length() != 18) {
|
||||
throw new IllegalArgumentException("身份证号必须为18位");
|
||||
}
|
||||
|
||||
try {
|
||||
String year = idCard.substring(6, 10);
|
||||
String month = idCard.substring(10, 12);
|
||||
String day = idCard.substring(12, 14);
|
||||
|
||||
// 验证日期是否合法
|
||||
LocalDate date = LocalDate.of(
|
||||
Integer.parseInt(year),
|
||||
Integer.parseInt(month),
|
||||
Integer.parseInt(day)
|
||||
);
|
||||
|
||||
return date.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("身份证号中的日期格式不正确", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 从身份证号提取性别
|
||||
*
|
||||
* @param idCard 身份证号
|
||||
* @return 性别:"男1" 或 "女2"
|
||||
* @throws IllegalArgumentException 如果身份证号格式不正确
|
||||
*/
|
||||
public static Integer genderFromIdCard(String idCard) {
|
||||
if (idCard == null || idCard.length() != 18) {
|
||||
throw new IllegalArgumentException("身份证号必须为18位");
|
||||
}
|
||||
|
||||
try {
|
||||
// 获取第17位(顺序码的最后一位)
|
||||
char genderCode = idCard.charAt(16);
|
||||
int genderNum = Character.getNumericValue(genderCode);
|
||||
|
||||
// 奇数表示男性,偶数表示女性
|
||||
return (genderNum % 2 == 1) ? 1 : 2;
|
||||
} catch (Exception e) {
|
||||
throw new IllegalArgumentException("无法从身份证号提取性别信息", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 生成随机手机号码
|
||||
* */
|
||||
public static String randomPhone() {
|
||||
String prefix = MOBILE_PREFIXES[random.nextInt(MOBILE_PREFIXES.length)];
|
||||
|
||||
StringBuilder phone = new StringBuilder(prefix);
|
||||
for (int i = 0; i < 8; i++) {
|
||||
phone.append(random.nextInt(10));
|
||||
}
|
||||
|
||||
return phone.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<artifactId>likeadmin-java</artifactId>
|
||||
<groupId>org.mdd</groupId>
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>mozhe-enrollment</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
<maven.compiler.target>8</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.mdd</groupId>
|
||||
<artifactId>like-common</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.mozhe.enrollment;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisRepositoriesAutoConfiguration;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* 启动器
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = {"com.mozhe"})
|
||||
@MapperScan(basePackages = {"com.mdd.*.mapper"})
|
||||
@EnableTransactionManagement
|
||||
@SpringBootApplication(exclude = {RedisRepositoriesAutoConfiguration.class})
|
||||
public class EnrollmentApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(EnrollmentApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package com.mozhe.enrollment.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2WebMvc
|
||||
public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
// 指定Controller扫描包路径
|
||||
.apis(RequestHandlerSelectors.basePackage("com.mozhe.enrollment.controller"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("报名页API接口文档")
|
||||
.version("1.0.0")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
package com.mozhe.enrollment.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
/**
|
||||
* 配置允许跨域
|
||||
*/
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**")
|
||||
.allowedOrigins("*")
|
||||
.allowedHeaders("*")
|
||||
.allowedMethods("GET", "POST", "DELETE", "PUT")
|
||||
.maxAge(3600);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/doc.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
package com.mozhe.enrollment.controller;
|
||||
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.entity.StudentBaseInfo;
|
||||
import com.mozhe.enrollment.service.IEnrollmentService;
|
||||
import com.mozhe.enrollment.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mozhe.enrollment.validate.StudentBaseInfoUpdateValidate;
|
||||
import com.mozhe.enrollment.vo.ProcessStatusVo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/enrollment")
|
||||
@Api(tags = "报名注册管理")
|
||||
public class EnrollmentController {
|
||||
@Resource
|
||||
IEnrollmentService iEnrollmentService;
|
||||
|
||||
@PostMapping("/submit")
|
||||
@ApiOperation(
|
||||
value = "提交注册报名信息",
|
||||
notes = "提交信息后,会创建该身份证号对应的报名进度,同一身份证号重复提交无效;若材料审核不通过,则可以重新提交")
|
||||
public AjaxResult<Object> submitStudentBaseInfo(@Validated @RequestBody StudentBaseInfoCreateValidate createValidate) {
|
||||
return iEnrollmentService.submit(createValidate);
|
||||
}
|
||||
|
||||
@GetMapping("/processStatus")
|
||||
@ApiOperation(
|
||||
value = "获取注册报名进度",
|
||||
notes = "使用身份证获取报名进度,在提交报名信息后,自动创建该进度信息,若重新提交信息,会重置报名进度")
|
||||
public AjaxResult<ProcessStatusVo> getProcessStatus(String idCard) {
|
||||
ProcessStatusVo processStatusVo = iEnrollmentService.getProcessStatus(idCard);
|
||||
return AjaxResult.success(processStatusVo);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.mozhe.enrollment.service;
|
||||
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mozhe.enrollment.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mozhe.enrollment.vo.ProcessStatusVo;
|
||||
|
||||
public interface IEnrollmentService {
|
||||
ProcessStatusVo getProcessStatus(String idCard);
|
||||
|
||||
AjaxResult<Object> submit(StudentBaseInfoCreateValidate createValidate);
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.mozhe.enrollment.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import com.mdd.common.entity.StudentBaseInfo;
|
||||
import com.mdd.common.entity.StudentRegistration;
|
||||
import com.mdd.common.enums.ProgressEnum;
|
||||
import com.mdd.common.mapper.StudentBaseInfoMapper;
|
||||
import com.mdd.common.mapper.StudentRegistrationMapper;
|
||||
import com.mozhe.enrollment.service.IEnrollmentService;
|
||||
import com.mozhe.enrollment.validate.StudentBaseInfoCreateValidate;
|
||||
import com.mozhe.enrollment.vo.ProcessStatusVo;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class EnrollmentServiceImpl implements IEnrollmentService {
|
||||
|
||||
@Resource
|
||||
StudentBaseInfoMapper studentBaseInfoMapper;
|
||||
@Resource
|
||||
StudentRegistrationMapper studentRegistrationMapper;
|
||||
|
||||
@Override
|
||||
public AjaxResult<Object> submit(StudentBaseInfoCreateValidate createValidate) {
|
||||
// 根据身份证号,检测是否重复提交
|
||||
QueryWrapper<StudentBaseInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id_card", createValidate.getIdCard());
|
||||
StudentBaseInfo studentBaseInfo = studentBaseInfoMapper.selectOne(queryWrapper);
|
||||
// 检测到重复提交
|
||||
if(studentBaseInfo != null){
|
||||
// 查找报名进度
|
||||
QueryWrapper<StudentRegistration> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("base_info_id", studentBaseInfo.getId());
|
||||
StudentRegistration studentRegistration = studentRegistrationMapper.selectOne(queryWrapper2);
|
||||
if(studentRegistration == null){throw new RuntimeException("无法查询报名进度,请联系系统管理员");}
|
||||
Integer approvalStatus = studentRegistration.getApprovalStatus();
|
||||
// 材料审核通过,或审核中,不允许重复提交
|
||||
if(approvalStatus != ProgressEnum.REFUSE.getCode()) return AjaxResult.failed("请勿重复提交");
|
||||
// 否则材料审核不通过,允许重复提交,删除原材料,并且重新创建报名进度
|
||||
studentBaseInfoMapper.deleteById(studentBaseInfo.getId());
|
||||
studentRegistrationMapper.deleteById(studentRegistration.getId());
|
||||
}
|
||||
// 材料信息保存到数据库,并且创建新的报名进度
|
||||
save(createValidate);
|
||||
return AjaxResult.success("提交成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 材料信息保存到数据库,并且创建新的报名进度
|
||||
* */
|
||||
private void save(StudentBaseInfoCreateValidate createValidate) {
|
||||
Long currentTime = System.currentTimeMillis() / 1000;
|
||||
StudentBaseInfo model = new StudentBaseInfo();
|
||||
BeanUtils.copyProperties(createValidate, model);
|
||||
model.setCreateTime(currentTime);
|
||||
model.setUpdateTime(currentTime);
|
||||
studentBaseInfoMapper.insert(model);
|
||||
StudentRegistration studentRegistration = new StudentRegistration();
|
||||
studentRegistration.setBaseInfoId(model.getId());
|
||||
studentRegistration.setApplicationNumber(getApplicationNumber(createValidate)); // 设置报考编号
|
||||
studentRegistration.setInvitationCode(createValidate.getInvitationCode());
|
||||
studentRegistration.setApplicationTime(currentTime);
|
||||
studentRegistration.setCreateTime(currentTime);
|
||||
studentRegistration.setUpdateTime(currentTime);
|
||||
studentRegistrationMapper.insert(studentRegistration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 报考编号生成方法(未知规则,使用暂定算法)
|
||||
* */
|
||||
private String getApplicationNumber(StudentBaseInfoCreateValidate createValidate) {
|
||||
String str = createValidate.getIdCard().substring(13);
|
||||
return "mozhe-default" + str;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessStatusVo getProcessStatus(String idCard) {
|
||||
ProcessStatusVo processStatusVo = new ProcessStatusVo();
|
||||
// 根据身份证号查找学生报考信息
|
||||
QueryWrapper<StudentBaseInfo> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("id_card", idCard);
|
||||
StudentBaseInfo studentBaseInfo = studentBaseInfoMapper.selectOne(queryWrapper);
|
||||
// 若查找不到,返回空
|
||||
if(studentBaseInfo == null) return null;
|
||||
QueryWrapper<StudentRegistration> queryWrapper2 = new QueryWrapper<>();
|
||||
queryWrapper2.eq("base_info_id", studentBaseInfo.getId());
|
||||
StudentRegistration studentRegistration = studentRegistrationMapper.selectOne(queryWrapper2);
|
||||
// 若有基础信息,但没有报名进度,报错
|
||||
if(studentRegistration == null) throw new RuntimeException("无法查询报名进度,请联系系统管理员");
|
||||
// 正常情况,返回报考进度
|
||||
BeanUtils.copyProperties(studentRegistration, processStatusVo);
|
||||
return processStatusVo;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
package com.mozhe.enrollment.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生基本信息创建参数")
|
||||
public class StudentBaseInfoCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "姓名参数缺失")
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "性别参数缺失")
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@NotNull(message = "身份证参数缺失")
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@NotNull(message = "出生日期参数缺失")
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private LocalDate birthday;
|
||||
|
||||
@NotNull(message = "民族参数缺失")
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@NotNull(message = "政治面貌参数缺失")
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@NotNull(message = "手机号码参数缺失")
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "紧急联系人参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@NotNull(message = "紧急联系人电话参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@NotNull(message = "与联系人的关系参数缺失")
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@NotNull(message = "家庭住址参数缺失")
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@NotNull(message = "籍贯参数缺失")
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@NotNull(message = "毕业学校参数缺失")
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@NotNull(message = "学校类型参数缺失")
|
||||
@ApiModelProperty(value = "学校类型:1-普高 2-中职")
|
||||
private Integer schoolType;
|
||||
|
||||
@NotNull(message = "毕业年份参数缺失")
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.mozhe.enrollment.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 学生基本信息参数
|
||||
* @author gyp
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生基本信息更新参数")
|
||||
public class StudentBaseInfoUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "name参数缺失")
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@NotNull(message = "gender参数缺失")
|
||||
@ApiModelProperty(value = "性别:0-未知 1-男 2-女")
|
||||
private Integer gender;
|
||||
|
||||
@NotNull(message = "idCard参数缺失")
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@NotNull(message = "birthday参数缺失")
|
||||
@ApiModelProperty(value = "出生日期")
|
||||
private Date birthday;
|
||||
|
||||
@NotNull(message = "nationality参数缺失")
|
||||
@ApiModelProperty(value = "民族")
|
||||
private String nationality;
|
||||
|
||||
@NotNull(message = "politicalStatus参数缺失")
|
||||
@ApiModelProperty(value = "政治面貌:0-群众 1-团员 2-党员 3-其他")
|
||||
private Integer politicalStatus;
|
||||
|
||||
@NotNull(message = "phone参数缺失")
|
||||
@ApiModelProperty(value = "手机号码")
|
||||
private String phone;
|
||||
|
||||
@NotNull(message = "email参数缺失")
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
private String email;
|
||||
|
||||
@NotNull(message = "emergencyContact参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系人")
|
||||
private String emergencyContact;
|
||||
|
||||
@NotNull(message = "emergencyPhone参数缺失")
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyPhone;
|
||||
|
||||
@NotNull(message = "relationship参数缺失")
|
||||
@ApiModelProperty(value = "与紧急联系人关系")
|
||||
private String relationship;
|
||||
|
||||
@NotNull(message = "homeAddress参数缺失")
|
||||
@ApiModelProperty(value = "家庭住址")
|
||||
private String homeAddress;
|
||||
|
||||
@NotNull(message = "nativePlace参数缺失")
|
||||
@ApiModelProperty(value = "籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@NotNull(message = "postalCode参数缺失")
|
||||
@ApiModelProperty(value = "邮政编码")
|
||||
private String postalCode;
|
||||
|
||||
@NotNull(message = "previousSchool参数缺失")
|
||||
@ApiModelProperty(value = "毕业学校")
|
||||
private String previousSchool;
|
||||
|
||||
@NotNull(message = "schoolType参数缺失")
|
||||
@ApiModelProperty(value = "学校类型:1-普通高中 2-职业高中 3-中专 4-大专 5-本科 6-其他")
|
||||
private Integer schoolType;
|
||||
|
||||
@NotNull(message = "graduationYear参数缺失")
|
||||
@ApiModelProperty(value = "毕业年份")
|
||||
private Integer graduationYear;
|
||||
|
||||
@NotNull(message = "academicQualification参数缺失")
|
||||
@ApiModelProperty(value = "学历:1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-博士")
|
||||
private Integer academicQualification;
|
||||
|
||||
@NotNull(message = "majorStudied参数缺失")
|
||||
@ApiModelProperty(value = "原所学专业")
|
||||
private String majorStudied;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
package com.mozhe.enrollment.validate;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel("学生注册状态创建参数")
|
||||
public class StudentRegistrationCreateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@NotNull(message = "userId参数缺失")
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@NotNull(message = "baseInfoId参数缺失")
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@NotNull(message = "applicationNumber参数缺失")
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@NotNull(message = "intendedCollegeId参数缺失")
|
||||
@ApiModelProperty(value = "意向学院ID")
|
||||
private Integer intendedCollegeId;
|
||||
|
||||
@NotNull(message = "intendedMajorId参数缺失")
|
||||
@ApiModelProperty(value = "意向专业ID")
|
||||
private Integer intendedMajorId;
|
||||
|
||||
@NotNull(message = "admissionStatus参数缺失")
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@NotNull(message = "paymentStatus参数缺失")
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@NotNull(message = "registrationStatus参数缺失")
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@NotNull(message = "approvalStatus参数缺失")
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@NotNull(message = "applicationTime参数缺失")
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
package com.mozhe.enrollment.validate;
|
||||
|
||||
import com.mdd.common.validator.annotation.IDMust;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 学生注册状态参数
|
||||
* @author gyp
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("学生注册状态更新参数")
|
||||
public class StudentRegistrationUpdateValidate implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@IDMust(message = "id参数必传且需大于0")
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
private Integer id;
|
||||
|
||||
@NotNull(message = "userId参数缺失")
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@NotNull(message = "baseInfoId参数缺失")
|
||||
@ApiModelProperty(value = "关联基本信息ID")
|
||||
private Integer baseInfoId;
|
||||
|
||||
@NotNull(message = "applicationNumber参数缺失")
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@NotNull(message = "invitationCode参数缺失")
|
||||
@ApiModelProperty(value = "邀请码")
|
||||
private String invitationCode;
|
||||
|
||||
@NotNull(message = "intendedCollegeId参数缺失")
|
||||
@ApiModelProperty(value = "意向学院ID")
|
||||
private Integer intendedCollegeId;
|
||||
|
||||
@NotNull(message = "intendedMajorId参数缺失")
|
||||
@ApiModelProperty(value = "意向专业ID")
|
||||
private Integer intendedMajorId;
|
||||
|
||||
@NotNull(message = "admissionStatus参数缺失")
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@NotNull(message = "paymentStatus参数缺失")
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@NotNull(message = "registrationStatus参数缺失")
|
||||
@ApiModelProperty(value = "入学状态:0-未入学 1-已入学")
|
||||
private Integer registrationStatus;
|
||||
|
||||
@NotNull(message = "approvalStatus参数缺失")
|
||||
@ApiModelProperty(value = "审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String rejectionReason;
|
||||
|
||||
@NotNull(message = "applicationTime参数缺失")
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
|
||||
@ApiModelProperty(value = "入学登记时间")
|
||||
private Long registrationTime;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.mozhe.enrollment.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ApiModel(value = "录取进度状态vo")
|
||||
public class ProcessStatusVo implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "报名编号")
|
||||
private String applicationNumber;
|
||||
|
||||
@ApiModelProperty(value = "信息审核状态:0-待审核 1-审核通过 2-审核不通过")
|
||||
private Integer approvalStatus;
|
||||
|
||||
@ApiModelProperty(value = "录取状态:0-待审核 1-已录取 2-未录取")
|
||||
private Integer admissionStatus;
|
||||
|
||||
@ApiModelProperty(value = "缴费状态:0-未缴费 1-部分缴费 2-已缴费")
|
||||
private Integer paymentStatus;
|
||||
|
||||
@ApiModelProperty(value = "拒绝原因")
|
||||
private String rejectionReason;
|
||||
|
||||
@ApiModelProperty(value = "报名时间")
|
||||
private Long applicationTime;
|
||||
|
||||
@ApiModelProperty(value = "录取时间")
|
||||
private Long admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "缴费时间")
|
||||
private Long paymentTime;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"properties": [
|
||||
{
|
||||
"name": "mozhe.upload-directory",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for mozhe.upload-directory."
|
||||
},
|
||||
{
|
||||
"name": "mozhe.swagger.enabled",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for mozhe.swagger.enabled."
|
||||
},
|
||||
{
|
||||
"name": "mozhe.swagger.pathMapping",
|
||||
"type": "java.lang.String",
|
||||
"description": "Description for mozhe.swagger.pathMapping."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
# 项目配置
|
||||
mozhe:
|
||||
# Swagger配置
|
||||
swagger:
|
||||
# 是否开启swagger
|
||||
enabled: true
|
||||
# 请求前缀
|
||||
pathMapping:
|
||||
|
||||
# 服务配置
|
||||
server:
|
||||
port: 8083
|
||||
# servlet:
|
||||
# context-path: /
|
||||
|
||||
# 框架配置
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
mvc:
|
||||
static-path-pattern: /api/static/**
|
||||
throw-exception-if-no-handler-found: true
|
||||
pathmatch:
|
||||
matching-strategy: ant_path_matcher
|
||||
# 数据源配置
|
||||
datasource:
|
||||
url: jdbc:mysql://localhost:3306/la?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
|
||||
type: com.zaxxer.hikari.HikariDataSource # 数据源类型
|
||||
driver-class-name: com.mysql.jdbc.Driver # MySql的驱动
|
||||
username: root # 数据库账号
|
||||
password: 123456 # 数据库密码
|
||||
hikari:
|
||||
connection-timeout: 30000 # 等待连接分配连接的最大时长(毫秒),超出时长还没可用连接则发送SQLException,默认30秒
|
||||
minimum-idle: 5 # 最小连接数
|
||||
maximum-pool-size: 20 # 最大连接数
|
||||
auto-commit: true # 自动提交
|
||||
idle-timeout: 600000 # 连接超时的最大时长(毫秒),超时则被释放(retired),默认10分钟
|
||||
pool-name: DateSourceHikariCP # 连接池名称
|
||||
max-lifetime: 1800000 # 连接的生命时长(毫秒),超时而且没被使用则被释放,默认30分钟(1800000ms)
|
||||
connection-init-sql: SELECT 1 # 连接时发起SQL测试脚本
|
||||
# 限制配置
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB # 文件上传大小限制
|
||||
max-request-size: 100MB # 文件最大请求限制
|
||||
enabled: true
|
||||
# Redis配置
|
||||
redis:
|
||||
host: localhost # Redis服务地址
|
||||
port: 6379 # Redis端口
|
||||
password: # Redis密码
|
||||
database: 0 # 数据库索引
|
||||
timeout: 5000 # 连接超时
|
||||
lettuce:
|
||||
pool:
|
||||
max-wait: 30000 # 连接池最大阻塞等待时间(使用负数表示没有限制,默认-1)
|
||||
max-active: 100 # 连接池最大连接数(使用负数表示没有限制,默认8)
|
||||
max-idle: 20 # 连接池中的最大空闲连接(默认8)
|
||||
min-idle: 0 # 连接池中的最小空闲连接(默认0)
|
||||
|
||||
# Mybatis-plus配置
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:/mapper/**Mapper.xml
|
||||
typeAliasesPackage: com.mdd.**.mapper
|
||||
global-config:
|
||||
banner: false
|
||||
db-config:
|
||||
table-prefix: la_
|
||||
configuration-properties:
|
||||
prefix: la_
|
||||
|
||||
knife4j:
|
||||
enable: true
|
||||
openapi:
|
||||
title: Knife4j报名注册页面文档
|
||||
description: ""
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
<module>like-admin</module>
|
||||
<module>like-front</module>
|
||||
<module>like-common</module>
|
||||
<module>mozhe-enrollment</module>
|
||||
<module>like-generator</module>
|
||||
</modules>
|
||||
|
||||
|
|
|
|||
|
|
@ -1222,6 +1222,7 @@ CREATE TABLE `la_student_info` (
|
|||
`name` varchar(50) DEFAULT NULL COMMENT '姓名',
|
||||
`gender` tinyint unsigned DEFAULT NULL COMMENT '性别 1-男 2-女',
|
||||
`user_id` int unsigned NOT NULL COMMENT '关联用户ID',
|
||||
`base_info_id` bigint unsigned NOT NULL COMMENT '关联基本信息ID',
|
||||
`student_number` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '学号',
|
||||
`college_id` int unsigned NOT NULL COMMENT '学院ID',
|
||||
`major_id` int unsigned NOT NULL COMMENT '专业ID',
|
||||
|
|
@ -1575,3 +1576,85 @@ CREATE TABLE `la_classroom_equipment` (
|
|||
CONSTRAINT `fk_classroom_equipment_equipment` FOREIGN KEY (`equipment_requirement_id`) REFERENCES `la_equipment_requirement` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='教室设备关系表';
|
||||
|
||||
CREATE TABLE `la_student_base_info` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint unsigned NOT NULL COMMENT '关联用户ID',
|
||||
|
||||
-- 身份信息
|
||||
`name` varchar(100) NOT NULL COMMENT '姓名',
|
||||
`gender` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '性别:0-未知 1-男 2-女',
|
||||
`id_card` varchar(20) NOT NULL DEFAULT '' COMMENT '身份证号',
|
||||
`birthday` date DEFAULT NULL COMMENT '出生日期',
|
||||
`nationality` varchar(50) NOT NULL DEFAULT '汉族' COMMENT '民族',
|
||||
`political_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '政治面貌:0-群众 1-团员 2-党员 3-其他',
|
||||
|
||||
-- 联系信息
|
||||
`phone` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号码',
|
||||
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '邮箱',
|
||||
`emergency_contact` varchar(100) NOT NULL DEFAULT '' COMMENT '紧急联系人',
|
||||
`emergency_phone` varchar(20) NOT NULL DEFAULT '' COMMENT '紧急联系电话',
|
||||
`relationship` varchar(20) NOT NULL DEFAULT '' COMMENT '与紧急联系人关系',
|
||||
`home_address` varchar(200) NOT NULL DEFAULT '' COMMENT '家庭住址',
|
||||
`native_place` varchar(100) NOT NULL DEFAULT '' COMMENT '籍贯',
|
||||
`postal_code` varchar(10) NOT NULL DEFAULT '' COMMENT '邮政编码',
|
||||
|
||||
-- 教育背景
|
||||
`previous_school` varchar(200) NOT NULL DEFAULT '' COMMENT '毕业学校',
|
||||
`school_type` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '学校类型:1-普通高中 2-职业高中 3-中专 4-大专 5-本科 6-其他',
|
||||
`graduation_year` int unsigned NOT NULL DEFAULT '0' COMMENT '毕业年份',
|
||||
`academic_qualification` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '学历:1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-博士',
|
||||
`major_studied` varchar(100) NOT NULL DEFAULT '' COMMENT '原所学专业',
|
||||
|
||||
-- 系统信息
|
||||
`create_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
`delete_time` bigint unsigned DEFAULT NULL COMMENT '删除时间',
|
||||
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_user_id` (`user_id`) COMMENT '用户ID唯一',
|
||||
UNIQUE KEY `uk_id_card` (`id_card`) COMMENT '身份证号唯一',
|
||||
KEY `idx_name` (`name`) COMMENT '姓名索引',
|
||||
KEY `idx_phone` (`phone`) COMMENT '手机号索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学生基本信息表';
|
||||
|
||||
CREATE TABLE `la_student_registration` (
|
||||
`id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
|
||||
`user_id` bigint unsigned NOT NULL COMMENT '用户ID',
|
||||
`base_info_id` bigint unsigned NOT NULL COMMENT '关联基本信息ID',
|
||||
`application_number` varchar(50) NOT NULL DEFAULT '' COMMENT '报名编号',
|
||||
`invitation_code` varchar(50) DEFAULT '' COMMENT '邀请码',
|
||||
|
||||
-- 报名意向
|
||||
`intended_college_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '意向学院ID',
|
||||
`intended_major_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '意向专业ID',
|
||||
|
||||
-- 状态信息
|
||||
`admission_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '录取状态:0-待审核 1-已录取 2-未录取',
|
||||
`payment_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '缴费状态:0-未缴费 1-部分缴费 2-已缴费',
|
||||
`registration_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '入学状态:0-未入学 1-已入学',
|
||||
`approval_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '审核状态:0-待审核 1-审核通过 2-审核不通过',
|
||||
|
||||
-- 审核信息
|
||||
`approved_by` bigint unsigned NOT NULL DEFAULT '0' COMMENT '审核人ID',
|
||||
`approved_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '审核时间',
|
||||
`rejection_reason` text COMMENT '拒绝原因',
|
||||
|
||||
-- 时间信息
|
||||
`application_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '报名时间',
|
||||
`admission_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '录取时间',
|
||||
`payment_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '缴费时间',
|
||||
`registration_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '入学登记时间',
|
||||
|
||||
-- 系统信息
|
||||
`create_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
||||
`update_time` bigint unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
`delete_time` bigint unsigned DEFAULT NULL COMMENT '删除时间',
|
||||
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `uk_application_number` (`application_number`) COMMENT '报名编号唯一',
|
||||
UNIQUE KEY `uk_user_id` (`user_id`) COMMENT '用户ID唯一',
|
||||
KEY `idx_base_info` (`base_info_id`) COMMENT '基本信息索引',
|
||||
KEY `idx_intended_major` (`intended_college_id`, `intended_major_id`) COMMENT '意向专业索引',
|
||||
KEY `idx_admission_status` (`admission_status`) COMMENT '录取状态索引',
|
||||
KEY `idx_application_time` (`application_time`) COMMENT '报名时间索引'
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='学生注册状态表';
|
||||
Loading…
Reference in New Issue