tjf преди 2 седмици
родител
ревизия
850df9e3b0

+ 1 - 1
ruoyi-admin/pom.xml

@@ -9,7 +9,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>jar</packaging>
-    <artifactId>ruoyi-admin</artifactId>
+    <artifactId>wuye</artifactId>
 
     <description>
         web服务入口

+ 3 - 3
ruoyi-admin/src/main/resources/application-prod.yml

@@ -4,7 +4,7 @@ boman:
   profile: /home/ruoyi/uploadPath/wuye
   passwordDeft: 1qaz!QAZ
 --- # 临时文件存储位置 避免临时文件被系统清理报错
-spring.servlet.multipart.location: /ruoyi/server/temp
+spring.servlet.multipart.location: /home/ruoyi/uploadPath/temp
 
 --- # 监控中心配置
 spring.boot.admin.client:
@@ -59,7 +59,7 @@ spring:
           # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
           url: jdbc:mysql://127.0.0.1:3306/wuye_guanli_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
           username: root
-          password: zhaoshang@2018
+          password: c6mwuJMX*c
 #        # 从库数据源
 #        slave:
 #          lazy: true
@@ -110,7 +110,7 @@ spring.data:
     # 端口,默认为6379
     port: 6379
     # 数据库索引
-    database: 10
+    database: 1
     # redis 密码必须配置
     password: D3fQYAsw
     # 连接超时时间

+ 4 - 2
ruoyi-admin/src/main/resources/application.yml

@@ -1,7 +1,7 @@
 # 开发环境配置
 server:
   # 服务器的HTTP端口,默认为8080
-  port: 8077
+  port: 8056
   servlet:
     # 应用的访问路径
     context-path: /
@@ -63,7 +63,9 @@ spring:
     # 国际化资源文件路径
     basename: i18n/messages
   profiles:
-    active: @profiles.active@
+#    active: @profiles.active@
+#    active: prod
+    active: dev
   # 文件上传
   servlet:
     multipart:

+ 5 - 1
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/domain/houseInfo/HouseInfoRedident.java

@@ -46,7 +46,11 @@ public class HouseInfoRedident extends TenantEntity {
     /**
      * 房屋面积,单位为平方米
      */
-    private Long area;
+    private String area;
+    /**
+     * 房屋类型 普通住宅,洋房
+     */
+    private String houseType;
 
     /**
      * 房屋相关的字第号

+ 6 - 1
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/domain/houseInfo/bo/HouseInfoRedidentBo.java

@@ -33,6 +33,11 @@ public class HouseInfoRedidentBo extends BaseEntity {
      */
     private String ownerName;
 
+    /**
+     * 房屋类型 普通住宅,洋房
+     */
+    private String houseType;
+
     /**
      * 房屋坐落位置
      */
@@ -46,7 +51,7 @@ public class HouseInfoRedidentBo extends BaseEntity {
     /**
      * 房屋面积,单位为平方米
      */
-    private Long area;
+    private String area;
 
     /**
      * 房屋相关的字第号

+ 5 - 1
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/domain/houseInfo/vo/HouseInfoRedidentVo.java

@@ -54,8 +54,12 @@ public class HouseInfoRedidentVo implements Serializable {
      * 房屋面积,单位为平方米
      */
     @ExcelProperty(value = "房屋面积,单位为平方米")
-    private Long area;
+    private String area;
 
+    /**
+     * 房屋类型 普通住宅,洋房
+     */
+    private String houseType;
     /**
      * 房屋相关的字第号
      */

+ 1 - 1
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/domain/residentInfo/vo/ResidentInfoVo.java

@@ -163,7 +163,7 @@ public class ResidentInfoVo implements Serializable {
     private String remark;
 
     /**
-     * 审核状态 1:未审核 2:审核通过 3:审核未通过
+     * 审核状态 1:未审核 2:审核通过 3:审核未通过 4:未激活(户主添加的家庭成员,未进行账号注册)
      */
     private String examine;
 

+ 2 - 1
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/service/impl/HouseInfoRedidentServiceImpl.java

@@ -75,7 +75,8 @@ public class HouseInfoRedidentServiceImpl implements IHouseInfoRedidentService {
         lqw.like(StringUtils.isNotBlank(bo.getOwnerName()), HouseInfoRedident::getOwnerName, bo.getOwnerName());
         lqw.eq(StringUtils.isNotBlank(bo.getLocation()), HouseInfoRedident::getLocation, bo.getLocation());
         lqw.eq(StringUtils.isNotBlank(bo.getRightType()), HouseInfoRedident::getRightType, bo.getRightType());
-        lqw.eq(bo.getArea() != null, HouseInfoRedident::getArea, bo.getArea());
+        lqw.eq(StringUtils.isNotBlank(bo.getArea()), HouseInfoRedident::getArea, bo.getArea());
+        lqw.eq(StringUtils.isNotBlank(bo.getHouseType()), HouseInfoRedident::getHouseType, bo.getHouseType());
         lqw.eq(StringUtils.isNotBlank(bo.getDocumentNumber()), HouseInfoRedident::getDocumentNumber, bo.getDocumentNumber());
         lqw.eq(StringUtils.isNotBlank(bo.getPropertyUnitNumber()), HouseInfoRedident::getPropertyUnitNumber, bo.getPropertyUnitNumber());
         lqw.eq(StringUtils.isNotBlank(bo.getCoOwnership()), HouseInfoRedident::getCoOwnership, bo.getCoOwnership());

+ 2 - 2
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/service/impl/PropertyRepairServiceImpl.java

@@ -151,14 +151,14 @@ public class PropertyRepairServiceImpl implements IPropertyRepairService {
         String repairStatus = update.getRepairStatus();
 
         if (FOR.equals(repairStatus)) {
-            Long staffUserId = update.getStaffUserId();
+            //Long staffUserId = update.getStaffUserId();
             //判断如果维修完成,把维修人员的状态改成空闲
             StaffManage staffManage = new StaffManage();
             staffManage.setStaffId(update.getStaffId());
             staffManage.setStatus(ONE);
             staffManageMapper.updateById(staffManage);
             //修改维修人员待维系的数量
-            String key = PROPERTY_REPAIR_STAFF_NO + staffUserId;
+            String key = PROPERTY_REPAIR_STAFF_NO + userId;
             if (RedisUtils.hasKey(key)) {
                 Object count = RedisUtils.getCacheObject(key);
                 RedisUtils.setCacheObject(key, Math.max(Integer.parseInt(count.toString()) - 1, 0));

+ 35 - 34
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/service/impl/ResidentInfoServiceImpl.java

@@ -219,15 +219,17 @@ public class ResidentInfoServiceImpl implements IResidentInfoService {
                     .eq(StringUtils.isNotBlank(residentPhone), ResidentInfo::getResidentPhone, residentPhone));
             });
             if (residentInfoVo.getExamine().equals(FOR)) {
-                //待认证的居住人员数量,统计使用
-                if (RedisUtils.hasKey(RESIDENT_INFO_AUTHENTICATION)) {
-                    Object count = RedisUtils.getCacheObject(RESIDENT_INFO_AUTHENTICATION);
-                    RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
-                } else {
-                    RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, 1);
-                }
-                add.setExamine(ONE);
-                return baseMapper.updateById(add) > 0;
+                TenantHelper.ignore(() -> {
+                    //待认证的居住人员数量,统计使用
+                    if (RedisUtils.hasKey(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION)) {
+                        Object count = RedisUtils.getCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION);
+                        RedisUtils.setCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
+                    } else {
+                        RedisUtils.setCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION, 1);
+                    }
+                    add.setExamine(ONE);
+                    return baseMapper.updateById(add) > 0;
+                });
             } else {
                 throw new UserException("resident.register.save.error", add.getResidentName());
             }
@@ -292,13 +294,15 @@ public class ResidentInfoServiceImpl implements IResidentInfoService {
                 userService.updateUserByIdNoTenantId(user);
             }
         }
-        //待认证的居住人员数量,统计使用
-        if (RedisUtils.hasKey(RESIDENT_INFO_AUTHENTICATION)) {
-            Object count = RedisUtils.getCacheObject(RESIDENT_INFO_AUTHENTICATION);
-            RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
-        } else {
-            RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, 1);
-        }
+        TenantHelper.ignore(() -> {
+            //待认证的居住人员数量,统计使用
+            if (RedisUtils.hasKey(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION)) {
+                Object count = RedisUtils.getCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION);
+                RedisUtils.setCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
+            } else {
+                RedisUtils.setCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION, 1);
+            }
+        });
 
         boolean flag = baseMapper.insert(add) > 0;
         if (flag) {
@@ -479,15 +483,18 @@ public class ResidentInfoServiceImpl implements IResidentInfoService {
             throw new UserException("resident.register.save.error", update.getResidentName());
         }*/
         String examine = update.getExamine();
+        String tenantId = update.getTenantId();
         //未通过的修改变成带审核
         if (THR.equals(examine)) {
-            //待认证的居住人员数量,统计使用
-            if (RedisUtils.hasKey(RESIDENT_INFO_AUTHENTICATION)) {
-                Object count = RedisUtils.getCacheObject(RESIDENT_INFO_AUTHENTICATION);
-                RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
-            } else {
-                RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, 1);
-            }
+            TenantHelper.ignore(() -> {
+                //待认证的居住人员数量,统计使用
+                if (RedisUtils.hasKey(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION)) {
+                    Object count = RedisUtils.getCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION);
+                    RedisUtils.setCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
+                } else {
+                    RedisUtils.setCacheObject(tenantId + ":" +RESIDENT_INFO_AUTHENTICATION, 1);
+                }
+            });
         }
         if (!examine.equals(FOR)) {
             update.setExamine(ONE);
@@ -650,17 +657,11 @@ public class ResidentInfoServiceImpl implements IResidentInfoService {
                     });
                 }
             }
-            //居住人员待认证数量-1
-            if (RedisUtils.hasKey(RESIDENT_INFO_AUTHENTICATION)) {
-                Object count = RedisUtils.getCacheObject(RESIDENT_INFO_AUTHENTICATION);
-                RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
-            }
-        } else if (THR.equals(residentInfo.getExamine())) {
-            //居住人员待认证数量-1
-            if (RedisUtils.hasKey(RESIDENT_INFO_AUTHENTICATION)) {
-                Object count = RedisUtils.getCacheObject(RESIDENT_INFO_AUTHENTICATION);
-                RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
-            }
+        }
+        //居住人员待认证数量-1
+        if (RedisUtils.hasKey(RESIDENT_INFO_AUTHENTICATION)) {
+            Object count = RedisUtils.getCacheObject(RESIDENT_INFO_AUTHENTICATION);
+            RedisUtils.setCacheObject(RESIDENT_INFO_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
         }
         return baseMapper.updateById(residentInfo) > 0;
     }

+ 33 - 23
ruoyi-modules/ruoyi-wuye/src/main/java/org/dromara/service/impl/StaffManageServiceImpl.java

@@ -166,19 +166,22 @@ public class StaffManageServiceImpl implements IStaffManageService {
     @Override
     public Boolean insertByBo(StaffManageBo bo) {
         StaffManage add = MapstructUtils.convert(bo, StaffManage.class);
+        String tenantId = bo.getTenantId();
         boolean flag = checkPhoneNumberUnique(add);
         if (!flag) {
             throw new UserException("staff.manage.error");
         } else if (flag) {
             validEntityBeforeSave(add);
             flag = baseMapper.insert(add) > 0;
-            //待认证的员工人员数量,统计使用
-            if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
-                Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
-                RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
-            } else {
-                RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, 1);
-            }
+            TenantHelper.ignore(() -> {
+                //待认证的员工人员数量,统计使用
+                if (RedisUtils.hasKey(tenantId + ":" + STAFF_MANAGE_AUTHENTICATION)) {
+                    Object count = RedisUtils.getCacheObject(tenantId + ":" +STAFF_MANAGE_AUTHENTICATION);
+                    RedisUtils.setCacheObject(tenantId + ":" +STAFF_MANAGE_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
+                } else {
+                    RedisUtils.setCacheObject(tenantId + ":" +STAFF_MANAGE_AUTHENTICATION, 1);
+                }
+            });
 /*
             SysUserBo sysUser = new SysUserBo();
             sysUser.setUserId(bo.getUserId());
@@ -313,12 +316,26 @@ public class StaffManageServiceImpl implements IStaffManageService {
     @Override
     public Boolean updateByBo(StaffManageBo bo) {
         StaffManage update = MapstructUtils.convert(bo, StaffManage.class);
-        if (THR.equals(update.getExamine())) {
+/*        if (THR.equals(update.getExamine())) {
             //员工待认证数量-1
             if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
                 Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
-                RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
+                RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString()) - 1, 0));
             }
+        }*/
+        //员工审核未通过的时候走修改就待认证的员工人员数量+1
+        String tenantId = bo.getTenantId();
+        String examine = update.getExamine();
+        if (THR.equals(examine)) {
+            TenantHelper.ignore(() -> {
+                //待认证的员工人员数量,统计使用
+                if (RedisUtils.hasKey(tenantId + ":" + STAFF_MANAGE_AUTHENTICATION)) {
+                    Object count = RedisUtils.getCacheObject(tenantId + ":" +STAFF_MANAGE_AUTHENTICATION);
+                    RedisUtils.setCacheObject(tenantId + ":" +STAFF_MANAGE_AUTHENTICATION, Integer.parseInt(count.toString()) + 1);
+                } else {
+                    RedisUtils.setCacheObject(tenantId + ":" +STAFF_MANAGE_AUTHENTICATION, 1);
+                }
+            });
         }
         update.setExamine(ONE);
         if (bo.getIsFilter()) {
@@ -399,7 +416,7 @@ public class StaffManageServiceImpl implements IStaffManageService {
         //员工待认证数量-1
         if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
             Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
-            RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
+            RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString()) - 1, 0));
         }
         return TenantHelper.ignore(() -> {
             return baseMapper.deleteByIds(ids) > 0;
@@ -478,18 +495,11 @@ public class StaffManageServiceImpl implements IStaffManageService {
                     RedisUtils.deleteObject(key);
                 }
             }*/
-
-            //员工待认证数量-1
-            if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
-                Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
-                RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
-            }
-        } else if (THR.equals(examine)) {
-            //员工待认证数量-1
-            if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
-                Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
-                RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
-            }
+        }
+        //员工待认证数量-1
+        if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
+            Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
+            RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString()) - 1, 0));
         }
         return baseMapper.updateById(examineStaffManage) > 0;
     }
@@ -587,7 +597,7 @@ public class StaffManageServiceImpl implements IStaffManageService {
                 //员工待认证数量-1
                 if (RedisUtils.hasKey(STAFF_MANAGE_AUTHENTICATION)) {
                     Object count = RedisUtils.getCacheObject(STAFF_MANAGE_AUTHENTICATION);
-                    RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString())-1, 0));
+                    RedisUtils.setCacheObject(STAFF_MANAGE_AUTHENTICATION, Math.max(Integer.parseInt(count.toString()) - 1, 0));
                 }
             }
         } else {

+ 3 - 1
ruoyi-modules/ruoyi-wuye/src/main/resources/mapper/wuYe/PropertyRepairMapper.xml

@@ -34,7 +34,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
     <select id="selectPropertyRepairListByTime" parameterType="org.dromara.domain.propertyRepair.PropertyRepair" resultMap="PropertyRepairResult">
         <include refid="selectPropertyRepairVo"/>
-        where date_format(repair_time,'%Y%m%d') &gt;= date_format(#{starTime},'%Y%m%d')
+        where
+        del_flag = '0' and
+        date_format(repair_time,'%Y%m%d') &gt;= date_format(#{starTime},'%Y%m%d')
         AND date_format(repair_time,'%Y%m%d') &lt;= date_format(#{endTime},'%Y%m%d')
     </select>
 </mapper>