|
@@ -1,5 +1,7 @@
|
|
|
package com.zd.laboratory.onemachine.controller;
|
|
package com.zd.laboratory.onemachine.controller;
|
|
|
|
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
import com.zd.common.core.exception.ServiceException;
|
|
import com.zd.common.core.exception.ServiceException;
|
|
|
import com.zd.common.core.utils.*;
|
|
import com.zd.common.core.utils.*;
|
|
|
import com.zd.common.core.web.controller.BaseController;
|
|
import com.zd.common.core.web.controller.BaseController;
|
|
@@ -34,6 +36,7 @@ import com.zd.system.api.vo.SysLogoConfigVO;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jsoup.Jsoup;
|
|
import org.jsoup.Jsoup;
|
|
|
import org.jsoup.nodes.Document;
|
|
import org.jsoup.nodes.Document;
|
|
|
import org.jsoup.nodes.Element;
|
|
import org.jsoup.nodes.Element;
|
|
@@ -215,8 +218,10 @@ public class OneMachineController extends BaseController {
|
|
|
throw new ServiceException("用户:" + username + " 账户停用,请联系管理员");
|
|
throw new ServiceException("用户:" + username + " 账户停用,请联系管理员");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ SignInPerInfoVO infoVO = oneMachineService.createSignInPerInfoVO(subId, userResult.getData(), SignEnum.SIGN_IN);
|
|
|
|
|
+ logger.info("签到验证成功,data:{}",JSON.toJSONString(infoVO));
|
|
|
//签证前置信息
|
|
//签证前置信息
|
|
|
- return ResultData.success(oneMachineService.createSignInPerInfoVO(subId, userResult.getData(), SignEnum.SIGN_IN));
|
|
|
|
|
|
|
+ return ResultData.success(infoVO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -247,7 +252,9 @@ public class OneMachineController extends BaseController {
|
|
|
//获取指定用户信息
|
|
//获取指定用户信息
|
|
|
R<SysUser> userResult = getSysUserR(username);
|
|
R<SysUser> userResult = getSysUserR(username);
|
|
|
//签证前置信息
|
|
//签证前置信息
|
|
|
- return ResultData.success(oneMachineService.createSignInPerInfoVO(subId, userResult.getData(), SignEnum.SIGN_OUT));
|
|
|
|
|
|
|
+ SignInPerInfoVO infoVO = oneMachineService.createSignInPerInfoVO(subId, userResult.getData(), SignEnum.SIGN_OUT);
|
|
|
|
|
+ logger.info("签出验证成功,data:{}",JSON.toJSONString(infoVO));
|
|
|
|
|
+ return ResultData.success(infoVO);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("签出验证根据用户ID")
|
|
@ApiOperation("签出验证根据用户ID")
|
|
@@ -328,6 +335,7 @@ public class OneMachineController extends BaseController {
|
|
|
|
|
|
|
|
// 查询用户信息
|
|
// 查询用户信息
|
|
|
R<SysUser> userResult = userService.getUserInfoByCardNum(username, SecurityConstants.INNER);
|
|
R<SysUser> userResult = userService.getUserInfoByCardNum(username, SecurityConstants.INNER);
|
|
|
|
|
+ logger.info("getUserInfoByCardNum success,param:{},data:{}",username, !ObjectUtil.isEmpty(userResult) ? JSON.toJSONString(userResult.getData()) : "--");
|
|
|
if (HttpStatus.ERROR == userResult.getCode()) {
|
|
if (HttpStatus.ERROR == userResult.getCode()) {
|
|
|
throw new ServiceException(userResult.getMsg());
|
|
throw new ServiceException(userResult.getMsg());
|
|
|
}
|
|
}
|
|
@@ -340,6 +348,7 @@ public class OneMachineController extends BaseController {
|
|
|
String url = fileConfigUtils.getFileDomainApp() + user.getAvatar();
|
|
String url = fileConfigUtils.getFileDomainApp() + user.getAvatar();
|
|
|
String imgUrl = UrlFormatUtils.getHttpsORHttpUrl(url);
|
|
String imgUrl = UrlFormatUtils.getHttpsORHttpUrl(url);
|
|
|
user.setAvatar(imgUrl);
|
|
user.setAvatar(imgUrl);
|
|
|
|
|
+ logger.info("getSysUserR success,user:{}",JSON.toJSONString(user));
|
|
|
return userResult;
|
|
return userResult;
|
|
|
}
|
|
}
|
|
|
|
|
|