修改了物业一些bug
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 6m25s
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 6m25s
This commit is contained in:
parent
5ec2a67049
commit
d3a1d16b8f
@ -40,7 +40,7 @@ public class CleanOrderController extends BaseController {
|
||||
/**
|
||||
* 查询保洁订单列表
|
||||
*/
|
||||
@SaCheckPermission("property:clean_order:list")
|
||||
//@SaCheckPermission("property:clean_order:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CleanOrderVo> list(CleanOrderBo bo, PageQuery pageQuery) {
|
||||
return cleanOrderService.queryPageList(bo, pageQuery);
|
||||
|
@ -93,6 +93,11 @@ public class Meet extends TenantEntity {
|
||||
*/
|
||||
private String appointmentTime;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 开放开始时段
|
||||
*/
|
||||
|
@ -67,7 +67,7 @@ public class MeetBookingBo extends BaseEntity {
|
||||
* 参会人数
|
||||
*/
|
||||
@NotNull(message = "参会人数不能为空", groups = { AddGroup.class, EditGroup.class })
|
||||
private int personSum;
|
||||
private Integer personSum;
|
||||
|
||||
/**
|
||||
* 费用
|
||||
@ -78,17 +78,17 @@ public class MeetBookingBo extends BaseEntity {
|
||||
/**
|
||||
* 是否包含增值服务
|
||||
*/
|
||||
private int attach;
|
||||
private Integer attach;
|
||||
|
||||
/**
|
||||
* 支付状态
|
||||
*/
|
||||
private int payState;
|
||||
private Integer payState;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private int state;
|
||||
private Integer state;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -123,6 +123,10 @@ public class MeetVo implements Serializable {
|
||||
* 预约时间
|
||||
*/
|
||||
private String appointmentTime;
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* (1免费2.付费,3面议)
|
||||
|
@ -38,6 +38,11 @@ public class CleanOrderVo implements Serializable {
|
||||
*/
|
||||
@ExcelProperty(value = "位置")
|
||||
private Long location;
|
||||
/**
|
||||
* 位置
|
||||
*/
|
||||
@ExcelProperty(value = "位置")
|
||||
private String locationName;
|
||||
|
||||
/**
|
||||
* 面积
|
||||
|
@ -1,6 +1,7 @@
|
||||
package org.dromara.property.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.dromara.property.domain.TbRoom;
|
||||
import org.dromara.property.domain.vo.TbRoomVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
@ -19,5 +20,5 @@ public interface TbRoomMapper extends BaseMapperPlus<TbRoom, TbRoomVo> {
|
||||
|
||||
//查询房间名称
|
||||
String queryRoomName(Long roomId);
|
||||
Map<Long,String> queryRoomNameList(List<Long> ids);
|
||||
Map<Long,String> queryRoomNameList(@Param("ids") List<Long> ids);
|
||||
}
|
||||
|
@ -183,7 +183,7 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
*/
|
||||
private void validEntityBeforebo(Long id,InspectionPlanBo bo) {
|
||||
//TODO 做一些数据校验,如唯一约束
|
||||
Assert.isTrue(CollUtil.isNotEmpty(bo.getInspectionPlanStaffBoList()), "巡检人员不存在");
|
||||
if(CollUtil.isNotEmpty(bo.getInspectionPlanStaffBoList())){
|
||||
QueryWrapper<InspectionPlanStaff> staffLambdaQueryWrapper = new QueryWrapper<>();
|
||||
staffLambdaQueryWrapper.eq("inspection_plan_id", id);
|
||||
inspectionPlanStaffMapper.delete(staffLambdaQueryWrapper);
|
||||
@ -194,6 +194,8 @@ public class InspectionPlanServiceImpl implements IInspectionPlanService {
|
||||
inspectionPlanStaffMapper.insertBatch(BeanUtil.copyToList(inspectionPlanStaffBoList, InspectionPlanStaff.class));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验并批量删除巡检计划信息
|
||||
*
|
||||
|
@ -65,9 +65,10 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
MeetVo meetVo = meetMapper.selectVoById(meetBookingDetailVo.getMeetId());
|
||||
String locationName = roomMapper.queryRoomName(Long.valueOf(meetVo.getLocation()));
|
||||
meetBookingDetailVo.setLocationName(ObjectUtil.isNotEmpty(locationName) ? locationName : null);
|
||||
RemoteUserVo userInfo = remoteUserService.getUserInfoById(Long.valueOf(meetBookingVo.getPerson()));
|
||||
meetBookingDetailVo.setPersonName(ObjectUtil.isNotEmpty(userInfo) ? userInfo.getNickName() : null);
|
||||
meetBookingDetailVo.setPhone(ObjectUtil.isNotEmpty(userInfo) ? userInfo.getPhonenumber() : null);
|
||||
//RemoteUserVo userInfo = remoteUserService.getUserInfoById(Long.valueOf(meetBookingVo.getPerson()));
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(Long.valueOf(meetBookingVo.getPerson()));
|
||||
meetBookingDetailVo.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
meetBookingDetailVo.setPhone(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getPhone(): null);
|
||||
ResidentUnitVo residentUnitVo = residentUnitMapper.selectVoById(Long.valueOf(meetBookingVo.getUnit()));
|
||||
meetBookingDetailVo.setUnitName(ObjectUtil.isNotNull(residentUnitVo) ? residentUnitVo.getName() : null);
|
||||
return meetBookingDetailVo;
|
||||
@ -86,7 +87,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
Page<MeetBookingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<Long> userId = result.getRecords().stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
List<ResidentPersonVo> remoteUserVos = residentPersonMapper.selectVoByIds(userId);
|
||||
// List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
List<MeetBookingVo> meetBookingVoList = new ArrayList<>();
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
@ -95,10 +97,10 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
s.setUnitName(ObjectUtil.isNotEmpty(residentUnitVo) ? residentUnitVo.getName() : null);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
RemoteUserVo remoteUserVo = remoteUserVos.stream()
|
||||
ResidentPersonVo residentPersonVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getPhonenumber() : null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getPhone() : null);
|
||||
}
|
||||
meetBookingVoList.add(s);
|
||||
});
|
||||
@ -118,6 +120,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
LocalDateTime startOfDay = date.atStartOfDay();
|
||||
LocalDateTime endOfDay = date.atTime(LocalTime.MAX);
|
||||
meetBookingLambdaQueryWrapper
|
||||
.eq(MeetBooking::getState,2)
|
||||
.le(MeetBooking::getScheduledStarttime, endOfDay)
|
||||
.ge(MeetBooking::getScheduledEndtime, startOfDay);
|
||||
List<MeetBooking> meetBookings = baseMapper.selectList(meetBookingLambdaQueryWrapper);
|
||||
@ -128,7 +131,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<Long> userId = meetBookingAppointmentVoList.stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
// List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
List<ResidentPersonVo> remoteUserVos = residentPersonMapper.selectVoByIds(userId);
|
||||
meetBookingAppointmentVoList.stream().forEach(
|
||||
s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
@ -137,10 +141,10 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
s.setUnitName(ObjectUtil.isNotEmpty(residentUnitVo) ?residentUnitVo.getName():null);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
RemoteUserVo remoteUserVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getPhonenumber() : null);
|
||||
ResidentPersonVo residentPersonVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getPhone() : null);
|
||||
}
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
@ -176,6 +180,7 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
// 构建查询条件
|
||||
LambdaQueryWrapper<MeetBooking> bookingLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
bookingLambdaQueryWrapper.eq(MeetBooking::getMeetId, meetId)
|
||||
.eq(MeetBooking::getState,2)
|
||||
.ge(MeetBooking::getScheduledStarttime, startOfWeek)
|
||||
.le(MeetBooking::getScheduledEndtime, endOfWeek);
|
||||
List<MeetBookingVo> meetBookingVoList = baseMapper.selectVoList(bookingLambdaQueryWrapper);
|
||||
@ -188,7 +193,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<Long> userId = meetBookingWeekVoList.stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
// List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
List<ResidentPersonVo> remoteUserVos = residentPersonMapper.selectVoByIds(userId);
|
||||
meetBookingWeekVoList.stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
@ -196,9 +202,9 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
s.setUnitName(ObjectUtil.isNotEmpty(residentUnitVo)? residentUnitVo.getName():null);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
RemoteUserVo remoteUserVo = remoteUserVos.stream()
|
||||
ResidentPersonVo residentPersonVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
}
|
||||
//设置指定的Date对象不设置默认返回当天的星期
|
||||
calendar.setTime(s.getScheduledStarttime());
|
||||
|
@ -63,16 +63,16 @@ public class MeetServiceImpl implements IMeetService {
|
||||
@Override
|
||||
public MeetVo queryById(Long id) {
|
||||
MeetVo meetVo = baseMapper.selectVoById(id);
|
||||
// ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetVo.getPrincipals());
|
||||
// if(ObjectUtil.isNotEmpty(residentPersonVo)){
|
||||
// meetVo.setPrincipalsName(residentPersonVo.getUserName());
|
||||
// meetVo.setPhoneNo(residentPersonVo.getPhone());
|
||||
// }
|
||||
RemoteUserVo userInfo = remoteUserService.getUserInfoById(Long.valueOf(meetVo.getPrincipals()));
|
||||
if (ObjectUtil.isNotEmpty(userInfo)) {
|
||||
meetVo.setPrincipalsName(userInfo.getNickName());
|
||||
meetVo.setPhoneNo(userInfo.getPhonenumber());
|
||||
ResidentPersonVo residentPersonVo = residentPersonMapper.selectVoById(meetVo.getPrincipals());
|
||||
if(ObjectUtil.isNotEmpty(residentPersonVo)){
|
||||
meetVo.setPrincipalsName(residentPersonVo.getUserName());
|
||||
meetVo.setPhoneNo(residentPersonVo.getPhone());
|
||||
}
|
||||
// RemoteUserVo userInfo = remoteUserService.getUserInfoById(Long.valueOf(meetVo.getPrincipals()));
|
||||
// if (ObjectUtil.isNotEmpty(userInfo)) {
|
||||
// meetVo.setPrincipalsName(userInfo.getNickName());
|
||||
// meetVo.setPhoneNo(userInfo.getPhonenumber());
|
||||
// }
|
||||
String locationName = roomMapper.queryRoomName(Long.valueOf(meetVo.getLocation()));
|
||||
meetVo.setLocationName(locationName);
|
||||
return meetVo;
|
||||
@ -172,6 +172,7 @@ public class MeetServiceImpl implements IMeetService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean insertByBo(MeetBo bo) {
|
||||
Meet add = MapstructUtils.convert(bo, Meet.class);
|
||||
bo.setStatus(1);
|
||||
validEntityBeforeSave(add);
|
||||
boolean flag = baseMapper.insert(add) > 0;
|
||||
if (flag) {
|
||||
|
@ -10,12 +10,10 @@ import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.property.domain.Clean;
|
||||
import org.dromara.property.domain.CleanOrder;
|
||||
import org.dromara.property.domain.CleanRelation;
|
||||
import org.dromara.property.domain.CleanserverOrder;
|
||||
import org.dromara.property.domain.*;
|
||||
import org.dromara.property.domain.bo.cleanOrderBo.CleanOrderBo;
|
||||
import org.dromara.property.domain.vo.cleanOrderVo.CleanOrderVo;
|
||||
import org.dromara.property.mapper.TbRoomMapper;
|
||||
import org.dromara.property.mapper.cleanOrderMapper.CleanMapper;
|
||||
import org.dromara.property.mapper.cleanOrderMapper.CleanOrderMapper;
|
||||
import org.dromara.property.mapper.cleanOrderMapper.CleanRelationMapper;
|
||||
@ -47,6 +45,7 @@ public class CleanOrderServiceImpl implements ICleanOrderService {
|
||||
private final CleanMapper cleanMapper;
|
||||
|
||||
private final CleanRelationMapper cleanRelationMapper;
|
||||
private final TbRoomMapper roomMapper;
|
||||
|
||||
//NOTUNBOOKING:未退订 BOOKING:已退订
|
||||
private final Integer NOTUNBOOKING = 0;
|
||||
@ -97,6 +96,13 @@ public class CleanOrderServiceImpl implements ICleanOrderService {
|
||||
LambdaQueryWrapper<CleanOrder> lqw = buildQueryWrapper(bo);
|
||||
Page<CleanOrderVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw, CleanOrderVo.class);
|
||||
// Page<CleanOrderVo> result = baseMapper.selectForPage(pageQuery.build(), lqw);
|
||||
//List<Long> locationIdList = result.getRecords().stream().map(CleanOrderVo::getLocation).collect(Collectors.toList());
|
||||
// Map<Long, String> longStringMap = roomMapper.queryRoomName(item.getLocation());
|
||||
//找出符合条件的房间名称
|
||||
result.getRecords().forEach(item -> {
|
||||
String localName = roomMapper.queryRoomName(item.getLocation());
|
||||
item.setLocationName(localName != null ? localName : "未知房间");
|
||||
});
|
||||
return TableDataInfo.build(result);
|
||||
}
|
||||
|
||||
|
@ -6,26 +6,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="queryRoomName" resultType="java.lang.String">
|
||||
SELECT
|
||||
concat(c.community_name, b.building_name, u.unit_name, f.floor_name, r.room_number)
|
||||
concat(c.community_name, b.building_name, f.floor_name, r.room_number)
|
||||
FROM
|
||||
tb_room r
|
||||
INNER JOIN tb_floor f ON r.floor_id = f.id
|
||||
INNER JOIN tb_unit u ON f.unit_id = u.id
|
||||
INNER JOIN tb_building b ON u.building_id = b.id
|
||||
INNER JOIN tb_building b ON f.building_id = b.id
|
||||
INNER JOIN tb_community c ON b.community_id = c.id
|
||||
where r.id=#{roomId}
|
||||
</select>
|
||||
|
||||
<select id="queryRoomNameList" resultType="java.util.Map">
|
||||
<select id="queryRoomNameList" parameterType="list" resultType="java.util.Map">
|
||||
SELECT
|
||||
concat(c.community_name, b.building_name, u.unit_name, f.floor_name, r.room_number)
|
||||
r.id,
|
||||
concat(c.community_name, b.building_name, f.floor_name, r.room_number) AS room_name
|
||||
FROM
|
||||
tb_room r
|
||||
INNER JOIN tb_floor f ON r.floor_id = f.id
|
||||
INNER JOIN tb_unit u ON f.unit_id = u.id
|
||||
INNER JOIN tb_building b ON u.building_id = b.id
|
||||
INNER JOIN tb_building b ON f.building_id = b.id
|
||||
INNER JOIN tb_community c ON b.community_id = c.id
|
||||
where r.id IN
|
||||
WHERE r.id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
Loading…
Reference in New Issue
Block a user