大数据页面接口

This commit is contained in:
wans 2021-08-07 10:26:15 +08:00
parent 885900fc09
commit 1089110ad3
3 changed files with 25 additions and 11 deletions

View File

@ -166,7 +166,7 @@ public class DataReleaseController extends AbstractController {
}
BigDataResult bdr = new BigDataResult();
Map<String, Object> resData = new HashMap<>(4);
resData.put("caseTypeCount","案件数量");
resData.put("nameColumns","案件数量");
bdr.setData(resData);
bdr.setList(resList);
return bdr;

View File

@ -2,6 +2,7 @@ package com.cm.systemcity.service.usersignin.impl;
import com.alibaba.excel.EasyExcel;
import com.cm.common.component.SecurityComponent;
import com.cm.common.constants.ISystemConstant;
import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
@ -26,6 +27,7 @@ import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -165,14 +167,20 @@ public class UserSigninServiceImpl extends BaseService implements IUserSigninSer
@Override
public SuccessResultData<UserSigninStatusDTO> getCheckUserSignin(String token, Map<String, Object> params) throws SearchException {
AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
UserSigninDTO userSigninDTO = checkUserSignIn(appTokenUser.getId(), hasNRole(appTokenUser.getRoles()) ? null : DateUtil.getAmPm());
UserSigninStatusDTO userSigninStatusDTO = new UserSigninStatusDTO();
if (userSigninDTO == null) {
userSigninStatusDTO.setSignIn(Boolean.FALSE);
} else {
userSigninStatusDTO.setSignIn(Boolean.TRUE);
userSigninStatusDTO.setLate(StringUtils.equals("0", userSigninDTO.getIsLate()) ? Boolean.FALSE : Boolean.TRUE);
try{
AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
UserSigninDTO userSigninDTO = checkUserSignIn(appTokenUser.getId(), hasNRole(appTokenUser.getRoles()) ? null : DateUtil.getAmPm());
userSigninStatusDTO = new UserSigninStatusDTO();
if (userSigninDTO == null) {
userSigninStatusDTO.setSignIn(Boolean.FALSE);
} else {
userSigninStatusDTO.setSignIn(Boolean.TRUE);
userSigninStatusDTO.setLate(StringUtils.equals("0", userSigninDTO.getIsLate()) ? Boolean.FALSE : Boolean.TRUE);
}
} catch (NullPointerException e){
LOG.error(token);
return new SuccessResultData<>(userSigninStatusDTO);
}
return new SuccessResultData<>(userSigninStatusDTO);
}

View File

@ -157,9 +157,15 @@ public class UserSignoutServiceImpl extends BaseService implements IUserSignoutS
@Override
public SuccessResultData<String> getCheckUserSignout(String token, Map<String, Object> params) throws SearchException {
AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
UserSignoutDTO userSignoutDTO = checkUserSignOut(appTokenUser.getId(), hasNRole(appTokenUser.getRoles()) ? null : DateUtil.getAmPm());
if (userSignoutDTO == null) {
try{
AppTokenUser appTokenUser = AppTokenManager.getInstance().getToken(token).getAppTokenUser();
UserSignoutDTO userSignoutDTO = checkUserSignOut(appTokenUser.getId(), hasNRole(appTokenUser.getRoles()) ? null : DateUtil.getAmPm());
if (userSignoutDTO == null) {
return new SuccessResultData<>(ISystemConstant.IS_FALSE);
}
} catch (NullPointerException e){
LOG.error(token);
return new SuccessResultData<>(ISystemConstant.IS_FALSE);
}
return new SuccessResultData<>(ISystemConstant.IS_TRUE);