|  |  | @ -22,7 +22,10 @@ import com.epmet.commons.tools.redis.common.CustomerStaffRedis; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.redis.common.bean.HouseInfoCache; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.security.dto.TokenDto; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.*; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.ConvertUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.FileUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.HouseQRcodeUtils; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.commons.tools.utils.Result; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constant.CustomerGridConstant; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.constants.ImportTaskConstants; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.dao.*; | 
			
		
	
	
		
			
				
					|  |  | @ -37,6 +40,7 @@ import com.epmet.enums.HouseChangeEnums; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.enums.HousePurposeEnums; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.enums.HouseRentFlagEnums; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.enums.HouseTypeEnums; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetAdminOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetCommonServiceOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.EpmetUserOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | import com.epmet.feign.OssFeignClient; | 
			
		
	
	
		
			
				
					|  |  | @ -122,6 +126,8 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { | 
			
		
	
		
			
				
					|  |  |  |     private IcHouseCodeInfoDao icHouseCodeInfoDao; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private OssFeignClient ossFeignClient; | 
			
		
	
		
			
				
					|  |  |  |     @Autowired | 
			
		
	
		
			
				
					|  |  |  |     private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     @Override | 
			
		
	
	
		
			
				
					|  |  | @ -827,10 +833,15 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         List<IcHouseListResultDTO> houseList = icHouseDao.searchHouseByPage(formDTO); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         //获取一户一码前缀地址
 | 
			
		
	
		
			
				
					|  |  |  |         Result<List<SysDictDataDTO>> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); | 
			
		
	
		
			
				
					|  |  |  |         if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         for (IcHouseListResultDTO house : houseList) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), | 
			
		
	
		
			
				
					|  |  |  |                     HouseQrcodeEnum.PREFIX.getCode() +  house.getHouseCode()); | 
			
		
	
		
			
				
					|  |  |  |                     dict.getData().get(0).getDictValue() +  house.getHouseCode()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |             try { | 
			
		
	
		
			
				
					|  |  |  |                 byte[] buf = new byte[8192]; | 
			
		
	
	
		
			
				
					|  |  | @ -918,7 +929,11 @@ public class HouseServiceImpl implements HouseService, ResultDataResolver { | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "未查到房屋信息", "未查到房屋信息"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         //url组成:小程序地址?房屋编码
 | 
			
		
	
		
			
				
					|  |  |  |         String url = HouseQrcodeEnum.PREFIX.getCode() + house.getHouseCode(); | 
			
		
	
		
			
				
					|  |  |  |         Result<List<SysDictDataDTO>> dict = epmetAdminOpenFeignClient.dictDataList("house_qrcode_pre"); | 
			
		
	
		
			
				
					|  |  |  |         if (!dict.success() || CollectionUtils.isEmpty(dict.getData())) { | 
			
		
	
		
			
				
					|  |  |  |             throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "一户一码前缀查询异常", "一户一码前缀查询异常"); | 
			
		
	
		
			
				
					|  |  |  |         } | 
			
		
	
		
			
				
					|  |  |  |         String url = dict.getData().get(0).getDictValue() + house.getHouseCode(); | 
			
		
	
		
			
				
					|  |  |  |         String fileName = house.getBuildingName() + house.getUnitNum() + house.getDoorName() + ".png"; | 
			
		
	
		
			
				
					|  |  |  |         BufferedImage image = HouseQRcodeUtils.drawHouseQRImage(house.getBuildingName() + house.getUnitNum() + house.getDoorName(), url); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  | 
 |