Bläddra i källkod

工程材质加工程步骤选项、小区导入模版增加户主信息、小区与房间手动修改增加操作

wang_xy 1 år sedan
förälder
incheckning
36ff1592fd

+ 4 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/ZArea.java

@@ -62,6 +62,10 @@ public class ZArea extends BaseEntity {
      */
     private String remark;
     /**
+     * 管理所
+     */
+    private String administrative;
+    /**
      * 删除标识
      */
     @TableLogic

+ 2 - 1
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/ZEnginMaterialQuality.java

@@ -23,7 +23,7 @@ public class ZEnginMaterialQuality extends BaseEntity {
     private static final long serialVersionUID=1L;
 
     /**
-     * 
+     *
      */
     @TableId(value = "id")
     private String id;
@@ -42,5 +42,6 @@ public class ZEnginMaterialQuality extends BaseEntity {
     private String delFlag;
     private String enginSort;
     private String enginNode;
+    private String enginStep;
 
 }

+ 18 - 5
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/ZHouse.java

@@ -23,28 +23,41 @@ public class ZHouse extends BaseEntity {
     private static final long serialVersionUID=1L;
 
     /**
-     * 
+     *
      */
     @TableId(value = "id")
     private String id;
     /**
-     * 
+     *
      */
     private String areaId;
     /**
-     * 
+     *
      */
     private String buildingId;
     private String source;
     /**
-     * 
+     *
      */
     private String unitId;
     /**
-     * 
+     *
      */
     private String name;
     /**
+     *
+     */
+    private String houseUserName;
+    /**
+     *
+     */
+    private String idCard;
+    /**
+     *
+     */
+    private String photo;
+    private String newPhoto;
+    /**
      * 备注
      */
     private String remark;

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/bo/ZAreaBo.java

@@ -80,6 +80,7 @@ public class ZAreaBo extends BaseEntity {
      */
 //    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
     private String remark;
+    private String administrative;
 
 
 }

+ 2 - 1
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/bo/ZEnginMaterialQualityBo.java

@@ -22,7 +22,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
 public class ZEnginMaterialQualityBo extends BaseEntity {
 
     /**
-     * 
+     *
      */
     @NotBlank(message = "不能为空", groups = { EditGroup.class })
     private String id;
@@ -34,6 +34,7 @@ public class ZEnginMaterialQualityBo extends BaseEntity {
     private String enginType;
     private String enginSort;
     private String enginNode;
+    private String enginStep;
 
     /**
      * 材质名称

+ 4 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/bo/ZHouseBo.java

@@ -60,6 +60,10 @@ public class ZHouseBo extends BaseEntity {
      */
 //    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
     private String remark;
+    private String houseUserName;//户主姓名
+    private String idCard;//身份证
+    private String photo;//手机号
+    private String newPhoto;//现主人电话
 
 
 }

+ 10 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/GImportVo.java

@@ -30,5 +30,15 @@ public class GImportVo implements Serializable {
     private String unitName;
     @ExcelProperty(value = "房屋")
     private String houseName;
+    @ExcelProperty(value = "户主姓名")
+    private String houseUserName;
+    @ExcelProperty(value = "身份证号")
+    private String idCard;
+    @ExcelProperty(value = "手机号")
+    private String photo;
+    @ExcelProperty(value = "管理所")
+    private String administrative;
+    @ExcelProperty(value = "来源(请填写“现场规模”或“一体化平台”)")
+    private String source;
 
 }

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZAreaVo.java

@@ -46,6 +46,7 @@ public class ZAreaVo implements Serializable {
     private String releaseIs;
     private String source;
     private String renovationColumn;
+    private String administrative;
 
     /**
      * 释放人

+ 2 - 1
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZEnginMaterialQualityVo.java

@@ -22,7 +22,7 @@ public class ZEnginMaterialQualityVo implements Serializable {
     private static final long serialVersionUID = 1L;
 
     /**
-     * 
+     *
      */
 //    @ExcelProperty(value = "")
     private String id;
@@ -44,5 +44,6 @@ public class ZEnginMaterialQualityVo implements Serializable {
     private String specificationsName;
     private String enginSort;
     private String enginNode;
+    private String enginStep;
 
 }

+ 8 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/domain/vo/ZHouseVo.java

@@ -63,4 +63,12 @@ public class ZHouseVo implements Serializable {
 
     @ExcelProperty(value = "单元")
     private String unitName;
+    @ExcelProperty(value = "户主姓名")
+    private String houseUserName;//户主姓名
+    @ExcelProperty(value = "身份证")
+    private String idCard;//身份证
+    @ExcelProperty(value = "手机号")
+    private String photo;//手机号
+    @ExcelProperty(value = "现主人电话")
+    private String newPhoto;//现主人电话
 }

+ 29 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZAreaServiceImpl.java

@@ -81,9 +81,13 @@ public class ZAreaServiceImpl implements IZAreaService {
         for (int i = n; i < list.size(); i++) {
             GImportVo vo = list.get(i);
             String districtValue = sysDictDataMapper.queryValueTextByKey("district", vo.getDistrict());
+            String sourceValue = sysDictDataMapper.queryValueTextByKey("community_source", vo.getSource());
             if (StringUtils.isBlank(districtValue)) {
                 throw new ServiceException("" + "第" + (n + 1) + "行行政区填写错误,导入失败!");
             }
+            if (StringUtils.isBlank(sourceValue)) {
+                throw new ServiceException("" + "第" + (n + 1) + "行来源填写错误,导入失败!");
+            }
             try {
                 n++;
                 // 验证是否存在这个小区
@@ -103,6 +107,9 @@ public class ZAreaServiceImpl implements IZAreaService {
                         area.setCreateBy(operName);
                         area.setCreateTime(new Date());
                         area.setDistrict(districtValue);
+                        area.setSource(sourceValue);
+                        area.setAdministrative(vo.getAdministrative());
+                        area.setRenovationColumn("Y");
                         baseMapper.insert(area);
                         if (StringUtils.isNotEmpty(vo.getBuildName())) {
                             //楼宇
@@ -110,6 +117,7 @@ public class ZAreaServiceImpl implements IZAreaService {
                             building.setAreaId(area.getId());
                             building.setCreateBy(operName);
                             building.setCreateTime(new Date());
+                            building.setSource(sourceValue);
                             zBuildingMapper.insert(building);
                             if (StringUtils.isNotEmpty(vo.getUnitName())) {
                                 //单元
@@ -118,6 +126,7 @@ public class ZAreaServiceImpl implements IZAreaService {
                                 unit.setAreaId(area.getId());
                                 unit.setCreateBy(operName);
                                 unit.setCreateTime(new Date());
+                                unit.setSource(sourceValue);
                                 zUnitMapper.insert(unit);
                                 if (StringUtils.isNotEmpty(vo.getHouseName())) {
                                     //房屋
@@ -127,6 +136,10 @@ public class ZAreaServiceImpl implements IZAreaService {
                                     house.setUnitId(unit.getId());
                                     house.setCreateBy(operName);
                                     house.setCreateTime(new Date());
+                                    house.setSource(sourceValue);
+                                    house.setHouseUserName(vo.getHouseUserName());
+                                    house.setIdCard(vo.getIdCard());
+                                    house.setPhoto(vo.getPhoto());
                                     zHouseMapper.insert(house);
                                     successNum++;
                                 } else {
@@ -148,6 +161,7 @@ public class ZAreaServiceImpl implements IZAreaService {
                                 building.setAreaId(area.getId());
                                 building.setCreateBy(operName);
                                 building.setCreateTime(new Date());
+                                building.setSource(sourceValue);
                                 zBuildingMapper.insert(building);
                                 if (StringUtils.isNotEmpty(vo.getUnitName())) {
                                     //单元
@@ -156,6 +170,7 @@ public class ZAreaServiceImpl implements IZAreaService {
                                     unit.setBuildingId(building.getId());
                                     unit.setCreateBy(operName);
                                     unit.setCreateTime(new Date());
+                                    unit.setSource(sourceValue);
                                     zUnitMapper.insert(unit);
                                     if (StringUtils.isNotEmpty(vo.getHouseName())) {
                                         //房屋
@@ -165,6 +180,10 @@ public class ZAreaServiceImpl implements IZAreaService {
                                         house.setUnitId(unit.getId());
                                         house.setCreateBy(operName);
                                         house.setCreateTime(new Date());
+                                        house.setSource(sourceValue);
+                                        house.setHouseUserName(vo.getHouseUserName());
+                                        house.setIdCard(vo.getIdCard());
+                                        house.setPhoto(vo.getPhoto());
                                         zHouseMapper.insert(house);
                                         successNum++;
                                     } else {
@@ -184,6 +203,7 @@ public class ZAreaServiceImpl implements IZAreaService {
                                         unit.setBuildingId(building.getId());
                                         unit.setCreateBy(operName);
                                         unit.setCreateTime(new Date());
+                                        unit.setSource(sourceValue);
                                         zUnitMapper.insert(unit);
                                         if (StringUtils.isNotEmpty(vo.getHouseName())) {
                                             //房屋
@@ -193,6 +213,10 @@ public class ZAreaServiceImpl implements IZAreaService {
                                             house.setUnitId(unit.getId());
                                             house.setCreateBy(operName);
                                             house.setCreateTime(new Date());
+                                            house.setSource(sourceValue);
+                                            house.setHouseUserName(vo.getHouseUserName());
+                                            house.setIdCard(vo.getIdCard());
+                                            house.setPhoto(vo.getPhoto());
                                             zHouseMapper.insert(house);
                                             successNum++;
                                         } else {
@@ -210,6 +234,10 @@ public class ZAreaServiceImpl implements IZAreaService {
                                                 house.setUnitId(unit.getId());
                                                 house.setCreateBy(operName);
                                                 house.setCreateTime(new Date());
+                                                house.setSource(sourceValue);
+                                                house.setHouseUserName(vo.getHouseUserName());
+                                                house.setIdCard(vo.getIdCard());
+                                                house.setPhoto(vo.getPhoto());
                                                 zHouseMapper.insert(house);
                                                 successNum++;
                                             }
@@ -292,6 +320,7 @@ public class ZAreaServiceImpl implements IZAreaService {
         lqw.eq(StringUtils.isNotBlank(bo.getDistrict()), ZArea::getDistrict, bo.getDistrict());
         lqw.eq(StringUtils.isNotBlank(bo.getCalculateDistrict()), ZArea::getCalculateDistrict, bo.getCalculateDistrict());
         lqw.eq(StringUtils.isNotBlank(bo.getBelongingPack()), ZArea::getBelongingPack, bo.getBelongingPack());
+        lqw.like(StringUtils.isNotBlank(bo.getAdministrative()), ZArea::getAdministrative, bo.getAdministrative());
         return lqw;
     }
 

+ 1 - 0
ruoyi-zdsz/src/main/java/com/ruoyi/zdsz/service/impl/ZEnginMaterialQualityServiceImpl.java

@@ -93,6 +93,7 @@ public class ZEnginMaterialQualityServiceImpl implements IZEnginMaterialQualityS
         lqw.like(StringUtils.isNotBlank(bo.getName()), ZEnginMaterialQuality::getName, bo.getName());
         lqw.eq(StringUtils.isNotBlank(bo.getEnginSort()), ZEnginMaterialQuality::getEnginSort, bo.getEnginSort());
         lqw.eq(StringUtils.isNotBlank(bo.getEnginNode()), ZEnginMaterialQuality::getEnginNode, bo.getEnginNode());
+        lqw.eq(StringUtils.isNotBlank(bo.getEnginStep()), ZEnginMaterialQuality::getEnginStep, bo.getEnginStep());
         return lqw;
     }
 

+ 3 - 0
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZEnginMaterialQualityMapper.xml

@@ -29,6 +29,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="enginNode != null and enginNode != ''">
                 and zc.engin_node = #{enginNode}
             </if>
+            <if test="enginStep != null and enginStep != ''">
+                and zc.engin_step = #{enginStep}
+            </if>
         </where>
         order by zc.create_time desc
     </select>

+ 17 - 1
ruoyi-zdsz/src/main/resources/mapper/zdsz/ZHouseMapper.xml

@@ -34,7 +34,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         a.source,
         (select b.name from z_area b where b.id = a.area_id) as areaName,
         (select c.name from z_building c where c.id = a.building_id) as buildingName,
-        (select d.name from z_unit d where d.id = a.unit_id) as unitName
+        (select d.name from z_unit d where d.id = a.unit_id) as unitName,
+        a.house_user_name as houseUserName,
+        a.id_card as idCard,
+        a.photo,
+        a.new_photo as newPhoto
         from z_house a
         <where>
             a.del_flag = '0'
@@ -50,6 +54,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="p.unitId != null  and p.unitId != ''">
                 and a.unit_id = #{p.unitId}
             </if>
+            <if test="p.houseUserName != null  and p.houseUserName != ''">
+                and a.house_user_name LIKE CONCAT('%',#{p.houseUserName},'%')
+            </if>
+            <if test="p.idCard != null  and p.idCard != ''">
+                and a.id_card LIKE CONCAT('%',#{p.idCard},'%')
+            </if>
+            <if test="p.photo != null  and p.photo != ''">
+                and a.photo LIKE CONCAT('%',#{p.photo},'%')
+            </if>
+            <if test="p.newPhoto != null  and p.newPhoto != ''">
+                and a.new_photo LIKE CONCAT('%',#{p.newPhoto},'%')
+            </if>
         </where>
         order by a.create_time desc
     </select>