ai记录统一问题

This commit is contained in:
wangshuai 2024-07-18 10:00:27 +08:00
parent d40062a548
commit fcd1a88846
4 changed files with 23 additions and 5 deletions

View File

@ -50,6 +50,16 @@ public class BusAiInfo extends BaseEntity
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String source;
private String endreason;
public String getEndreason() {
return endreason;
}
public void setEndreason(String endreason) {
this.endreason = endreason;
}
public void setId(Long id)
{
this.id = id;

View File

@ -190,6 +190,7 @@ public class AiServiceImpl implements IAiService {
String talktimes = oj.getString("talktimes");
String mark = oj.getString("mark");
String source = oj.getString("source");
String endreason = oj.getString("endreason");
BusAiInfo aiInfo = new BusAiInfo();
aiInfo.setId(Long.valueOf(id));
aiInfo.setDialTaskMainSn(dial_task_main_sn);
@ -200,12 +201,13 @@ public class AiServiceImpl implements IAiService {
aiInfo.setTalktimes(talktimes);
aiInfo.setMark(mark);
aiInfo.setSource(source);
aiInfo.setEndreason(endreason);
try {
aiInfoService.insertBusAiInfo(aiInfo);
if (Integer.valueOf(talktimes) > 0) {
// if (Integer.valueOf(talktimes) > 0) {
// long saveId = aiInfo.getId();
reduceIntegral(aiInfo);
}
// }
} catch (Exception e) {
System.out.println(id + "duplicate");
}
@ -405,7 +407,11 @@ public class AiServiceImpl implements IAiService {
List<BusReturnVisitInfo> list = busReturnVisitInfoMapper.selectBusReturnVisitInfoList(returnVisitInfo);
if (list.size() == 1) {
returnVisitInfo.setId(list.get(0).getId());
try {
returnVisitInfo.setFinishTime(format.parse(aiInfo.getDisconnectedAt()));
}catch (Exception e){
System.out.println("DisconnectedAt异常结果"+aiInfo.getEndreason());
}
busReturnVisitInfoMapper.updateBusReturnVisitInfo(returnVisitInfo);
}
List<BusOrderInfo> temp = orderInfoService.selectBusOrderInfoList(orderInfo);

View File

@ -52,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="talktimes != null">talktimes,</if>
<if test="mark != null">mark,</if>
<if test="source != null">source,</if>
<if test="endreason != null">endreason,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
@ -64,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="talktimes != null">#{talktimes},</if>
<if test="mark != null">#{mark},</if>
<if test="source != null">#{source},</if>
<if test="endreason != null">#{endreason},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>

View File

@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</if>
<if test="storeCode != null and storeCode != ''"> and store_code = #{storeCode}</if>
and phone_number is not null and return_visit_time is not null and finish_time is not null
and phone_number is not null and return_visit_time is not null
</where>
</select>