傅行帆 5 år sedan
förälder
incheckning
15800770ae

+ 5
- 3
src/main/java/com/huiju/estateagents/service/impl/TaHousingResourcesServiceImpl.java Visa fil

@@ -380,7 +380,9 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
380 380
                 String floorName = row.getCell(3).getStringCellValue().trim();
381 381
                 String roomName = row.getCell(4).getStringCellValue().trim();
382 382
                 BigDecimal price = BigDecimal.valueOf(row.getCell(5).getNumericCellValue());
383
-                Integer heat = Integer.valueOf((row.getCell(6).getNumericCellValue() + "").substring(0, 1));
383
+                String heatString = String.valueOf(row.getCell(6).getNumericCellValue());
384
+                String split = heatString.substring(0, heatString.indexOf("."));
385
+                Integer heat = Integer.valueOf(split);
384 386
                 Integer status = row.getCell(7).getStringCellValue().trim().equals("是") ? 1 : 0;
385 387
 
386 388
                 int currentRow = j + 1;
@@ -408,7 +410,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
408 410
                 String houseInfo = termName + blockName + unitName + floorName + roomName;
409 411
                 if (temHousingList.contains(houseInfo)) {
410 412
                     logger.info("存在重复房源:{}", houseInfo);
411
-                    responseBean.addError("第" + currentRow + "行存在重复房源");
413
+                    responseBean.addError("第" + currentRow + "行存在重复房源,请删除重复房源后再次上传文件。");
412 414
                     return responseBean;
413 415
                 }
414 416
 
@@ -425,7 +427,7 @@ public class TaHousingResourcesServiceImpl extends ServiceImpl<TaHousingResource
425 427
                 TaHousingResources oldTaHouseingResources = taHousingResourcesMapper.selectOne(taHousingResourcesQueryWrapper);
426 428
                 if (null != oldTaHouseingResources) {
427 429
                     logger.info("数据库存在重复房源:{}", houseInfo);
428
-                    responseBean.addError("第" + currentRow + "行与系统已录入房源" + oldTaHouseingResources.getHouseId() + "重复");
430
+                    responseBean.addError("第" + currentRow + "行与系统已录入房源" + oldTaHouseingResources.getHouseId() + "重复,请删除重复房源后再次上传文件。(注意,要检查本楼盘下所有批次的房源)。");
429 431
                     return responseBean;
430 432
                 }
431 433
 

+ 2
- 2
src/main/resources/mapper/TaHousingResourcesMapper.xml Visa fil

@@ -127,7 +127,7 @@
127 127
         SELECT
128 128
             t.* ,
129 129
             a.apartment_name,
130
-            u.user_name
130
+            u.user_name as update_name
131 131
         FROM
132 132
             ta_housing_resources t
133 133
         LEFT JOIN ta_building_apartment a ON t.apartment_id = a.apartment_id
@@ -139,7 +139,7 @@
139 139
         <if test="apartmentId != null and apartmentId != ''">
140 140
             AND t.apartment_id = #{apartmentId}
141 141
         </if>
142
-        <if test="status != null and status != ''">
142
+        <if test="status != null">
143 143
             AND t.status = #{status}
144 144
         </if>
145 145
         <if test="houseId != null and houseId != ''">