Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
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
李丛阳
education
Commits
9cdc52f3
Commit
9cdc52f3
authored
May 30, 2018
by
YangZhaoJun1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重新转换ppt接口
parent
be0ebdae
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
164 additions
and
83 deletions
+164
-83
BSubtaskRepository.java
...org/rcisoft/business/barrange/dao/BSubtaskRepository.java
+1
-1
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+72
-59
BFileController.java
...rg/rcisoft/business/bfile/controller/BFileController.java
+14
-0
BFileService.java
...java/org/rcisoft/business/bfile/service/BFileService.java
+2
-0
BFileServiceImpl.java
...rcisoft/business/bfile/service/impl/BFileServiceImpl.java
+53
-3
BGradeServiceImpl.java
...isoft/business/bgrade/service/impl/BGradeServiceImpl.java
+12
-10
BRClassStudentRepository.java
...business/brclassstudent/dao/BRClassStudentRepository.java
+3
-5
BStudentRepository.java
...org/rcisoft/business/bstudent/dao/BStudentRepository.java
+2
-2
BTermRepository.java
.../java/org/rcisoft/business/bterm/dao/BTermRepository.java
+5
-3
No files found.
src/main/java/org/rcisoft/business/barrange/dao/BSubtaskRepository.java
View file @
9cdc52f3
...
@@ -14,7 +14,7 @@ public interface BSubtaskRepository extends BaseMapper<BSubtask> {
...
@@ -14,7 +14,7 @@ public interface BSubtaskRepository extends BaseMapper<BSubtask> {
// @Select("SELECT DISTINCT(`status`) from b_subtask\n" +
// @Select("SELECT DISTINCT(`status`) from b_subtask\n" +
// "where arrange_id = \n" +
// "where arrange_id = \n" +
// "(SELECT arrange_id FROM b_subtask where business_id = #{subTaskId})")
// "(SELECT arrange_id FROM b_subtask where business_id = #{subTaskId})")
@Select
(
"SELECT DISTINCT(status) from b_subtask where arrange_id = #{0}"
)
@Select
(
"SELECT DISTINCT(status) from b_subtask where arrange_id = #{0}
and del_flag = 0
"
)
List
<
String
>
querySubTaskStatusById
(
String
arrangeId
);
List
<
String
>
querySubTaskStatusById
(
String
arrangeId
);
@Select
(
"SELECT arrange_id FROM b_subtask where business_id = #{subTaskId}"
)
@Select
(
"SELECT arrange_id FROM b_subtask where business_id = #{subTaskId}"
)
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
9cdc52f3
...
@@ -274,79 +274,92 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -274,79 +274,92 @@ public class BChapterServiceImpl implements BChapterService {
chapterList
.
add
(
sl_chapter
);
chapterList
.
add
(
sl_chapter
);
}
}
for
(
int
i
=
0
;
i
<
chapterList
.
size
();
i
++){
if
(!
chapterList
.
get
(
i
).
getPid
().
equals
(
"-1"
)){
//取出map中存放的新的章ID作为父节点ID
chapterList
.
get
(
i
).
setPid
(
String
.
valueOf
(
map
.
get
(
chapterList
.
get
(
i
).
getLPid
())));
}
}
if
(
chapterList
.
size
()>
0
){
if
(
chapterList
.
size
()>
0
){
for
(
int
i
=
0
;
i
<
chapterList
.
size
();
i
++){
if
(!
chapterList
.
get
(
i
).
getPid
().
equals
(
"-1"
)){
//取出map中存放的新的章ID作为父节点ID
chapterList
.
get
(
i
).
setPid
(
String
.
valueOf
(
map
.
get
(
chapterList
.
get
(
i
).
getLPid
())));
}
}
result
=
bChapterRepository
.
insertChapterList
(
chapterList
);
result
=
bChapterRepository
.
insertChapterList
(
chapterList
);
}
String
oldPath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()+
File
.
separator
+
global
.
getCOURSE_LOCATION
()+
File
.
separator
+
global
.
getLESSON_LOCATION
()+
File
.
separator
+
bLessonId
;
String
newPath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()+
File
.
separator
+
global
.
getCOURSE_LOCATION
()+
File
.
separator
+
global
.
getSL_LOCATION
()+
File
.
separator
+
slId
;
//复制章节的所有文件
String
oldPath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()+
File
.
separator
try
{
+
global
.
getCOURSE_LOCATION
()+
File
.
separator
copyFileToSl
(
oldPath
,
newPath
);
+
global
.
getLESSON_LOCATION
()+
File
.
separator
+
bLessonId
;
String
newPath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()+
File
.
separator
+
global
.
getCOURSE_LOCATION
()+
File
.
separator
+
global
.
getSL_LOCATION
()+
File
.
separator
+
slId
;
//复制章节的所有文件
try
{
File
file
=
new
File
(
oldPath
);
if
(
file
.
exists
()){
copyFileToSl
(
oldPath
,
newPath
);
}
/*File oldFile = new File(oldPath);
/*File oldFile = new File(oldPath);
File newFile = new File(newPath);
File newFile = new File(newPath);
FileUtils.copyDirectory(oldFile,newFile,true);*/
FileUtils.copyDirectory(oldFile,newFile,true);*/
}
catch
(
IOException
e
)
{
}
catch
(
IOException
e
)
{
throw
new
ServiceException
(
ResultServiceEnums
.
COPY_FILES_ERROR
);
throw
new
ServiceException
(
ResultServiceEnums
.
COPY_FILES_ERROR
);
}
}
//数据库操作
for
(
BChapter
leBChapter
:
lessonList
){
//数据库操作
for
(
BChapter
slChapter
:
chapterList
){
for
(
BChapter
leBChapter
:
lessonList
){
if
(
leBChapter
.
getSPid
().
equals
(
slChapter
.
getSPid
())&&!
leBChapter
.
getPid
().
equals
(
"-1"
)){
for
(
BChapter
slChapter
:
chapterList
){
BFile
bFile
=
bFileRepository
.
queryBVideoByChapterId
(
leBChapter
.
getBusinessId
());
if
(
leBChapter
.
getSPid
().
equals
(
slChapter
.
getSPid
())&&!
leBChapter
.
getPid
().
equals
(
"-1"
)){
BFile
newVideo
=
new
BFile
();
BFile
bFile
=
bFileRepository
.
queryBVideoByChapterId
(
leBChapter
.
getBusinessId
());
newVideo
.
setChapterId
(
slChapter
.
getBusinessId
());
BFile
newVideo
=
new
BFile
();
UserUtil
.
setCurrentPersistOperation
(
newVideo
);
newVideo
.
setChapterId
(
slChapter
.
getBusinessId
());
//将节的ID替换成新的
UserUtil
.
setCurrentPersistOperation
(
newVideo
);
if
(
bFile
!=
null
){
//将节的ID替换成新的
newVideo
.
setVideoName
(
bFile
.
getVideoName
());
if
(
bFile
!=
null
){
if
(
bFile
.
getVideoUrl
()!=
null
&&!
bFile
.
getVideoUrl
().
equals
(
""
)){
newVideo
.
setVideoName
(
bFile
.
getVideoName
());
String
newUrl
=
bFile
.
getVideoUrl
().
replace
(
bLessonId
,
slId
);
if
(
bFile
.
getVideoUrl
()!=
null
&&!
bFile
.
getVideoUrl
().
equals
(
""
)){
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
String
newUrl
=
bFile
.
getVideoUrl
().
replace
(
bLessonId
,
slId
);
newVideo
.
setVideoUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
}
newVideo
.
setVideoUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
if
(
bFile
.
getFileUrl
()!=
null
&&!
bFile
.
getFileUrl
().
equals
(
""
)){
}
String
newUrl
=
bFile
.
getFileUrl
().
replace
(
bLessonId
,
slId
);
if
(
bFile
.
getFileUrl
()!=
null
&&!
bFile
.
getFileUrl
().
equals
(
""
)){
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
String
newUrl
=
bFile
.
getFileUrl
().
replace
(
bLessonId
,
slId
);
newVideo
.
setFileUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
}
newVideo
.
setFileUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
if
(
bFile
.
getPptUrl
()!=
null
&&!
bFile
.
getPptUrl
().
equals
(
""
)){
}
String
newUrl
=
bFile
.
getPptUrl
().
replace
(
bLessonId
,
slId
);
if
(
bFile
.
getPptUrl
()!=
null
&&!
bFile
.
getPptUrl
().
equals
(
""
)){
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
String
newUrl
=
bFile
.
getPptUrl
().
replace
(
bLessonId
,
slId
);
newVideo
.
setPptUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
}
newVideo
.
setPptUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
if
(
bFile
.
getPdfUrl
()!=
null
&&!
bFile
.
getPdfUrl
().
equals
(
""
)){
}
String
newUrl
=
bFile
.
getPdfUrl
().
replace
(
bLessonId
,
slId
);
if
(
bFile
.
getPdfUrl
()!=
null
&&!
bFile
.
getPdfUrl
().
equals
(
""
)){
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
String
newUrl
=
bFile
.
getPdfUrl
().
replace
(
bLessonId
,
slId
);
newVideo
.
setPdfUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
String
path
=
newUrl
.
replace
(
leBChapter
.
getBusinessId
(),
slChapter
.
getBusinessId
());
newVideo
.
setPdfUrl
(
path
.
replace
(
global
.
getLESSON_LOCATION
(),
global
.
getSL_LOCATION
()));
}
//重命名复制之后的文件
String
filePath
=
newPath
+
File
.
separator
+
leBChapter
.
getBusinessId
();
String
newFilePath
=
newPath
+
File
.
separator
+
slChapter
.
getBusinessId
();
File
file
=
new
File
(
filePath
);
file
.
renameTo
(
new
File
(
newFilePath
));
//插入对象
newVideo
.
setSlId
(
slId
);
bFileRepository
.
insertSelective
(
newVideo
);
}
}
//重命名复制之后的文件
String
filePath
=
newPath
+
File
.
separator
+
leBChapter
.
getBusinessId
();
String
newFilePath
=
newPath
+
File
.
separator
+
slChapter
.
getBusinessId
();
File
file
=
new
File
(
filePath
);
file
.
renameTo
(
new
File
(
newFilePath
));
//插入对象
newVideo
.
setSlId
(
slId
);
bFileRepository
.
insertSelective
(
newVideo
);
}
}
}
}
}
}
}
}
return
result
;
return
result
;
}
}
...
...
src/main/java/org/rcisoft/business/bfile/controller/BFileController.java
View file @
9cdc52f3
...
@@ -192,5 +192,19 @@ public class BFileController extends PaginationController<BFile> {
...
@@ -192,5 +192,19 @@ public class BFileController extends PaginationController<BFile> {
""
);
""
);
}
}
@ApiOperation
(
value
=
"重新转换ppt"
,
notes
=
"重新转换ppt"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"课程或开课的ID"
,
required
=
true
,
dataType
=
"varchar"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"'0'开课,'1'课程"
,
required
=
true
,
dataType
=
"varchar"
)})
@GetMapping
(
value
=
"/reConversionPPTWithoutAuth"
)
public
Result
reConversionPPTWithoutAuth
(
String
businessId
,
String
type
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bFileService
.
reConversionPPT
(
businessId
,
type
));
}
}
}
src/main/java/org/rcisoft/business/bfile/service/BFileService.java
View file @
9cdc52f3
...
@@ -57,4 +57,6 @@ public interface BFileService {
...
@@ -57,4 +57,6 @@ public interface BFileService {
* @param file
* @param file
*/
*/
public
void
uploadLicense
(
MultipartFile
file
)
throws
IOException
;
public
void
uploadLicense
(
MultipartFile
file
)
throws
IOException
;
List
<
String
>
reConversionPPT
(
String
businessId
,
String
type
);
}
}
src/main/java/org/rcisoft/business/bfile/service/impl/BFileServiceImpl.java
View file @
9cdc52f3
...
@@ -25,6 +25,10 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -25,6 +25,10 @@ import org.springframework.transaction.annotation.Transactional;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.io.*
;
import
java.io.*
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -85,6 +89,7 @@ public class BFileServiceImpl implements BFileService {
...
@@ -85,6 +89,7 @@ public class BFileServiceImpl implements BFileService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
String
uploadVideoToServer
(
List
<
MultipartFile
>
list
,
BFile
bFile
,
String
token
)
{
public
String
uploadVideoToServer
(
List
<
MultipartFile
>
list
,
BFile
bFile
,
String
token
)
{
String
videoUrl
=
""
;
String
videoUrl
=
""
;
...
@@ -228,7 +233,6 @@ public class BFileServiceImpl implements BFileService {
...
@@ -228,7 +233,6 @@ public class BFileServiceImpl implements BFileService {
if
(!
outFile
.
exists
()){
//判断保存路径是否存在,不存在新建
if
(!
outFile
.
exists
()){
//判断保存路径是否存在,不存在新建
outFile
.
mkdirs
();
outFile
.
mkdirs
();
}
}
//上传文件
//上传文件
String
uploadFile
=
file
.
getOriginalFilename
();
String
uploadFile
=
file
.
getOriginalFilename
();
...
@@ -318,8 +322,54 @@ public class BFileServiceImpl implements BFileService {
...
@@ -318,8 +322,54 @@ public class BFileServiceImpl implements BFileService {
return
;
return
;
}
}
/**
* 重新转换ppt
* @param businessId
* @param type 0开课 1课程
* @return
*/
@Override
public
List
<
String
>
reConversionPPT
(
String
businessId
,
String
type
)
{
List
<
String
>
failPPTPath
=
new
ArrayList
<>();
try
{
String
basePath
=
global
.
getSL_LOCATION
();
if
(
type
.
equals
(
"1"
)){
basePath
=
global
.
getLESSON_LOCATION
();
}
String
path
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()
+
File
.
separator
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
basePath
+
File
.
separator
+
businessId
;
File
file
=
new
File
(
path
);
failPPTPath
=
this
.
changePPTToPDF
(
file
,
failPPTPath
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
return
failPPTPath
;
}
private
List
<
String
>
changePPTToPDF
(
File
slFile
,
List
<
String
>
failPPTPath
)
throws
IOException
{
for
(
File
chapterFile
:
slFile
.
listFiles
())
{
String
pptPath
=
chapterFile
.
getPath
()+
File
.
separator
+
"ppt"
;
File
pptFile
=
new
File
(
pptPath
);
if
(
pptFile
.
exists
()){
File
[]
pptFiles
=
pptFile
.
listFiles
();
if
(
pptFiles
.
length
==
1
&&
pptFiles
[
0
].
getName
().
endsWith
(
"ppt"
)){
failPPTPath
.
add
(
pptFiles
[
0
].
getPath
());
String
inputFile
=
pptFiles
[
0
].
getPath
();
String
outputFile
=
pptFiles
[
0
].
getPath
().
substring
(
0
,
pptFiles
[
0
].
getPath
().
lastIndexOf
(
"."
))
+
".pdf"
;
slTask
.
officeToPdf
(
inputFile
,
outputFile
);
}
}
}
return
failPPTPath
;
}
public
String
uploadFileToServer
(
MultipartFile
file
,
BFile
bFile
)
throws
Exception
{
/*
public String uploadFileToServer(MultipartFile file, BFile bFile) throws Exception{
String fileUrl = "";
String fileUrl = "";
//查询此节是否已有视频或文件
//查询此节是否已有视频或文件
BFile f = bFileRepository.selectInfoByChapterId(bFile.getChapterId());
BFile f = bFileRepository.selectInfoByChapterId(bFile.getChapterId());
...
@@ -339,7 +389,7 @@ public class BFileServiceImpl implements BFileService {
...
@@ -339,7 +389,7 @@ public class BFileServiceImpl implements BFileService {
}
}
}
}
return fileUrl;
return fileUrl;
}
}
*/
...
...
src/main/java/org/rcisoft/business/bgrade/service/impl/BGradeServiceImpl.java
View file @
9cdc52f3
...
@@ -130,18 +130,20 @@ public class BGradeServiceImpl implements BGradeService {
...
@@ -130,18 +130,20 @@ public class BGradeServiceImpl implements BGradeService {
newGrades
.
add
(
grade
);
newGrades
.
add
(
grade
);
}
}
bGradeRepository
.
insertList
(
newGrades
);
bGradeRepository
.
insertList
(
newGrades
);
}
}
else
{
//查询是否有本年的年级
//查询是否有本年的年级
// List<BGrade> bGrades = bGradeRepository.queryBGradeByNowYear(nowYear);
// List<BGrade> bGrades = bGradeRepository.queryBGradeByNowYear(nowYear);
String
nowYearCode
=
grades
.
get
(
0
).
getCode
();
String
nowYearCode
=
grades
.
get
(
0
).
getCode
();
if
(!
nowYearCode
.
equals
(
nowYear
)){
//没有就新增
if
(!
nowYearCode
.
equals
(
nowYear
)){
//没有就新增
BGrade
grade
=
new
BGrade
();
BGrade
grade
=
new
BGrade
();
grade
.
setCode
(
nowYear
);
grade
.
setCode
(
nowYear
);
grade
.
setName
(
nowYear
+
"级"
);
grade
.
setName
(
nowYear
+
"级"
);
UserUtil
.
setCurrentPersistOperation
(
grade
);
UserUtil
.
setCurrentPersistOperation
(
grade
);
bGradeRepository
.
insertSelective
(
grade
);
bGradeRepository
.
insertSelective
(
grade
);
}
}
}
grades
=
bGradeRepository
.
queryFirstFiveBGrades
(
bGrade
);
grades
=
bGradeRepository
.
queryFirstFiveBGrades
(
bGrade
);
return
grades
;
return
grades
;
}
}
...
...
src/main/java/org/rcisoft/business/brclassstudent/dao/BRClassStudentRepository.java
View file @
9cdc52f3
package
org
.
rcisoft
.
business
.
brclassstudent
.
dao
;
package
org
.
rcisoft
.
business
.
brclassstudent
.
dao
;
import
org.apache.ibatis.annotations.Delete
;
import
org.apache.ibatis.annotations.*
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.business.brclassstudent.entity.BRClassStudent
;
import
org.rcisoft.business.brclassstudent.entity.BRClassStudent
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.security.access.method.P
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
import
java.util.List
;
...
@@ -75,6 +73,6 @@ public interface BRClassStudentRepository extends BaseMapper<BRClassStudent> {
...
@@ -75,6 +73,6 @@ public interface BRClassStudentRepository extends BaseMapper<BRClassStudent> {
"WHERE bcs.student_code=#{studentCode} "
+
"WHERE bcs.student_code=#{studentCode} "
+
"AND bc.type=#{type}</script>"
)
"AND bc.type=#{type}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BRClassStudent
queryClassStudent
(
String
studentCode
,
String
type
);
BRClassStudent
queryClassStudent
(
@Param
(
"studentCode"
)
String
studentCode
,
@Param
(
"type"
)
String
type
);
}
}
src/main/java/org/rcisoft/business/bstudent/dao/BStudentRepository.java
View file @
9cdc52f3
...
@@ -33,7 +33,6 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
...
@@ -33,7 +33,6 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
"LEFT JOIN b_grade bg ON b.grade_code = bg.`code`\n"
+
"LEFT JOIN b_grade bg ON b.grade_code = bg.`code`\n"
+
"where b.del_flag != 1 and b.flag = 1 "
+
"where b.del_flag != 1 and b.flag = 1 "
+
"<if test=\"condition!=null and condition != ''\">and u.`name` like CONCAT('%',#{condition},'%') or b.`code` like CONCAT('%',#{condition},'%') </if>"
+
"<if test=\"condition!=null and condition != ''\">and u.`name` like CONCAT('%',#{condition},'%') or b.`code` like CONCAT('%',#{condition},'%') </if>"
+
//"order by b.grade_code desc" +
"order by b.create_date desc"
+
"order by b.create_date desc"
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
@@ -64,6 +63,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
...
@@ -64,6 +63,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
"<if test=\"classCode!=null and classCode != ''\">\n"
+
"<if test=\"classCode!=null and classCode != ''\">\n"
+
" AND t6.code = #{classCode}\n"
+
" AND t6.code = #{classCode}\n"
+
"</if>"
+
"</if>"
+
"group by t3.code "
+
"order by className asc,code asc</script>"
)
"order by className asc,code asc</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BStudent
>
queryStudentBySlCode
(
@Param
(
"slCode"
)
String
slCode
,
@Param
(
"classCode"
)
String
classCode
);
List
<
BStudent
>
queryStudentBySlCode
(
@Param
(
"slCode"
)
String
slCode
,
@Param
(
"classCode"
)
String
classCode
);
...
@@ -178,7 +178,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
...
@@ -178,7 +178,7 @@ public interface BStudentRepository extends BaseMapper<BStudent> {
"LEFT JOIN b_r_class_student bcs on bcs.student_code = bs.`code` "
+
"LEFT JOIN b_r_class_student bcs on bcs.student_code = bs.`code` "
+
"LEFT JOIN b_class bc on bc.`code` = bcs.class_code "
+
"LEFT JOIN b_class bc on bc.`code` = bcs.class_code "
+
"WHERE FIND_IN_SET(bcs.class_code,( "
+
"WHERE FIND_IN_SET(bcs.class_code,( "
+
"SELECT bec.classes_id FROM b_edu_class bec WHERE bec.`code` =
'D0001'
)) "
+
"SELECT bec.classes_id FROM b_edu_class bec WHERE bec.`code` =
#{classCode}
)) "
+
"GROUP BY bs.`code` "
+
"GROUP BY bs.`code` "
+
"ORDER BY bs.`code`"
)
"ORDER BY bs.`code`"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
...
...
src/main/java/org/rcisoft/business/bterm/dao/BTermRepository.java
View file @
9cdc52f3
...
@@ -70,11 +70,13 @@ public interface BTermRepository extends BaseMapper<BTerm> {
...
@@ -70,11 +70,13 @@ public interface BTermRepository extends BaseMapper<BTerm> {
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BTerm
queryCurrentTerm
(
String
termCode
);
BTerm
queryCurrentTerm
(
String
termCode
);
@Select
(
"select * from b_term "
+
@Select
(
"
<script>
select * from b_term "
+
"WHERE (#{startDate} BETWEEN start_date AND end_date) "
+
"WHERE (
(
#{startDate} BETWEEN start_date AND end_date) "
+
"OR (#{endDate} BETWEEN start_date AND end_date) "
+
"OR (#{endDate} BETWEEN start_date AND end_date) "
+
"OR (start_date BETWEEN #{startDate} AND #{endDate}) "
+
"OR (start_date BETWEEN #{startDate} AND #{endDate}) "
+
"OR (end_date BETWEEN #{startDate} AND #{endDate})"
)
"OR (end_date BETWEEN #{startDate} AND #{endDate})) "
+
"<if test=\"businessId !=null and businessId != '' \">and business_id != #{businessId} </if>"
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BTerm
>
queryBTermsByStartDateOrEndDate
(
BTerm
model
);
List
<
BTerm
>
queryBTermsByStartDateOrEndDate
(
BTerm
model
);
...
...
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