|
@ -3,7 +3,6 @@ package com.epmet.service.impl; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.MqConstant; |
|
|
import com.epmet.commons.tools.constant.MqConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; |
|
|
import com.epmet.commons.tools.dto.form.mq.MqBaseMsgDTO; |
|
@ -687,13 +686,13 @@ public class WorkActServiceImpl implements WorkActService { |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void saveActualTime(SaveActualTimeFormDTO formDTO) { |
|
|
public void saveActualTime(SaveActualTimeFormDTO formDTO) { |
|
|
if(formDTO.getActualStartTime().compareTo(formDTO.getActualEndTime())!=-1){ |
|
|
Date actualStartTime= DateUtils.minStrToSecondDate(formDTO.getActualStartTime()); |
|
|
|
|
|
Date actualEndTime= DateUtils.minStrToSecondDate(formDTO.getActualEndTime()); |
|
|
|
|
|
if(actualStartTime.compareTo(actualEndTime)!=-1){ |
|
|
throw new RenException(EpmetErrorCode.ACT_ACTUAL_START_TIME_ERROR.getCode()); |
|
|
throw new RenException(EpmetErrorCode.ACT_ACTUAL_START_TIME_ERROR.getCode()); |
|
|
} |
|
|
} |
|
|
ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); |
|
|
ActInfoDTO actInfoDTO=actInfoService.get(formDTO.getActId()); |
|
|
Date actualStartTime= DateUtils.minStrToSecondDate(formDTO.getActualStartTime()); |
|
|
|
|
|
actInfoDTO.setActualStartTime(actualStartTime); |
|
|
actInfoDTO.setActualStartTime(actualStartTime); |
|
|
Date actualEndTime= DateUtils.minStrToSecondDate(formDTO.getActualEndTime()); |
|
|
|
|
|
actInfoDTO.setActualEndTime(actualEndTime); |
|
|
actInfoDTO.setActualEndTime(actualEndTime); |
|
|
actInfoDTO.setServiceMin(DateUtils.calculateMin(actualStartTime,actualEndTime)); |
|
|
actInfoDTO.setServiceMin(DateUtils.calculateMin(actualStartTime,actualEndTime)); |
|
|
actInfoService.update(actInfoDTO); |
|
|
actInfoService.update(actInfoDTO); |
|
@ -778,7 +777,7 @@ public class WorkActServiceImpl implements WorkActService { |
|
|
private void grantActPoints(ActInfoDTO actInfoDTO) { |
|
|
private void grantActPoints(ActInfoDTO actInfoDTO) { |
|
|
//查询已经给分的用户
|
|
|
//查询已经给分的用户
|
|
|
QueryWrapper<ActUserRelationEntity> wrapper = new QueryWrapper<>(); |
|
|
QueryWrapper<ActUserRelationEntity> wrapper = new QueryWrapper<>(); |
|
|
wrapper.eq(StringUtils.isNotBlank(actInfoDTO.getId()), FieldConstant.ID, actInfoDTO.getId()) |
|
|
wrapper.eq(StringUtils.isNotBlank(actInfoDTO.getId()), "ACT_ID", actInfoDTO.getId()) |
|
|
.eq("PROCESS_FLAG",ActConstant.HANDLED) |
|
|
.eq("PROCESS_FLAG",ActConstant.HANDLED) |
|
|
.eq("REWARD_FLAG",ActConstant.ACT_USER_STATUS_AGREE); |
|
|
.eq("REWARD_FLAG",ActConstant.ACT_USER_STATUS_AGREE); |
|
|
List<ActUserRelationEntity> actUserRelationEntityList=actUserRelationDao.selectList(wrapper); |
|
|
List<ActUserRelationEntity> actUserRelationEntityList=actUserRelationDao.selectList(wrapper); |
|
|