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
b79319d2
Commit
b79319d2
authored
Oct 23, 2019
by
zhangqingle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口
parent
12bf4565
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
250 additions
and
71 deletions
+250
-71
BDictionaryRepository.java
...isoft/business/bdictionary/dao/BDictionaryRepository.java
+1
-0
ColumConfigDTO.java
.../org/rcisoft/business/bdictionary/dto/ColumConfigDTO.java
+2
-0
BTrainFileRepository.java
.../org/rcisoft/business/bfile/dao/BTrainFileRepository.java
+2
-1
BFile.java
src/main/java/org/rcisoft/business/bfile/entity/BFile.java
+1
-1
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+23
-0
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+14
-0
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+23
-0
AddLessonDTO.java
...n/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
+3
-0
FindTrainPersonDTO.java
.../org/rcisoft/business/blesson/dto/FindTrainPersonDTO.java
+22
-0
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+25
-0
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+13
-0
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+18
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+54
-1
MTCotactApiRequestClient.java
...isoft/common/util/outClient/MTCotactApiRequestClient.java
+0
-68
ResultServiceEnums.java
...main/java/org/rcisoft/core/result/ResultServiceEnums.java
+1
-0
BLessonMapper.xml
...esources/mapper/business/blesson/mapper/BLessonMapper.xml
+48
-0
No files found.
src/main/java/org/rcisoft/business/bdictionary/dao/BDictionaryRepository.java
View file @
b79319d2
...
@@ -24,6 +24,7 @@ public interface BDictionaryRepository extends BaseMapper<BDictionary> {
...
@@ -24,6 +24,7 @@ public interface BDictionaryRepository extends BaseMapper<BDictionary> {
@Select
(
"<script>"
+
@Select
(
"<script>"
+
" select * from b_dictionary where 1=1 "
+
" select * from b_dictionary where 1=1 "
+
" and del_flag = !1 and flag = 1 "
+
" and del_flag = !1 and flag = 1 "
+
" and corp_id = #{curUser.corpId} "
+
" <if test=\"configList != null and configList.size()>0 \">and business_id in "
+
" <if test=\"configList != null and configList.size()>0 \">and business_id in "
+
" <foreach item='item' index='index' collection='configList' open='(' separator=',' close=')'> #{item} </foreach> "
+
" <foreach item='item' index='index' collection='configList' open='(' separator=',' close=')'> #{item} </foreach> "
+
" </if>"
+
" </if>"
+
...
...
src/main/java/org/rcisoft/business/bdictionary/dto/ColumConfigDTO.java
View file @
b79319d2
...
@@ -12,4 +12,6 @@ public class ColumConfigDTO {
...
@@ -12,4 +12,6 @@ public class ColumConfigDTO {
@ApiModelProperty
(
value
=
"值"
,
required
=
true
,
dataType
=
"varchar"
)
@ApiModelProperty
(
value
=
"值"
,
required
=
true
,
dataType
=
"varchar"
)
private
String
value
;
private
String
value
;
private
String
corpId
;
}
}
src/main/java/org/rcisoft/business/bfile/dao/BTrainFileRepository.java
View file @
b79319d2
...
@@ -26,7 +26,7 @@ public interface BTrainFileRepository extends BaseMapper<BTrainFile> {
...
@@ -26,7 +26,7 @@ public interface BTrainFileRepository extends BaseMapper<BTrainFile> {
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BTrainFile
>
queryBTrainFiles
(
BTrainFile
bTrainFile
);
List
<
BTrainFile
>
queryBTrainFiles
(
BTrainFile
bTrainFile
);
/**
/**
*
分页查询 bTrainFile
*
根据课程查询
*
*
*/
*/
@Select
(
"<script>select * from b_train_file where 1=1 "
@Select
(
"<script>select * from b_train_file where 1=1 "
...
@@ -52,5 +52,6 @@ public interface BTrainFileRepository extends BaseMapper<BTrainFile> {
...
@@ -52,5 +52,6 @@ public interface BTrainFileRepository extends BaseMapper<BTrainFile> {
@Update
(
"update b_train_file set del_flag = 1 where lesson_id = #{lessonId}"
)
@Update
(
"update b_train_file set del_flag = 1 where lesson_id = #{lessonId}"
)
int
deleteByLessonId
(
@Param
(
"lessonId"
)
String
lessonId
);
int
deleteByLessonId
(
@Param
(
"lessonId"
)
String
lessonId
);
}
}
src/main/java/org/rcisoft/business/bfile/entity/BFile.java
View file @
b79319d2
...
@@ -26,7 +26,7 @@ public class BFile extends IdEntity<BFile> {
...
@@ -26,7 +26,7 @@ public class BFile extends IdEntity<BFile> {
/*视频名称*/
/*视频名称*/
// @Length(min = 1,max = 256,message = "长度最小为1,最大为200")
// @Length(min = 1,max = 256,message = "长度最小为1,最大为200")
// @NotBlank
// @NotBlank
@ApiModelProperty
(
value
=
"文件名
(预览时传)
"
)
@ApiModelProperty
(
value
=
"文件名"
)
private
String
fileName
;
private
String
fileName
;
/*视频地址*/
/*视频地址*/
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
b79319d2
...
@@ -519,6 +519,20 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -519,6 +519,20 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
trainPersonCount
(
lessonId
));
bLessonService
.
trainPersonCount
(
lessonId
));
}
}
/**
* @author: zhangqingle
* @param
* @return
*/
@ApiOperation
(
value
=
"630 培训学员总数"
,
notes
=
"培训学员总数(已报名 已到场 未到场)"
)
@GetMapping
(
value
=
"/trainPersons"
)
public
Result
trainPersons
(
CurUser
curUser
,
@Valid
FindTrainPersonDTO
param
,
BindingResult
bindingResult
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonService
.
trainPersons
(
param
));
}
// /**
// /**
// * @author: zhangqingle
// * @author: zhangqingle
...
@@ -546,5 +560,14 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -546,5 +560,14 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
toTraining
(
curUser
,
lessonId
));
bLessonService
.
toTraining
(
curUser
,
lessonId
));
}
}
@ApiOperation
(
value
=
"632 单一查询我参加培训的信息"
,
notes
=
"单一查询我参加培训的信息"
,
response
=
BLesson
.
class
)
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"培训课id"
,
required
=
true
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/findOneMyTrain"
)
public
Result
findOneMyTrain
(
CurUser
curUser
,
String
businessId
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonService
.
findOneMyTrain
(
curUser
,
businessId
));
}
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
b79319d2
...
@@ -6,6 +6,7 @@ import org.rcisoft.business.blesson.dto.*;
...
@@ -6,6 +6,7 @@ import org.rcisoft.business.blesson.dto.*;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -248,4 +249,17 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
...
@@ -248,4 +249,17 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
@Select
(
"select * from b_lesson_person where lesson_id = #{lessonId} and person_id = #{personId}"
)
@Select
(
"select * from b_lesson_person where lesson_id = #{lessonId} and person_id = #{personId}"
)
BLessonPerson
getAppointInTraining
(
@Param
(
"lessonId"
)
String
lessonId
,
@Param
(
"personId"
)
String
personId
);
BLessonPerson
getAppointInTraining
(
@Param
(
"lessonId"
)
String
lessonId
,
@Param
(
"personId"
)
String
personId
);
@Select
(
"<script>select blp.*,su.name PersonName, su.head_pic headPic "
+
" from b_lesson_person blp left join s_user su on blp.person_id = su.business_id "
+
" where 1=1 "
+
"and blp.del_flag = 0 and blp.flag = 1 "
+
"and su.del_flag = 0 and su.flag = 1 "
+
"<if test= \" param.isApply != null and param.isApply != ''\">and blp.is_apply = #{param.isApply} </if> "
+
"<if test= \" param.trainIsSign != null and param.trainIsSign != ''\">and blp.train_is_sign = #{param.trainIsSign} </if> "
+
"and blp.lesson_id = #{param.lessonId}</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BLessonPerson
>
trainPersons
(
@Param
(
"param"
)
FindTrainPersonDTO
param
);
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
b79319d2
...
@@ -6,6 +6,7 @@ import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
...
@@ -6,6 +6,7 @@ import org.rcisoft.business.blabel.dto.QueryLabelResDTO;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonLabel
;
import
org.rcisoft.business.blesson.entity.BLessonLabel
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.business.blesson.entity.BRecommend
;
import
org.rcisoft.business.blesson.entity.BRecommend
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.bean.CurUser
;
...
@@ -953,5 +954,27 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -953,5 +954,27 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BRecommend
>
queryRecommendByLessonId
(
@Param
(
"corpId"
)
String
corpId
,
@Param
(
"lessonId"
)
String
lessonId
);
List
<
BRecommend
>
queryRecommendByLessonId
(
@Param
(
"corpId"
)
String
corpId
,
@Param
(
"lessonId"
)
String
lessonId
);
@Select
(
"<script>select bl.*, "
+
" blp.is_apply isApply,blp.is_appoint isAppoint,blp.train_is_sign trainIsSign,blp.sign_date signDate , blp.is_collect isCollect, "
+
" su.name lecturerName "
+
" from b_lesson bl left join b_lesson_person blp on bl.business_id = blp.lesson_id "
+
" left join s_user su on bl.lecturer_id = su.business_id "
+
" where 1=1 "
+
"and blp.del_flag = 0 and blp.flag = 1 "
+
"and bl.del_flag = 0 and bl.flag = 1 "
+
"and blp.business_id = #{businessId}</script>"
)
@ResultMap
(
value
=
"TrainBaseResultMap"
)
BLesson
findOneMyTrain
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"businessId"
)
String
businessId
);
@Select
(
"<script>"
+
" select count(1) from b_lesson_person "
+
" where 1=1 "
+
" and del_flag = 0 and flag = 1 "
+
" and lesson_id = #{lessonId} "
+
"</script>"
)
int
trainApplyCount
(
String
lessonId
);
}
}
src/main/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
View file @
b79319d2
...
@@ -81,6 +81,9 @@ public class AddLessonDTO {
...
@@ -81,6 +81,9 @@ public class AddLessonDTO {
@ApiModelProperty
(
value
=
"培训签到时间(培训开始前 分钟数)"
)
@ApiModelProperty
(
value
=
"培训签到时间(培训开始前 分钟数)"
)
private
String
trainSignTime
;
private
String
trainSignTime
;
@ApiModelProperty
(
value
=
"培训附件Json"
)
private
String
trainFileJson
;
@ApiModelProperty
(
value
=
"培训附件集合"
)
@ApiModelProperty
(
value
=
"培训附件集合"
)
private
List
<
BTrainFile
>
trainFileList
;
private
List
<
BTrainFile
>
trainFileList
;
...
...
src/main/java/org/rcisoft/business/blesson/dto/FindTrainPersonDTO.java
0 → 100644
View file @
b79319d2
package
org
.
rcisoft
.
business
.
blesson
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
FindTrainPersonDTO
{
@ApiModelProperty
(
value
=
"课程Id"
,
required
=
true
)
private
String
lessonId
;
@ApiModelProperty
(
value
=
"培训是否报名(0 未报名 1已报名)"
)
private
String
isApply
;
@ApiModelProperty
(
value
=
"培训状态(0 待参加 1 缺勤 2 签到 )"
)
private
String
trainIsSign
;
private
String
userId
;
private
String
corpId
;
}
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
b79319d2
...
@@ -184,6 +184,31 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -184,6 +184,31 @@ public class BLesson extends IdEntity<BLesson> {
private
List
<
BViewRangeSonDTO
>
viewRangeDepartList
;
private
List
<
BViewRangeSonDTO
>
viewRangeDepartList
;
@ApiModelProperty
(
value
=
"是否报名(0未报名 1已报名)"
)
@Transient
private
String
isApply
;
@ApiModelProperty
(
value
=
"知否必修"
)
@Transient
private
String
isAppoint
;
@ApiModelProperty
(
value
=
"是否签到"
)
@Transient
private
String
trainIsSign
;
@ApiModelProperty
(
value
=
"签到日期"
)
@Transient
private
String
signDate
;
@ApiModelProperty
(
value
=
"是否收藏"
)
@Transient
private
String
isCollect
;
@ApiModelProperty
(
value
=
"报名是否已满"
)
@Transient
private
String
applyIsFull
;
public
void
initModel
(){
public
void
initModel
(){
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
// this.setDefaultUrl(global.getDEFAULT_COURSE_LOCATION());
UserUtil
.
setCurrentPersistOperation
(
this
);
UserUtil
.
setCurrentPersistOperation
(
this
);
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
b79319d2
...
@@ -113,9 +113,22 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -113,9 +113,22 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Transient
@Transient
private
String
lessonType
;
private
String
lessonType
;
@Transient
@Transient
private
String
corpId
;
private
String
corpId
;
@ApiModelProperty
(
value
=
"姓名"
)
@Transient
private
String
PersonName
;
@ApiModelProperty
(
value
=
"头像"
)
@Transient
private
String
headPic
;
@ApiModelProperty
(
value
=
"部门名"
)
@Transient
private
String
departName
;
//初始化
//初始化
public
void
initModel
(){
public
void
initModel
(){
UserUtil
.
setCurrentPersistOperation
(
this
);
UserUtil
.
setCurrentPersistOperation
(
this
);
...
...
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
b79319d2
...
@@ -3,6 +3,7 @@ package org.rcisoft.business.blesson.service;
...
@@ -3,6 +3,7 @@ package org.rcisoft.business.blesson.service;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.dto.*
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLesson
;
import
org.rcisoft.business.blesson.entity.BLessonPerson
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.rcisoft.sys.user.bean.CurUser
;
...
@@ -178,6 +179,14 @@ public interface BLessonService{
...
@@ -178,6 +179,14 @@ public interface BLessonService{
*/
*/
ILessonCountDTO
trainPersonCount
(
String
lessonId
);
ILessonCountDTO
trainPersonCount
(
String
lessonId
);
/**
* 培训学员查询
* @author: zhangqingle
* @param param
* @return
*/
List
<
BLessonPerson
>
trainPersons
(
FindTrainPersonDTO
param
);
/**
/**
* 分页查询列表页全部
* 分页查询列表页全部
* @author: zhangqingle
* @author: zhangqingle
...
@@ -226,4 +235,13 @@ public interface BLessonService{
...
@@ -226,4 +235,13 @@ public interface BLessonService{
*/
*/
int
toTraining
(
CurUser
curUser
,
String
lessonId
);
int
toTraining
(
CurUser
curUser
,
String
lessonId
);
/**
* 单一查询我参加培训的信息
* @param curUser
* @param businessId
* @return
*/
BLesson
findOneMyTrain
(
CurUser
curUser
,
String
businessId
);
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
b79319d2
package
org
.
rcisoft
.
business
.
blesson
.
service
.
impl
;
package
org
.
rcisoft
.
business
.
blesson
.
service
.
impl
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
net.sf.json.JSONArray
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.business.bcourse.dao.BCourseRepository
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
import
org.rcisoft.business.bcourse.dto.AllCourseDTO
;
...
@@ -31,6 +33,7 @@ import org.springframework.stereotype.Service;
...
@@ -31,6 +33,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.*
;
import
java.util.*
;
...
@@ -305,7 +308,16 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -305,7 +308,16 @@ public class BLessonServiceImpl implements BLessonService {
bTrainFileRepository
.
deleteByLessonId
(
model
.
getBusinessId
());
bTrainFileRepository
.
deleteByLessonId
(
model
.
getBusinessId
());
}
}
if
(
StringUtils
.
isNotEmpty
(
addLessonDTO
.
getTrainFileJson
())){
ObjectMapper
mapper
=
new
ObjectMapper
();
try
{
List
<
BTrainFile
>
bTrainFiles
=
Arrays
.
asList
(
mapper
.
readValue
(
addLessonDTO
.
getTrainFileJson
(),
BTrainFile
[].
class
));
addLessonDTO
.
setTrainFileList
(
bTrainFiles
);
}
catch
(
IOException
e
)
{
log
.
error
(
"JSON格式不正确"
+
e
.
getMessage
());
throw
new
ServiceException
(
ResultServiceEnums
.
JSON_ERROR
);
}
}
List
<
BMaterial
>
bMaterialList
=
new
ArrayList
<>();
List
<
BMaterial
>
bMaterialList
=
new
ArrayList
<>();
//插入b_train_file表
//插入b_train_file表
if
(
addLessonDTO
.
getTrainFileList
()
!=
null
&&
addLessonDTO
.
getTrainFileList
().
size
()
>
0
)
{
if
(
addLessonDTO
.
getTrainFileList
()
!=
null
&&
addLessonDTO
.
getTrainFileList
().
size
()
>
0
)
{
...
@@ -595,6 +607,34 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -595,6 +607,34 @@ public class BLessonServiceImpl implements BLessonService {
return
bLessonRepository
.
trainPersonCount
(
lessonId
);
return
bLessonRepository
.
trainPersonCount
(
lessonId
);
}
}
@Override
public
List
<
BLessonPerson
>
trainPersons
(
FindTrainPersonDTO
param
)
{
List
<
BLessonPerson
>
bLessonPersonList
=
bLessonPersonRepository
.
trainPersons
(
param
);
if
(
bLessonPersonList
!=
null
&&
bLessonPersonList
.
size
()>
0
){
List
<
String
>
departs
=
new
ArrayList
<>();
List
<
String
>
ids
=
new
ArrayList
<>();
bLessonPersonList
.
forEach
(
bLessonPerson
->{
String
id
=
bLessonPerson
.
getPersonId
();
ids
.
add
(
id
);
});
MTUserGetsReqDTO
mtUserGetsReqDTO
=
new
MTUserGetsReqDTO
();
mtUserGetsReqDTO
.
setCorpId
(
param
.
getCorpId
());
mtUserGetsReqDTO
.
setIds
(
ids
);
List
<
MTUserInfoRspDTO
>
mtUserInfoRspDTOList
=
cotactApiRequestClient
.
userGets
(
mtUserGetsReqDTO
);
bLessonPersonList
.
forEach
(
bLessonPerson
->{
mtUserInfoRspDTOList
.
forEach
(
mtUserInfoRspDTO
->
{
if
(
mtUserInfoRspDTO
.
getId
().
equals
(
bLessonPerson
.
getPersonId
())){
//设置部门名
bLessonPerson
.
setDepartName
(
mtUserInfoRspDTO
.
getDepts
().
get
(
0
).
getName
());
}
});
});
}
return
bLessonPersonList
;
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
BLesson
>
queryListAllLessonByPagination
(
PageUtil
pageUtil
,
FindListLessonDTO
model
,
List
<
AllCourseDTO
>
allCourse
)
{
public
List
<
BLesson
>
queryListAllLessonByPagination
(
PageUtil
pageUtil
,
FindListLessonDTO
model
,
List
<
AllCourseDTO
>
allCourse
)
{
...
@@ -767,6 +807,19 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -767,6 +807,19 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
public
BLesson
findOneMyTrain
(
CurUser
curUser
,
String
businessId
)
{
BLesson
bLesson
=
bLessonRepository
.
findOneMyTrain
(
curUser
,
businessId
);
int
trainApplyCount
=
bLessonRepository
.
trainApplyCount
(
bLesson
.
getBusinessId
());
if
(
StringUtils
.
isNotEmpty
(
bLesson
.
getMaxApplyPerson
())
&&
trainApplyCount
>=
Integer
.
parseInt
(
bLesson
.
getMaxApplyPerson
())){
bLesson
.
setApplyIsFull
(
"1"
);
}
else
{
bLesson
.
setApplyIsFull
(
"0"
);
}
return
bLesson
;
}
//遍历标签放入List中
//遍历标签放入List中
List
<
BLessonLabel
>
addLabel
(
BLesson
model
)
{
List
<
BLessonLabel
>
addLabel
(
BLesson
model
)
{
//标签集合
//标签集合
...
...
src/main/java/org/rcisoft/common/util/outClient/MTCotactApiRequestClient.java
View file @
b79319d2
...
@@ -457,74 +457,6 @@ public class MTCotactApiRequestClient {
...
@@ -457,74 +457,6 @@ public class MTCotactApiRequestClient {
zxClientType
,
zxAccountId
).
getData
().
getList
();
zxClientType
,
zxAccountId
).
getData
().
getList
();
}
}
/**
* 文件转换
*/
public
List
<
UserGetPageListByDeptRspDTO
>
fileChange
(
uploadDTO
dto
)
{
// if("dev".equalsIgnoreCase(serverType)){
// //下载
// String filePath = global.getBASE_UPLOAD_SERVER_LOCATION()+"/"+global.getTEMP_LOCATION();
// File file=new File(filePath);
// //判断文件夹是否存在
// if (!file.exists()) {
// //如果文件夹不存在,则创建新的的文件夹
// file.mkdirs();
// }
// FileOutputStream fileOut = null;
// HttpURLConnection conn = null;
// InputStream inputStream = null;
// try
// {
// // 建立链接
// URL httpUrl=new URL(dto.getVideoUrl());
// conn=(HttpURLConnection) httpUrl.openConnection();
// //以Post方式提交表单,默认get方式
// conn.setRequestMethod("GET");
// conn.setDoInput(true);
// conn.setDoOutput(true);
// // post方式不能使用缓存
// conn.setUseCaches(false);
// //连接指定的资源
// conn.connect();
// //获取网络输入流
// inputStream=conn.getInputStream();
// BufferedInputStream bis = new BufferedInputStream(inputStream);
// //判断文件的保存路径后面是否以/结尾
// if (!filePath.endsWith("/")) {
// filePath += "/";
// }
// //写入到文件(注意文件保存路径的后面一定要加上文件的名称)
// fileOut = new FileOutputStream(filePath+dto.getFileName());
// BufferedOutputStream bos = new BufferedOutputStream(fileOut);
// byte[] buf = new byte[4096];
// int length = bis.read(buf);
// //保存文件
// while(length != -1)
// {
// bos.write(buf, 0, length);
// length = bis.read(buf);
// }
// bos.close();
// bis.close();
// conn.disconnect();
// } catch (Exception e)
// {
// log.info("抛出异常");
// throw new ServiceException(ResultServiceEnums.DOWNLOAD_ERROR);
// }
// //------------------文件转换------------------
//
//
// //----------------------------------------------
// //文件上传
//// contactFeignClient.userSearchByName
//
//
//
// }
return
null
;
}
/**
/**
* 获取部门下所有子部门内人员
* 获取部门下所有子部门内人员
* @param corpId
* @param corpId
...
...
src/main/java/org/rcisoft/core/result/ResultServiceEnums.java
View file @
b79319d2
...
@@ -221,6 +221,7 @@ public enum ResultServiceEnums {
...
@@ -221,6 +221,7 @@ public enum ResultServiceEnums {
NO_DATA
(
119
,
"该数据不存在"
),
NO_DATA
(
119
,
"该数据不存在"
),
CHANGE_FILE_ERROR
(
120
,
"文件转换失败"
),
CHANGE_FILE_ERROR
(
120
,
"文件转换失败"
),
NOT_LESSON_ERROR
(
121
,
"该课程不存在"
),
NOT_LESSON_ERROR
(
121
,
"该课程不存在"
),
JSON_ERROR
(
122
,
"JSON格式不正确"
),
;
;
...
...
src/main/resources/mapper/business/blesson/mapper/BLessonMapper.xml
View file @
b79319d2
...
@@ -44,6 +44,54 @@
...
@@ -44,6 +44,54 @@
</collection>
</collection>
</resultMap>
</resultMap>
<resultMap
id=
"TrainBaseResultMap"
type=
"org.rcisoft.business.blesson.entity.BLesson"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"lesson_name"
jdbcType=
"VARCHAR"
property=
"lessonName"
/>
<result
column=
"default_url"
jdbcType=
"VARCHAR"
property=
"defaultUrl"
/>
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"class_hour"
jdbcType=
"VARCHAR"
property=
"classHour"
/>
<result
column=
"lecturer_id"
jdbcType=
"VARCHAR"
property=
"lecturerId"
/>
<result
column=
"release_state"
jdbcType=
"VARCHAR"
property=
"releaseState"
/>
<result
column=
"course_id"
jdbcType=
"VARCHAR"
property=
"courseId"
/>
<result
column=
"person_number"
jdbcType=
"VARCHAR"
property=
"personNumber"
/>
<result
column=
"course_time"
jdbcType=
"VARCHAR"
property=
"courseTime"
/>
<result
column=
"course_description"
jdbcType=
"VARCHAR"
property=
"courseDescription"
/>
<result
column=
"view_range"
jdbcType=
"VARCHAR"
property=
"viewRange"
/>
<result
column=
"release_date"
jdbcType=
"TIMESTAMP"
property=
"releaseDate"
/>
<result
column=
"lesson_type"
jdbcType=
"VARCHAR"
property=
"lessonType"
/>
<result
column=
"discuss_number"
jdbcType=
"VARCHAR"
property=
"discussNumber"
/>
<result
column=
"recommend"
jdbcType=
"VARCHAR"
property=
"recommend"
/>
<result
column=
"collect_number"
jdbcType=
"VARCHAR"
property=
"collectNumber"
/>
<result
column=
"hot_number"
jdbcType=
"VARCHAR"
property=
"hotNumber"
/>
<!--培训-->
<result
column=
"apply_start_date"
jdbcType=
"TIMESTAMP"
property=
"applyStartDate"
/>
<result
column=
"apply_over_date"
jdbcType=
"TIMESTAMP"
property=
"applyOverDate"
/>
<result
column=
"train_start_date"
jdbcType=
"TIMESTAMP"
property=
"trainStartDate"
/>
<result
column=
"train_over_date"
jdbcType=
"TIMESTAMP"
property=
"trainOverDate"
/>
<result
column=
"max_apply_person"
jdbcType=
"VARCHAR"
property=
"maxApplyPerson"
/>
<result
column=
"train_address"
jdbcType=
"VARCHAR"
property=
"trainAddress"
/>
<result
column=
"train_sign_time"
jdbcType=
"VARCHAR"
property=
"trainSignTime"
/>
<result
column=
"qr_code"
jdbcType=
"VARCHAR"
property=
"qrCode"
/>
<!---->
<collection
property=
"labelList"
ofType=
"org.rcisoft.business.blabel.dto.QueryLabelResDTO"
javaType=
"java.util.ArrayList"
select=
"org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"
column=
"business_id"
>
</collection>
<collection
property=
"bTrainFileList"
ofType=
"org.rcisoft.business.bfile.entity.BTrainFile"
javaType=
"java.util.ArrayList"
select=
"org.rcisoft.business.bfile.dao.BTrainFileRepository.queryByLessonId"
column=
"business_id"
>
</collection>
</resultMap>
<!--<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.blesson.entity.BLesson" extends="BaseResultMap">-->
<!--<resultMap id="SupperChildListResultMap" type="org.rcisoft.business.blesson.entity.BLesson" extends="BaseResultMap">-->
<!--<association column="business_id" property="labelList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"></association>-->
<!--<association column="business_id" property="labelList" select="org.rcisoft.business.blesson.dao.BLessonRepository.queryLabelByLessonId"></association>-->
<!--</resultMap>-->
<!--</resultMap>-->
...
...
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