Bläddra i källkod

物业端代码

傅行帆 4 år sedan
förälder
incheckning
781ba1997b
100 ändrade filer med 6119 tillägg och 0 borttagningar
  1. 90
    0
      src/main/java/com/huiju/estateagents/property/aop/LogAOP.java
  2. 249
    0
      src/main/java/com/huiju/estateagents/property/common/Constant.java
  3. 95
    0
      src/main/java/com/huiju/estateagents/property/common/UserElement.java
  4. 90
    0
      src/main/java/com/huiju/estateagents/property/common/base/BaseController.java
  5. 69
    0
      src/main/java/com/huiju/estateagents/property/common/base/QRCode.java
  6. 29
    0
      src/main/java/com/huiju/estateagents/property/common/base/messagePush.java
  7. 50
    0
      src/main/java/com/huiju/estateagents/property/common/code/cache/AppkeyCache.java
  8. 23
    0
      src/main/java/com/huiju/estateagents/property/common/code/entity/CodeEntity.java
  9. 11
    0
      src/main/java/com/huiju/estateagents/property/common/code/impl/ImgCodeImpl.java
  10. 26
    0
      src/main/java/com/huiju/estateagents/property/common/perproties/DaSuProperties.java
  11. 44
    0
      src/main/java/com/huiju/estateagents/property/common/perproties/FuShiProperties.java
  12. 26
    0
      src/main/java/com/huiju/estateagents/property/common/perproties/QRCodePerproties.java
  13. 82
    0
      src/main/java/com/huiju/estateagents/property/common/sign/DaSuSign.java
  14. 184
    0
      src/main/java/com/huiju/estateagents/property/controller/AnnouncementTelController.java
  15. 165
    0
      src/main/java/com/huiju/estateagents/property/controller/BillController.java
  16. 235
    0
      src/main/java/com/huiju/estateagents/property/controller/BillInvoiceController.java
  17. 51
    0
      src/main/java/com/huiju/estateagents/property/controller/BillOrderController.java
  18. 76
    0
      src/main/java/com/huiju/estateagents/property/controller/BillStatementController.java
  19. 330
    0
      src/main/java/com/huiju/estateagents/property/controller/BuildingOwnerInfoController.java
  20. 83
    0
      src/main/java/com/huiju/estateagents/property/controller/BuildingTreeController.java
  21. 138
    0
      src/main/java/com/huiju/estateagents/property/controller/CarouselSettingController.java
  22. 48
    0
      src/main/java/com/huiju/estateagents/property/controller/CommunitiesController.java
  23. 147
    0
      src/main/java/com/huiju/estateagents/property/controller/HotelController.java
  24. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/HotelRoomController.java
  25. 76
    0
      src/main/java/com/huiju/estateagents/property/controller/ImageController.java
  26. 48
    0
      src/main/java/com/huiju/estateagents/property/controller/IndexCountController.java
  27. 72
    0
      src/main/java/com/huiju/estateagents/property/controller/MessageController.java
  28. 107
    0
      src/main/java/com/huiju/estateagents/property/controller/RoleController.java
  29. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/SysUserRoleController.java
  30. 108
    0
      src/main/java/com/huiju/estateagents/property/controller/TaTemporaryLicenseCountController.java
  31. 108
    0
      src/main/java/com/huiju/estateagents/property/controller/TaUserLicenseCountController.java
  32. 87
    0
      src/main/java/com/huiju/estateagents/property/controller/TaUserLicenseOrderController.java
  33. 63
    0
      src/main/java/com/huiju/estateagents/property/controller/TaVisitorLicenseSettingController.java
  34. 81
    0
      src/main/java/com/huiju/estateagents/property/controller/TpAnnouncementController.java
  35. 108
    0
      src/main/java/com/huiju/estateagents/property/controller/TpBillInvoiceCountController.java
  36. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/TpConfigurationController.java
  37. 100
    0
      src/main/java/com/huiju/estateagents/property/controller/TpEquipmentController.java
  38. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/TpEquipmentTreeController.java
  39. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/TpHotelImgController.java
  40. 169
    0
      src/main/java/com/huiju/estateagents/property/controller/TpRentalHouseController.java
  41. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/TpRentalHouseImgController.java
  42. 163
    0
      src/main/java/com/huiju/estateagents/property/controller/TpShopController.java
  43. 20
    0
      src/main/java/com/huiju/estateagents/property/controller/TpShopImgController.java
  44. 49
    0
      src/main/java/com/huiju/estateagents/property/controller/TpShopSettingController.java
  45. 157
    0
      src/main/java/com/huiju/estateagents/property/controller/TpShopTypeController.java
  46. 112
    0
      src/main/java/com/huiju/estateagents/property/controller/TpTicketController.java
  47. 152
    0
      src/main/java/com/huiju/estateagents/property/controller/TransactionController.java
  48. 196
    0
      src/main/java/com/huiju/estateagents/property/controller/UserController.java
  49. 176
    0
      src/main/java/com/huiju/estateagents/property/controller/UserVerifyController.java
  50. 29
    0
      src/main/java/com/huiju/estateagents/property/dao/AnnouncementTelMapper.java
  51. 48
    0
      src/main/java/com/huiju/estateagents/property/dao/BillInvoiceMapper.java
  52. 23
    0
      src/main/java/com/huiju/estateagents/property/dao/BillMapper.java
  53. 24
    0
      src/main/java/com/huiju/estateagents/property/dao/BillStatementMapper.java
  54. 24
    0
      src/main/java/com/huiju/estateagents/property/dao/HotelMapper.java
  55. 32
    0
      src/main/java/com/huiju/estateagents/property/dao/HotelRoomMapper.java
  56. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/HotelSettingMapper.java
  57. 43
    0
      src/main/java/com/huiju/estateagents/property/dao/IndexCountMapper.java
  58. 64
    0
      src/main/java/com/huiju/estateagents/property/dao/MessageMapper.java
  59. 24
    0
      src/main/java/com/huiju/estateagents/property/dao/RoleMapper.java
  60. 21
    0
      src/main/java/com/huiju/estateagents/property/dao/SysRoleMenuMapper.java
  61. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/SysUserRoleMapper.java
  62. 23
    0
      src/main/java/com/huiju/estateagents/property/dao/TaFaceMapper.java
  63. 27
    0
      src/main/java/com/huiju/estateagents/property/dao/TaSysMenuMapper.java
  64. 23
    0
      src/main/java/com/huiju/estateagents/property/dao/TaSysRoleMapper.java
  65. 29
    0
      src/main/java/com/huiju/estateagents/property/dao/TaSysUserRoleMapper.java
  66. 22
    0
      src/main/java/com/huiju/estateagents/property/dao/TaTemporaryLicenseCountMapper.java
  67. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TaUserLicenseCountMapper.java
  68. 46
    0
      src/main/java/com/huiju/estateagents/property/dao/TaUserLicenseOrderMapper.java
  69. 103
    0
      src/main/java/com/huiju/estateagents/property/dao/TaUserVerifyMapper.java
  70. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TaVisitorLicenseSettingMapper.java
  71. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TdImagesMapper.java
  72. 29
    0
      src/main/java/com/huiju/estateagents/property/dao/ToCommunitiesMapper.java
  73. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpActivityMapper.java
  74. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpActivitySignInMapper.java
  75. 24
    0
      src/main/java/com/huiju/estateagents/property/dao/TpActivitySignUpMapper.java
  76. 36
    0
      src/main/java/com/huiju/estateagents/property/dao/TpAnnouncementMapper.java
  77. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpBillInvoiceCountMapper.java
  78. 59
    0
      src/main/java/com/huiju/estateagents/property/dao/TpBillOrderMapper.java
  79. 19
    0
      src/main/java/com/huiju/estateagents/property/dao/TpBuildingMapper.java
  80. 83
    0
      src/main/java/com/huiju/estateagents/property/dao/TpBuildingOwnerInfoMapper.java
  81. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpCarouselSettingMapper.java
  82. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpConfigurationMapper.java
  83. 63
    0
      src/main/java/com/huiju/estateagents/property/dao/TpEquipmentMapper.java
  84. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpEquipmentTreeMapper.java
  85. 21
    0
      src/main/java/com/huiju/estateagents/property/dao/TpHotelImgMapper.java
  86. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpLevelMapper.java
  87. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpPhaseMapper.java
  88. 21
    0
      src/main/java/com/huiju/estateagents/property/dao/TpRentalHouseImgMapper.java
  89. 29
    0
      src/main/java/com/huiju/estateagents/property/dao/TpRentalHouseMapper.java
  90. 63
    0
      src/main/java/com/huiju/estateagents/property/dao/TpRoomNoMapper.java
  91. 21
    0
      src/main/java/com/huiju/estateagents/property/dao/TpShopImgMapper.java
  92. 23
    0
      src/main/java/com/huiju/estateagents/property/dao/TpShopMapper.java
  93. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpShopSettingMapper.java
  94. 21
    0
      src/main/java/com/huiju/estateagents/property/dao/TpShopTypeMapper.java
  95. 34
    0
      src/main/java/com/huiju/estateagents/property/dao/TpSysRoleMapper.java
  96. 24
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTicketMapper.java
  97. 18
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordCommentMapper.java
  98. 28
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordMapper.java
  99. 33
    0
      src/main/java/com/huiju/estateagents/property/dao/TpTransactionMapper.java
  100. 0
    0
      src/main/java/com/huiju/estateagents/property/dao/TpUnitMapper.java

+ 90
- 0
src/main/java/com/huiju/estateagents/property/aop/LogAOP.java Visa fil

@@ -0,0 +1,90 @@
1
+package com.huiju.estateagents.property.aop;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.huiju.estateagents.property.log.LogAnnotation;
5
+import com.huiju.estateagents.property.log.LogEnums;
6
+import com.huiju.estateagents.property.log.LogFactory;
7
+import com.huiju.estateagents.property.log.LogFileManager;
8
+import lombok.extern.slf4j.Slf4j;
9
+import org.aspectj.lang.JoinPoint;
10
+import org.aspectj.lang.ProceedingJoinPoint;
11
+import org.aspectj.lang.Signature;
12
+import org.aspectj.lang.annotation.AfterThrowing;
13
+import org.aspectj.lang.annotation.Around;
14
+import org.aspectj.lang.annotation.Aspect;
15
+import org.aspectj.lang.annotation.Pointcut;
16
+import org.aspectj.lang.reflect.MethodSignature;
17
+import org.springframework.stereotype.Component;
18
+
19
+import java.lang.reflect.Method;
20
+
21
+@Aspect
22
+@Component
23
+@Slf4j
24
+public class LogAOP {
25
+
26
+    @Pointcut("@annotation(com.huiju.estateagents.property.log.LogAnnotation)")
27
+    public void pointLog() {
28
+
29
+    }
30
+
31
+    @Around("pointLog()")
32
+    public Object logAround(ProceedingJoinPoint point) throws Throwable {
33
+
34
+        // 获取切面的点的实例
35
+        Object target = point.getTarget();
36
+        // 获取反射对象
37
+        Class<?> zClass = target.getClass();
38
+        // 获取切面点
39
+        Signature signature = point.getSignature();
40
+
41
+        // 判断日志注解是否用在方法上
42
+        if (!(signature instanceof MethodSignature)) {
43
+            throw new RuntimeException("该注解只允许在方法上使用!");
44
+        }
45
+
46
+        // 方法名称
47
+        String methodName = signature.getName();
48
+        // 获取方法参数类型
49
+        Class<?>[] parameterTypes = ((MethodSignature) signature).getMethod().getParameterTypes();
50
+
51
+        // 通过方法名称和方法参数类型
52
+        // 获取当前正在执行切面的方法
53
+        Method method = zClass.getMethod(methodName, parameterTypes);
54
+
55
+        // 所有方法输入参数
56
+        Object[] args = point.getArgs();
57
+        // 执行方法的返回值
58
+        Object result = null;
59
+        if (null != method && method.isAnnotationPresent(LogAnnotation.class)) {
60
+
61
+            // 获取这个注解
62
+            LogAnnotation logAnnotation = method.getAnnotation(LogAnnotation.class);
63
+            // 大苏操作
64
+            if (logAnnotation.record() && logAnnotation.value() == LogEnums.DA_SU) {
65
+                String alias = "".equals(logAnnotation.alias()) ? "未设置别名" : logAnnotation.alias();
66
+                    log.info("AOP拦截----大苏操作----执行方法:{},方法别名:{}, 请求参数:{}", methodName, alias,args);
67
+                    // 方法返回值
68
+                    result = point.proceed();
69
+                    log.info("AOP拦截----大苏操作----执行方法:{},方法别名:{},请求参数:{},返回结果:{}", methodName, alias,args, result);
70
+
71
+                    String strPararmeter = String.format( "AOP拦截----大苏操作----执行方法:%s,方法别名:%s,请求参数:%s", methodName, alias, JSONObject.toJSONString(args));
72
+                    String strReturn = String.format("AOP拦截----大苏操作----执行方法:%s,方法别名:%s, 请求参数:%s,返回结果:%s", methodName, alias , JSONObject.toJSONString(args), JSONObject.toJSONString(result));
73
+
74
+                    LogFileManager.getInstance().executeLog(LogFactory.parametersAndReturn(strPararmeter, strReturn));
75
+
76
+            }
77
+
78
+        }
79
+
80
+        return result;
81
+    }
82
+
83
+    @AfterThrowing(value = "pointLog()", throwing = "cause")
84
+    public void doException(JoinPoint joinPoint, Throwable cause) {
85
+        if (null != cause) {
86
+//            throw new FuShiException(cause.getMessage());
87
+        }
88
+    }
89
+
90
+}

+ 249
- 0
src/main/java/com/huiju/estateagents/property/common/Constant.java Visa fil

@@ -0,0 +1,249 @@
1
+package com.huiju.estateagents.property.common;
2
+
3
+/**
4
+ * 定义公共属性
5
+ * @author weiximei
6
+ */
7
+public class Constant {
8
+
9
+    /** 系统异常 500 **/
10
+    public static final String REQUEST_ERROR = "500";
11
+
12
+    /** APP端session **/
13
+    public static final String APP_USER_SESSION = "appUser";
14
+
15
+    /** WEB运营端session **/
16
+    // 待废弃
17
+    public static final String WEB_USER_SESSION = "webUser";
18
+
19
+    /** WEB运营端session **/
20
+    @Deprecated
21
+    public static final String WEB_OPERATE_USER_SESSION = "webOperateUser";
22
+
23
+    /** WEB物业端session **/
24
+    @Deprecated
25
+    public static final String WEB_PROPERTY_USER_SESSION = "webPropertyUser";
26
+
27
+    /** 不需要权限的URL身份 **/
28
+    public static final String ROLE_NONEUSER = "ROLE_NONEUSER";
29
+
30
+    /** 校验出现问题后的默认身份 **/
31
+    public static final String ROLE_NONE = "ROLE_NONE";
32
+
33
+    /** app登陆类型 **/
34
+    public static final String APP_LOGIN_TYPE = "app";
35
+
36
+    /** web登陆类型 **/
37
+    public static final String WEB_LOGIN_TYPE = "web";
38
+
39
+    /** 手机验证码 **/
40
+    public static final String SESSION_PHONE_CODE = "phone_code";
41
+
42
+    /** 图形验证码 **/
43
+    public static final String SESSION_OMG_CODE = "img_code";
44
+
45
+    /** 手机验证码 模板 **/
46
+    public static final String CODE = "0201";
47
+
48
+    /** 请求发送验证码的远程服务器地址 **/
49
+    public static final String REQUEST_URL = "http://micservice.ycjcjy.com/sms";
50
+
51
+    /** 本地缓存过期时间 单位秒 **/
52
+    public static final Long CACHE_EXPIRE = 120L;
53
+
54
+    /** 本地緩存最大个数 **/
55
+    public static final Long CACHE_SIZE = 1000L;
56
+
57
+    /** 住户APP端消息 **/
58
+    public static final Integer MODEL_TYPE_NEWS = 1;
59
+    
60
+    /** 住户APP端待办 **/
61
+    public static final Integer MODEL_TYPE_UPCOMING = 2;
62
+
63
+    /** 社交/图片 公告类型**/
64
+    public static final String ANNOUNCEMENT = "announcement";
65
+
66
+    /** 社交/图片 活动类型**/
67
+    public static final String ACTIVITY = "activity";
68
+
69
+    /** 社交/图片 租贷类型**/
70
+    public static final String TRANSACTION = "transaction";
71
+
72
+    /** 监控封面 图片类型 **/
73
+    public static final String MONITORING = "monitoring";
74
+
75
+    /** 社交二手租赁类型**/
76
+    public static final String LEASE = "lease";
77
+
78
+    /** banner类型公告**/
79
+    public static final String BANNER = "banner";
80
+
81
+    /**有效状态,开车**/
82
+    public static final String EFFECTIVE = "1";
83
+
84
+    /**无效状态,不开车**/
85
+    public static final String INVALID = "0";
86
+
87
+    /**业主角色**/
88
+    public static final String OWNER = "OWNER";
89
+    public static final Integer OWNER_ID = 1;
90
+
91
+    /**租客角色**/
92
+    public static final String TENANT = "TENANT";
93
+    public static final Integer TENANT_ID = 2;
94
+
95
+    /**家属角色**/
96
+    public static final String RELATION = "RELATION";
97
+    public static final Integer RELATION_ID = 3;
98
+    
99
+    /** 工单回复的发起人 **/
100
+    public static final String TICKET_USER_TYPE = "1";
101
+
102
+    /** banner的类型 外链接 **/
103
+    public static final String BANNER_TYPE_LINK = "1";
104
+
105
+    /** banner的类型 文章 **/
106
+    public static final String BANNER_TYPE_ARTICLE = "2";
107
+
108
+    /**图片社交类型**/
109
+    public static final String SOCIAL = "social";
110
+
111
+    /**图片回复类型**/
112
+    public static final String REPLY = "reply";
113
+
114
+    /**图片服务类型**/
115
+    public static final String SERVICE = "service";
116
+
117
+
118
+
119
+
120
+    /**判断业主,家属的身份是否已停用的提示**/
121
+    public static final String STATE_DISCONTINUED = "您的身份已停用,请联系物业";
122
+
123
+    /**判断业主,家属的身份是否已停用的状态**/
124
+    public static final String STATE_HINT = "9996";
125
+
126
+    /**认证通过后的**/
127
+
128
+
129
+    /** 添加用户所对应的部门 住户 **/
130
+    public static final String DEPT_RESIDENTS = "荟房会议室";
131
+    
132
+    /**
133
+     * 报名状态 已报名
134
+     */
135
+    public static final String STATUS_SIGNED = "signed";
136
+    
137
+    /**
138
+     * 报名状态 未报名
139
+     */
140
+    public static final String STATUS_UNSIGN = "unsigned";
141
+    
142
+    /**
143
+     * 运营端修改管理员已存在
144
+     */
145
+	public static final String ADMIN_IS_EXIST = "管理员账号已存在";
146
+	
147
+    public static final String SUCCESS = "success";
148
+    
149
+    /**
150
+     * 直辖市
151
+     */
152
+	public static final Integer Beijing = 2;
153
+	
154
+	public static final Integer Tianjin = 19;
155
+	
156
+	public static final Integer Shanghai = 857;
157
+	
158
+	public static final Integer Chongqing = 2459;
159
+    
160
+    /**
161
+     * 访客消息
162
+     */
163
+    public static final String MESSAGE_TYPE_VISITOR = "4";
164
+    
165
+    /**
166
+     * 公告
167
+     */
168
+    public static final String MESSAGE_TYPE_ANNOUNCEMENT = "5";
169
+    
170
+    /**
171
+     * 系统通知
172
+     */
173
+    public static final String MESSAGE_TYPE_SYS = "6";
174
+    
175
+    /**
176
+     * 收费单
177
+     */
178
+    public static final String MESSAGE_TYPE_BILL = "7";
179
+    
180
+    /**
181
+     * 活动
182
+     */
183
+    public static final String MESSAGE_TYPE_ACTIVITY = "8";
184
+    
185
+    /**
186
+     * excel后缀
187
+     */
188
+    public static final String SUFFIX_2003 = ".xls";
189
+    public static final String SUFFIX_2007 = ".xlsx";
190
+    
191
+    /**
192
+     * 成功
193
+     */
194
+    public static final String RESPONSE_SUCCESS = "0";
195
+    
196
+    /**
197
+     * 未认证
198
+     */
199
+	public static final String UN_VERIFY_STATUS = "0";
200
+    
201
+    /**
202
+     * 已认证
203
+     */
204
+    public static final String VERIFY_STATUS = "1";
205
+
206
+    /**
207
+     * 认证作废
208
+     */
209
+    public static final String INVALID_VERIFY_STATUS = "3";
210
+
211
+    /**
212
+     * 人员状态  拉黑 (运营端操作 APP端的用户)
213
+     */
214
+    public static final String BLACKLIST_STATUS = "2";
215
+
216
+    /**
217
+     * 人员状态  有效
218
+     */
219
+    public static final String EFFECTIVE_STATUS = "1";
220
+
221
+    /**
222
+     * 人员状态  无效
223
+     */
224
+    public static final String INVALID_STATUS = "0";
225
+
226
+    /** 已绑定微信 **/
227
+    public static final Integer BINDING_WX = 1;
228
+
229
+    /** 未绑定微信 **/
230
+    public static final Integer NO_BINDING_WX = 0;
231
+
232
+    /** 用户审核通过 **/
233
+    public static final String APPROVED = "1";
234
+
235
+    /** 用户审核不通过 **/
236
+    public static final String REJECTED = "2";
237
+
238
+    /** 用户待审核 **/
239
+    public static final String TO_AUDIT = "0";
240
+
241
+    /** 缴费类型 物业 **/
242
+    public static final String PAY_TYPE_BILL = "bill";
243
+
244
+
245
+    /** 缴费类型 车缴费 **/
246
+    public static final String PAY_TYPE_CAR = "car";
247
+
248
+
249
+}

+ 95
- 0
src/main/java/com/huiju/estateagents/property/common/UserElement.java Visa fil

@@ -0,0 +1,95 @@
1
+package com.huiju.estateagents.property.common;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+import java.io.Serializable;
8
+
9
+/**
10
+ * session 基础类
11
+ */
12
+@Data
13
+@AllArgsConstructor
14
+@NoArgsConstructor
15
+public class UserElement implements Serializable {
16
+
17
+
18
+
19
+
20
+    /** 用户唯一标识符 **/
21
+    private Integer id;
22
+
23
+    /** 小区id **/
24
+    private Integer communityId;
25
+
26
+    /** 用户名 **/
27
+    private String userName;
28
+
29
+    /** 登陆名 **/
30
+    private String loginName;
31
+
32
+    /** 邮箱 **/
33
+    private String email;
34
+
35
+    /** 用户状态 **/
36
+    private String status;
37
+
38
+    /** 登陆类型 **/
39
+    private String loginType;
40
+
41
+    /** 当前登陆的房产 **/
42
+    private Integer userVerifyId;
43
+
44
+    /** 当前登录 期id **/
45
+    private Integer phaseId;
46
+
47
+    /** 当前登录 栋id **/
48
+    private Integer buildingId;
49
+
50
+    /** 当前登录 单元id **/
51
+    private Integer unitId;
52
+
53
+    /** 当前登录 楼层id **/
54
+    private Integer levelId;
55
+
56
+    /** 当前登录 户号id **/
57
+    private Integer roomNoId;
58
+
59
+    /**
60
+     * 海康人员编号
61
+     */
62
+    private String hkPersonNo;
63
+
64
+    /**
65
+     * 海康用户id
66
+     */
67
+    private String hkUserId;
68
+
69
+    /**
70
+     * 海康卡片号码
71
+     */
72
+    private String hkCardNo;
73
+
74
+    @Override
75
+    public String toString() {
76
+        return "UserElement{" +
77
+                "id=" + id +
78
+                ", communityId=" + communityId +
79
+                ", userName='" + userName + '\'' +
80
+                ", loginName='" + loginName + '\'' +
81
+                ", email='" + email + '\'' +
82
+                ", status='" + status + '\'' +
83
+                ", loginType='" + loginType + '\'' +
84
+                ", userVerifyId=" + userVerifyId +
85
+                ", phaseId=" + phaseId +
86
+                ", buildingId=" + buildingId +
87
+                ", unitId=" + unitId +
88
+                ", levelId=" + levelId +
89
+                ", roomNoId=" + roomNoId +
90
+                ", hkPersonNo='" + hkPersonNo + '\'' +
91
+                ", hkUserId='" + hkUserId + '\'' +
92
+                ", hkCardNo='" + hkCardNo + '\'' +
93
+                '}';
94
+    }
95
+}

+ 90
- 0
src/main/java/com/huiju/estateagents/property/common/base/BaseController.java Visa fil

@@ -0,0 +1,90 @@
1
+package com.huiju.estateagents.property.common.base;
2
+
3
+import com.huiju.estateagents.property.common.Constant;
4
+import com.huiju.estateagents.property.common.UserElement;
5
+import com.huiju.estateagents.property.exception.WisdomException;
6
+import com.huiju.estateagents.property.vo.UserVO;
7
+import lombok.extern.slf4j.Slf4j;
8
+
9
+import javax.servlet.http.HttpServletResponse;
10
+import javax.servlet.http.HttpSession;
11
+import java.io.UnsupportedEncodingException;
12
+
13
+/**
14
+ * @author FXF
15
+ * @date 2018-12-18
16
+ */
17
+@Slf4j
18
+public class BaseController {
19
+    
20
+    /**
21
+     * 获取 UserElement
22
+     * @param session
23
+     * @return
24
+     */
25
+    protected UserElement getUserElement(HttpSession session){
26
+        log.info("获取sessionId: {}", session.getId());
27
+        UserElement userElement = (UserElement) session.getAttribute(Constant.WEB_USER_SESSION);
28
+        if (null == userElement) {
29
+            throw new WisdomException("用户凭证不存在!");
30
+        }
31
+        return userElement;
32
+    }
33
+
34
+    /**
35
+     * 获取 UserElement
36
+     * @param session
37
+     * @return
38
+     */
39
+    protected void setUserElement(HttpSession session, UserVO userVO){
40
+        log.info("获取sessionId: {}", session.getId());
41
+        UserElement userElement = new UserElement();
42
+        userElement.setId(userVO.getId());
43
+        userElement.setCommunityId(userVO.getCommunityId());
44
+        userElement.setEmail(userVO.getEmail());
45
+        userElement.setLoginName(userVO.getLoginName());
46
+        userElement.setUserName(userVO.getUserName());
47
+        userElement.setStatus(userVO.getStatus());
48
+        userElement.setLoginType(Constant.WEB_LOGIN_TYPE);
49
+
50
+        session.setAttribute(Constant.WEB_USER_SESSION, userElement);
51
+    }
52
+
53
+
54
+    /**
55
+     * 清除 用户 session
56
+     * @param session
57
+     */
58
+    protected void cleanUserSession(HttpSession session){
59
+        log.info("退出登陆!");
60
+        UserElement userElement = (UserElement) session.getAttribute(Constant.WEB_USER_SESSION);
61
+        if (null != userElement) {
62
+            session.setAttribute(Constant.WEB_USER_SESSION, null);
63
+        }
64
+    }
65
+
66
+    /**
67
+     * 发送响应流方法
68
+     */
69
+    protected void setResponseHeader(HttpServletResponse response, String fileName) {
70
+        try {
71
+            try {
72
+                fileName = new String(fileName.getBytes(),"utf-8");
73
+            } catch (UnsupportedEncodingException e) {
74
+                // TODO Auto-generated catch block
75
+                e.printStackTrace();
76
+            }
77
+//            response.setContentType("application/octet-stream;charset=ISO8859-1");
78
+//            response.setHeader("Content-Disposition", "attachment;filename="+ fileName);
79
+//            response.addHeader("Pargam", "no-cache");
80
+//            response.addHeader("Cache-Control", "no-cache");
81
+
82
+            response.setContentType("multipart/form-data");
83
+            response.setCharacterEncoding("utf-8");
84
+            response.setHeader("Content-disposition", "attachment;filename="+fileName);
85
+        } catch (Exception ex) {
86
+            ex.printStackTrace();
87
+        }
88
+    }
89
+
90
+}

+ 69
- 0
src/main/java/com/huiju/estateagents/property/common/base/QRCode.java Visa fil

@@ -0,0 +1,69 @@
1
+package com.huiju.estateagents.property.common.base;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import com.github.binarywang.utils.qrcode.BufferedImageLuminanceSource;
5
+import com.github.binarywang.utils.qrcode.MatrixToImageWriter;
6
+import com.google.zxing.*;
7
+import com.google.zxing.common.BitMatrix;
8
+import com.google.zxing.common.HybridBinarizer;
9
+
10
+import javax.imageio.ImageIO;
11
+import java.awt.image.BufferedImage;
12
+import java.io.*;
13
+import java.util.HashMap;
14
+import java.util.Map;
15
+
16
+public class QRCode {
17
+
18
+    /**
19
+     * 生成图像
20
+     *
21
+     * @throws WriterException
22
+     * @throws IOException
23
+     */
24
+    public static InputStream encode(String url, String tpActivityId) throws WriterException, IOException {
25
+        // 内容
26
+        String content = url + tpActivityId;
27
+        // 图像宽度
28
+        int width = 200;
29
+        // 图像高度
30
+        int height = 200;
31
+        // 图像类型
32
+        String format = "png";
33
+        Map<EncodeHintType, Object> hints = new HashMap<EncodeHintType, Object>();
34
+        hints.put(EncodeHintType.CHARACTER_SET, "UTF-8");
35
+        // 生成矩阵
36
+        BitMatrix bitMatrix = new MultiFormatWriter().encode(content, BarcodeFormat.QR_CODE, width, height, hints);
37
+        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
38
+        MatrixToImageWriter.writeToStream(bitMatrix, format, byteArrayOutputStream);
39
+
40
+        return new ByteArrayInputStream(byteArrayOutputStream.toByteArray());
41
+    }
42
+
43
+    /**
44
+     * 解析图像
45
+     */
46
+    public void dcode() {
47
+        String filePath = "D://zxing.png";
48
+        BufferedImage image;
49
+        try {
50
+            image = ImageIO.read(new File(filePath));
51
+            LuminanceSource source = new BufferedImageLuminanceSource(image);
52
+            Binarizer binarizer = new HybridBinarizer(source);
53
+            BinaryBitmap binaryBitmap = new BinaryBitmap(binarizer);
54
+            Map<DecodeHintType, Object> hints = new HashMap<DecodeHintType, Object>();
55
+            hints.put(DecodeHintType.CHARACTER_SET, "UTF-8");
56
+            Result result = new MultiFormatReader().decode(binaryBitmap, hints);// 对图像进行解码
57
+            JSONObject content = JSONObject.parseObject(result.getText());
58
+            System.out.println("图片中内容:  ");
59
+            System.out.println("author: " + content.getString("author"));
60
+            System.out.println("zxing:  " + content.getString("zxing"));
61
+            System.out.println("图片中格式:  ");
62
+            System.out.println("encode: " + result.getBarcodeFormat());
63
+        } catch (IOException e) {
64
+            e.printStackTrace();
65
+        } catch (NotFoundException e) {
66
+            e.printStackTrace();
67
+        }
68
+    }
69
+}

+ 29
- 0
src/main/java/com/huiju/estateagents/property/common/base/messagePush.java Visa fil

@@ -0,0 +1,29 @@
1
+package com.huiju.estateagents.property.common.base;
2
+
3
+/**
4
+ * version V1.0
5
+ * class_name: $METHOD_NAME$
6
+ * param: $METHOD_PARAM$
7
+ * describe: TODO
8
+ * creat_user:fannaixi
9
+ * creat_time: 2019/4/18
10
+ **/
11
+public class  messagePush {
12
+    public String[]  messagePushAll() {
13
+        String[] messageArr = new String[13];
14
+        messageArr[0] = "账号已审核通过,看看下面的消息了解下APP如何使用吧!";
15
+        messageArr[1] = "点击顶部小区名称,切换到其他房产或小区,或关联更多房产";
16
+        messageArr[2] = "点击上方 人脸录入,为自己或家人录入人脸信息,家人未注册可先替TA注册";
17
+        messageArr[3] = "点击上方 访客邀请,将生成的二维码发送给访客,访客即可使用二维码开门";
18
+        messageArr[4] = "点击上方 公区监控,查看小区公共区域视频直播,看看大家都在干什么";
19
+        messageArr[5] = "点击上方 智能家居,安装APP玩转室内智能家居设备";
20
+        messageArr[6] = "想知道物业公告和社区活动?点击底部 论坛 查看";
21
+        messageArr[7] = "参与社区议事,发布二手/求购/租赁等热门话题,点击底部 论坛 话题";
22
+        messageArr[8] = "点击底部开锁图标,获取开门二维码,即可扫码开门";
23
+        messageArr[9] = "楼道灯不亮,电梯坏了,通下水道,找保洁?点击底部 服务 报修";
24
+        messageArr[10] = "想投诉施工扰民、乱搭乱建、乱停车?点击底部 服务 投诉";
25
+        messageArr[11] = "有很急的事需要马上联系物业?点击底部 服务 物业 电话联系物业";
26
+        messageArr[12] = "家人想刷脸进门不会操作?点击底部 个人 房屋成员管理 邀请新成员为TA录入人脸";
27
+        return  messageArr;
28
+    }
29
+}

+ 50
- 0
src/main/java/com/huiju/estateagents/property/common/code/cache/AppkeyCache.java Visa fil

@@ -0,0 +1,50 @@
1
+package com.huiju.estateagents.property.common.code.cache;
2
+import com.google.common.cache.CacheBuilder;
3
+import com.google.common.cache.CacheLoader;
4
+import com.google.common.cache.LoadingCache;
5
+import com.huiju.estateagents.property.common.Constant;
6
+import lombok.extern.slf4j.Slf4j;
7
+
8
+import java.util.concurrent.TimeUnit;
9
+
10
+/**
11
+ * 缓存
12
+ * @author weiximei
13
+ */
14
+@Slf4j
15
+public class AppkeyCache {
16
+
17
+    // 给定时间内没有被读/写访问,则回收。
18
+    // .refreshAfterWrite(3, TimeUnit.HOURS)
19
+    static LoadingCache<String, Object> cache = CacheBuilder.newBuilder()
20
+            // 缓存过期时间和redis缓存时长一样
21
+            .expireAfterAccess(Constant.CACHE_EXPIRE, TimeUnit.HOURS)
22
+            // 设置缓存个数
23
+            .maximumSize(Constant.CACHE_SIZE).
24
+            build(new CacheLoader<String, Object>() {
25
+            @Override
26
+            /** 当本地缓存命没有中时,调用load方法获取结果并将结果缓存 **/
27
+            public String load(String appKey) throws Exception {
28
+                return null;
29
+            }
30
+
31
+    });
32
+
33
+    public static Object getCache(String appKey) {
34
+        Object value = null;
35
+        try {
36
+            value = cache.get(appKey);
37
+        } catch (Exception e) {
38
+            //e.printStackTrace();
39
+            value = null;
40
+        }
41
+        return value;
42
+    }
43
+
44
+    public static void setCache(String appKey,Object appValue){
45
+        log.info("缓存的key-value: {}-{}", appKey,appValue);
46
+        cache.put(appKey,appValue);
47
+    }
48
+
49
+
50
+}

+ 23
- 0
src/main/java/com/huiju/estateagents/property/common/code/entity/CodeEntity.java Visa fil

@@ -0,0 +1,23 @@
1
+package com.huiju.estateagents.property.common.code.entity;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+
7
+@Data
8
+@AllArgsConstructor
9
+@NoArgsConstructor
10
+public class CodeEntity {
11
+
12
+   private String code;
13
+
14
+   private String tel;
15
+
16
+    /**
17
+     * 参数 格式 String params = "["xxx"]"
18
+     */
19
+   private String params;
20
+
21
+
22
+
23
+}

+ 11
- 0
src/main/java/com/huiju/estateagents/property/common/code/impl/ImgCodeImpl.java Visa fil

@@ -0,0 +1,11 @@
1
+package com.huiju.estateagents.property.common.code.impl;
2
+
3
+/**
4
+ * 图片验证码
5
+ * @author weiximei
6
+ */
7
+public class ImgCodeImpl {
8
+
9
+
10
+
11
+}

+ 26
- 0
src/main/java/com/huiju/estateagents/property/common/perproties/DaSuProperties.java Visa fil

@@ -0,0 +1,26 @@
1
+package com.huiju.estateagents.property.common.perproties;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+import org.springframework.boot.context.properties.ConfigurationProperties;
7
+import org.springframework.stereotype.Component;
8
+
9
+/**
10
+ * 提供给 大苏 的 appid 和 appsecret
11
+ * @author weiximei
12
+ */
13
+@Component
14
+@ConfigurationProperties(prefix = "da-su")
15
+@Data
16
+@AllArgsConstructor
17
+@NoArgsConstructor
18
+public class DaSuProperties {
19
+
20
+    private String appid;
21
+
22
+    private String appSecret;
23
+
24
+    private String communityId;
25
+
26
+}

+ 44
- 0
src/main/java/com/huiju/estateagents/property/common/perproties/FuShiProperties.java Visa fil

@@ -0,0 +1,44 @@
1
+package com.huiju.estateagents.property.common.perproties;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+import org.springframework.boot.context.properties.ConfigurationProperties;
7
+import org.springframework.stereotype.Component;
8
+
9
+/**
10
+ * 富士配置类
11
+ * @author weiximei
12
+ */
13
+@AllArgsConstructor
14
+@NoArgsConstructor
15
+@Data
16
+@Component
17
+@ConfigurationProperties(prefix = "fu-shi")
18
+public class FuShiProperties {
19
+
20
+    /**
21
+     * 富士云 请求地址
22
+     */
23
+    private String url;
24
+
25
+    /**
26
+     * 富士云 appid
27
+     */
28
+    private String appid;
29
+
30
+    /**
31
+     * 富士云 appSecret
32
+     */
33
+    private String appSecret;
34
+
35
+    /**
36
+     * 富士云 私钥 privateKey
37
+     */
38
+    private String privateKey;
39
+
40
+    /**
41
+     * 停车场编码
42
+     */
43
+    private String parkingCode;
44
+}

+ 26
- 0
src/main/java/com/huiju/estateagents/property/common/perproties/QRCodePerproties.java Visa fil

@@ -0,0 +1,26 @@
1
+package com.huiju.estateagents.property.common.perproties;
2
+
3
+import lombok.AllArgsConstructor;
4
+import lombok.Data;
5
+import lombok.NoArgsConstructor;
6
+import org.springframework.boot.context.properties.ConfigurationProperties;
7
+import org.springframework.stereotype.Component;
8
+
9
+/**
10
+ * version V1.0
11
+ * class_name: $METHOD_NAME$
12
+ * param: $METHOD_PARAM$
13
+ * describe: TODO
14
+ * creat_user:fannaixi
15
+ * creat_time: 2019/4/12
16
+ **/
17
+@Data
18
+@AllArgsConstructor
19
+@NoArgsConstructor
20
+@ConfigurationProperties(prefix = "qr-code")
21
+@Component
22
+public class QRCodePerproties {
23
+
24
+    private String url;
25
+
26
+}

+ 82
- 0
src/main/java/com/huiju/estateagents/property/common/sign/DaSuSign.java Visa fil

@@ -0,0 +1,82 @@
1
+package com.huiju.estateagents.property.common.sign;
2
+
3
+import com.google.common.collect.Maps;
4
+import lombok.extern.slf4j.Slf4j;
5
+import org.apache.commons.codec.digest.DigestUtils;
6
+import org.apache.commons.lang3.StringUtils;
7
+
8
+import java.io.UnsupportedEncodingException;
9
+import java.util.Map;
10
+import java.util.Set;
11
+import java.util.TreeMap;
12
+
13
+/**
14
+ * 大苏签名校验
15
+ */
16
+@Slf4j
17
+public class DaSuSign {
18
+
19
+    /**
20
+     * 校验签名是否相等
21
+     * @param val_1
22
+     * @param val_2
23
+     * @return true 相等  false 不相等
24
+     */
25
+    public static boolean isMD5Sign(String val_1, String val_2) {
26
+        return StringUtils.equals(val_1, val_2);
27
+    }
28
+
29
+    /**
30
+     *
31
+     * 创建签名
32
+     *
33
+     * @param appid
34
+     * @param appSecret
35
+     * @param datetime 时间戳
36
+     * @param encrypt 加密方式(目前就 MD5)
37
+     * @param communityId 小区id
38
+     * @return
39
+     */
40
+    public static String createSign(String appid, String appSecret, String datetime, String encrypt, String communityId){
41
+        TreeMap<String ,Object> treeMap = Maps.newTreeMap();
42
+        treeMap.put("appid", appid);
43
+        treeMap.put("datetime", datetime);
44
+        treeMap.put("encrypt", encrypt);
45
+        treeMap.put("communityid", communityId);
46
+
47
+        String sign = "";
48
+
49
+        StringBuilder sb = new StringBuilder();
50
+        Set<Map.Entry<String, Object>> entries = treeMap.entrySet();
51
+        entries.forEach(e-> {
52
+            sb.append(e.getKey());
53
+            sb.append("=");
54
+            sb.append(e.getValue());
55
+            sb.append("&");
56
+        });
57
+
58
+        sign = sb.toString();
59
+        sign = sign.substring(0, sign.lastIndexOf("&"));
60
+
61
+        log.info("签名之前参数: {}" , sign);
62
+
63
+        try {
64
+            String str = new String(sign.getBytes("UTF-8"), "UTF-8");
65
+            sign = DigestUtils.md5Hex( str + appSecret);
66
+        } catch (UnsupportedEncodingException e) {
67
+            e.printStackTrace();
68
+        }
69
+
70
+        log.info("签名: {}" , sign);
71
+
72
+        return sign;
73
+    }
74
+
75
+    public static void main(String[] args) {
76
+
77
+        Long timeMillis = System.currentTimeMillis();
78
+        System.out.println(timeMillis);
79
+        String sign = createSign("dssdw2576sd997", "fgexhd855sf4", timeMillis + "", "md5", "101");
80
+    }
81
+
82
+}

+ 184
- 0
src/main/java/com/huiju/estateagents/property/controller/AnnouncementTelController.java Visa fil

@@ -0,0 +1,184 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.property.common.UserElement;
7
+import com.huiju.estateagents.property.common.base.BaseController;
8
+import com.huiju.estateagents.property.model.AnnouncementTel;
9
+import com.huiju.estateagents.property.service.IAnnouncementTelService;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiImplicitParam;
12
+import io.swagger.annotations.ApiImplicitParams;
13
+import io.swagger.annotations.ApiOperation;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import javax.servlet.http.HttpServletRequest;
18
+import javax.servlet.http.HttpSession;
19
+import javax.validation.Valid;
20
+import java.time.LocalDateTime;
21
+import java.util.List;
22
+
23
+/**
24
+ * <p>
25
+ * 物业号码表 前端控制器
26
+ * </p>
27
+ *
28
+ * @author jobob
29
+ * @since 2019-03-05
30
+ */
31
+@RestController
32
+@RequestMapping("/")
33
+
34
+@Api(value = "物业端号码 API", description = "物业端号码 API")
35
+public class AnnouncementTelController extends BaseController {
36
+	
37
+	@Autowired
38
+	private IAnnouncementTelService announcementTelService;
39
+	
40
+	@ApiOperation(value = "根据搜索条件获取物业端号码", notes = "根据搜索条件获取物业端号码")
41
+	@ApiImplicitParams({
42
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "name", value = "名称(模糊查询)"),
43
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "tel", value = "号码(模糊查询)"),
44
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "remark", value = "备注(模糊查询)"),
45
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
46
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
47
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
48
+	})
49
+	@RequestMapping(value = "/tels",method = RequestMethod.GET)
50
+	public ResponseBean getList(@RequestParam(value = "name", required = false) String name,
51
+                                @RequestParam(value = "tel", required = false) String tel,
52
+                                @RequestParam(value = "remark", required = false) String remark,
53
+                                @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
54
+                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, HttpSession session){
55
+		ResponseBean responseBean = new ResponseBean();
56
+		UserElement userElement = getUserElement(session);
57
+		AnnouncementTel announcementTel = new AnnouncementTel();
58
+		announcementTel.setCommunityId(userElement.getCommunityId());
59
+		announcementTel.setName(name);
60
+		announcementTel.setTel(tel);
61
+		announcementTel.setRemark(remark);
62
+		responseBean = announcementTelService.getTelList(announcementTel,pageNum,pageSize);
63
+		return responseBean;
64
+	}
65
+	
66
+	@ApiOperation(value = "添加物业端号码", notes = "添加物业端号码")
67
+	@ApiImplicitParams({
68
+			@ApiImplicitParam(dataTypeClass = String.class, paramType = "AnnouncementTel", name = "announcementTel", value = "电话号码实体类"),
69
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
70
+	})
71
+	@RequestMapping(value = "/tel/add",method = RequestMethod.POST)
72
+	public ResponseBean addTel(@Valid @RequestBody AnnouncementTel announcementTel, HttpSession session){
73
+		ResponseBean responseBean = new ResponseBean();
74
+
75
+//		if (!AccountValidatorUtil.isNumber(announcementTel.getTel())) {
76
+//			responseBean.addError("输入的号码不正确!");
77
+//			return responseBean;
78
+//		}
79
+
80
+		UserElement userElement = getUserElement(session);
81
+		QueryWrapper<AnnouncementTel> announcementTelQueryWrapper = new QueryWrapper<>();
82
+		announcementTelQueryWrapper.eq("tel", announcementTel.getTel());
83
+		announcementTelQueryWrapper.eq("community_id", userElement.getCommunityId());
84
+		AnnouncementTel telServiceOne = announcementTelService.getOne(announcementTelQueryWrapper);
85
+		if (null != telServiceOne) {
86
+			responseBean.addError("此号码已存在");
87
+			return responseBean;
88
+		}
89
+		LocalDateTime time = LocalDateTime.now();
90
+		announcementTel.setCommunityId(userElement.getCommunityId());
91
+		announcementTel.setCreateUser(userElement.getId());
92
+		announcementTel.setUpdateUser(userElement.getId());
93
+		announcementTel.setCreateDate(time);
94
+		announcementTel.setUpdateDate(time);
95
+		boolean state = announcementTelService.save(announcementTel);
96
+		if (state){
97
+			responseBean.addSuccess("添加物业端号码成功");
98
+			return responseBean;
99
+		}
100
+		responseBean.addError("添加物业端号码失败");
101
+		return responseBean;
102
+	}
103
+	
104
+	@ApiOperation(value = "根据ID修改物业端号码", notes = "根据ID修改物业端号码")
105
+	@ApiImplicitParams({
106
+			@ApiImplicitParam(paramType = "body", dataType = "AnnouncementTel", name = "announcementTel", value = "电话号码实体类"),
107
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
108
+	})
109
+	@RequestMapping(value = "/tel/update", method = RequestMethod.PUT)
110
+	public ResponseBean updateTel(@Valid @RequestBody AnnouncementTel announcementTel, HttpSession session) {
111
+		ResponseBean responseBean = new ResponseBean();
112
+		boolean isPhone = true;
113
+		boolean isLandline = true;
114
+//		if (!AccountValidatorUtil.isLandline(announcementTel.getTel())){
115
+//			isLandline = false;
116
+//		}
117
+//		if (!AccountValidatorUtil.isPhone(announcementTel.getTel())){
118
+//			isPhone = false;
119
+//		}
120
+//		if (isPhone == false && isLandline == false) {
121
+//			responseBean.addError("输入的号码不正确!");
122
+//			return responseBean;
123
+//		}
124
+//		if (!AccountValidatorUtil.isNumber(announcementTel.getTel())) {
125
+//			responseBean.addError("输入的号码不正确!");
126
+//			return responseBean;
127
+//		}
128
+		UserElement userElement = getUserElement(session);
129
+		QueryWrapper<AnnouncementTel> announcementTelQueryWrapper = new QueryWrapper<>();
130
+		announcementTelQueryWrapper.eq("tel", announcementTel.getTel());
131
+		announcementTelQueryWrapper.eq("community_id", userElement.getCommunityId());
132
+		AnnouncementTel telServiceOne = announcementTelService.getOne(announcementTelQueryWrapper);
133
+		if (null != telServiceOne && announcementTel.getTel().equals(telServiceOne.getTel()) && announcementTel.getId().equals(telServiceOne.getId())) {
134
+			announcementTel.setUpdateUser(userElement.getId());
135
+			announcementTel.setUpdateDate(LocalDateTime.now());
136
+			announcementTelService.updateById(announcementTel);
137
+			responseBean.addSuccess("修改物业端号码成功");
138
+			return responseBean;
139
+		}
140
+		if (null != telServiceOne) {
141
+			responseBean.addError("此号码已存在");
142
+			return responseBean;
143
+		}
144
+		announcementTel.setUpdateUser(userElement.getId());
145
+		announcementTel.setUpdateDate(LocalDateTime.now());
146
+		boolean state = announcementTelService.updateById(announcementTel);
147
+		if (state){
148
+			responseBean.addSuccess("修改物业端号码成功");
149
+			return responseBean;
150
+		}
151
+		responseBean.addError("修改物业端号码失败");
152
+		return responseBean;
153
+	}
154
+	
155
+	@ApiOperation(value = "获取Id获取物业端号码详情", notes = "获取Id获取物业端号码详情")
156
+	@ApiImplicitParams({
157
+			@ApiImplicitParam(paramType = "Path", dataType = "integer", name = "id", value = "主键Id"),
158
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
159
+	})
160
+	@RequestMapping(value = "/tel/{id}",method = RequestMethod.GET)
161
+	public ResponseBean getNoticeById(@PathVariable(value ="id") Integer id, HttpServletRequest request){
162
+		ResponseBean responseBean = new ResponseBean();
163
+		AnnouncementTel announcementTel = announcementTelService.getById(id);
164
+		responseBean.addSuccess(announcementTel);
165
+		return responseBean;
166
+	}
167
+	
168
+	@ApiOperation(value = "根据ID批量删除物业端号码", notes = "根据ID批量删除物业端号码")
169
+	@ApiImplicitParams({
170
+			@ApiImplicitParam(paramType = "body", dataType = "integer", name = "ids", value = "主键Id"),
171
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
172
+	})
173
+	@RequestMapping(value = "/tel/delete", method = RequestMethod.POST)
174
+	public ResponseBean deleteNotice(@RequestBody List<Integer> ids, HttpSession session) {
175
+		ResponseBean responseBean = new ResponseBean();
176
+		boolean state = announcementTelService.removeByIds(ids);
177
+		if (state){
178
+			responseBean.addSuccess("删除物业端号码成功");
179
+			return responseBean;
180
+		}
181
+		responseBean.addError("删除物业端号码失败");
182
+		return responseBean;
183
+	}
184
+}

+ 165
- 0
src/main/java/com/huiju/estateagents/property/controller/BillController.java Visa fil

@@ -0,0 +1,165 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.model.Bill;
8
+import com.huiju.estateagents.property.service.IBillService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.*;
16
+import org.springframework.web.multipart.MultipartFile;
17
+
18
+import javax.servlet.http.HttpServletResponse;
19
+import javax.servlet.http.HttpSession;
20
+import java.io.OutputStream;
21
+import java.text.ParseException;
22
+import java.text.SimpleDateFormat;
23
+import java.util.Date;
24
+import java.util.List;
25
+
26
+/**
27
+ * <p>
28
+ * 缴费项表 前端控制器
29
+ * </p>
30
+ *
31
+ * @author weiximei
32
+ * @since 2019-02-13
33
+ */
34
+@RestController
35
+@RequestMapping("/")
36
+
37
+@Api(value = "缴费项 API", description = "缴费项 API")
38
+public class BillController extends BaseController {
39
+
40
+    @Autowired
41
+    private IBillService iBillService;
42
+    
43
+    
44
+    @ApiOperation(value = "根据搜索条件获取缴费项列表", notes = "根据搜索条件获取缴费项列表")
45
+    @ApiImplicitParams({
46
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "billId", value = "收费组编号"),
47
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "billName", value = "收费组名(模糊查询)"),
48
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "billExplain", value = "收费组说明(模糊查询)"),
49
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
50
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
51
+    })
52
+    @RequestMapping(value = "/bills",method = RequestMethod.GET)
53
+    public ResponseBean getList(@RequestParam(value = "billId", required = false) Integer billId,
54
+                                @RequestParam(value = "billName", required = false) String billName,
55
+                                @RequestParam(value = "billExplain", required = false) String billExplain,
56
+                                @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57
+                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, HttpSession session){
58
+        ResponseBean responseBean = new ResponseBean();
59
+        UserElement userElement = getUserElement(session);
60
+        Bill bill = new Bill();
61
+        bill.setId(billId);
62
+        bill.setBillName(billName);
63
+        bill.setBillExplain(billExplain);
64
+        bill.setCommunityId(userElement.getCommunityId());
65
+        responseBean = iBillService.getBillList(bill,pageNum,pageSize);
66
+        return responseBean;
67
+    }
68
+    
69
+    @ApiOperation(value = "根据 id 查询缴费项详情", notes = "根据 id 查询缴费项详情")
70
+    @ApiImplicitParams({
71
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "id", value = "id编号")
72
+    })
73
+    @RequestMapping(value = "/bill/{id}", method = RequestMethod.GET)
74
+    public ResponseBean getByBillId(HttpSession session, @PathVariable("id") Integer id) {
75
+        ResponseBean responseBean = new ResponseBean();
76
+        responseBean = iBillService.getByBillId(id);
77
+        return responseBean;
78
+    }
79
+
80
+    @ApiOperation(value = "上传缴费项接口, 预览", notes = "上传缴费项接口, 预览")
81
+    @PostMapping(value = "/bill/uploadExcel/get", consumes = "multipart/*", headers = "content-type=multipart/form-data")
82
+    public ResponseBean getUploadExcel(@RequestParam("file") MultipartFile file, HttpSession session) {
83
+        ResponseBean responseBean = new ResponseBean();
84
+        UserElement userElement = getUserElement(session);
85
+        responseBean = iBillService.getExcelData(file, userElement);
86
+        return responseBean;
87
+    }
88
+
89
+    @ApiOperation(value = "上传缴费项接口, 保存/修改", notes = "上传缴费项接口, 保存/修改")
90
+    @PostMapping(value = "/bill/uploadExcel/add", consumes = "multipart/*", headers = "content-type=multipart/form-data")
91
+    public ResponseBean addUploadExcel(HttpSession session,
92
+                                       @RequestParam(value = "billId", required = false) Integer billId,
93
+                                       @RequestParam(value = "file", required = false) MultipartFile file,
94
+                                       @RequestParam("billExplain") String billExplain,
95
+                                       @RequestParam("billName") String billName,
96
+                                       @RequestParam("endDate") String endDate,
97
+                                       @RequestParam("billStatus") String billStatus) {
98
+        ResponseBean responseBean = new ResponseBean();
99
+        UserElement userElement = getUserElement(session);
100
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
101
+        Date date = null;
102
+        try {
103
+            String d = simpleDateFormat.format(new Long(endDate));
104
+            date = simpleDateFormat.parse(d);
105
+        } catch (ParseException e) {
106
+            e.printStackTrace();
107
+        }
108
+        responseBean = iBillService.getExcelData(billId, file, billExplain, billName, date, billStatus, userElement);
109
+        return responseBean;
110
+    }
111
+
112
+
113
+    @ApiOperation(value = "根据 id 修改缴费项状态", notes = "根据 id 修改缴费项状态")
114
+    @ApiImplicitParams({
115
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "id", value = "id编号"),
116
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "billStatus", value = "状态 0:正在收费  2: 草稿")
117
+    })
118
+    @RequestMapping(value = "/bill/updateBillStatus/{id}", method = RequestMethod.PUT)
119
+    public ResponseBean updateBillStatus(HttpSession session,
120
+                                         @RequestParam("billStatus") Integer billStatus,
121
+                                         @PathVariable("id") Integer id) {
122
+
123
+        ResponseBean responseBean = new ResponseBean();
124
+        UserElement userElement = getUserElement(session);
125
+        responseBean = iBillService.updateBillStatus(userElement, billStatus, id);
126
+        return responseBean;
127
+    }
128
+
129
+    @ApiOperation(value = "根据 id集合 删除缴费项", notes = "根据 id集合 删除缴费项")
130
+    @ApiImplicitParams({
131
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id编号集合"),
132
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
133
+    })
134
+    @RequestMapping(value = "/bill/deleteBillBeach", method = RequestMethod.POST)
135
+    public ResponseBean deleteBillBeach(HttpSession session,
136
+                                        @RequestBody List<Integer> ids) {
137
+
138
+        ResponseBean responseBean = new ResponseBean();
139
+        UserElement userElement = getUserElement(session);
140
+        responseBean = iBillService.deleteBillBeach(userElement, ids);
141
+        return responseBean;
142
+    }
143
+
144
+    @ApiOperation(value = "下载Excel模板", notes = "下载Excel模板")
145
+    @ApiImplicitParams({
146
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billExplain收费组说明"),
147
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
148
+    })
149
+    @RequestMapping(value = "/bill/downloadExcel", method = RequestMethod.GET)
150
+    public void exportExcel(HttpServletResponse response, HttpSession session) {
151
+        UserElement userElement = getUserElement(session);
152
+        HSSFWorkbook workbook = (HSSFWorkbook) iBillService.downloadExcel(userElement).getData();
153
+        this.setResponseHeader(response, "缴费单模板.xls");
154
+        //响应到客户端
155
+        try {
156
+            OutputStream os = response.getOutputStream();
157
+            workbook.write(os);
158
+            os.flush();
159
+            os.close();
160
+        } catch (Exception e) {
161
+            e.printStackTrace();
162
+        }
163
+    }
164
+
165
+}

+ 235
- 0
src/main/java/com/huiju/estateagents/property/controller/BillInvoiceController.java Visa fil

@@ -0,0 +1,235 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.property.common.UserElement;
7
+import com.huiju.estateagents.property.common.base.BaseController;
8
+import com.huiju.estateagents.property.model.BillInvoice;
9
+import com.huiju.estateagents.property.service.IBillInvoiceService;
10
+import com.huiju.estateagents.property.service.IBillService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiImplicitParams;
14
+import io.swagger.annotations.ApiOperation;
15
+import org.apache.commons.lang3.StringUtils;
16
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
17
+import org.springframework.beans.factory.annotation.Autowired;
18
+import org.springframework.web.bind.annotation.*;
19
+
20
+import javax.servlet.http.HttpServletResponse;
21
+import javax.servlet.http.HttpSession;
22
+import java.io.OutputStream;
23
+import java.util.List;
24
+
25
+/**
26
+ * <p>
27
+ * 缴费单 前端控制器
28
+ * </p>
29
+ *
30
+ * @author weiximei
31
+ * @since 2019-02-13
32
+ */
33
+@RestController
34
+@RequestMapping("/")
35
+
36
+@Api(value = "缴费单 API", description = "缴费单 API")
37
+public class BillInvoiceController extends BaseController {
38
+
39
+    @Autowired
40
+    private IBillInvoiceService iBillInvoiceService;
41
+
42
+    @Autowired
43
+    private IBillService iBillService;
44
+
45
+    @ApiOperation(value = "查询缴费单", notes = "查询缴费单")
46
+    @ApiImplicitParams({
47
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billId: 缴费项目id," +
48
+                    "phase: 期,building: 栋,unit: 单元,roomNo: 户号,ownerName: 业主姓名," +
49
+                    "billStatus: 缴费状态,payName: 缴费人,pageSize: 一页多少行,pageNum: 第几页"),
50
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
51
+    })
52
+    @RequestMapping(value = "/bill/invoice/list", method = RequestMethod.POST)
53
+    public ResponseBean getBillList(HttpSession session, @RequestBody String parameter) {
54
+        ResponseBean responseBean = new ResponseBean();
55
+        UserElement userElement = getUserElement(session);
56
+        responseBean = iBillInvoiceService.getBillList(parameter, userElement);
57
+        return responseBean;
58
+    }
59
+
60
+    @ApiOperation(value = "修改缴费项 收费项名称,缴费项说明,截止时间", notes = "修改缴费项 收费项名称,缴费项说明,截止时间")
61
+    @ApiImplicitParams({
62
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billName收费项名称,billExplain缴费项说明,endDate截止时间"),
63
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
64
+    })
65
+    @RequestMapping(value = "/bill/invoice/updateBill", method = RequestMethod.PUT)
66
+    public ResponseBean updateBill(HttpSession session, @RequestBody String parameter) {
67
+        ResponseBean responseBean = new ResponseBean();
68
+
69
+        UserElement userElement = getUserElement(session);
70
+        responseBean = iBillService.updateBillNameAndBillExplainAndEndDate(userElement, parameter);
71
+        return responseBean;
72
+    }
73
+
74
+    @ApiOperation(value = "根据 id集合 删除缴费单", notes = "根据 id集合 删除缴费单")
75
+    @ApiImplicitParams({
76
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id集合"),
77
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
78
+    })
79
+    @RequestMapping(value = "/bill/invoice/delete", method = RequestMethod.POST)
80
+    public ResponseBean delete(HttpSession session, @RequestBody List<Integer> ids) {
81
+        ResponseBean responseBean = new ResponseBean();
82
+        UserElement userElement = getUserElement(session);
83
+
84
+        responseBean = iBillInvoiceService.deleteBillInvoice(ids, userElement);
85
+        return responseBean;
86
+    }
87
+
88
+    @ApiOperation(value = "设置线下缴费", notes = "设置线下缴费")
89
+    @ApiImplicitParams({
90
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id集合"),
91
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
92
+    })
93
+    @RequestMapping(value = "/bill/invoice/offlinePayment", method = RequestMethod.POST)
94
+    public ResponseBean offlinePayment(HttpSession session, @RequestBody List<Integer> ids) {
95
+        ResponseBean responseBean = new ResponseBean();
96
+        UserElement userElement = getUserElement(session);
97
+
98
+        responseBean = iBillInvoiceService.offlinePayment(ids, userElement);
99
+        return responseBean;
100
+    }
101
+
102
+    @ApiOperation(value = "由前台批量添加收费单, 默认定为 作废", notes = "由前台批量添加收费单, 默认定为 作废")
103
+    @ApiImplicitParams({
104
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billId缴费项编号,phase期/区," +
105
+                    "building栋,unit单元,roomNo户号,worthOf截止时间(催缴日期),billInvoiceExplain收费单说明,payPrice收费金额"),
106
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
107
+    })
108
+    @RequestMapping(value = "/bill/invoice/addTempBillInvoice", method = RequestMethod.POST)
109
+    public ResponseBean addTempBillInvoice(HttpSession session, @RequestBody String parameter) {
110
+        ResponseBean responseBean = new ResponseBean();
111
+        UserElement userElement = getUserElement(session);
112
+        responseBean = iBillInvoiceService.addTempBillInvoice(parameter, userElement);
113
+        return responseBean;
114
+    }
115
+
116
+    @ApiOperation(value = "由前台批量添加收费单, 进行统一的提交, 修改为有效", notes = "由前台批量添加收费单, 进行统一的提交, 修改为有效")
117
+    @ApiImplicitParams({
118
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "ids", value = "id集合"),
119
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
120
+    })
121
+    @RequestMapping(value = "/bill/invoice/updateBillInvoiceStatus", method = RequestMethod.POST)
122
+    public ResponseBean updateBillInvoiceStatus(HttpSession session, @RequestBody List<Integer> ids) {
123
+        ResponseBean responseBean = new ResponseBean();
124
+        UserElement userElement = getUserElement(session);
125
+        responseBean = iBillInvoiceService.updateBillInvoiceStatus(ids, userElement);
126
+        return responseBean;
127
+    }
128
+
129
+    @ApiOperation(value = "查询前台批量添加的收费单, 状态是作废", notes = "查询前台批量添加的收费单, 状态是作废")
130
+    @ApiImplicitParams({
131
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
132
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
133
+    })
134
+    @RequestMapping(value = "/bill/invoice/getTempBillInvoice/{billId}", method = RequestMethod.GET)
135
+    public ResponseBean getTempBillInvoice(HttpSession session, @PathVariable("billId") Integer billId) {
136
+        ResponseBean responseBean = new ResponseBean();
137
+        UserElement userElement = getUserElement(session);
138
+        responseBean = iBillInvoiceService.getTempBillInvoice(billId, userElement);
139
+        return responseBean;
140
+    }
141
+
142
+    @ApiOperation(value = "根据id删除收费单, 只能删除作废的", notes = "根据id删除收费单, 只能删除作废的")
143
+    @ApiImplicitParams({
144
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
145
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
146
+    })
147
+    @RequestMapping(value = "/bill/invoice/deleteTempBillInvoice/{billId}", method = RequestMethod.DELETE)
148
+    public ResponseBean deleteTempBillInvoice(HttpSession session, @PathVariable("billId") Integer billId) {
149
+        ResponseBean responseBean = new ResponseBean();
150
+        UserElement userElement = getUserElement(session);
151
+        responseBean = iBillInvoiceService.deleteTempBillInvoice(billId, userElement);
152
+        return responseBean;
153
+    }
154
+
155
+    @ApiOperation(value = "根据缴费单id, 修改金额", notes = "根据缴费单id, 修改金额")
156
+    @ApiImplicitParams({
157
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
158
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "payPrice金额"),
159
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
160
+    })
161
+    @RequestMapping(value = "/bill/invoice/updateBillInvoiceIdPayPrice/{billId}", method = RequestMethod.POST)
162
+    public ResponseBean updateBillInvoiceIdPayPrice(HttpSession session, @PathVariable Integer billId, @RequestBody String parameter) {
163
+        ResponseBean responseBean = new ResponseBean();
164
+        UserElement userElement = getUserElement(session);
165
+        Double payPrice = JSONObject.parseObject(parameter).getDouble("payPrice");
166
+//        responseBean = iBillInvoiceService.updateBillInvoiceIdPayPrice(billId, PayPriceUtils.yuanConversionPoints(payPrice) , userElement);
167
+        return responseBean;
168
+    }
169
+
170
+    @ApiOperation(value = "根据缴费单id, 修改收费说明", notes = "根据缴费单id, 修改收费说明")
171
+    @ApiImplicitParams({
172
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
173
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billInvoiceExplain收费说明"),
174
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
175
+    })
176
+    @RequestMapping(value = "/bill/invoice/updateBillInvoiceIdBillInvoiceExplain/{billId}", method = RequestMethod.POST)
177
+    public ResponseBean updateBillInvoiceIdBillInvoiceExplain(HttpSession session, @PathVariable Integer billId, @RequestBody String parameter) {
178
+        ResponseBean responseBean = new ResponseBean();
179
+        UserElement userElement = getUserElement(session);
180
+        String billInvoiceExplain = JSONObject.parseObject(parameter).getString("billInvoiceExplain");
181
+        if (StringUtils.isBlank(billInvoiceExplain)) {
182
+            responseBean.addError("收费说明不能为空!");
183
+            return responseBean;
184
+        }
185
+        BillInvoice billInvoice = iBillInvoiceService.getById(billId);
186
+        billInvoice.setBillInvoiceExplain(billInvoiceExplain);
187
+        boolean b = iBillInvoiceService.updateById(billInvoice);
188
+        if (b) {
189
+            responseBean.addSuccess("操作成功!");
190
+            return responseBean;
191
+        }
192
+        responseBean.addError("操作失败!");
193
+        return responseBean;
194
+    }
195
+
196
+
197
+    @ApiOperation(value = "导出Excel", notes = "导出Excel")
198
+    @ApiImplicitParams({
199
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "缴费id"),
200
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
201
+    })
202
+    @RequestMapping(value = "/bill/invoice/exportExcel/{billId}", method = RequestMethod.GET)
203
+    public void exportExcel(HttpServletResponse response, HttpSession session, @PathVariable("billId") Integer billId) {
204
+        ResponseBean responseBean = new ResponseBean();
205
+        UserElement userElement = getUserElement(session);
206
+        HSSFWorkbook workbook = (HSSFWorkbook) iBillInvoiceService.exportExcel(userElement, billId).getData();
207
+        this.setResponseHeader(response, "缴费单.xls");
208
+        //响应到客户端
209
+        try {
210
+             OutputStream os = response.getOutputStream();
211
+             workbook.write(os);
212
+             os.flush();
213
+             os.close();
214
+        } catch (Exception e) {
215
+            e.printStackTrace();
216
+        }
217
+    }
218
+
219
+
220
+
221
+    @ApiOperation(value = "根据缴费项id, 查询草稿", notes = "根据缴费项id, 查询草稿")
222
+    @ApiImplicitParams({
223
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "billId", value = "billId缴费项id,pageNum当前页,pageSize一页多少行"),
224
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
225
+    })
226
+    @RequestMapping(value = "/bill/invoice/getInvoiceInvalid", method = RequestMethod.POST)
227
+    public ResponseBean getInvoiceInvalid(HttpSession session, @RequestBody String parameter) {
228
+        ResponseBean responseBean = new ResponseBean();
229
+        UserElement userElement = getUserElement(session);
230
+        responseBean = iBillInvoiceService.getInvoiceInvalid(userElement, parameter);
231
+        return responseBean;
232
+    }
233
+
234
+
235
+}

+ 51
- 0
src/main/java/com/huiju/estateagents/property/controller/BillOrderController.java Visa fil

@@ -0,0 +1,51 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.IBillOrderService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.PathVariable;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.servlet.http.HttpSession;
19
+
20
+/**
21
+ * <p>
22
+ * 缴费订单表 前端控制器
23
+ * </p>
24
+ *
25
+ * @author jobob
26
+ * @since 2019-04-18
27
+ */
28
+@RestController
29
+@RequestMapping("/")
30
+@Api(value = "订单 API", description = "订单 API")
31
+public class BillOrderController extends BaseController {
32
+
33
+    @Autowired
34
+    private IBillOrderService iBillOrderService;
35
+
36
+
37
+    @RequestMapping(value = "/bill/order/getByOrderNumberBillInvoice/{orderNumber}", method = RequestMethod.GET)
38
+    @ApiOperation(value = "根据订单查询 缴费单", notes = "根据订单查询 缴费单")
39
+    @ApiImplicitParams({
40
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "Token"),
41
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "path", name = "orderNumber", value = "订单号")
42
+    })
43
+    public ResponseBean getByOrderNumberBillInvoice(HttpSession session, @PathVariable("orderNumber") String orderNumber) {
44
+        ResponseBean responseBean = new ResponseBean();
45
+        UserElement userElement = getUserElement(session);
46
+        responseBean = iBillOrderService.getByOrderNumberBillInvoice(userElement, orderNumber);
47
+        return responseBean;
48
+    }
49
+
50
+
51
+}

+ 76
- 0
src/main/java/com/huiju/estateagents/property/controller/BillStatementController.java Visa fil

@@ -0,0 +1,76 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.IBillStatementService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RestController;
18
+
19
+import javax.servlet.http.HttpServletResponse;
20
+import javax.servlet.http.HttpSession;
21
+import java.io.OutputStream;
22
+
23
+/**
24
+ * <p>
25
+ * 账单流水表 前端控制器
26
+ * </p>
27
+ *
28
+ * @author weiximei
29
+ * @since 2019-02-13
30
+ */
31
+@RestController
32
+@RequestMapping("/")
33
+
34
+@Api(value = "流水/订单 信息 API", description = "流水/订单 信息 API")
35
+public class BillStatementController extends BaseController {
36
+
37
+    @Autowired
38
+    private IBillStatementService iBillStatementService;
39
+
40
+    @ApiOperation(value = "获取订单信息", notes = "获取订单信息")
41
+    @ApiImplicitParams({
42
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "payPhone订单号," +
43
+                    "billId缴费项编号,billName缴费项名称,billInvoiceId缴费单编号,payName缴费人"),
44
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "token")
45
+    })
46
+    @RequestMapping(value = "/bill/statement/all", method = RequestMethod.POST)
47
+    public ResponseBean getBillStatement(HttpSession session, @RequestBody String parameter) {
48
+        ResponseBean responseBean = new ResponseBean();
49
+        UserElement userElement = getUserElement(session);
50
+        responseBean = iBillStatementService.getBillStatement(userElement, parameter);
51
+        return responseBean;
52
+    }
53
+
54
+    @ApiOperation(value = "导出Excel", notes = "导出Excel")
55
+    @ApiImplicitParams({
56
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
57
+    })
58
+    @RequestMapping(value = "/bill/statement/exportExcel", method = RequestMethod.GET)
59
+    public void exportExcel(HttpServletResponse response, HttpSession session) {
60
+        ResponseBean responseBean = new ResponseBean();
61
+        UserElement userElement = getUserElement(session);
62
+        HSSFWorkbook workbook = (HSSFWorkbook) iBillStatementService.exportExcel(userElement).getData();
63
+        this.setResponseHeader(response, "流水信息.xls");
64
+        //响应到客户端
65
+        try {
66
+            OutputStream os = response.getOutputStream();
67
+            workbook.write(os);
68
+            os.flush();
69
+            os.close();
70
+        } catch (Exception e) {
71
+            e.printStackTrace();
72
+        }
73
+    }
74
+
75
+
76
+}

+ 330
- 0
src/main/java/com/huiju/estateagents/property/controller/BuildingOwnerInfoController.java Visa fil

@@ -0,0 +1,330 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.center.taUser.service.ITaUserService;
7
+import com.huiju.estateagents.property.common.UserElement;
8
+import com.huiju.estateagents.property.common.base.BaseController;
9
+import com.huiju.estateagents.property.model.TaFace;
10
+import com.huiju.estateagents.property.model.TaUser;
11
+import com.huiju.estateagents.property.model.TaUserVerify;
12
+import com.huiju.estateagents.property.service.IBuildingOwnerInfoService;
13
+import com.huiju.estateagents.property.service.ITaFaceService;
14
+import com.huiju.estateagents.property.service.ITaUserVerifyService;
15
+import com.google.common.collect.Maps;
16
+import io.swagger.annotations.Api;
17
+import io.swagger.annotations.ApiImplicitParam;
18
+import io.swagger.annotations.ApiImplicitParams;
19
+import io.swagger.annotations.ApiOperation;
20
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
21
+import org.springframework.beans.factory.annotation.Autowired;
22
+import org.springframework.web.bind.annotation.*;
23
+import org.springframework.web.multipart.MultipartFile;
24
+
25
+import javax.servlet.http.HttpServletResponse;
26
+import javax.servlet.http.HttpSession;
27
+import java.io.OutputStream;
28
+import java.util.List;
29
+import java.util.Map;
30
+
31
+/**
32
+ * <p>
33
+ * 楼栋业主资料信息表 前端控制器
34
+ * </p>
35
+ *
36
+ * @author weiximei
37
+ * @since 2018-12-18
38
+ */
39
+@RestController
40
+
41
+@RequestMapping("/")
42
+@Api(value = "楼栋业主资料信息", description = "楼栋业主资料信息 Api")
43
+public class BuildingOwnerInfoController extends BaseController {
44
+
45
+    @Autowired
46
+    private IBuildingOwnerInfoService iBuildingOwnerInfoService;
47
+
48
+    @Autowired
49
+    private ITaUserVerifyService iTaUserVerifyService;
50
+
51
+    @Autowired
52
+    private ITaFaceService iTaFaceService;
53
+
54
+    @ApiOperation(value = "获取楼栋业主信息", notes = "根据条件获取")
55
+    @ApiImplicitParams({
56
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter",value = "buildingId栋;" +
57
+                    "unitId单元;levelId楼层;roomNoId户号;" +
58
+                    "ownerName业主姓名;" +"ownerTel业主手机号;" +"idCard身份证;" +
59
+                    "pageNum第几页;pageSize 一页多少行;")
60
+    })
61
+    @RequestMapping(value = "/building/list", method = RequestMethod.POST)
62
+    public ResponseBean getList(@RequestBody String parameter, HttpSession session){
63
+        ResponseBean responseBean = new ResponseBean();
64
+        UserElement userElement = getUserElement(session);
65
+        responseBean = iBuildingOwnerInfoService.listQuery(parameter, userElement);
66
+        return responseBean;
67
+    }
68
+
69
+    @ApiOperation(value = "获取楼栋业主审核详情", notes = "获取楼栋业主审核详情")
70
+    @ApiImplicitParams({
71
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "userVerifyId",value = "审核Id")
72
+    })
73
+    @RequestMapping(value = "/building/verify/{userVerifyId}", method = RequestMethod.GET)
74
+    public ResponseBean getById(@PathVariable(value = "userVerifyId") Integer userVerifyId) {
75
+        ResponseBean responseBean = new ResponseBean();
76
+
77
+        TaUserVerify userVerify = iTaUserVerifyService.getById(userVerifyId);
78
+        if (null == userVerify) {
79
+            responseBean.addError("审核数据不存在!");
80
+            return responseBean;
81
+        }
82
+//        TaUser user = iTaUserService.getById(userVerify.getUserId());
83
+        Map<String, Object> map = Maps.newHashMap();
84
+        map.put("verify", userVerify);
85
+//        map.put("info", user);
86
+
87
+        // true 标识业主 false 非业主
88
+        map.put("boolRole", false);
89
+
90
+        // 默认人脸未录入
91
+        map.put("face", "unregister");
92
+
93
+        QueryWrapper<TaUserVerify> userVerifyQueryWrapper = new QueryWrapper<>();
94
+        userVerifyQueryWrapper.eq("phase_id", userVerify.getPhaseId());
95
+        userVerifyQueryWrapper.eq("building_id", userVerify.getBuildingId());
96
+        userVerifyQueryWrapper.eq("unit_id", userVerify.getUnitId());
97
+        userVerifyQueryWrapper.eq("level_id", userVerify.getLevelId());
98
+        userVerifyQueryWrapper.eq("room_no_id", userVerify.getRoomNoId());
99
+        userVerifyQueryWrapper.eq("user_id", userVerify.getUserId());
100
+        userVerifyQueryWrapper.eq("role_id", 1);
101
+        TaUserVerify userVerifyOne = iTaUserVerifyService.getOne(userVerifyQueryWrapper);
102
+        if (null != userVerifyOne) {
103
+            map.put("boolRole", true);
104
+        }
105
+
106
+        // 人脸是否录入
107
+        QueryWrapper<TaFace> faceQueryWrapper = new QueryWrapper<>();
108
+        faceQueryWrapper.eq("ta_user_verify_id", userVerify.getId());
109
+        TaFace face = iTaFaceService.getOne(faceQueryWrapper);
110
+        if (null != face) {
111
+            map.put("face", "register");
112
+        }
113
+
114
+
115
+        responseBean.addSuccess(map);
116
+        return responseBean;
117
+
118
+    }
119
+
120
+    @ApiOperation(value = "修改楼栋业务信息", notes = "修改楼栋业主信息")
121
+    @ApiImplicitParams({
122
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter",value = "userVerifyId审核编号;roleId角色编号;verifyStatus审核 true通过;false不通过;remark备注"),
123
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
124
+    })
125
+    @RequestMapping(value = "/building/update", method = RequestMethod.PUT)
126
+    public ResponseBean update(@RequestBody String parameter, HttpSession session){
127
+        ResponseBean responseBean = new ResponseBean();
128
+        UserElement userElement = getUserElement(session);
129
+        responseBean = iBuildingOwnerInfoService.update(parameter, userElement);
130
+        return responseBean;
131
+    }
132
+
133
+    @ApiOperation(value = "添加楼栋业务信息", notes = "添加楼栋业务信息")
134
+    @ApiImplicitParams({
135
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "phaseId期;buildingId栋;" +
136
+                    "unitId单元;levelId楼层;roomNoId户号;" +
137
+                    "ownerName业主姓名;" +
138
+                    "ownerTel业主手机号;roleId角色id;gender性别 1:男   2:女;"),
139
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
140
+    })
141
+    @RequestMapping(value = "/building/add", method = RequestMethod.POST)
142
+    public ResponseBean add(@RequestBody String parameter, HttpSession session){
143
+        ResponseBean responseBean = new ResponseBean();
144
+        UserElement userElement = getUserElement(session);
145
+        responseBean = iBuildingOwnerInfoService.add(parameter, userElement);
146
+        return responseBean;
147
+    }
148
+
149
+    @ApiOperation(value = "批量删除楼栋业主信息", notes = "批量删除楼栋业主信息")
150
+    @ApiImplicitParams({
151
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "ids",value = "id集合"),
152
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
153
+    })
154
+    @RequestMapping(value = "/building/delete", method = RequestMethod.DELETE)
155
+    public ResponseBean delete(@RequestBody List<Integer> ids, HttpSession session){
156
+        ResponseBean responseBean = new ResponseBean();
157
+        UserElement userElement = getUserElement(session);
158
+        responseBean = iBuildingOwnerInfoService.deleteIds(ids, userElement.getId());
159
+        return responseBean;
160
+    }
161
+
162
+    @ApiOperation(value = "查询 期区", notes = "查询 期区")
163
+    @ApiImplicitParams({
164
+    })
165
+    @RequestMapping(value = "/building/phase",method = RequestMethod.GET)
166
+    public ResponseBean getPhaseList(HttpSession session){
167
+        ResponseBean responseBean = new ResponseBean();
168
+        UserElement userElement = getUserElement(session);
169
+        responseBean = iBuildingOwnerInfoService.getPhaseList(userElement.getCommunityId());
170
+        return responseBean;
171
+    }
172
+    
173
+    @ApiOperation(value = "查询 楼栋", notes = "查询 楼栋")
174
+    @ApiImplicitParams({
175
+            @ApiImplicitParam(paramType = "query", name = "phaseId",value = "期区ID")
176
+    })
177
+    @RequestMapping(value = "/building/building",method = RequestMethod.GET)
178
+    public ResponseBean getBuildingList(@RequestParam Integer phaseId, HttpSession session){
179
+        ResponseBean responseBean = new ResponseBean();
180
+        UserElement userElement = getUserElement(session);
181
+        responseBean = iBuildingOwnerInfoService.getBuildingList(phaseId,userElement.getCommunityId());
182
+        return responseBean;
183
+    }
184
+    
185
+    @ApiOperation(value = "查询 单元", notes = "查询 单元")
186
+    @ApiImplicitParams({
187
+            @ApiImplicitParam(paramType = "query", name = "buildingId",value = "楼栋ID")
188
+    })
189
+    @RequestMapping(value = "/building/unit",method = RequestMethod.GET)
190
+    public ResponseBean getUnitList(@RequestParam Integer buildingId, HttpSession session){
191
+        ResponseBean responseBean = new ResponseBean();
192
+        UserElement userElement = getUserElement(session);
193
+        responseBean = iBuildingOwnerInfoService.getUnitList(buildingId,userElement.getCommunityId());
194
+        return responseBean;
195
+    }
196
+    
197
+    @ApiOperation(value = "查询 楼层", notes = "查询 楼层")
198
+    @ApiImplicitParams({
199
+            @ApiImplicitParam(paramType = "query", name = "unitId",value = "单元ID")
200
+    })
201
+    @RequestMapping(value = "/building/level",method = RequestMethod.GET)
202
+    public ResponseBean getLevelList(@RequestParam Integer unitId, HttpSession session){
203
+        ResponseBean responseBean = new ResponseBean();
204
+        UserElement userElement = getUserElement(session);
205
+        responseBean = iBuildingOwnerInfoService.getLevelList(unitId,userElement.getCommunityId());
206
+        return responseBean;
207
+    }
208
+    
209
+    @ApiOperation(value = "查询 房间号", notes = "查询 房间号")
210
+    @ApiImplicitParams({
211
+            @ApiImplicitParam(paramType = "query", name = "levelId",value = "楼层ID")
212
+    })
213
+    @RequestMapping(value = "/building/roomno",method = RequestMethod.GET)
214
+    public ResponseBean getRoomNoList(@RequestParam Integer levelId, HttpSession session){
215
+        ResponseBean responseBean = new ResponseBean();
216
+        UserElement userElement = getUserElement(session);
217
+        responseBean = iBuildingOwnerInfoService.getRoomNoList(levelId,userElement.getCommunityId());
218
+        return responseBean;
219
+    }
220
+    
221
+    @ApiOperation(value = "上传楼栋信息接口", notes = "上传楼栋信息接口")
222
+    @PostMapping(value = "/building/uploadExcel", consumes = "multipart/*", headers = "content-type=multipart/form-data")
223
+    public ResponseBean uploadExcel(@RequestParam("file") MultipartFile file) {
224
+        ResponseBean responseBean = new ResponseBean();
225
+        responseBean = iBuildingOwnerInfoService.getExcelData(file);
226
+        return responseBean;
227
+    }
228
+ 
229
+    @ApiOperation(value = "上传楼栋信息并入库", notes = "上传楼栋信息并入库")
230
+    @PostMapping(value = "/building/submitExcel", consumes = "multipart/*", headers = "content-type=multipart/form-data")
231
+    public ResponseBean submitExcel(@RequestParam("file") MultipartFile file, HttpSession session) {
232
+        ResponseBean responseBean = new ResponseBean();
233
+        UserElement userElement = getUserElement(session);
234
+        try {
235
+            responseBean = iBuildingOwnerInfoService.submitExcelData(file,userElement);
236
+        }catch (Exception e){
237
+            responseBean.addError("导入数据失败" + e.getMessage());
238
+            e.printStackTrace();
239
+        }
240
+        
241
+        return responseBean;
242
+    }
243
+
244
+    @ApiOperation(value = "获取已认证通过的用户信息",nickname ="获取已认证通过的用户信息")
245
+    @ApiImplicitParams({
246
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="ownerName:姓名,ownerTel:手机号 ,current:每页显示多少条,current:每页显示多少条,pageSzie:当前页数")})
247
+
248
+    @RequestMapping(value="/userPassCertification",method = RequestMethod.POST)
249
+    public ResponseBean userPassCertification(@RequestBody String paramets, HttpSession session){
250
+        UserElement userElement = getUserElement(session);
251
+        ResponseBean allApprove=iBuildingOwnerInfoService.selectUserApprove(paramets,userElement.getCommunityId());
252
+        return allApprove;
253
+    }
254
+
255
+    @ApiOperation(value = "修改用户当前认证状态",nickname ="修改用户当前认证状态")
256
+    @ApiImplicitParams({
257
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="ownerTel:手机号,verifyStatus:当前状态")})
258
+
259
+    @RequestMapping(value="/updataPassCertification",method = RequestMethod.POST)
260
+    public ResponseBean updataPassCertification(@RequestBody String paramets){
261
+        ResponseBean userParent=iBuildingOwnerInfoService.updataApprove(paramets);
262
+        return userParent;
263
+    }
264
+
265
+    @ApiOperation(value = "小区楼栋资料表",nickname ="小区楼栋资料表")
266
+    @ApiImplicitParams({
267
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="phase:期,building:楼栋 ,unit:单元,level:楼层,roomNo:户号, pageNum:每页显示多少条,pageSzie:当前页数"),
268
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")})
269
+    @RequestMapping(value="/buildinglist",method = RequestMethod.POST)
270
+    public ResponseBean buildinglist(@RequestBody String paramets, HttpSession session){
271
+        UserElement userElement = getUserElement(session);
272
+        ResponseBean buildinglist=iBuildingOwnerInfoService.buildinglist(paramets,userElement);
273
+        return buildinglist;
274
+    }
275
+
276
+    @ApiOperation(value = "小区楼栋资料表-查询 楼栋/单元/楼层/户号", notes = "小区楼栋资料表-查询 楼栋/单元/楼层/户号")
277
+    @ApiImplicitParams({
278
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "phase:期;building楼栋;" +
279
+                    "unit单元;level楼层:roomNo:户号") // ;roomNo户号
280
+    })
281
+    @RequestMapping(value = "/buildinghouse",method = RequestMethod.POST)
282
+    public ResponseBean puildinghouse(@RequestBody String parameter, HttpSession session){
283
+        UserElement userElement = getUserElement(session);
284
+        ResponseBean responseBean = iBuildingOwnerInfoService.puildinghouse(parameter, userElement.getCommunityId());
285
+        return responseBean;
286
+    }
287
+
288
+    @ApiOperation(value = "小区楼栋资料表-修改 楼栋/单元/楼层/户号", notes = "小区楼栋资料表-修改 楼栋/单元/楼层/户号")
289
+    @ApiImplicitParams({
290
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "phase:期;building:当前楼栋;" +
291
+                    "unit:当前楼层单元;level:当前楼层楼层;roomNo:当前楼层楼层")
292
+    })
293
+    @RequestMapping(value = "/communitybuilding/update",method = RequestMethod.POST)
294
+    public ResponseBean communitybuildingAdd(@RequestBody String parameter, HttpSession session){
295
+        UserElement userElement = getUserElement(session);
296
+        ResponseBean responseBean = iBuildingOwnerInfoService.communitybuildingUpdate(parameter, userElement.getCommunityId());
297
+        return responseBean;
298
+    }
299
+
300
+    @ApiOperation(value = "下载Excel模板(小区楼栋信息)", notes = "下载Excel模板(小区楼栋信息)")
301
+    @ApiImplicitParams({
302
+//            @ApiImplicitParam(dataTypeClass = String.class, paramType = "body", name = "parameter", value = "billExplain收费组说明"),
303
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
304
+    })
305
+    @RequestMapping(value = "/building/downloadExcel", method = RequestMethod.GET)
306
+    public void exportExcel(HttpServletResponse response, HttpSession session) {
307
+        UserElement userElement = getUserElement(session);
308
+        XSSFWorkbook workbook = (XSSFWorkbook) iBuildingOwnerInfoService.downloadExcel(userElement).getData();
309
+        this.setResponseHeader(response, "业主资料库.xlsx");
310
+        //响应到客户端
311
+        try {
312
+            OutputStream os = response.getOutputStream();
313
+            workbook.write(os);
314
+            os.flush();
315
+            os.close();
316
+        } catch (Exception e) {
317
+            e.printStackTrace();
318
+        }
319
+    }
320
+    @ApiOperation(value = "住户资料详情",nickname ="住户资料详情")
321
+    @ApiImplicitParams({
322
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:楼栋住户ID"),
323
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")})
324
+    @RequestMapping(value="/building/details",method = RequestMethod.POST)
325
+    public ResponseBean buildingDetails(@RequestBody String paramets, HttpSession session){
326
+        UserElement userElement = getUserElement(session);
327
+        ResponseBean buildinglist=iBuildingOwnerInfoService.buildingDetails(paramets,userElement);
328
+        return buildinglist;
329
+    }
330
+}

+ 83
- 0
src/main/java/com/huiju/estateagents/property/controller/BuildingTreeController.java Visa fil

@@ -0,0 +1,83 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.UserElement;
5
+import com.huiju.estateagents.property.common.base.BaseController;
6
+import com.huiju.estateagents.property.service.BuildingTreeServiceI;
7
+import io.swagger.annotations.Api;
8
+import io.swagger.annotations.ApiImplicitParam;
9
+import io.swagger.annotations.ApiImplicitParams;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.*;
13
+import org.springframework.web.multipart.MultipartFile;
14
+
15
+import javax.servlet.http.HttpSession;
16
+
17
+/**
18
+ * @author FXF
19
+ * @date 2019-04-01
20
+ */
21
+@RestController
22
+
23
+@RequestMapping("/")
24
+@Api(value = "楼栋树管理", description = "楼栋树管理 Api")
25
+public class BuildingTreeController extends BaseController {
26
+	
27
+	@Autowired
28
+	private BuildingTreeServiceI buildingTreeService;
29
+	
30
+	@ApiOperation(value = "上传楼栋信息接口", notes = "上传楼栋信息接口")
31
+	@PostMapping(value = "/tree/uploadExcel", consumes = "multipart/*", headers = "content-type=multipart/form-data")
32
+	public ResponseBean uploadExcel(@RequestParam("file") MultipartFile file) {
33
+		ResponseBean responseBean = new ResponseBean();
34
+		responseBean = buildingTreeService.getExcelData(file);
35
+		return responseBean;
36
+	}
37
+	
38
+	@ApiOperation(value = "上传楼栋信息并入库", notes = "上传楼栋信息并入库")
39
+	@PostMapping(value = "/tree/submitExcel", consumes = "multipart/*", headers = "content-type=multipart/form-data")
40
+	public ResponseBean submitExcel(@RequestParam("file") MultipartFile file, HttpSession session) {
41
+		ResponseBean responseBean = new ResponseBean();
42
+		UserElement userElement = getUserElement(session);
43
+		responseBean = buildingTreeService.submitExcelData(file,userElement);
44
+		return responseBean;
45
+	}
46
+	
47
+	@ApiOperation(value = "获取树形数据", notes = "获取树形数据")
48
+	@GetMapping(value = "/trees")
49
+	@ApiImplicitParams({
50
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
51
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "id", value = "当前节点id(查期时ID为空)"),
52
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "treeType", value = "phase:(期),building:(栋),unit:(单元),level:(楼层),roomNo:(房间号)")
53
+	})
54
+	public ResponseBean getTreeList(@RequestParam(value = "id", required = false) Integer id, @RequestParam("treeType") String treeType, HttpSession session){
55
+		ResponseBean responseBean = new ResponseBean();UserElement userElement = getUserElement(session);
56
+
57
+		responseBean = buildingTreeService.getTreeList(userElement.getCommunityId(),id,treeType);
58
+		return responseBean;
59
+	}
60
+
61
+	@ApiOperation(value = "添加当前节点", notes = "添加当前节点")
62
+	@ApiImplicitParams({
63
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "id:当前节点;" +
64
+					"name:节点名称;type:(phase:(期),building:(栋),unit:(单元),level:(楼层),roomNo:(房间号)), roomNonodeNumber:输入的节点")
65
+	})
66
+	@RequestMapping(value = "/addnode",method = RequestMethod.POST)
67
+	public ResponseBean addNode(@RequestBody String parameter, HttpSession session){
68
+		UserElement userElement = getUserElement(session);
69
+	    ResponseBean	responseBean = buildingTreeService.addNode(parameter, userElement.getCommunityId());
70
+		return responseBean;
71
+	}
72
+
73
+	@ApiOperation(value = "删除当前节点", notes = "删除当前节点")
74
+	@ApiImplicitParams({
75
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "id:当前节点;type:(end:(房间),roomNo:(楼层),level:(单元),unit:(楼栋),building:(期))")
76
+	})
77
+	@RequestMapping(value = "/deletenode",method = RequestMethod.POST)
78
+	public ResponseBean deletenode(@RequestBody String parameter, HttpSession session){
79
+		UserElement userElement = getUserElement(session);
80
+		ResponseBean	responseBean = buildingTreeService.deleteNode(parameter, userElement.getCommunityId());
81
+		return responseBean;
82
+	}
83
+}

+ 138
- 0
src/main/java/com/huiju/estateagents/property/controller/CarouselSettingController.java Visa fil

@@ -0,0 +1,138 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.property.common.UserElement;
8
+import com.huiju.estateagents.property.common.base.BaseController;
9
+import com.huiju.estateagents.property.model.TpCarouselSetting;
10
+import com.huiju.estateagents.property.service.ICarouselSettingService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiImplicitParams;
14
+import io.swagger.annotations.ApiOperation;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.web.bind.annotation.RequestBody;
17
+import org.springframework.web.bind.annotation.RequestMapping;
18
+import org.springframework.web.bind.annotation.RequestMethod;
19
+import org.springframework.web.bind.annotation.RestController;
20
+
21
+import javax.servlet.http.HttpSession;
22
+import java.util.HashMap;
23
+import java.util.Map;
24
+
25
+/**
26
+ * <p>
27
+ * 轮播数设置表 前端控制器
28
+ * </p>
29
+ *
30
+ * @author weiximei
31
+ * @since 2019-03-06
32
+ */
33
+@RestController
34
+@RequestMapping("/")
35
+@Api(value = "轮播数设置表 API", description = "轮播数设置表 API")
36
+public class CarouselSettingController extends BaseController {
37
+
38
+    @Autowired
39
+    private ICarouselSettingService iCarouselSettingService;
40
+
41
+    @ApiOperation(value = "添加/修改公告的Banner数量", notes = "添加/修改公告的Banner数量")
42
+    @ApiImplicitParams({
43
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
44
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "parameter", value = "carouselNum数量值")
45
+    })
46
+    @RequestMapping(value = "/carousel/announcement/banner", method = RequestMethod.PUT)
47
+    public ResponseBean updateAnnouncementBanner(@RequestBody String parameter, HttpSession session) {
48
+        ResponseBean responseBean = new ResponseBean();
49
+        UserElement userElement = getUserElement(session);
50
+        QueryWrapper<TpCarouselSetting> queryWrapper = new QueryWrapper<>();
51
+        queryWrapper.eq("community_id", userElement.getCommunityId());
52
+        queryWrapper.eq("carousel_type","announcement");
53
+        TpCarouselSetting one = iCarouselSettingService.getOne(queryWrapper);
54
+        Integer carouselNum = JSONObject.parseObject(parameter).getInteger("carouselNum");
55
+        boolean b = false;
56
+        // 修改
57
+        if (null != one) {
58
+            one.setCarouselNum(carouselNum);
59
+            b = iCarouselSettingService.updateById(one);
60
+        } else {
61
+            one = new TpCarouselSetting();
62
+            one.setCarouselNum(carouselNum);
63
+            one.setCarouselType("announcement");
64
+            one.setCommunityId(userElement.getCommunityId());
65
+            // 添加
66
+            b = iCarouselSettingService.save(one);
67
+
68
+        }
69
+
70
+        if (b) {
71
+            responseBean.addSuccess("操作成功!");
72
+            return responseBean;
73
+        }
74
+        responseBean.addError("操作失败!");
75
+        return responseBean;
76
+    }
77
+
78
+    @ApiOperation(value = "添加/修改活动的Banner数量", notes = "添加/修改活动的Banner数量")
79
+    @ApiImplicitParams({
80
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
81
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "parameter", value = "carouselNum数量值")
82
+    })
83
+    @RequestMapping(value = "/carousel/activity/banner", method = RequestMethod.PUT)
84
+    public ResponseBean updateActivityBanner(@RequestBody String parameter, HttpSession session) {
85
+        ResponseBean responseBean = new ResponseBean();
86
+        UserElement userElement = getUserElement(session);
87
+        QueryWrapper<TpCarouselSetting> queryWrapper = new QueryWrapper<>();
88
+        queryWrapper.eq("community_id", userElement.getCommunityId());
89
+        queryWrapper.eq("carousel_type","activity");
90
+        TpCarouselSetting one = iCarouselSettingService.getOne(queryWrapper);
91
+        Integer carouselNum = JSONObject.parseObject(parameter).getInteger("carouselNum");
92
+        boolean b = false;
93
+        if (null != one) {
94
+            one.setCarouselNum(carouselNum);
95
+            b = iCarouselSettingService.updateById(one);
96
+        } else {
97
+            one = new TpCarouselSetting();
98
+            one.setCarouselType("activity");
99
+            one.setCommunityId(userElement.getCommunityId());
100
+            one.setCarouselNum(carouselNum);
101
+            b = iCarouselSettingService.save(one);
102
+        }
103
+
104
+
105
+        if (b) {
106
+            responseBean.addSuccess("操作成功!");
107
+            return responseBean;
108
+        }
109
+        responseBean.addError("操作失败!");
110
+        return responseBean;
111
+    }
112
+
113
+    @ApiOperation(value = "获取Banner数量", notes = "获取Banner数量")
114
+    @ApiImplicitParams({
115
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
116
+    })
117
+    @RequestMapping(value = "/carousel/getBanner", method = RequestMethod.GET)
118
+    public ResponseBean getBannerNum(HttpSession session) {
119
+        ResponseBean responseBean = new ResponseBean();
120
+        UserElement userElement = getUserElement(session);
121
+        QueryWrapper<TpCarouselSetting> activityQueryWrapper = new QueryWrapper<>();
122
+        activityQueryWrapper.eq("community_id", userElement.getCommunityId());
123
+        activityQueryWrapper.eq("carousel_type","activity");
124
+        TpCarouselSetting activityOne = iCarouselSettingService.getOne(activityQueryWrapper);
125
+
126
+        QueryWrapper<TpCarouselSetting> announcementQueryWrapper = new QueryWrapper<>();
127
+        announcementQueryWrapper.eq("community_id", userElement.getCommunityId());
128
+        announcementQueryWrapper.eq("carousel_type","announcement");
129
+        TpCarouselSetting announcementOne = iCarouselSettingService.getOne(announcementQueryWrapper);
130
+
131
+        Map<String, Object> map = new HashMap<>();
132
+        map.put("activity", activityOne);
133
+        map.put("announcement", announcementOne);
134
+        responseBean.addSuccess(map);
135
+        return responseBean;
136
+    }
137
+
138
+}

+ 48
- 0
src/main/java/com/huiju/estateagents/property/controller/CommunitiesController.java Visa fil

@@ -0,0 +1,48 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.IUserService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+/**
19
+ * <p>
20
+ * 所有小区表 前端控制器
21
+ * </p>
22
+ *
23
+ * @author weiximei
24
+ * @since 2018-12-19
25
+ */
26
+@RestController
27
+
28
+@RequestMapping("/")
29
+@Api(value = "小区Api", description = "小区Api")
30
+public class CommunitiesController extends BaseController {
31
+
32
+    @Autowired
33
+    private IUserService iUserService;
34
+
35
+    @ApiOperation(value = "根据手机号 和 验证码 获取小区列表", notes = "根据手机号 和 验证码 获取小区列表")
36
+    @ApiImplicitParams({
37
+            @ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "loginName手机号;code验证码")
38
+    })
39
+    @RequestMapping(value = "/community/user", method = RequestMethod.POST)
40
+    public ResponseBean userCommunity(@RequestBody String parameter){
41
+        ResponseBean responseBean = new ResponseBean();
42
+
43
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
44
+        responseBean = iUserService.userCommunity(jsonObject.getString("loginName"), jsonObject.getString("code"));
45
+        return responseBean;
46
+    }
47
+
48
+}

+ 147
- 0
src/main/java/com/huiju/estateagents/property/controller/HotelController.java Visa fil

@@ -0,0 +1,147 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.property.common.UserElement;
7
+import com.huiju.estateagents.property.common.base.BaseController;
8
+import com.huiju.estateagents.property.model.Hotel;
9
+import com.huiju.estateagents.property.model.HotelRoom;
10
+import com.huiju.estateagents.property.service.IHotelRoomService;
11
+import com.huiju.estateagents.property.service.IHotelService;
12
+import io.swagger.annotations.Api;
13
+import io.swagger.annotations.ApiImplicitParam;
14
+import io.swagger.annotations.ApiImplicitParams;
15
+import io.swagger.annotations.ApiOperation;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.RequestBody;
18
+import org.springframework.web.bind.annotation.RequestMapping;
19
+import org.springframework.web.bind.annotation.RequestMethod;
20
+import org.springframework.web.bind.annotation.RestController;
21
+
22
+import javax.servlet.http.HttpSession;
23
+
24
+/**
25
+ * <p>
26
+ * 酒店 前端控制器
27
+ * </p>
28
+ *
29
+ * @author jobob
30
+ * @since 2019-05-13
31
+ */
32
+@RestController
33
+@RequestMapping("/")
34
+@Api(value = "", description = "酒店管理API")
35
+public class HotelController extends BaseController {
36
+    @Autowired
37
+    private IHotelService iHotelService;
38
+
39
+    @Autowired
40
+    private IHotelRoomService tpHotelRoomService;
41
+
42
+
43
+    @ApiOperation(value = "房屋列表", notes = "房屋列表")
44
+    @ApiImplicitParams({
45
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "roomNo:房间号" +
46
+                    "roomName:房间名称" +
47
+                    "price:价格" +
48
+                    "roomStatus:(1:是已上架 2:是已下架)" +
49
+                    "beginTime:开始时间"+
50
+                    "endTime:结束时间"+
51
+                    "sort:权重")
52
+    })
53
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
54
+    @RequestMapping(value = "/hotelRoomList", method = RequestMethod.POST)
55
+    public ResponseBean hotelRoom(@RequestBody String parameter, HttpSession session){
56
+        UserElement userElement = getUserElement(session);
57
+        ResponseBean  responseBean = iHotelService.hotelRoomLiset(parameter,userElement.getCommunityId());
58
+        return responseBean;
59
+    }
60
+
61
+    @ApiOperation(value = "添加房间", notes = "添加房间")
62
+    @ApiImplicitParams({
63
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "roomNo:房间号" +
64
+                    "roomName:房间名称" +
65
+                    "price:价格" +
66
+                    "roomStatus:(1:是已上架 2:是已下架)" +
67
+                    "remark:(描述)"+
68
+                    "sort:权重")
69
+    })
70
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
71
+    @RequestMapping(value = "/hotelRoomAdd", method = RequestMethod.POST)
72
+    public ResponseBean hotelRoomAdd(@RequestBody String parameter, HttpSession session){
73
+        UserElement userElement = getUserElement(session);
74
+        ResponseBean  responseBean = iHotelService.hotelRoomAdd(parameter,userElement);
75
+        return responseBean;
76
+    }
77
+
78
+    @ApiOperation(value = "查询当前房间信息", notes = "查询当前房间信息")
79
+    @ApiImplicitParams({
80
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:房间ID")})
81
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
82
+    @RequestMapping(value = "/getRoom", method = RequestMethod.POST)
83
+    public ResponseBean getRoom(@RequestBody String parameter, HttpSession session){
84
+        UserElement userElement = getUserElement(session);
85
+        ResponseBean responseBean= new ResponseBean<>();
86
+
87
+       JSONObject object= JSONObject.parseObject(parameter);
88
+        Integer id= object.getInteger("id");
89
+         HotelRoom totelRoom= tpHotelRoomService.getById(id);
90
+         responseBean.addSuccess(totelRoom);
91
+         return responseBean;
92
+    }
93
+    @ApiOperation(value = "编辑房间", notes = "编辑房间")
94
+    @ApiImplicitParams({
95
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:房间ID,roomNo:房间号" +
96
+                    "roomName:房间名称" +
97
+                    "price:价格" +
98
+                    "roomStatus:(1:是已上架 2:是已下架)" +
99
+                    "remark:(描述)"+
100
+                    "sort:权重")
101
+    })
102
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
103
+    @RequestMapping(value = "/hotelRoomEdit", method = RequestMethod.POST)
104
+    public ResponseBean hotelRoomEdit(@RequestBody String parameter, HttpSession session){
105
+        UserElement userElement = getUserElement(session);
106
+        ResponseBean  responseBean = iHotelService.hotelRoomEdit(parameter,userElement);
107
+        return responseBean;
108
+    }
109
+
110
+    @ApiOperation(value = "修改当前房间上架或下架状态", notes = "修改当前房间上架或下架状态")
111
+    @ApiImplicitParams({
112
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:[]房间ID,roomStatus:(1:是已上架 2:是已下架)"
113
+            )})
114
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
115
+    @RequestMapping(value = "/hotelRoomRoomStatus", method = RequestMethod.POST)
116
+    public ResponseBean hotelRoomRoomStatus(@RequestBody String parameter, HttpSession session){
117
+        UserElement userElement = getUserElement(session);
118
+        ResponseBean  responseBean = iHotelService.hotelRoomRoomStatus(parameter,userElement);
119
+        return responseBean;
120
+    }
121
+    
122
+    @ApiOperation(value = "根据小区获取酒店数据", notes = "根据搜索条件获取角色列表")
123
+    @ApiImplicitParams({
124
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
125
+    })
126
+    @RequestMapping(value = "/getHotelData",method = RequestMethod.GET)
127
+    public ResponseBean getHotelData(HttpSession session) {
128
+        ResponseBean responseBean = new ResponseBean();
129
+        UserElement userElement = getUserElement(session);
130
+        Hotel hotel = iHotelService.getHotelData(userElement);
131
+        responseBean.addSuccess(hotel);
132
+        return responseBean;
133
+    }
134
+    
135
+    @ApiOperation(value = "添加酒店", notes = "添加酒店")
136
+    @ApiImplicitParams({
137
+            @ApiImplicitParam(paramType = "body", dataType = "Hotel", name = "hotel", value = "酒店"),
138
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
139
+    })
140
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
141
+    @RequestMapping(value = "/addHotel", method = RequestMethod.POST)
142
+    public ResponseBean addHotel(@RequestBody Hotel hotel, HttpSession session){
143
+        UserElement userElement = getUserElement(session);
144
+        ResponseBean  responseBean = iHotelService.addHotel(hotel,userElement);
145
+        return responseBean;
146
+    }
147
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/HotelRoomController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 酒店房间表 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-13
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class HotelRoomController extends BaseController {
19
+
20
+}

+ 76
- 0
src/main/java/com/huiju/estateagents/property/controller/ImageController.java Visa fil

@@ -0,0 +1,76 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import com.huiju.estateagents.property.service.ImageServiceI;
6
+import io.swagger.annotations.Api;
7
+import io.swagger.annotations.ApiOperation;
8
+import io.swagger.annotations.ApiParam;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.PostMapping;
11
+import org.springframework.web.bind.annotation.RequestMapping;
12
+import org.springframework.web.bind.annotation.RestController;
13
+import org.springframework.web.multipart.MultipartFile;
14
+import sun.misc.BASE64Decoder;
15
+
16
+import javax.sql.rowset.serial.SerialBlob;
17
+import java.util.ArrayList;
18
+import java.util.List;
19
+
20
+/**
21
+ * @author weichaochao
22
+ * @Title: ImageController
23
+ * @Description: 图片上传以及获取url
24
+ * @date 2018/10/31
25
+ */
26
+@RestController
27
+
28
+@RequestMapping("/")
29
+@Api(value = "图片操作API", description = "图片操作API")
30
+public class ImageController extends BaseController {
31
+
32
+    @Autowired
33
+    private ImageServiceI imageService;
34
+
35
+    @ApiOperation(value = "图片上传以及获取url", notes = "图片上传以及获取url")
36
+    @PostMapping(value = "/uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-data")
37
+    public ResponseBean uploadImgAndGetUrl(@ApiParam(value = "uploadFiles" ,required = true) MultipartFile[] uploadFiles) throws Exception {
38
+        ResponseBean responseBean = new ResponseBean();
39
+        List<String> urls = new ArrayList<String>();
40
+        for (MultipartFile uploadFile : uploadFiles){
41
+            String url = imageService.getImageUrl(uploadFile);
42
+            urls.add(url);
43
+        }
44
+        responseBean.addSuccess(urls);
45
+        return responseBean;
46
+    }
47
+
48
+    @ApiOperation(value = "图片上传以及获取url", notes = "图片上传以及获取url")
49
+    @PostMapping(value = "/uploadimageBase64")
50
+    public ResponseBean uploadImgBase64AndGetUrl(@ApiParam(value = "uploadFiles" ,required = true) String uploadFiles) throws Exception {
51
+        ResponseBean responseBean = new ResponseBean();
52
+        List<String> urls = new ArrayList<String>();
53
+        // int index = uploadFiles.indexOf("data:image/jpeg;base64,");
54
+        //uploadFiles = uploadFiles.substring(23);
55
+        String[] split = uploadFiles.split("base64,");
56
+        SerialBlob serialBlob = null;
57
+        if (split.length > 1) {
58
+            serialBlob = decodeToImage(split[1]);
59
+        } else {
60
+            serialBlob = decodeToImage(split[0]);
61
+        }
62
+
63
+        String url = imageService.getImageUrl(serialBlob.getBinaryStream());
64
+        urls.add(url);
65
+        responseBean.addSuccess(urls);
66
+        return responseBean;
67
+    }
68
+
69
+    public static SerialBlob decodeToImage(String imageString) throws Exception {
70
+        BASE64Decoder decoder = new BASE64Decoder();
71
+        byte[] imageByte = decoder.decodeBuffer(imageString);
72
+        return new SerialBlob(imageByte);
73
+    }
74
+
75
+
76
+}

+ 48
- 0
src/main/java/com/huiju/estateagents/property/controller/IndexCountController.java Visa fil

@@ -0,0 +1,48 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.UserElement;
5
+import com.huiju.estateagents.property.common.base.BaseController;
6
+import com.huiju.estateagents.property.service.IndexCountServiceI;
7
+import com.google.common.collect.Maps;
8
+import io.swagger.annotations.ApiImplicitParam;
9
+import io.swagger.annotations.ApiImplicitParams;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.RestController;
15
+
16
+import javax.servlet.http.HttpSession;
17
+import java.util.Map;
18
+
19
+/**
20
+ * @author FXF
21
+ * @date 2019-05-28
22
+ */
23
+@RestController
24
+@RequestMapping("/")
25
+public class IndexCountController extends BaseController {
26
+	
27
+	@Autowired
28
+	private IndexCountServiceI indexCountService;
29
+	
30
+	@ApiOperation(value = "获取物业端首页所有统计数据", notes = "获取物业端首页所有统计数据")
31
+	@ApiImplicitParams({
32
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
33
+	})
34
+	@RequestMapping(value = "/index/count", method = RequestMethod.GET)
35
+	public ResponseBean getIndexCount(HttpSession session){
36
+		UserElement userElement = getUserElement(session);
37
+		ResponseBean  responseBean = new ResponseBean();
38
+		Map<String,Object> indexCountMap = Maps.newHashMap();
39
+		try {
40
+			indexCountMap = indexCountService.getIndexCount(userElement);
41
+		}catch (Exception e){
42
+			responseBean.addError(e.getMessage());
43
+			return responseBean;
44
+		}
45
+		responseBean.addSuccess(indexCountMap);
46
+		return responseBean;
47
+	}
48
+}

+ 72
- 0
src/main/java/com/huiju/estateagents/property/controller/MessageController.java Visa fil

@@ -0,0 +1,72 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.IMessageService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.servlet.http.HttpSession;
19
+
20
+/**
21
+ * <p>
22
+ * 物业端消息表 前端控制器
23
+ * </p>
24
+ *
25
+ * @author jobob
26
+ * @since 2019-03-05
27
+ */
28
+@RestController
29
+@RequestMapping("/")
30
+@Api(value = "消息通知API", description = "消息通知API")
31
+public class MessageController extends BaseController {
32
+
33
+    @Autowired
34
+    private IMessageService messageService;
35
+    @ApiOperation(value = "消息待办", notes = "消息待办")
36
+    @ApiImplicitParams({
37
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "messageType:待办消息类型(-1:论坛,-2:工单,-3:缴费),status:(0:无效,1:有效),createDate:时间,messageContent:内容 ")
38
+    })
39
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
40
+    @RequestMapping(value = "/messageLiset", method = RequestMethod.POST)
41
+    public ResponseBean messageLiset(@RequestBody String parameter, HttpSession session){
42
+        UserElement userElement = getUserElement(session);
43
+        ResponseBean  responseBean = messageService.messageLiset(parameter,userElement.getCommunityId(),userElement.getId());
44
+        return responseBean;
45
+    }
46
+
47
+    @ApiOperation(value = "我的消息", notes = "我的消息")
48
+    @ApiImplicitParams({
49
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "messageType:消息类型(-1:论坛,-2:工单,-3:缴费),readStatus:(0:未读,1:已读),createDate:时间,messageContent:内容 ")
50
+    })
51
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
52
+    @RequestMapping(value = "/myMessageList", method = RequestMethod.POST)
53
+    public ResponseBean myMessageList(@RequestBody String parameter, HttpSession session){
54
+        UserElement userElement = getUserElement(session);
55
+        ResponseBean  responseBean = messageService.myMessageList(parameter,userElement.getCommunityId(),userElement.getId());
56
+        return responseBean;
57
+    }
58
+
59
+    @ApiOperation(value = "消息已读", notes = "消息已读")
60
+    @ApiImplicitParams({
61
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:(多个) ")
62
+    })
63
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
64
+    @RequestMapping(value = "/delectRead", method = RequestMethod.POST)
65
+    public ResponseBean delectRead(@RequestBody String parameter, HttpSession session){
66
+        UserElement userElement = getUserElement(session);
67
+        ResponseBean  responseBean = messageService.delectRead(parameter,userElement.getId());
68
+        return responseBean;
69
+    }
70
+}
71
+
72
+

+ 107
- 0
src/main/java/com/huiju/estateagents/property/controller/RoleController.java Visa fil

@@ -0,0 +1,107 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.UserElement;
5
+import com.huiju.estateagents.property.common.base.BaseController;
6
+import com.huiju.estateagents.property.model.SysRole;
7
+import com.huiju.estateagents.property.service.RoleServiceI;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+
15
+import javax.servlet.http.HttpSession;
16
+
17
+/**
18
+ * @author FXF
19
+ * @date 2019-01-16
20
+ */
21
+@RestController
22
+
23
+@RequestMapping("/")
24
+@Api(value = "物业端角色API", description = "物业端角色API")
25
+public class RoleController extends BaseController {
26
+	
27
+	@Autowired
28
+	private RoleServiceI roleService;
29
+	
30
+	@ApiOperation(value = "根据搜索条件获取角色列表", notes = "根据搜索条件获取角色列表")
31
+	@ApiImplicitParams({
32
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "roleName", value = "帖子标题(模糊查询)"),
33
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
34
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
35
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
36
+	})
37
+	@RequestMapping(value = "/roles",method = RequestMethod.GET)
38
+	public ResponseBean getRoleList(@RequestParam(value = "roleName", required = false) String roleName,
39
+	                            @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
40
+	                            @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
41
+	                            HttpSession session) {
42
+		ResponseBean responseBean = new ResponseBean();
43
+		UserElement userElement = getUserElement(session);
44
+		responseBean = roleService.getRoleList(roleName,userElement,pageNum,pageSize);
45
+		return responseBean;
46
+	}
47
+	
48
+	@ApiOperation(value = "添加角色", notes = "添加角色")
49
+	@ApiImplicitParams({
50
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
51
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
52
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "roleName角色名称;description角色描述;menuArray菜单id集合")
53
+	})
54
+	@RequestMapping(value = "/role/add", method = RequestMethod.POST)
55
+	public ResponseBean addRole(@RequestBody SysRole sysRole, HttpSession session) {
56
+		ResponseBean responseBean = new ResponseBean();
57
+		UserElement userElement = getUserElement(session);
58
+		responseBean = roleService.addRole(sysRole, userElement);
59
+		return responseBean;
60
+	}
61
+	
62
+	@ApiOperation(value = "获取角色详情", notes = "获取角色详情")
63
+	@ApiImplicitParams({
64
+			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "角色id"),
65
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
66
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
67
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "roleName角色名称;description角色描述;menuArray菜单id集合")
68
+	})
69
+	@RequestMapping(value = "/role/{id}",method = RequestMethod.GET)
70
+	public ResponseBean getRoleInfo(@PathVariable(value = "id", required = false) Integer id,
71
+	                            HttpSession session) {
72
+		ResponseBean responseBean = new ResponseBean();
73
+		UserElement userElement = getUserElement(session);
74
+		responseBean = roleService.getRoleInfo(id,userElement);
75
+		return responseBean;
76
+	}
77
+	
78
+	@ApiOperation(value = "修改角色", notes = "修改角色")
79
+	@ApiImplicitParams({
80
+			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "角色id"),
81
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
82
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
83
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "roleName角色名称;description角色描述;menuArray菜单id集合")
84
+	})
85
+	@RequestMapping(value = "/role/update/{id}", method = RequestMethod.PUT)
86
+	public ResponseBean updateRole(@PathVariable Integer id, @RequestBody SysRole sysRole, HttpSession session) {
87
+		ResponseBean responseBean = new ResponseBean();
88
+		UserElement userElement = getUserElement(session);
89
+		sysRole.setId(id);
90
+		responseBean = roleService.updateRole(sysRole, userElement);
91
+		return responseBean;
92
+	}
93
+	
94
+	@ApiOperation(value = "删除角色", notes = "删除角色")
95
+	@ApiImplicitParams({
96
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
97
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
98
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "sysRole", value = "idArray角色id集合")
99
+	})
100
+	@RequestMapping(value = "/role/delete", method = RequestMethod.POST)
101
+	public ResponseBean deleteRole(@RequestBody SysRole sysRole, HttpSession session) {
102
+		ResponseBean responseBean = new ResponseBean();
103
+		UserElement userElement = getUserElement(session);
104
+		responseBean = roleService.deleteRole(sysRole, userElement);
105
+		return responseBean;
106
+	}
107
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/SysUserRoleController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 物业web端用户是那些角色 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-01-21
15
+ */
16
+@RestController
17
+@RequestMapping("/tp/sys-user-role")
18
+public class SysUserRoleController extends BaseController {
19
+
20
+}

+ 108
- 0
src/main/java/com/huiju/estateagents/property/controller/TaTemporaryLicenseCountController.java Visa fil

@@ -0,0 +1,108 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import com.huiju.estateagents.property.model.TaTemporaryLicenseCount;
6
+import com.huiju.estateagents.property.service.ITaTemporaryLicenseCountService;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.*;
11
+
12
+/**
13
+ * <p>
14
+    * 临时车统计表,按天计算 前端控制器
15
+    * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-05-28
19
+ */
20
+@RestController
21
+@RequestMapping("/")
22
+public class TaTemporaryLicenseCountController extends BaseController {
23
+
24
+    private final Logger logger = LoggerFactory.getLogger(TaTemporaryLicenseCountController.class);
25
+
26
+    @Autowired
27
+    public ITaTemporaryLicenseCountService iTaTemporaryLicenseCountService;
28
+
29
+
30
+    /**
31
+     * 保存对象
32
+     * @param taTemporaryLicenseCount 实体对象
33
+     * @return
34
+     */
35
+    @RequestMapping(value="/taTemporaryLicenseCount/add",method= RequestMethod.POST)
36
+    public ResponseBean tpShopImgAdd(@RequestBody TaTemporaryLicenseCount taTemporaryLicenseCount){
37
+        ResponseBean responseBean = new ResponseBean();
38
+        try {
39
+            if (iTaTemporaryLicenseCountService.save(taTemporaryLicenseCount)){
40
+                responseBean.addSuccess("success");
41
+            }else {
42
+                responseBean.addError("fail");
43
+            }
44
+        }catch (Exception e){
45
+            logger.error("taTemporaryLicenseCountAdd -=- {}",e.toString());
46
+            responseBean.addError(e.getMessage());
47
+        }
48
+        return responseBean;
49
+    }
50
+
51
+    /**
52
+     * 根据id删除对象
53
+     * @param id  实体ID
54
+     */
55
+    @ResponseBody
56
+    @RequestMapping(value="/taTemporaryLicenseCount/delete/{id}", method= RequestMethod.DELETE)
57
+    public ResponseBean taTemporaryLicenseCountDelete(@PathVariable Integer id){
58
+        ResponseBean responseBean = new ResponseBean();
59
+        try {
60
+            if(iTaTemporaryLicenseCountService.removeById(id)){
61
+                responseBean.addSuccess("success");
62
+            }else {
63
+                responseBean.addError("fail");
64
+            }
65
+        }catch (Exception e){
66
+            logger.error("taTemporaryLicenseCountDelete -=- {}",e.toString());
67
+            responseBean.addError(e.getMessage());
68
+        }
69
+        return responseBean;
70
+    }
71
+
72
+    /**
73
+     * 修改对象
74
+     * @param taTemporaryLicenseCount 实体对象
75
+     * @return
76
+     */
77
+    @RequestMapping(value="/taTemporaryLicenseCount/update",method= RequestMethod.PUT)
78
+    public ResponseBean tpShopImgUpdate(@RequestBody TaTemporaryLicenseCount taTemporaryLicenseCount){
79
+        ResponseBean responseBean = new ResponseBean();
80
+        try {
81
+            if (iTaTemporaryLicenseCountService.updateById(taTemporaryLicenseCount)){
82
+                responseBean.addSuccess("success");
83
+            }else {
84
+                responseBean.addError("fail");
85
+            }
86
+        }catch (Exception e){
87
+            logger.error("taTemporaryLicenseCountUpdate -=- {}",e.toString());
88
+            responseBean.addError(e.getMessage());
89
+        }
90
+        return responseBean;
91
+    }
92
+
93
+    /**
94
+     * 根据id查询对象
95
+     * @param id  实体ID
96
+     */
97
+    @RequestMapping(value="/taTemporaryLicenseCount/get/{id}",method= RequestMethod.GET)
98
+    public ResponseBean tpShopImgGet(@PathVariable Integer id){
99
+        ResponseBean responseBean = new ResponseBean();
100
+        try {
101
+            responseBean.addSuccess(iTaTemporaryLicenseCountService.getById(id));
102
+        }catch (Exception e){
103
+            logger.error("taTemporaryLicenseCountDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+}

+ 108
- 0
src/main/java/com/huiju/estateagents/property/controller/TaUserLicenseCountController.java Visa fil

@@ -0,0 +1,108 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import com.huiju.estateagents.property.model.TaUserLicenseCount;
6
+import com.huiju.estateagents.property.service.ITaUserLicenseCountService;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.*;
11
+
12
+/**
13
+ * <p>
14
+    * 月租车统计表,按天计算 前端控制器
15
+    * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-05-28
19
+ */
20
+@RestController
21
+@RequestMapping("/")
22
+public class TaUserLicenseCountController extends BaseController {
23
+
24
+    private final Logger logger = LoggerFactory.getLogger(TaUserLicenseCountController.class);
25
+
26
+    @Autowired
27
+    public ITaUserLicenseCountService iTaUserLicenseCountService;
28
+
29
+
30
+    /**
31
+     * 保存对象
32
+     * @param taUserLicenseCount 实体对象
33
+     * @return
34
+     */
35
+    @RequestMapping(value="/taUserLicenseCount/add",method= RequestMethod.POST)
36
+    public ResponseBean tpShopImgAdd(@RequestBody TaUserLicenseCount taUserLicenseCount){
37
+        ResponseBean responseBean = new ResponseBean();
38
+        try {
39
+            if (iTaUserLicenseCountService.save(taUserLicenseCount)){
40
+                responseBean.addSuccess("success");
41
+            }else {
42
+                responseBean.addError("fail");
43
+            }
44
+        }catch (Exception e){
45
+            logger.error("taUserLicenseCountAdd -=- {}",e.toString());
46
+            responseBean.addError(e.getMessage());
47
+        }
48
+        return responseBean;
49
+    }
50
+
51
+    /**
52
+     * 根据id删除对象
53
+     * @param id  实体ID
54
+     */
55
+    @ResponseBody
56
+    @RequestMapping(value="/taUserLicenseCount/delete/{id}", method= RequestMethod.DELETE)
57
+    public ResponseBean taUserLicenseCountDelete(@PathVariable Integer id){
58
+        ResponseBean responseBean = new ResponseBean();
59
+        try {
60
+            if(iTaUserLicenseCountService.removeById(id)){
61
+                responseBean.addSuccess("success");
62
+            }else {
63
+                responseBean.addError("fail");
64
+            }
65
+        }catch (Exception e){
66
+            logger.error("taUserLicenseCountDelete -=- {}",e.toString());
67
+            responseBean.addError(e.getMessage());
68
+        }
69
+        return responseBean;
70
+    }
71
+
72
+    /**
73
+     * 修改对象
74
+     * @param taUserLicenseCount 实体对象
75
+     * @return
76
+     */
77
+    @RequestMapping(value="/taUserLicenseCount/update",method= RequestMethod.PUT)
78
+    public ResponseBean tpShopImgUpdate(@RequestBody TaUserLicenseCount taUserLicenseCount){
79
+        ResponseBean responseBean = new ResponseBean();
80
+        try {
81
+            if (iTaUserLicenseCountService.updateById(taUserLicenseCount)){
82
+                responseBean.addSuccess("success");
83
+            }else {
84
+                responseBean.addError("fail");
85
+            }
86
+        }catch (Exception e){
87
+            logger.error("taUserLicenseCountUpdate -=- {}",e.toString());
88
+            responseBean.addError(e.getMessage());
89
+        }
90
+        return responseBean;
91
+    }
92
+
93
+    /**
94
+     * 根据id查询对象
95
+     * @param id  实体ID
96
+     */
97
+    @RequestMapping(value="/taUserLicenseCount/get/{id}",method= RequestMethod.GET)
98
+    public ResponseBean tpShopImgGet(@PathVariable Integer id){
99
+        ResponseBean responseBean = new ResponseBean();
100
+        try {
101
+            responseBean.addSuccess(iTaUserLicenseCountService.getById(id));
102
+        }catch (Exception e){
103
+            logger.error("taUserLicenseCountDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+}

+ 87
- 0
src/main/java/com/huiju/estateagents/property/controller/TaUserLicenseOrderController.java Visa fil

@@ -0,0 +1,87 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.ITaUserLicenseOrderService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.apache.poi.ss.usermodel.Workbook;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RequestParam;
17
+import org.springframework.web.bind.annotation.RestController;
18
+
19
+import javax.servlet.http.HttpServletRequest;
20
+import javax.servlet.http.HttpServletResponse;
21
+import javax.servlet.http.HttpSession;
22
+import java.io.OutputStream;
23
+
24
+/**
25
+ * <p>
26
+ * 月租车缴费订单表 前端控制器
27
+ * </p>
28
+ *
29
+ * @author jobob
30
+ * @since 2019-05-13
31
+ */
32
+@RestController
33
+@RequestMapping("/")
34
+@Api(value = "月租车缴费订单表", description = "月租车缴费订单表")
35
+public class TaUserLicenseOrderController extends BaseController {
36
+
37
+    @Autowired
38
+    private ITaUserLicenseOrderService iTaUserLicenseOrderService;
39
+
40
+    @RequestMapping(value = "/user/license/order", method = RequestMethod.GET)
41
+    @ApiOperation(value = "获取月租车缴费记录", notes = "获取月租车缴费记录")
42
+    @ApiImplicitParams({
43
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "Token"),
44
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "licensePlate", value = "车牌号"),
45
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "orderNumber", value = "订单号"),
46
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "paymentName", value = "缴费人姓名"),
47
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "paymentTel", value = "缴费人手机号"),
48
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageNum", value = "第几页"),
49
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "pageSize", value = "一页多少条"),
50
+    })
51
+    public ResponseBean getAll(@RequestParam(value = "id",required = false) Integer id,
52
+                               @RequestParam(value = "licensePlate",required = false) String licensePlate,
53
+                               @RequestParam(value = "orderNumber",required = false) String orderNumber,
54
+                               @RequestParam(value = "paymentName",required = false) String paymentName,
55
+                               @RequestParam(value = "paymentTel",required = false) String paymentTel,
56
+                               @RequestParam(value = "pageNum",defaultValue = "1", required = false) Integer pageNum,
57
+                               @RequestParam(value = "pageSize" ,defaultValue = "10", required = false) Integer pageSize,
58
+                               HttpSession session) {
59
+
60
+        UserElement userElement = getUserElement(session);
61
+        ResponseBean responseBean = iTaUserLicenseOrderService.getAll(id, licensePlate, orderNumber, paymentName, paymentTel, pageNum, pageSize, userElement);
62
+        return responseBean;
63
+    }
64
+
65
+
66
+    @ApiOperation(value = "月租车导出数据", notes = "月租车导出数据")
67
+    @ApiImplicitParams({
68
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "token")
69
+    })
70
+    @RequestMapping(value = "/user/license/export", method = RequestMethod.GET)
71
+    public void exportDate(HttpServletRequest request, HttpServletResponse response, HttpSession session) {
72
+        UserElement userElement = getUserElement(session);
73
+        ResponseBean responseBean = iTaUserLicenseOrderService.exportDate(userElement);
74
+        Workbook workbook = (Workbook) responseBean.getData();
75
+        this.setResponseHeader(response, "月租租车.xlsx");
76
+        //响应到客户端
77
+        try {
78
+            OutputStream os = response.getOutputStream();
79
+            workbook.write(os);
80
+            os.flush();
81
+            os.close();
82
+        } catch (Exception e) {
83
+            e.printStackTrace();
84
+        }
85
+    }
86
+
87
+}

+ 63
- 0
src/main/java/com/huiju/estateagents/property/controller/TaVisitorLicenseSettingController.java Visa fil

@@ -0,0 +1,63 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.ITaVisitorLicenseSettingService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RequestMethod;
15
+import org.springframework.web.bind.annotation.RequestParam;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.servlet.http.HttpSession;
19
+
20
+/**
21
+ * <p>
22
+ * 录入访客车牌功能开关表 前端控制器
23
+ * </p>
24
+ *
25
+ * @author jobob
26
+ * @since 2019-05-27
27
+ */
28
+@RestController
29
+@RequestMapping("/")
30
+@Api(value = "录入访客车牌功能开关", description = "录入访客车牌功能开关")
31
+public class TaVisitorLicenseSettingController extends BaseController {
32
+
33
+    @Autowired
34
+    private ITaVisitorLicenseSettingService taVisitorLicenseSettingService;
35
+
36
+    @ApiOperation(value = "是否开启访客邀请车辆", notes = "是否开启访客邀请车辆")
37
+    @ApiImplicitParams({
38
+            @ApiImplicitParam(dataTypeClass = Boolean.class, paramType = "form", name = "visitorLicenseBool", value = "true 表示开启  false 关闭"),
39
+            @ApiImplicitParam(dataTypeClass = String.class, paramType = "header", name = "X-Auth-Token", value = "Token")
40
+    })
41
+    @RequestMapping(value = "/visitor/saveOrDelete", method = RequestMethod.POST)
42
+    public ResponseBean saveOrDelete(HttpSession session, @RequestParam("visitorLicenseBool") Boolean visitorLicenseBool){
43
+        ResponseBean responseBean = new ResponseBean();
44
+        UserElement userElement = getUserElement(session);
45
+        responseBean = taVisitorLicenseSettingService.saveOrDelete(userElement, visitorLicenseBool);
46
+
47
+        return responseBean;
48
+    }
49
+
50
+
51
+    @ApiOperation(value = "查看是否开启访客车辆邀请", notes = "查看是否开启访客车辆邀请")
52
+    @ApiImplicitParams({
53
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
54
+    })
55
+    @RequestMapping(value = "/visitor", method = RequestMethod.GET)
56
+    public ResponseBean getVisitorLicense(HttpSession session) {
57
+        ResponseBean responseBean = new ResponseBean();
58
+        UserElement userElement = getUserElement(session);
59
+        responseBean = taVisitorLicenseSettingService.getVisitorLicense(userElement);
60
+        return responseBean;
61
+    }
62
+
63
+}

+ 81
- 0
src/main/java/com/huiju/estateagents/property/controller/TpAnnouncementController.java Visa fil

@@ -0,0 +1,81 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.UserElement;
5
+import com.huiju.estateagents.property.common.base.BaseController;
6
+import com.huiju.estateagents.property.service.TpAnnouncementService;
7
+import io.swagger.annotations.Api;
8
+import io.swagger.annotations.ApiImplicitParam;
9
+import io.swagger.annotations.ApiImplicitParams;
10
+import io.swagger.annotations.ApiOperation;
11
+import org.springframework.beans.factory.annotation.Autowired;
12
+import org.springframework.web.bind.annotation.RequestBody;
13
+import org.springframework.web.bind.annotation.RequestMapping;
14
+import org.springframework.web.bind.annotation.RequestMethod;
15
+import org.springframework.web.bind.annotation.RestController;
16
+
17
+import javax.servlet.http.HttpSession;
18
+
19
+@RestController
20
+
21
+@RequestMapping("/")
22
+@Api(value = "公告管理API", description = "公告管理API")
23
+public class TpAnnouncementController extends BaseController {
24
+    @Autowired
25
+    private TpAnnouncementService tpAnnouncementService;
26
+
27
+    @ApiOperation(value = "获取公告管理列表",nickname ="获取公告管理列表")
28
+    @ApiImplicitParams({
29
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:公告编号,announcementTitle:公告标题 ,current:每页显示多少条,current:每页显示多少条,pageSzie:当前页数")})
30
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
31
+    @RequestMapping(value="/tpAnnouncement",method = RequestMethod.POST)
32
+    public ResponseBean tpAnnouncement(@RequestBody String paramets, HttpSession session){
33
+        UserElement userElement = getUserElement(session);
34
+        ResponseBean tpAnnouncementList=tpAnnouncementService.tpAnnouncemenList(paramets,userElement.getCommunityId());
35
+        return tpAnnouncementList;
36
+    }
37
+
38
+    @ApiOperation(value = "添加公告",nickname ="添加公告")
39
+    @ApiImplicitParams({
40
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="announcementTitle:公告标题," +
41
+                    "announcementCarouselImg:轮播图,announcementContent:内容,contentImg:内容图片,sort:权重值,status:'0 是已作废 1 是已发布   2 是草稿 3 是已修改',")})
42
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
43
+    @RequestMapping(value="/addAnnouncement",method = RequestMethod.POST)
44
+    public ResponseBean addAnnouncement(@RequestBody String paramets, HttpSession session){
45
+        UserElement userElement = getUserElement(session);
46
+        ResponseBean  addAnnouncement= tpAnnouncementService.addAnnouncement(paramets,userElement.getCommunityId(),userElement.getId());
47
+        return addAnnouncement;
48
+    }
49
+
50
+    @ApiOperation(value = "查询公告详情",nickname ="查询公告详情")
51
+    @ApiImplicitParams({
52
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:公告id")})
53
+    @RequestMapping(value="/announcementById",method = RequestMethod.POST)
54
+    public ResponseBean announcementById(@RequestBody String paramets){
55
+        ResponseBean tpAnnouncement= tpAnnouncementService.announcementById(paramets);
56
+        return tpAnnouncement;
57
+    }
58
+
59
+    @ApiOperation(value = "修改公告",nickname ="修改公告")
60
+    @ApiImplicitParams({
61
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:公告id,announcementTitle:公告标题," +
62
+                    "announcementCarouselImg:轮播图,announcementContent:内容,contentImg:内容图片,sort:权重值,status:'0 是已作废 1 是已发布   2 是草稿 3 是已修改',")})
63
+    @RequestMapping(value="/updateAnnouncement",method = RequestMethod.POST)
64
+    public ResponseBean updateAnnouncement(@RequestBody String paramets, HttpSession session){
65
+        UserElement userElement = getUserElement(session);
66
+        ResponseBean tpAnnouncement= tpAnnouncementService.updateAnnouncement(paramets,userElement.getCommunityId(),userElement.getId());
67
+        return tpAnnouncement;
68
+    }
69
+
70
+    @ApiOperation(value = "批量删除公告",nickname ="批量删除公告")
71
+    @ApiImplicitParams({
72
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:公告id(多个)")})
73
+    @RequestMapping(value="/deleteAnnouncement",method = RequestMethod.POST)
74
+    public ResponseBean deleteAnnouncement(@RequestBody String paramets, HttpSession session){
75
+        UserElement userElement = getUserElement(session);
76
+        ResponseBean tpAnnouncement= tpAnnouncementService.deleteAnnouncement(paramets,userElement.getCommunityId(),userElement.getId());
77
+        return tpAnnouncement;
78
+    }
79
+
80
+
81
+}

+ 108
- 0
src/main/java/com/huiju/estateagents/property/controller/TpBillInvoiceCountController.java Visa fil

@@ -0,0 +1,108 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.huiju.estateagents.base.ResponseBean;
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import com.huiju.estateagents.property.model.TpBillInvoiceCount;
6
+import com.huiju.estateagents.property.service.ITpBillInvoiceCountService;
7
+import org.slf4j.Logger;
8
+import org.slf4j.LoggerFactory;
9
+import org.springframework.beans.factory.annotation.Autowired;
10
+import org.springframework.web.bind.annotation.*;
11
+
12
+/**
13
+ * <p>
14
+    * 收费单统计表,按天统计 前端控制器
15
+    * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-05-28
19
+ */
20
+@RestController
21
+@RequestMapping("/")
22
+public class TpBillInvoiceCountController extends BaseController {
23
+
24
+    private final Logger logger = LoggerFactory.getLogger(TpBillInvoiceCountController.class);
25
+
26
+    @Autowired
27
+    public ITpBillInvoiceCountService iTpBillInvoiceCountService;
28
+
29
+
30
+    /**
31
+     * 保存对象
32
+     * @param tpBillInvoiceCount 实体对象
33
+     * @return
34
+     */
35
+    @RequestMapping(value="/tpBillInvoiceCount/add",method= RequestMethod.POST)
36
+    public ResponseBean tpShopImgAdd(@RequestBody TpBillInvoiceCount tpBillInvoiceCount){
37
+        ResponseBean responseBean = new ResponseBean();
38
+        try {
39
+            if (iTpBillInvoiceCountService.save(tpBillInvoiceCount)){
40
+                responseBean.addSuccess("success");
41
+            }else {
42
+                responseBean.addError("fail");
43
+            }
44
+        }catch (Exception e){
45
+            logger.error("tpBillInvoiceCountAdd -=- {}",e.toString());
46
+            responseBean.addError(e.getMessage());
47
+        }
48
+        return responseBean;
49
+    }
50
+
51
+    /**
52
+     * 根据id删除对象
53
+     * @param id  实体ID
54
+     */
55
+    @ResponseBody
56
+    @RequestMapping(value="/tpBillInvoiceCount/delete/{id}", method= RequestMethod.DELETE)
57
+    public ResponseBean tpBillInvoiceCountDelete(@PathVariable Integer id){
58
+        ResponseBean responseBean = new ResponseBean();
59
+        try {
60
+            if(iTpBillInvoiceCountService.removeById(id)){
61
+                responseBean.addSuccess("success");
62
+            }else {
63
+                responseBean.addError("fail");
64
+            }
65
+        }catch (Exception e){
66
+            logger.error("tpBillInvoiceCountDelete -=- {}",e.toString());
67
+            responseBean.addError(e.getMessage());
68
+        }
69
+        return responseBean;
70
+    }
71
+
72
+    /**
73
+     * 修改对象
74
+     * @param tpBillInvoiceCount 实体对象
75
+     * @return
76
+     */
77
+    @RequestMapping(value="/tpBillInvoiceCount/update",method= RequestMethod.PUT)
78
+    public ResponseBean tpShopImgUpdate(@RequestBody TpBillInvoiceCount tpBillInvoiceCount){
79
+        ResponseBean responseBean = new ResponseBean();
80
+        try {
81
+            if (iTpBillInvoiceCountService.updateById(tpBillInvoiceCount)){
82
+                responseBean.addSuccess("success");
83
+            }else {
84
+                responseBean.addError("fail");
85
+            }
86
+        }catch (Exception e){
87
+            logger.error("tpBillInvoiceCountUpdate -=- {}",e.toString());
88
+            responseBean.addError(e.getMessage());
89
+        }
90
+        return responseBean;
91
+    }
92
+
93
+    /**
94
+     * 根据id查询对象
95
+     * @param id  实体ID
96
+     */
97
+    @RequestMapping(value="/tpBillInvoiceCount/get/{id}",method= RequestMethod.GET)
98
+    public ResponseBean tpShopImgGet(@PathVariable Integer id){
99
+        ResponseBean responseBean = new ResponseBean();
100
+        try {
101
+            responseBean.addSuccess(iTpBillInvoiceCountService.getById(id));
102
+        }catch (Exception e){
103
+            logger.error("tpBillInvoiceCountDelete -=- {}",e.toString());
104
+            responseBean.addError(e.getMessage());
105
+        }
106
+        return responseBean;
107
+    }
108
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/TpConfigurationController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 设备配置表 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-04-15
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpConfigurationController extends BaseController {
19
+
20
+}

+ 100
- 0
src/main/java/com/huiju/estateagents/property/controller/TpEquipmentController.java Visa fil

@@ -0,0 +1,100 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.ITpEquipmentService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+
15
+import javax.servlet.http.HttpSession;
16
+import java.util.List;
17
+
18
+/**
19
+ * <p>
20
+ * 设备表 前端控制器
21
+ * </p>
22
+ *
23
+ * @author jobob
24
+ * @since 2019-04-15
25
+ */
26
+@RestController
27
+@RequestMapping("/")
28
+@Api(value = "设备表", description = "设备表")
29
+public class TpEquipmentController extends BaseController {
30
+
31
+    @Autowired
32
+    private ITpEquipmentService iTpEquipmentService;
33
+
34
+    @RequestMapping(value = "/equipment/list", method = RequestMethod.GET)
35
+    @ApiOperation(value = "根据类型查询设备表", notes = "根据类型查询设备表")
36
+    @ApiImplicitParams({
37
+        @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "type", value = "1 监控 2 访客机 3 可是对讲"),
38
+        @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
39
+    })
40
+    public ResponseBean getAll(@RequestParam("type") Integer type, HttpSession session) {
41
+        ResponseBean responseBean = new ResponseBean();
42
+        UserElement userElement = getUserElement(session);
43
+        responseBean = iTpEquipmentService.getAllByCommunityAndEquipmentType(userElement, type);
44
+        return responseBean;
45
+    }
46
+
47
+
48
+    @RequestMapping(value = "/equipment/monitoring", method = RequestMethod.POST)
49
+    @ApiOperation(value = "添加或修改监控设备", notes = "添加或修改监控设备")
50
+    @ApiImplicitParams({
51
+            @ApiImplicitParam(paramType = "body", dataTypeClass = Integer.class, name = "parameter", value = "监控设备数据"),
52
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
53
+    })
54
+    public ResponseBean saveOrUpdateMonitoring(@RequestBody String parameter, HttpSession session) {
55
+        ResponseBean responseBean = new ResponseBean();
56
+        UserElement userElement = getUserElement(session);
57
+        responseBean = iTpEquipmentService.saveOrUpdateMonitoring(parameter, userElement);
58
+        return responseBean;
59
+    }
60
+
61
+    @RequestMapping(value = "/equipment/{id}", method = RequestMethod.DELETE)
62
+    @ApiOperation(value = "删除设备", notes = "删除设备")
63
+    @ApiImplicitParams({
64
+            @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "设备id"),
65
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
66
+    })
67
+    public ResponseBean deleteEquipmentById(@PathVariable("id") Integer id, HttpSession session){
68
+        ResponseBean responseBean = new ResponseBean();
69
+        responseBean = iTpEquipmentService.deleteEquipmentById(id);
70
+        return responseBean;
71
+    }
72
+
73
+    @RequestMapping(value = "/equipment/delete", method = RequestMethod.DELETE)
74
+    @ApiOperation(value = "批量删除设备", notes = "批量删除设备")
75
+    @ApiImplicitParams({
76
+            @ApiImplicitParam(paramType = "body", dataTypeClass = Integer.class, name = "ids", value = "设备id"),
77
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
78
+    })
79
+    public ResponseBean deleteBachEquipmentById(@RequestBody List<Integer> ids, HttpSession session){
80
+        ResponseBean responseBean = new ResponseBean();
81
+        responseBean = iTpEquipmentService.deleteBachEquipmentById(ids);
82
+        return responseBean;
83
+    }
84
+
85
+
86
+    @RequestMapping(value = "/equipment/{id}", method = RequestMethod.GET)
87
+    @ApiOperation(value = "根据类型查询设备表", notes = "根据类型查询设备表")
88
+    @ApiImplicitParams({
89
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Integer.class, name = "type", value = "1 监控 2 访客机 3 可是对讲"),
90
+            @ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "设备id"),
91
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
92
+    })
93
+    public ResponseBean getMonitoringById(@RequestParam("type") Integer type, @PathVariable("id") Integer id, HttpSession session) {
94
+        ResponseBean responseBean = new ResponseBean();
95
+        UserElement userElement = getUserElement(session);
96
+        responseBean = iTpEquipmentService.getMonitoringById(userElement, type, id);
97
+        return responseBean;
98
+    }
99
+
100
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/TpEquipmentTreeController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 设备树 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-04-15
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpEquipmentTreeController extends BaseController {
19
+
20
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/TpHotelImgController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 酒店图片 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-14
15
+ */
16
+@RestController
17
+@RequestMapping("/fxf/tp-hotel-img")
18
+public class TpHotelImgController extends BaseController {
19
+
20
+}

+ 169
- 0
src/main/java/com/huiju/estateagents/property/controller/TpRentalHouseController.java Visa fil

@@ -0,0 +1,169 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONArray;
5
+import com.alibaba.fastjson.JSONObject;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.property.common.UserElement;
8
+import com.huiju.estateagents.property.common.base.BaseController;
9
+import com.huiju.estateagents.property.model.TpRentalHouse;
10
+import com.huiju.estateagents.property.service.ITpRentalHouseService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiImplicitParams;
14
+import io.swagger.annotations.ApiOperation;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.web.bind.annotation.*;
17
+
18
+import javax.servlet.http.HttpSession;
19
+import java.time.LocalDateTime;
20
+import java.util.ArrayList;
21
+import java.util.List;
22
+
23
+/**
24
+ * <p>
25
+ * 出租公寓表 前端控制器
26
+ * </p>
27
+ *
28
+ * @author jobob
29
+ * @since 2019-05-13
30
+ */
31
+@RestController
32
+@RequestMapping("/")
33
+
34
+@Api(value = "长租公寓API", description = "长租公寓API")
35
+public class TpRentalHouseController extends BaseController {
36
+	
37
+	@Autowired
38
+	private ITpRentalHouseService tpRentalHouseService;
39
+	
40
+	@ApiOperation(value = "根据搜索条件获取公寓列表", notes = "根据搜索条件获取公寓列表")
41
+	@ApiImplicitParams({
42
+			@ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "房间编号"),
43
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "houseName", value = "房间名称"),
44
+			@ApiImplicitParam(paramType = "query", dataType = "Integer", name = "startPrice", value = "开始价格"),
45
+			@ApiImplicitParam(paramType = "query", dataType = "Integer", name = "endPrice", value = "结束价格"),
46
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "rentalType", value = "租赁方式"),
47
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "houseType", value = "户型"),
48
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "houseStatus", value = "上架状态"),
49
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
50
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
51
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
52
+	})
53
+	@RequestMapping(value = "/rentals",method = RequestMethod.GET)
54
+	public ResponseBean getRentalList(@RequestParam(value = "id") Integer id,
55
+	                                @RequestParam(value = "houseName") String houseName,
56
+	                                @RequestParam(value = "startPrice") Integer startPrice,
57
+	                                @RequestParam(value = "endPrice") Integer endPrice,
58
+	                                @RequestParam(value = "rentalType") String rentalType,
59
+	                                @RequestParam(value = "houseType") String houseType,
60
+	                                @RequestParam(value = "houseStatus") String houseStatus,
61
+	                                @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
62
+	                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
63
+	                                HttpSession session) {
64
+		ResponseBean responseBean = new ResponseBean();
65
+		UserElement userElement = getUserElement(session);
66
+		responseBean = tpRentalHouseService.getRentalList(id,houseName,startPrice,endPrice,rentalType,houseType,houseStatus,userElement,pageNum,pageSize);
67
+		return responseBean;
68
+	}
69
+	
70
+	@ApiOperation(value = "添加公寓", notes = "添加公寓")
71
+	@ApiImplicitParams({
72
+			@ApiImplicitParam(paramType = "body", dataType = "TpRentalHouse", name = "rentalHouse", value = "公寓"),
73
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
74
+	})
75
+	@RequestMapping(value = "/rental/add",method = RequestMethod.POST)
76
+	public ResponseBean saveRental(@RequestBody TpRentalHouse rentalHouse, HttpSession session){
77
+		ResponseBean responseBean = new ResponseBean();
78
+		UserElement userElement = getUserElement(session);
79
+		responseBean = tpRentalHouseService.saveRental(rentalHouse,userElement);
80
+		return responseBean;
81
+	}
82
+	
83
+	@ApiOperation(value = "更新公寓", notes = "更新公寓")
84
+	@ApiImplicitParams({
85
+			@ApiImplicitParam(paramType = "body", dataType = "TpRentalHouse", name = "rentalHouse", value = "公寓"),
86
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
87
+	})
88
+	@RequestMapping(value = "/rental/update",method = RequestMethod.POST)
89
+	public ResponseBean updateRental(@RequestBody TpRentalHouse rentalHouse, HttpSession session){
90
+		ResponseBean responseBean = new ResponseBean();
91
+		UserElement userElement = getUserElement(session);
92
+		responseBean = tpRentalHouseService.updateRental(rentalHouse,userElement);
93
+		return responseBean;
94
+	}
95
+	
96
+	@ApiOperation(value = "获取公寓信息", notes = "获取公寓信息")
97
+	@ApiImplicitParams({
98
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "公寓Id"),
99
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
100
+	})
101
+	@RequestMapping(value = "/rental/get/{id}",method = RequestMethod.GET)
102
+	public ResponseBean getRental(@PathVariable Integer id, HttpSession session){
103
+		ResponseBean responseBean = new ResponseBean();
104
+		UserElement userElement = getUserElement(session);
105
+		TpRentalHouse rentalHouse = tpRentalHouseService.getRentalById(id);
106
+		responseBean.addSuccess(rentalHouse);
107
+		return responseBean;
108
+	}
109
+	
110
+	@ApiOperation(value = "上架房间", notes = "上架房间")
111
+	@ApiImplicitParams({
112
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "房间id集合"),
113
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
114
+	})
115
+	@RequestMapping(value = "/rental/shelf",method = RequestMethod.POST)
116
+	public ResponseBean shelfRental(@RequestBody String jsonString, HttpSession session){
117
+		ResponseBean responseBean = new ResponseBean();
118
+		UserElement userElement = getUserElement(session);
119
+		JSONObject jsonObject = JSONObject.parseObject(jsonString);
120
+		JSONArray ids = jsonObject.getJSONArray("idArray");
121
+		List<TpRentalHouse> rentalList = new ArrayList<>();
122
+		for (Object id : ids){
123
+			TpRentalHouse rentalHouse = new TpRentalHouse();
124
+			rentalHouse.setId((Integer) id);
125
+			rentalHouse.setHouseStatus("1");
126
+			rentalHouse.setUpdateUser(userElement.getId());
127
+			rentalHouse.setUpdateDate(LocalDateTime.now());
128
+			rentalList.add(rentalHouse);
129
+		}
130
+		
131
+		boolean state = tpRentalHouseService.updateBatchById(rentalList);
132
+		if (state){
133
+			responseBean.addSuccess("上架成功");
134
+		}else{
135
+			responseBean.addError("上架失败");
136
+		}
137
+		return responseBean;
138
+	}
139
+	
140
+	@ApiOperation(value = "下架房间", notes = "下架房间")
141
+	@ApiImplicitParams({
142
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "房间id集合"),
143
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
144
+	})
145
+	@RequestMapping(value = "/rental/obtained",method = RequestMethod.POST)
146
+	public ResponseBean obtainedRental(@RequestBody String jsonString, HttpSession session){
147
+		ResponseBean responseBean = new ResponseBean();
148
+		UserElement userElement = getUserElement(session);
149
+		JSONObject jsonObject = JSONObject.parseObject(jsonString);
150
+		JSONArray ids = jsonObject.getJSONArray("idArray");
151
+		List<TpRentalHouse> rentalList = new ArrayList<>();
152
+		for (Object id : ids){
153
+			TpRentalHouse rentalHouse = new TpRentalHouse();
154
+			rentalHouse.setId((Integer) id);
155
+			rentalHouse.setHouseStatus("2");
156
+			rentalHouse.setUpdateUser(userElement.getId());
157
+			rentalHouse.setUpdateDate(LocalDateTime.now());
158
+			rentalList.add(rentalHouse);
159
+		}
160
+		
161
+		boolean state = tpRentalHouseService.updateBatchById(rentalList);
162
+		if (state){
163
+			responseBean.addSuccess("下架成功");
164
+		}else{
165
+			responseBean.addError("下架失败");
166
+		}
167
+		return responseBean;
168
+	}
169
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/TpRentalHouseImgController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 出租房间图片 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-13
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpRentalHouseImgController extends BaseController {
19
+
20
+}

+ 163
- 0
src/main/java/com/huiju/estateagents/property/controller/TpShopController.java Visa fil

@@ -0,0 +1,163 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONArray;
5
+import com.alibaba.fastjson.JSONObject;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.property.common.UserElement;
8
+import com.huiju.estateagents.property.common.base.BaseController;
9
+import com.huiju.estateagents.property.model.TpShop;
10
+import com.huiju.estateagents.property.service.ITpShopService;
11
+import io.swagger.annotations.Api;
12
+import io.swagger.annotations.ApiImplicitParam;
13
+import io.swagger.annotations.ApiImplicitParams;
14
+import io.swagger.annotations.ApiOperation;
15
+import org.springframework.beans.factory.annotation.Autowired;
16
+import org.springframework.web.bind.annotation.*;
17
+
18
+import javax.servlet.http.HttpSession;
19
+import java.time.LocalDateTime;
20
+import java.util.ArrayList;
21
+import java.util.List;
22
+
23
+/**
24
+ * <p>
25
+ * 小区商铺表 前端控制器
26
+ * </p>
27
+ *
28
+ * @author jobob
29
+ * @since 2019-05-10
30
+ */
31
+@RestController
32
+@RequestMapping("/")
33
+
34
+@Api(value = "商铺API", description = "商铺API")
35
+public class TpShopController extends BaseController {
36
+	
37
+	@Autowired
38
+	private ITpShopService shopService;
39
+	
40
+	@ApiOperation(value = "根据搜索条件获取角色列表", notes = "根据搜索条件获取角色列表")
41
+	@ApiImplicitParams({
42
+			@ApiImplicitParam(paramType = "query", dataType = "Integer", name = "id", value = "商铺编号"),
43
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "shopName", value = "商铺名称"),
44
+			@ApiImplicitParam(paramType = "query", dataType = "Integer", name = "shopTypeId", value = "商铺类型"),
45
+			@ApiImplicitParam(paramType = "query", dataType = "String", name = "shopStatus", value = "上架状态"),
46
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
47
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
48
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
49
+	})
50
+	@RequestMapping(value = "/shops",method = RequestMethod.GET)
51
+	public ResponseBean getShopList(@RequestParam(value = "id") Integer id,
52
+	                                @RequestParam(value = "shopName") String shopName,
53
+	                                @RequestParam(value = "shopTypeId") Integer shopTypeId,
54
+	                                @RequestParam(value = "shopStatus") String shopStatus,
55
+	                                @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56
+	                                @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
57
+	                                HttpSession session) {
58
+		ResponseBean responseBean = new ResponseBean();
59
+		UserElement userElement = getUserElement(session);
60
+		responseBean = shopService.getShopList(id,shopName,shopTypeId,shopStatus,userElement,pageNum,pageSize);
61
+		return responseBean;
62
+	}
63
+	
64
+	@ApiOperation(value = "添加商铺", notes = "添加商铺")
65
+	@ApiImplicitParams({
66
+			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
67
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
68
+	})
69
+	@RequestMapping(value = "/shop/add",method = RequestMethod.POST)
70
+	public ResponseBean saveShop(@RequestBody TpShop shop, HttpSession session){
71
+		ResponseBean responseBean = new ResponseBean();
72
+		UserElement userElement = getUserElement(session);
73
+		responseBean = shopService.saveShop(shop,userElement);
74
+		return responseBean;
75
+	}
76
+	
77
+	@ApiOperation(value = "获取商铺信息", notes = "获取商铺信息")
78
+	@ApiImplicitParams({
79
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "商铺Id"),
80
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
81
+	})
82
+	@RequestMapping(value = "/shop/get/{id}",method = RequestMethod.GET)
83
+	public ResponseBean getShop(@PathVariable Integer id, HttpSession session){
84
+		ResponseBean responseBean = new ResponseBean();
85
+		UserElement userElement = getUserElement(session);
86
+		TpShop tpShop = shopService.getShopById(id);
87
+		responseBean.addSuccess(tpShop);
88
+		return responseBean;
89
+	}
90
+	
91
+	@ApiOperation(value = "更新商铺", notes = "更新商铺")
92
+	@ApiImplicitParams({
93
+			@ApiImplicitParam(paramType = "body", dataType = "TpShop", name = "shop", value = "商铺"),
94
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
95
+	})
96
+	@RequestMapping(value = "/shop/update",method = RequestMethod.POST)
97
+	public ResponseBean updateShop(@RequestBody TpShop shop, HttpSession session){
98
+		ResponseBean responseBean = new ResponseBean();
99
+		UserElement userElement = getUserElement(session);
100
+		responseBean = shopService.updateShop(shop,userElement);
101
+		return responseBean;
102
+	}
103
+	
104
+	@ApiOperation(value = "上架商铺", notes = "上架商铺")
105
+	@ApiImplicitParams({
106
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
107
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
108
+	})
109
+	@RequestMapping(value = "/shop/shelf",method = RequestMethod.POST)
110
+	public ResponseBean shelfShop(@RequestBody String jsonString, HttpSession session){
111
+		ResponseBean responseBean = new ResponseBean();
112
+		UserElement userElement = getUserElement(session);
113
+		JSONObject jsonObject = JSONObject.parseObject(jsonString);
114
+		JSONArray ids = jsonObject.getJSONArray("idArray");
115
+		List<TpShop> tpShopList = new ArrayList<>();
116
+		for (Object id : ids){
117
+			TpShop tpShop = new TpShop();
118
+			tpShop.setId((Integer) id);
119
+			tpShop.setShopStatus("1");
120
+			tpShop.setUpdateUser(userElement.getId());
121
+			tpShop.setUpdateDate(LocalDateTime.now());
122
+			tpShopList.add(tpShop);
123
+		}
124
+		
125
+		boolean state = shopService.updateBatchById(tpShopList);
126
+		if (state){
127
+			responseBean.addSuccess("上架成功");
128
+		}else{
129
+			responseBean.addError("上架失败");
130
+		}
131
+		return responseBean;
132
+	}
133
+	
134
+	@ApiOperation(value = "下架商铺", notes = "下架商铺")
135
+	@ApiImplicitParams({
136
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
137
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
138
+	})
139
+	@RequestMapping(value = "/shop/obtained",method = RequestMethod.POST)
140
+	public ResponseBean obtainedShop(@RequestBody String jsonString, HttpSession session){
141
+		ResponseBean responseBean = new ResponseBean();
142
+		UserElement userElement = getUserElement(session);
143
+		JSONObject jsonObject = JSONObject.parseObject(jsonString);
144
+		JSONArray ids = jsonObject.getJSONArray("idArray");
145
+		List<TpShop> tpShopList = new ArrayList<>();
146
+		for (Object id : ids){
147
+			TpShop tpShop = new TpShop();
148
+			tpShop.setId((Integer) id);
149
+			tpShop.setShopStatus("2");
150
+			tpShop.setUpdateUser(userElement.getId());
151
+			tpShop.setUpdateDate(LocalDateTime.now());
152
+			tpShopList.add(tpShop);
153
+		}
154
+		
155
+		boolean state = shopService.updateBatchById(tpShopList);
156
+		if (state){
157
+			responseBean.addSuccess("下架成功");
158
+		}else{
159
+			responseBean.addError("下架失败");
160
+		}
161
+		return responseBean;
162
+	}
163
+}

+ 20
- 0
src/main/java/com/huiju/estateagents/property/controller/TpShopImgController.java Visa fil

@@ -0,0 +1,20 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.property.common.base.BaseController;
5
+import org.springframework.web.bind.annotation.RequestMapping;
6
+import org.springframework.web.bind.annotation.RestController;
7
+
8
+/**
9
+ * <p>
10
+ * 商铺图片 前端控制器
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-10
15
+ */
16
+@RestController
17
+@RequestMapping("/")
18
+public class TpShopImgController extends BaseController {
19
+
20
+}

+ 49
- 0
src/main/java/com/huiju/estateagents/property/controller/TpShopSettingController.java Visa fil

@@ -0,0 +1,49 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.ITpShopSettingService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.RequestBody;
14
+import org.springframework.web.bind.annotation.RequestMapping;
15
+import org.springframework.web.bind.annotation.RequestMethod;
16
+import org.springframework.web.bind.annotation.RestController;
17
+
18
+import javax.servlet.http.HttpSession;
19
+
20
+/**
21
+ * <p>
22
+ * 商铺开关设置 前端控制器
23
+ * </p>
24
+ *
25
+ * @author jobob
26
+ * @since 2019-05-09
27
+ */
28
+@RestController
29
+@RequestMapping("/")
30
+
31
+@Api(value = "商铺配置API", description = "商铺配置API")
32
+public class TpShopSettingController extends BaseController {
33
+
34
+	@Autowired
35
+	private ITpShopSettingService shopSettingService;
36
+	
37
+	@ApiOperation(value = "商铺配置启动和关闭", notes = "商铺配置启动和关闭")
38
+	@ApiImplicitParams({
39
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺配置值"),
40
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
41
+	})
42
+	@RequestMapping(value = "/shop/add/setting",method = RequestMethod.POST)
43
+	public ResponseBean changeShopSetting(@RequestBody String jsonString, HttpSession session){
44
+		ResponseBean responseBean = new ResponseBean();
45
+		UserElement userElement = getUserElement(session);
46
+		responseBean = shopSettingService.changeShopSetting(userElement,jsonString);
47
+		return responseBean;
48
+	}
49
+}

+ 157
- 0
src/main/java/com/huiju/estateagents/property/controller/TpShopTypeController.java Visa fil

@@ -0,0 +1,157 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5
+import com.huiju.estateagents.base.ResponseBean;
6
+import com.huiju.estateagents.property.common.UserElement;
7
+import com.huiju.estateagents.property.common.base.BaseController;
8
+import com.huiju.estateagents.property.model.TpShopType;
9
+import com.huiju.estateagents.property.service.ITpShopTypeService;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiImplicitParam;
12
+import io.swagger.annotations.ApiImplicitParams;
13
+import io.swagger.annotations.ApiOperation;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import javax.servlet.http.HttpSession;
18
+import java.time.LocalDateTime;
19
+import java.util.List;
20
+
21
+/**
22
+ * <p>
23
+ * 商铺类型 前端控制器
24
+ * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-05-09
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+
32
+@Api(value = "商铺类型API", description = "商铺类型API")
33
+public class TpShopTypeController extends BaseController {
34
+	
35
+	@Autowired
36
+	private ITpShopTypeService shopTypeService;
37
+	
38
+	@ApiOperation(value = "获取商铺配置列表", notes = "获取商铺配置列表")
39
+	@ApiImplicitParams({
40
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
41
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
42
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
43
+	})
44
+	@RequestMapping(value = "/shop/types",method = RequestMethod.GET)
45
+	public ResponseBean getTypesList(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
46
+                                     @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, HttpSession session){
47
+		ResponseBean responseBean = new ResponseBean();
48
+		UserElement userElement = getUserElement(session);
49
+		responseBean = shopTypeService.getTypesList(userElement.getCommunityId(),pageNum,pageSize);
50
+		return responseBean;
51
+	}
52
+	
53
+	@ApiOperation(value = "添加商铺类型", notes = "添加商铺类型")
54
+	@ApiImplicitParams({
55
+			@ApiImplicitParam(paramType = "body", dataType = "TpShopType", name = "shopType", value = "商铺类型"),
56
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
57
+	})
58
+	@RequestMapping(value = "/shop/add/type",method = RequestMethod.POST)
59
+	public ResponseBean saveShopType(@RequestBody TpShopType shopType, HttpSession session){
60
+		ResponseBean responseBean = new ResponseBean();
61
+		UserElement userElement = getUserElement(session);
62
+		shopType.setCommunityId(userElement.getCommunityId());
63
+		shopType.setSource("self");
64
+		shopType.setCreateUser(userElement.getId());
65
+		shopType.setCreateDate(LocalDateTime.now());
66
+		//查看索引是否存在
67
+		QueryWrapper<TpShopType> shopTypeQueryWrapper = new QueryWrapper<>();
68
+		shopTypeQueryWrapper.eq("community_id",shopType.getCommunityId());
69
+		shopTypeQueryWrapper.eq("sort",shopType.getSort());
70
+		List<TpShopType> list = shopTypeService.list(shopTypeQueryWrapper);
71
+		if (list.size() > 0){
72
+			responseBean.addError("此索引已存在");
73
+			return responseBean;
74
+		}
75
+		boolean state  = shopTypeService.save(shopType);
76
+		if (state){
77
+			responseBean.addSuccess("添加成功");
78
+		}else{
79
+			responseBean.addError("添加失败");
80
+		}
81
+		return responseBean;
82
+	}
83
+	
84
+	@ApiOperation(value = "获取商铺类型", notes = "获取商铺类型")
85
+	@ApiImplicitParams({
86
+			@ApiImplicitParam(paramType = "path", dataType = "Integer", name = "id", value = "商铺类型Id"),
87
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
88
+	})
89
+	@RequestMapping(value = "/shop/get/type/{id}",method = RequestMethod.GET)
90
+	public ResponseBean getShopType(@PathVariable Integer id, HttpSession session){
91
+		ResponseBean responseBean = new ResponseBean();
92
+		UserElement userElement = getUserElement(session);
93
+		TpShopType tpShopType = shopTypeService.getById(id);
94
+		responseBean.addSuccess(tpShopType);
95
+		return responseBean;
96
+	}
97
+	
98
+	@ApiOperation(value = "更新商铺类型", notes = "更新商铺类型")
99
+	@ApiImplicitParams({
100
+			@ApiImplicitParam(paramType = "body", dataType = "TpShopType", name = "shopType", value = "商铺类型"),
101
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
102
+	})
103
+	@RequestMapping(value = "/shop/update/type",method = RequestMethod.POST)
104
+	public ResponseBean updateShopType(@RequestBody TpShopType shopType, HttpSession session){
105
+		ResponseBean responseBean = new ResponseBean();
106
+		UserElement userElement = getUserElement(session);
107
+		//查看索引是否存在
108
+		QueryWrapper<TpShopType> shopTypeQueryWrapper = new QueryWrapper<>();
109
+		shopTypeQueryWrapper.eq("community_id",userElement.getCommunityId());
110
+		shopTypeQueryWrapper.eq("sort",shopType.getSort());
111
+		shopTypeQueryWrapper.ne("id",shopType.getId());
112
+		List<TpShopType> list = shopTypeService.list(shopTypeQueryWrapper);
113
+		if (list.size() > 0){
114
+			responseBean.addError("此索引已存在");
115
+			return responseBean;
116
+		}
117
+		
118
+		boolean state  = shopTypeService.updateById(shopType);
119
+		if (state){
120
+			responseBean.addSuccess("更新成功");
121
+		}else{
122
+			responseBean.addError("更新失败");
123
+		}
124
+		return responseBean;
125
+	}
126
+	
127
+	@ApiOperation(value = "删除商铺类型", notes = "删除商铺类型")
128
+	@ApiImplicitParams({
129
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "jsonString", value = "商铺id集合"),
130
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
131
+	})
132
+	@RequestMapping(value = "/shop/delete/type",method = RequestMethod.DELETE)
133
+	public ResponseBean deleteShopType(@RequestBody String jsonString, HttpSession session){
134
+		ResponseBean responseBean = new ResponseBean();
135
+		responseBean = shopTypeService.deleteShopType(jsonString);
136
+		return responseBean;
137
+	}
138
+	
139
+	@ApiOperation(value = "获取商铺配置列表", notes = "获取商铺配置列表")
140
+	@ApiImplicitParams({
141
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
142
+			@ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度"),
143
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token")
144
+	})
145
+	@RequestMapping(value = "/shop/type/select",method = RequestMethod.GET)
146
+	public ResponseBean getTypesSelect(@RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
147
+                                       @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize, HttpSession session){
148
+		ResponseBean responseBean = new ResponseBean();
149
+		UserElement userElement = getUserElement(session);
150
+		QueryWrapper<TpShopType> queryWrapper = new QueryWrapper<>();
151
+		queryWrapper.eq("community_id",userElement.getCommunityId());
152
+		queryWrapper.orderByAsc("sort");
153
+		queryWrapper.orderByAsc("create_date");
154
+		responseBean.addSuccess(shopTypeService.list(queryWrapper));
155
+		return responseBean;
156
+	}
157
+}

+ 112
- 0
src/main/java/com/huiju/estateagents/property/controller/TpTicketController.java Visa fil

@@ -0,0 +1,112 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.IUserService;
8
+import com.huiju.estateagents.property.service.TpTicketService;
9
+import io.swagger.annotations.Api;
10
+import io.swagger.annotations.ApiImplicitParam;
11
+import io.swagger.annotations.ApiImplicitParams;
12
+import io.swagger.annotations.ApiOperation;
13
+import org.springframework.beans.factory.annotation.Autowired;
14
+import org.springframework.web.bind.annotation.RequestBody;
15
+import org.springframework.web.bind.annotation.RequestMapping;
16
+import org.springframework.web.bind.annotation.RequestMethod;
17
+import org.springframework.web.bind.annotation.RestController;
18
+
19
+import javax.servlet.http.HttpSession;
20
+
21
+/**
22
+ * <p>
23
+ * 工单表 前端控制器
24
+ * </p>
25
+ *
26
+ * @author jobob
27
+ * @since 2019-02-14
28
+ */
29
+@RestController
30
+@RequestMapping("/")
31
+@Api(value = "工单列表API", description = "工单列表API")
32
+public class TpTicketController extends BaseController {
33
+    @Autowired
34
+    private IUserService userService;
35
+
36
+    @Autowired
37
+    private TpTicketService tpTicketService;
38
+    @ApiOperation(value = "工单列表", notes = "工单列表")
39
+    @ApiImplicitParams({
40
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:工单编号," +
41
+                    "type:工单类型(1:投诉 2:报修   3:联系物业)," +
42
+                    "ticketTitle:工单标题,createUser:发起人," +
43
+                    "status:流转状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止')" +
44
+                    "tpUserId:当前处理人" )
45
+    })
46
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
47
+    @RequestMapping(value = "/ticketLiset", method = RequestMethod.POST)
48
+    public ResponseBean ticketLiset(@RequestBody String parameter, HttpSession session){
49
+        UserElement userElement = getUserElement(session);
50
+        ResponseBean  responseBean = tpTicketService.ticketLiset(parameter,userElement.getCommunityId());
51
+        return responseBean;
52
+    }
53
+
54
+    @ApiOperation(value = "工单详情", notes = "工单详情")
55
+    @ApiImplicitParams({
56
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:工单编号")
57
+    })
58
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
59
+    @RequestMapping(value = "/ticketDetails", method = RequestMethod.POST)
60
+    public ResponseBean ticketDetails(@RequestBody String parameter, HttpSession session){
61
+        UserElement userElement = getUserElement(session);
62
+        ResponseBean  responseBean = tpTicketService.ticketDetails(parameter,userElement.getId(),userElement.getCommunityId());
63
+        return responseBean;
64
+    }
65
+    @ApiOperation(value = "添加工单对话", notes = "添加工单对话")
66
+    @ApiImplicitParams({
67
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "content:对话内容,imageUrl:[]图片,ticketId:工单id," +
68
+                    "status:工单状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止)")
69
+    })
70
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
71
+    @RequestMapping(value = "/addRecordComment", method = RequestMethod.POST)
72
+    public ResponseBean addRecordComment(@RequestBody String parameter, HttpSession session){
73
+        UserElement userElement = getUserElement(session);
74
+        ResponseBean  responseBean = tpTicketService.addRecordComment(parameter,userElement.getId(),userElement.getCommunityId(),userElement.getUserName());
75
+        return responseBean;
76
+    }
77
+    @ApiOperation(value = "工单受理分配", notes = "工单受理分配")
78
+    @ApiImplicitParams({
79
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "ticketId:工单id," +
80
+                    "id:当前处理人id")
81
+    })
82
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
83
+    @RequestMapping(value = "/addRecord", method = RequestMethod.POST)
84
+    public ResponseBean addRecord(@RequestBody String parameter, HttpSession session){
85
+        UserElement userElement = getUserElement(session);
86
+        ResponseBean  responseBean = tpTicketService.addRecord(parameter,userElement.getId(),userElement.getCommunityId());
87
+        return responseBean;
88
+    }
89
+    @ApiOperation(value = "修改工单状态为拒绝处理", notes = "修改工单状态为拒绝处理")
90
+    @ApiImplicitParams({
91
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "ticketId:工单id,textContent:拒绝的内容" )
92
+    })
93
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
94
+    @RequestMapping(value = "/updateTicketStatus", method = RequestMethod.POST)
95
+    public ResponseBean updateTicketStatus(@RequestBody String parameter, HttpSession session){
96
+        UserElement userElement = getUserElement(session);
97
+        ResponseBean  responseBean = tpTicketService.updateTicketStatus(parameter,userElement.getId(),userElement.getCommunityId(),userElement.getUserName(),userElement.getLoginName());
98
+        return responseBean;
99
+    }
100
+
101
+    @ApiOperation(value = "修改当前状态为待评价", notes = "修改当前状态为待评价")
102
+    @ApiImplicitParams({
103
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "content:对话内容,imageUrl:[]图片,ticketId:工单id" )
104
+    })
105
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
106
+    @RequestMapping(value = "/updateTicket", method = RequestMethod.POST)
107
+    public ResponseBean updateTicket(@RequestBody String parameter, HttpSession session){
108
+        UserElement userElement = getUserElement(session);
109
+        ResponseBean  responseBean = tpTicketService.updateTicket(parameter,userElement.getId(),userElement.getCommunityId(),userElement.getUserName(),userElement.getLoginName());
110
+        return responseBean;
111
+    }
112
+}

+ 152
- 0
src/main/java/com/huiju/estateagents/property/controller/TransactionController.java Visa fil

@@ -0,0 +1,152 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.property.common.UserElement;
6
+import com.huiju.estateagents.property.common.base.BaseController;
7
+import com.huiju.estateagents.property.service.ITransactionService;
8
+import io.swagger.annotations.Api;
9
+import io.swagger.annotations.ApiImplicitParam;
10
+import io.swagger.annotations.ApiImplicitParams;
11
+import io.swagger.annotations.ApiOperation;
12
+import org.springframework.beans.factory.annotation.Autowired;
13
+import org.springframework.web.bind.annotation.*;
14
+
15
+import javax.servlet.http.HttpSession;
16
+
17
+/**
18
+ * <p>
19
+ * 物业web端二手交易表 前端控制器
20
+ * </p>
21
+ *
22
+ * @author jobob
23
+ * @since 2018-12-29
24
+ */
25
+@RestController
26
+
27
+@RequestMapping("/")
28
+@Api(value = "二手租赁相关信息", description = "二手租赁相关信息Api")
29
+public class TransactionController extends BaseController {
30
+	
31
+	@Autowired
32
+	private ITransactionService transactionService;
33
+	
34
+	@ApiOperation(value = "根据搜索条件获取二手租赁列表", notes = "根据搜索条件获取二手租赁列表")
35
+	@ApiImplicitParams({
36
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:话题编号,transactionTitle:标题" +
37
+					"userName:发布人,status:状态,pageNum:总数,pageSize当前页"
38
+					)
39
+	})
40
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
41
+	@RequestMapping(value = "/transactions",method = RequestMethod.POST)
42
+	public ResponseBean getList(@RequestBody String parameter, HttpSession session){
43
+		UserElement userElement = getUserElement(session);
44
+		ResponseBean responseBean = transactionService.getTransactionList(parameter,userElement.getCommunityId() );
45
+		return responseBean;
46
+	}
47
+	
48
+	@ApiOperation(value = "获取二手租赁详情", notes = "获取二手租赁详情")
49
+	@ApiImplicitParams({
50
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
51
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
52
+			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "交易id")
53
+	})
54
+	@RequestMapping(value = "/transaction/{id}",method = RequestMethod.GET)
55
+	public ResponseBean getList(@PathVariable(value = "id") Integer id, HttpSession session){
56
+		ResponseBean responseBean = new ResponseBean();
57
+		UserElement userElement = getUserElement(session);
58
+		responseBean = transactionService.getTransactionInfo(id);
59
+		return responseBean;
60
+	}
61
+	
62
+	@ApiOperation(value = "作废二手租赁", notes = "作废二手租赁")
63
+	@ApiImplicitParams({
64
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
65
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
66
+			@ApiImplicitParam(paramType = "path", dataTypeClass = Integer.class, name = "id", value = "交易id")
67
+	})
68
+	@RequestMapping(value = "/transaction/update/{id}",method = RequestMethod.POST)
69
+	public ResponseBean updateTransaction(@PathVariable(value = "id") Integer id, HttpSession session){
70
+		ResponseBean responseBean = new ResponseBean();
71
+		UserElement userElement = getUserElement(session);
72
+		responseBean = transactionService.updateTransactionById(id,userElement.getId());
73
+		return responseBean;
74
+	}
75
+
76
+	@ApiOperation(value = "添加二手租赁",nickname ="添加二手租赁")
77
+	@ApiImplicitParams({
78
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="transactionTitle:话题标题," +
79
+					"type:0 代表 二手(卖二手物品)  1 是代表 求购 (买二手物品) 2 是代表 租赁(租二手物品)3其他话题,contentImg:图片,sort:权重值,status:'0 是已作废 1 是已发布  2 是草稿 ")})
80
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
81
+	@RequestMapping(value="/transactions/add",method = RequestMethod.POST)
82
+	public ResponseBean transactionsAdd(@RequestBody String paramets, HttpSession session){
83
+		UserElement userElement = getUserElement(session);
84
+		ResponseBean  addAnnouncement= transactionService.transactionsAdd(paramets,userElement);
85
+		return addAnnouncement;
86
+	}
87
+
88
+	@ApiOperation(value = "修改二手租赁",nickname ="修改二手租赁")
89
+	@ApiImplicitParams({
90
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="transactionTitle:话题标题," +
91
+					"type:0 代表 二手(卖二手物品)  1 是代表 求购 (买二手物品) 2 是代表 租赁(租二手物品)3其他话题,contentImg:图片,sort:权重值,status:'0 是已作废 1 是已发布  2 是草稿 ")})
92
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
93
+	@RequestMapping(value="/transactions/updata",method = RequestMethod.POST)
94
+	public ResponseBean transactionsUpdata(@RequestBody String paramets, HttpSession session){
95
+		UserElement userElement = getUserElement(session);
96
+		ResponseBean  transactionsUpdata= transactionService.transactionsUpdata(paramets,userElement.getCommunityId(),userElement.getId());
97
+		return transactionsUpdata;
98
+	}
99
+	@ApiOperation(value = "删除二手租赁",nickname ="删除二手租赁")
100
+	@ApiImplicitParams({
101
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个)" )})
102
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
103
+	@RequestMapping(value="/transactions/delete",method = RequestMethod.POST)
104
+	public ResponseBean transactionsDelete(@RequestBody String paramets, HttpSession session){
105
+		UserElement userElement = getUserElement(session);
106
+		ResponseBean  transactionsUpdata= transactionService.transactionsDelete(paramets,userElement.getCommunityId(),userElement.getId());
107
+		return transactionsUpdata;
108
+	}
109
+
110
+	@ApiOperation(value = "二手评论列表",nickname ="二手评论列表")
111
+	@ApiImplicitParams({
112
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id,replyTaUserName:被回复人,taUserName:回复人," +
113
+					"status:(0回复我的,1回复全部物业人员的,2全部物业人员回复的,3话题发起人回复的),createDate:时间" )})
114
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
115
+	@RequestMapping(value="/transactionReplyList",method = RequestMethod.POST)
116
+	public ResponseBean transactionReplyList(@RequestBody String paramets, HttpSession session){
117
+		UserElement userElement = getUserElement(session);
118
+		ResponseBean  transactionReplyList= transactionService.transactionReplyList(paramets,userElement);
119
+		return transactionReplyList;
120
+	}
121
+
122
+	@ApiOperation(value = "删除二手帖子评论",nickname ="删除二手帖子评论")
123
+	@ApiImplicitParams({
124
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id(多个)" )})
125
+	@RequestMapping(value="/deleteReply",method = RequestMethod.POST)
126
+	public ResponseBean deleteReply(@RequestBody String paramets, HttpSession session){
127
+		ResponseBean  transactionsUpdata= transactionService.deleteReply(paramets);
128
+		return transactionsUpdata;
129
+	}
130
+
131
+	@ApiOperation(value = "添加二手帖子评论",nickname ="添加二手帖子评论")
132
+	@ApiImplicitParams({
133
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value ="id:帖子id,contentImg:评论所带图片,replyContent:评论内容" )})
134
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
135
+	@RequestMapping(value="/transactionReply/add",method = RequestMethod.POST)
136
+	public ResponseBean transactionReplyAdd(@RequestBody String paramets, HttpSession session){
137
+		UserElement userElement = getUserElement(session);
138
+		ResponseBean  transactionReplyAdd= transactionService.transactionReplyAdd(paramets,userElement);
139
+		return transactionReplyAdd;
140
+	}
141
+
142
+	@ApiOperation(value = "二手帖子举报列表",nickname ="二手帖子举报列表")
143
+	@ApiImplicitParams({
144
+			@ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =":举报人姓名,reportPhone:举报人电话,transactionId:帖子ID" )})
145
+	@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
146
+	@RequestMapping(value="/transactionReportList",method = RequestMethod.POST)
147
+	public ResponseBean transactionReportList(@RequestBody String paramets, HttpSession session){
148
+		UserElement userElement = getUserElement(session);
149
+		ResponseBean  transactionReplyList= transactionService.transactionReportList(paramets,userElement);
150
+		return transactionReplyList;
151
+	}
152
+}

+ 196
- 0
src/main/java/com/huiju/estateagents/property/controller/UserController.java Visa fil

@@ -0,0 +1,196 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+
4
+import com.alibaba.fastjson.JSONObject;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.base.ResponseBean;
7
+import com.huiju.estateagents.property.common.UserElement;
8
+import com.huiju.estateagents.property.common.base.BaseController;
9
+import com.huiju.estateagents.property.service.IUserService;
10
+import com.huiju.estateagents.property.vo.UserVO;
11
+import com.google.common.collect.Maps;
12
+import io.swagger.annotations.Api;
13
+import io.swagger.annotations.ApiImplicitParam;
14
+import io.swagger.annotations.ApiImplicitParams;
15
+import io.swagger.annotations.ApiOperation;
16
+import org.springframework.beans.factory.annotation.Autowired;
17
+import org.springframework.web.bind.annotation.*;
18
+
19
+import javax.servlet.http.HttpSession;
20
+import java.util.Map;
21
+
22
+/**
23
+ * <p>
24
+ * 物业web端用户表 前端控制器
25
+ * </p>
26
+ *
27
+ * @author jobob
28
+ * @since 2018-12-18
29
+ */
30
+@RestController
31
+
32
+@RequestMapping("/")
33
+@Api(value = "物业端用户API", description = "物业端用户API")
34
+public class UserController extends BaseController {
35
+	
36
+	@Autowired
37
+	private IUserService userService;
38
+	
39
+	@ApiOperation(value = "获取用户列表",nickname = "获取用户信息")
40
+	@ApiImplicitParams({
41
+			//@ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
42
+	})
43
+	@RequestMapping(value = "/users",method = RequestMethod.GET)
44
+	public ResponseBean getInfo(HttpSession session) {
45
+		ResponseBean response = new ResponseBean();
46
+		response.addSuccess(userService.list());
47
+		Page a = new Page(1,10);
48
+//		response.addSuccess(userService.page(a));
49
+		return response;
50
+	}
51
+
52
+	@ApiOperation(value = "登陆", notes = "登陆")
53
+	@ApiImplicitParams({
54
+			@ApiImplicitParam(paramType = "body", dataTypeClass = String.class, name = "parameter", value = "loginName手机号;code验证码;communityId小区Id"),
55
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
56
+	})
57
+	@RequestMapping(value = "/user/login", method = RequestMethod.POST)
58
+	public ResponseBean login(@RequestBody String parameter, HttpSession session){
59
+		ResponseBean responseBean = new ResponseBean();
60
+		JSONObject jsonObject = JSONObject.parseObject(parameter);
61
+		responseBean = userService.login(jsonObject.getString("loginName"),
62
+				jsonObject.getInteger("communityId"),
63
+				jsonObject.getString("code"));
64
+
65
+		// 为 0 表示成功
66
+		if ("0".equals(responseBean.getCode())) {
67
+			UserVO userVO = (UserVO)responseBean.getData();
68
+			setUserElement(session,userVO);
69
+			userVO.setToken(session.getId());
70
+		}
71
+
72
+		return responseBean;
73
+	}
74
+
75
+	@ApiOperation(value = "获取用户信息", notes = "获取用户信息")
76
+	@ApiImplicitParams({
77
+		@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
78
+		@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
79
+	})
80
+	@RequestMapping(value = "/user/info", method = RequestMethod.GET)
81
+	public ResponseBean info(HttpSession session){
82
+		ResponseBean responseBean = new ResponseBean();
83
+		UserElement userElement = getUserElement(session);
84
+		responseBean = userService.userInfo(userElement);
85
+		UserVO userVO = (UserVO)responseBean.getData();
86
+		userVO.setCommunityId(userElement.getCommunityId());
87
+		return responseBean;
88
+	}
89
+
90
+	@ApiOperation(value = "注销登录", notes = "注销登录")
91
+	@ApiImplicitParams({
92
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "Token"),
93
+			@ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "Login-Type", value = "值为 web"),
94
+	})
95
+	@RequestMapping(value = "/user/logOut", method = RequestMethod.POST)
96
+	public ResponseBean longOut(HttpSession session){
97
+		ResponseBean responseBean = new ResponseBean();
98
+		cleanUserSession(session);
99
+		responseBean.addSuccess("退出成功!");
100
+		return responseBean;
101
+	}
102
+	@ApiOperation(value = "用户成员列表", notes = "用户成员列表")
103
+	@ApiImplicitParams({
104
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号, " +
105
+					"userName:用户名,pageNum:第几页,pageSize:每页长度")
106
+	})
107
+	@RequestMapping(value = "/user/userList", method = RequestMethod.POST)
108
+	public ResponseBean userList(@RequestBody String parameter, HttpSession session){
109
+		UserElement userElement = getUserElement(session);
110
+		ResponseBean  responseBean = userService.userList(parameter,userElement.getCommunityId());
111
+		return responseBean;
112
+	}
113
+
114
+	@ApiOperation(value = "添加成员", notes = "用户成员列表")
115
+	@ApiImplicitParams({
116
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名,menuArray[]:角色ID,remark:备注" )
117
+	})
118
+	@RequestMapping(value = "/user/addUser", method = RequestMethod.POST)
119
+	public ResponseBean addUser(@RequestBody String parameter, HttpSession session){
120
+		UserElement userElement = getUserElement(session);
121
+		ResponseBean  responseBean = userService.addUser(parameter,userElement.getId(),userElement.getCommunityId());
122
+		return responseBean;
123
+	}
124
+
125
+	@ApiOperation(value = "修改成员", notes = "修改成员")
126
+	@ApiImplicitParams({
127
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "loginName:手机号,userName:姓名,menuArray[]:角色ID,remark:备注,id:修改id" )
128
+	})
129
+	@RequestMapping(value = "/user/upDate", method = RequestMethod.POST)
130
+	public ResponseBean upDate(@RequestBody String parameter, HttpSession session){
131
+		UserElement userElement = getUserElement(session);
132
+		ResponseBean  responseBean = userService.upDate(parameter,userElement.getId(),userElement.getCommunityId());
133
+		return responseBean;
134
+	}
135
+
136
+	@ApiOperation(value = "查看成员详情", notes = "查看成员详情")
137
+	@ApiImplicitParams({
138
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value="id:当前id")
139
+	})
140
+	@RequestMapping(value = "/user/selectById", method = RequestMethod.POST)
141
+	public ResponseBean selectById(@RequestBody String parameter, HttpSession session){
142
+		UserElement userElement = getUserElement(session);
143
+		ResponseBean  responseBean = userService.selectById(parameter,userElement.getId());
144
+		return responseBean;
145
+	}
146
+
147
+	@ApiOperation(value = "修改当前状态", notes = "修改当前状态")
148
+	@ApiImplicitParams({
149
+			@ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value=("status:传入当前状态(0:无效,1:有效),id:当前修改的id"))
150
+	})
151
+	@RequestMapping(value = "/user/upDateStatus", method = RequestMethod.POST)
152
+	public ResponseBean upDateStatus(@RequestBody String parameter, HttpSession session){
153
+		UserElement userElement = getUserElement(session);
154
+		ResponseBean  responseBean = userService.upDateStatus(parameter,userElement.getId());
155
+		return responseBean;
156
+	}
157
+
158
+	@ApiOperation(value = "查看所有角色", notes = "查看所有角色")
159
+	@RequestMapping(value = "/user/userRole", method = RequestMethod.POST)
160
+	public ResponseBean userRole(@RequestBody String parameter, HttpSession session){
161
+		UserElement userElement = getUserElement(session);
162
+		ResponseBean  responseBean = userService.allUserRole(userElement.getCommunityId());
163
+		return responseBean;
164
+	}
165
+
166
+	@ApiOperation(value = "获取令牌", notes = "获取令牌")
167
+	@ApiImplicitParams({
168
+			@ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "appid", value = "提供的appid"),
169
+			@ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "datetime", value = "时间戳"),
170
+			@ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "encrypt", value = "encrypt加密方式(目前值为md5)"),
171
+			@ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "communityId", value = "提供的小区编号"),
172
+			@ApiImplicitParam(dataTypeClass = String.class, paramType = "query", name = "sign", value = "生成的签名"),
173
+	})
174
+	@RequestMapping(value = "/user/token", method = RequestMethod.GET)
175
+	public ResponseBean daSuToken(@RequestParam("appid") String appid,
176
+								  @RequestParam("datetime") String datetime,
177
+								  @RequestParam("encrypt") String encrypt,
178
+								  @RequestParam("communityId") String communityId,
179
+								  @RequestParam("sign") String sign,
180
+								  HttpSession session){
181
+		ResponseBean responseBean = new ResponseBean();
182
+		responseBean = userService.daSuToken(appid, datetime, encrypt, communityId, sign);
183
+		// 为 0 表示成功
184
+		if ("0".equals(responseBean.getCode())) {
185
+			UserVO userVO = (UserVO)responseBean.getData();
186
+			setUserElement(session,userVO);
187
+			userVO.setToken(session.getId());
188
+
189
+			Map<String, Object> map = Maps.newHashMap();
190
+			map.put("token", session.getId());
191
+			responseBean.addSuccess(map);
192
+		}
193
+		return responseBean;
194
+	}
195
+
196
+}

+ 176
- 0
src/main/java/com/huiju/estateagents/property/controller/UserVerifyController.java Visa fil

@@ -0,0 +1,176 @@
1
+package com.huiju.estateagents.property.controller;
2
+
3
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4
+import com.huiju.estateagents.base.ResponseBean;
5
+import com.huiju.estateagents.center.taUser.service.ITaUserService;
6
+import com.huiju.estateagents.property.common.UserElement;
7
+import com.huiju.estateagents.property.common.base.BaseController;
8
+import com.huiju.estateagents.property.model.TaUser;
9
+import com.huiju.estateagents.property.model.TaUserVerify;
10
+import com.huiju.estateagents.property.service.IBuildingOwnerInfoService;
11
+import com.huiju.estateagents.property.service.ITaUserVerifyService;
12
+import com.google.common.collect.Maps;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiImplicitParam;
15
+import io.swagger.annotations.ApiImplicitParams;
16
+import io.swagger.annotations.ApiOperation;
17
+import org.springframework.beans.factory.annotation.Autowired;
18
+import org.springframework.web.bind.annotation.*;
19
+
20
+import javax.servlet.http.HttpSession;
21
+import java.util.Map;
22
+
23
+@RestController
24
+
25
+@RequestMapping("/")
26
+@Api(value = "审核用户API", description = "审核用户API")
27
+public class UserVerifyController extends BaseController {
28
+
29
+    @Autowired
30
+    private ITaUserVerifyService iTaUserVerifyService;
31
+
32
+
33
+    @Autowired
34
+    private IBuildingOwnerInfoService iBuildingOwnerInfoService;
35
+
36
+    @RequestMapping(value = "/user/verify/all", method = RequestMethod.GET)
37
+    @ApiOperation(value = "获取待审核的用户列表", notes = "获取待审核的用户列表")
38
+    @ApiImplicitParams({
39
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "phone", value = "手机号"),
40
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "userName", value = "用户名"),
41
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "idCard", value = "身份证"),
42
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "pageNum", value = "第几页"),
43
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "pageSize", value = "一页多少行"),
44
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
45
+    })
46
+    public ResponseBean getAll(@RequestParam(value = "phone", required = false) String phone,
47
+                               @RequestParam(value = "userName", required = false) String userName,
48
+                               @RequestParam(value = "idCard", required = false) String idCard,
49
+                               @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
50
+                               @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
51
+                               HttpSession session) {
52
+
53
+        ResponseBean responseBean = new ResponseBean();
54
+        UserElement userElement = getUserElement(session);
55
+        responseBean = iTaUserVerifyService.selectAll(phone, userName, idCard, pageNum, pageSize, userElement);
56
+        return responseBean;
57
+    }
58
+
59
+    @RequestMapping(value = "/user/verify/audit/{userVerifyId}", method = RequestMethod.PUT)
60
+    @ApiOperation(value = "审核用户", notes = "审核用户")
61
+    @ApiImplicitParams({
62
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
63
+            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "userVerifyId", value = "审核id"),
64
+            @ApiImplicitParam(paramType = "query", dataTypeClass = Boolean.class, name = "verifyStatus", value = "true通过;false不通过"),
65
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "remark", value = "审核不通过的原因"),
66
+    })
67
+    public ResponseBean getAll(@PathVariable("userVerifyId") Integer userVerifyId,
68
+                               @RequestParam("verifyStatus") Boolean verifyStatus,
69
+                               @RequestParam(value = "remark", required = false) String remark,
70
+                               HttpSession session) {
71
+
72
+        ResponseBean responseBean = new ResponseBean();
73
+        UserElement userElement = getUserElement(session);
74
+        responseBean = iTaUserVerifyService.auditUser(userElement, userVerifyId, verifyStatus, remark);
75
+        return responseBean;
76
+    }
77
+
78
+    @RequestMapping(value = "/ta/user/has", method = RequestMethod.GET)
79
+    @ApiOperation(value = "校验移动端手机号是否注册", notes = "校验移动端手机号是否注册")
80
+    @ApiImplicitParams({
81
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
82
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "ownerTel", value = "手机号"),
83
+    })
84
+    public ResponseBean taUserHas(@RequestParam("ownerTel") String ownerTel,
85
+                               HttpSession session) {
86
+
87
+        ResponseBean responseBean = new ResponseBean();
88
+        UserElement userElement = getUserElement(session);
89
+        QueryWrapper<TaUser> queryWrapper = new QueryWrapper<>();
90
+        queryWrapper.eq("login_name", ownerTel);
91
+//        TaUser user = iTaUserService.getOne(queryWrapper);
92
+//        if (null == user) {
93
+//            responseBean.addError("未注册");
94
+//            return responseBean;
95
+//        }
96
+
97
+        Map<String, Object> map = Maps.newHashMap();
98
+//        map.put("info", user);
99
+
100
+        responseBean.addSuccess(map);
101
+        return responseBean;
102
+    }
103
+
104
+    @RequestMapping(value = "/ta/user/hasOwner", method = RequestMethod.GET)
105
+    @ApiOperation(value = "根据 期/栋/单元/楼层/户号 校验是否有业主", notes = "根据 期/栋/单元/楼层/户号 校验是否有业主")
106
+    @ApiImplicitParams({
107
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
108
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "ownerTel", value = "审核id"),
109
+    })
110
+    public ResponseBean taUserHasOwner(@RequestParam("phaseId") Integer phaseId,
111
+                               @RequestParam("buildingId")Integer buildingId,
112
+                               @RequestParam("unitId")Integer unitId,
113
+                               @RequestParam("levelId")Integer levelId,
114
+                               @RequestParam("roomNoId")Integer roomNoId,
115
+                               HttpSession session) {
116
+
117
+        ResponseBean responseBean = new ResponseBean();
118
+        UserElement userElement = getUserElement(session);
119
+
120
+        Map<String, Object> map = Maps.newHashMap();
121
+        map.put("boolRole", false);
122
+
123
+        hasAddress(phaseId, buildingId, unitId, levelId ,roomNoId, map);
124
+
125
+        responseBean.addSuccess(map);
126
+        return responseBean;
127
+    }
128
+
129
+    /**
130
+     * 校验该 房产是否有房主
131
+     * @param phaseId
132
+     * @param buildingId
133
+     * @param unitId
134
+     * @param levelId
135
+     * @param roomNoId
136
+     * @param map
137
+     * @return
138
+     */
139
+    private Map<String, Object> hasAddress(Integer phaseId,Integer buildingId,Integer unitId,Integer levelId,Integer roomNoId, Map<String, Object> map) {
140
+        map.put("boolRole", false);
141
+        QueryWrapper<TaUserVerify> userVerifyQueryWrapper = new QueryWrapper<>();
142
+        userVerifyQueryWrapper.eq("phase_id", phaseId);
143
+        userVerifyQueryWrapper.eq("building_id", buildingId);
144
+        userVerifyQueryWrapper.eq("unit_id", unitId);
145
+        userVerifyQueryWrapper.eq("level_id", levelId);
146
+        userVerifyQueryWrapper.eq("room_no_id", roomNoId);
147
+        userVerifyQueryWrapper.eq("role_id", 1);
148
+        userVerifyQueryWrapper.eq("verify_status", 1);
149
+        TaUserVerify userVerify = iTaUserVerifyService.getOne(userVerifyQueryWrapper);
150
+        if (null != userVerify) {
151
+            map.put("boolRole", true);
152
+        }
153
+        return map;
154
+    }
155
+
156
+    @RequestMapping(value = "/user/verifyinfo/{userVerifyId}", method = RequestMethod.PUT)
157
+    @ApiOperation(value = "楼栋详情页面审核", notes = "楼栋详情页面审核")
158
+    @ApiImplicitParams({
159
+            @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token"),
160
+            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "userVerifyId", value = "审核id"),
161
+            @ApiImplicitParam(paramType = "path", dataTypeClass = String.class, name = "roleState", value = "1:业主,2:租客,3:家属"),
162
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "verifyStatus", value = "0 是未审核1是审核通过2是审核不通过"),
163
+            @ApiImplicitParam(paramType = "query", dataTypeClass = String.class, name = "remark", value = "审核不通过的原因"),
164
+    })
165
+    public ResponseBean verifyinfoAdd(@PathVariable("userVerifyId") Integer userVerifyId,
166
+                               @RequestParam("verifyStatus") String verifyStatus,
167
+                               @RequestParam("roleState") String roleState,
168
+                               @RequestParam(value = "remark", required = false) String remark,
169
+                               HttpSession session) {
170
+        ResponseBean responseBean = new ResponseBean();
171
+        UserElement userElement = getUserElement(session);
172
+        responseBean = iTaUserVerifyService.verifyinfoAdd(userElement, userVerifyId, verifyStatus, roleState,remark);
173
+        return responseBean;
174
+    }
175
+
176
+}

+ 29
- 0
src/main/java/com/huiju/estateagents/property/dao/AnnouncementTelMapper.java Visa fil

@@ -0,0 +1,29 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.AnnouncementTel;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ * 物业号码表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-03-05
18
+ */
19
+@Mapper
20
+public interface AnnouncementTelMapper extends BaseMapper<AnnouncementTel> {
21
+	
22
+	/**
23
+	 * 分页获取电话号码
24
+	 * @param page
25
+	 * @param announcementTel
26
+	 * @return
27
+	 */
28
+	List<AnnouncementTel> selectListByParams(Page page, @Param("announcementTel") AnnouncementTel announcementTel);
29
+}

+ 48
- 0
src/main/java/com/huiju/estateagents/property/dao/BillInvoiceMapper.java Visa fil

@@ -0,0 +1,48 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.BillInvoice;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * <p>
15
+ * 缴费单 Mapper 接口
16
+ * </p>
17
+ *
18
+ * @author weiximei
19
+ * @since 2019-02-13
20
+ */
21
+@Mapper
22
+public interface BillInvoiceMapper extends BaseMapper<BillInvoice> {
23
+
24
+    /**
25
+     * 查询有效的缴费单
26
+     * @param page
27
+     * @param map
28
+     * @return
29
+     */
30
+    IPage<BillInvoice> selectBillInvoice(Page page, @Param("map") Map<String, Object> map);
31
+
32
+    /**
33
+     * 查询作废的缴费单
34
+     *      前台批量添加的缴费单, 默认是 作废
35
+     * @param map
36
+     * @return
37
+     */
38
+    List<BillInvoice> selectBillInvoiceTemp(@Param("map") Map<String, Object> map);
39
+
40
+    /**
41
+     * 查询有效的缴费单
42
+     * @param page
43
+     * @return
44
+     */
45
+    IPage<BillInvoice> selectBillInvoiceEffective(Page page, @Param("map") Map<String, Object> map);
46
+	
47
+	List<Map<String, Object>> getPriceCount();
48
+}

+ 23
- 0
src/main/java/com/huiju/estateagents/property/dao/BillMapper.java Visa fil

@@ -0,0 +1,23 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.Bill;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ * 缴费项表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author weiximei
17
+ * @since 2019-02-13
18
+ */
19
+@Mapper
20
+public interface BillMapper extends BaseMapper<Bill> {
21
+	
22
+	List<Bill> selectListByParams(Page page, @Param("bill") Bill bill);
23
+}

+ 24
- 0
src/main/java/com/huiju/estateagents/property/dao/BillStatementMapper.java Visa fil

@@ -0,0 +1,24 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.BillStatement;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.Map;
11
+
12
+/**
13
+ * <p>
14
+ * 账单流水表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author weiximei
18
+ * @since 2019-02-13
19
+ */
20
+@Mapper
21
+public interface BillStatementMapper extends BaseMapper<BillStatement> {
22
+
23
+    IPage<BillStatement> getBillStatementAll(Page page, @Param("map") Map<String, Object> map);
24
+}

+ 24
- 0
src/main/java/com/huiju/estateagents/property/dao/HotelMapper.java Visa fil

@@ -0,0 +1,24 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.Hotel;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+/**
9
+ * <p>
10
+ * 酒店 Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-05-13
15
+ */
16
+@Mapper
17
+public interface HotelMapper extends BaseMapper<Hotel> {
18
+
19
+    /**
20
+     * 查询酒店,当前小区酒店只有一个
21
+     * @return
22
+     */
23
+    Hotel selectHotel(@Param("communityId") Integer communityId);
24
+}

+ 32
- 0
src/main/java/com/huiju/estateagents/property/dao/HotelRoomMapper.java Visa fil

@@ -0,0 +1,32 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.HotelRoom;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.Date;
11
+
12
+/**
13
+ * <p>
14
+ * 酒店房间表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-05-13
19
+ */
20
+@Mapper
21
+public interface HotelRoomMapper extends BaseMapper<HotelRoom> {
22
+
23
+    /**
24
+     * 查询房间列表
25
+     * @param hotelRoom
26
+     * @param beginTime
27
+     * @param endTime
28
+     * @param communityId
29
+     * @return
30
+     */
31
+    IPage<HotelRoom> hotelRoomLiset(Page HotelRoom, @Param("hotelRoom") HotelRoom hotelRoom, @Param("beginTime") Date beginTime, @Param("endTime") Date endTime, @Param("communityId") Integer communityId);
32
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/HotelSettingMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.HotelSetting;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 酒店开关设置 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-13
14
+ */
15
+@Mapper
16
+public interface HotelSettingMapper extends BaseMapper<HotelSetting> {
17
+
18
+}

+ 43
- 0
src/main/java/com/huiju/estateagents/property/dao/IndexCountMapper.java Visa fil

@@ -0,0 +1,43 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.huiju.estateagents.property.model.*;
4
+import org.apache.ibatis.annotations.Mapper;
5
+import org.apache.ibatis.annotations.Param;
6
+
7
+import java.util.List;
8
+
9
+@Mapper
10
+public interface IndexCountMapper {
11
+	/**
12
+	 * 获取工单统计
13
+	 * @param communityId
14
+	 * @return
15
+	 */
16
+	List<TpTicket> getTicketList(@Param("communityId") Integer communityId);
17
+	
18
+	Integer selectCommunityOpenDoorCount();
19
+	
20
+	Integer selectUnitsOpenDoorCount(Integer eventType);
21
+	
22
+	Integer getPublicCameraCount(@Param("communityId") Integer communityId);
23
+	
24
+	Integer getRemoteMonitoringCount(@Param("communityId") Integer communityId);
25
+	
26
+	Integer getRemoteUnitCount(@Param("communityId") Integer communityId);
27
+	
28
+	List<TpBillInvoiceCount> getBillInvoiceCountList(@Param("communityId") Integer communityId);
29
+	
30
+	List<TaUserLicenseCount> getUserLicenseCountList(@Param("communityId") Integer communityId);
31
+	
32
+	List<TaTemporaryLicenseCount> getTemporaryLicenseCountList(@Param("communityId") Integer communityId);
33
+	
34
+	Integer getRegisterUserCount(@Param("communityId") Integer communityId, @Param("roleId") Integer roleId);
35
+	
36
+	List<TaBriskUser> getBriskUserList(@Param("communityId") Integer communityId);
37
+	
38
+	Integer getAnnouncementCount(@Param("communityId") Integer communityId);
39
+	
40
+	Integer getActivityCount(@Param("communityId") Integer communityId);
41
+	
42
+	Integer getTopicCount(@Param("communityId") Integer communityId);
43
+}

+ 64
- 0
src/main/java/com/huiju/estateagents/property/dao/MessageMapper.java Visa fil

@@ -0,0 +1,64 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.huiju.estateagents.property.model.Message;
8
+import org.apache.ibatis.annotations.Mapper;
9
+import org.apache.ibatis.annotations.Param;
10
+
11
+import java.util.Date;
12
+
13
+/**
14
+ * <p>
15
+ * 物业web端用户表 Mapper 接口
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2018-12-18
20
+ */
21
+@Mapper
22
+public interface MessageMapper extends BaseMapper<Message> {
23
+    /**
24
+     * 消息待办
25
+     * @param page
26
+     * @param messageType
27
+     * @param status
28
+     * @param createDate
29
+     * @param messageContent
30
+     * @param uuid
31
+     * @return
32
+     */
33
+    IPage<Message> messageLiset(Page page, @Param("messageType") String messageType, @Param("status") String status, @Param("createDate") Date createDate, @Param("messageContent") String messageContent, @Param("uuid") Integer uuid);
34
+
35
+    /**
36
+     * 公告消息推送
37
+     * @param message
38
+     */
39
+    void updateMessage(@Param(value = "message") Message message);
40
+
41
+    /**
42
+     * 工单消息推送
43
+     * @param message
44
+     */
45
+    void updateTicketMessage(Message message);
46
+
47
+    /**
48
+     * 关于我的消息
49
+     * @param page
50
+     * @param messageType
51
+     * @param readStatus
52
+     * @param createDate
53
+     * @param messageContent
54
+     * @param uuid
55
+     * @return
56
+     */
57
+    IPage<Message> myMessageList(Page<Message> page, @Param("messageType") String messageType, @Param("readStatus") String readStatus, @Param("createDate") Date createDate, @Param("messageContent") String messageContent, @Param("uuid") Integer uuid);
58
+
59
+    /**
60
+     * 工单分配后改变message的状态
61
+     * @param ticketId
62
+     */
63
+    void updateTickMessageStatus(@Param("ticketId") Integer ticketId);
64
+}

+ 24
- 0
src/main/java/com/huiju/estateagents/property/dao/RoleMapper.java Visa fil

@@ -0,0 +1,24 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.SysRole;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ * 物业web端用户表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2018-12-18
18
+ */
19
+@Mapper
20
+public interface RoleMapper extends BaseMapper<SysRole> {
21
+	List<SysRole> getRoleListByParams(Page page, @Param("role") SysRole role);
22
+
23
+	SysRole selectByRoleName(@Param("roleName") String roleName, @Param("communityId") Integer communityId);
24
+}

+ 21
- 0
src/main/java/com/huiju/estateagents/property/dao/SysRoleMenuMapper.java Visa fil

@@ -0,0 +1,21 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.SysRoleMenu;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ * 物业端角色可查看的菜单 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-01-18
16
+ */
17
+@Mapper
18
+public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
19
+	
20
+	int insertList(List<SysRoleMenu> sysRoleMenuList);
21
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/SysUserRoleMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.SysUserRole;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 物业web端用户是那些角色 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-01-21
14
+ */
15
+@Mapper
16
+public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
17
+
18
+}

+ 23
- 0
src/main/java/com/huiju/estateagents/property/dao/TaFaceMapper.java Visa fil

@@ -0,0 +1,23 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaFace;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 人脸检测图片 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-11
14
+ */
15
+@Mapper
16
+public interface TaFaceMapper extends BaseMapper<TaFace> {
17
+
18
+    TaFace getByUserVerifyId(Integer userVerifyId);
19
+
20
+    void insertSelective(TaFace taFace);
21
+
22
+    void updateByPrimaryKeySelective(TaFace taFace);
23
+}

+ 27
- 0
src/main/java/com/huiju/estateagents/property/dao/TaSysMenuMapper.java Visa fil

@@ -0,0 +1,27 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaSysMenu;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ * APP端菜单页面 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-03-06
16
+ */
17
+@Mapper
18
+public interface TaSysMenuMapper extends BaseMapper<TaSysMenu> {
19
+
20
+    /**
21
+     * 根据小区查询出APP菜单列表
22
+     * @param communityId
23
+     * @return
24
+     */
25
+    List<TaSysMenu> selectList(Integer communityId);
26
+
27
+}

+ 23
- 0
src/main/java/com/huiju/estateagents/property/dao/TaSysRoleMapper.java Visa fil

@@ -0,0 +1,23 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+
4
+import com.huiju.estateagents.property.model.TaSysRole;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+@Mapper
8
+public interface TaSysRoleMapper {
9
+    int deleteByPrimaryKey(Integer id);
10
+
11
+    int insert(TaSysRole record);
12
+
13
+    int insertSelective(TaSysRole record);
14
+
15
+    TaSysRole selectByPrimaryKey(Integer id);
16
+
17
+    int updateByPrimaryKeySelective(TaSysRole record);
18
+
19
+    int updateByPrimaryKey(TaSysRole record);
20
+
21
+    TaSysRole findRoleByUserId(Integer userId);
22
+
23
+}

+ 29
- 0
src/main/java/com/huiju/estateagents/property/dao/TaSysUserRoleMapper.java Visa fil

@@ -0,0 +1,29 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaSysUserRole;
5
+import org.apache.ibatis.annotations.Delete;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+/**
10
+ * <p>
11
+ * app端用户是那些角色 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author weiximei
15
+ * @since 2018-12-21
16
+ */
17
+@Mapper
18
+public interface TaSysUserRoleMapper extends BaseMapper<TaSysUserRole> {
19
+
20
+    /**
21
+     * 根据 用户id 和 小区Id  删除数据
22
+     * @param communityId
23
+     * @param userId
24
+     * @return
25
+     */
26
+    @Delete("delete from ta_sys_user_role where community_id=#{communityId} and user_id=#{userId}")
27
+    int deleteByCommunityIdAndUserId(@Param("communityId") Integer communityId, @Param("userId") Integer userId);
28
+
29
+}

+ 22
- 0
src/main/java/com/huiju/estateagents/property/dao/TaTemporaryLicenseCountMapper.java Visa fil

@@ -0,0 +1,22 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaTemporaryLicenseCount;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+import java.util.Map;
9
+
10
+/**
11
+ * <p>
12
+ * 临时车统计表,按天计算 Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author jobob
16
+ * @since 2019-05-28
17
+ */
18
+@Mapper
19
+public interface TaTemporaryLicenseCountMapper extends BaseMapper<TaTemporaryLicenseCount> {
20
+	
21
+	List<Map<String, Object>> getTemporaryLicenseOrderPriceCount();
22
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TaUserLicenseCountMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaUserLicenseCount;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 月租车统计表,按天计算 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-28
14
+ */
15
+@Mapper
16
+public interface TaUserLicenseCountMapper extends BaseMapper<TaUserLicenseCount> {
17
+
18
+}

+ 46
- 0
src/main/java/com/huiju/estateagents/property/dao/TaUserLicenseOrderMapper.java Visa fil

@@ -0,0 +1,46 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaUserLicenseOrder;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultType;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.util.List;
11
+import java.util.Map;
12
+
13
+/**
14
+ * <p>
15
+ * 月租车缴费订单表 Mapper 接口
16
+ * </p>
17
+ *
18
+ * @author jobob
19
+ * @since 2019-05-13
20
+ */
21
+@Mapper
22
+public interface TaUserLicenseOrderMapper extends BaseMapper<TaUserLicenseOrder> {
23
+
24
+    /**
25
+     * 分页查询
26
+     * @param communityId
27
+     * @param pageNum
28
+     * @param pageSize
29
+     * @return
30
+     */
31
+    @ResultType(TaUserLicenseOrder.class)
32
+    @Select("select * from ta_user_license_order where community_id = #{communityId} limit #{pageNum},#{pageSize}")
33
+    List<TaUserLicenseOrder> getLicensePage(@Param("communityId") Integer communityId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
34
+
35
+    /**
36
+     * 查询总数
37
+     * @param communityId
38
+     * @return
39
+     */
40
+    @ResultType(Integer.class)
41
+    @Select("select count(*) from ta_user_license_order where community_id = #{communityId}")
42
+    Integer getCount(@Param("communityId") Integer communityId);
43
+    
44
+    
45
+    List<Map<String, Object>> getPriceCount();
46
+}

+ 103
- 0
src/main/java/com/huiju/estateagents/property/dao/TaUserVerifyMapper.java Visa fil

@@ -0,0 +1,103 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.TaUserVerify;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+import org.apache.ibatis.annotations.ResultType;
10
+import org.apache.ibatis.annotations.Select;
11
+
12
+import java.util.List;
13
+
14
+/**
15
+ * <p>
16
+ * app端用户审核表,存放用户的角色还有房产信息 Mapper 接口
17
+ * </p>
18
+ *
19
+ * @author jobob
20
+ * @since 2019-04-03
21
+ */
22
+@Mapper
23
+public interface TaUserVerifyMapper extends BaseMapper<TaUserVerify> {
24
+
25
+    /**
26
+     * 根据 手机号 、用户名、身份证
27
+     * @param page
28
+     * @param phone
29
+     * @param userName
30
+     * @param idCard
31
+     * @return
32
+     */
33
+    IPage<TaUserVerify> selectAllByPhoneAndUserNameAndIdCard(Page page, @Param("phone") String phone, @Param("userName") String userName, @Param("idCard") String idCard, @Param("communityId") Integer communityId);
34
+
35
+    /**
36
+     * 根据 小区id 、 小区、期、栋、单元、楼层、户号 进行条件查询出 已审核通过的并且是业主
37
+     * @param communityId
38
+     * @param phaseId
39
+     * @param buildingId
40
+     * @param unitId
41
+     * @param levelId
42
+     * @param roomNoId
43
+     * @return
44
+     */
45
+    TaUserVerify selectCommunityAndAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId, @Param("buildingId") Integer buildingId, @Param("unitId") Integer unitId, @Param("levelId") Integer levelId, @Param("roomNoId") Integer roomNoId);
46
+
47
+    /**
48
+     * 根据 用户id、小区id 、 小区、期、栋、单元、楼层、户号、角色id 进行条件查询出
49
+     * @param communityId
50
+     * @param phaseId
51
+     * @param buildingId
52
+     * @param unitId
53
+     * @param levelId
54
+     * @param roomNoId
55
+     * @return
56
+     */
57
+    TaUserVerify selectCommunityAndAddressAndRoleId(@Param("userId") Integer userId, @Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId, @Param("buildingId") Integer buildingId, @Param("unitId") Integer unitId, @Param("levelId") Integer levelId, @Param("roomNoId") Integer roomNoId, @Param("roleId") Integer roleId);
58
+
59
+
60
+    /**
61
+     * 根据 小区id 、 小区、期、栋、单元、楼层、户号 进行条件查询出 已审核通过的并且是业主
62
+     * @param communityId
63
+     * @param phaseName
64
+     * @param buildingName
65
+     * @param unitName
66
+     * @param levelName
67
+     * @param roomNoName
68
+     * @return
69
+     */
70
+    @ResultType(TaUserVerify.class)
71
+    @Select("select  *  from ta_user_verify " +
72
+            "where community_id = #{communityId} " +
73
+            "and phase_name = #{phaseName} " +
74
+            "and building_name = #{buildingName} " +
75
+            "and unit_name = #{unitName} " +
76
+            "and level_name = #{levelName} " +
77
+            "and room_no_name = #{roomNoName} " +
78
+            "and verify_status = 1 " +
79
+            "and role_id = 1")
80
+    TaUserVerify selectCommunityAndAddressName(@Param("communityId") Integer communityId, @Param("phaseName") String phaseName, @Param("buildingName") String buildingName, @Param("unitName") String unitName, @Param("levelName") String levelName, @Param("roomNoName") String roomNoName);
81
+
82
+
83
+    /**
84
+     * 查询用户审核数据!   小区id,用户id,期id,栋id,单元id,楼层id,房间id,审核状态
85
+     * @param userId
86
+     * @param communityId
87
+     * @param phaseId
88
+     * @param buildingId
89
+     * @param unitId
90
+     * @param levelId
91
+     * @param roomNoId
92
+     * @param verifyStatus
93
+     * @return
94
+     */
95
+    List<TaUserVerify> selectUserVerifyCommunityAndAddress(@Param("userId") Integer userId,
96
+                                                           @Param("communityId") Integer communityId,
97
+                                                           @Param("phaseId") Integer phaseId,
98
+                                                           @Param("buildingId") Integer buildingId,
99
+                                                           @Param("unitId") Integer unitId,
100
+                                                           @Param("levelId") Integer levelId,
101
+                                                           @Param("roomNoId") Integer roomNoId,
102
+                                                           @Param("verifyStatus") Integer verifyStatus);
103
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TaVisitorLicenseSettingMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TaVisitorLicenseSetting;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 录入访客车牌功能开关表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-27
14
+ */
15
+@Mapper
16
+public interface TaVisitorLicenseSettingMapper extends BaseMapper<TaVisitorLicenseSetting> {
17
+
18
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TdImagesMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TdImages;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 图片表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author weiximei
13
+ * @since 2018-12-29
14
+ */
15
+@Mapper
16
+public interface TdImagesMapper extends BaseMapper<TdImages> {
17
+
18
+}

+ 29
- 0
src/main/java/com/huiju/estateagents/property/dao/ToCommunitiesMapper.java Visa fil

@@ -0,0 +1,29 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.ToCommunities;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Select;
7
+
8
+import java.util.List;
9
+
10
+/**
11
+ * <p>
12
+ * 所有小区表 Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author weiximei
16
+ * @since 2018-12-19
17
+ */
18
+@Mapper
19
+public interface ToCommunitiesMapper extends BaseMapper<ToCommunities> {
20
+
21
+    /**
22
+     * 根据 电话号码 查询出
23
+     * @param phone
24
+     * @return
25
+     */
26
+    @Select("SELECT tc.* FROM tp_user tu LEFT JOIN to_communities tc ON tu.community_id = tc.id WHERE tu.login_name = #{phone}")
27
+    List<ToCommunities> selectUserById(String phone);
28
+
29
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpActivityMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpActivity;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 物业web端活动表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author weiximei
13
+ * @since 2018-12-28
14
+ */
15
+@Mapper
16
+public interface TpActivityMapper extends BaseMapper<TpActivity> {
17
+
18
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpActivitySignInMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpActivitySignIn;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 活动签到表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-09
14
+ */
15
+@Mapper
16
+public interface TpActivitySignInMapper extends BaseMapper<TpActivitySignIn> {
17
+
18
+}

+ 24
- 0
src/main/java/com/huiju/estateagents/property/dao/TpActivitySignUpMapper.java Visa fil

@@ -0,0 +1,24 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.TpActivitySignUp;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+/**
11
+ * <p>
12
+ * 物业web端活动报名表 Mapper 接口
13
+ * </p>
14
+ *
15
+ * @author weiximei
16
+ * @since 2019-01-03
17
+ */
18
+@Mapper
19
+public interface TpActivitySignUpMapper extends BaseMapper<TpActivitySignUp> {
20
+
21
+//    @Select("SELECT tas.* FROM tp_activity_sign_up tas LEFT JOIN ta_user tau on tas.ta_user_id = tau.id where tau.user_name like concat('%',#{userName,jdbcType=VARCHAR},'%') and tau.login_name LIKE concat('%',#{phone,jdbcType=VARCHAR},'%')")
22
+    IPage<TpActivitySignUp> listQuery(Page page, @Param("userName") String userName, @Param("phone") String phone, @Param("activityId") Integer activityId);
23
+
24
+}

+ 36
- 0
src/main/java/com/huiju/estateagents/property/dao/TpAnnouncementMapper.java Visa fil

@@ -0,0 +1,36 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.baomidou.mybatisplus.core.metadata.IPage;
6
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
7
+import com.huiju.estateagents.property.model.TpAnnouncement;
8
+import org.apache.ibatis.annotations.Mapper;
9
+import org.apache.ibatis.annotations.Param;
10
+
11
+import java.util.List;
12
+
13
+@Mapper
14
+public interface TpAnnouncementMapper extends BaseMapper<TpAnnouncement> {
15
+    int deleteByPrimaryKey(Integer id);
16
+
17
+    int insert(TpAnnouncement record);
18
+
19
+    TpAnnouncement selectByPrimaryKey(@Param("id") Integer id, @Param("communityId") Integer communityId);
20
+
21
+    int updateByPrimaryKeySelective(@Param("id") Integer id, @Param("viewCount") Integer viewCount);
22
+
23
+    int updateTpAnnouncement(TpAnnouncement record);
24
+
25
+    IPage<TpAnnouncement> getAnnouncements(Page page, @Param("record") TpAnnouncement record);
26
+
27
+    List<TpAnnouncement> getById(@Param("record") TpAnnouncement record);
28
+
29
+    /**
30
+     * 公告轮播图
31
+     * @param communityId
32
+     * @param sum
33
+     * @return
34
+     */
35
+    List<TpAnnouncement> getAnnouncement(@Param("communityId") Integer communityId, @Param("sum") Integer sum);
36
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpBillInvoiceCountMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpBillInvoiceCount;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 收费单统计表,按天统计 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-28
14
+ */
15
+@Mapper
16
+public interface TpBillInvoiceCountMapper extends BaseMapper<TpBillInvoiceCount> {
17
+
18
+}

+ 59
- 0
src/main/java/com/huiju/estateagents/property/dao/TpBillOrderMapper.java Visa fil

@@ -0,0 +1,59 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.TpBillOrder;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+import org.apache.ibatis.annotations.ResultType;
10
+import org.apache.ibatis.annotations.Select;
11
+
12
+import java.util.List;
13
+import java.util.Map;
14
+
15
+/**
16
+ * <p>
17
+ * 缴费订单表 Mapper 接口
18
+ * </p>
19
+ *
20
+ * @author jobob
21
+ * @since 2019-04-18
22
+ */
23
+@Mapper
24
+public interface TpBillOrderMapper extends BaseMapper<TpBillOrder> {
25
+
26
+    /**
27
+     * 查询订单数据
28
+     * @param page
29
+     * @param map
30
+     * @return
31
+     */
32
+    IPage<TpBillOrder> getBillOrderAll(Page page, @Param("map") Map<String, Object> map);
33
+
34
+    /**
35
+     * 根据订单号,查询所有 缴费组
36
+     * @param orderNumber
37
+     * @return
38
+     */
39
+    @ResultType(TpBillOrder.class)
40
+    @Select("select " +
41
+            "tbo.id as id, " +
42
+            "tbo.community_id as communityId, " +
43
+            "tbo.tp_bill_id as tpBillId, " +
44
+            "tbo.tp_bill_invoice_id as tpBillInvoiceId, " +
45
+            "tbo.order_bumber as orderBumber, " +
46
+            "tbo.create_user as createUser, " +
47
+            "tbo.create_date as createDate, " +
48
+            "tbo.update_user as updateUser, " +
49
+            "tbo.update_date as updateDate, " +
50
+            "tbo.order_status as orderStatus, " +
51
+            "tbo.pay_phone as payPhone, " +
52
+            "tb.bill_name as billName " +
53
+            "from tp_bill_order tbo " +
54
+            "LEFT JOIN tp_bill tb on tbo.tp_bill_id = tb.id " +
55
+            "where tbo.order_bumber = #{orderNumber} " +
56
+            "GROUP BY tbo.tp_bill_id")
57
+    List<TpBillOrder> getByOrderNumberBillInvoice(@Param("orderNumber") String orderNumber);
58
+
59
+}

+ 19
- 0
src/main/java/com/huiju/estateagents/property/dao/TpBuildingMapper.java Visa fil

@@ -0,0 +1,19 @@
1
+package com.huiju.estateagents.property.dao;
2
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
3
+import com.baomidou.mybatisplus.core.metadata.IPage;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.TpBuilding;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+@Mapper
10
+public interface TpBuildingMapper extends BaseMapper<TpBuilding> {
11
+
12
+    /**
13
+     * 楼栋资料库列表
14
+     * @param page
15
+     * @param tpBuilding
16
+     * @return
17
+     */
18
+    IPage<TpBuilding> buildinglist(Page<TpBuilding> page, @Param("tpBuilding") TpBuilding tpBuilding);
19
+}

+ 83
- 0
src/main/java/com/huiju/estateagents/property/dao/TpBuildingOwnerInfoMapper.java Visa fil

@@ -0,0 +1,83 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.TpBuildingOwnerInfo;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+import org.apache.ibatis.annotations.ResultType;
10
+import org.apache.ibatis.annotations.Select;
11
+
12
+import java.util.List;
13
+
14
+/**
15
+ * <p>
16
+ * 楼栋业主资料信息表 Mapper 接口
17
+ * </p>
18
+ *
19
+ * @author weiximei
20
+ * @since 2018-12-18
21
+ */
22
+@Mapper
23
+public interface TpBuildingOwnerInfoMapper extends BaseMapper<TpBuildingOwnerInfo> {
24
+    /**
25
+     * 获取已认证通过的
26
+     * @param
27
+     * @return
28
+     */
29
+    IPage<TpBuildingOwnerInfo> selectUserApprove(Page page, @Param("ownerName") String r, @Param("ownerTel") String ownerTel, @Param("VerifyStatus") String VerifyStatus, @Param("CommunityId") Integer CommunityId);
30
+
31
+    int batchInsert(List<TpBuildingOwnerInfo> list);
32
+
33
+    int batchUpdate(List<TpBuildingOwnerInfo> list);
34
+
35
+	List<TpBuildingOwnerInfo> selectListByParams(Page page, @Param("tpBuildingOwnerInfo") TpBuildingOwnerInfo tpBuildingOwnerInfo);
36
+
37
+    /**
38
+     * 更具 小区、期、楼栋、单元、楼层、户号、手机号 查询
39
+     * @param communityId
40
+     * @param phaseId
41
+     * @param buildingId
42
+     * @param unitId
43
+     * @param levelId
44
+     * @param roomNoId
45
+     * @param ownerTel
46
+     * @return
47
+     */
48
+	@ResultType(TpBuildingOwnerInfo.class)
49
+	@Select("select * FROM tp_building_owner_info tpio " +
50
+            "WHERE tpio.community_id = #{communityId} " +
51
+            "and tpio.phase_id = #{phaseId} " +
52
+            "and tpio.building_id = #{buildingId} " +
53
+            "and tpio.unit_id = #{unitId} " +
54
+            "and tpio.level_id = #{levelId} " +
55
+            "AND tpio.room_no_id = #{roomNoId} " +
56
+            "AND tpio.owner_tel = #{ownerTel}")
57
+    TpBuildingOwnerInfo selectCommunityIdAndAddress(@Param("communityId") Integer communityId, @Param("phaseId") Integer phaseId, @Param("buildingId") Integer buildingId, @Param("unitId") Integer unitId, @Param("levelId") Integer levelId, @Param("roomNoId") Integer roomNoId, @Param("ownerTel") String ownerTel);
58
+
59
+
60
+    /**
61
+     * 更具 小区、期、楼栋、单元、楼层、户号、手机号 查询
62
+     * @param communityId
63
+     * @param phaseName
64
+     * @param buildingName
65
+     * @param unitName
66
+     * @param levelName
67
+     * @param roomNoName
68
+     * @param ownerTel
69
+     * @return
70
+     */
71
+    @ResultType(TpBuildingOwnerInfo.class)
72
+    @Select("select * FROM tp_building_owner_info tpio " +
73
+            "WHERE tpio.community_id = #{communityId} " +
74
+            "and tpio.phase_name = #{phaseName} " +
75
+            "and tpio.building_name = #{buildingName} " +
76
+            "and tpio.unit_name = #{unitName} " +
77
+            "and tpio.level_name = #{levelName} " +
78
+            "AND tpio.room_no_name = #{roomNoName} " +
79
+            "AND tpio.owner_tel = #{ownerTel}")
80
+    TpBuildingOwnerInfo selectCommunityIdAndAddressName(@Param("communityId") Integer communityId, @Param("phaseName") String phaseName, @Param("buildingName") Integer buildingName, @Param("unitName") Integer unitName, @Param("levelName") Integer levelName, @Param("roomNoName") Integer roomNoName, @Param("ownerTel") String ownerTel);
81
+
82
+
83
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpCarouselSettingMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpCarouselSetting;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 轮播数设置表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author weiximei
13
+ * @since 2019-03-06
14
+ */
15
+@Mapper
16
+public interface TpCarouselSettingMapper extends BaseMapper<TpCarouselSetting> {
17
+
18
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpConfigurationMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpConfiguration;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 设备配置表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-15
14
+ */
15
+@Mapper
16
+public interface TpConfigurationMapper extends BaseMapper<TpConfiguration> {
17
+
18
+}

+ 63
- 0
src/main/java/com/huiju/estateagents/property/dao/TpEquipmentMapper.java Visa fil

@@ -0,0 +1,63 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpEquipment;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultType;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * <p>
14
+ * 设备表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-04-15
19
+ */
20
+@Mapper
21
+public interface TpEquipmentMapper extends BaseMapper<TpEquipment> {
22
+
23
+    /**
24
+     * 根据小区id 和 类型查询
25
+     * @param communityId
26
+     * @param equipmentType
27
+     * @return
28
+     */
29
+    @ResultType(TpEquipment.class)
30
+    @Select("select " +
31
+            "tm.*, " +
32
+            "(select configuration_value FROM tp_configuration WHERE id = tm.url_id) as url, " +
33
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
34
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
35
+            "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as address, " +
36
+            "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
37
+            "FROM " +
38
+            "tp_equipment tm " +
39
+            "where tm.community_id = #{communityId} and tm.equipment_type = #{equipmentType}")
40
+    List<TpEquipment> selectAllByCommunityAndEquipmentType(@Param("communityId") Integer communityId, @Param("equipmentType") Integer equipmentType);
41
+
42
+
43
+    /**
44
+     * 根据小区id 和 类型查询 和 设备id
45
+     * @param communityId
46
+     * @param equipmentType
47
+     * @return
48
+     */
49
+    @ResultType(TpEquipment.class)
50
+    @Select("select " +
51
+            "tm.*, " +
52
+            "(select configuration_value FROM tp_configuration WHERE id = tm.url_id) as url, " +
53
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_guard_tel_id) as securityGuardTel, " +
54
+            "(select configuration_value FROM tp_configuration WHERE id = tm.security_room_tel_id) as securityRoomTel, " +
55
+            "(select configuration_value FROM tp_configuration WHERE id = tm.address_id) as address, " +
56
+            "(select configuration_value FROM tp_configuration WHERE id = tm.uuid_id)as uuid " +
57
+            "FROM " +
58
+            "tp_equipment tm " +
59
+            "where tm.community_id = #{communityId} and tm.equipment_type = #{equipmentType} and tm.id = #{monitoringId}")
60
+    TpEquipment getMonitoringById(@Param("communityId") Integer communityId, @Param("equipmentType") Integer equipmentType, @Param("monitoringId") Integer monitoringId);
61
+
62
+
63
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpEquipmentTreeMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpEquipmentTree;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 设备树 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-15
14
+ */
15
+@Mapper
16
+public interface TpEquipmentTreeMapper extends BaseMapper<TpEquipmentTree> {
17
+
18
+}

+ 21
- 0
src/main/java/com/huiju/estateagents/property/dao/TpHotelImgMapper.java Visa fil

@@ -0,0 +1,21 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpHotelImg;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ * 酒店图片 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-14
16
+ */
17
+@Mapper
18
+public interface TpHotelImgMapper extends BaseMapper<TpHotelImg> {
19
+	
20
+	int batchInsert(List<TpHotelImg> hotelImgList);
21
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpLevelMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpLevel;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 小区楼层资料表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-01
14
+ */
15
+@Mapper
16
+public interface TpLevelMapper extends BaseMapper<TpLevel> {
17
+
18
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpPhaseMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpPhase;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 小区期区资料表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-04-01
14
+ */
15
+@Mapper
16
+public interface TpPhaseMapper extends BaseMapper<TpPhase> {
17
+
18
+}

+ 21
- 0
src/main/java/com/huiju/estateagents/property/dao/TpRentalHouseImgMapper.java Visa fil

@@ -0,0 +1,21 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpRentalHouseImg;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ * 出租房间图片 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-13
16
+ */
17
+@Mapper
18
+public interface TpRentalHouseImgMapper extends BaseMapper<TpRentalHouseImg> {
19
+	
20
+	int batchInsert(List<TpRentalHouseImg> rentalHouseImgList);
21
+}

+ 29
- 0
src/main/java/com/huiju/estateagents/property/dao/TpRentalHouseMapper.java Visa fil

@@ -0,0 +1,29 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.TpRentalHouse;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ * 出租公寓表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-05-13
18
+ */
19
+@Mapper
20
+public interface TpRentalHouseMapper extends BaseMapper<TpRentalHouse> {
21
+	
22
+	/**
23
+	 * 获取公寓列表
24
+	 * @param page
25
+	 * @param tpRentalHouse
26
+	 * @return
27
+	 */
28
+	List<TpRentalHouse> getRentalList(Page page, @Param("tpRentalHouse") TpRentalHouse tpRentalHouse);
29
+}

+ 63
- 0
src/main/java/com/huiju/estateagents/property/dao/TpRoomNoMapper.java Visa fil

@@ -0,0 +1,63 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpRoomNo;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+import org.apache.ibatis.annotations.ResultType;
8
+import org.apache.ibatis.annotations.Select;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * <p>
14
+ * 户号信息表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2019-04-09
19
+ */
20
+@Mapper
21
+public interface TpRoomNoMapper extends BaseMapper<TpRoomNo> {
22
+
23
+
24
+    /**
25
+     * 根据 小区,期,栋,单元,楼层,房间  查询房间信息
26
+     * @param communityId
27
+     * @param phaseName
28
+     * @param buildingName
29
+     * @param unitName
30
+     * @param levelName
31
+     * @param roomNoName
32
+     * @return
33
+     */
34
+    @ResultType(TpRoomNo.class)
35
+    @Select("select * from tp_room_no " +
36
+            "where community_id = #{communityId} " +
37
+            "and phase_name = #{phaseName} " +
38
+            "and building_name = #{buildingName} " +
39
+            "and unit_name = #{unitName} " +
40
+            "and level_name = #{levelName} " +
41
+            "and name = #{roomNoName}")
42
+    TpRoomNo selectCommunityIdAndAddressName(@Param("communityId") Integer communityId, @Param("phaseName") String phaseName, @Param("buildingName") String buildingName, @Param("unitName") String unitName, @Param("levelName") String levelName, @Param("roomNoName") String roomNoName);
43
+
44
+    /**
45
+     * 查询数据,分页
46
+     * @param pageNum
47
+     * @param pageSize
48
+     * @return
49
+     */
50
+    @ResultType(TpRoomNo.class)
51
+    @Select("select * from tp_room_no where community_id = #{communityId} limit #{pageNum},#{pageSize}")
52
+    List<TpRoomNo> selectCommunityIdList(@Param("communityId") Integer communityId, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
53
+
54
+    /**
55
+     * 查询数据,分页
56
+     * @param communityId
57
+     * @return
58
+     */
59
+    @ResultType(Long.class)
60
+    @Select("select count(1) from tp_room_no where community_id = #{communityId}")
61
+    Long selectCommunityIdCount(@Param("communityId") Integer communityId);
62
+
63
+}

+ 21
- 0
src/main/java/com/huiju/estateagents/property/dao/TpShopImgMapper.java Visa fil

@@ -0,0 +1,21 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpShopImg;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ * 商铺图片 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-10
16
+ */
17
+@Mapper
18
+public interface TpShopImgMapper extends BaseMapper<TpShopImg> {
19
+	
20
+	int batchSave(List<TpShopImg> carouselList);
21
+}

+ 23
- 0
src/main/java/com/huiju/estateagents/property/dao/TpShopMapper.java Visa fil

@@ -0,0 +1,23 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.TpShop;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+
9
+import java.util.List;
10
+
11
+/**
12
+ * <p>
13
+ * 小区商铺表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-05-10
18
+ */
19
+@Mapper
20
+public interface TpShopMapper extends BaseMapper<TpShop> {
21
+	
22
+	List<TpShop> getShopList(Page page, @Param("tpShop") TpShop tpShop);
23
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpShopSettingMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpShopSetting;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 商铺开关设置 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-05-09
14
+ */
15
+@Mapper
16
+public interface TpShopSettingMapper extends BaseMapper<TpShopSetting> {
17
+
18
+}

+ 21
- 0
src/main/java/com/huiju/estateagents/property/dao/TpShopTypeMapper.java Visa fil

@@ -0,0 +1,21 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpShopType;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+import java.util.List;
8
+
9
+/**
10
+ * <p>
11
+ * 商铺类型 Mapper 接口
12
+ * </p>
13
+ *
14
+ * @author jobob
15
+ * @since 2019-05-09
16
+ */
17
+@Mapper
18
+public interface TpShopTypeMapper extends BaseMapper<TpShopType> {
19
+	
20
+	int insertBatchIds(List<TpShopType> list);
21
+}

+ 34
- 0
src/main/java/com/huiju/estateagents/property/dao/TpSysRoleMapper.java Visa fil

@@ -0,0 +1,34 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpSysRole;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+import java.util.List;
9
+import java.util.Map;
10
+
11
+/**
12
+ * <p>
13
+ * 物业web端角色表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author weiximei
17
+ * @since 2018-12-19
18
+ */
19
+@Mapper
20
+public interface TpSysRoleMapper extends BaseMapper<TpSysRole> {
21
+
22
+    /**
23
+     * 多表查询 查询出这个用户所有的角色权限
24
+     * @param map
25
+     * @return
26
+     */
27
+    List<TpSysRole> selectByUserIdAndRoleId(Map<String, Object> map);
28
+
29
+    /**
30
+     * 得到所有角色
31
+     * @param communityId
32
+     */
33
+    List<TpSysRole> allUserRole(@Param("communityId") Integer communityId);
34
+}

+ 24
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTicketMapper.java Visa fil

@@ -0,0 +1,24 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.core.metadata.IPage;
5
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6
+import com.huiju.estateagents.property.model.TpTicket;
7
+import com.huiju.estateagents.property.vo.TpTicketVO;
8
+import org.apache.ibatis.annotations.Mapper;
9
+import org.apache.ibatis.annotations.Param;
10
+
11
+/**
12
+ * <p>
13
+ * 工单表 Mapper 接口
14
+ * </p>
15
+ *
16
+ * @author jobob
17
+ * @since 2019-02-14
18
+ */
19
+@Mapper
20
+public interface TpTicketMapper extends BaseMapper<TpTicket> {
21
+
22
+    IPage<TpTicket> ticketList(Page page, @Param("ticket") TpTicket ticket, @Param("userName") String UserNmae, @Param("updateUserNmae") String updateUserNmae, @Param("communityId") Integer communityId);
23
+    TpTicketVO ticketDetails(@Param("id") Integer id);
24
+}

+ 18
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordCommentMapper.java Visa fil

@@ -0,0 +1,18 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpTicketRecordComment;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+/**
8
+ * <p>
9
+ * 物业端工单追问表 Mapper 接口
10
+ * </p>
11
+ *
12
+ * @author jobob
13
+ * @since 2019-02-14
14
+ */
15
+@Mapper
16
+public interface TpTicketRecordCommentMapper extends BaseMapper<TpTicketRecordComment> {
17
+
18
+}

+ 28
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTicketRecordMapper.java Visa fil

@@ -0,0 +1,28 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.huiju.estateagents.property.model.TpTicketRecord;
5
+import org.apache.ibatis.annotations.Mapper;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+/**
9
+ * <p>
10
+ * 工单处理表 Mapper 接口
11
+ * </p>
12
+ *
13
+ * @author jobob
14
+ * @since 2019-02-14
15
+ */
16
+@Mapper
17
+public interface TpTicketRecordMapper extends BaseMapper<TpTicketRecord> {
18
+
19
+    TpTicketRecord selectTpTicketRecord(@Param("ticketId") Integer ticketId, @Param("status") Integer status);
20
+
21
+    /**
22
+     * 在状态为待分配的情况下根据工单ID修改
23
+     * @param tpTicketRecord
24
+     */
25
+    void updateTicketRecord(TpTicketRecord tpTicketRecord);
26
+
27
+    String statusName(@Param("status") String status);
28
+}

+ 33
- 0
src/main/java/com/huiju/estateagents/property/dao/TpTransactionMapper.java Visa fil

@@ -0,0 +1,33 @@
1
+package com.huiju.estateagents.property.dao;
2
+
3
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5
+import com.huiju.estateagents.property.model.TpTransaction;
6
+import org.apache.ibatis.annotations.Mapper;
7
+import org.apache.ibatis.annotations.Param;
8
+import org.apache.ibatis.annotations.Update;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * <p>
14
+ * 物业web端二手交易表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author jobob
18
+ * @since 2018-12-29
19
+ */
20
+@Mapper
21
+public interface TpTransactionMapper extends BaseMapper<TpTransaction> {
22
+
23
+	List<TpTransaction> selectListByParams(Page page, @Param("transactionTitle") String transactionTitle, @Param("userName") String userName, @Param("id") Integer id, @Param("status") String status, @Param("communityId") Integer communityId);
24
+
25
+
26
+    /**
27
+     * 作废话题
28
+     * @param uuid
29
+     * @param uuidType
30
+     */
31
+    @Update("update tp_transaction set status = 0 where uuid = #{uuid} and uuid_type = #{uuidType}")
32
+    void invalidByUuidAndUuidType(@Param("uuid") Integer uuid, @Param("uuidType") String uuidType);
33
+}

+ 0
- 0
src/main/java/com/huiju/estateagents/property/dao/TpUnitMapper.java Visa fil


Vissa filer visades inte eftersom för många filer har ändrats