Browse Source

修改值班bug

zhongwei
tyty 2 years ago
parent
commit
262131a9cb
  1. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyRecServiceImpl.java

@ -319,8 +319,14 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
return imsDutyRecVOIPage;
}
for (ImsDutyRecVO imsDutyRecVO : records) {
ImsSchedulingVo imsSchedulingVo = imsDutyMainMapper.selectByIdOneV2(imsDutyRecVO.getDutyId(), null);
imsDutyRecVO.setCarryDutyMainVo(imsDutyMainMapper.selectByPreDutyIdOne(Optional.ofNullable(imsSchedulingVo).map(ImsSchedulingVo::getId).orElse(null)));
ImsSchedulingVo imsSchedulingVo = imsDutyMainService.getByIdOneV2(imsDutyRecVO.getDutyId(), null);
ImsSchedulingVo carryDutyMainVo = imsDutyMainMapper.selectByPreDutyIdOne(Optional.ofNullable(imsSchedulingVo).map(ImsSchedulingVo::getId).orElse(null));
if (ObjectUtil.isNotEmpty(carryDutyMainVo)){
if (StringUtil.isNotBlank(carryDutyMainVo.getGroupName())){
carryDutyMainVo.setGroupName("临时班组");
}
}
imsDutyRecVO.setCarryDutyMainVo(carryDutyMainVo);
if (ObjectUtil.isEmpty(imsDutyRecVO)) {
continue;
}
@ -645,7 +651,7 @@ public class ImsDutyRecServiceImpl extends BaseServiceImpl<ImsDutyRecMapper, Ims
} else {//已发起接班流程 判断是否提醒接班
ImsDutyClassEntity carryClassEntity = imsDutyClassService.getById(carryMainentity.getClassId());
Long differMinute = DateUtils.getDifferMinute(calculateDate(carryMainentity, carryClassEntity, OperationalConstants.DutyRecTypeEnum.CARRY_REC.getVal()));
if (differMinute > 0 && one.getDelayStatus() == 0) {
if (differMinute > 0 && one.getDelayStatus() == 0&&differMinute < 15) {
//提醒站长 接班人 交班人
User admin = userClient.userByAccount(entity.getTenantId(), "admin").getData();
remondingStationV2(carryMainentity.getDutyDate(),admin, admin.getName(), classEntity, carryMainentity.getTenantId(), carryMainentity.getId(), carryMainentity.getCreateDept(), carryMainentity.getCreateUser());//提醒站长

Loading…
Cancel
Save