Commit a0192f89 authored by Quxl's avatar Quxl

x

parent b1a306e3
......@@ -48,7 +48,6 @@ FROM #__tmp a, (
AND a.nItem = b.nItem
SELECT
id = r.nRoomID,
PropertyID = a.nPropertyID,
PropertyName = p.sPropertyName,
HouseID = a.nHouseID,
......@@ -58,11 +57,15 @@ SELECT
RoomTypeName = rt.sRoomTypeName,
HouseNO = a.sHouseNO,
HouseName = a.sHouseName,
RoomNO = r.sRoomNO,
RoomName = r.sRoomName,
HouseAddress = a.sHouseAddress,
RentTypeID = a.sRentTypeID, --出租类型:1.整租;2.合租;3.不限
RentType = a.sRentType,
RentTypeID = case when isnull(a.sRentTypeID,'') <> '' then a.sRentTypeID else
case when r.nTag&4=4 then '1' else '2' end end, --出租类型:整租、合租
RentType = case when isnull(a.sRentTypeID,'') <> '' then a.sRentType else
case when r.nTag&4=4 then '整租' else '合租' end end,
TripDesc = p.sTripDesc, --出行描述
RentArea = a.nRentArea, --出租面积
RentArea = r.nUseArea, --出租面积
TotalFloorsNum = a.nTotalFloorsNum, --总层数
Building = a.sBuilding, --楼栋
Cell = a.sCell, --单元
......@@ -72,7 +75,7 @@ SELECT
LivingRooms = a.nLivingRooms, --客厅
Toilets = a.nToilets, --厕所
Balconys = a.nBalconys, --阳台
HousePrice = r.nHousePrice, --房价
HousePrice = isnull(r.nHousePrice,0), --房价
Unit = '',
AdultCount = r.nAdultCount,
ChildCount = r.nChildCount,
......@@ -87,7 +90,8 @@ SELECT
BrandType = (SELECT DISTINCT sComDesc FROM tCommon WHERE sLangID = @LangID AND sCommonNO = 'Brand' AND sComID = a.sBrandTypeID),
URL = @HttpUrl + CASE WHEN LEFT(f.sURL,1) = '/' THEN RIGHT(f.sURL,len(f.sURL) - 1) ELSE f.sURL END,
RoomStatusTypeID = r.sStatus, --当前房态
RoomStatusType = (SELECT DISTINCT sComDesc FROM tCommon where sCommonNO = 'RoomStatusType' AND sLangID = @LangID and sComID = r.sStatus),
RoomStatusType = (SELECT DISTINCT sComDesc FROM tCommon where sCommonNO = 'RoomStatusType'
AND sLangID = @LangID and sComID = r.sStatus),
CreateDate = a.dCreateDate,
ChangeDate = a.dChangeDate,
LastUpdateTime = a.dLastUpdateTime
......@@ -97,6 +101,6 @@ SELECT
left join #__tmp1 f on f.sFileNO = convert(varchar,a.nHouseID)
WHERE a.nTag&1=0
AND a.nHouseStatus = 2 --房源有效状态
DROP TABLE #__tmp
DROP TABLE #__tmp1
\ No newline at end of file
DROP TABLE #__tmp1
......@@ -48,7 +48,6 @@ FROM #__tmp a, (
AND a.nItem = b.nItem
SELECT
id = r.nRoomID,
PropertyID = a.nPropertyID,
PropertyName = p.sPropertyName,
HouseID = a.nHouseID,
......@@ -58,11 +57,15 @@ SELECT
RoomTypeName = rt.sRoomTypeName,
HouseNO = a.sHouseNO,
HouseName = a.sHouseName,
RoomNO = r.sRoomNO,
RoomName = r.sRoomName,
HouseAddress = a.sHouseAddress,
RentTypeID = a.sRentTypeID, --出租类型:1.整租;2.合租;3.不限
RentType = a.sRentType,
RentTypeID = case when isnull(a.sRentTypeID,'') <> '' then a.sRentTypeID else
case when r.nTag&4=4 then '1' else '2' end end, --出租类型:整租、合租
RentType = case when isnull(a.sRentTypeID,'') <> '' then a.sRentType else
case when r.nTag&4=4 then '整租' else '合租' end end,
TripDesc = p.sTripDesc, --出行描述
RentArea = a.nRentArea, --出租面积
RentArea = r.nUseArea, --出租面积
TotalFloorsNum = a.nTotalFloorsNum, --总层数
Building = a.sBuilding, --楼栋
Cell = a.sCell, --单元
......@@ -72,7 +75,7 @@ SELECT
LivingRooms = a.nLivingRooms, --客厅
Toilets = a.nToilets, --厕所
Balconys = a.nBalconys, --阳台
HousePrice = r.nHousePrice, --房价
HousePrice = isnull(r.nHousePrice,0), --房价
Unit = '',
AdultCount = r.nAdultCount,
ChildCount = r.nChildCount,
......@@ -100,4 +103,4 @@ WHERE (a.nTag&1=1 or a.nHouseStatus <> 2) --房源无效状态
AND a.dLastUpdateTime >= ?
DROP TABLE #__tmp
DROP TABLE #__tmp1
\ No newline at end of file
DROP TABLE #__tmp1
......@@ -48,7 +48,6 @@ FROM #__tmp a, (
AND a.nItem = b.nItem
SELECT
id = r.nRoomID,
PropertyID = a.nPropertyID,
PropertyName = p.sPropertyName,
HouseID = a.nHouseID,
......@@ -58,11 +57,15 @@ SELECT
RoomTypeName = rt.sRoomTypeName,
HouseNO = a.sHouseNO,
HouseName = a.sHouseName,
RoomNO = r.sRoomNO,
RoomName = r.sRoomName,
HouseAddress = a.sHouseAddress,
RentTypeID = a.sRentTypeID, --出租类型:1.整租;2.合租;3.不限
RentType = a.sRentType,
RentTypeID = case when isnull(a.sRentTypeID,'') <> '' then a.sRentTypeID else
case when r.nTag&4=4 then '1' else '2' end end, --出租类型:整租、合租
RentType = case when isnull(a.sRentTypeID,'') <> '' then a.sRentType else
case when r.nTag&4=4 then '整租' else '合租' end end,
TripDesc = p.sTripDesc, --出行描述
RentArea = a.nRentArea, --出租面积
RentArea = r.nUseArea, --出租面积
TotalFloorsNum = a.nTotalFloorsNum, --总层数
Building = a.sBuilding, --楼栋
Cell = a.sCell, --单元
......@@ -72,7 +75,7 @@ SELECT
LivingRooms = a.nLivingRooms, --客厅
Toilets = a.nToilets, --厕所
Balconys = a.nBalconys, --阳台
HousePrice = r.nHousePrice, --房价
HousePrice = isnull(r.nHousePrice,0), --房价
Unit = '',
AdultCount = r.nAdultCount,
ChildCount = r.nChildCount,
......@@ -99,6 +102,6 @@ SELECT
WHERE a.nTag&1=0
AND a.nHouseStatus = 2 --房源有效状态
AND a.dLastUpdateTime >= ?
DROP TABLE #__tmp
DROP TABLE #__tmp1
\ No newline at end of file
DROP TABLE #__tmp1
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 to comment