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
32c69808
Commit
32c69808
authored
Oct 16, 2019
by
王淑君
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
8abd7980
20106f99
Changes
43
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
1346 additions
and
295 deletions
+1346
-295
BBannerRepository.java
...a/org/rcisoft/business/bbanner/dao/BBannerRepository.java
+17
-2
BBanner.java
...ain/java/org/rcisoft/business/bbanner/entity/BBanner.java
+7
-1
BBannerService.java
.../org/rcisoft/business/bbanner/service/BBannerService.java
+1
-1
BBannerServiceImpl.java
...oft/business/bbanner/service/impl/BBannerServiceImpl.java
+3
-5
BChapterRepository.java
...org/rcisoft/business/bchapter/dao/BChapterRepository.java
+34
-18
QueryChapterListResDTO.java
...rcisoft/business/bchapter/dto/QueryChapterListResDTO.java
+4
-7
BChapter.java
...n/java/org/rcisoft/business/bchapter/entity/BChapter.java
+0
-6
BChapterService.java
...rg/rcisoft/business/bchapter/service/BChapterService.java
+0
-3
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+24
-10
uploadDTO.java
src/main/java/org/rcisoft/business/bfile/dto/uploadDTO.java
+3
-0
BFileServiceImpl.java
...rcisoft/business/bfile/service/impl/BFileServiceImpl.java
+1
-1
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+33
-10
BAppointRepository.java
.../org/rcisoft/business/blesson/dao/BAppointRepository.java
+29
-1
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+109
-3
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+174
-107
BRecommendRepository.java
...rg/rcisoft/business/blesson/dao/BRecommendRepository.java
+41
-1
AddMyLearnLessonDTO.java
...org/rcisoft/business/blesson/dto/AddMyLearnLessonDTO.java
+15
-0
AppointLessonDTO.java
...va/org/rcisoft/business/blesson/dto/AppointLessonDTO.java
+6
-1
FindLessonRecommendDTO.java
.../rcisoft/business/blesson/dto/FindLessonRecommendDTO.java
+23
-0
FindLessonRecommendRspDTO.java
...isoft/business/blesson/dto/FindLessonRecommendRspDTO.java
+22
-0
LessonRecommendDepartDTO.java
...cisoft/business/blesson/dto/LessonRecommendDepartDTO.java
+14
-0
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+5
-0
BRecommendSon.java
...va/org/rcisoft/business/blesson/entity/BRecommendSon.java
+5
-2
BLessonPersonService.java
...cisoft/business/blesson/service/BLessonPersonService.java
+9
-0
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+14
-1
BLessonPersonServiceImpl.java
...siness/blesson/service/impl/BLessonPersonServiceImpl.java
+24
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+130
-40
BMaterialController.java
...ft/business/bmaterial/controller/BMaterialController.java
+99
-0
BMaterialRepository.java
...g/rcisoft/business/bmaterial/dao/BMaterialRepository.java
+56
-0
BMaterial.java
...java/org/rcisoft/business/bmaterial/entity/BMaterial.java
+43
-0
BMaterialService.java
.../rcisoft/business/bmaterial/service/BMaterialService.java
+62
-0
BMaterialServiceImpl.java
...business/bmaterial/service/impl/BMaterialServiceImpl.java
+107
-0
SynchronizationTimeService.java
...nchronizationtime/service/SynchronizationTimeService.java
+2
-3
CurUserAspect.java
src/main/java/org/rcisoft/core/aop/CurUserAspect.java
+1
-1
SysUserController.java
...va/org/rcisoft/sys/user/controller/SysUserController.java
+9
-0
SysUserMapper.java
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
+39
-0
MyInfoDTO.java
src/main/java/org/rcisoft/sys/user/dto/MyInfoDTO.java
+27
-0
SysUserService.java
...ain/java/org/rcisoft/sys/user/service/SysUserService.java
+9
-0
SysUserServiceImpl.java
...org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
+12
-3
application-mt.yml
src/main/resources/application-mt.yml
+103
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+8
-0
BChapterMapper.xml
...ources/mapper/business/bchapter/mapper/BChapterMapper.xml
+0
-68
BMaterialMapper.xml
...rces/mapper/business/bmaterial/mapper/BMaterialMapper.xml
+22
-0
No files found.
src/main/java/org/rcisoft/business/bbanner/dao/BBannerRepository.java
View file @
32c69808
...
...
@@ -28,14 +28,14 @@ public interface BBannerRepository extends BaseMapper<BBanner> {
* @param param
* @return
*/
@Select
(
"<script>select bb.* , bl.lesson_name lessonName from b_banner bb "
+
@Select
(
"<script>select bb.* , bl.lesson_name lessonName
,bl.default_url lessonDefaultUrl
from b_banner bb "
+
" left join b_lesson bl on bb.course_id = bl.business_id "
+
" and bl.corp_id = #{corpId} "
+
" and bl.del_flag='0' and bl.flag = '1'"
+
" where bb.del_flag='0' and bb.flag = '1' "
+
" <if test=\"businessId!=null and businessId != ''\">and bb.business_id = #{businessId}
)
</if>"
+
" <if test=\"businessId!=null and businessId != ''\">and bb.business_id = #{businessId}</if>"
+
" <if test=\"title!=null and title != ''\">and bb.title like CONCAT('%',#{title},'%')</if>"
+
" <if test=\"isExternalLink!=null and isExternalLink != ''\">and bb.is_external_link=#{isExternalLink}</if>"
+
" <if test=\"lineType!=null and lineType != ''\">and bb.line_type=#{lineType}</if>"
+
...
...
@@ -47,6 +47,21 @@ public interface BBannerRepository extends BaseMapper<BBanner> {
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BBanner
>
queryBanners
(
FindBannerPaginDTO
param
);
@Select
(
"<script>select bb.* , bl.lesson_name lessonName ,bl.default_url from b_banner bb "
+
" left join b_lesson bl on bb.course_id = bl.business_id "
+
// " and bl.corp_id = #{corpId} "+
" and bl.del_flag='0' and bl.flag = '1'"
+
" where bb.del_flag='0' and bb.flag = '1' "
+
" and bb.business_id = #{businessId}"
+
// " and bb.corp_id = #{corpId} "+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BBanner
queryOne
(
String
businessId
);
/**
* 按id查询个数
* @param id
...
...
src/main/java/org/rcisoft/business/bbanner/entity/BBanner.java
View file @
32c69808
...
...
@@ -11,6 +11,7 @@ import org.rcisoft.sys.dept.entity.SysDept;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
javax.validation.constraints.NotBlank
;
...
...
@@ -23,7 +24,7 @@ import javax.validation.constraints.NotBlank;
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
BBanner
extends
IdEntity
<
SysDept
>
{
public
class
BBanner
extends
IdEntity
<
BBanner
>
{
private
static
final
long
serialVersionUID
=
8683139175568024924L
;
...
...
@@ -58,5 +59,10 @@ public class BBanner extends IdEntity<SysDept> {
private
Integer
bannerSort
;
@ApiModelProperty
(
value
=
"课程名"
)
// @Transient
private
String
lessonName
;
@ApiModelProperty
(
value
=
"课程名"
)
// @Transient
private
String
lessonDefaultUrl
;
}
\ No newline at end of file
src/main/java/org/rcisoft/business/bbanner/service/BBannerService.java
View file @
32c69808
...
...
@@ -38,7 +38,7 @@ public interface BBannerService {
* @param businessId
* @return
*/
B
annerInfoRspDTO
selectOne
(
String
businessId
);
B
Banner
selectOne
(
String
businessId
);
/**
* 获取Banner分页
...
...
src/main/java/org/rcisoft/business/bbanner/service/impl/BBannerServiceImpl.java
View file @
32c69808
...
...
@@ -84,11 +84,9 @@ public class BBannerServiceImpl implements BBannerService {
}
@Override
public
BannerInfoRspDTO
selectOne
(
String
id
)
{
BBanner
banner
=
bBannerRepository
.
selectByPrimaryKey
(
id
);
BannerInfoRspDTO
bannerInfoRspDTO
=
new
BannerInfoRspDTO
();
BeanUtils
.
copyProperties
(
banner
,
bannerInfoRspDTO
);
return
bannerInfoRspDTO
;
public
BBanner
selectOne
(
String
id
)
{
BBanner
banner
=
bBannerRepository
.
queryOne
(
id
);
return
banner
;
}
@Override
...
...
src/main/java/org/rcisoft/business/bchapter/dao/BChapterRepository.java
View file @
32c69808
...
...
@@ -288,16 +288,6 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" and del_flag = 0 and flag = 1 "
)
String
querySortByPidAndId
(
@Param
(
"pid"
)
String
pid
,
@Param
(
"businessId"
)
String
businessId
);
@Select
(
"<script>select *,#{userId} AS stuId from b_chapter "
+
"where del_flag = 0 and flag = 1 and pid = -1 "
+
"<if test=\"slId!=null and slId != ''\">\n"
+
" and sl_id = #{slId}\n"
+
"</if>"
+
"and lesson_or_sl = #{lessonOrSl} "
+
"order by sort asc</script>"
)
@ResultMap
(
value
=
"SupperStudentChildListResultMap"
)
List
<
BChapter
>
queryBChaptersByStudent
(
BChapter
param
);
@Select
(
"<script>select bc.*,su.business_id as userId,su.`name` as studentName,su.login_name as stuId from b_chapter bc \n"
+
"LEFT JOIN b_r_student_chapter bsc on bc.business_id = bsc.chapter_id\n"
+
...
...
@@ -327,14 +317,6 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
"#{businessId},#{studentId},#{chapterId},'1',#{slId},#{score},'0')</script>"
)
int
insertStudentScore
(
String
businessId
,
String
chapterId
,
String
slId
,
String
studentId
,
String
score
);
@Select
(
"<script>select * from b_chapter "
+
"where del_flag = 0 and flag = 1 and pid = -1 "
+
"and sl_id = #{slId} "
+
"order by sort asc</script>"
)
@ResultMap
(
value
=
"ScoreReportResultMap"
)
List
<
ScoreReportDto
>
queryBChaptersBySlId
(
String
slId
);
@Select
(
"<script>SELECT bc.business_id as businessId,\n"
+
"(SELECT CONCAT((SELECT sort from b_chapter where business_id = bc.pid),\n"
+
"'.',\n"
+
...
...
@@ -391,5 +373,39 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
"(select count(*) from b_chapter where lesson_id = #{lessonId} and chapter_level = 2 and del_flag != 1 and flag =1) "
+
"where business_id = #{lessonId}"
)
int
updateClassHourInLesson
(
@Param
(
"lessonId"
)
String
lessonId
);
// @Insert("<script>insert into b_chapter " +
// "<trim prefix=\"(\" suffix=\")\" suffixOverrides=\",\"> " +
// "<if test=\"businessId !=null and businessId != ''\"> business_id, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> create_by, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> create_date, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> update_by, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> update_date, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> del_flag, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> flag, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> remarks, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> chapter_name, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> chapter_level, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> pid, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> chapter_url, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> md_file, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> is_test, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> lesson_id, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> class_hour, </if> " +
// "<if test=\"state !=null and state != ''\"> state, </if> " +
// "<if test=\"sort !=null and sort != ''\"> sort, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> is_test, </if> " +
// "<if test=\"businessId !=null and businessId != ''\"> is_test, </if> " +
//
// "</trim>"+
// "<trim prefix=\"values (\" suffix=\")\" suffixOverrides=\",\">"+
// "<if test=\"businessId !=null and businessId != ''\"> #{businessId}, </if> " +
//
// "</trim>"+
// "</script>")
//
//
// int insertBChapter(BChapter model);
}
src/main/java/org/rcisoft/business/bchapter/dto/QueryChapterListResDTO.java
View file @
32c69808
...
...
@@ -21,7 +21,7 @@ public class QueryChapterListResDTO {
@ApiModelProperty
(
value
=
"课程地址"
)
private
String
chapterUrl
;
@ApiModelProperty
(
value
=
"课件类型 0视频 1音频 2P
DF 3PPT
4文件包"
)
@ApiModelProperty
(
value
=
"课件类型 0视频 1音频 2P
PT 3PDF
4文件包"
)
private
String
isTest
;
@ApiModelProperty
(
value
=
"课程ID"
)
...
...
@@ -39,12 +39,6 @@ public class QueryChapterListResDTO {
@ApiModelProperty
(
value
=
"文件地址"
)
private
String
fileUrl
;
//
// @ApiModelProperty(value = "ppt地址")
// private String pptUrl;
//
// @ApiModelProperty(value = "pdf地址")
// private String pdfUrl;
@ApiModelProperty
(
value
=
"章节是否完成 0未完成 1完成"
)
private
String
isComplete
;
...
...
@@ -60,4 +54,7 @@ public class QueryChapterListResDTO {
@ApiModelProperty
(
value
=
"id"
)
private
String
corpId
;
@ApiModelProperty
(
value
=
"课程时间"
)
private
String
courseTime
;
}
src/main/java/org/rcisoft/business/bchapter/entity/BChapter.java
View file @
32c69808
...
...
@@ -89,12 +89,6 @@ public class BChapter extends IdEntity<BChapter> {
@Transient
private
String
fileUrl
;
@Transient
private
String
pptUrl
;
@Transient
private
String
pdfUrl
;
/**
* 课程的父ID(当作map的key存放开课的父ID用)
*/
...
...
src/main/java/org/rcisoft/business/bchapter/service/BChapterService.java
View file @
32c69808
...
...
@@ -115,11 +115,8 @@ public interface BChapterService{
String
queryMdFileByChapterId
(
String
businessId
);
List
<
BChapter
>
queryBChaptersByStudent
(
BChapter
param
);
int
Mark
(
String
chapterId
,
String
slId
,
String
studentCode
,
String
score
);
List
<
ScoreReportDto
>
scoreReport
(
String
slId
);
List
<
ChapterSelectDto
>
chapterListBySlId
(
String
slId
);
...
...
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
32c69808
...
...
@@ -2,6 +2,7 @@ package org.rcisoft.business.bchapter.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.bchapter.dao.BChapterRepository
;
import
org.rcisoft.business.bchapter.dto.*
;
import
org.rcisoft.business.bchapter.entity.BChapter
;
...
...
@@ -17,6 +18,8 @@ import org.rcisoft.business.blesson.dao.BLessonRepository;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.bfile.dao.BFileRepository
;
import
org.rcisoft.business.bfile.entity.BFile
;
import
org.rcisoft.business.bmaterial.dao.BMaterialRepository
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.brstudentchapter.dao.BRStudentChapterRepository
;
import
org.rcisoft.business.brstudentchapter.entity.BRStudentChapter
;
import
org.rcisoft.common.component.Global
;
...
...
@@ -61,6 +64,8 @@ public class BChapterServiceImpl implements BChapterService {
@Autowired
private
BFileRepository
bFileRepository
;
@Autowired
private
BMaterialRepository
bMaterialRepository
;
@Autowired
private
Global
global
;
@Autowired
BRStudentChapterRepository
brStudentChapterRepository
;
...
...
@@ -165,7 +170,7 @@ public class BChapterServiceImpl implements BChapterService {
}
int
sort
=
bChapterRepository
.
selectMaxSort
(
model
.
getPid
(),
model
.
getLessonId
());
model
.
setSort
(
sort
);
model
.
setCorpId
(
corpId
);
//
model.setCorpId(corpId);
bFile
.
setChapterId
(
model
.
getBusinessId
());
bFile
.
setLessonId
(
model
.
getLessonId
());
UserUtil
.
setCurrentPersistOperation
(
bFile
);
...
...
@@ -176,6 +181,24 @@ public class BChapterServiceImpl implements BChapterService {
UserUtil
.
setCurrentMergeOperation
(
model
);
line
=
bChapterRepository
.
updateByPrimaryKeySelective
(
model
);
}
//不是为添加章时插入资料表
if
(
StringUtils
.
isNotEmpty
(
model
.
getIsTest
())){
BMaterial
bMaterial
=
new
BMaterial
();
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
bMaterial
.
setChapterId
(
model
.
getBusinessId
());
bMaterial
.
setFileName
(
dto
.
getFileName
());
if
(
Integer
.
parseInt
(
model
.
getIsTest
())<
4
){
bMaterial
.
setFileUrl
(
model
.
getVideoUrl
());
}
else
if
(
Integer
.
parseInt
(
model
.
getIsTest
())>=
4
){
bMaterial
.
setFileUrl
(
model
.
getFileUrl
());
}
bMaterial
.
setType
(
model
.
getIsTest
());
bMaterial
.
setUploadType
(
"1"
);
bMaterial
.
setFileSize
(
dto
.
getFileSize
());
bMaterialRepository
.
insertMaterial
(
bMaterial
);
}
return
new
PersistModel
(
line
);
}
...
...
@@ -372,11 +395,6 @@ public class BChapterServiceImpl implements BChapterService {
return
bChapterRepository
.
queryMdFileByChapterId
(
businessId
);
}
@Override
public
List
<
BChapter
>
queryBChaptersByStudent
(
BChapter
param
)
{
return
bChapterRepository
.
queryBChaptersByStudent
(
param
);
}
@Override
public
int
Mark
(
String
chapterId
,
String
slId
,
String
studentCode
,
String
score
)
{
// int line;
...
...
@@ -393,10 +411,6 @@ public class BChapterServiceImpl implements BChapterService {
return
0
;
}
@Override
public
List
<
ScoreReportDto
>
scoreReport
(
String
slId
)
{
return
bChapterRepository
.
queryBChaptersBySlId
(
slId
);
}
@Override
public
List
<
ChapterSelectDto
>
chapterListBySlId
(
String
slId
)
{
...
...
src/main/java/org/rcisoft/business/bfile/dto/uploadDTO.java
View file @
32c69808
...
...
@@ -17,4 +17,7 @@ public class uploadDTO {
@ApiModelProperty
(
value
=
"0视频 1音频 2ppt 3pdf 4附件"
)
private
String
type
;
@ApiModelProperty
(
value
=
"文件大小"
)
private
String
fileSize
;
}
src/main/java/org/rcisoft/business/bfile/service/impl/BFileServiceImpl.java
View file @
32c69808
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
32c69808
...
...
@@ -65,7 +65,7 @@ public class BLessonController extends PaginationController<BLesson> {
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
addLessonDTO
);
data
.
getResult
()
);
}
/**
...
...
@@ -419,15 +419,38 @@ public class BLessonController extends PaginationController<BLesson> {
recommendLessonDTO
);
}
// @ApiOperation(value="623 指派课程", notes="根据ID指派课程")
// @PostMapping(value = "/appointLessonToPerson")
// public Result appointLessonToPerson(CurUser curUser,@Valid AppointLessonDTO appointLessonDTO,BindingResult bindingResult) {
// PersistModel data = bLessonService.appointLessonToPerson(appointLessonDTO);
// return Result.builder(data,
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// appointLessonDTO);
// }
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"623 根据课程Id 查询该课程推荐范围"
,
notes
=
"根据课程id 查询课程推荐范围(人和部门)"
,
response
=
BLesson
.
class
)
@GetMapping
(
value
=
"/queryRecommendByLessonId"
)
public
Result
queryRecommendByLessonId
(
CurUser
curUser
,
@Valid
FindLessonRecommendDTO
param
,
BindingResult
bindingResult
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonService
.
queryRecommendByLessonId
(
param
));
}
@ApiOperation
(
value
=
"624 指派课程"
,
notes
=
"根据ID指派课程"
)
@PostMapping
(
value
=
"/appointLessonToPerson"
)
public
Result
appointLessonToPerson
(
CurUser
curUser
,
@Valid
AppointLessonDTO
appointLessonDTO
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bLessonService
.
appointLessonToPerson
(
appointLessonDTO
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
appointLessonDTO
);
}
@ApiOperation
(
value
=
"625 添加我学习的课程"
,
notes
=
"添加我学习的课程"
)
@PostMapping
(
value
=
"/addMyLearnLesson"
)
public
Result
addMyLearnLesson
(
CurUser
curUser
,
@Valid
AddMyLearnLessonDTO
addMyLearnLessonDTO
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bLessonPersonService
.
addMyLearnLesson
(
addMyLearnLessonDTO
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
addMyLearnLessonDTO
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BAppointRepository.java
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
dao
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.blesson.dto.AppointLessonDTO
;
import
org.rcisoft.business.blesson.dto.CancelAppointDTO
;
import
org.rcisoft.business.blesson.entity.BAppoint
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
...
...
@@ -19,7 +22,7 @@ public interface BAppointRepository extends BaseMapper<BAppoint> {
/**
*
按课程
Id 查询 bAppoint
* Id 查询 bAppoint
*
*/
@Select
(
"<script>select * from b_appoint where 1=1 "
...
...
@@ -29,5 +32,30 @@ public interface BAppointRepository extends BaseMapper<BAppoint> {
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
BAppoint
selectById
(
String
bAppointId
);
/**
* 按课程Id 查询 bAppoint
*
*/
@Select
(
"<script>select * from b_appoint where 1=1 "
+
"and del_flag != 1 "
+
"and flag = 1 "
+
"and lesson_id = #{lessonId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BAppoint
>
selectByLessonId
(
AppointLessonDTO
param
);
@Insert
(
"<script>"
+
" insert into b_appoint("
+
" business_id,create_by,create_date,update_by,update_date, "
+
" del_flag,flag,remarks,lesson_id,appointer_id, "
+
" designated_id) "
+
" values "
+
" (#{param.businessId}, #{param.createBy},#{param.createDate},#{param.updateBy},#{param.updateDate}, "
+
" #{param.delFlag}, #{param.flag},#{param.remarks},#{param.lessonId},#{param.appointerId}, "
+
" #{param.designatedId}) "
+
"</script>"
)
int
insertAppoint
(
@Param
(
"param"
)
BAppoint
param
);
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
32c69808
...
...
@@ -8,6 +8,7 @@ import org.rcisoft.business.blesson.entity.BLessonPerson;
import
org.rcisoft.core.base.BaseMapper
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
import
java.util.List
;
@Repository
...
...
@@ -120,10 +121,115 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
/**
* 根据课程id查询学生id
* @param LessonId
* @param param
* @return
*/
@Select
(
"<script>select business_id,person_id from b_lesson_person where 1=1 "
+
"and del_flag = 0 and flag = 1 "
+
"AND person_id IN"
+
"<foreach item='item' index='index' collection='appointPersonList' open='(' close=')' separator=','> "
+
"#{item} "
+
"</foreach>"
+
"and lesson_id = #{lessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectPersonIdByLessonId
(
AppointLessonDTO
param
);
/**
* 按课程id删除指派未开始
* @param param
* @return
*/
@Update
(
"<script> update b_lesson_person blp left join b_appoint ba"
+
" on blp.appoint_id = ba.business_id "
+
" and ba.del_flag != 1 and ba.flag = 1 "
+
" set blp.flag = '0' "
+
" where 1=1 "
+
" and blp.is_finish = '0' "
+
" and ba.lesson_id = #{lessonId} "
+
"</script>"
)
int
deleteNotStartByLessonId
(
AppointLessonDTO
param
);
/**
* 已学习的取消指派
* @param param
* @return
*/
@Select
(
"<script>select business_id,person_id from b_lesson_person where lesson_id = #{LessonId}</script>"
)
@Update
(
"<script> update b_lesson_person blp left join b_appoint ba"
+
" on blp.appoint_id = ba.business_id "
+
" and ba.del_flag != 1 and ba.flag = 1 "
+
" set blp.flag = '0' "
+
" <set>"
+
" <if test=\"updateBy != null and updateBy != ''\">update_by=#{updateBy},</if>"
+
" <if test=\"updateDate != null and updateDate != ''\">update_date=#{updateDate},</if>"
+
" <if test=\"delFlag != null and delFlag != ''\">del_flag=#{delFlag},</if>"
+
" <if test=\"flag != null and flag != ''\">flag=#{flag},</if>"
+
" <if test=\"remarks != null and remarks != ''\">remarks=#{remarks},</if>"
+
" <if test=\"isAppoint != null and isAppoint != ''\">is_appoint=#{isAppoint},</if>"
+
" appoint_id=#{appointId},"
+
" </set>"
+
" where 1=1 "
+
" and blp.is_finish != '0' "
+
" and ba.lesson_id = #{lessonId} "
+
"</script>"
)
int
cancelAppointByPersons
(
BLessonPerson
param
);
/**
* 按Id批量更新
* @param param
* @return
*/
@Update
(
"<script>"
+
" update b_lesson_person "
+
" <set> "
+
" <if test=\"param.updateBy != null and param.updateBy != ''\">update_by=#{param.updateBy},</if>"
+
" <if test=\"param.updateDate != null \">update_date=#{param.updateDate},</if>"
+
" appoint_id=#{param.appointId}, "
+
" is_appoint=#{param.isAppoint} "
+
" </set> "
+
" where business_id in "
+
" <foreach item='item' index='index' collection='ids' open='(' separator=',' close=')'> #{item} </foreach>"
+
"</script>"
)
int
updateList
(
@Param
(
"param"
)
BLessonPerson
param
,
@Param
(
"ids"
)
List
<
String
>
ids
);
@Insert
(
"<script>"
+
" insert into b_lesson_person("
+
" business_id,create_by,create_date,update_by,update_date, "
+
" del_flag,flag,remarks,person_id,lesson_id, "
+
" learn_progress,is_finish,is_collect,appoint_id, "
+
" is_appoint) "
+
" values "
+
" <foreach collection='param' index='index' item='item' separator=','>("
+
" #{item.businessId}, #{item.createBy},#{item.createDate},#{item.updateBy},#{item.updateDate}, "
+
" #{item.delFlag}, #{item.flag},#{item.remarks},#{item.personId},#{item.lessonId}, "
+
" #{item.learnProgress}, #{item.isFinish},#{item.isCollect},#{item.appointId}, "
+
" #{item.isAppoint}) "
+
" </foreach>"
+
"</script>"
)
int
insertList
(
@Param
(
"param"
)
List
<
BLessonPerson
>
param
);
/**
* 根据课程id PersonId查询
*/
@Select
(
"<script>select * from b_lesson_person where 1=1 "
+
"and del_flag = 0 and flag = 1 "
+
"AND person_id = #{userId} "
+
"and lesson_id = #{lessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
selectPersonIdByLessonId
(
String
LessonId
);
List
<
BLessonPerson
>
selectByPersonAndLesson
(
AddMyLearnLessonDTO
param
);
@Insert
(
"<script>"
+
" insert into b_lesson_person("
+
" business_id,create_by,create_date,update_by,update_date, "
+
" del_flag,flag,remarks,person_id,lesson_id, "
+
" learn_progress,is_finish,is_collect, "
+
" is_appoint) "
+
" values "
+
" (#{param.businessId}, #{param.createBy},#{param.createDate},#{param.updateBy},#{param.updateDate}, "
+
" #{param.delFlag}, #{param.flag},#{param.remarks},#{param.personId},#{param.lessonId}, "
+
" #{param.learnProgress}, #{param.isFinish},#{param.isCollect},"
+
" #{param.isAppoint}) "
+
"</script>"
)
int
insertBLessonPerson
(
@Param
(
"param"
)
BLessonPerson
param
);
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
32c69808
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/blesson/dao/BRecommendRepository.java
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
dao
;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.business.blesson.dto.FindLessonRecommendDTO
;
import
org.rcisoft.business.blesson.dto.FindLessonRecommendRspDTO
;
import
org.rcisoft.business.blesson.entity.BRecommend
;
import
org.rcisoft.business.blesson.entity.BRecommendSon
;
import
org.rcisoft.core.base.BaseMapper
;
...
...
@@ -46,7 +48,9 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> {
@Delete
(
"<script>DELETE from b_recommend_son where recommend_id=#{businessId}</script>"
)
int
deleteRecommendSon
(
BRecommend
bRecommend
);
@Select
(
"<script>select business_id from b_recommend where lesson_id = #{lessonId}</script>"
)
@Select
(
"<script>select business_id from b_recommend where "
+
"del_flag != 1 and flag = 1 "
+
"and lesson_id = #{lessonId}</script>"
)
List
<
String
>
selectIdByLessonId
(
String
lessonId
);
@Insert
(
"<script>INSERT INTO b_recommend_son"
+
...
...
@@ -55,5 +59,41 @@ public interface BRecommendRepository extends BaseMapper<BRecommend> {
"(#{item.businessId},#{item.recommendId},#{item.type},#{item.targetId})"
+
"</foreach></script>"
)
int
insertBRecommendSons
(
List
<
BRecommendSon
>
bRecommendSons
);
@Select
(
"<script>select brs.business_id businessId, brs.type type, brs.target_id targetId, su.name targetName "
+
" from b_recommend_son brs left join b_recommend br on brs.recommend_id = br.business_id "
+
" left join b_lesson bl on br.lesson_id = bl.business_id "
+
" left join s_user su on brs.target_id = su.business_id "
+
" where 1=1 "
+
" and br.del_flag != 1 and br.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and su.del_flag != 1 and su.flag = 1 "
+
// " and bl.corp_id = #{corpId} "+
" and su.corp_id = #{corpId} "
+
" <if test=\"viewParam!=null and viewParam != ''\">and su.name like CONCAT('%',#{viewParam},'%')</if>"
+
" and brs.type = '0' "
+
" and br.lesson_id = #{lessonId}</script>"
)
List
<
FindLessonRecommendRspDTO
>
queryRecommendPersonByLessonId
(
FindLessonRecommendDTO
param
);
@Select
(
"<script>select brs.business_id businessId, brs.type type, brs.target_id targetId "
+
" from b_recommend_son brs left join b_recommend br on brs.recommend_id = br.business_id "
+
" left join b_lesson bl on br.lesson_id = bl.business_id "
+
" where 1=1 "
+
" and br.del_flag != 1 and br.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
// " and bl.corp_id = #{corpId} "+
" and brs.type = '1' "
+
" <if test=\"departs != null and departs.size() > 0 \"> "
+
" and brs.target_id in "
+
" <foreach item='item' index='index' collection='departs' open='(' separator=',' close=')'> #{item.departId} </foreach> "
+
" </if> "
+
" and br.lesson_id = #{lessonId}</script>"
)
List
<
FindLessonRecommendRspDTO
>
queryRecommendDepartByLessonId
(
FindLessonRecommendDTO
param
);
}
src/main/java/org/rcisoft/business/blesson/dto/AddMyLearnLessonDTO.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
AddMyLearnLessonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
String
corpId
;
private
String
userId
;
}
src/main/java/org/rcisoft/business/blesson/dto/AppointLessonDTO.java
View file @
32c69808
...
...
@@ -3,15 +3,20 @@ package org.rcisoft.business.blesson.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AppointLessonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
@ApiModelProperty
(
value
=
"
推荐范围(人
)多人之间用','隔开"
,
required
=
true
)
@ApiModelProperty
(
value
=
"
指派范围(人id
)多人之间用','隔开"
,
required
=
true
)
private
String
appointPerson
;
//指派人id集合
private
List
<
String
>
appointPersonList
;
private
String
userId
;
private
String
corpId
;
...
...
src/main/java/org/rcisoft/business/blesson/dto/FindLessonRecommendDTO.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
FindLessonRecommendDTO
{
@ApiModelProperty
(
value
=
"查询参数"
,
required
=
false
)
private
String
viewParam
;
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
private
List
<
LessonRecommendDepartDTO
>
departs
;
private
String
userId
;
private
String
corpId
;
}
src/main/java/org/rcisoft/business/blesson/dto/FindLessonRecommendRspDTO.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
FindLessonRecommendRspDTO
{
@ApiModelProperty
(
value
=
"主键"
)
private
String
businessId
;
@ApiModelProperty
(
value
=
"被推荐对象类型(0:人 1:部门)"
)
private
String
type
;
@ApiModelProperty
(
value
=
"被推荐 人/部门id"
)
private
String
targetId
;
@ApiModelProperty
(
value
=
"被推荐 人/部门名"
)
private
String
targetName
;
}
src/main/java/org/rcisoft/business/blesson/dto/LessonRecommendDepartDTO.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
@Data
@AllArgsConstructor
public
class
LessonRecommendDepartDTO
{
private
String
departId
;
private
String
departName
;
}
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
32c69808
...
...
@@ -100,6 +100,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
private
String
lessonType
;
@Transient
private
String
corpId
;
//初始化
public
void
initModel
(){
UserUtil
.
setCurrentPersistOperation
(
this
);
...
...
@@ -111,6 +114,8 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
this
.
setIsCollect
(
"0"
);
//设置不指派
this
.
setIsAppoint
(
"0"
);
//设置不指派
this
.
setRemarks
(
""
);
}
}
src/main/java/org/rcisoft/business/blesson/entity/BRecommendSon.java
View file @
32c69808
package
org
.
rcisoft
.
business
.
blesson
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
javax.persistence.*
;
...
...
@@ -14,14 +15,16 @@ import javax.persistence.*;
@Table
(
name
=
"b_recommend_son"
)
public
class
BRecommendSon
{
@ApiModelProperty
(
value
=
"主键"
)
private
String
businessId
;
@ApiModelProperty
(
value
=
"推荐表id"
)
private
String
recommendId
;
@ApiModelProperty
(
value
=
"被推荐对象类型(0:人 1:部门)"
)
private
String
type
;
@ApiModelProperty
(
value
=
"被推荐 人/部门id"
)
private
String
targetId
;
}
src/main/java/org/rcisoft/business/blesson/service/BLessonPersonService.java
View file @
32c69808
...
...
@@ -47,4 +47,13 @@ public interface BLessonPersonService {
* @return
*/
PersistModel
cancelAppoint
(
CancelAppointDTO
cancelAppointDTO
);
/**
* 添加我学习课程
* @author: zhangqingle
* @param addMyLearnLessonDTO
* @return
*/
PersistModel
addMyLearnLesson
(
AddMyLearnLessonDTO
addMyLearnLessonDTO
);
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
32c69808
...
...
@@ -6,7 +6,6 @@ import org.rcisoft.business.blesson.entity.BLesson;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
java.util.List
;
...
...
@@ -133,6 +132,20 @@ public interface BLessonService{
*/
PersistModel
recommendBLesson
(
RecommendLessonDTO
recommendLessonDTO
);
/**
* 根据课程Id 查询该课程推荐范围
* @author: zhangqingle
* @param param
* @return
*/
List
<
FindLessonRecommendRspDTO
>
queryRecommendByLessonId
(
FindLessonRecommendDTO
param
);
/**
* 指派课程
* @param appointLessonDTO
* @return
*/
PersistModel
appointLessonToPerson
(
AppointLessonDTO
appointLessonDTO
);
/**
* 课程培训条件查询
...
...
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonPersonServiceImpl.java
View file @
32c69808
...
...
@@ -10,6 +10,7 @@ import org.rcisoft.business.blesson.dao.BLessonPersonRepository;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.service.BLessonPersonService
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.ResultExceptionEnum
;
...
...
@@ -115,4 +116,27 @@ public class BLessonPersonServiceImpl implements BLessonPersonService {
return
new
PersistModel
(
1
,
result
);
}
@Override
public
PersistModel
addMyLearnLesson
(
AddMyLearnLessonDTO
addMyLearnLessonDTO
)
{
List
<
BLessonPerson
>
bLessonPersons
=
bLessonPersonRepository
.
selectByPersonAndLesson
(
addMyLearnLessonDTO
);
BLessonPerson
bLessonPerson
;
int
line
=
0
;
//被指派未开始
if
(
bLessonPersons
!=
null
&&
bLessonPersons
.
size
()>
0
&&
"0"
.
equals
(
bLessonPersons
.
get
(
0
).
getIsFinish
())
){
bLessonPerson
=
bLessonPersons
.
get
(
0
);
bLessonPerson
.
setIsFinish
(
"1"
);
line
=
bLessonPersonRepository
.
updateByPrimaryKeySelective
(
bLessonPerson
);
//课程在学人数+1
bLessonRepository
.
personNumberPlusOne
(
addMyLearnLessonDTO
.
getLessonId
());
}
else
if
(
bLessonPersons
==
null
||
bLessonPersons
.
size
()
<
1
){
//未指派
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
initModel
();
bLessonPerson
.
setLessonId
(
addMyLearnLessonDTO
.
getLessonId
());
bLessonPerson
.
setPersonId
(
addMyLearnLessonDTO
.
getUserId
());
line
=
bLessonPersonRepository
.
insertBLessonPerson
(
bLessonPerson
);
//课程在学人数+1
bLessonRepository
.
personNumberPlusOne
(
addMyLearnLessonDTO
.
getLessonId
());
}
return
new
PersistModel
(
line
);
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
32c69808
This diff is collapsed.
Click to expand it.
src/main/java/org/rcisoft/business/bmaterial/controller/BMaterialController.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
bmaterial
.
controller
;
/*固定导入*/
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.common.controller.PaginationController
;
import
org.rcisoft.common.model.GridModel
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.Result
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.constant.MessageConstant
;
import
javax.validation.Valid
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.bmaterial.service.BMaterialService
;
/**
* Created by on 2019-10-12 10:38:31.
*/
@Api
(
tags
=
"13 资料"
)
@RestController
@RequestMapping
(
"bmaterial"
)
public
class
BMaterialController
extends
PaginationController
<
BMaterial
>
{
@Autowired
private
BMaterialService
bMaterialServiceImpl
;
@ApiOperation
(
value
=
"1301 添加保存资料"
,
notes
=
"保存资料"
)
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
@Valid
BMaterial
bMaterial
,
BindingResult
bindingResult
)
{
PersistModel
data
=
bMaterialServiceImpl
.
save
(
bMaterial
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bMaterial
);
}
@ApiOperation
(
value
=
"1302查看我的资料集合"
,
notes
=
"查看我的资料集合"
)
@GetMapping
(
value
=
"/queryMyBMaterialByPagination"
)
public
Result
queryMyBMaterialByPagination
(
CurUser
curUser
,
BindingResult
bindingResult
)
{
bMaterialServiceImpl
.
queryMyBMaterialByPagination
(
getPaginationUtility
(),
curUser
);
GridModel
gridModel
=
getGridModelResponse
();
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
gridModel
);
}
@ApiOperation
(
value
=
"1303逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
required
=
false
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete"
)
public
Result
delete
(
CurUser
curUser
,
@Valid
String
businessId
,
BindingResult
bindingResult
)
{
BMaterial
bMaterial
=
new
BMaterial
();
bMaterial
.
setBusinessId
(
businessId
);
PersistModel
data
=
bMaterialServiceImpl
.
remove
(
bMaterial
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
// @ApiOperation(value="修改", notes="修改")
// @ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
// @PutMapping("/update/{id:\\w+}")
// public Result update(@Valid BMaterial bMaterial, BindingResult bindingResult) {
// PersistModel data = bMaterialServiceImpl.merge(bMaterial);
// return Result.builder(data,
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// bMaterial);
// }
//
// @ApiOperation(value="查看单 ", notes="查看单 ")
// @GetMapping("/detail/{id:\\w+}")
// public Result detail(@PathVariable String id) {
// return Result.builder(new PersistModel(1),
// MessageConstant.MESSAGE_ALERT_SUCCESS,
// MessageConstant.MESSAGE_ALERT_ERROR,
// bMaterialServiceImpl.findById(id));
// }
//
// @ApiOperation(value="查看 集合", notes="查看 集合")
// @GetMapping(value = "/queryBMaterialByPagination")
// public GridModel listByPagination(BMaterial bMaterial) {
// bMaterialServiceImpl.findAllByPagination(getPaginationUtility(), bMaterial);
// return getGridModelResponse();
// }
}
src/main/java/org/rcisoft/business/bmaterial/dao/BMaterialRepository.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
bmaterial
.
dao
;
import
org.apache.ibatis.annotations.Insert
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* Created with on 2019-10-12 10:38:31.
*/
@Repository
public
interface
BMaterialRepository
extends
BaseMapper
<
BMaterial
>
{
/**
* 分页查询 bMaterial
*
*/
@Select
(
"<script>select * from b_material where 1=1 "
+
"<if test=\"delFlag !=null and delFlag != '' \">and del_flag = #{delFlag} </if> "
+
"<if test=\"flag !=null and flag != '' \">and flag = #{flag} </if> "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BMaterial
>
queryBMaterials
(
BMaterial
bMaterial
);
@Insert
(
"<script>insert into b_material "
+
" (business_id,chapter_id,file_name,file_url, "
+
" type,upload_type,file_size,flag,del_flag, "
+
" remarks,create_by,update_by,update_date,create_date) "
+
" values(#{businessId},#{chapterId},#{fileName},#{fileUrl}, "
+
" #{type},#{uploadType},#{fileSize},#{flag},#{delFlag}, "
+
" #{remarks},#{createBy},#{updateBy},#{updateDate},#{createDate}) "
+
"</script>"
)
int
insertMaterial
(
BMaterial
bMaterial
);
@Select
(
"<script>select bm.*,bl.lesson_name lessonName from b_material bm "
+
" left join b_chapter bc on bm.chapter_id = bc.business_id "
+
" left join b_lesson bl on bc.lesson_id = bl.business_id "
+
" where 1=1 "
+
" and bm.del_flag != 1 and bm.flag = 1 "
+
" and bc.del_flag != 1 and bc.flag = 1 "
+
" and bl.del_flag != 1 and bl.flag = 1 "
+
" and bm.create_by = #{userId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BMaterial
>
queryMyBMaterialByPagination
(
CurUser
curUser
);
}
src/main/java/org/rcisoft/business/bmaterial/entity/BMaterial.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
bmaterial
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
org.rcisoft.core.entity.IdEntity
;
import
javax.persistence.*
;
/**
* Created with on 2019-10-12 10:38:31.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"b_material"
)
public
class
BMaterial
extends
IdEntity
<
BMaterial
>
{
@ApiModelProperty
(
value
=
"章节ID"
)
private
String
chapterId
;
@ApiModelProperty
(
value
=
"文件名称"
,
required
=
true
)
private
String
fileName
;
@ApiModelProperty
(
value
=
"文件地址"
,
required
=
true
)
private
String
fileUrl
;
@ApiModelProperty
(
value
=
"文件类型 0视频 1音频 2PPT 3PDF 4资料包(单选)"
,
required
=
true
)
private
String
type
;
@ApiModelProperty
(
value
=
"上传类型 0 保存 1 上传"
)
private
String
uploadType
;
@ApiModelProperty
(
value
=
"文件大小"
,
required
=
true
)
private
String
fileSize
;
@Transient
private
String
lessonName
;
}
src/main/java/org/rcisoft/business/bmaterial/service/BMaterialService.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
bmaterial
.
service
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
java.util.List
;
/**
* Created by on 2019-10-12 10:38:31.
*/
public
interface
BMaterialService
{
/**
* 保存
* @param bMaterial
* @return
*/
PersistModel
save
(
BMaterial
bMaterial
);
/**
* 逻辑删除
* @param bMaterial
* @return
*/
PersistModel
remove
(
BMaterial
bMaterial
);
/**
* 修改
* @param bMaterial
* @return
*/
PersistModel
merge
(
BMaterial
bMaterial
);
/**
* 根据id查询
* @param id
* @return
*/
BMaterial
findById
(
String
id
);
/**
* 分页查询
* @param bMaterial
* @return
*/
List
<
BMaterial
>
findAllByPagination
(
PageUtil
<
BMaterial
>
paginationUtility
,
BMaterial
bMaterial
);
/**
* 分页查询 (我的资料)
* @param curUser
* @return
*/
List
<
BMaterial
>
queryMyBMaterialByPagination
(
PageUtil
<
BMaterial
>
paginationUtility
,
CurUser
curUser
);
}
src/main/java/org/rcisoft/business/bmaterial/service/impl/BMaterialServiceImpl.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
business
.
bmaterial
.
service
.
impl
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.business.bmaterial.dao.BMaterialRepository
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.bmaterial.service.BMaterialService
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by on 2019-10-12 10:38:31.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
BMaterialServiceImpl
implements
BMaterialService
{
@Autowired
private
BMaterialRepository
bMaterialRepository
;
/**
* 保存 bMaterial
* @param bMaterial
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
save
(
BMaterial
bMaterial
){
//增加操作
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
//设置上传类型为 保存
bMaterial
.
setUploadType
(
"0"
);
int
line
=
bMaterialRepository
.
insertSelective
(
bMaterial
);
return
new
PersistModel
(
line
);
}
/**
* 逻辑删除
* @param bMaterial
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
remove
(
BMaterial
bMaterial
){
UserUtil
.
setCurrentMergeOperation
(
bMaterial
);
bMaterial
.
setDeleted
();
int
line
=
bMaterialRepository
.
logicalDelete
(
bMaterial
);
return
new
PersistModel
(
line
);
}
/**
* 修改 bMaterial
* @param bMaterial
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
merge
(
BMaterial
bMaterial
){
UserUtil
.
setCurrentMergeOperation
(
bMaterial
);
int
line
=
bMaterialRepository
.
updateByPrimaryKeySelective
(
bMaterial
);
return
new
PersistModel
(
line
);
}
/**
* 根据id查询 bMaterial
* @param id
* @return
*/
public
BMaterial
findById
(
String
id
){
return
bMaterialRepository
.
selectByPrimaryKey
(
id
);
}
/**
* 分页查询 bMaterial
* @param bMaterial
* @return
*/
public
List
<
BMaterial
>
findAllByPagination
(
PageUtil
<
BMaterial
>
paginationUtility
,
BMaterial
bMaterial
){
bMaterial
.
setStart
();
bMaterial
.
setNotDeleted
();
return
bMaterialRepository
.
queryBMaterials
(
bMaterial
);
}
/**
* 分页查询 bMaterial(我的资料)
* @param curUser
* @return
*/
public
List
<
BMaterial
>
queryMyBMaterialByPagination
(
PageUtil
<
BMaterial
>
paginationUtility
,
CurUser
curUser
){
return
bMaterialRepository
.
queryMyBMaterialByPagination
(
curUser
);
}
}
src/main/java/org/rcisoft/business/synchronizationtime/service/SynchronizationTimeService.java
View file @
32c69808
...
...
@@ -2,9 +2,8 @@ package org.rcisoft.business.synchronizationtime.service;
import
org.rcisoft.business.synchronizationtime.entity.SynchronizationTime
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.aop.PageUtil
;
import
java.util.List
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dto.MyInfoDTO
;
/**
* Created by on 2019-10-10 20:04:19.
...
...
src/main/java/org/rcisoft/core/aop/CurUserAspect.java
View file @
32c69808
...
...
@@ -89,7 +89,7 @@ public class CurUserAspect {
RoleMenuDTO
roleMenuDTO
=
new
RoleMenuDTO
();
roleMenuDTO
.
setBusinessId
(
IdGen
.
uuid
());
roleMenuDTO
.
setRoleId
(
rId
);
roleMenuDTO
.
setMenuId
(
IdGen
.
uuid
()
);
roleMenuDTO
.
setMenuId
(
menuId
);
roleMenuDTOs
.
add
(
roleMenuDTO
);
});
//设置s_r_user_role表插入参数值
...
...
src/main/java/org/rcisoft/sys/user/controller/SysUserController.java
View file @
32c69808
...
...
@@ -164,4 +164,13 @@ public class SysUserController extends PaginationController<SysUser> {
userServiceImpl
.
queryAllDepart
());
}
@ApiOperation
(
value
=
"708 我的智学 个人信息"
,
notes
=
"我的智学 个人信息及课程、培训、考试数量"
)
@GetMapping
(
"/queryMyInfo"
)
public
Result
queryMyInfo
(
CurUser
curUser
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
userServiceImpl
.
queryMyInfo
(
curUser
));
}
}
src/main/java/org/rcisoft/sys/user/dao/SysUserMapper.java
View file @
32c69808
...
...
@@ -3,6 +3,8 @@ package org.rcisoft.sys.user.dao;
import
org.apache.ibatis.annotations.*
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dto.MyInfoDTO
;
import
org.rcisoft.sys.user.dto.QueryMenuResDTO
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
...
...
@@ -196,4 +198,41 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
"ORDER BY sm.SORT "
)
@ResultMap
(
value
=
"DtoResultMap"
)
List
<
QueryMenuResDTO
>
queryMenus
(
@Param
(
"corpId"
)
String
corpId
,
@Param
(
"businessId"
)
String
businessId
,
@Param
(
"modelId"
)
String
modelId
);
@Select
(
"<script>select `name` name ,head_pic headPic, `value` value from s_user where business_id = #{userId}"
+
"</script>"
)
MyInfoDTO
queryMyInfo
(
CurUser
curUser
);
@Select
(
"<script>select "
+
" (select count(1) from "
+
" b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 AND blp.flag = 1 "
+
" and bl.del_flag != 1 AND bl.flag = 1 "
+
" and blp.is_finish = 2 "
+
" and bl.release_state = 2 "
+
" and bl.lesson_type = '0' "
+
// " and bl.corp_id = #{corpId} "+
" and blp.person_id = #{userId}) lessonCount, "
+
" (select count(1) from "
+
" b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 AND blp.flag = 1 "
+
" and bl.del_flag != 1 AND bl.flag = 1 "
+
" and bl.release_state = 2 "
+
" and blp.person_id = #{userId}) trainCount, "
+
" (select count(1) from "
+
" b_lesson_person blp left join b_lesson bl on blp.lesson_id = bl.business_id "
+
" where blp.del_flag != 1 AND blp.flag = 1 "
+
" and bl.del_flag != 1 AND bl.flag = 1 "
+
" and bl.lesson_type = '1' "
+
// " and bl.corp_id = #{corpId} "+
" and blp.person_id = #{userId}) notFinishedExam "
+
"</script>"
)
MyInfoDTO
queryMyLessonCount
(
CurUser
curUser
);
}
src/main/java/org/rcisoft/sys/user/dto/MyInfoDTO.java
0 → 100644
View file @
32c69808
package
org
.
rcisoft
.
sys
.
user
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
MyInfoDTO
{
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"头像"
)
private
String
headPic
;
@ApiModelProperty
(
value
=
"积分"
)
private
String
value
;
@ApiModelProperty
(
value
=
"课程数"
)
private
String
lessonCount
;
@ApiModelProperty
(
value
=
"培训数"
)
private
String
trainCount
;
@ApiModelProperty
(
value
=
"未完成考试数"
)
private
String
notFinishedExam
;
}
src/main/java/org/rcisoft/sys/user/service/SysUserService.java
View file @
32c69808
...
...
@@ -6,6 +6,7 @@ import org.rcisoft.sys.user.dto.QueryMenuResDTO;
import
org.rcisoft.sys.menu.entity.SysMenu
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.dto.MyInfoDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
java.util.List
;
...
...
@@ -40,4 +41,12 @@ public interface SysUserService {
int
insertOrUpdateList
(
List
<
SysUser
>
sysUserList
);
int
synchronizedUsers
(
String
corpId
);
/**
* zhangqingle
* 我的智学也查询个人信息及课程、培训、考试数量
* @param curUser
* @return
*/
MyInfoDTO
queryMyInfo
(
CurUser
curUser
);
}
src/main/java/org/rcisoft/sys/user/service/impl/SysUserServiceImpl.java
View file @
32c69808
...
...
@@ -10,10 +10,7 @@ import org.rcisoft.common.util.feignDto.MTUserGetsReqDTO;
import
org.rcisoft.common.util.feignDto.MTUserInfoRspDTO
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.result.Result
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.sys.menu.dao.SysMenuRepository
;
...
...
@@ -22,9 +19,11 @@ import org.rcisoft.sys.menu.entity.SysMenu;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.dao.SysUserMapper
;
import
org.rcisoft.sys.user.dto.QuerySysUserDTO
;
import
org.rcisoft.sys.user.dto.MyInfoDTO
;
import
org.rcisoft.sys.user.entity.SysUser
;
import
org.rcisoft.sys.user.entity.UserRole
;
import
org.rcisoft.sys.user.service.SysUserService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
...
...
@@ -292,4 +291,14 @@ public class SysUserServiceImpl implements SysUserService {
}
return
line
;
}
@Override
public
MyInfoDTO
queryMyInfo
(
CurUser
curUser
)
{
MyInfoDTO
myInfoDTOCount
=
sysUserMapper
.
queryMyLessonCount
(
curUser
);
MyInfoDTO
myInfoDTO
=
sysUserMapper
.
queryMyInfo
(
curUser
);
myInfoDTO
.
setLessonCount
(
myInfoDTOCount
.
getLessonCount
());
myInfoDTO
.
setTrainCount
(
myInfoDTOCount
.
getTrainCount
());
myInfoDTO
.
setNotFinishedExam
(
myInfoDTOCount
.
getNotFinishedExam
());
return
myInfoDTO
;
}
}
src/main/resources/application-mt.yml
0 → 100644
View file @
32c69808
server
:
port
:
8081
tomcat
:
max-threads
:
300
servlet
:
context-path
:
/
#uri-encoding: UTF-8
type
:
dev1
maxHttpHeaderSize
:
102400
#logging:
# level:
# root: INFO
# org.springframework.web: DEBUG
druid
:
url
:
jdbc:mysql://mt_mysql:3306/edu_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull&allowMultiQueries=true&useSSL=false
username
:
root
password
:
91isoft
initial-size
:
1
min-idle
:
1
max-active
:
20
test-on-borrow
:
true
initial-size
:
1
min-idle
:
1
max-active
:
20
test-on-borrow
:
true
mybatis
:
mapper-locations
:
classpath:mapper/**/**/*.xml
mapper
:
mappers
:
-
org.rcisoft.core.base.BaseMapper
not-empty
:
false
identity
:
MYSQL
pagehelper
:
helperDialect
:
mysql
reasonable
:
true
supportMethodsArguments
:
true
params
:
count=countSql
spring
:
jackson
:
default-property-inclusion
:
non_null
date-format
:
yyyy-MM-dd
time-zone
:
GMT+8
mvc
:
throw-exception-if-no-handler-found
:
true
resources
:
add-mappings
:
false
freemarker
:
charset
:
UTF-8
suffix
:
.ftl
template-loader-path
:
classpath:/templates/
servlet
:
multipart
:
max-file-size
:
100MB
max-request-size
:
100MB
global
:
lk
:
publicalias
:
publiccert
storePwd
:
rcrtcyedu2
subject
:
edu2
licPath
:
/lk/license.lic
pubPath
:
/lk/publicCerts.store
path
:
base_upload_server_location
:
/working/resource/eduServer/
course_location
:
course
lesson_location
:
lesson
sl_location
:
sl
image_location
:
/upload
video_location
:
video
audio_location
:
audio
temp_location
:
temp
file_location
:
file
ppt_location
:
ppt
pdf_location
:
pdf
cut_pdf_location
:
cutPdf
cource_logo_location
:
/course/logo
other
:
is_server_linux
:
5
cut_pdf_num
:
30
libreoffice
:
ip
:
192.168.1.125
port
:
10188
mt
:
api
:
http://221.239.114.20:6789/api/
eureka
:
instance
:
hostname
:
localhost
client
:
register-with-eureka
:
false
fetch-registry
:
false
\ No newline at end of file
src/main/resources/logback-spring.xml
View file @
32c69808
...
...
@@ -72,4 +72,12 @@
</root>
</springProfile>
<springProfile
name=
"mt"
>
<root
level=
"info"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
</root>
</springProfile>
</configuration>
\ No newline at end of file
src/main/resources/mapper/business/bchapter/mapper/BChapterMapper.xml
View file @
32c69808
...
...
@@ -36,8 +36,6 @@
<result
column=
"sort"
jdbcType=
"INTEGER"
property=
"sort"
/>
<result
column=
"video_url"
jdbcType=
"VARCHAR"
property=
"videoUrl"
/>
<result
column=
"file_url"
jdbcType=
"VARCHAR"
property=
"fileUrl"
/>
<!-- <result column="ppt_url" jdbcType="VARCHAR" property="pptUrl"/>-->
<!-- <result column="pdf_url" jdbcType="VARCHAR" property="pdfUrl"/>-->
<result
column=
"is_complete"
jdbcType=
"VARCHAR"
property=
"isComplete"
/>
<result
column=
"file_name"
jdbcType=
"VARCHAR"
property=
"fileName"
/>
<result
column=
"course_time"
jdbcType=
"VARCHAR"
property=
"courseTime"
/>
...
...
@@ -54,72 +52,6 @@
<result
column=
"chapter_name"
property=
"chapterName"
></result>
</resultMap>
<!--学生单独使用这个-->
<resultMap
id=
"SupperStudentChildListResultMap"
type=
"org.rcisoft.business.bchapter.entity.BChapter"
extends=
"BaseResultMap"
>
<association
column=
"{studentId=stuId,paId=business_id}"
property=
"childList"
select=
"queryBChaptersByPidAndUserId"
>
</association>
</resultMap>
<select
id=
"queryBChaptersByPidAndUserId"
parameterType=
"java.util.Map"
resultMap=
"SupperStudentChildListResultMap"
>
SELECT bc.*,
#{studentId} AS stuId,
bf.video_url AS videoUrl,
bf.file_url AS fileUrl,
bf.ppt_url AS pptUrl,
bf.pdf_url AS pdfUrl,
pc.business_id AS paperUrl,
IFNULL(t1.is_complete,0) AS isComplete,
IFNULL(t1.paper_finish,0) as paperFinish,
IFNULL(t1.pdf_finish,0) as pdfFinish,
IFNULL(t1.ppt_finish,0) as pptFinish,
IFNULL(t1.video_finish,0) as videoFinish,
(SELECT count(*) FROM b_r_student_chapter brs WHERE brs.chapter_id = bc.business_id AND brs.score = - 1) AS studentNum,
IFNULL(t1.score ,-1) as stuScore
FROM
b_chapter bc
LEFT JOIN b_file bf ON bf.chapter_id = bc.business_id
LEFT JOIN t_paper_chapter pc on pc.chap_id = bc.business_id
LEFT JOIN (SELECT is_complete,ppt_finish,pdf_finish,video_finish,paper_finish,chapter_id,score from b_r_student_chapter brs
LEFT JOIN b_student bs on brs.student_id = bs.business_id
LEFT JOIN s_user su on bs.`code` = su.login_name
LEFT JOIN b_chapter bc on bc.business_id = brs.chapter_id
WHERE su.business_id = #{studentId})
t1 ON t1.chapter_id=bc.business_id
WHERE
bc.del_flag = 0
AND bc.pid = #{paId}
ORDER BY
bc.sort asc
</select>
<!--成绩评定时使用这个-->
<resultMap
id=
"ScoreReportResultMap"
type=
"org.rcisoft.business.bchapter.dto.ScoreReportDto"
extends=
"BaseResultMap"
>
<association
column=
"{pid=business_id,slId=sl_id}"
property=
"childList"
select=
"scoreReportChildList"
></association>
</resultMap>
<select
id=
"scoreReportChildList"
parameterType=
"java.util.Map"
resultMap=
"ScoreReportResultMap"
>
SELECT DISTINCT bc.business_id,bc.is_test,bc.class_hour,
bc.chapter_name, bc.automatic,bc.sl_id,bc.experiment_type,
ROUND((SELECT AVG(bsc.score) from b_r_student_chapter bsc
where bsc.chapter_id = bc.business_id and score != '-1' and score != '999'),2) as average,
(SELECT MAX(bsc.score) from b_r_student_chapter bsc
where bsc.chapter_id = bc.business_id and score != '-1' and score != '999') as maxScore,
(SELECT MIN(bsc.score) from b_r_student_chapter bsc
where bsc.chapter_id = bc.business_id and score != '-1' and score != '999') as minScore,
(SELECT COUNT(*) from b_r_student_chapter where (score = '-1' or score = '999')
AND sl_id = #{slId} AND chapter_id = bc.business_id AND is_complete = '1') as waitingMark,
(SELECT COUNT(*) from b_r_student_chapter where sl_id = #{slId}
AND chapter_id = bc.business_id AND is_complete = '1') as submit,
(SELECT COUNT(*) from b_r_sl_student brss where brss.sl_code =
(SELECT `code` from b_sl where business_id = #{slId})) as allStudent
from b_chapter bc
where bc.pid = #{pid} order by bc.sort
</select>
<update
id=
"updateToFinish"
parameterType=
"org.rcisoft.business.bchapter.dto.ScoreInfoDTO"
>
update b_r_student_chapter
...
...
src/main/resources/mapper/business/bmaterial/mapper/BMaterialMapper.xml
0 → 100644
View file @
32c69808
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.rcisoft.business.bmaterial.dao.BMaterialRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.bmaterial.entity.BMaterial"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"chapter_id"
jdbcType=
"VARCHAR"
property=
"chapterId"
/>
<result
column=
"file_name"
jdbcType=
"VARCHAR"
property=
"fileName"
/>
<result
column=
"file_url"
jdbcType=
"VARCHAR"
property=
"fileUrl"
/>
<result
column=
"type"
jdbcType=
"VARCHAR"
property=
"type"
/>
<result
column=
"upload_type"
jdbcType=
"VARCHAR"
property=
"uploadType"
/>
<result
column=
"file_size"
jdbcType=
"VARCHAR"
property=
"fileSize"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
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