Browse Source

值班功能bug修复

zhongwei
tyty 2 years ago
parent
commit
b987433fe7
  1. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java
  2. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java

1
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyGroupServiceImpl.java

@ -287,6 +287,7 @@ public class ImsDutyGroupServiceImpl extends BaseServiceImpl<ImsDutyGroupMapper,
//根据班组ID获取值班信息 //根据班组ID获取值班信息
List<ImsDutyMainEntity> list1 = iImsDutyMainService.list(new LambdaQueryWrapper<ImsDutyMainEntity>() {{ List<ImsDutyMainEntity> list1 = iImsDutyMainService.list(new LambdaQueryWrapper<ImsDutyMainEntity>() {{
in(ImsDutyMainEntity::getDutyGroupId, collect); in(ImsDutyMainEntity::getDutyGroupId, collect);
in(ImsDutyMainEntity::getStatus,Arrays.asList(0,1));
}}); }});
if (CollectionUtil.isNotEmpty(list1)) { if (CollectionUtil.isNotEmpty(list1)) {

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsDutyMainServiceImpl.java

@ -776,7 +776,7 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
List<ImsSchedulingVo> collect = imsSchedulingVos.stream().filter(o -> DateUtil.format(o.getDutyDate(), DateUtil.PATTERN_DATE).equals(date)).sorted(Comparator.comparing(ImsSchedulingVo::getId)).collect(Collectors.toList()); List<ImsSchedulingVo> collect = imsSchedulingVos.stream().filter(o -> DateUtil.format(o.getDutyDate(), DateUtil.PATTERN_DATE).equals(date)).sorted(Comparator.comparing(ImsSchedulingVo::getId)).collect(Collectors.toList());
collect = collect.stream().map(s -> { collect = collect.stream().map(s -> {
//灵活排班把班组名称拼接成人员名称 //灵活排班把班组名称拼接成人员名称
if (s.getGroupName() == null) { if (s.getGroupId() == null) {
String[] split = s.getDutyPersonIds().split("\\^"); String[] split = s.getDutyPersonIds().split("\\^");
if (null != split && split.length > 0) { if (null != split && split.length > 0) {
for (int j = 0; j < split.length; j++) { for (int j = 0; j < split.length; j++) {
@ -791,8 +791,8 @@ public class ImsDutyMainServiceImpl extends BaseServiceImpl<ImsDutyMainMapper, I
} }
} }
} else { } else {
// ImsDutyGroupEntity imsDutyGroupEntity = dutyGroupMapper.selectById(s.getGroupId()); ImsDutyGroupEntity imsDutyGroupEntity = dutyGroupMapper.selectById(s.getGroupId());
s.setName(s.getName() + s.getGroupName()); s.setName(s.getName() + imsDutyGroupEntity.getGroupName());
} }
return s; return s;
}).sorted(Comparator.comparing(ImsSchedulingVo::getId)).collect(Collectors.toList()); }).sorted(Comparator.comparing(ImsSchedulingVo::getId)).collect(Collectors.toList());

Loading…
Cancel
Save