| 
						
						
							
								
							
						
						
					 | 
					@ -27,6 +27,8 @@ import com.elink.esua.epdc.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.constant.StrConstant; | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.constant.StrConstant; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.exception.RenException; | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.exception.RenException; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.page.PageData; | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.page.PageData; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.redis.RedisKeys; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.redis.RedisUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.utils.IdentityNoUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.utils.Result; | 
					 | 
					 | 
					import com.elink.esua.epdc.commons.tools.utils.Result; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -113,6 +115,9 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Autowired | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    private QrCodeProperties qrCodeProperties; | 
					 | 
					 | 
					    private QrCodeProperties qrCodeProperties; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Autowired | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private RedisUtils redisUtils; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public PageData<EpidemicBuildingUnitDTO> page(Map<String, Object> params) { | 
					 | 
					 | 
					    public PageData<EpidemicBuildingUnitDTO> page(Map<String, Object> params) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        IPage<EpidemicBuildingUnitDTO> page = getPage(params); | 
					 | 
					 | 
					        IPage<EpidemicBuildingUnitDTO> page = getPage(params); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -179,6 +184,13 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            throw new RenException("房屋已存在"); | 
					 | 
					 | 
					            throw new RenException("房屋已存在"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        checkData(dto); | 
					 | 
					 | 
					        checkData(dto); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (dto.getBuildingId() != null && dto.getUnit() != null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            int unitCode = getUnitNewCode(dto.getBuildingId(), dto.getUnit().trim().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dto.setUnitMaCode(unitCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            int roomCode = getRoomMaxCode(dto.getBuildingId(), dto.getUnit().trim().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            roomCode = roomCode + 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            dto.setRoomMaCode(roomCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        EpidemicBuildingUnitEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicBuildingUnitEntity.class); | 
					 | 
					 | 
					        EpidemicBuildingUnitEntity entity = ConvertUtils.sourceToTarget(dto, EpidemicBuildingUnitEntity.class); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        insert(entity); | 
					 | 
					 | 
					        insert(entity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        saveOrUpdateOwners(dto.getOwners(), entity.getId()); | 
					 | 
					 | 
					        saveOrUpdateOwners(dto.getOwners(), entity.getId()); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -326,14 +338,28 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    public int getMaxCode() { | 
					 | 
					 | 
					    public int getRoomMaxCode(Long buildingId, String unit) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        Integer maxCode = baseDao.getMaxCode(); | 
					 | 
					 | 
					        Integer maxCode = baseDao.getRoomMaxCode(buildingId, unit); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        if (maxCode == null) { | 
					 | 
					 | 
					        if (maxCode == null) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            maxCode = 0; | 
					 | 
					 | 
					            maxCode = 0; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        return maxCode; | 
					 | 
					 | 
					        return maxCode; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    public int getUnitNewCode(Long buildingId, String unit) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Integer code = baseDao.getUnitCode(buildingId, unit); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (code != null && code != NumConstant.ZERO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return code; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Integer maxCode = baseDao.getUnitMaxCode(buildingId); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (maxCode == null || maxCode == NumConstant.ZERO) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            maxCode = 0; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        maxCode = maxCode + 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        return maxCode; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public void updateErrorRoom() { | 
					 | 
					 | 
					    public void updateErrorRoom() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<EpidemicBuildingUnitEntity> list = baseDao.getErrorRoom(); | 
					 | 
					 | 
					        List<EpidemicBuildingUnitEntity> list = baseDao.getErrorRoom(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -363,13 +389,59 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        params.put("roomMaCode", "0"); | 
					 | 
					 | 
					        params.put("roomMaCode", "0"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<EpidemicBuildingUnitEntity> list = baseDao.selectList(getWrapper(params)); | 
					 | 
					 | 
					        List<EpidemicBuildingUnitEntity> list = baseDao.selectList(getWrapper(params)); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        if (!list.isEmpty()) { | 
					 | 
					 | 
					        if (!list.isEmpty()) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            for (int i = 0; i < list.size(); i++) { | 
					 | 
					 | 
					            for (EpidemicBuildingUnitEntity epidemicBuildingUnitEntity : list) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                list.get(i).setRoomMaCode(i + 1); | 
					 | 
					 | 
					                if (epidemicBuildingUnitEntity.getBuildingId() != null && StringUtils.isNotBlank(epidemicBuildingUnitEntity.getUnit())) { | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    updateUnitMaCode(epidemicBuildingUnitEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    if (StringUtils.isNotBlank(epidemicBuildingUnitEntity.getRoomNo())) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        updateRoomMaCode(epidemicBuildingUnitEntity); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            } | 
					 | 
					 | 
					            } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            updateBatchById(list); | 
					 | 
					 | 
					            updateBatchById(list); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    } | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private void updateUnitMaCode(EpidemicBuildingUnitEntity entity) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        String key = RedisKeys.getMaUnitCodeKey(entity.getBuildingId().toString(), entity.getUnit()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        String nextKey = RedisKeys.getMaUnitNextCodeKey(entity.getBuildingId().toString()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Object obj = redisUtils.get(key); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Object nextObj = redisUtils.get(nextKey); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null != obj) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            int maCodeCache = (int) obj; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            entity.setUnitMaCode(maCodeCache); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            redisUtils.set(key, maCodeCache, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null != nextObj) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            int maCodeCache = (int) nextObj; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            entity.setUnitMaCode(maCodeCache); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            redisUtils.set(key, maCodeCache, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            redisUtils.set(nextKey, maCodeCache + 1, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        int maCode = getUnitNewCode(entity.getBuildingId(), entity.getUnit()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        entity.setUnitMaCode(maCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        redisUtils.set(key, maCode, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        redisUtils.set(nextKey, maCode + 1, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    private void updateRoomMaCode(EpidemicBuildingUnitEntity entity) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        String key = RedisKeys.getMaRoomCodeKey(entity.getBuildingId().toString(), entity.getUnit()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        Object obj = redisUtils.get(key); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        if (null != obj) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            int maCodeCache = (int) obj; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            maCodeCache = maCodeCache + 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            entity.setRoomMaCode(maCodeCache); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            redisUtils.set(key, maCodeCache, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        int maCode = getRoomMaxCode(entity.getBuildingId(), entity.getUnit()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        maCode = maCode + 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        entity.setRoomMaCode(maCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        redisUtils.set(key, maCode, RedisUtils.HOUR_ONE_EXPIRE); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    @Override | 
					 | 
					 | 
					    @Override | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    public Result createBatchHouseCodeAndUrl() { | 
					 | 
					 | 
					    public Result createBatchHouseCodeAndUrl() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        epidemicPlotBuildingService.updateMaCode(); | 
					 | 
					 | 
					        epidemicPlotBuildingService.updateMaCode(); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -609,7 +681,7 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            epidemicUserInfoService.updateBatchById(updateList); | 
					 | 
					 | 
					            epidemicUserInfoService.updateBatchById(updateList); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        } | 
					 | 
					 | 
					        } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        // 补充人房关系
 | 
					 | 
					 | 
					        // 补充人房关系
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        int roomCode = getMaxCode(); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        List<EpidemicUnitInfoResultDTO> unitList = listAllUnitInfo(parentAndAllDeptDTO.getGrid()); | 
					 | 
					 | 
					        List<EpidemicUnitInfoResultDTO> unitList = listAllUnitInfo(parentAndAllDeptDTO.getGrid()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        List<EpidemicUnitOwnerEntity> addOwner = new ArrayList<>(); | 
					 | 
					 | 
					        List<EpidemicUnitOwnerEntity> addOwner = new ArrayList<>(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        for (EpidemicUserInfoEntity item : addList) { | 
					 | 
					 | 
					        for (EpidemicUserInfoEntity item : addList) { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -633,6 +705,9 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    unitEntity.setOwnerName(item.getUserName()); | 
					 | 
					 | 
					                    unitEntity.setOwnerName(item.getUserName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    unitEntity.setMobile(item.getMobile()); | 
					 | 
					 | 
					                    unitEntity.setMobile(item.getMobile()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    unitEntity.setRoomType(NumConstant.ONE_STR); | 
					 | 
					 | 
					                    unitEntity.setRoomType(NumConstant.ONE_STR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    int unitCode = getUnitNewCode(buildingOptional.get().getId(), item.getUnit().trim().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    unitEntity.setUnitMaCode(unitCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    int roomCode = getRoomMaxCode(buildingOptional.get().getId(), item.getUnit().trim().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    roomCode = roomCode + 1; | 
					 | 
					 | 
					                    roomCode = roomCode + 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    unitEntity.setRoomMaCode(roomCode); | 
					 | 
					 | 
					                    unitEntity.setRoomMaCode(roomCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    unitEntity.setRoomCode(getRoomCode(buildingOptional.get().getBuildingMaCode(), roomCode)); | 
					 | 
					 | 
					                    unitEntity.setRoomCode(getRoomCode(buildingOptional.get().getBuildingMaCode(), roomCode)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -690,6 +765,9 @@ public class EpidemicBuildingUnitServiceImpl extends CrudServiceImpl<EpidemicBui | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        unitEntity.setOwnerName(item.getUserName()); | 
					 | 
					 | 
					                        unitEntity.setOwnerName(item.getUserName()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        unitEntity.setMobile(item.getMobile()); | 
					 | 
					 | 
					                        unitEntity.setMobile(item.getMobile()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        unitEntity.setRoomType(NumConstant.ONE_STR); | 
					 | 
					 | 
					                        unitEntity.setRoomType(NumConstant.ONE_STR); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        int unitCode = getUnitNewCode(buildingOptional.get().getId(), item.getUnit().trim().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        unitEntity.setUnitMaCode(unitCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                        int roomCode = getRoomMaxCode(buildingOptional.get().getId(), item.getUnit().trim().toUpperCase()); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        roomCode = roomCode + 1; | 
					 | 
					 | 
					                        roomCode = roomCode + 1; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        unitEntity.setRoomMaCode(roomCode); | 
					 | 
					 | 
					                        unitEntity.setRoomMaCode(roomCode); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                        unitEntity.setRoomCode(getRoomCode(buildingOptional.get().getBuildingMaCode(), roomCode)); | 
					 | 
					 | 
					                        unitEntity.setRoomCode(getRoomCode(buildingOptional.get().getBuildingMaCode(), roomCode)); | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |