Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
志
志愿填报
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
单欣鑫
志愿填报
Commits
a27fa5cb
Commit
a27fa5cb
authored
Jun 06, 2025
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.学校专业导入优化
parent
ed83fa66
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
51 deletions
+67
-51
application-druid.yml
ruoyi-admin/src/main/resources/application-druid.yml
+3
-3
MallAcceptPlanMapper.java
...main/java/com/ruoyi/mall/mapper/MallAcceptPlanMapper.java
+1
-1
MallAcceptRuleMapper.java
...main/java/com/ruoyi/mall/mapper/MallAcceptRuleMapper.java
+7
-0
MallSchoolAcceptMapper.java
...in/java/com/ruoyi/mall/mapper/MallSchoolAcceptMapper.java
+1
-1
MallSchoolAcceptServiceImpl.java
.../ruoyi/mall/service/impl/MallSchoolAcceptServiceImpl.java
+41
-41
MallAcceptPlanMapper.xml
...m/src/main/resources/mapper/mall/MallAcceptPlanMapper.xml
+2
-1
MallAcceptRuleMapper.xml
...m/src/main/resources/mapper/mall/MallAcceptRuleMapper.xml
+7
-0
MallSchoolAcceptMapper.xml
...src/main/resources/mapper/mall/MallSchoolAcceptMapper.xml
+2
-1
index.vue
ruoyi-ui/src/views/mall/mallSchoolAccept/index.vue
+3
-3
No files found.
ruoyi-admin/src/main/resources/application-druid.yml
View file @
a27fa5cb
...
...
@@ -7,9 +7,9 @@ spring:
# 主库数据源
master
:
# 本地数据源
# url: jdbc:mysql://
rm-hp3340490n5mw72tcto.mysql.huhehaote.rds.aliyuncs.com:3306/yikaozhiyuan_test
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
# username:
yikaozhiyuan
# password:
KxappNYy7dQUzuterEncvBt@Pf
# url: jdbc:mysql://
localhost:3306/yikaozhiyuan_20250605
?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
# username:
root
# password:
123456
# 正式数据源
url
:
jdbc:mysql://bj-cynosdbmysql-grp-oppabofo.sql.tencentcdb.com:29687/yikaozhiyuan?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&allowMultiQueries=true
username
:
root
...
...
ruoyi-system/src/main/java/com/ruoyi/mall/mapper/MallAcceptPlanMapper.java
View file @
a27fa5cb
...
...
@@ -48,7 +48,7 @@ public interface MallAcceptPlanMapper
public
String
selectMaxYear
();
public
MallAcceptPlan
selectPlan
(
@Param
(
"schoolId"
)
Long
schoolId
,
public
List
<
MallAcceptPlan
>
selectPlan
(
@Param
(
"schoolId"
)
Long
schoolId
,
@Param
(
"batchId"
)
Long
batchId
,
@Param
(
"planYear"
)
String
planYear
,
@Param
(
"subjectType"
)
Integer
subjectType
,
...
...
ruoyi-system/src/main/java/com/ruoyi/mall/mapper/MallAcceptRuleMapper.java
View file @
a27fa5cb
...
...
@@ -30,6 +30,13 @@ public interface MallAcceptRuleMapper
*/
public
MallAcceptRule
selectMallAcceptRuleByAcceptRuleStr
(
@Param
(
"ruleStr"
)
String
ruleStr
);
/**
* 录取字符串查询
* @param ruleStr 字符串
* @return
*/
public
List
<
MallAcceptRule
>
selectMallAcceptRuleByAcceptRuleStr2
(
@Param
(
"ruleStr"
)
String
ruleStr
);
/**
* 录取原则
* @return
...
...
ruoyi-system/src/main/java/com/ruoyi/mall/mapper/MallSchoolAcceptMapper.java
View file @
a27fa5cb
...
...
@@ -32,7 +32,7 @@ public interface MallSchoolAcceptMapper
* @return
*/
public
MallSchoolAccept
selectBySchoolIdAndLinkId
(
@Param
(
"schoolId"
)
Long
schoolId
,
public
List
<
MallSchoolAccept
>
selectBySchoolIdAndLinkId
(
@Param
(
"schoolId"
)
Long
schoolId
,
@Param
(
"batchId"
)
Long
batchId
,
@Param
(
"linkId"
)
Long
linkId
,
@Param
(
"acceptYear"
)
String
acceptYear
,
...
...
ruoyi-system/src/main/java/com/ruoyi/mall/service/impl/MallSchoolAcceptServiceImpl.java
View file @
a27fa5cb
...
...
@@ -840,55 +840,54 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
String
ruleStr
=
replaceOther
(
newAcceptBO
.
getRuleStr
());
// 录取原则
BigDecimal
reference
=
newAcceptBO
.
getReference
();
// 参考分
String
acceptYear
=
"2024"
;
// 年份
String
acceptYear
=
newAcceptBO
.
getAcceptYear
()
;
// 年份
String
subjectType
=
newAcceptBO
.
getSubjectType
().
contains
(
"文"
)
?
"0"
:
"1"
;
// 学科
if
(
StringUtils
.
isBlank
(
batchName
)){
//return "第" + index + "行缺少批次名称";
sb
.
append
(
"第
"
+
index
+
"行缺少批次名称;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行缺少批次名称"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少批次名称;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】
行缺少批次名称"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
if
(
StringUtils
.
isBlank
(
schoolName
)){
//return "第" + index + "行缺少学校名称数据";
sb
.
append
(
"第
"
+
index
+
"行缺少学校名称数据;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行缺少学校名称数据"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少学校名称数据;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】
行缺少学校名称数据"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
if
(
StringUtils
.
isBlank
(
majorNameStr
)){
//return "第" + index + "行缺少专业名称";
sb
.
append
(
"第
"
+
index
+
"行缺少专业名称"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行缺少专业名称"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少专业名称"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】
行缺少专业名称"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
if
(
StringUtils
.
isBlank
(
ruleStr
)){
//return "第" + index + "行缺少录取原则";
sb
.
append
(
"第"
+
index
+
"行缺少录取原则;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行缺少录取原则"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
if
(
ObjectUtils
.
isEmpty
(
reference
)){
//return "第" + index + "行缺少参考分";
sb
.
append
(
"第"
+
index
+
"行缺少参考分;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行缺少参考分"
);
sb
.
append
(
"第【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少录取原则;"
).
append
(
System
.
lineSeparator
());
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】行缺少录取原则"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
// if (ObjectUtils.isEmpty(reference)){
// sb.append("第【" +index + "】行学校【"+schoolName+"】缺少参考分;").append(System.lineSeparator());
// errorDataBO.setMsg("第" +index + "行学校【"+schoolName+"】行缺少参考分");
// errorList.add(errorDataBO);
// continue;
// }
if
(
StringUtils
.
isBlank
(
acceptYear
)){
sb
.
append
(
"第
"
+
index
+
"行缺少年份;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行缺少年份;"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少年份;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】
行缺少年份;"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
if
(
StringUtils
.
isBlank
(
subjectType
)){
sb
.
append
(
"第
"
+
index
+
"行缺少学科分类;"
)
;
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行缺少学科分类;"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少学科分类;"
).
append
(
System
.
lineSeparator
())
;
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】
行缺少学科分类;"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
...
...
@@ -906,10 +905,10 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
//return "第" + index + "行批次不存在,请先添加批次或批次名称不正确";
}
// 查询学校
List
<
MallSchool
>
collect
=
schoolList
.
stream
().
filter
(
item
->
item
.
getSchoolName
().
equals
(
replaceOther
(
newAcceptBO
.
getSchoolName
())
)).
collect
(
Collectors
.
toList
());
List
<
MallSchool
>
collect
=
schoolList
.
stream
().
filter
(
item
->
replaceOther
(
item
.
getSchoolName
()).
equals
(
schoolName
)).
collect
(
Collectors
.
toList
());
if
(
ObjectUtils
.
isEmpty
(
collect
)){
sb
.
append
(
"第
"
+
index
+
"学校不存在或学校名称错误:"
+
schoolName
+
";"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"学校
不存在或学校名称错误:"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】不存在或学校名称错误"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"行学校【"
+
schoolName
+
"】
不存在或学校名称错误:"
);
errorList
.
add
(
errorDataBO
);
continue
;
//return "第" + index + "学校不存在或学校名称错误:"+ schoolName;
...
...
@@ -928,8 +927,8 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
BigDecimal
cultureLowest
=
BigDecimal
.
ZERO
;
// 文化分数线
if
(
ObjectUtils
.
isEmpty
(
newAcceptBO
.
getCultureLowest
())){
sb
.
append
(
"第
"
+
index
+
"行缺少文化分数线;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"缺少文化分数线"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少文化分数线;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行学校【"
+
schoolName
+
"】
缺少文化分数线"
);
errorList
.
add
(
errorDataBO
);
continue
;
//return "缺少文化分数线" + index;
...
...
@@ -940,8 +939,8 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
BigDecimal
majorLowest
=
new
BigDecimal
(
"0"
)
;
// 专业分数线
if
(
ObjectUtils
.
isEmpty
(
newAcceptBO
.
getMajorLowest
())){
//majorLowest = new BigDecimal("216");
sb
.
append
(
"第
"
+
index
+
"行缺少联考分数线;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"缺少联考分数线"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】缺少联考分数线;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行学校【"
+
schoolName
+
"】
缺少联考分数线"
);
errorList
.
add
(
errorDataBO
);
continue
;
//return "缺少文化分数线" + index;
...
...
@@ -981,8 +980,8 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
// twoIds.append(collect2.get(0).getMajorId()).append(",");
//}
if
(
ObjectUtils
.
isEmpty
(
linkMajorSchool
)){
sb
.
append
(
"第
"
+
index
+
"专业未录入;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"专业未录入或名称错误"
);
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】【"
+
majorNameStr
+
"】专业未录入;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行学校【"
+
schoolName
+
"】
专业未录入或名称错误"
);
errorList
.
add
(
errorDataBO
);
continue
;
//return "专业未录入" + index + "-" + schoolName + "-" + majorNameStr;
...
...
@@ -1009,20 +1008,20 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
}
// 查询录取原则
MallAcceptRule
acceptRule
=
mallAcceptRuleMapper
.
selectMallAcceptRuleByAcceptRuleStr
(
ruleStr
);
List
<
MallAcceptRule
>
acceptRule
=
mallAcceptRuleMapper
.
selectMallAcceptRuleByAcceptRuleStr2
(
ruleStr
);
Long
acceptRuleId
=
0L
;
if
(
ObjectUtils
.
isEmpty
(
acceptRule
)){
sb
.
append
(
"第
"
+
index
+
"录取原则不存在或录入错误;"
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"录取原则不存在或录入错误"
);
if
(
acceptRule
.
isEmpty
(
)){
sb
.
append
(
"第
【"
+
index
+
"】行学校【"
+
schoolName
+
"】录取原则【"
+
ruleStr
+
"】不存在或录入错误;"
).
append
(
System
.
lineSeparator
()
);
errorDataBO
.
setMsg
(
"第"
+
index
+
"
行学校【"
+
schoolName
+
"】
录取原则不存在或录入错误"
);
errorList
.
add
(
errorDataBO
);
continue
;
}
else
{
acceptRuleId
=
acceptRule
.
getAcceptRuleId
();
acceptRuleId
=
acceptRule
.
get
(
0
).
get
AcceptRuleId
();
}
// 查询是否已导入数据
MallSchoolAccept
schoolAccep
t
=
mallSchoolAcceptMapper
.
selectBySchoolIdAndLinkId
(
school
.
getSchoolId
(),
mallBatch
.
getBatchId
(),
linkId
,
acceptYear
,
subjectType
);
if
(
ObjectUtils
.
isEmpty
(
schoolAccept
)){
List
<
MallSchoolAccept
>
schoolAcceptLis
t
=
mallSchoolAcceptMapper
.
selectBySchoolIdAndLinkId
(
school
.
getSchoolId
(),
mallBatch
.
getBatchId
(),
linkId
,
acceptYear
,
subjectType
);
if
(
schoolAcceptList
.
isEmpty
(
)){
// 生成新专业录取数据
MallSchoolAccept
mallSchoolAccept
=
new
MallSchoolAccept
();
mallSchoolAccept
.
setSchoolId
(
school
.
getSchoolId
());
...
...
@@ -1076,6 +1075,7 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
}
else
{
b
++;
// 修改数据
MallSchoolAccept
schoolAccept
=
schoolAcceptList
.
get
(
0
);
// 生成新专业录取数据
schoolAccept
.
setAcceptNum
(
acceptNum
);
schoolAccept
.
setAcceptLowest
(
acceptLowest
);
...
...
@@ -1086,9 +1086,9 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
mallSchoolAcceptMapper
.
updateMallSchoolAccept
(
schoolAccept
);
// 修改招生计划
MallAcceptPlan
plan
=
mallAcceptPlanMapper
.
selectPlan
(
school
.
getSchoolId
(),
mallBatch
.
getBatchId
(),
acceptYear
,
Integer
.
valueOf
(
subjectType
),
linkId
);
if
(
ObjectUtils
.
isNotEmpty
(
plan
)){
List
<
MallAcceptPlan
>
mallAcceptPlanList
=
mallAcceptPlanMapper
.
selectPlan
(
school
.
getSchoolId
(),
mallBatch
.
getBatchId
(),
acceptYear
,
Integer
.
valueOf
(
subjectType
),
linkId
);
if
(
!
mallAcceptPlanList
.
isEmpty
(
)){
MallAcceptPlan
plan
=
mallAcceptPlanList
.
get
(
0
);
plan
.
setAcceptNum
(
acceptNum
);
plan
.
setSchoolPrice
(
schoolPrice
);
plan
.
setAcceptRuleId
(
acceptRuleId
);
...
...
@@ -1279,8 +1279,8 @@ public class MallSchoolAcceptServiceImpl implements IMallSchoolAcceptService {
MallAcceptRule
acceptRule
=
mallAcceptRuleMapper
.
selectRuleStr
(
ruleStr
);
// 查询是否已导入数据
MallSchoolAccept
schoolAccep
t
=
mallSchoolAcceptMapper
.
selectBySchoolIdAndLinkId
(
schoolId
,
4L
,
linkId
,
acceptYear
,
subjectType
);
if
(
ObjectUtils
.
isEmpty
(
schoolAccept
)){
List
<
MallSchoolAccept
>
schoolAcceptLis
t
=
mallSchoolAcceptMapper
.
selectBySchoolIdAndLinkId
(
schoolId
,
4L
,
linkId
,
acceptYear
,
subjectType
);
if
(
schoolAcceptList
.
isEmpty
(
)){
// 生成新专业录取数据
MallSchoolAccept
mallSchoolAccept
=
new
MallSchoolAccept
();
mallSchoolAccept
.
setSchoolId
(
schoolId
);
...
...
ruoyi-system/src/main/resources/mapper/mall/MallAcceptPlanMapper.xml
View file @
a27fa5cb
...
...
@@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"selectPlan"
resultType=
"MallAcceptPlan"
>
<select
id=
"selectPlan"
resultType=
"
com.ruoyi.mall.domain.
MallAcceptPlan"
>
select accept_plan_id acceptPlanId,
school_id schoolId,
batch_id batchId,
...
...
@@ -169,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and plan_year = #{planYear}
and subject_type = #{subjectType}
and link_id = #{linkId} and del_flag = '0'
order by create_at desc
</select>
<select
id=
"selectSchoolPrice"
parameterType=
"Long"
resultType=
"MallAcceptPlan"
>
...
...
ruoyi-system/src/main/resources/mapper/mall/MallAcceptRuleMapper.xml
View file @
a27fa5cb
...
...
@@ -55,6 +55,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and del_flag = '0'
</select>
<select
id=
"selectMallAcceptRuleByAcceptRuleStr2"
resultMap=
"MallAcceptRuleResult"
>
<include
refid=
"selectMallAcceptRuleVo"
/>
where rule_str = #{ruleStr}
and del_flag = '0'
order by create_at desc
</select>
<select
id=
"selectNewAcceptRule"
resultMap=
"MallAcceptRuleResult"
>
<include
refid=
"selectMallAcceptRuleVo"
/>
where is_new = 1
...
...
ruoyi-system/src/main/resources/mapper/mall/MallSchoolAcceptMapper.xml
View file @
a27fa5cb
...
...
@@ -97,7 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where school_accept_id = #{schoolAcceptId}
</select>
<select
id=
"selectBySchoolIdAndLinkId"
resultType=
"MallSchoolAccept"
>
<select
id=
"selectBySchoolIdAndLinkId"
resultType=
"
com.ruoyi.mall.domain.
MallSchoolAccept"
>
select msa.school_accept_id schoolAcceptId,
msa.school_id schoolId,
msa.major_id majorId,
...
...
@@ -120,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and link_id = #{linkId}
and accept_year = #{acceptYear}
and subject_type = #{subjectType}
order by create_at desc
</select>
<insert
id=
"insertMallSchoolAccept"
parameterType=
"MallSchoolAccept"
useGeneratedKeys=
"true"
keyProperty=
"schoolAcceptId"
>
...
...
ruoyi-ui/src/views/mall/mallSchoolAccept/index.vue
View file @
a27fa5cb
...
...
@@ -139,7 +139,7 @@
<el-input
v-model=
"form.schoolName"
placeholder=
"请输入学校名"
/>
</el-form-item>
<el-form-item
label=
"批次"
prop=
"batchId"
>
<el-select
v-model=
"form.batchId"
placeholder=
"请选择批次"
>
<el-select
v-model=
"form.batchId"
filterable
placeholder=
"请选择批次"
>
<el-option
v-for=
"item in batchList"
:key=
"item.batchId"
...
...
@@ -149,7 +149,7 @@
</el-select>
</el-form-item>
<el-form-item
label=
"专业"
prop=
"majorId"
>
<el-select
v-model=
"form.majorId"
placeholder=
"请选择专业"
>
<el-select
v-model=
"form.majorId"
filterable
placeholder=
"请选择专业"
>
<el-option
v-for=
"item in majorList"
:key=
"item.majorId"
...
...
@@ -182,7 +182,7 @@
</el-radio-group>
</el-form-item>
<el-form-item
label=
"录取原则"
prop=
"acceptRuleId"
>
<el-select
v-model=
"form.acceptRuleId"
>
<el-select
v-model=
"form.acceptRuleId"
filterable
>
<el-option
v-for=
"item in ruleList"
:value=
"item.acceptRuleId"
:key=
"item.acceptRuleId"
...
...
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