|
|
@ -318,26 +318,32 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (chatModel != null) {
|
|
|
|
|
|
|
|
//角色条件
|
|
|
|
|
|
|
|
builder.append(String.format(chatModel.getRole().get(0), chatCommentsDto.getPeriod(), chatCommentsDto.getSubject()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String chatName = "";
|
|
|
|
String chatName = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch(phase){
|
|
|
|
switch(phase){
|
|
|
|
case 1:
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
if (chatCommentsDto.getName().contains("班") || chatCommentsDto.getName().contains("班级")) {
|
|
|
|
|
|
|
|
chatName = chatCommentsDto.getName();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
chatName = chatCommentsDto.getName()+"班级";
|
|
|
|
chatName = chatCommentsDto.getName()+"班级";
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
if (chatCommentsDto.getName().contains("年级")) {
|
|
|
|
|
|
|
|
chatName = chatCommentsDto.getName();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
chatName = chatCommentsDto.getName()+"年级";
|
|
|
|
chatName = chatCommentsDto.getName()+"年级";
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
chatName = chatCommentsDto.getName()+"同学";
|
|
|
|
chatName = chatCommentsDto.getName()+"同学";
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (chatModel != null) {
|
|
|
|
|
|
|
|
//角色条件
|
|
|
|
|
|
|
|
builder.append(String.format(chatModel.getRole().get(0), chatCommentsDto.getPeriod(), chatCommentsDto.getSubject(), chatName));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ChatModelDto finalChatModel = chatModel;
|
|
|
|
ChatModelDto finalChatModel = chatModel;
|
|
|
|
//模版
|
|
|
|
//模版
|
|
|
|
switch (chatCommentsDto.getType()) {
|
|
|
|
switch (chatCommentsDto.getType()) {
|
|
|
@ -385,7 +391,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
));
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
builder.append(String.format(finalChatModel.getEnd().get(0),chatName, wisdomComments.getDims().size()));
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName, wisdomComments.getDims().size()));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//智育 表现模版
|
|
|
|
//智育 表现模版
|
|
|
@ -418,7 +424,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
count++;
|
|
|
|
count++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// 智育 学科评语模版
|
|
|
|
// 智育 学科评语模版
|
|
|
@ -452,7 +458,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(2), name, comments.getClaasRanking().ranking, comments.getClaasRanking().scoreRate * 100, comments.getClaasRanking().average * 100));
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(2), name, comments.getClaasRanking().ranking, comments.getClaasRanking().scoreRate * 100, comments.getClaasRanking().average * 100));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
builder.append(String.format(finalChatModel.getEnd().get(0), subjectComments.size(),chatName));
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0), subjectComments.size(),chatName));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//艺术 考核指标纬度评语
|
|
|
|
//艺术 考核指标纬度评语
|
|
|
@ -476,12 +482,11 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
builder.append(finalChatModel.getChat().get(0));
|
|
|
|
builder.append(finalChatModel.getChat().get(0));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (ArtLatitudeDto artLatitude : artLatitudes)
|
|
|
|
for (ArtLatitudeDto artLatitude : artLatitudes){
|
|
|
|
{
|
|
|
|
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artLatitude.getQuotaN1(),artLatitude.getQuotaP1(), artLatitude.getQuotaN2(),artLatitude.getQuotaP2(), artLatitude.getQuotaN3(),artLatitude.getQuotaP3(), artLatitude.getPercent(),artLatitude.getLevel()));
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artLatitude.getQuotaN1(),artLatitude.getQuotaP1(), artLatitude.getQuotaN2(),artLatitude.getQuotaP2(), artLatitude.getQuotaN3(),artLatitude.getQuotaP3(), artLatitude.getPercent(),artLatitude.getLevel()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//艺术 学科评语模版
|
|
|
|
//艺术 学科评语模版
|
|
|
@ -502,7 +507,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artSubject.getDimension(),artSubject.getBlock(), artSubject.getPoint(),artSubject.getScore(), artSubject.getTotalScore(),artSubject.getPercent()));
|
|
|
|
builder.append(String.format(finalChatModel.getCycleChats().get(0), artSubject.getDimension(),artSubject.getBlock(), artSubject.getPoint(),artSubject.getScore(), artSubject.getTotalScore(),artSubject.getPercent()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//体育
|
|
|
|
//体育
|
|
|
@ -523,14 +528,10 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "评语类型异常");
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "评语类型异常");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (chatCommentsDto.getSize() > 0) {
|
|
|
|
String limitChat = "。限制条件如下:1.%s字左右;2.直接返回评价的内容;3.评价开头不要提示语;4.评价开头不允许出现特殊字符。";
|
|
|
|
builder.append("限制条件如下:1、")
|
|
|
|
int size = chatCommentsDto.getSize() > 0 ? chatCommentsDto.getSize() : 200;
|
|
|
|
.append(chatCommentsDto.getSize())
|
|
|
|
builder.append(String.format(limitChat, size));
|
|
|
|
.append("字左右;2、直接返回评语的内容;3、评语的开篇不允许出现提示语;4、评语的开篇不允许出现特殊字符。");
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
builder.append("限制条件如下:1、200字左右;2、直接返回评语的内容;3、评语的开篇不允许出现提示语;4、评语的开篇不允许出现特殊字符。");
|
|
|
|
|
|
|
|
//builder.append("限制条件如下:1、200字左右;2、返回评语内容:不要开头提示语;开头不允许出现特殊字符。");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return builder.toString();
|
|
|
|
return builder.toString();
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|
log.info(Arrays.toString(e.getStackTrace()));
|
|
|
|
log.info(Arrays.toString(e.getStackTrace()));
|
|
|
|