Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
V
volunteer_service
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
volunteer_service
Commits
cde30d3b
Commit
cde30d3b
authored
Jan 20, 2021
by
licc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
录取规则表新增两个字段
parent
c9b35289
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
20 deletions
+38
-20
AdmissionRuleMapper.xml
...-mapper/src/main/resources/mapper/AdmissionRuleMapper.xml
+10
-3
AdmissionRule.java
...l/src/main/java/cn/wisenergy/model/app/AdmissionRule.java
+24
-12
SchemeServiceImpl.java
...java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
+4
-5
No files found.
wisenergy-mapper/src/main/resources/mapper/AdmissionRuleMapper.xml
View file @
cde30d3b
...
@@ -7,8 +7,10 @@
...
@@ -7,8 +7,10 @@
<result
column=
"type"
property=
"type"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"culture_max"
property=
"cultureMax"
/>
<result
column=
"culture_max"
property=
"cultureMax"
/>
<result
column=
"culture_min"
property=
"cultureMin"
/>
<result
column=
"culture_min"
property=
"cultureMin"
/>
<result
column=
"current_year_culture"
property=
"currentYearCulture"
/>
<result
column=
"profession_max"
property=
"professionMax"
/>
<result
column=
"profession_max"
property=
"professionMax"
/>
<result
column=
"profession_min"
property=
"professionMin"
/>
<result
column=
"profession_min"
property=
"professionMin"
/>
<result
column=
"current_year_major"
property=
"currentYearMajor"
/>
<result
column=
"up_mark"
property=
"upMark"
/>
<result
column=
"up_mark"
property=
"upMark"
/>
<result
column=
"down_mark"
property=
"downMark"
/>
<result
column=
"down_mark"
property=
"downMark"
/>
<result
column=
"number"
property=
"number"
/>
<result
column=
"number"
property=
"number"
/>
...
@@ -27,20 +29,23 @@
...
@@ -27,20 +29,23 @@
</sql>
</sql>
<sql
id=
"cols_exclude_id"
>
<sql
id=
"cols_exclude_id"
>
type,culture_max, culture_min,profession_max,profession_min,up_mark, down_mark,number,is_delete,create_time,update_time
type,culture_max, culture_min,current_year_culture,profession_max,profession_min,current_year_major,up_mark,
down_mark,number,is_delete,create_time,update_time
</sql>
</sql>
<sql
id=
"vals"
>
<sql
id=
"vals"
>
#{type},#{cultureMax},#{cultureMin},#{
professionMax},#{professionMin},#{upMark},#{downMark}, #{numbe
r},
#{type},#{cultureMax},#{cultureMin},#{
currentYearCulture},#{professionMax}, #{professionMin},#{currentYearMajo
r},
#{isDelete},now(),now()
#{
upMark},#{downMark}, #{number}, #{
isDelete},now(),now()
</sql>
</sql>
<sql
id=
"updateCondition"
>
<sql
id=
"updateCondition"
>
<if
test=
"type != null"
>
type = #{type},
</if>
<if
test=
"type != null"
>
type = #{type},
</if>
<if
test=
"cultureMax != null"
>
culture_max =#{cultureMax},
</if>
<if
test=
"cultureMax != null"
>
culture_max =#{cultureMax},
</if>
<if
test=
"cultureMin != null"
>
culture_min =#{cultureMin},
</if>
<if
test=
"cultureMin != null"
>
culture_min =#{cultureMin},
</if>
<if
test=
"currentYearCulture != null"
>
current_year_culture =#{currentYearCulture},
</if>
<if
test=
"professionMax != null"
>
profession_max =#{professionMax},
</if>
<if
test=
"professionMax != null"
>
profession_max =#{professionMax},
</if>
<if
test=
"professionMin != null"
>
profession_min =#{professionMin},
</if>
<if
test=
"professionMin != null"
>
profession_min =#{professionMin},
</if>
<if
test=
"currentYearMajor != null"
>
current_year_major =#{currentYearMajor},
</if>
<if
test=
"upMark != null"
>
up_mark = #{upMark},
</if>
<if
test=
"upMark != null"
>
up_mark = #{upMark},
</if>
<if
test=
"downMark != null"
>
down_mark =#{downMark},
</if>
<if
test=
"downMark != null"
>
down_mark =#{downMark},
</if>
<if
test=
"number != null"
>
number = #{number},
</if>
<if
test=
"number != null"
>
number = #{number},
</if>
...
@@ -53,8 +58,10 @@
...
@@ -53,8 +58,10 @@
<if
test=
"type != null"
>
and type = #{type}
</if>
<if
test=
"type != null"
>
and type = #{type}
</if>
<if
test=
"cultureMax != null"
>
and culture_max =#{cultureMax}
</if>
<if
test=
"cultureMax != null"
>
and culture_max =#{cultureMax}
</if>
<if
test=
"cultureMin != null"
>
and culture_min =#{cultureMin}
</if>
<if
test=
"cultureMin != null"
>
and culture_min =#{cultureMin}
</if>
<if
test=
"currentYearCulture != null"
>
and current_year_culture =#{currentYearCulture}
</if>
<if
test=
"professionMax != null"
>
and profession_max =#{professionMax}
</if>
<if
test=
"professionMax != null"
>
and profession_max =#{professionMax}
</if>
<if
test=
"professionMin != null"
>
and profession_min =#{professionMin}
</if>
<if
test=
"professionMin != null"
>
and profession_min =#{professionMin}
</if>
<if
test=
"currentYearMajor != null"
>
and current_year_major =#{currentYearMajor}
</if>
<if
test=
"upMark != null"
>
and up_mark = #{upMark}
</if>
<if
test=
"upMark != null"
>
and up_mark = #{upMark}
</if>
<if
test=
"downMark != null"
>
and down_mark =#{downMark}
</if>
<if
test=
"downMark != null"
>
and down_mark =#{downMark}
</if>
<if
test=
"number != null"
>
and number = #{number}
</if>
<if
test=
"number != null"
>
and number = #{number}
</if>
...
...
wisenergy-model/src/main/java/cn/wisenergy/model/app/AdmissionRule.java
View file @
cde30d3b
...
@@ -8,10 +8,10 @@ import lombok.Data;
...
@@ -8,10 +8,10 @@ import lombok.Data;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
*@ Description: 录取规则实体类
*@ Author : 86187
*@ Date : 2021/1/19 10:43
* @author 86187
* @author 86187
* @ Description: 录取规则实体类
* @ Author : 86187
* @ Date : 2021/1/19 10:43
*/
*/
@Data
@Data
@ApiModel
(
value
=
"AdmissionRule"
)
@ApiModel
(
value
=
"AdmissionRule"
)
...
@@ -21,55 +21,67 @@ public class AdmissionRule extends BaseEntity implements Serializable {
...
@@ -21,55 +21,67 @@ public class AdmissionRule extends BaseEntity implements Serializable {
/**
/**
* 录取规则id
* 录取规则id
*/
*/
@ApiModelProperty
(
value
=
"录取规则id"
,
name
=
"id"
)
@ApiModelProperty
(
value
=
"录取规则id"
,
name
=
"id"
)
private
Integer
id
;
private
Integer
id
;
/**
/**
* 方案类型:1:本科文化一批 2:本科美术一批 3:艺术本科批文学编导 4:本科体育 5:专科专业分类6:专科美术一批 7:专科文学编导一批 8:专科体育一批
* 方案类型:1:本科文化一批 2:本科美术一批 3:艺术本科批文学编导 4:本科体育 5:专科专业分类6:专科美术一批 7:专科文学编导一批 8:专科体育一批
*/
*/
@ApiModelProperty
(
value
=
"方案类型:1:本科文化一批 2:本科美术一批 3:艺术本科批文学编导 4:本科体育 "
+
@ApiModelProperty
(
value
=
"方案类型:1:本科文化一批 2:本科美术一批 3:艺术本科批文学编导 4:本科体育 "
+
"5:专科专业分类6:专科美术一批 7:专科文学编导一批 8:专科体育一批"
,
name
=
"type"
)
"5:专科专业分类6:专科美术一批 7:专科文学编导一批 8:专科体育一批"
,
name
=
"type"
)
private
Integer
type
;
private
Integer
type
;
/**
/**
* 文化成绩最高分
* 文化成绩最高分
*/
*/
@ApiModelProperty
(
value
=
"文化成绩最高分"
,
name
=
"cultureMax"
)
@ApiModelProperty
(
value
=
"文化成绩最高分"
,
name
=
"cultureMax"
)
private
Double
cultureMax
;
private
Double
cultureMax
;
/**
/**
* 文化成绩最低分
* 文化成绩最低分
*/
*/
@ApiModelProperty
(
value
=
"文化成绩最低分"
,
name
=
"cultureMin"
)
@ApiModelProperty
(
value
=
"文化成绩最低分"
,
name
=
"cultureMin"
)
private
Double
cultureMin
;
private
Double
cultureMin
;
/**
* 本年文化课录取线
*/
@ApiModelProperty
(
value
=
"本年文化课录取线"
,
name
=
"currentYearCulture"
)
private
Double
currentYearCulture
;
/**
/**
* 专业成绩最高分
* 专业成绩最高分
*/
*/
@ApiModelProperty
(
value
=
"专业成绩最高分"
,
name
=
"professionMax"
)
@ApiModelProperty
(
value
=
"专业成绩最高分"
,
name
=
"professionMax"
)
private
Double
professionMax
;
private
Double
professionMax
;
/**
/**
* 专业成绩最低分
* 专业成绩最低分
*/
*/
@ApiModelProperty
(
value
=
"专业成绩最低分"
,
name
=
"professionMin"
)
@ApiModelProperty
(
value
=
"专业成绩最低分"
,
name
=
"professionMin"
)
private
Double
professionMin
;
private
Double
professionMin
;
/**
* 本年专业课录取线
*/
@ApiModelProperty
(
value
=
"本年文化课录取线"
,
name
=
"currentYearMajor"
)
private
Double
currentYearMajor
;
/**
/**
* 向上浮动分数
* 向上浮动分数
*/
*/
@ApiModelProperty
(
value
=
"向上浮动分数"
,
name
=
"upMark"
)
@ApiModelProperty
(
value
=
"向上浮动分数"
,
name
=
"upMark"
)
private
Double
upMark
;
private
Double
upMark
;
/**
/**
* 向下浮动分数
* 向下浮动分数
*/
*/
@ApiModelProperty
(
value
=
"向下浮动分数"
,
name
=
"downMark"
)
@ApiModelProperty
(
value
=
"向下浮动分数"
,
name
=
"downMark"
)
private
Double
downMark
;
private
Double
downMark
;
/**
/**
* 展示志愿总数
* 展示志愿总数
*/
*/
@ApiModelProperty
(
value
=
"展示志愿总数"
,
name
=
"number"
)
@ApiModelProperty
(
value
=
"展示志愿总数"
,
name
=
"number"
)
private
Double
number
;
private
Double
number
;
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/SchemeServiceImpl.java
View file @
cde30d3b
...
@@ -67,8 +67,6 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
...
@@ -67,8 +67,6 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
return
R
.
error
(
"未选择专业!"
);
return
R
.
error
(
"未选择专业!"
);
}
}
VolunteerVo
volunteerVo
=
new
VolunteerVo
();
//1、根据userId获取用户信息
//1、根据userId获取用户信息
UserInfo
userInfo
=
usersMapper
.
selectById
(
queryVo
.
getUserId
());
UserInfo
userInfo
=
usersMapper
.
selectById
(
queryVo
.
getUserId
());
if
(
null
==
userInfo
)
{
if
(
null
==
userInfo
)
{
...
@@ -82,6 +80,8 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
...
@@ -82,6 +80,8 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
if
(
null
==
scoreInfo
)
{
if
(
null
==
scoreInfo
)
{
return
R
.
error
(
"无考生成绩!"
);
return
R
.
error
(
"无考生成绩!"
);
}
}
VolunteerVo
volunteerVo
=
new
VolunteerVo
();
double
culture
=
Double
.
parseDouble
(
queryVo
.
getCultureGrade
());
double
culture
=
Double
.
parseDouble
(
queryVo
.
getCultureGrade
());
double
major
=
Double
.
parseDouble
(
queryVo
.
getMajorGrade
());
double
major
=
Double
.
parseDouble
(
queryVo
.
getMajorGrade
());
...
@@ -114,7 +114,6 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
...
@@ -114,7 +114,6 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
return
R
.
error
(
"无文化课专科录取规则!"
);
return
R
.
error
(
"无文化课专科录取规则!"
);
}
}
//1).判断文化课的分数是否大于等于最大文化分
//1).判断文化课的分数是否大于等于最大文化分
double
cultureMax
=
Double
.
parseDouble
(
firstRule
.
getCultureMax
().
toString
());
double
cultureMax
=
Double
.
parseDouble
(
firstRule
.
getCultureMax
().
toString
());
if
(
culture
>=
cultureMax
)
{
if
(
culture
>=
cultureMax
)
{
...
@@ -126,7 +125,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
...
@@ -126,7 +125,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
//2).判断文化课的分数是否小于最小报考分数
//2).判断文化课的分数是否小于最小报考分数
double
cultureMin
=
Double
.
parseDouble
(
secondRule
.
getCultureMin
().
toString
());
double
cultureMin
=
Double
.
parseDouble
(
secondRule
.
getCultureMin
().
toString
());
if
(
culture
<
cultureMin
)
{
if
(
culture
<
cultureMin
)
{
return
R
.
error
(
"您的成绩不满足报考条件,无法查询!"
);
return
R
.
error
(
"
很抱歉,
您的成绩不满足报考条件,无法查询!"
);
}
}
list
=
getCultureList
(
scoreInfo
,
firstRule
,
secondRule
,
className
,
professionName
);
list
=
getCultureList
(
scoreInfo
,
firstRule
,
secondRule
,
className
,
professionName
);
...
@@ -351,7 +350,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
...
@@ -351,7 +350,7 @@ public class SchemeServiceImpl extends ServiceImpl<SchemeMapper, SchemeInfo> imp
map
.
put
(
"downGrade"
,
downGrade
);
map
.
put
(
"downGrade"
,
downGrade
);
list
=
volunteerMapper
.
getVolunteerList
(
map
);
list
=
volunteerMapper
.
getVolunteerList
(
map
);
//如果数据不满足最大数量,取不限专业
重
最低分补充
//如果数据不满足最大数量,取不限专业最低分补充
if
(
list
.
size
()
<
firstRule
.
getNumber
())
{
if
(
list
.
size
()
<
firstRule
.
getNumber
())
{
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment