Commit c8fb4f91 by huangjy

Merge remote-tracking branch 'origin/dev' into dev

parents 522821da 2ad0c5ce
......@@ -107,13 +107,14 @@ public enum CodeMessageEnum {
PLATFORM_ERROR_SPACE_NOT_DEL(500, "PLATFORM.ERROR.SPACE.NOT.DEL"),
PLATFORM_ERROR_SPACE_NOT_AUTH_PARENT(500, "PLATFORM.ERROR.SPACE.NOT.AUTH.PARENT"),
PLATFORM_ERROR_SPACE_USER_NOT_ADD(500, "PLATFORM.ERROR.SPACE.USER.NOT.ADD"),
PLATFORM_ERROR_ROOM_EXIT_BAD(500, "PLATFORM.ERROR.ROOM.EXIT.BAD"),
PLATFORM_ERROR_ROOM_BAD_NUMBER_NOT_AUTH(500, "PLATFORM.ERROR.ROOM.BAD.NUMBER.NOT.AUTH"),
PLATFORM_ERROR_ROOM_EXIT_BAD(500, "PLATFORM.ERROR.ROOM.EXIT.BED"),
PLATFORM_ERROR_ROOM_BAD_NUMBER_NOT_AUTH(500, "PLATFORM.ERROR.ROOM.BED.NUMBER.NOT.AUTH"),
PLATFORM_ERROR_ROOM_NAME_EXIT(500, "PLATFORM.ERROR.ROOM.NAME.EXIT"),
PLATFORM_ERROR_BAD_NAME_EXIT(500, "PLATFORM.ERROR.BAD.NAME.EXIT"),
PLATFORM_ERROR_BAD_NOT_DEL(500, "PLATFORM.ERROR.BAD.NOT.DEL"),
PLATFORM_ERROR_BAD_NAME_EXIT(500, "PLATFORM.ERROR.BED.NAME.EXIT"),
PLATFORM_ERROR_BAD_NOT_DEL(500, "PLATFORM.ERROR.BED.NOT.DEL"),
PLATFORM_ERROR_BED_NOT_BIND_ELDER(500,"PLATFORM.ERROR.BED.NOT.BIND.ELDER"),
PLATFORM_ERROR_ROOM_OTHER_USED_NOT_DEL(500, "PLATFORM.ERROR.ROOM.OTHER.USED.NOT.DEL"),
PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH(500, "PLATFORM.ERROR.BED.BIND_DEVICE_NOT_AUTH"),
PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH(500, "PLATFORM.ERROR.BED.BIND.DEVICE.NOT.AUTH"),
PLATFORM_ERROR_ELDER_BED_CANT_DEL(500, "PLATFORM.ERROR.ELDER.BED.CANT.DEL"),
......
......@@ -100,14 +100,15 @@ PLATFORM.ERROR.SPACE.NAME.DUPLICATE=同一层级,空间名称不能重复
PLATFORM.ERROR.SPACE.NOT.DEL=该空间下存在下级或者房间,不可删除
PLATFORM.ERROR.SPACE.NOT.AUTH.PARENT=上级空间不能是自己的下级空间
PLATFORM.ERROR.SPACE.USER.NOT.ADD=当前用户没有所属组织,请先分配组织
PLATFORM.ERROR.ROOM.EXIT.BAD=房间中存在已入住的床位,不可删除
PLATFORM.ERROR.ROOM.EXIT.BED=房间中存在已入住的床位,不可删除
PLATFORM.ERROR.ROOM.NAME.EXIT=该房间名称已存在
PLATFORM.ERROR.ROOM.BAD.NUMBER.NOT.AUTH=床位数量不能改小
PLATFORM.ERROR.BAD.NAME.EXIT=床位名称已存在
PLATFORM.ERROR.BAD.NOT.DEL=床位已绑定长者或设备,不可删除
PLATFORM.ERROR.ROOM.BED.NUMBER.NOT.AUTH=床位数量不能改小
PLATFORM.ERROR.BED.NAME.EXIT=床位名称已存在
PLATFORM.ERROR.BED.NOT.DEL=床位已绑定长者或设备,不可删除
PLATFORM.ERROR.BED.NOT.BIND.ELDER=床位已入住长者,不可再次入住
PLATFORM.ERROR.ROOM.OTHER.USED.NOT.DEL=该房间下有床位有其他长者入住
PLATFORM.ERROR.BED.BIND_DEVICE_NOT_AUTH=该床位已绑定设备,请重新选择床位
PLATFORM.ERROR.BED.BIND.DEVICE.NOT.AUTH=该床位已绑定设备,请重新选择床位
PLATFORM.ERROR.ELDER.BED.CANT.DEL=含入住床位的老人,不可删除
......
......@@ -87,6 +87,13 @@ public class PlatSpaceController {
return ApiResponseUtils.success(data);
}
@ApiOperation("树-到床位(未住人床位)-根据老人组织")
@PostMapping("listTreeAuthIgnoreByElder")
public ApiResponseEntity<List<PlatSpaceVO>> listTreeAuthIgnoreByElder(@RequestBody PlatSpaceQueryDTO dto) {
List<PlatSpaceVO> data = spaceService.listBedTreeByElderGroup(dto,true);
return ApiResponseUtils.success(data);
}
@ApiOperation("树-到床位")
@PostMapping("listBedTree")
public ApiResponseEntity<List<PlatSpaceVO>> listBedTreeAuthIgnore(@RequestBody PlatSpaceQueryDTO dto) {
......@@ -97,7 +104,7 @@ public class PlatSpaceController {
@ApiOperation(value = "导出模板")
@PostMapping("/exportTemplate")
public void exportTemplate(HttpServletResponse response) {
ExcelUtil.exportTemplate(response, "空间导入模板" + FileSuffixEnum.EXCEL.getSuffix(), PlatSpaceImportDTO.class);
ExcelUtil.exportTemplate(response, "空间导入模板" + FileSuffixEnum.EXCEL.getSuffix(), "空间导入模板", PlatSpaceImportDTO.class);
}
......
......@@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* Controller
*
......@@ -15,4 +17,7 @@ import lombok.Data;
public class PlatOrgDTO {
@ApiModelProperty(value = "类型 1-居家 2-机构")
private String type;
@ApiModelProperty(value = "组织ids")
private List<String> orgIds;
}
......@@ -15,4 +15,7 @@ public class PlatSpaceQueryDTO {
@ApiModelProperty("空间名称")
private String name;
@ApiModelProperty("长者ID")
private String elderId;
}
......@@ -119,6 +119,9 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
return new PageVO<>();
}
String elderId = platElderChildrenInfo.getElderId();
if(StringUtils.isBlank(elderId)){
return new PageVO<>();
}
String[] split = elderId.split(",");
PlatAlarmRecordQueryDTO data = dto.getData();
data.setElderIdList(Arrays.asList(split));
......@@ -128,6 +131,7 @@ public class PlatAlarmRecordServiceImpl extends ServiceImpl<PlatAlarmRecordMappe
private LambdaQueryWrapper<PlatAlarmRecord> getLambdaQueryWrapper(PlatAlarmRecordQueryDTO param) {
return new LambdaQueryWrapper<PlatAlarmRecord>().ge(Objects.nonNull(param.getCreateDateFrom()), BaseEntity::getCreateDate, param.getCreateDateFrom())
.eq(StringUtils.isNotBlank(param.getId()),BaseEntity::getId,param.getId())
.le(Objects.nonNull(param.getCreateDateTo()), BaseEntity::getCreateDate, param.getCreateDateTo())
.eq(StringUtils.isNotBlank(param.getAlarmType()), PlatAlarmRecord::getAlarmType, param.getAlarmType())
.eq(StringUtils.isNotBlank(param.getStatus()), PlatAlarmRecord::getStatus, param.getStatus())
......
......@@ -119,7 +119,7 @@ public class PlatDeviceServiceImpl extends ServiceImpl<PlatDeviceMapper, PlatDev
check(dto);
PlatDevice db = getById(dto.getId());
BeanUtils.copyProperties(dto, db);
BeanUtils.copyProperties(dto, db,BaseBusEntity.Fields.tenantId);
updateById(db);
......
......@@ -520,6 +520,16 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
}
private void checkBed(PlatElderAddDTO dto) {
PlatBed platBed = platBedService.getById(dto.getBedId());
if (CommonEnum.NO.getValue().equals(platBed.getStatus())) {
throw new BusinessException(CodeMessageEnum.PLATFORM_ERROR_BED_BIND_DEVICE_NOT_AUTH);
}
}
private void fillSpace(PlatElder platElder) {
if (StringUtils.isBlank(platElder.getBedId())) {
......@@ -544,6 +554,7 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
public void add(PlatElderAddDTO dto) {
check(dto);
checkBed(dto);
PlatElder platElder = BeanDtoVoUtils.convert(dto, PlatElder.class);
......
......@@ -82,4 +82,15 @@ public interface PlatSpaceService extends IService<PlatSpace> {
List<PlatSpaceVO> parentListTree(PlatSpaceQueryDTO dto);
List<PlatSpaceVO> listBedTree(PlatSpaceQueryDTO dto, boolean flag);
/**
* 根据老人组织过滤空间
* @param dto
* @param flag
* @return
*/
List<PlatSpaceVO> listBedTreeByElderGroup(PlatSpaceQueryDTO dto, boolean flag);
}
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.dto.platform.space.PlatRegionSettingDTO;
import com.makeit.dto.platform.space.PlatRegionSettingLocateDTO;
import com.makeit.dto.platform.space.PlatRegionSettingQueryDTO;
import com.makeit.dto.wechat.device.PlatDeviceAttrWechatDTO;
import com.makeit.entity.platform.device.PlatDevice;
import com.makeit.entity.platform.device.PlatDeviceOther;
import com.makeit.entity.platform.space.PlatRegionSetting;
......@@ -66,7 +67,7 @@ public class PlatRegionSettingServiceImpl extends ServiceImpl<PlatRegionSettingM
.in(PlatDeviceOther::getDeviceId,listDeviceId));
}
Map<String,String> map = platDeviceOthers.stream().collect(Collectors.toMap(PlatDeviceOther::getDeviceId,PlatDeviceOther::getInstallation));
Map<String,String> map = platDeviceOthers.stream().collect(Collectors.toMap(PlatDeviceOther::getDeviceId,PlatDeviceOther::getAttribute));
List<PlatRegionSetting> list = new ArrayList<>();
listDeviceId.forEach(item->{
......@@ -74,7 +75,9 @@ public class PlatRegionSettingServiceImpl extends ServiceImpl<PlatRegionSettingM
platRegionSetting.setDeviceId(item);
platRegionSetting.setRoomId(roomId);
if(map.get(item)!=null){
platRegionSetting.setInstallType(map.get(item));
String attribute = map.get(item);
PlatDeviceAttrWechatDTO deviceAttrWechatDTO = JsonUtil.toObj(attribute,PlatDeviceAttrWechatDTO.class);
platRegionSetting.setInstallType(deviceAttrWechatDTO.getRadarMount()+"");
}
list.add(platRegionSetting);
});
......
......@@ -105,20 +105,24 @@ public class PlatRoomBedDeviceServiceImpl extends ServiceImpl<PlatRoomBedDeviceM
list.forEach(item->{
if(!item.getRoomId().equals(dto.getRoomId())
|| (item.getRoomId().equals(dto.getRoomId()) && StringUtil.isEmpty(item.getBedId()))){
|| (item.getRoomId().equals(dto.getRoomId()) && StringUtil.isNotEmpty(item.getBedId()))){
list1.add(item);
}
});
}
List<String> listEquipmentIds = list.stream().map(item -> item.getDeviceId()).collect(Collectors.toList());
List<String> listEquipmentIds = list1.stream().map(item -> item.getDeviceId()).collect(Collectors.toList());
String orgId = "";
if (StringUtil.isNotEmpty(dto.getRoomId())) {
PlatRoom platRoom = platRoomService.getById(dto.getRoomId());
PlatSpace platSpace = platSpaceService.getById(platRoom.getSpaceId());
orgId = platSpace.getOrgId();
if(platRoom != null){
PlatSpace platSpace = platSpaceService.getById(platRoom.getSpaceId());
if(platSpace != null){
orgId = platSpace.getOrgId();
}
}
}
......
......@@ -9,6 +9,7 @@ import com.makeit.common.vo.ExcelErrorVo;
import com.makeit.common.vo.ExcelImportVo;
import com.makeit.dto.platform.space.*;
import com.makeit.entity.platform.auth.PlatOrg;
import com.makeit.entity.platform.elder.PlatElder;
import com.makeit.entity.platform.space.PlatBed;
import com.makeit.entity.platform.space.PlatRoom;
import com.makeit.entity.platform.space.PlatSpace;
......@@ -18,6 +19,7 @@ import com.makeit.enums.platform.space.PlatSpaceEnum;
import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.space.PlatSpaceMapper;
import com.makeit.service.platform.auth.PlatOrgService;
import com.makeit.service.platform.elder.PlatElderService;
import com.makeit.service.platform.space.PlatBedService;
import com.makeit.service.platform.space.PlatRoomService;
import com.makeit.service.platform.space.PlatSpaceService;
......@@ -53,6 +55,8 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
private PlatBedService platBedService;
@Autowired
private PlatOrgService platOrgService;
@Autowired
private PlatElderService platElderService;
private void check(PlatSpaceAddDTO dto) {
LambdaQueryWrapper<PlatSpace> queryWrapper = new LambdaQueryWrapper<>();
......@@ -387,6 +391,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
List<PlatRoom> rooms = platRoomService.list();
Map<String,List<PlatRoom>> roomMap = rooms.stream().collect(Collectors.groupingBy(PlatRoom::getSpaceId));
List<String> lastSpaceIds = rooms.stream().filter(t->StringUtil.isNotEmpty(t.getSpaceId())).map(PlatRoom::getSpaceId).collect(Collectors.toList());
List<PlatSpaceImportDTO> list = ExcelUtil.importExcel(null, 3, excelFile, PlatSpaceImportDTO.class);
......@@ -454,6 +459,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
if (errorVoList.isEmpty()) {
for (int i = 0; i < list.size(); i++) {
boolean flag = false;
PlatSpaceImportDTO item = list.get(i);
......@@ -474,10 +480,19 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
spacePath = firstId;
}
if(lastSpaceIds.contains(firstId)){
flag = true;
}
//第二层级
String secondId = null;
if (StringUtil.isNotEmpty(item.getBuilding())) {
if(flag){
errorVoList.add(new ExcelErrorVo(i + 3, excelField.get(0), "该空间下存在房间,不允许添加下级空间"));
successCount--;
errorCount++;
continue;
}
String secondKey = firstId + "-" + item.getBuilding();
if (!childrenIdMap.containsKey(secondKey)) {
PlatSpace platSpace = new PlatSpace();
......@@ -493,12 +508,20 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
secondId = childrenIdMap.get(secondKey);
}
spacePath = spacePath + "," + secondId;
if(lastSpaceIds.contains(secondId)){
flag = true;
}
}
//第三级
String threeId = null;
if (StringUtil.isNotEmpty(item.getUnit())) {
if(flag){
errorVoList.add(new ExcelErrorVo(i + 3, excelField.get(1), "该空间下存在房间,不允许添加下级空间"));
successCount--;
errorCount++;
continue;
}
String threeKey = secondId + "-" + item.getUnit();
if (!childrenIdMap.containsKey(threeKey)) {
PlatSpace platSpace = new PlatSpace();
......@@ -514,12 +537,20 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
threeId = childrenIdMap.get(threeKey);
}
spacePath = spacePath + "," + threeId;
if(lastSpaceIds.contains(secondId)){
flag = true;
}
}
//第四级
String fourId = null;
if (StringUtil.isNotEmpty(item.getFloor())) {
if(flag){
errorVoList.add(new ExcelErrorVo(i + 3, excelField.get(2), "该空间下存在房间,不允许添加下级空间"));
successCount--;
errorCount++;
continue;
}
String fourKey = threeId + "-" + item.getFloor();
if (!childrenIdMap.containsKey(fourKey)) {
PlatSpace platSpace = new PlatSpace();
......@@ -540,7 +571,12 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
//房间
PlatRoomDTO platRoomDTO = new PlatRoomDTO();
platRoomDTO.setName(item.getRoomName());
platRoomDTO.setBedNumber(item.getBedNumber());
if(item.getBedNumber()!=null){
platRoomDTO.setBedNumber(item.getBedNumber());
}else {
platRoomDTO.setBedNumber(0);
}
String spaceId = null;
int j = 0;
if (fourId != null){
......@@ -707,6 +743,87 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
}
@Override
public List<PlatSpaceVO> listBedTreeByElderGroup(PlatSpaceQueryDTO dto, boolean flag) {
PlatElder platElder = platElderService.getById(dto.getElderId());
List<String> orgIds = new ArrayList<>();
orgIds.add("-1");
if(platElder != null){
orgIds.add(platElder.getOrgId());
}
//床位
LambdaQueryWrapper<PlatBed> queryWrapper1 = new LambdaQueryWrapper<>();
List<PlatBed> listBeds = platBedService.list(queryWrapper1);
if(flag){
PlatBed bed = null;
if(platElder != null && StringUtil.isNotEmpty(platElder.getBedId())){
bed = listBeds.stream().filter(item->item.getId().equals(platElder.getBedId())).collect(Collectors.toList()).get(0);
}
listBeds = listBeds.stream().filter(item->CommonEnum.YES.getValue().equals(item.getStatus())).collect(Collectors.toList());
if(bed != null){
listBeds.add(bed);
}
}
if(listBeds.isEmpty()){
return new ArrayList<>();
}
List<String> roomIds = listBeds.stream().map(PlatBed::getRoomId).collect(Collectors.toList());
List<PlatRoom> listRoom = platRoomService.list(new QueryWrapper<PlatRoom>().lambda()
.in(PlatRoom::getId, roomIds));
List<String> spaceIds = listRoom.stream().map(PlatRoom::getSpacePath).collect(Collectors.toList());
Set<String> spaceIdList = new HashSet<>();
for(String spaceId : spaceIds){
spaceIdList.addAll(Arrays.asList(spaceId.split(",")));
}
spaceIdList.add("-1");
List<PlatSpaceVO> listRoomVo = new ArrayList<>();
listRoom.forEach(item -> {
PlatSpaceVO vo = new PlatSpaceVO();
vo.setId(item.getId());
vo.setName(item.getName());
vo.setParentId(item.getSpaceId());
listRoomVo.add(vo);
});
listBeds.forEach(item -> {
PlatSpaceVO vo = new PlatSpaceVO();
vo.setId(item.getId());
vo.setName(item.getName());
vo.setParentId(item.getRoomId());
listRoomVo.add(vo);
});
LambdaQueryWrapper<PlatSpace> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.like(StringUtil.isNotEmpty(dto.getName()), PlatSpace::getName, dto.getName());
queryWrapper.in(PlatSpace::getId, spaceIdList);
queryWrapper.in(PlatSpace::getOrgId, orgIds);
List<PlatSpace> list = this.list(queryWrapper);
List<PlatSpaceVO> listSpaceVo = BeanDtoVoUtils.listVo(list, PlatSpaceVO.class);
listSpaceVo.addAll(listRoomVo);
//父级
List<PlatSpaceVO> listParent = listSpaceVo.stream().filter(item -> StringUtil.isEmpty(item.getParentId())).
collect(Collectors.toList());
//子集
List<PlatSpaceVO> listChild = listSpaceVo.stream().filter(item -> item.getParentId() != null).collect(Collectors.toList());
Map<String, List<PlatSpaceVO>> map = listChild.stream().collect(Collectors.groupingBy(PlatSpaceVO::getParentId));
List<PlatSpaceVO> data = new ArrayList<>();
for (PlatSpaceVO space : listParent) {
space = childVo(space, map);
data.add(space);
}
return data;
}
}
......
......@@ -170,17 +170,20 @@ public class WorkStationServiceImpl implements WorkStationService {
public PageVO<WorkStationInstitutionRoomVO> institutionPage(PageReqDTO<WorkStationQueryDTO> page) {
WorkStationQueryDTO dto = page.getData();
List<PlatSpace> spaces = new ArrayList<>();
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(PlatOrgEnum.OrgTypeEnum.INSTITUTION.getValue());
if (orgs.isEmpty()) {
return new PageVO<>();
if(dto.getOrgIds().isEmpty()){
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(PlatOrgEnum.OrgTypeEnum.INSTITUTION.getValue());
if (orgs.isEmpty()) {
return new PageVO<>();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIds);
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIds);
if (dto.getSpaceIds().isEmpty()) {
spaces = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda()
.in(PlatSpace::getOrgId, orgIds));
.in(PlatSpace::getOrgId, dto.getOrgIds()));
if (spaces.isEmpty()) {
return new PageVO<>();
}
......@@ -464,17 +467,20 @@ public class WorkStationServiceImpl implements WorkStationService {
public PageVO<WorkStationHomeBedVO> homePage(PageReqDTO<WorkStationQueryDTO> page) {
WorkStationQueryDTO dto = page.getData();
List<PlatSpace> spaces = new ArrayList<>();
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(PlatOrgEnum.OrgTypeEnum.HOME.getValue());
if (orgs.isEmpty()) {
return new PageVO<>();
if(dto.getOrgIds().isEmpty()){
//获取该账号的权限组织
List<PlatOrg> orgs = belongToScopeList(PlatOrgEnum.OrgTypeEnum.HOME.getValue());
if (orgs.isEmpty()) {
return new PageVO<>();
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIds);
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
dto.setOrgIds(orgIds);
if (dto.getSpaceIds().isEmpty()) {
spaces = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda()
.in(PlatSpace::getOrgId, orgIds));
.in(PlatSpace::getOrgId, dto.getOrgIds()));
if (spaces.isEmpty()) {
return new PageVO<>();
}
......@@ -555,6 +561,10 @@ public class WorkStationServiceImpl implements WorkStationService {
}
List<String> orgIds = orgs.stream().map(PlatOrg::getId).collect(Collectors.toList());
if(!dto.getOrgIds().isEmpty()){
orgIds = dto.getOrgIds();
}
List<PlatSpace> list = platSpaceService.list(new QueryWrapper<PlatSpace>().lambda()
.in(PlatSpace::getOrgId, orgIds));
......
......@@ -434,7 +434,7 @@ public class PlatTenantServiceImpl extends ServiceImpl<PlatTenantMapper, PlatTen
PlatTenant tntTenant = getOne(
new QueryWrapper<PlatTenant>().lambda()
.eq(PlatTenant::getCode, dto.getCode())
.ne(StringUtils.isNotBlank(dto.getId()), PlatTenant::getCode, dto.getCode())
.ne(StringUtils.isNotBlank(dto.getId()), PlatTenant::getId, dto.getId())
);
if (tntTenant != null && !tntTenant.getId().equals(dto.getId())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment