|
|
|
@ -3,17 +3,23 @@ package com.supervision.service.impl;
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
|
|
import cn.hutool.core.util.ObjUtil;
|
|
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
|
import com.supervision.config.domain.UserInfo;
|
|
|
|
|
import com.supervision.domain.IrSession;
|
|
|
|
|
import com.supervision.domain.IrSessionParam;
|
|
|
|
|
import com.supervision.domain.IrSqlParam;
|
|
|
|
|
import com.supervision.exception.BusinessException;
|
|
|
|
|
import com.supervision.service.IrSessionHistoryService;
|
|
|
|
|
import com.supervision.service.IrSessionParamService;
|
|
|
|
|
import com.supervision.service.IrSessionService;
|
|
|
|
|
import com.supervision.mapper.IrSessionMapper;
|
|
|
|
|
import com.supervision.service.IrSqlParamService;
|
|
|
|
|
import com.supervision.util.UserUtil;
|
|
|
|
|
import com.supervision.vo.session.FinishSessionVO;
|
|
|
|
|
import com.supervision.vo.session.NewSessionReqVO;
|
|
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
@ -35,16 +41,53 @@ public class IrSessionServiceImpl extends ServiceImpl<IrSessionMapper, IrSession
|
|
|
|
|
|
|
|
|
|
private final IrSessionHistoryService irSessionHistoryService;
|
|
|
|
|
|
|
|
|
|
private final IrSessionParamService irSessionParamService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public IrSession createNewSession(String caseNumber, Integer type, BigDecimal speed) {
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public IrSession createNewSession(NewSessionReqVO newSessionReqVO) {
|
|
|
|
|
if (StrUtil.isBlank(newSessionReqVO.getCaseNumber())) {
|
|
|
|
|
throw new BusinessException("案件编号不能为空");
|
|
|
|
|
}
|
|
|
|
|
UserInfo user = UserUtil.getUser();
|
|
|
|
|
IrSession irSession = new IrSession();
|
|
|
|
|
irSession.setSessionName("案件编号:" + caseNumber);
|
|
|
|
|
irSession.setSessionName("案件编号:" + newSessionReqVO.getCaseNumber());
|
|
|
|
|
irSession.setSessionState(1);
|
|
|
|
|
irSession.setUserId(user.getId());
|
|
|
|
|
irSession.setVideoSpeed(speed);
|
|
|
|
|
irSession.setBroadcastType(type);
|
|
|
|
|
irSession.setVideoSpeed(newSessionReqVO.getSpeed());
|
|
|
|
|
irSession.setBroadcastType(newSessionReqVO.getType());
|
|
|
|
|
this.save(irSession);
|
|
|
|
|
IrSessionParam irSessionParam = new IrSessionParam();
|
|
|
|
|
irSessionParam.setSessionId(irSession.getId());
|
|
|
|
|
irSessionParam.setParamName("ajid");
|
|
|
|
|
irSessionParam.setParamValue(newSessionReqVO.getCaseNumber());
|
|
|
|
|
irSessionParam.setParamType("String");
|
|
|
|
|
irSessionParamService.save(irSessionParam);
|
|
|
|
|
// 保存交易卡号证件号以及用户名信息
|
|
|
|
|
if (StrUtil.isNotBlank(newSessionReqVO.getTransactionNumber())) {
|
|
|
|
|
IrSessionParam transactionNumberParam = new IrSessionParam();
|
|
|
|
|
transactionNumberParam.setSessionId(irSession.getId());
|
|
|
|
|
transactionNumberParam.setParamName("khrzjhm");
|
|
|
|
|
transactionNumberParam.setParamValue(newSessionReqVO.getCaseNumber());
|
|
|
|
|
transactionNumberParam.setParamType("String");
|
|
|
|
|
irSessionParamService.save(transactionNumberParam);
|
|
|
|
|
}
|
|
|
|
|
if (CollUtil.isNotEmpty(newSessionReqVO.getTransactionAccount())) {
|
|
|
|
|
IrSessionParam transactionNumberParam = new IrSessionParam();
|
|
|
|
|
transactionNumberParam.setSessionId(irSession.getId());
|
|
|
|
|
transactionNumberParam.setParamName("jykh");
|
|
|
|
|
transactionNumberParam.setParamValue(JSONUtil.toJsonStr(newSessionReqVO.getTransactionAccount()));
|
|
|
|
|
transactionNumberParam.setParamType("List");
|
|
|
|
|
irSessionParamService.save(transactionNumberParam);
|
|
|
|
|
}
|
|
|
|
|
if (StrUtil.isNotBlank(newSessionReqVO.getTransactionUsername())) {
|
|
|
|
|
IrSessionParam transactionNumberParam = new IrSessionParam();
|
|
|
|
|
transactionNumberParam.setSessionId(irSession.getId());
|
|
|
|
|
transactionNumberParam.setParamName("suspectName");
|
|
|
|
|
transactionNumberParam.setParamValue(newSessionReqVO.getTransactionUsername());
|
|
|
|
|
transactionNumberParam.setParamType("String");
|
|
|
|
|
irSessionParamService.save(transactionNumberParam);
|
|
|
|
|
}
|
|
|
|
|
return irSession;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|