diff --git a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java index 1b76ae2..71da475 100644 --- a/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java +++ b/src/main/java/com/cm/systemcity/controller/datarelease/DataReleaseController.java @@ -166,7 +166,7 @@ public class DataReleaseController extends AbstractController { } BigDataResult bdr = new BigDataResult(); Map resData = new HashMap<>(4); - resData.put("caseTypeCount","案件数量"); + resData.put("nameColumns","案件数量"); bdr.setData(resData); bdr.setList(resList); return bdr; diff --git a/src/main/java/com/cm/systemcity/service/usersignin/impl/UserSigninServiceImpl.java b/src/main/java/com/cm/systemcity/service/usersignin/impl/UserSigninServiceImpl.java index ccba175..1bd9532 100755 --- a/src/main/java/com/cm/systemcity/service/usersignin/impl/UserSigninServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/usersignin/impl/UserSigninServiceImpl.java @@ -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 getCheckUserSignin(String token, Map 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); } diff --git a/src/main/java/com/cm/systemcity/service/usersignout/impl/UserSignoutServiceImpl.java b/src/main/java/com/cm/systemcity/service/usersignout/impl/UserSignoutServiceImpl.java index edf0e70..c3b5b1b 100755 --- a/src/main/java/com/cm/systemcity/service/usersignout/impl/UserSignoutServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/usersignout/impl/UserSignoutServiceImpl.java @@ -157,9 +157,15 @@ public class UserSignoutServiceImpl extends BaseService implements IUserSignoutS @Override public SuccessResultData getCheckUserSignout(String token, Map 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);