Browse Source

签到开始时间应早于签到截止时间,未到签到时间,签到按钮不展示

master
yinzuomei 4 years ago
parent
commit
aa6b104c60
  1. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java
  2. 2
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/ActSignInRecordServiceImpl.java

@ -125,6 +125,10 @@ public class ActSignInRecordServiceImpl extends BaseServiceImpl<ActSignInRecordD
} catch (Exception e) { } catch (Exception e) {
throw new RenException("签到起止时间格式错误"); throw new RenException("签到起止时间格式错误");
} }
if(groupActInfoEntity.getSignInEndTime().getTime()<groupActInfoEntity.getSignInStartTime().getTime()){
log.warn("签到截止时间应晚于签到开始时间");
throw new RenException(EpmetErrorCode.ACT_SIGN_IN_START_TIME_ERROR.getCode(),EpmetErrorCode.ACT_SIGN_IN_START_TIME_ERROR.getMsg());
}
groupActInfoDao.updateById(groupActInfoEntity); groupActInfoDao.updateById(groupActInfoEntity);
SetSignTimeResultDTO result = new SetSignTimeResultDTO(); SetSignTimeResultDTO result = new SetSignTimeResultDTO();
result.setGroupActId(formDTO.getGroupActId()); result.setGroupActId(formDTO.getGroupActId());

2
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

@ -563,7 +563,7 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
long signInStartTime=resultDTO.getSignInStartTime().getTime(); long signInStartTime=resultDTO.getSignInStartTime().getTime();
long signInEndTime=resultDTO.getSignInEndTime().getTime(); long signInEndTime=resultDTO.getSignInEndTime().getTime();
if (nowTime < signInStartTime) { if (nowTime < signInStartTime) {
resultDTO.setSignInButton(GroupActConstant.DISPLAY); resultDTO.setSignInButton(GroupActConstant.BLANK);
// 2、未到签到时间显示距离签到时间还有多久 // 2、未到签到时间显示距离签到时间还有多久
//距离签到开始还有XX天4小时32分钟 //距离签到开始还有XX天4小时32分钟
String remainStr=getDatePoor(resultDTO.getSignInStartTime(),nowDate); String remainStr=getDatePoor(resultDTO.getSignInStartTime(),nowDate);

Loading…
Cancel
Save