Commit 88f7b103 authored by zhangqingle's avatar zhangqingle

Merge remote-tracking branch 'origin/meiteng' into zql

# Conflicts:
#	src/main/java/org/rcisoft/business/bdiscuss/service/impl/BDiscussServiceImpl.java
parents 3e7cc6dc 5f04e5fa
......@@ -82,12 +82,13 @@ public class BDiscussServiceImpl implements BDiscussService {
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public PersistModel save(CurUser curUser,BDiscuss bDiscuss){
//评论评论
List<BMessage> bMessageList = bMessageRepository.queryByNameAndCorp("HFPL",curUser.getCorpId());
//获取当前企业的评论通知权限
List<BMessage> bMessageList = bMessageRepository.queryByNameAndCorp("HFPL",curUser.getCorpId());//回复评论
BMessage message = new BMessage();
if (bMessageList != null && bMessageList.size() > 0){
message = bMessageList.get(0);
}
//发送通知
if (StringUtils.isNotBlank(bDiscuss.getLevel()) && "2".equals(bDiscuss.getLevel()) && "1".equals(message.getFlag())){
BNotice bNotice = new BNotice();
if (StringUtils.isNotEmpty(bDiscuss.getReplyId())){
......@@ -111,8 +112,10 @@ public class BDiscussServiceImpl implements BDiscussService {
// InfoTypeEnum.REPLY_DISCUSS.getvalue()
client.send(bNotice,InfoTypeEnum.REPLY_DISCUSS.getValue(), MessageEnum.HFPL.getName(),urlType);
}
//评论课程
List<BMessage> bMessageListFBPL = bMessageRepository.queryByNameAndCorp("FBPL",curUser.getCorpId());
List<BMessage> bMessageListFBPL = bMessageRepository.queryByNameAndCorp("FBPL",curUser.getCorpId());//发布评论
BMessage messageFBPL = new BMessage();
if (bMessageListFBPL != null && bMessageListFBPL.size() > 0){
messageFBPL = bMessageListFBPL.get(0);
......@@ -135,7 +138,9 @@ public class BDiscussServiceImpl implements BDiscussService {
}
//增加操作
UserUtil.setCurrentPersistOperation(bDiscuss);
//将评论的数据添加到数据库
int line = bDiscussRepository.insertSelective(bDiscuss);
//重新统计b_lesson评论数
bLessonRepository.discussNumberReCount(bDiscuss.getLessonId());
return new PersistModel(line);
}
......
......@@ -117,8 +117,8 @@ public interface BReleaseValueRepository extends BaseMapper<BReleaseValue> {
"<if test=\"dto.valueGainEnd!=null and dto.valueGainEnd != ''\"> and CAST(bl.value_gain AS UNSIGNED) &lt;= #{dto.valueGainEnd} </if> " +
"<if test=\"dto.lessonName!=null and dto.lessonName != ''\"> and bl.lesson_name like concat('%',#{dto.lessonName},'%') </if> " +
"<if test=\"dto.lecturerName!=null and dto.lecturerName != ''\"> and su.`name` like concat('%',#{dto.lecturerName},'%') </if> " +
"<if test=\"dto.status!=null and dto.status != ''\"> and bl.release_state in(${dto.status}) </if> " +
"<if test=\"dto.trainStatus!=null and dto.trainStatus != ''\"> and ( ${dto.trainStatus} )</if> " +
// "<if test=\"dto.status!=null and dto.status != ''\"> and bl.release_state in(${dto.status}) </if> " +
"<if test=\"dto.trainStatus!=null and dto.trainStatus != ''\"> ${dto.trainStatus} </if> " +
"and bl.corp_id = #{curUser.corpId} " +
"and bl.lesson_type = #{dto.type} " +
"ORDER BY bl.corp_id " +
......
......@@ -166,6 +166,16 @@ public class BReleaseValueServiceImpl implements BReleaseValueService {
dto.setTrainStatus(null);
}
if(StringUtils.isEmpty(dto.getStatus())&&StringUtils.isEmpty(dto.getTrainStatus())){
dto.setTrainStatus(null);
}else if(StringUtils.isEmpty(dto.getStatus())&&StringUtils.isNotEmpty(dto.getTrainStatus())){
dto.setTrainStatus("and ("+dto.getTrainStatus()+")");
}else if(StringUtils.isNotEmpty(dto.getStatus())&&StringUtils.isEmpty(dto.getTrainStatus())){
dto.setTrainStatus("and bl.release_state in("+dto.getStatus()+")");
}else if(StringUtils.isNotEmpty(dto.getStatus())&&StringUtils.isNotEmpty(dto.getTrainStatus())){
dto.setTrainStatus("and (bl.release_state in("+dto.getStatus()+") or ("+dto.getTrainStatus()+ "))");
}
List<LessonValueDto> list = bReleaseValueRepository.getLessonValue(curUser,dto);
for(LessonValueDto valueDto :list){
......
......@@ -105,8 +105,7 @@ public class OfficeToPdf {
public static DocumentConverter getConverter(){
if(null == converter){
LogUtil.fileChangeLog("****************converter + begin***********" + DateFormatUtils.format(new Date(), "HH:mm:ss"));
converter = new OpenOfficeDocumentConverter(
connection);
converter = new OpenOfficeDocumentConverter(connection);
LogUtil.fileChangeLog("****************converter + end***********" + DateFormatUtils.format(new Date(), "HH:mm:ss"));
}
return converter;
......@@ -151,10 +150,12 @@ public class OfficeToPdf {
DocumentFormatRegistry factory = new BasicDocumentFormatRegistry();
LogUtil.fileChangeLog("----------设置输入输出------------");
DocumentFormat inputDocumentFormat = factory
.getFormatByFileExtension(FileUtil.getFilePostfix(sourceFile));
DocumentFormat outputDocumentFormat = factory
.getFormatByFileExtension(FileUtil.getFilePostfix(destFile));
LogUtil.fileChangeLog("开始转换--> " + sourceFile);
executeConvert(inputFile, inputDocumentFormat, outputFile, outputDocumentFormat);
LogUtil.fileChangeLog("转换完毕--> " + destFile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment