傅行帆 před 6 roky
rodič
revize
efc32159a6

+ 6
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpBuildingOwnerInfo.java Zobrazit soubor

@@ -41,7 +41,12 @@ public class TpBuildingOwnerInfo implements Serializable {
41 41
      * 身份证号码
42 42
      */
43 43
     private String idCard;
44
-
44
+    
45
+    /**
46
+     * 期/区
47
+     */
48
+    private String phase;
49
+    
45 50
     /**
46 51
      * 楼栋
47 52
      */

+ 39
- 7
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/BuildingOwnerInfoServiceImpl.java Zobrazit soubor

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.enums.SqlMethod;
6 6
 import com.baomidou.mybatisplus.core.metadata.IPage;
7 7
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
8 8
 import com.baomidou.mybatisplus.core.toolkit.Constants;
9
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
9 10
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
10 11
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
11 12
 import com.community.commom.constant.Constant;
@@ -509,18 +510,48 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
509 510
             for (int j = 3; j <= lastRowNum; j++) {
510 511
                 Row row = sheet.getRow(j);
511 512
                 TpBuildingOwnerInfo tpBuildingOwnerInfo = new TpBuildingOwnerInfo();
512
-                String building = row.getCell(0).getStringCellValue();
513
-                String unit = row.getCell(1).getStringCellValue();
514
-                String level = row.getCell(2).getStringCellValue();
515
-                String roomNo = row.getCell(3).getStringCellValue();
516
-                String ownerName = row.getCell(4).getStringCellValue();
517
-                String ownerTel = row.getCell(5).getStringCellValue();
513
+                String phase = row.getCell(0).getStringCellValue().trim();
514
+                String building = row.getCell(1).getStringCellValue().trim();
515
+                String unit = row.getCell(2).getStringCellValue().trim();
516
+                String level = row.getCell(3).getStringCellValue().trim();
517
+                String roomNo = row.getCell(4).getStringCellValue().trim();
518
+                String ownerName = row.getCell(5).getStringCellValue().trim();
519
+                String ownerTel = row.getCell(6).getStringCellValue().trim();
520
+                int currentRow = j+1;
521
+                if (StringUtils.isEmpty(phase)){
522
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
523
+                    return responseBean;
524
+                }
525
+                if (StringUtils.isEmpty(building)){
526
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
527
+                    return responseBean;
528
+                }
529
+                if (StringUtils.isEmpty(unit)){
530
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
531
+                    return responseBean;
532
+                }
533
+                if (StringUtils.isEmpty(level)){
534
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
535
+                    return responseBean;
536
+                }
537
+                if (StringUtils.isEmpty(roomNo)){
538
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
539
+                    return responseBean;
540
+                }
541
+                if (StringUtils.isEmpty(ownerName)){
542
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
543
+                    return responseBean;
544
+                }
545
+                if (StringUtils.isEmpty(ownerTel)){
546
+                    responseBean.addError("第" + currentRow + "行" + "期/区不能为空!");
547
+                    return responseBean;
548
+                }
518 549
                 //校验手机号码
519 550
                 if (!AccountValidatorUtil.isPhone(ownerTel)){
520 551
                     responseBean.addError("请输入正确手机号:" + ownerTel);
521 552
                     return responseBean;
522 553
                 }
523
-                String buildingInfo = building + unit + level + roomNo;
554
+                String buildingInfo = phase + building + unit + level + roomNo;
524 555
                 if (temBuildingList.contains(buildingInfo)){
525 556
                     logger.info("存在重复房源:{}",buildingInfo);
526 557
                     responseBean.addError("存在重复房源:"+ buildingInfo);
@@ -535,6 +566,7 @@ public class BuildingOwnerInfoServiceImpl extends ServiceImpl<TpBuildingOwnerInf
535 566
                 temBuildingList.add(buildingInfo);
536 567
                 temTelList.add(ownerTel);
537 568
                 //构建数据
569
+                tpBuildingOwnerInfo.setPhase(phase);
538 570
                 tpBuildingOwnerInfo.setBuilding(building);
539 571
                 tpBuildingOwnerInfo.setUnit(unit);
540 572
                 tpBuildingOwnerInfo.setLevel(level);

+ 2
- 2
CODE/smart-community/property-api/src/main/resources/mapper/TpBuildingOwnerInfoMapper.xml Zobrazit soubor

@@ -35,11 +35,11 @@
35 35
     </select>
36 36
 
37 37
     <insert id="batchInsert" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.ArrayList">
38
-        insert into tp_building_owner_info(community_id,id_card, building,unit, `level`,
38
+        insert into tp_building_owner_info(community_id,id_card, phase, building,unit, `level`,
39 39
         room_no,owner_name,owner_tel,gender,pair_status,verify_status,create_user,create_date,update_user,update_date)
40 40
         VALUES
41 41
         <foreach collection="list" item="item" index="index" separator=",">
42
-            (#{item.communityId},#{item.idCard},#{item.building},#{item.unit}, #{item.level},#{item.roomNo},#{item.ownerName},
42
+            (#{item.communityId},#{item.idCard},#{item.phase},#{item.building},#{item.unit}, #{item.level},#{item.roomNo},#{item.ownerName},
43 43
             #{item.ownerTel},#{item.gender},#{item.pairStatus},#{item.verifyStatus},#{item.createUser},#{item.createDate},#{item.updateUser},#{item.updateDate})
44 44
         </foreach>
45 45
     </insert>

+ 3
- 0
VUECODE/smart-property-manage/src/views/building/batch/batchImport.vue Zobrazit soubor

@@ -12,6 +12,9 @@
12 12
       </el-form-item>
13 13
     </el-form>
14 14
     <el-table ref="multipleTable" :data="list" border tooltip-effect="dark" style="width: 100%; margin-top: 20px;">
15
+      <el-table-column label="期/区" align="center">
16
+        <template slot-scope="scope">{{ scope.row.phase }}</template>
17
+      </el-table-column>
15 18
       <el-table-column label="栋" align="center">
16 19
         <template slot-scope="scope">{{ scope.row.building }}</template>
17 20
       </el-table-column>

+ 213
- 201
文档/MYSQL/smartCommunity.pdb
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 213
- 201
文档/MYSQL/smartCommunity.pdm
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor