|
@@ -181,28 +181,27 @@ public class ConsumptionEventHandler implements HikEventHandler {
|
|
|
if (!answerResult) {
|
|
if (!answerResult) {
|
|
|
broadcastVoice = isCountMode ? "刷卡失败" : "支付失败";
|
|
broadcastVoice = isCountMode ? "刷卡失败" : "支付失败";
|
|
|
// 提示刷卡失败的原因
|
|
// 提示刷卡失败的原因
|
|
|
- if (StringUtils.isNotBlank(reason) && reason.length() >= 10) {
|
|
|
|
|
|
|
+ if (StringUtils.isNotBlank(reason) && reason.length() > 30) {
|
|
|
log.info("海康消费失败原因:{}", reason);
|
|
log.info("海康消费失败原因:{}", reason);
|
|
|
- newReason = reason.substring(0, 10) + "...";
|
|
|
|
|
|
|
+ newReason = reason.substring(0, 30);
|
|
|
}
|
|
}
|
|
|
broadcastVoice += newReason;
|
|
broadcastVoice += newReason;
|
|
|
confirmBo.setReason("platformException");
|
|
confirmBo.setReason("platformException");
|
|
|
}
|
|
}
|
|
|
|
|
+ if(StringUtils.isNotBlank(broadcastVoice) && broadcastVoice.length() > 20){
|
|
|
|
|
+ broadcastVoice = broadcastVoice.substring(0, 20);
|
|
|
|
|
+ }
|
|
|
confirmBo.setCustomTTSBroadcastVoice(broadcastVoice);
|
|
confirmBo.setCustomTTSBroadcastVoice(broadcastVoice);
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
这可以显示刷卡人的信息,比如姓名,部门等
|
|
这可以显示刷卡人的信息,比如姓名,部门等
|
|
|
*/
|
|
*/
|
|
|
ConsumptionEventConfirmBo.ContentInfo contentInfo = new ConsumptionEventConfirmBo.ContentInfo();
|
|
ConsumptionEventConfirmBo.ContentInfo contentInfo = new ConsumptionEventConfirmBo.ContentInfo();
|
|
|
- if(StringUtils.isNotBlank(consumptionEvent.getName()) && consumptionEvent.getName().length() >= 10){
|
|
|
|
|
- contentInfo.setTitle(consumptionEvent.getName().substring(0, 10) + "...");
|
|
|
|
|
- }
|
|
|
|
|
- if(StringUtils.isNotBlank(deptName) && deptName.length() >= 10){
|
|
|
|
|
- contentInfo.setContent(deptName.substring(0, 10) + "...");
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ contentInfo.setTitle(consumptionEvent.getName());
|
|
|
|
|
+ contentInfo.setContent(deptName);
|
|
|
if (!answerResult) {
|
|
if (!answerResult) {
|
|
|
contentInfo.setTitle("");
|
|
contentInfo.setTitle("");
|
|
|
- contentInfo.setContent(newReason);
|
|
|
|
|
|
|
+ contentInfo.setContent("失败原因:" + newReason);
|
|
|
}
|
|
}
|
|
|
confirmBo.setContentInfo(contentInfo);
|
|
confirmBo.setContentInfo(contentInfo);
|
|
|
|
|
|