|
|
|
@ -318,26 +318,32 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (chatModel != null) {
|
|
|
|
|
//角色条件
|
|
|
|
|
builder.append(String.format(chatModel.getRole().get(0), chatCommentsDto.getPeriod(), chatCommentsDto.getSubject()));
|
|
|
|
|
}
|
|
|
|
|
String chatName = "";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch(phase){
|
|
|
|
|
case 1:
|
|
|
|
|
if (chatCommentsDto.getName().contains("班") || chatCommentsDto.getName().contains("班级")) {
|
|
|
|
|
chatName = chatCommentsDto.getName();
|
|
|
|
|
} else {
|
|
|
|
|
chatName = chatCommentsDto.getName()+"班级";
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
case 2:
|
|
|
|
|
if (chatCommentsDto.getName().contains("年级")) {
|
|
|
|
|
chatName = chatCommentsDto.getName();
|
|
|
|
|
} else {
|
|
|
|
|
chatName = chatCommentsDto.getName()+"年级";
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
chatName = chatCommentsDto.getName()+"同学";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (chatModel != null) {
|
|
|
|
|
//角色条件
|
|
|
|
|
builder.append(String.format(chatModel.getRole().get(0), chatCommentsDto.getPeriod(), chatCommentsDto.getSubject(), chatName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ChatModelDto finalChatModel = chatModel;
|
|
|
|
|
//模版
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
//智育 表现模版
|
|
|
|
@ -418,7 +424,7 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
|
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.getEnd().get(0), subjectComments.size(),chatName));
|
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0), subjectComments.size(),chatName));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
//艺术 考核指标纬度评语
|
|
|
|
@ -476,12 +482,11 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
|
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.getEnd().get(0),chatName));
|
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
|
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.getEnd().get(0),chatName));
|
|
|
|
|
//builder.append(String.format(finalChatModel.getEnd().get(0),chatName));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
//体育
|
|
|
|
@ -523,14 +528,10 @@ public class ChatMessageServiceImpl implements ChatMessageService {
|
|
|
|
|
throw new ServiceException(ErrorCode.PARAMS_ERROR.getCode(), "评语类型异常");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (chatCommentsDto.getSize() > 0) {
|
|
|
|
|
builder.append("限制条件如下:1、")
|
|
|
|
|
.append(chatCommentsDto.getSize())
|
|
|
|
|
.append("字左右;2、直接返回评语的内容;3、评语的开篇不允许出现提示语;4、评语的开篇不允许出现特殊字符。");
|
|
|
|
|
} else {
|
|
|
|
|
builder.append("限制条件如下:1、200字左右;2、直接返回评语的内容;3、评语的开篇不允许出现提示语;4、评语的开篇不允许出现特殊字符。");
|
|
|
|
|
//builder.append("限制条件如下:1、200字左右;2、返回评语内容:不要开头提示语;开头不允许出现特殊字符。");
|
|
|
|
|
}
|
|
|
|
|
String limitChat = "。限制条件如下:1.%s字左右;2.直接返回评价的内容;3.评价开头不要提示语;4.评价开头不允许出现特殊字符。";
|
|
|
|
|
int size = chatCommentsDto.getSize() > 0 ? chatCommentsDto.getSize() : 200;
|
|
|
|
|
builder.append(String.format(limitChat, size));
|
|
|
|
|
|
|
|
|
|
return builder.toString();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.info(Arrays.toString(e.getStackTrace()));
|
|
|
|
|