|
|
@@ -59,7 +59,8 @@ public class BankNotarizeServiceImpl implements BankNotarizeService {
|
|
|
*/
|
|
|
public ResponseDTO<?> onlineNotary(String businessNo) {
|
|
|
|
|
|
- //删除绑定关系
|
|
|
+ //
|
|
|
+ log.info("删除绑定关系业务流水号: " + businessNo);
|
|
|
appPcBindSocketIo.delBusinessNo(businessNo);
|
|
|
QueryWrapper<ContractOrderEntity> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("business_no", businessNo);
|
|
|
@@ -67,6 +68,7 @@ public class BankNotarizeServiceImpl implements BankNotarizeService {
|
|
|
String notaryId = "notary_" + notaryOrder.getNotaryOfficeId();
|
|
|
// 在线的公证登录人员,是订单的绑定的银行公证员
|
|
|
Set<String> loginNotary = onlineUserService.getNotaryLoginUser(notaryId);
|
|
|
+ log.info("在线的公证登录人员: " + loginNotary);
|
|
|
if (CollectionUtils.isEmpty(loginNotary)) {
|
|
|
return ResponseDTO.error(ResultCode.NOTARY_OFFLINE);
|
|
|
}
|
|
|
@@ -76,10 +78,12 @@ public class BankNotarizeServiceImpl implements BankNotarizeService {
|
|
|
for (SysUserEntity sysUser : sysUsers) {
|
|
|
bankNotary.add(sysUser.getUsername());
|
|
|
}
|
|
|
+ log.info("查询所有的公证员: " + loginNotary);
|
|
|
// 判断当前是否有人在线,如果没有直接失败
|
|
|
boolean isOnline = false;
|
|
|
for (String username : bankNotary) {
|
|
|
Map<UUID, SocketIOClient> socketIo = PcSocketClientCache.socketIOClient(username);
|
|
|
+ log.info("查看在线的公证员: " + username+"对应的socketIo:"+socketIo);
|
|
|
if (MapUtils.isNotEmpty(socketIo)) {
|
|
|
isOnline = true;
|
|
|
}
|
|
|
@@ -89,10 +93,12 @@ public class BankNotarizeServiceImpl implements BankNotarizeService {
|
|
|
}
|
|
|
// 查询绑定的人员,
|
|
|
Set<String> relatedNotary = appPcBindSocketIo.getAllBindNotary();
|
|
|
+ log.info("查询绑定的人员,: " +relatedNotary);//
|
|
|
if (CollectionUtils.isEmpty(relatedNotary)) {
|
|
|
return ResponseDTO.success();
|
|
|
}
|
|
|
Collection<String> intersection = CollectionUtils.intersection(bankNotary, relatedNotary);
|
|
|
+ log.info("绑定公证员和在线公证员的差值: " +intersection);//
|
|
|
if (CollectionUtils.isEqualCollection(intersection, loginNotary)) {
|
|
|
return ResponseDTO.error(ResultCode.SEAT_BUSY);
|
|
|
}
|