傅行帆 5 vuotta sitten
vanhempi
commit
8e9edc59a4

+ 11
- 9
src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java Näytä tiedosto

753
         taRaiseQueryWrapper.eq("org_id",orgId);
753
         taRaiseQueryWrapper.eq("org_id",orgId);
754
         taRaiseQueryWrapper.eq("sales_batch_id",taHousingResources.getSalesBatchId());
754
         taRaiseQueryWrapper.eq("sales_batch_id",taHousingResources.getSalesBatchId());
755
         taRaiseQueryWrapper.eq("building_id",taHousingResources.getBuildingId());
755
         taRaiseQueryWrapper.eq("building_id",taHousingResources.getBuildingId());
756
+        taRaiseQueryWrapper.eq("status",CommConstant.STATUS_NORMAL);
756
         TaRaise taRaise = taRaiseMapper.selectOne(taRaiseQueryWrapper);
757
         TaRaise taRaise = taRaiseMapper.selectOne(taRaiseQueryWrapper);
757
-        if (taRaise.getStatus() != CommConstant.STATUS_NORMAL) {
758
+        if (null == taRaise) {
758
             throw new Exception("认筹单已经作废");
759
             throw new Exception("认筹单已经作废");
759
         }
760
         }
760
         //校验房源是否同一批次
761
         //校验房源是否同一批次
771
                 preselectionRecordQueryWrapper.eq("org_id", orgId);
772
                 preselectionRecordQueryWrapper.eq("org_id", orgId);
772
                 preselectionRecordQueryWrapper.eq("house_id", houseId);
773
                 preselectionRecordQueryWrapper.eq("house_id", houseId);
773
                 preselectionRecordQueryWrapper.eq("person_id", personId);
774
                 preselectionRecordQueryWrapper.eq("person_id", personId);
775
+                preselectionRecordQueryWrapper.eq("status", CommConstant.STATUS_NORMAL);
774
                 TaPreselectionRecord taPreselectionRecord = taPreselectionRecordMapper.selectOne(preselectionRecordQueryWrapper);
776
                 TaPreselectionRecord taPreselectionRecord = taPreselectionRecordMapper.selectOne(preselectionRecordQueryWrapper);
775
                 if (null == taPreselectionRecord) {
777
                 if (null == taPreselectionRecord) {
776
                     throw new Exception("需要先预选才能认筹");
778
                     throw new Exception("需要先预选才能认筹");
777
                 }
779
                 }
778
             }
780
             }
779
             //查询我的认筹记录表
781
             //查询我的认筹记录表
780
-            QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
781
-            taRaiseHouseQueryWrapper.eq("org_id", orgId);
782
-            taRaiseHouseQueryWrapper.eq("house_id", houseId);
783
-            taRaiseHouseQueryWrapper.eq("person_id", personId);
784
-            List<TaRaiseHouse> list = taRaiseHouseService.list(taRaiseHouseQueryWrapper);
785
-            if (list.size() > 0) {
786
-                throw new Exception("您已有认筹单包含当前房源");
787
-            }
782
+//            QueryWrapper<TaRaiseHouse> taRaiseHouseQueryWrapper = new QueryWrapper<>();
783
+//            taRaiseHouseQueryWrapper.eq("org_id", orgId);
784
+//            taRaiseHouseQueryWrapper.eq("house_id", houseId);
785
+//            taRaiseHouseQueryWrapper.eq("person_id", personId);
786
+//            List<TaRaiseHouse> list = taRaiseHouseService.list(taRaiseHouseQueryWrapper);
787
+//            if (list.size() > 0) {
788
+//                throw new Exception("您已有认筹单包含当前房源");
789
+//            }
788
 
790
 
789
         }
791
         }
790
         if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL) {
792
         if (taHousingResources.getStatus() != CommConstant.STATUS_NORMAL) {