顾绍勇 5 anni fa
parent
commit
b8907d0cce

+ 5
- 5
src/main/java/com/huiju/estateagents/controller/TaHousingResourcesController.java Vedi File

@@ -228,8 +228,8 @@ public class TaHousingResourcesController extends BaseController {
228 228
         Integer orgId = getOrgId(request);
229 229
         String personId = getPersonId(request);
230 230
 
231
-        logger.info("TaHouseingResourcesController.listHousingResources 接收参数:orgId:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{}",
232
-                orgId, salesBatchId, startPrice, endPrice, apartmentId);
231
+        logger.info("TaHouseingResourcesController.listHousingResources 接收参数:orgId:{},salesBatchId:{},startPrice:{},endPrice:{},apartmentId:{},source:{}",
232
+                orgId, salesBatchId, startPrice, endPrice, apartmentId, source);
233 233
 
234 234
         try {
235 235
             //获取所有楼房的预选热度和认筹热度
@@ -488,7 +488,7 @@ public class TaHousingResourcesController extends BaseController {
488 488
      * @return
489 489
      */
490 490
     @RequestMapping(value = "/admin/house/updateLockingStatus", method = RequestMethod.PUT)
491
-    public ResponseBean updateLockingStatus(Integer houseId, String type, Integer raiseHouseId, String personId,Integer raiseRecordId,
491
+    public ResponseBean updateLockingStatus(Integer houseId, String type, Integer raiseHouseId, String personId, Integer raiseRecordId,
492 492
                                             HttpServletRequest request) {
493 493
         ResponseBean responseBean = new ResponseBean();
494 494
         try {
@@ -507,10 +507,10 @@ public class TaHousingResourcesController extends BaseController {
507 507
      * @return
508 508
      */
509 509
     @RequestMapping(value = "/wx/check/raise", method = RequestMethod.GET)
510
-    public ResponseBean checkRaise(@RequestParam(value = "houseId") Integer houseId,HttpServletRequest request) {
510
+    public ResponseBean checkRaise(@RequestParam(value = "houseId") Integer houseId, HttpServletRequest request) {
511 511
         ResponseBean responseBean = new ResponseBean();
512 512
         try {
513
-            boolean state = iTaHousingResourcesService.checkRaiseState(houseId,getPersonId(request),getOrgId(request));
513
+            boolean state = iTaHousingResourcesService.checkRaiseState(houseId, getPersonId(request), getOrgId(request));
514 514
             responseBean.addSuccess(state);
515 515
         } catch (Exception e) {
516 516
             logger.error("校验房源状态 -=- {}", e.getMessage());

+ 10
- 31
src/main/resources/mapper/TaHousingResourcesMapper.xml Vedi File

@@ -8,7 +8,7 @@
8 8
         FROM
9 9
         (
10 10
         SELECT
11
-        t.house_id,
11
+        t.*,
12 12
         (
13 13
         CASE
14 14
         WHEN ( SELECT num_char_extract ( t.term_name, 2 ) + 0 ) = 0 THEN
@@ -27,51 +27,30 @@
27 27
         ( SELECT num_char_extract ( t.unit_name, 2 ) ) ELSE ( SELECT num_char_extract ( t.unit_name, 2 ) + 0 )
28 28
         END
29 29
         ) unitNamePre,
30
-        t.building_id,
31
-        t.block_id,
32
-        t.block_name,
33
-        t.sales_batch_id,
34
-        t.unit_id,
35
-        t.unit_name,
36
-        t.floor_id,
37
-        t.floor_name,
38
-        t.room_id,
39
-        t.room_name,
40
-        t.price,
41
-        t.heat,
42
-        t.real_heat,
43
-        t.apartment_id,
44
-        t.`status`,
45
-        t.org_id,
46 30
         t2.inside_area,
47 31
         t2.building_area,
48
-        t2.apartment_name,
49
-        t3.term_id,
50
-        t.term_name,
51
-        t.raise_heat,
52
-        t.raise_real_heat,
53
-        t.house_locking_status
32
+        t2.apartment_name
54 33
         FROM
55 34
         ta_housing_resources t
56 35
         LEFT JOIN ta_building_apartment t2 ON t.apartment_id = t2.apartment_id
57
-        LEFT JOIN ta_building_block t3 ON t.block_id = t3.block_id
58 36
         LEFT JOIN ta_sales_batch t4 ON t.sales_batch_id = t4.sales_batch_id
59 37
         <if test="source == 'raiseChoose'">
60 38
             LEFT JOIN ta_raise_house t5 ON t.house_id = t5.house_id
61 39
             LEFT JOIN ta_raise_record t6 ON t6.raise_record_id = t5.raise_record_id
40
+            LEFT JOIN ta_raise t7 ON t.sales_batch_id = t7.sales_batch_id
62 41
         </if>
63 42
         WHERE
64
-        t.sales_batch_id = #{salesBatchId}
65
-        AND t.org_id = #{orgId}
66
-        AND t.`status` > 0
67
-        AND t4.`status` = 1
43
+            t.sales_batch_id = #{salesBatchId}
44
+            AND t.org_id = #{orgId}
45
+            AND t.`status` > 0
46
+            AND t4.`status` = 1
68 47
         <if test = "source == 'raiseChoose'">
69 48
             AND ( t6.`status` != 0 OR t6.`status` IS NULL )
49
+            AND (t.house_locking_status  != 'locked' OR t.house_locking_status IS NULL)
50
+            AND t7.raise_start_time &lt;= now( ) AND t7.raise_end_time &gt;= now()
70 51
             <if test="personId != null and personId != ''">
71
-                AND t6.person_id != #{personId}
52
+                AND (t6.person_id != #{personId} OR t6.person_id IS NULL)
72 53
             </if>
73
-            AND (t.house_locking_status  != 'locked'
74
-            OR t.house_locking_status IS NULL)
75 54
         </if>
76 55
         <choose>
77 56
             <when test=" endPrice != null and startPrice == null">