|
|
|
@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
|
|
import com.google.common.collect.Lists; |
|
|
|
|
import com.hnac.hzims.equipment.entity.EmInfoEntity; |
|
|
|
|
import com.hnac.hzims.message.MessageConstants; |
|
|
|
|
import com.hnac.hzims.message.dto.MessagePushRecordDto; |
|
|
|
|
import com.hnac.hzims.message.fegin.IMessageClient; |
|
|
|
@ -63,6 +64,7 @@ import org.springframework.util.Assert;
|
|
|
|
|
import org.springframework.util.ObjectUtils; |
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.xml.ws.WebServiceException; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.sql.Time; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
@ -455,6 +457,9 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
|
|
|
|
|
} |
|
|
|
|
for (ImsDutyRecVO imsDutyRecVO : records) { |
|
|
|
|
ImsSchedulingVo imsSchedulingVo = imsDutyMainService.getByIdOneV2(imsDutyRecVO.getDutyId(), null); |
|
|
|
|
if (ObjectUtil.isEmpty(imsSchedulingVo)){ |
|
|
|
|
throw new ServiceException("没有找到接班对象值班信息,请联系管理人员,尽快进行排班!"); |
|
|
|
|
} |
|
|
|
|
ImsSchedulingVo carryDutyMainVo = imsDutyMainMapper.selectByPreDutyIdOne(Optional.ofNullable(imsSchedulingVo).map(ImsSchedulingVo::getId).orElse(null)); |
|
|
|
|
if (ObjectUtil.isNotEmpty(carryDutyMainVo)){ |
|
|
|
|
if (StringUtil.isBlank(carryDutyMainVo.getGroupName())){ |
|
|
|
@ -545,7 +550,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
|
|
|
|
|
if (ObjectUtil.isNotEmpty(imsSchedulingVo1)&&null != imsSchedulingVo1.getManagerId()) { |
|
|
|
|
imsSchedulingVo1.setUserName(userClient.userInfoById(imsSchedulingVo1.getManagerId()).getData().getName()); |
|
|
|
|
}else { |
|
|
|
|
throw new ServiceException("没有找到接班对象值班信息,请联系管理人员,进行尽快进行排班!!!!"); |
|
|
|
|
throw new ServiceException("没有找到接班对象值班信息,请联系管理人员,尽快进行排班!!!!"); |
|
|
|
|
} |
|
|
|
|
vo.setHeadDutyMainVo(imsSchedulingVo); |
|
|
|
|
vo.setCarryDutyMainVo(imsSchedulingVo1); |
|
|
|
@ -1416,10 +1421,15 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
|
|
|
|
|
recDTO.setStatus(DutyRecStatus.ACCEPT.getVal()); |
|
|
|
|
recDTO.setAcceptTime(new Date()); |
|
|
|
|
ImsDutyLogEntity imsDutyLogEntity = recDTO.getImsDutyLogEntity(); |
|
|
|
|
imsDutyLogService.update(Wrappers.<ImsDutyLogEntity>lambdaUpdate() |
|
|
|
|
.set(ImsDutyLogEntity::getCarryTime, DateUtil.format(new Date(), PATTERN_DATETIME)) |
|
|
|
|
.eq(ImsDutyLogEntity::getDutyId,imsDutyLogEntity.getDutyId()) |
|
|
|
|
); |
|
|
|
|
ImsDutyLogEntity update = imsDutyLogService.getOne(Wrappers.<ImsDutyLogEntity>lambdaQuery() |
|
|
|
|
.eq(ImsDutyLogEntity::getDutyId, imsDutyLogEntity.getDutyId()) |
|
|
|
|
.last("limit 1")); |
|
|
|
|
update.setCarryTime(DateUtil.format(new Date(), PATTERN_DATETIME)); |
|
|
|
|
imsDutyLogService.updateById(update); |
|
|
|
|
// imsDutyLogService.update(Wrappers.<ImsDutyLogEntity>lambdaUpdate()
|
|
|
|
|
// .set(ImsDutyLogEntity::getCarryTime, DateUtil.format(new Date(), PATTERN_DATETIME))
|
|
|
|
|
// .eq(ImsDutyLogEntity::getDutyId,imsDutyLogEntity.getDutyId())
|
|
|
|
|
// );
|
|
|
|
|
log.info("更新值班日志"); |
|
|
|
|
} |
|
|
|
|
ImsDutyRecEntity dutyRec = BeanUtil.copy(recDTO, ImsDutyRecEntity.class); |
|
|
|
|