This commit is contained in:
parent
99c15c311f
commit
e026c73627
@ -76,27 +76,23 @@ public class CostPayFeeAuditServiceImpl implements ICostPayFeeAuditService {
|
||||
if (CollUtil.isEmpty(result.getRecords())) {
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
List<Long> itemIdList = result.getRecords().stream()
|
||||
.map(vo -> vo.getItemId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<Long> roomIdList = result.getRecords().stream()
|
||||
.map(vo -> vo.getChargeId())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<CostItemsVo> costItemsVoList = costItemsMapper.selectVoByIds(itemIdList);
|
||||
List<TbRoomVo> roomVoList = roomMapper.selectVoByIds(roomIdList);
|
||||
|
||||
List<CostItemsVo> costItemsVoList = costItemsMapper.selectVoList();
|
||||
List<TbRoomVo> roomVoList = roomMapper.selectVoList();
|
||||
List<CostPayFeeAuditVo> costPayFeeAuditVoList = new ArrayList<>();
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(costItemsVoList)) {
|
||||
CostItemsVo costItemsVo = costItemsVoList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(s.getItemId())).findFirst().orElse(null);
|
||||
s.setChargeItem(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeItem() : null);
|
||||
s.setCostType(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getCostType() : null);
|
||||
s.setChargeCycle(ObjectUtil.isNotEmpty(costItemsVo) ? costItemsVo.getChargeCycle() : null);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(roomVoList)) {
|
||||
TbRoomVo tbRoomVo = roomVoList.stream()
|
||||
.filter(vo -> vo.getId() != null && vo.getId().equals(s.getChargeId())).findFirst().orElse(null);
|
||||
s.setRoomNumber(ObjectUtil.isNotEmpty(tbRoomVo) ? tbRoomVo.getRoomNumber() : null);
|
||||
|
||||
}
|
||||
costPayFeeAuditVoList.add(s);
|
||||
});
|
||||
Page<CostPayFeeAuditVo> costPayFeeAuditVoPage = new Page<CostPayFeeAuditVo>()
|
||||
|
@ -59,12 +59,12 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
MeetBookingDetailVo meetBookingDetailVo = BeanUtil.copyProperties(meetBookingVo, MeetBookingDetailVo.class);
|
||||
MeetVo meetVo = meetMapper.selectVoById(meetBookingDetailVo.getMeetId());
|
||||
String locationName = roomMapper.queryRoomName(Long.valueOf(meetVo.getLocation()));
|
||||
meetBookingDetailVo.setLocationName(locationName);
|
||||
meetBookingDetailVo.setLocationName(ObjectUtil.isNotEmpty(locationName)?locationName:null);
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(Long.valueOf(meetBookingVo.getPerson()));
|
||||
meetBookingDetailVo.setPersonName(residentPersonVo.getUserName());
|
||||
meetBookingDetailVo.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo)?residentPersonVo.getUserName():null);
|
||||
meetBookingDetailVo.setPhone(residentPersonVo.getPhone());
|
||||
ResidentUnitVo residentUnitVo = residentUnitMapper.selectVoById(Long.valueOf(meetBookingVo.getUnit()));
|
||||
meetBookingDetailVo.setUnitName(residentUnitVo.getName());
|
||||
meetBookingDetailVo.setUnitName(ObjectUtil.isNotEmpty(residentPersonVo)?residentUnitVo.getName():null);
|
||||
return meetBookingDetailVo;
|
||||
}
|
||||
|
||||
@ -121,25 +121,21 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
}
|
||||
List<MeetBookingAppointmentVo> meetBookingAppointmentVoList = MapstructUtils.convert(meetBookings, MeetBookingAppointmentVo.class);
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<String> units = meetBookingAppointmentVoList.stream()
|
||||
.map(vo -> vo.getUnit())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<String> persons = meetBookingAppointmentVoList.stream()
|
||||
.map(vo -> vo.getPerson())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoByIds(units);
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoByIds(persons);
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoList();
|
||||
meetBookingAppointmentVoList.stream().forEach(
|
||||
s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(residentUnitVo.getName());
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPersonsVolist)) {
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(residentPersonVo.getUserName());
|
||||
s.setPhone(residentPersonVo.getPhone());
|
||||
}
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
s.setSlots(a <= 12 ? "上午" : "下午");
|
||||
@ -184,23 +180,19 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
String[] weekStr = {"星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
|
||||
List<MeetBookingWeekVo> meetBookingWeekList = new ArrayList<>();
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<String> units = meetBookingVoList.stream()
|
||||
.map(vo -> vo.getUnit())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<String> persons = meetBookingVoList.stream()
|
||||
.map(vo -> vo.getPerson())
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoByIds(units);
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoByIds(persons);
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoList();
|
||||
meetBookingWeekVoList.stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(residentUnitVo.getName());
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPersonsVolist)) {
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(residentPersonVo.getUserName());
|
||||
}
|
||||
//设置指定的Date对象不设置默认返回当天的星期
|
||||
calendar.setTime(s.getScheduledStarttime());
|
||||
//获取当前时间的星期
|
||||
|
Loading…
Reference in New Issue
Block a user