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
d05277a0
Commit
d05277a0
authored
Oct 24, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/meiteng' into meiteng
parents
46263ca6
fd06730a
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
148 additions
and
30 deletions
+148
-30
BChapterServiceImpl.java
...t/business/bchapter/service/impl/BChapterServiceImpl.java
+12
-14
BTrainFileRepository.java
.../org/rcisoft/business/bfile/dao/BTrainFileRepository.java
+1
-1
BLessonController.java
...cisoft/business/blesson/controller/BLessonController.java
+12
-1
BLessonRepository.java
...a/org/rcisoft/business/blesson/dao/BLessonRepository.java
+12
-2
BViewrangeRepository.java
...rg/rcisoft/business/blesson/dao/BViewrangeRepository.java
+1
-1
AddLessonDTO.java
...n/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
+3
-1
BLesson.java
...ain/java/org/rcisoft/business/blesson/entity/BLesson.java
+12
-2
BLessonPerson.java
...va/org/rcisoft/business/blesson/entity/BLessonPerson.java
+3
-0
BViewrange.java
.../java/org/rcisoft/business/blesson/entity/BViewrange.java
+0
-1
BLessonService.java
.../org/rcisoft/business/blesson/service/BLessonService.java
+9
-0
BLessonServiceImpl.java
...oft/business/blesson/service/impl/BLessonServiceImpl.java
+58
-5
BMaterialRepository.java
...g/rcisoft/business/bmaterial/dao/BMaterialRepository.java
+13
-2
OfficeToPdf.java
src/main/java/org/rcisoft/core/util/OfficeToPdf.java
+11
-0
BLessonPersonMapper.xml
...es/mapper/business/blesson/mapper/BLessonPersonMapper.xml
+1
-0
No files found.
src/main/java/org/rcisoft/business/bchapter/service/impl/BChapterServiceImpl.java
View file @
d05277a0
...
@@ -5,6 +5,8 @@ import cn.hutool.core.util.StrUtil;
...
@@ -5,6 +5,8 @@ import cn.hutool.core.util.StrUtil;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.io.FileUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.rcisoft.business.bchapter.dao.BChapterRepository
;
import
org.rcisoft.business.bchapter.dao.BChapterRepository
;
import
org.rcisoft.business.bchapter.dto.*
;
import
org.rcisoft.business.bchapter.dto.*
;
import
org.rcisoft.business.bchapter.entity.BChapter
;
import
org.rcisoft.business.bchapter.entity.BChapter
;
...
@@ -51,10 +53,7 @@ import java.nio.file.Files;
...
@@ -51,10 +53,7 @@ import java.nio.file.Files;
import
java.nio.file.Path
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.nio.file.Paths
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.ArrayList
;
import
java.util.*
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
/**
...
@@ -261,7 +260,7 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -261,7 +260,7 @@ public class BChapterServiceImpl implements BChapterService {
if
(
StringUtils
.
isNotEmpty
(
model
.
getIsTest
()))
{
if
(
StringUtils
.
isNotEmpty
(
model
.
getIsTest
()))
{
BMaterial
bMaterial
=
new
BMaterial
();
BMaterial
bMaterial
=
new
BMaterial
();
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
UserUtil
.
setCurrentPersistOperation
(
bMaterial
);
bMaterial
.
setLessonId
(
model
.
getLessonId
());
bMaterial
.
setLessonId
(
chapterDTO
.
getLessonId
());
bMaterial
.
setChapterId
(
model
.
getBusinessId
());
bMaterial
.
setChapterId
(
model
.
getBusinessId
());
bMaterial
.
setFileName
(
dto
.
getFileName
());
bMaterial
.
setFileName
(
dto
.
getFileName
());
...
@@ -269,11 +268,8 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -269,11 +268,8 @@ public class BChapterServiceImpl implements BChapterService {
bMaterial
.
setFileTime
(
dto
.
getFileTime
().
substring
(
0
,
dto
.
getFileTime
().
lastIndexOf
(
"."
)));
bMaterial
.
setFileTime
(
dto
.
getFileTime
().
substring
(
0
,
dto
.
getFileTime
().
lastIndexOf
(
"."
)));
}
}
if
(
Integer
.
parseInt
(
model
.
getIsTest
())
<
4
)
{
bMaterial
.
setFileUrl
(
dto
.
getVideoUrl
());
bMaterial
.
setFileUrl
(
model
.
getVideoUrl
());
}
else
if
(
Integer
.
parseInt
(
model
.
getIsTest
())
>=
4
)
{
bMaterial
.
setFileUrl
(
model
.
getFileUrl
());
}
bMaterial
.
setType
(
model
.
getIsTest
());
bMaterial
.
setType
(
model
.
getIsTest
());
bMaterial
.
setUploadType
(
"1"
);
bMaterial
.
setUploadType
(
"1"
);
bMaterial
.
setFileSize
(
dto
.
getFileSize
());
bMaterial
.
setFileSize
(
dto
.
getFileSize
());
...
@@ -320,9 +316,8 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -320,9 +316,8 @@ public class BChapterServiceImpl implements BChapterService {
public
String
changeFile
(
BFile
bFile
)
{
public
String
changeFile
(
BFile
bFile
)
{
log
.
debug
(
"****************request + begin***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
String
name
=
bFile
.
getVideoUrl
().
substring
(
bFile
.
getVideoUrl
().
lastIndexOf
(
"/"
)
+
1
);
String
name
=
bFile
.
getVideoUrl
().
substring
(
bFile
.
getVideoUrl
().
lastIndexOf
(
"/"
)
+
1
);
String
filePath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
bFile
.
getLessonId
();
String
filePath
=
global
.
getBASE_UPLOAD_SERVER_LOCATION
()
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
bFile
.
getLessonId
();
String
returnBasePath
=
global
.
getRETURN_UPLOAD_SERVER_LOCATION
()
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
bFile
.
getLessonId
();
String
returnBasePath
=
global
.
getRETURN_UPLOAD_SERVER_LOCATION
()
+
global
.
getCOURSE_LOCATION
()
+
File
.
separator
+
bFile
.
getLessonId
();
File
file
=
new
File
(
filePath
);
File
file
=
new
File
(
filePath
);
...
@@ -359,7 +354,6 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -359,7 +354,6 @@ public class BChapterServiceImpl implements BChapterService {
String
downLoadFileUrl
=
downLoadFile
(
bFile
,
file
,
filePath
);
String
downLoadFileUrl
=
downLoadFile
(
bFile
,
file
,
filePath
);
log
.
debug
(
"------------------z12-----------------------------downLoadFileUrl:"
+
filePath
+
File
.
separator
+
downLoadFileUrl
);
log
.
debug
(
"------------------z12-----------------------------downLoadFileUrl:"
+
filePath
+
File
.
separator
+
downLoadFileUrl
);
log
.
debug
(
"------------------z12-----------------------------filePath:"
+
filePath
+
File
.
separator
+
newName
);
log
.
debug
(
"------------------z12-----------------------------filePath:"
+
filePath
+
File
.
separator
+
newName
);
int
result
=
officeToPdf
.
transformToPdf
(
filePath
+
File
.
separator
+
downLoadFileUrl
,
filePath
+
File
.
separator
+
newName
);
int
result
=
officeToPdf
.
transformToPdf
(
filePath
+
File
.
separator
+
downLoadFileUrl
,
filePath
+
File
.
separator
+
newName
);
log
.
debug
(
"------------------z13-----------------------------"
);
log
.
debug
(
"------------------z13-----------------------------"
);
if
(
result
<
1
)
{
if
(
result
<
1
)
{
...
@@ -374,6 +368,8 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -374,6 +368,8 @@ public class BChapterServiceImpl implements BChapterService {
bFileRepository
.
updateByPrimaryKeySelective
(
bFile
);
bFileRepository
.
updateByPrimaryKeySelective
(
bFile
);
}
}
log
.
debug
(
"------------------z16-----------------------------"
);
log
.
debug
(
"------------------z16-----------------------------"
);
log
.
debug
(
"****************request + end***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
return
returnBasePath
+
File
.
separator
+
newName
;
return
returnBasePath
+
File
.
separator
+
newName
;
}
}
}
else
{
}
else
{
...
@@ -384,6 +380,7 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -384,6 +380,7 @@ public class BChapterServiceImpl implements BChapterService {
//下载
//下载
public
String
downLoadFile
(
BFile
bFile
,
File
file
,
String
filePath
)
{
public
String
downLoadFile
(
BFile
bFile
,
File
file
,
String
filePath
)
{
log
.
debug
(
"****************download + begin***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
String
name
=
bFile
.
getVideoUrl
().
substring
(
bFile
.
getVideoUrl
().
lastIndexOf
(
"/"
)
+
1
);
String
name
=
bFile
.
getVideoUrl
().
substring
(
bFile
.
getVideoUrl
().
lastIndexOf
(
"/"
)
+
1
);
log
.
debug
(
"------------------D1-----------------------------"
+
filePath
);
log
.
debug
(
"------------------D1-----------------------------"
+
filePath
);
...
@@ -427,7 +424,7 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -427,7 +424,7 @@ public class BChapterServiceImpl implements BChapterService {
log
.
debug
(
"------------------D10-----------------------------"
);
log
.
debug
(
"------------------D10-----------------------------"
);
BufferedOutputStream
bos
=
new
BufferedOutputStream
(
fileOut
);
BufferedOutputStream
bos
=
new
BufferedOutputStream
(
fileOut
);
log
.
debug
(
"------------------D11-----------------------------"
);
log
.
debug
(
"------------------D11-----------------------------"
);
byte
[]
buf
=
new
byte
[
4096
];
byte
[]
buf
=
new
byte
[
1024
*
512
];
int
length
=
bis
.
read
(
buf
);
int
length
=
bis
.
read
(
buf
);
//保存文件
//保存文件
while
(
length
!=
-
1
)
{
while
(
length
!=
-
1
)
{
...
@@ -438,6 +435,7 @@ public class BChapterServiceImpl implements BChapterService {
...
@@ -438,6 +435,7 @@ public class BChapterServiceImpl implements BChapterService {
bis
.
close
();
bis
.
close
();
conn
.
disconnect
();
conn
.
disconnect
();
log
.
debug
(
"------------------D12-----------------------------"
);
log
.
debug
(
"------------------D12-----------------------------"
);
log
.
debug
(
"****************download + end***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
()
+
"下载文件异常"
);
log
.
error
(
e
.
getMessage
()
+
"下载文件异常"
);
throw
new
ServiceException
(
ResultServiceEnums
.
DOWNLOAD_ERROR
);
throw
new
ServiceException
(
ResultServiceEnums
.
DOWNLOAD_ERROR
);
...
...
src/main/java/org/rcisoft/business/bfile/dao/BTrainFileRepository.java
View file @
d05277a0
...
@@ -40,7 +40,7 @@ public interface BTrainFileRepository extends BaseMapper<BTrainFile> {
...
@@ -40,7 +40,7 @@ public interface BTrainFileRepository extends BaseMapper<BTrainFile> {
@Insert
(
"<script>INSERT INTO b_train_file "
+
@Insert
(
"<script>INSERT INTO b_train_file "
+
"(create_date,create_by,update_date,update_by,"
+
"(create_date,create_by,update_date,update_by,"
+
"del_flag,flag,business_id,remarks"
+
"del_flag,flag,business_id,remarks
,
"
+
"lesson_id,file_name,video_url,file_url,file_size,type)VALUES"
+
"lesson_id,file_name,video_url,file_url,file_size,type)VALUES"
+
"<foreach collection=\"param\" item=\"item\" separator=\",\">"
+
"<foreach collection=\"param\" item=\"item\" separator=\",\">"
+
"(#{item.createDate},#{item.createBy},#{item.updateDate},#{item.updateBy},"
+
"(#{item.createDate},#{item.createBy},#{item.updateDate},#{item.updateBy},"
+
...
...
src/main/java/org/rcisoft/business/blesson/controller/BLessonController.java
View file @
d05277a0
...
@@ -524,7 +524,7 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -524,7 +524,7 @@ public class BLessonController extends PaginationController<BLesson> {
* @param
* @param
* @return
* @return
*/
*/
@ApiOperation
(
value
=
"630 培训学员
总数"
,
notes
=
"培训学员总数(已报名 已到场 未到场)
"
)
@ApiOperation
(
value
=
"630 培训学员
"
,
notes
=
"培训学员
"
)
@GetMapping
(
value
=
"/trainPersons"
)
@GetMapping
(
value
=
"/trainPersons"
)
public
Result
trainPersons
(
CurUser
curUser
,
@Valid
FindTrainPersonDTO
param
,
BindingResult
bindingResult
)
{
public
Result
trainPersons
(
CurUser
curUser
,
@Valid
FindTrainPersonDTO
param
,
BindingResult
bindingResult
)
{
...
@@ -570,4 +570,15 @@ public class BLessonController extends PaginationController<BLesson> {
...
@@ -570,4 +570,15 @@ public class BLessonController extends PaginationController<BLesson> {
bLessonService
.
findOneMyTrain
(
curUser
,
businessId
));
bLessonService
.
findOneMyTrain
(
curUser
,
businessId
));
}
}
@ApiOperation
(
value
=
"633 单一查询我主讲培训的信息"
,
notes
=
"单一查询我主讲培训的信息"
,
response
=
BLesson
.
class
)
@ApiImplicitParam
(
name
=
"lessonId"
,
value
=
"培训课id"
,
required
=
true
,
dataType
=
"varchar"
)
@GetMapping
(
value
=
"/findOneMyTeachTrain"
)
public
Result
findOneMyTeachTrain
(
CurUser
curUser
,
String
lessonId
)
{
return
Result
.
builder
(
new
PersistModel
(
1
),
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
bLessonService
.
findOneMyTeachTrain
(
curUser
,
lessonId
));
}
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonRepository.java
View file @
d05277a0
...
@@ -86,7 +86,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -86,7 +86,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
" where bl.del_flag != 1 and bl.flag = 1 "
+
" where bl.del_flag != 1 and bl.flag = 1 "
+
" and bl.business_id = #{businessId} "
+
" and bl.business_id = #{businessId} "
+
"</script>"
)
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"
Train
BaseResultMap"
)
BLesson
selectInfoById
(
String
businessId
);
BLesson
selectInfoById
(
String
businessId
);
...
@@ -934,7 +934,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -934,7 +934,7 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
"and les.del_flag != 1 and les.flag = 1 "
+
"and les.del_flag != 1 and les.flag = 1 "
+
"AND les.corp_id = #{corpId}"
+
"AND les.corp_id = #{corpId}"
+
"<if test='!isAdmin'>"
+
"<if test='!isAdmin'>"
+
"AND les.
lecturer_id
IN"
+
"AND les.
create_by
IN"
+
"<foreach item='item' index='index' collection='CurUserSet' open='(' close=')' separator=','> "
+
"<foreach item='item' index='index' collection='CurUserSet' open='(' close=')' separator=','> "
+
"#{item} "
+
"#{item} "
+
"</foreach>"
+
"</foreach>"
+
...
@@ -967,6 +967,16 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
...
@@ -967,6 +967,16 @@ public interface BLessonRepository extends BaseMapper<BLesson> {
@ResultMap
(
value
=
"TrainBaseResultMap"
)
@ResultMap
(
value
=
"TrainBaseResultMap"
)
BLesson
findOneMyTrain
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"businessId"
)
String
businessId
);
BLesson
findOneMyTrain
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"businessId"
)
String
businessId
);
@Select
(
"<script>select bl.*, "
+
" su.name lecturerName "
+
" from b_lesson bl "
+
" left join s_user su on bl.lecturer_id = su.business_id "
+
" where 1=1 "
+
"and bl.del_flag = 0 and bl.flag = 1 "
+
"and bl.business_id = #{lessonId} </script>"
)
@ResultMap
(
value
=
"TrainBaseResultMap"
)
BLesson
findOneMyTeachTrain
(
@Param
(
"curUser"
)
CurUser
curUser
,
@Param
(
"lessonId"
)
String
lessonId
);
@Select
(
"<script>"
+
@Select
(
"<script>"
+
" select count(1) from b_lesson_person "
+
" select count(1) from b_lesson_person "
+
...
...
src/main/java/org/rcisoft/business/blesson/dao/BViewrangeRepository.java
View file @
d05277a0
...
@@ -37,7 +37,7 @@ public interface BViewrangeRepository extends BaseMapper<BViewrange> {
...
@@ -37,7 +37,7 @@ public interface BViewrangeRepository extends BaseMapper<BViewrange> {
" <if test='remarks != null'>remarks=#{remarks},</if> "
,
" <if test='remarks != null'>remarks=#{remarks},</if> "
,
" <if test='lessonId != null'>lesson_id=#{lessonId},</if> "
,
" <if test='lessonId != null'>lesson_id=#{lessonId},</if> "
,
" <if test='type != null'>type=#{type},</if> "
,
" <if test='type != null'>type=#{type},</if> "
,
" <if test='corp_id != null'>corp_id=#{corp
_i
d},</if> "
,
" <if test='corp_id != null'>corp_id=#{corp
I
d},</if> "
,
" </set>"
,
" </set>"
,
"where lesson_id=#{lessonId}"
,
"where lesson_id=#{lessonId}"
,
"</script>"
})
"</script>"
})
...
...
src/main/java/org/rcisoft/business/blesson/dto/AddLessonDTO.java
View file @
d05277a0
...
@@ -27,9 +27,11 @@ public class AddLessonDTO {
...
@@ -27,9 +27,11 @@ public class AddLessonDTO {
private
String
defaultUrl
;
private
String
defaultUrl
;
@ApiModelProperty
(
value
=
"课程分类"
,
required
=
true
)
@ApiModelProperty
(
value
=
"课程分类"
,
required
=
true
)
@NotBlank
private
String
courseId
;
private
String
courseId
;
@ApiModelProperty
(
value
=
"讲师id"
)
private
String
lecturerId
;
@ApiModelProperty
(
value
=
"课程描述"
)
@ApiModelProperty
(
value
=
"课程描述"
)
private
String
courseDescription
;
private
String
courseDescription
;
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLesson.java
View file @
d05277a0
package
org
.
rcisoft
.
business
.
blesson
.
entity
;
package
org
.
rcisoft
.
business
.
blesson
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -12,6 +13,7 @@ import org.rcisoft.common.component.Global;
...
@@ -12,6 +13,7 @@ import org.rcisoft.common.component.Global;
import
org.rcisoft.core.entity.IdEntity
;
import
org.rcisoft.core.entity.IdEntity
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.util.UserUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
javax.persistence.Entity
;
import
javax.persistence.Entity
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
...
@@ -109,15 +111,23 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -109,15 +111,23 @@ public class BLesson extends IdEntity<BLesson> {
private
String
value
;
private
String
value
;
//---------------培训------------------
//---------------培训------------------
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"报名开始时间"
)
@ApiModelProperty
(
value
=
"报名开始时间"
)
private
Date
applyStartDate
;
private
Date
applyStartDate
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"报名结束时间"
)
@ApiModelProperty
(
value
=
"报名结束时间"
)
private
Date
applyOverDate
;
private
Date
applyOverDate
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"培训开始时间"
)
@ApiModelProperty
(
value
=
"培训开始时间"
)
private
Date
trainStartDate
;
private
Date
trainStartDate
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"培训结束时间"
)
@ApiModelProperty
(
value
=
"培训结束时间"
)
private
Date
trainOverDate
;
private
Date
trainOverDate
;
...
@@ -128,6 +138,8 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -128,6 +138,8 @@ public class BLesson extends IdEntity<BLesson> {
@Length
(
min
=
1
,
max
=
255
,
message
=
"长度最小为1,最大为255"
)
@Length
(
min
=
1
,
max
=
255
,
message
=
"长度最小为1,最大为255"
)
private
String
trainAddress
;
private
String
trainAddress
;
@DateTimeFormat
(
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy/MM/dd HH:mm:ss"
)
@ApiModelProperty
(
value
=
"培训签到时间(培训开始前 分钟数)"
)
@ApiModelProperty
(
value
=
"培训签到时间(培训开始前 分钟数)"
)
@Length
(
min
=
1
,
max
=
15
,
message
=
"长度最小为1,最大为15"
)
@Length
(
min
=
1
,
max
=
15
,
message
=
"长度最小为1,最大为15"
)
private
String
trainSignTime
;
private
String
trainSignTime
;
...
@@ -235,8 +247,6 @@ public class BLesson extends IdEntity<BLesson> {
...
@@ -235,8 +247,6 @@ public class BLesson extends IdEntity<BLesson> {
UserUtil
.
setCurrentPersistOperation
(
this
);
UserUtil
.
setCurrentPersistOperation
(
this
);
//设置状态为待发布
//设置状态为待发布
this
.
setReleaseState
(
"0"
);
this
.
setReleaseState
(
"0"
);
// //设置讲师为登录人
// this.setLecturerId(this.getCreateBy());
//设置初始报名人数为0
//设置初始报名人数为0
this
.
setPersonNumber
(
"0"
);
this
.
setPersonNumber
(
"0"
);
//设置初始评论人数为0
//设置初始评论人数为0
...
...
src/main/java/org/rcisoft/business/blesson/entity/BLessonPerson.java
View file @
d05277a0
...
@@ -69,6 +69,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
...
@@ -69,6 +69,9 @@ public class BLessonPerson extends IdEntity<BLessonPerson> {
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
@Length
(
min
=
1
,
max
=
1
,
message
=
"长度最小为1,最大为1"
)
private
String
trainIsSign
;
private
String
trainIsSign
;
@ApiModelProperty
(
value
=
"报名日期"
)
private
String
applyDate
;
@ApiModelProperty
(
value
=
"签到日期"
)
@ApiModelProperty
(
value
=
"签到日期"
)
private
String
signDate
;
private
String
signDate
;
//-----------------------------
//-----------------------------
...
...
src/main/java/org/rcisoft/business/blesson/entity/BViewrange.java
View file @
d05277a0
...
@@ -21,6 +21,5 @@ public class BViewrange extends IdEntity<BViewrange> {
...
@@ -21,6 +21,5 @@ public class BViewrange extends IdEntity<BViewrange> {
private
String
type
;
private
String
type
;
}
}
src/main/java/org/rcisoft/business/blesson/service/BLessonService.java
View file @
d05277a0
...
@@ -244,4 +244,13 @@ public interface BLessonService{
...
@@ -244,4 +244,13 @@ public interface BLessonService{
*/
*/
BLesson
findOneMyTrain
(
CurUser
curUser
,
String
businessId
);
BLesson
findOneMyTrain
(
CurUser
curUser
,
String
businessId
);
/**
* 单一查询我参加培训的信息
* @param curUser
* @param lessonId
* @return
*/
BLesson
findOneMyTeachTrain
(
CurUser
curUser
,
String
lessonId
);
}
}
src/main/java/org/rcisoft/business/blesson/service/impl/BLessonServiceImpl.java
View file @
d05277a0
...
@@ -15,6 +15,7 @@ import org.rcisoft.business.blesson.entity.*;
...
@@ -15,6 +15,7 @@ import org.rcisoft.business.blesson.entity.*;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.service.BLessonService
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.util.recursion
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
import
org.rcisoft.business.blesson.dao.BViewrangeRepository
;
import
org.rcisoft.business.bmaterial.dao.BMaterialRepository
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.common.util.feignDto.*
;
import
org.rcisoft.common.util.feignDto.*
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
import
org.rcisoft.common.util.outClient.MTCotactApiRequestClient
;
...
@@ -76,6 +77,9 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -76,6 +77,9 @@ public class BLessonServiceImpl implements BLessonService {
@Autowired
@Autowired
private
BTrainFileRepository
bTrainFileRepository
;
private
BTrainFileRepository
bTrainFileRepository
;
@Autowired
private
BMaterialRepository
bMaterialRepository
;
@Autowired
@Autowired
MTCotactApiRequestClient
cotactApiRequestClient
;
MTCotactApiRequestClient
cotactApiRequestClient
;
...
@@ -223,6 +227,8 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -223,6 +227,8 @@ public class BLessonServiceImpl implements BLessonService {
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
persist
(
AddLessonDTO
addLessonDTO
)
{
public
PersistModel
persist
(
AddLessonDTO
addLessonDTO
)
{
BLesson
model
=
new
BLesson
();
BLesson
model
=
new
BLesson
();
//取出文件集合
List
<
BTrainFile
>
trainFileList
=
addLessonDTO
.
getTrainFileList
();
BeanUtils
.
copyProperties
(
addLessonDTO
,
model
);
BeanUtils
.
copyProperties
(
addLessonDTO
,
model
);
int
line
=
0
;
int
line
=
0
;
...
@@ -307,18 +313,23 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -307,18 +313,23 @@ public class BLessonServiceImpl implements BLessonService {
//删除原有文件
//删除原有文件
bTrainFileRepository
.
deleteByLessonId
(
model
.
getBusinessId
());
bTrainFileRepository
.
deleteByLessonId
(
model
.
getBusinessId
());
//获取b_material中已有的URL
List
<
String
>
urls
=
bMaterialRepository
.
materialHaveUrl
(
trainFileList
);
//移除已有URL
// urls.forEach(url->{
//
// });
}
}
//转换json
//转换json
if
(
StringUtils
.
isNotEmpty
(
addLessonDTO
.
getTrainFileJson
())){
if
(
StringUtils
.
isNotEmpty
(
addLessonDTO
.
getTrainFileJson
())){
List
<
BTrainFile
>
bTrainFiles
;
List
<
BTrainFile
>
bTrainFiles
=
JSONObject
.
parseArray
(
addLessonDTO
.
getTrainFileJson
(),
BTrainFile
.
class
);
bTrainFiles
=
JSONObject
.
parseArray
(
addLessonDTO
.
getTrainFileJson
(),
BTrainFile
.
class
);
addLessonDTO
.
setTrainFileList
(
bTrainFiles
);
addLessonDTO
.
setTrainFileList
(
bTrainFiles
);
}
}
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
(
trainFileList
!=
null
&&
trainFileList
.
size
()
>
0
)
{
List
<
BTrainFile
>
trainFileList
=
addLessonDTO
.
getTrainFileList
();
for
(
BTrainFile
bTrainFile
:
trainFileList
)
{
for
(
BTrainFile
bTrainFile
:
trainFileList
)
{
bTrainFile
.
setLessonId
(
model
.
getBusinessId
());
bTrainFile
.
setLessonId
(
model
.
getBusinessId
());
UserUtil
.
setCurrentPersistOperation
(
bTrainFile
);
UserUtil
.
setCurrentPersistOperation
(
bTrainFile
);
...
@@ -335,8 +346,24 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -335,8 +346,24 @@ public class BLessonServiceImpl implements BLessonService {
bMaterialList
.
add
(
bMaterial
);
bMaterialList
.
add
(
bMaterial
);
}
}
bTrainFileRepository
.
insertTrainFileList
(
trainFileList
);
bTrainFileRepository
.
insertTrainFileList
(
trainFileList
);
//插入资料表
//插入资料表
// BMaterial bMaterial = new BMaterial();
// UserUtil.setCurrentPersistOperation(bMaterial);
// bMaterial.setLessonId(model.getBusinessId());
// bMaterial.setFileName(dto.getFileName());
//
// if (StringUtils.isNotEmpty(dto.getFileTime()) && dto.getFileTime().contains(".")) {
// bMaterial.setFileTime(dto.getFileTime().substring(0, dto.getFileTime().lastIndexOf(".")));
// }
//
// bMaterial.setFileUrl(dto.getVideoUrl());
//
// bMaterial.setType(model.getIsTest());
// bMaterial.setUploadType("1");
// bMaterial.setFileSize(dto.getFileSize());
// bMaterialRepository.insertMaterial(bMaterial);
//
}
}
return
new
PersistModel
(
line
,
model
);
return
new
PersistModel
(
line
,
model
);
...
@@ -600,11 +627,13 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -600,11 +627,13 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
ILessonCountDTO
trainPersonCount
(
String
lessonId
)
{
public
ILessonCountDTO
trainPersonCount
(
String
lessonId
)
{
return
bLessonRepository
.
trainPersonCount
(
lessonId
);
return
bLessonRepository
.
trainPersonCount
(
lessonId
);
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
List
<
BLessonPerson
>
trainPersons
(
FindTrainPersonDTO
param
)
{
public
List
<
BLessonPerson
>
trainPersons
(
FindTrainPersonDTO
param
)
{
List
<
BLessonPerson
>
bLessonPersonList
=
bLessonPersonRepository
.
trainPersons
(
param
);
List
<
BLessonPerson
>
bLessonPersonList
=
bLessonPersonRepository
.
trainPersons
(
param
);
if
(
bLessonPersonList
!=
null
&&
bLessonPersonList
.
size
()>
0
){
if
(
bLessonPersonList
!=
null
&&
bLessonPersonList
.
size
()>
0
){
...
@@ -733,6 +762,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -733,6 +762,7 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
deleteRecommend
(
String
lessonId
)
{
public
PersistModel
deleteRecommend
(
String
lessonId
)
{
List
<
String
>
recommendIds
=
bRecommendRepository
.
selectIdByLessonId
(
lessonId
);
List
<
String
>
recommendIds
=
bRecommendRepository
.
selectIdByLessonId
(
lessonId
);
...
@@ -751,6 +781,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -751,6 +781,7 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
setTrainIsSign
(
SetTrainIsSignDTO
setTrainIsSignDTO
)
{
public
PersistModel
setTrainIsSign
(
SetTrainIsSignDTO
setTrainIsSignDTO
)
{
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
bLessonPerson
.
setBusinessId
(
setTrainIsSignDTO
.
getBusinessId
());
bLessonPerson
.
setBusinessId
(
setTrainIsSignDTO
.
getBusinessId
());
...
@@ -761,6 +792,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -761,6 +792,7 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
PersistModel
addCollect
(
CurUser
curUser
,
String
lessonId
)
{
public
PersistModel
addCollect
(
CurUser
curUser
,
String
lessonId
)
{
AddMyLearnLessonDTO
param
=
new
AddMyLearnLessonDTO
(
lessonId
,
curUser
.
getCorpId
(),
curUser
.
getUserId
());
AddMyLearnLessonDTO
param
=
new
AddMyLearnLessonDTO
(
lessonId
,
curUser
.
getCorpId
(),
curUser
.
getUserId
());
List
<
BCollect
>
bLessonPersons
=
bCollectRepository
.
selectByPersonAndLesson
(
param
);
List
<
BCollect
>
bLessonPersons
=
bCollectRepository
.
selectByPersonAndLesson
(
param
);
...
@@ -781,6 +813,7 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -781,6 +813,7 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
int
toTraining
(
CurUser
curUser
,
String
lessonId
)
{
public
int
toTraining
(
CurUser
curUser
,
String
lessonId
)
{
BLessonPerson
person
=
new
BLessonPerson
();
BLessonPerson
person
=
new
BLessonPerson
();
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
BLessonPerson
bLessonPerson
=
new
BLessonPerson
();
...
@@ -806,9 +839,29 @@ public class BLessonServiceImpl implements BLessonService {
...
@@ -806,9 +839,29 @@ public class BLessonServiceImpl implements BLessonService {
}
}
@Override
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
BLesson
findOneMyTrain
(
CurUser
curUser
,
String
businessId
)
{
public
BLesson
findOneMyTrain
(
CurUser
curUser
,
String
businessId
)
{
BLesson
bLesson
=
bLessonRepository
.
findOneMyTrain
(
curUser
,
businessId
);
BLesson
bLesson
=
bLessonRepository
.
findOneMyTrain
(
curUser
,
businessId
);
if
(
bLesson
==
null
){
throw
new
ServiceException
(
ResultServiceEnums
.
LESSON_NOT_EXISTA
);
}
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
;
}
@Override
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
readOnly
=
false
)
public
BLesson
findOneMyTeachTrain
(
CurUser
curUser
,
String
lessonId
)
{
BLesson
bLesson
=
bLessonRepository
.
findOneMyTeachTrain
(
curUser
,
lessonId
);
if
(
bLesson
==
null
){
throw
new
ServiceException
(
ResultServiceEnums
.
LESSON_NOT_EXISTA
);
}
int
trainApplyCount
=
bLessonRepository
.
trainApplyCount
(
bLesson
.
getBusinessId
());
int
trainApplyCount
=
bLessonRepository
.
trainApplyCount
(
bLesson
.
getBusinessId
());
if
(
StringUtils
.
isNotEmpty
(
bLesson
.
getMaxApplyPerson
())
&&
trainApplyCount
>=
Integer
.
parseInt
(
bLesson
.
getMaxApplyPerson
())){
if
(
StringUtils
.
isNotEmpty
(
bLesson
.
getMaxApplyPerson
())
&&
trainApplyCount
>=
Integer
.
parseInt
(
bLesson
.
getMaxApplyPerson
())){
bLesson
.
setApplyIsFull
(
"1"
);
bLesson
.
setApplyIsFull
(
"1"
);
...
...
src/main/java/org/rcisoft/business/bmaterial/dao/BMaterialRepository.java
View file @
d05277a0
package
org
.
rcisoft
.
business
.
bmaterial
.
dao
;
package
org
.
rcisoft
.
business
.
bmaterial
.
dao
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Insert
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.business.bfile.entity.BTrainFile
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.rcisoft.business.bmaterial.entity.BMaterial
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.ResultMap
;
...
@@ -33,10 +35,10 @@ public interface BMaterialRepository extends BaseMapper<BMaterial> {
...
@@ -33,10 +35,10 @@ public interface BMaterialRepository extends BaseMapper<BMaterial> {
@Insert
(
"<script>insert into b_material "
+
@Insert
(
"<script>insert into b_material "
+
" (business_id,chapter_id,file_name,file_url, "
+
" (business_id,chapter_id,file_name,file_url, "
+
" type,upload_type,file_size,flag,del_flag, "
+
" type,upload_type,file_size,flag,del_flag, "
+
" remarks,create_by,update_by,update_date,create_date,file_time) "
+
" remarks,create_by,update_by,update_date,create_date,file_time
,lesson_id
) "
+
" values(#{businessId},#{chapterId},#{fileName},#{fileUrl}, "
+
" values(#{businessId},#{chapterId},#{fileName},#{fileUrl}, "
+
" #{type},#{uploadType},#{fileSize},#{flag},#{delFlag}, "
+
" #{type},#{uploadType},#{fileSize},#{flag},#{delFlag}, "
+
" #{remarks},#{createBy},#{updateBy},#{updateDate},#{createDate},#{fileTime}) "
+
" #{remarks},#{createBy},#{updateBy},#{updateDate},#{createDate},#{fileTime}
,#{lessonId}
) "
+
"</script>"
)
"</script>"
)
int
insertMaterial
(
BMaterial
bMaterial
);
int
insertMaterial
(
BMaterial
bMaterial
);
...
@@ -52,5 +54,14 @@ public interface BMaterialRepository extends BaseMapper<BMaterial> {
...
@@ -52,5 +54,14 @@ public interface BMaterialRepository extends BaseMapper<BMaterial> {
@ResultMap
(
value
=
"BaseResultMap"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BMaterial
>
queryMyBMaterialByPagination
(
CurUser
curUser
);
List
<
BMaterial
>
queryMyBMaterialByPagination
(
CurUser
curUser
);
@Select
(
"<script>select file_url from b_material "
+
" where 1=1 "
+
" and del_flag != 1 and flag = 1 "
+
" and file_url in "
+
"<foreach item='item' index='index' collection='trainFileList' open='(' separator=',' close=')'> #{item.videoUrl} </foreach> "
+
"</script>"
)
List
<
String
>
materialHaveUrl
(
@Param
(
"trainFileList"
)
List
<
BTrainFile
>
trainFileList
);
}
}
src/main/java/org/rcisoft/core/util/OfficeToPdf.java
View file @
d05277a0
...
@@ -8,6 +8,7 @@ import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;
...
@@ -8,6 +8,7 @@ import com.artofsolving.jodconverter.openoffice.connection.OpenOfficeConnection;
import
com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection
;
import
com.artofsolving.jodconverter.openoffice.connection.SocketOpenOfficeConnection
;
import
com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter
;
import
com.artofsolving.jodconverter.openoffice.converter.OpenOfficeDocumentConverter
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.common.component.Global
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.exception.ServiceException
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.result.ResultServiceEnums
;
...
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Component;
...
@@ -17,6 +18,7 @@ import org.springframework.stereotype.Component;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.net.ConnectException
;
import
java.net.ConnectException
;
import
java.util.Date
;
/**
/**
* Created by Administrator on 2018/1/19.
* Created by Administrator on 2018/1/19.
...
@@ -84,6 +86,8 @@ public class OfficeToPdf {
...
@@ -84,6 +86,8 @@ public class OfficeToPdf {
* @return 1 成功 0 失败 -1 错误
* @return 1 成功 0 失败 -1 错误
*/
*/
public
synchronized
int
transformToPdf
(
String
sourceFile
,
String
destFile
){
public
synchronized
int
transformToPdf
(
String
sourceFile
,
String
destFile
){
log
.
debug
(
"****************transform + begin***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
OpenOfficeConnection
connection
=
null
;
OpenOfficeConnection
connection
=
null
;
try
{
try
{
File
inputFile
=
new
File
(
sourceFile
);
File
inputFile
=
new
File
(
sourceFile
);
...
@@ -100,7 +104,12 @@ public class OfficeToPdf {
...
@@ -100,7 +104,12 @@ public class OfficeToPdf {
// connect to an OpenOffice.org instance running on port 8100
// connect to an OpenOffice.org instance running on port 8100
connection
=
new
SocketOpenOfficeConnection
(
connection
=
new
SocketOpenOfficeConnection
(
global
.
getLibreofficeIp
(),
global
.
getLibreofficePort
());
global
.
getLibreofficeIp
(),
global
.
getLibreofficePort
());
log
.
debug
(
"****************connect + begin***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
connection
.
connect
();
connection
.
connect
();
log
.
debug
(
"****************connect + end***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
// convert
// convert
log
.
debug
(
"----------ZH------------"
);
log
.
debug
(
"----------ZH------------"
);
DocumentConverter
converter
=
new
OpenOfficeDocumentConverter
(
DocumentConverter
converter
=
new
OpenOfficeDocumentConverter
(
...
@@ -114,6 +123,8 @@ public class OfficeToPdf {
...
@@ -114,6 +123,8 @@ public class OfficeToPdf {
log
.
info
(
"开始转换--> "
+
sourceFile
);
log
.
info
(
"开始转换--> "
+
sourceFile
);
converter
.
convert
(
inputFile
,
inputDocumentFormat
,
outputFile
,
outputDocumentFormat
);
converter
.
convert
(
inputFile
,
inputDocumentFormat
,
outputFile
,
outputDocumentFormat
);
log
.
info
(
"转换完毕--> "
+
destFile
);
log
.
info
(
"转换完毕--> "
+
destFile
);
log
.
debug
(
"****************transform + end***********"
+
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
// close the connection
// close the connection
}
catch
(
ConnectException
e
)
{
}
catch
(
ConnectException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
src/main/resources/mapper/business/blesson/mapper/BLessonPersonMapper.xml
View file @
d05277a0
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
<result
column=
"is_apply"
jdbcType=
"VARCHAR"
property=
"isApply"
/>
<result
column=
"is_apply"
jdbcType=
"VARCHAR"
property=
"isApply"
/>
<result
column=
"train_is_sign"
jdbcType=
"VARCHAR"
property=
"trainIsSign"
/>
<result
column=
"train_is_sign"
jdbcType=
"VARCHAR"
property=
"trainIsSign"
/>
<result
column=
"apply_date"
jdbcType=
"VARCHAR"
property=
"applyDate"
/>
<result
column=
"sign_date"
jdbcType=
"VARCHAR"
property=
"signDate"
/>
<result
column=
"sign_date"
jdbcType=
"VARCHAR"
property=
"signDate"
/>
</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