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