傅行帆 4 年之前
父節點
當前提交
20f9c002d4

+ 13
- 20
src/main/java/com/huiju/estateagents/property/controller/TpTicketController.java 查看文件

4
 import com.huiju.estateagents.base.BaseController;
4
 import com.huiju.estateagents.base.BaseController;
5
 import com.huiju.estateagents.base.ResponseBean;
5
 import com.huiju.estateagents.base.ResponseBean;
6
 import com.huiju.estateagents.center.taUser.entity.TaUser;
6
 import com.huiju.estateagents.center.taUser.entity.TaUser;
7
+import com.huiju.estateagents.entity.TaPerson;
7
 import com.huiju.estateagents.property.common.Constant;
8
 import com.huiju.estateagents.property.common.Constant;
8
 import com.huiju.estateagents.property.common.UserElement;
9
 import com.huiju.estateagents.property.common.UserElement;
9
 import com.huiju.estateagents.property.model.TpTicket;
10
 import com.huiju.estateagents.property.model.TpTicket;
10
 import com.huiju.estateagents.property.model.TpTicketRecordComment;
11
 import com.huiju.estateagents.property.model.TpTicketRecordComment;
11
 import com.huiju.estateagents.property.service.IUserService;
12
 import com.huiju.estateagents.property.service.IUserService;
12
 import com.huiju.estateagents.property.service.TpTicketService;
13
 import com.huiju.estateagents.property.service.TpTicketService;
14
+import com.huiju.estateagents.service.ITaPersonService;
13
 import io.swagger.annotations.Api;
15
 import io.swagger.annotations.Api;
14
 import io.swagger.annotations.ApiImplicitParam;
16
 import io.swagger.annotations.ApiImplicitParam;
15
 import io.swagger.annotations.ApiImplicitParams;
17
 import io.swagger.annotations.ApiImplicitParams;
36
     @Autowired
38
     @Autowired
37
     private IUserService userService;
39
     private IUserService userService;
38
 
40
 
41
+    @Autowired
42
+    private ITaPersonService taPersonService;
43
+
39
     @Autowired
44
     @Autowired
40
     private TpTicketService tpTicketService;
45
     private TpTicketService tpTicketService;
41
     // @ApiOperation(value = "工单列表", notes = "工单列表")
46
     // @ApiOperation(value = "工单列表", notes = "工单列表")
127
                                    @RequestParam(value = "pageSize", defaultValue = "3") Integer pageSize,
132
                                    @RequestParam(value = "pageSize", defaultValue = "3") Integer pageSize,
128
                                    HttpServletRequest request) {
133
                                    HttpServletRequest request) {
129
         ResponseBean response = new ResponseBean();
134
         ResponseBean response = new ResponseBean();
130
-        
131
-        TaUser userElement = getTaUser(request);
132
-
133
         TpTicket tpTicket = new TpTicket();
135
         TpTicket tpTicket = new TpTicket();
134
         tpTicket.setOrgId(Integer.valueOf(orgId));
136
         tpTicket.setOrgId(Integer.valueOf(orgId));
135
-        tpTicket.setTaUserId(userElement.getUserId());
137
+        tpTicket.setPersonId(getPersonId(request));
136
 
138
 
137
         response = tpTicketService.getList(tpTicket, pageNum, pageSize);
139
         response = tpTicketService.getList(tpTicket, pageNum, pageSize);
138
         return response;
140
         return response;
172
                                        @RequestParam(value = "type") String type,
174
                                        @RequestParam(value = "type") String type,
173
                                        HttpServletRequest request) {
175
                                        HttpServletRequest request) {
174
         ResponseBean responseBean = new ResponseBean();
176
         ResponseBean responseBean = new ResponseBean();
175
-
176
-        TaUser userElement = getTaUser(request);
177
-
178
         TpTicket tpTicket = new TpTicket();
177
         TpTicket tpTicket = new TpTicket();
179
         tpTicket.setOrgId(Integer.valueOf(orgId));
178
         tpTicket.setOrgId(Integer.valueOf(orgId));
180
-        tpTicket.setTaUserId(userElement.getUserId());
179
+        tpTicket.setPersonId(getPersonId(request));
181
         tpTicket.setType(type);
180
         tpTicket.setType(type);
182
 
181
 
183
         responseBean = tpTicketService.getByTypeList(tpTicket, pageNum, pageSize);
182
         responseBean = tpTicketService.getByTypeList(tpTicket, pageNum, pageSize);
192
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
191
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
193
     @RequestMapping(value = "/wx/ticket/reply/{orgId}", method = RequestMethod.POST)
192
     @RequestMapping(value = "/wx/ticket/reply/{orgId}", method = RequestMethod.POST)
194
     public ResponseBean updateTicketsReply(@PathVariable(value = "orgId") Integer orgId, @RequestBody TpTicketRecordComment tpTicketRecordComment, HttpServletRequest request){
193
     public ResponseBean updateTicketsReply(@PathVariable(value = "orgId") Integer orgId, @RequestBody TpTicketRecordComment tpTicketRecordComment, HttpServletRequest request){
195
-        TaUser userElement = getTaUser(request);
196
-        Integer userId = userElement.getUserId();
197
         ResponseBean responseBean = new ResponseBean();
194
         ResponseBean responseBean = new ResponseBean();
198
 
195
 
199
         tpTicketRecordComment.setOrgId(orgId);
196
         tpTicketRecordComment.setOrgId(orgId);
200
-        Integer size = tpTicketService.updateTicketsReply(tpTicketRecordComment, userId);
197
+        Integer size = tpTicketService.updateTicketsReply(tpTicketRecordComment, getPersonId(request));
201
         if (size > 0){
198
         if (size > 0){
202
             responseBean.addSuccess(size);
199
             responseBean.addSuccess(size);
203
         } else {
200
         } else {
216
     @ResponseBody
213
     @ResponseBody
217
     public ResponseBean addTransaction(@RequestBody String paramets, HttpServletRequest request) throws IOException {
214
     public ResponseBean addTransaction(@RequestBody String paramets, HttpServletRequest request) throws IOException {
218
         ResponseBean responseBean = new ResponseBean();
215
         ResponseBean responseBean = new ResponseBean();
219
-        TaUser userElement = getTaUser(request);
220
-        ResponseBean response = tpTicketService.addAiTicketService(userElement, paramets);
216
+        ResponseBean response = tpTicketService.addAiTicketService(getPersonId(request), paramets);
221
         return response;
217
         return response;
222
     }
218
     }
223
 
219
 
232
                                             @RequestBody String parameter,
228
                                             @RequestBody String parameter,
233
                                             HttpServletRequest request) {
229
                                             HttpServletRequest request) {
234
         ResponseBean responseBean = new ResponseBean();
230
         ResponseBean responseBean = new ResponseBean();
235
-        TaUser userElement = getTaUser(request);
236
-        responseBean = tpTicketService.updateTicketContent(ticketId, parameter,userElement);
231
+        responseBean = tpTicketService.updateTicketContent(ticketId, parameter,getPersonId(request));
237
         return responseBean;
232
         return responseBean;
238
     }
233
     }
239
 
234
 
243
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
238
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")})
244
     @RequestMapping(value = "/wx/stopTicket/{orgId}", method = RequestMethod.GET)
239
     @RequestMapping(value = "/wx/stopTicket/{orgId}", method = RequestMethod.GET)
245
     public ResponseBean stopTicket(@PathVariable("orgId") Integer orgId, @RequestParam("ticketId") Integer ticketId, HttpServletRequest request) {
240
     public ResponseBean stopTicket(@PathVariable("orgId") Integer orgId, @RequestParam("ticketId") Integer ticketId, HttpServletRequest request) {
246
-        TaUser userElement = getTaUser(request);
247
-
248
         ResponseBean responseBean = new ResponseBean();
241
         ResponseBean responseBean = new ResponseBean();
249
-        responseBean = tpTicketService.stopTpTicketRecord(orgId, ticketId, userElement);
242
+        responseBean = tpTicketService.stopTpTicketRecord(orgId, ticketId, getPersonId(request));
250
         return responseBean;
243
         return responseBean;
251
     }
244
     }
252
 
245
 
257
 
250
 
258
     @RequestMapping(value = "/wx/addWxRecordComment", method = RequestMethod.POST)
251
     @RequestMapping(value = "/wx/addWxRecordComment", method = RequestMethod.POST)
259
     public ResponseBean addWxRecordComment(@RequestBody String parameter, HttpServletRequest request){
252
     public ResponseBean addWxRecordComment(@RequestBody String parameter, HttpServletRequest request){
260
-        TaUser userElement = getTaUser(request);
261
-        ResponseBean  responseBean = tpTicketService.addWxRecordComment(parameter,userElement.getUserId(),userElement.getOrgId(),userElement.getUserName());
253
+        TaPerson taPerson = taPersonService.getById(getPersonId(request));
254
+        ResponseBean  responseBean = tpTicketService.addWxRecordComment(parameter,taPerson.getPersonId(),1,taPerson.getName());
262
         return responseBean;
255
         return responseBean;
263
     }
256
     }
264
 }
257
 }

+ 2
- 2
src/main/java/com/huiju/estateagents/property/model/Message.java 查看文件

57
     /**
57
     /**
58
      * 接收人id
58
      * 接收人id
59
      */
59
      */
60
-    private Integer uuid;
60
+    private String uuid;
61
 
61
 
62
     /**
62
     /**
63
      * 接收人id的类型  1是app用户 2是物业端用户
63
      * 接收人id的类型  1是app用户 2是物业端用户
97
     /**
97
     /**
98
      * 创建人
98
      * 创建人
99
      */
99
      */
100
-    private Integer createUser;
100
+    private String createUser;
101
 
101
 
102
     /**
102
     /**
103
      * 创建时间
103
      * 创建时间

+ 1
- 1
src/main/java/com/huiju/estateagents/property/model/TdImages.java 查看文件

47
     /**
47
     /**
48
      * 创建人
48
      * 创建人
49
      */
49
      */
50
-    private Integer createUser;
50
+    private String createUser;
51
 
51
 
52
     /**
52
     /**
53
      * 创建时间
53
      * 创建时间

+ 3
- 3
src/main/java/com/huiju/estateagents/property/model/TpTicket.java 查看文件

41
     /**
41
     /**
42
      * 住户app的id
42
      * 住户app的id
43
      */
43
      */
44
-    private Integer taUserId;
44
+    private String personId;
45
 
45
 
46
     /**
46
     /**
47
      * 工单标题
47
      * 工单标题
86
     /**
86
     /**
87
      * 创建人
87
      * 创建人
88
      */
88
      */
89
-    private Integer createUser;
89
+    private String createUser;
90
 
90
 
91
     /**
91
     /**
92
      * 创建时间
92
      * 创建时间
96
     /**
96
     /**
97
      * 更新人
97
      * 更新人
98
      */
98
      */
99
-    private Integer updateUser;
99
+    private String updateUser;
100
 
100
 
101
     /**
101
     /**
102
      * 用户姓名
102
      * 用户姓名

+ 1
- 1
src/main/java/com/huiju/estateagents/property/model/TpTicketRecord.java 查看文件

54
     /**
54
     /**
55
      * 创建人
55
      * 创建人
56
      */
56
      */
57
-    private Integer createUser;
57
+    private String createUser;
58
 
58
 
59
     /**
59
     /**
60
      * 创建时间
60
      * 创建时间

+ 1
- 1
src/main/java/com/huiju/estateagents/property/model/TpTicketRecordComment.java 查看文件

49
     /**
49
     /**
50
      * 追问人id(tp_user_id也就是物业用户)   或者是 发起人id(ta_user_id也就是住户app的id)
50
      * 追问人id(tp_user_id也就是物业用户)   或者是 发起人id(ta_user_id也就是住户app的id)
51
      */
51
      */
52
-    private Integer uuid;
52
+    private String uuid;
53
 
53
 
54
     /**
54
     /**
55
      * 用户类型: 0:追问人  1:发起人
55
      * 用户类型: 0:追问人  1:发起人

+ 8
- 8
src/main/java/com/huiju/estateagents/property/service/TpTicketService.java 查看文件

100
 
100
 
101
     /**
101
     /**
102
      * 添加 维修/投诉/联系单
102
      * 添加 维修/投诉/联系单
103
-     * @param userElement
103
+     * @param personId
104
      * @param parameter
104
      * @param parameter
105
      * @return
105
      * @return
106
      */
106
      */
107
-    ResponseBean addAiTicketService(TaUser userElement, String parameter) throws IOException;
107
+    ResponseBean addAiTicketService(String personId, String parameter) throws IOException;
108
 
108
 
109
     /**
109
     /**
110
      * 回复工单
110
      * 回复工单
112
      * @return
112
      * @return
113
      */
113
      */
114
     @Deprecated
114
     @Deprecated
115
-    Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment, Integer userId);
115
+    Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment, String personId);
116
 
116
 
117
     /**
117
     /**
118
      * 修改 维修/投诉/联系单 内容
118
      * 修改 维修/投诉/联系单 内容
119
      * @param ticketId
119
      * @param ticketId
120
      * @param parameter
120
      * @param parameter
121
-     * @param userElement
121
+     * @param personId
122
      */
122
      */
123
-    ResponseBean updateTicketContent(Integer ticketId, String parameter,TaUser userElement);
123
+    ResponseBean updateTicketContent(Integer ticketId, String parameter,String personId);
124
 
124
 
125
     /**
125
     /**
126
      * 终止 维修/投诉/联系单
126
      * 终止 维修/投诉/联系单
128
      * @param ticketId
128
      * @param ticketId
129
      * @return
129
      * @return
130
      */
130
      */
131
-    ResponseBean stopTpTicketRecord(Integer orgId, Integer ticketId, TaUser userElement);
131
+    ResponseBean stopTpTicketRecord(Integer orgId, Integer ticketId, String personId);
132
 
132
 
133
     /**
133
     /**
134
      * 添加工单对话
134
      * 添加工单对话
135
      * @param parameter
135
      * @param parameter
136
-     * @param verifyId
136
+     * @param personId
137
      * @param orgId
137
      * @param orgId
138
      * @param userName
138
      * @param userName
139
      * @return
139
      * @return
140
      */
140
      */
141
-    ResponseBean addWxRecordComment(String parameter, Integer verifyId, Integer orgId, String userName);
141
+    ResponseBean addWxRecordComment(String parameter, String personId, Integer orgId, String userName);
142
 }
142
 }

+ 2
- 2
src/main/java/com/huiju/estateagents/property/service/impl/BillInvoiceServiceImpl.java 查看文件

360
             messageModelAPP.setMessageType("7");
360
             messageModelAPP.setMessageType("7");
361
             messageModelAPP.setAdviceType("1");
361
             messageModelAPP.setAdviceType("1");
362
             messageModelAPP.setModelType("2");
362
             messageModelAPP.setModelType("2");
363
-            messageModelAPP.setUuid(e.getTaUserId());
363
+            messageModelAPP.setUuid(e.getTaUserId().toString());
364
             messageModelAPP.setUuidType("1");
364
             messageModelAPP.setUuidType("1");
365
             // 消息是物业端 发过来的, 就是 2
365
             // 消息是物业端 发过来的, 就是 2
366
             messageModelAPP.setSource("2");
366
             messageModelAPP.setSource("2");
367
             messageModelAPP.setMessageContent("您有待缴费的账单,点击查看并缴费 " + dateFormat.format(new Date()) + bill.getBillName());
367
             messageModelAPP.setMessageContent("您有待缴费的账单,点击查看并缴费 " + dateFormat.format(new Date()) + bill.getBillName());
368
             messageModelAPP.setStatus("1");
368
             messageModelAPP.setStatus("1");
369
             messageModelAPP.setCreateDate(LocalDateTime.now());
369
             messageModelAPP.setCreateDate(LocalDateTime.now());
370
-            messageModelAPP.setCreateUser(userElement.getUserId());
370
+            messageModelAPP.setCreateUser(userElement.getUserId().toString());
371
             messageModelAPP.setBillId(e.getId());
371
             messageModelAPP.setBillId(e.getId());
372
 
372
 
373
             return messageModelAPP;
373
             return messageModelAPP;

+ 6
- 6
src/main/java/com/huiju/estateagents/property/service/impl/BillServiceImpl.java 查看文件

298
                 message.setMessageType("7");
298
                 message.setMessageType("7");
299
                 message.setAdviceType("4");
299
                 message.setAdviceType("4");
300
                 message.setModelType("2");
300
                 message.setModelType("2");
301
-                message.setUuid(userElement.getUserId());
301
+                message.setUuid(userElement.getUserId().toString());
302
                 message.setUuidType("2");
302
                 message.setUuidType("2");
303
                 // 消息是物业端发过来的, 就是 2
303
                 // 消息是物业端发过来的, 就是 2
304
                 message.setSource("2");
304
                 message.setSource("2");
305
                 message.setMessageContent("收费组“" + bill.getBillName() +  "”还未发布,点击发布");
305
                 message.setMessageContent("收费组“" + bill.getBillName() +  "”还未发布,点击发布");
306
                 message.setStatus("1");
306
                 message.setStatus("1");
307
                 message.setCreateDate(LocalDateTime.now());
307
                 message.setCreateDate(LocalDateTime.now());
308
-                message.setCreateUser(userElement.getUserId());
308
+                message.setCreateUser(userElement.getUserId().toString());
309
                 message.setBillId(bill.getId());
309
                 message.setBillId(bill.getId());
310
 
310
 
311
                 messageMapper.insert(message);
311
                 messageMapper.insert(message);
326
                 messageModel.setMessageType("7");
326
                 messageModel.setMessageType("7");
327
                 messageModel.setAdviceType("4");
327
                 messageModel.setAdviceType("4");
328
                 messageModel.setModelType("1");
328
                 messageModel.setModelType("1");
329
-                messageModel.setUuid(userElement.getUserId());
329
+                messageModel.setUuid(userElement.getUserId().toString());
330
                 messageModel.setUuidType("2");
330
                 messageModel.setUuidType("2");
331
                 // 消息是物业端发过来的, 就是 2
331
                 // 消息是物业端发过来的, 就是 2
332
                 messageModel.setSource("2");
332
                 messageModel.setSource("2");
334
 //                messageModel.setMessageContent("收费组“" + bill.getBillName() + "”还有" + DateUtils.getDaysBetween(new Date(), bill.getEndDate()) + "天就到截止日期了,但还有未缴用户,点击去查看");
334
 //                messageModel.setMessageContent("收费组“" + bill.getBillName() + "”还有" + DateUtils.getDaysBetween(new Date(), bill.getEndDate()) + "天就到截止日期了,但还有未缴用户,点击去查看");
335
                 messageModel.setStatus("1");
335
                 messageModel.setStatus("1");
336
                 messageModel.setCreateDate(LocalDateTime.now());
336
                 messageModel.setCreateDate(LocalDateTime.now());
337
-                messageModel.setCreateUser(userElement.getUserId());
337
+                messageModel.setCreateUser(userElement.getUserId().toString());
338
                 messageModel.setBillId(bill.getId());
338
                 messageModel.setBillId(bill.getId());
339
 
339
 
340
                 messageMapper.insert(messageModel);
340
                 messageMapper.insert(messageModel);
377
                         messageModelAPP.setMessageType("7");
377
                         messageModelAPP.setMessageType("7");
378
                         messageModelAPP.setAdviceType("1");
378
                         messageModelAPP.setAdviceType("1");
379
                         messageModelAPP.setModelType("2");
379
                         messageModelAPP.setModelType("2");
380
-                        messageModelAPP.setUuid(e.getTaUserId());
380
+                        messageModelAPP.setUuid(e.getTaUserId().toString());
381
                         messageModelAPP.setUuidType("1");
381
                         messageModelAPP.setUuidType("1");
382
                         // 消息是物业端 发过来的, 就是 2
382
                         // 消息是物业端 发过来的, 就是 2
383
                         messageModelAPP.setSource("2");
383
                         messageModelAPP.setSource("2");
384
                         messageModelAPP.setMessageContent("您有待缴费的账单,点击查看并缴费 " + dateFormat.format(new Date()) + bill.getBillName());
384
                         messageModelAPP.setMessageContent("您有待缴费的账单,点击查看并缴费 " + dateFormat.format(new Date()) + bill.getBillName());
385
                         messageModelAPP.setStatus("1");
385
                         messageModelAPP.setStatus("1");
386
                         messageModelAPP.setCreateDate(LocalDateTime.now());
386
                         messageModelAPP.setCreateDate(LocalDateTime.now());
387
-                        messageModelAPP.setCreateUser(userElement.getUserId());
387
+                        messageModelAPP.setCreateUser(userElement.getUserId().toString());
388
                         messageModelAPP.setBillId(e.getId());
388
                         messageModelAPP.setBillId(e.getId());
389
 
389
 
390
                         return messageModelAPP;
390
                         return messageModelAPP;

+ 2
- 2
src/main/java/com/huiju/estateagents/property/service/impl/BuildingOwnerInfoServiceImpl.java 查看文件

302
             message.setMessageType("9");
302
             message.setMessageType("9");
303
             message.setAdviceType("1");
303
             message.setAdviceType("1");
304
             message.setModelType("1");
304
             message.setModelType("1");
305
-            message.setUuid(taUserVerify.getId());
305
+            message.setUuid(taUserVerify.getId().toString());
306
             message.setUuidType("1");
306
             message.setUuidType("1");
307
             message.setSource("1");
307
             message.setSource("1");
308
             message.setMessageContent(count);
308
             message.setMessageContent(count);
310
             message.setResult("");
310
             message.setResult("");
311
             message.setMeaasgeTypeId("");
311
             message.setMeaasgeTypeId("");
312
             message.setReadStatus("0");
312
             message.setReadStatus("0");
313
-            message.setCreateUser(userElement.getUserId());
313
+            message.setCreateUser(userElement.getUserId().toString());
314
             message.setCreateDate(LocalDateTime.now());
314
             message.setCreateDate(LocalDateTime.now());
315
             messageMapper.insert(message);
315
             messageMapper.insert(message);
316
         }
316
         }

+ 4
- 4
src/main/java/com/huiju/estateagents/property/service/impl/TaUserVerifyServiceImpl.java 查看文件

133
             message.setMessageType("9");
133
             message.setMessageType("9");
134
             message.setAdviceType("1");
134
             message.setAdviceType("1");
135
             message.setModelType("1");
135
             message.setModelType("1");
136
-            message.setUuid(userVerify.getId());
136
+            message.setUuid(userVerify.getId().toString());
137
             message.setUuidType("1");
137
             message.setUuidType("1");
138
             message.setSource("1");
138
             message.setSource("1");
139
             message.setMessageContent(count);
139
             message.setMessageContent(count);
141
             message.setResult("");
141
             message.setResult("");
142
             message.setMeaasgeTypeId("");
142
             message.setMeaasgeTypeId("");
143
             message.setReadStatus("0");
143
             message.setReadStatus("0");
144
-            message.setCreateUser(userElement.getUserId());
144
+            message.setCreateUser(userElement.getUserId().toString());
145
             message.setCreateDate(LocalDateTime.now());
145
             message.setCreateDate(LocalDateTime.now());
146
             tpmessageMapper.insert(message);
146
             tpmessageMapper.insert(message);
147
         }
147
         }
271
             message.setMessageType("9");
271
             message.setMessageType("9");
272
             message.setAdviceType("1");
272
             message.setAdviceType("1");
273
             message.setModelType("1");
273
             message.setModelType("1");
274
-            message.setUuid(userVerify.getId());
274
+            message.setUuid(userVerify.getId().toString());
275
             message.setUuidType("1");
275
             message.setUuidType("1");
276
             message.setSource("1");
276
             message.setSource("1");
277
             message.setMessageContent(count);
277
             message.setMessageContent(count);
279
             message.setResult("");
279
             message.setResult("");
280
             message.setMeaasgeTypeId("");
280
             message.setMeaasgeTypeId("");
281
             message.setReadStatus("0");
281
             message.setReadStatus("0");
282
-            message.setCreateUser(userElement.getUserId());
282
+            message.setCreateUser(userElement.getUserId().toString());
283
             message.setCreateDate(LocalDateTime.now());
283
             message.setCreateDate(LocalDateTime.now());
284
             tpmessageMapper.insert(message);
284
             tpmessageMapper.insert(message);
285
         }
285
         }

+ 5
- 5
src/main/java/com/huiju/estateagents/property/service/impl/TpActivityServiceImpl.java 查看文件

185
             activityMessage.setMessageType("8");
185
             activityMessage.setMessageType("8");
186
             activityMessage.setAdviceType("4");
186
             activityMessage.setAdviceType("4");
187
             activityMessage.setModelType("2");
187
             activityMessage.setModelType("2");
188
-            activityMessage.setUuid(userElement.getUserId());
188
+            activityMessage.setUuid(userElement.getUserId().toString());
189
             activityMessage.setUuidType("2");
189
             activityMessage.setUuidType("2");
190
             activityMessage.setSource("2");
190
             activityMessage.setSource("2");
191
             activityMessage.setMessageContent("活动“{" + tpActivity.getActivityTitle() + "}”还未发布,点击发布");
191
             activityMessage.setMessageContent("活动“{" + tpActivity.getActivityTitle() + "}”还未发布,点击发布");
192
             activityMessage.setStatus("1");
192
             activityMessage.setStatus("1");
193
             activityMessage.setActivityId(tpActivity.getId());
193
             activityMessage.setActivityId(tpActivity.getId());
194
             activityMessage.setCreateDate(LocalDateTime.now());
194
             activityMessage.setCreateDate(LocalDateTime.now());
195
-            activityMessage.setCreateUser(userElement.getUserId());
195
+            activityMessage.setCreateUser(userElement.getUserId().toString());
196
             activityMessage.setReadStatus("0");
196
             activityMessage.setReadStatus("0");
197
                 //为草稿时
197
                 //为草稿时
198
                 if ("2".equals(tpActivity.getStatus())) {
198
                 if ("2".equals(tpActivity.getStatus())) {
242
                         tdImages.setImageUrl(qrCodePerproties.getUrl() + tpActivity.getId());
242
                         tdImages.setImageUrl(qrCodePerproties.getUrl() + tpActivity.getId());
243
                         tdImages.setUuid(tpActivity.getId());
243
                         tdImages.setUuid(tpActivity.getId());
244
                         tdImages.setType("activityCode");
244
                         tdImages.setType("activityCode");
245
-                        tdImages.setCreateUser(userElement.getUserId());
245
+                        tdImages.setCreateUser(userElement.getUserId().toString());
246
                         tdImages.setCreateTime(LocalDateTime.now());
246
                         tdImages.setCreateTime(LocalDateTime.now());
247
                         tdImagesMapper.insert(tdImages);
247
                         tdImagesMapper.insert(tdImages);
248
 
248
 
268
         for (String img : contentImgArray) {
268
         for (String img : contentImgArray) {
269
             TdImages tdImages = new TdImages();
269
             TdImages tdImages = new TdImages();
270
             tdImages.setCreateTime(LocalDateTime.now());
270
             tdImages.setCreateTime(LocalDateTime.now());
271
-            tdImages.setCreateUser(userElement.getUserId());
271
+            tdImages.setCreateUser(userElement.getUserId().toString());
272
             tdImages.setImageUrl(img);
272
             tdImages.setImageUrl(img);
273
             tdImages.setType("activity");
273
             tdImages.setType("activity");
274
             tdImages.setUuid(tpActivity.getId());
274
             tdImages.setUuid(tpActivity.getId());
308
             tdImages.setImageUrl(qrCodePerproties.getUrl() + tpActivity.getId());
308
             tdImages.setImageUrl(qrCodePerproties.getUrl() + tpActivity.getId());
309
             tdImages.setUuid(tpActivity.getId());
309
             tdImages.setUuid(tpActivity.getId());
310
             tdImages.setType("activityCode");
310
             tdImages.setType("activityCode");
311
-            tdImages.setCreateUser(userElement.getUserId());
311
+            tdImages.setCreateUser(userElement.getUserId().toString());
312
             tdImages.setCreateTime(LocalDateTime.now());
312
             tdImages.setCreateTime(LocalDateTime.now());
313
             tdImagesMapper.insert(tdImages);
313
             tdImagesMapper.insert(tdImages);
314
         }
314
         }

+ 4
- 4
src/main/java/com/huiju/estateagents/property/service/impl/TpAnnouncementServiceImpl.java 查看文件

121
             message.setMessageType("5");
121
             message.setMessageType("5");
122
             message.setModelType("2");
122
             message.setModelType("2");
123
             message.setAdviceType("4");
123
             message.setAdviceType("4");
124
-            message.setUuid(userId);
124
+            message.setUuid(userId.toString());
125
             message.setUuidType("2");
125
             message.setUuidType("2");
126
             message.setSource("2");
126
             message.setSource("2");
127
             message.setMessageContent("公告“" + tpAnnouncement.getAnnouncementTitle() + "”还未发布,查看详情");
127
             message.setMessageContent("公告“" + tpAnnouncement.getAnnouncementTitle() + "”还未发布,查看详情");
128
             message.setStatus("1");
128
             message.setStatus("1");
129
             message.setReadStatus("0");
129
             message.setReadStatus("0");
130
-            message.setCreateUser(userId);
130
+            message.setCreateUser(userId.toString());
131
             message.setCreateDate(LocalDateTime.now());
131
             message.setCreateDate(LocalDateTime.now());
132
             message.setAnnouncementId(tpAnnouncement.getId());
132
             message.setAnnouncementId(tpAnnouncement.getId());
133
             //为草稿的时
133
             //为草稿的时
155
             tdImages.setType("announcement");
155
             tdImages.setType("announcement");
156
             tdImages.setUuid(tpAnnouncement.getId());
156
             tdImages.setUuid(tpAnnouncement.getId());
157
             tdImages.setCreateTime(LocalDateTime.now());
157
             tdImages.setCreateTime(LocalDateTime.now());
158
-            tdImages.setCreateUser(userId);
158
+            tdImages.setCreateUser(userId.toString());
159
             imagesMapper.insert(tdImages);
159
             imagesMapper.insert(tdImages);
160
         }
160
         }
161
             return response;
161
             return response;
216
                 tdImages.setType("announcement");
216
                 tdImages.setType("announcement");
217
                 tdImages.setUuid(tpAnnouncement.getId());
217
                 tdImages.setUuid(tpAnnouncement.getId());
218
                 tdImages.setCreateTime(LocalDateTime.now());
218
                 tdImages.setCreateTime(LocalDateTime.now());
219
-                tdImages.setCreateUser(userId);
219
+                tdImages.setCreateUser(userId.toString());
220
                 imagesMapper.insert(tdImages);
220
                 imagesMapper.insert(tdImages);
221
             }
221
             }
222
         }
222
         }

+ 53
- 53
src/main/java/com/huiju/estateagents/property/service/impl/TpTicketServiceImpl.java 查看文件

10
 import com.huiju.estateagents.base.ResponseBean;
10
 import com.huiju.estateagents.base.ResponseBean;
11
 import com.huiju.estateagents.center.taUser.entity.TaUser;
11
 import com.huiju.estateagents.center.taUser.entity.TaUser;
12
 import com.huiju.estateagents.center.taUser.mapper.TaUserMapper;
12
 import com.huiju.estateagents.center.taUser.mapper.TaUserMapper;
13
+import com.huiju.estateagents.entity.TaPerson;
14
+import com.huiju.estateagents.mapper.TaPersonMapper;
13
 import com.huiju.estateagents.property.common.Constant;
15
 import com.huiju.estateagents.property.common.Constant;
14
 import com.huiju.estateagents.property.dao.*;
16
 import com.huiju.estateagents.property.dao.*;
15
 import com.huiju.estateagents.property.model.*;
17
 import com.huiju.estateagents.property.model.*;
40
     @Autowired
42
     @Autowired
41
     private  TpTicketMapper tpTicketMapper;
43
     private  TpTicketMapper tpTicketMapper;
42
 
44
 
43
-//    @Autowired
44
-//    private UserMapper userMapper;
45
-
46
     @Autowired
45
     @Autowired
47
     private TaUserMapper taUserMapper;
46
     private TaUserMapper taUserMapper;
48
 
47
 
61
     @Autowired
60
     @Autowired
62
     private TaUserVerifyMapper taUserVerifyMapper;
61
     private TaUserVerifyMapper taUserVerifyMapper;
63
 
62
 
63
+    @Autowired
64
+    private TaPersonMapper taPersonMapper;
65
+
64
     @Override
66
     @Override
65
     public ResponseBean ticketLiset(String parameter,Integer orgId) {
67
     public ResponseBean ticketLiset(String parameter,Integer orgId) {
66
          ResponseBean response= new ResponseBean<>();
68
          ResponseBean response= new ResponseBean<>();
115
         TpTicketVO ticketVO= tpTicketMapper.ticketDetails(ticketId);
117
         TpTicketVO ticketVO= tpTicketMapper.ticketDetails(ticketId);
116
         // 从taUserVerify里面获取userID
118
         // 从taUserVerify里面获取userID
117
         TaUserVerify taUserVerify= taUserVerifyMapper.selectById(ticketVO.getCreateUser());
119
         TaUserVerify taUserVerify= taUserVerifyMapper.selectById(ticketVO.getCreateUser());
118
-//        TaUser taUser= taUserMapper.selectById(taUserVerify.getUserId());
120
+        TaPerson taPerson = taPersonMapper.selectById(ticketVO.getPersonId());
119
         /*发起人*/
121
         /*发起人*/
120
-//        ticketVO.setCreateUserNmae(taUser.getUserName());
122
+        ticketVO.setCreateUserNmae(taPerson.getName());
121
         /*发起人手机号码*/
123
         /*发起人手机号码*/
122
-//        ticketVO.setLoginName(taUser.getLoginName());
124
+        ticketVO.setLoginName(taPerson.getPhone());
123
         /*查询当前受理人*/
125
         /*查询当前受理人*/
124
-//        ticketVO.setTpUserNmae(userMapper.selectByIdUserName(ticketVO.getTpUserId()));
125
         TaUser taUser = taUserMapper.selectById(ticketVO.getTpUserId());
126
         TaUser taUser = taUserMapper.selectById(ticketVO.getTpUserId());
126
-        if (null != taUser) {
127
+        if (null != taUser){
127
             ticketVO.setTpUserNmae(taUser.getUserName());
128
             ticketVO.setTpUserNmae(taUser.getUserName());
128
         }
129
         }
130
+
129
         /*所有物业端本小区的人员*/
131
         /*所有物业端本小区的人员*/
130
 //        ticketVO.setTpUsersList(userMapper.getUser( userID,orgId));
132
 //        ticketVO.setTpUsersList(userMapper.getUser( userID,orgId));
131
         /*本人*/
133
         /*本人*/
177
         return response;
179
         return response;
178
     }
180
     }
179
 
181
 
180
-    @Override
181
     public ResponseBean addRecordComment(String parameter, Integer id,Integer orgId,String userName) {
182
     public ResponseBean addRecordComment(String parameter, Integer id,Integer orgId,String userName) {
182
         ResponseBean response=new ResponseBean();
183
         ResponseBean response=new ResponseBean();
183
         JSONObject object= JSONObject.parseObject(parameter);
184
         JSONObject object= JSONObject.parseObject(parameter);
194
         tpTicketRecordComment.setContent(content);
195
         tpTicketRecordComment.setContent(content);
195
         tpTicketRecordComment.setTicketId(ticketId);
196
         tpTicketRecordComment.setTicketId(ticketId);
196
         tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
197
         tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
197
-        tpTicketRecordComment.setUuid(id);
198
+        tpTicketRecordComment.setUuid(id.toString());
198
         tpTicketRecordComment.setUserType("0");
199
         tpTicketRecordComment.setUserType("0");
199
         tpTicketRecordComment.setUserName(userName);
200
         tpTicketRecordComment.setUserName(userName);
200
         tpTicketRecordComment.setCreateDate(LocalDateTime.now());
201
         tpTicketRecordComment.setCreateDate(LocalDateTime.now());
210
                 tdImages.setType("reply");
211
                 tdImages.setType("reply");
211
                 tdImages.setUuid(tpTicketRecordComment.getId());
212
                 tdImages.setUuid(tpTicketRecordComment.getId());
212
                 tdImages.setCreateTime(LocalDateTime.now());
213
                 tdImages.setCreateTime(LocalDateTime.now());
213
-                tdImages.setCreateUser(id);
214
+                tdImages.setCreateUser(id.toString());
214
                 tdImagesMapper.insert(tdImages);
215
                 tdImagesMapper.insert(tdImages);
215
             }
216
             }
216
         }
217
         }
260
 //        tpTicketRecord.setContent("您的联系单已经分配给物业处理人员" + userName.getUserName()+",联系方式:" + userName.getLoginName());
261
 //        tpTicketRecord.setContent("您的联系单已经分配给物业处理人员" + userName.getUserName()+",联系方式:" + userName.getLoginName());
261
         tpTicketRecord.setContent("您的联系单已经分配给物业处理人员" + taUser.getUserName()+",联系方式:" + taUser.getPhone());
262
         tpTicketRecord.setContent("您的联系单已经分配给物业处理人员" + taUser.getUserName()+",联系方式:" + taUser.getPhone());
262
         tpTicketRecord.setStatus("3");
263
         tpTicketRecord.setStatus("3");
263
-        tpTicketRecord.setCreateUser(user);
264
+        tpTicketRecord.setCreateUser(user.toString());
264
         tpTicketRecord.setCreateDate(LocalDateTime.now());
265
         tpTicketRecord.setCreateDate(LocalDateTime.now());
265
         tpTicketRecordMapper.insert(tpTicketRecord);
266
         tpTicketRecordMapper.insert(tpTicketRecord);
266
 
267
 
274
         message.setMessageType(ticket.getType());
275
         message.setMessageType(ticket.getType());
275
         message.setTicketId(ticket.getId());
276
         message.setTicketId(ticket.getId());
276
         message.setAdviceType("4");
277
         message.setAdviceType("4");
277
-        message.setUuid(userID);
278
+        message.setUuid(userID.toString());
278
         message.setModelType("2");
279
         message.setModelType("2");
279
         message.setUuidType("2");
280
         message.setUuidType("2");
280
         message.setSource("2");
281
         message.setSource("2");
281
         message.setMessageContent("工单“" + ticket.getTicketTitle() + "”已被分配给您,点击查看并处理");
282
         message.setMessageContent("工单“" + ticket.getTicketTitle() + "”已被分配给您,点击查看并处理");
282
         message.setStatus("1");
283
         message.setStatus("1");
283
         message.setReadStatus("0");
284
         message.setReadStatus("0");
284
-        message.setCreateUser(user);
285
+        message.setCreateUser(user.toString());
285
         message.setCreateDate(LocalDateTime.now());
286
         message.setCreateDate(LocalDateTime.now());
286
         message.setTicketId(ticketId);
287
         message.setTicketId(ticketId);
287
         messageMapper.insert(message);
288
         messageMapper.insert(message);
310
         TpTicket tpTicket= new TpTicket();
311
         TpTicket tpTicket= new TpTicket();
311
         tpTicket.setId(ticketId);
312
         tpTicket.setId(ticketId);
312
         tpTicket.setStatus("1");
313
         tpTicket.setStatus("1");
313
-        tpTicket.setUpdateUser(id);
314
+        tpTicket.setUpdateUser(id.toString());
314
         tpTicket.setUpdateDate(LocalDateTime.now());
315
         tpTicket.setUpdateDate(LocalDateTime.now());
315
         tpTicketMapper.updateById(tpTicket);
316
         tpTicketMapper.updateById(tpTicket);
316
         /*查询当前处理人的名字*/
317
         /*查询当前处理人的名字*/
320
         tpTicketRecord.setContent("您的报修被物业人员"+userName+"拒绝接受理,原因:"+textContent+",有问题可以联系"+userName+":联系方式:"+LoginName);
321
         tpTicketRecord.setContent("您的报修被物业人员"+userName+"拒绝接受理,原因:"+textContent+",有问题可以联系"+userName+":联系方式:"+LoginName);
321
         tpTicketRecord.setOrgId(orgId);
322
         tpTicketRecord.setOrgId(orgId);
322
         tpTicketRecord.setStatus("1");
323
         tpTicketRecord.setStatus("1");
323
-        tpTicketRecord.setCreateUser(id);
324
+        tpTicketRecord.setCreateUser(id.toString());
324
         tpTicketRecord.setCreateDate(LocalDateTime.now());
325
         tpTicketRecord.setCreateDate(LocalDateTime.now());
325
         tpTicketRecordMapper.insert(tpTicketRecord);
326
         tpTicketRecordMapper.insert(tpTicketRecord);
326
         /*把内容添加到对话中*/
327
         /*把内容添加到对话中*/
328
         ticketRecordComment.setOrgId(orgId);
329
         ticketRecordComment.setOrgId(orgId);
329
         ticketRecordComment.setTicketId(ticketId);
330
         ticketRecordComment.setTicketId(ticketId);
330
         ticketRecordComment.setTicketRecordId(tpTicketRecord.getId());
331
         ticketRecordComment.setTicketRecordId(tpTicketRecord.getId());
331
-        ticketRecordComment.setUuid(id);
332
+        ticketRecordComment.setUuid(id.toString());
332
         ticketRecordComment.setUserType("0");
333
         ticketRecordComment.setUserType("0");
333
         ticketRecordComment.setContent("拒绝受理,原因——"+textContent);
334
         ticketRecordComment.setContent("拒绝受理,原因——"+textContent);
334
         ticketRecordComment.setUserName(userName);
335
         ticketRecordComment.setUserName(userName);
358
         message.setMessageContent("您的工单“" + ticket.getTicketTitle() + "”已被拒绝受理");
359
         message.setMessageContent("您的工单“" + ticket.getTicketTitle() + "”已被拒绝受理");
359
         message.setStatus("1");
360
         message.setStatus("1");
360
         message.setReadStatus("0");
361
         message.setReadStatus("0");
361
-        message.setCreateUser(id);
362
+        message.setCreateUser(id.toString());
362
         message.setCreateDate(LocalDateTime.now());
363
         message.setCreateDate(LocalDateTime.now());
363
         message.setTicketId(ticketId);
364
         message.setTicketId(ticketId);
364
         messageMapper.insert(message);
365
         messageMapper.insert(message);
386
 //        TaUser taUser = taUserMapper.selectById(tpTicketUserID.getTaUserId());
387
 //        TaUser taUser = taUserMapper.selectById(tpTicketUserID.getTaUserId());
387
         tpTicketRecord.setContent("物业工作人员"+userName+"已经处理结束,如果没有问题请给好评,联系方式:"+longName);
388
         tpTicketRecord.setContent("物业工作人员"+userName+"已经处理结束,如果没有问题请给好评,联系方式:"+longName);
388
         tpTicketRecord.setStatus("4");
389
         tpTicketRecord.setStatus("4");
389
-        tpTicketRecord.setCreateUser(id);
390
+        tpTicketRecord.setCreateUser(id.toString());
390
         tpTicketRecord.setCreateDate(LocalDateTime.now());
391
         tpTicketRecord.setCreateDate(LocalDateTime.now());
391
         tpTicketRecordMapper.insert(tpTicketRecord);
392
         tpTicketRecordMapper.insert(tpTicketRecord);
392
         /*维护对话*/
393
         /*维护对话*/
394
         tpTicketRecordComment.setOrgId(orgId);
395
         tpTicketRecordComment.setOrgId(orgId);
395
         tpTicketRecordComment.setTicketId(ticketId);
396
         tpTicketRecordComment.setTicketId(ticketId);
396
         tpTicketRecordComment.setTicketRecordId(tpTicketRecord.getId());
397
         tpTicketRecordComment.setTicketRecordId(tpTicketRecord.getId());
397
-        tpTicketRecordComment.setUuid(id);
398
+        tpTicketRecordComment.setUuid(id.toString());
398
         tpTicketRecordComment.setUserType("0");
399
         tpTicketRecordComment.setUserType("0");
399
         tpTicketRecordComment.setContent("处理结果如下____"+content);
400
         tpTicketRecordComment.setContent("处理结果如下____"+content);
400
         tpTicketRecordComment.setUserName(userName);
401
         tpTicketRecordComment.setUserName(userName);
411
                 tdImages.setType(Constant.REPLY);
412
                 tdImages.setType(Constant.REPLY);
412
                 tdImages.setUuid(tpTicketRecordComment.getId());
413
                 tdImages.setUuid(tpTicketRecordComment.getId());
413
                 tdImages.setCreateTime(LocalDateTime.now());
414
                 tdImages.setCreateTime(LocalDateTime.now());
414
-                tdImages.setCreateUser(id);
415
+                tdImages.setCreateUser(id.toString());
415
                 tdImagesMapper.insert(tdImages);
416
                 tdImagesMapper.insert(tdImages);
416
             }
417
             }
417
         }
418
         }
428
         message.setMessageType(ticket.getType());
429
         message.setMessageType(ticket.getType());
429
         message.setTicketId(ticket.getId());
430
         message.setTicketId(ticket.getId());
430
         message.setAdviceType("1");
431
         message.setAdviceType("1");
431
-        message.setUuid(ticket.getCreateUser());
432
+        message.setUuid(ticket.getPersonId());
432
         message.setModelType("1");
433
         message.setModelType("1");
433
         message.setUuidType("1");
434
         message.setUuidType("1");
434
         message.setSource("2");
435
         message.setSource("2");
435
         message.setMessageContent("您的工单“" + ticket.getTicketTitle() + "”已处理完成,请查看详情");
436
         message.setMessageContent("您的工单“" + ticket.getTicketTitle() + "”已处理完成,请查看详情");
436
         message.setStatus("1");
437
         message.setStatus("1");
437
         message.setReadStatus("0");
438
         message.setReadStatus("0");
438
-        message.setCreateUser(id);
439
+        message.setCreateUser(id.toString());
439
         message.setCreateDate(LocalDateTime.now());
440
         message.setCreateDate(LocalDateTime.now());
440
         message.setTicketId(ticketId);
441
         message.setTicketId(ticketId);
441
         messageMapper.insert(message);
442
         messageMapper.insert(message);
453
 
454
 
454
         Map<String, Object> parameter = Maps.newHashMap();
455
         Map<String, Object> parameter = Maps.newHashMap();
455
         parameter.put("orgId", tpTicket.getOrgId());
456
         parameter.put("orgId", tpTicket.getOrgId());
456
-        parameter.put("taUserId", tpTicket.getTaUserId());
457
+        parameter.put("personId", tpTicket.getPersonId());
457
 
458
 
458
         //  1:投诉   2:报修 3:联系物业
459
         //  1:投诉   2:报修 3:联系物业
459
         parameter.put("type", 2);
460
         parameter.put("type", 2);
567
 
568
 
568
         Map<String, Object> parameter = Maps.newHashMap();
569
         Map<String, Object> parameter = Maps.newHashMap();
569
         parameter.put("orgId", tpTicket.getOrgId());
570
         parameter.put("orgId", tpTicket.getOrgId());
570
-        parameter.put("taUserId", tpTicket.getTaUserId());
571
+        parameter.put("taUserId", tpTicket.getPersonId());
571
 
572
 
572
         //  1:投诉   2:报修 3:联系物业
573
         //  1:投诉   2:报修 3:联系物业
573
         parameter.put("type", tpTicket.getType());
574
         parameter.put("type", tpTicket.getType());
649
 
650
 
650
     @Override
651
     @Override
651
     @Transactional(rollbackFor = Exception.class)
652
     @Transactional(rollbackFor = Exception.class)
652
-    public ResponseBean addAiTicketService(TaUser userElement, String parameter) throws IOException {
653
+    public ResponseBean addAiTicketService(String personId, String parameter) throws IOException {
653
         ResponseBean response = new ResponseBean();
654
         ResponseBean response = new ResponseBean();
654
         JSONObject jsonObject = JSONObject.parseObject(parameter);
655
         JSONObject jsonObject = JSONObject.parseObject(parameter);
655
         String imageUrl = (String) jsonObject.get("imageUrl");
656
         String imageUrl = (String) jsonObject.get("imageUrl");
662
          * 依次插入相关数据, 该工单默认的第一条数据(待分配), 是工单标题,
663
          * 依次插入相关数据, 该工单默认的第一条数据(待分配), 是工单标题,
663
          */
664
          */
664
 
665
 
665
-        tpTicket.setOrgId(userElement.getOrgId());
666
+        tpTicket.setOrgId(1);
666
         // 2.1以后为ta_user_verify为中心不再是已用户ta_user为中心
667
         // 2.1以后为ta_user_verify为中心不再是已用户ta_user为中心
667
-        tpTicket.setTaUserId(userElement.getUserId());
668
+        tpTicket.setPersonId(personId);
668
         // 默认待分配
669
         // 默认待分配
669
         tpTicket.setStatus("0");
670
         tpTicket.setStatus("0");
670
         // 2.1以后为ta_user_verify为中心不再是已用户ta_user为中心
671
         // 2.1以后为ta_user_verify为中心不再是已用户ta_user为中心
671
-        tpTicket.setCreateUser(userElement.getUserId());
672
+        tpTicket.setCreateUser(personId);
672
         tpTicket.setCreateDate(LocalDateTime.now());
673
         tpTicket.setCreateDate(LocalDateTime.now());
673
-        tpTicket.setUpdateUser(userElement.getUserId());
674
+        tpTicket.setUpdateUser(personId);
674
         //tpTicket.setUpdateDate(new Date());
675
         //tpTicket.setUpdateDate(new Date());
675
         //校验此工单是否已存在
676
         //校验此工单是否已存在
676
-        TpTicket tpTicketName= tpTicketMapper.selectTpTicketName(userElement.getOrgId(),tpTicket.getType(),tpTicket.getTicketTitle());
677
+        TpTicket tpTicketName= tpTicketMapper.selectTpTicketName(1,tpTicket.getType(),tpTicket.getTicketTitle());
677
         if (null != tpTicketName){
678
         if (null != tpTicketName){
678
             response.addError("工单已存在");
679
             response.addError("工单已存在");
679
             return  response;
680
             return  response;
680
         }
681
         }
681
         // 插入工单
682
         // 插入工单
682
         tpTicketMapper.insert(tpTicket);
683
         tpTicketMapper.insert(tpTicket);
683
-        insertTdImage(tpTicket, imageUrl, userElement.getUserId());
684
+        insertTdImage(tpTicket, imageUrl, personId);
684
 
685
 
685
         Integer id = tpTicket.getId();
686
         Integer id = tpTicket.getId();
686
         TpTicketRecord tpTicketRecord = new TpTicketRecord();
687
         TpTicketRecord tpTicketRecord = new TpTicketRecord();
687
         //获取当前插入的信息,维护工单记录表
688
         //获取当前插入的信息,维护工单记录表
688
         TpTicket tpTicketReco = tpTicketMapper.selectById(id);
689
         TpTicket tpTicketReco = tpTicketMapper.selectById(id);
689
-        tpTicketRecord.setOrgId(userElement.getOrgId());
690
+        tpTicketRecord.setOrgId(1);
690
         tpTicketRecord.setTicketId(tpTicketReco.getId());
691
         tpTicketRecord.setTicketId(tpTicketReco.getId());
691
         // 1:投诉   2:报修 3:联系物业
692
         // 1:投诉   2:报修 3:联系物业
692
         String typeName = "2".equals(tpTicket.getType()) ? "报修" : "1".equals(tpTicket.getType()) ? "投诉" : "3".equals(tpTicket.getType()) ? "联系工单" : "未知类型";
693
         String typeName = "2".equals(tpTicket.getType()) ? "报修" : "1".equals(tpTicket.getType()) ? "投诉" : "3".equals(tpTicket.getType()) ? "联系工单" : "未知类型";
693
         tpTicketRecord.setContent("您的" + typeName + "正在分配物业处理人员, 若长时间无人处理, 请联系物业! 联系物业号码簿 >");
694
         tpTicketRecord.setContent("您的" + typeName + "正在分配物业处理人员, 若长时间无人处理, 请联系物业! 联系物业号码簿 >");
694
         tpTicketRecord.setStatus(tpTicketReco.getStatus());
695
         tpTicketRecord.setStatus(tpTicketReco.getStatus());
695
-        tpTicketRecord.setCreateUser(userElement.getUserId());
696
+        tpTicketRecord.setCreateUser(personId);
696
         tpTicketRecord.setCreateDate(LocalDateTime.now());
697
         tpTicketRecord.setCreateDate(LocalDateTime.now());
697
         // 插入工单处理表
698
         // 插入工单处理表
698
         tpTicketRecordMapper.insert(tpTicketRecord);
699
         tpTicketRecordMapper.insert(tpTicketRecord);
719
      *
720
      *
720
      * @param tpTicket
721
      * @param tpTicket
721
      * @param imageUrl
722
      * @param imageUrl
722
-     * @param userId
723
+     * @param pesonId
723
      * @throws IOException
724
      * @throws IOException
724
      */
725
      */
725
-    private void insertTdImage(TpTicket tpTicket, String imageUrl, Integer userId) {
726
+    private void insertTdImage(TpTicket tpTicket, String imageUrl, String pesonId) {
726
         if (null == imageUrl || "".equals(imageUrl)) {
727
         if (null == imageUrl || "".equals(imageUrl)) {
727
             return;
728
             return;
728
         }
729
         }
733
             tdImages.setImageUrl(img);
734
             tdImages.setImageUrl(img);
734
             tdImages.setType(Constant.SERVICE);
735
             tdImages.setType(Constant.SERVICE);
735
             tdImages.setUuid(uuId);
736
             tdImages.setUuid(uuId);
736
-            tdImages.setCreateUser(userId);
737
+            tdImages.setCreateUser(pesonId);
737
             tdImages.setCreateTime(LocalDateTime.now());
738
             tdImages.setCreateTime(LocalDateTime.now());
738
             tdImagesMapper.insert(tdImages);
739
             tdImagesMapper.insert(tdImages);
739
         }
740
         }
748
      * @return
749
      * @return
749
      */
750
      */
750
     @Override
751
     @Override
751
-    public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment, Integer userId) {
752
+    public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment, String personId) {
752
         //查询用户名
753
         //查询用户名
753
 //        User taUser = userMapper.selectById(userId);
754
 //        User taUser = userMapper.selectById(userId);
754
-        TaUser taUser = taUserMapper.selectById(userId);
755
+        TaPerson  taPerson = taPersonMapper.selectById(personId);
755
 
756
 
756
         TpTicket  tpTicket= tpTicketMapper.selectById(tpTicketRecordComment.getTicketId());
757
         TpTicket  tpTicket= tpTicketMapper.selectById(tpTicketRecordComment.getTicketId());
757
         TpTicketRecord ticketRecord= tpTicketRecordMapper.selectTpTicketRecord(tpTicketRecordComment.getTicketId(), Integer.valueOf(tpTicket.getStatus()));
758
         TpTicketRecord ticketRecord= tpTicketRecordMapper.selectTpTicketRecord(tpTicketRecordComment.getTicketId(), Integer.valueOf(tpTicket.getStatus()));
758
 
759
 
759
-        tpTicketRecordComment.setUserName(taUser.getUserName());
760
+        tpTicketRecordComment.setUserName(taPerson.getName());
760
         tpTicketRecordComment.setParentId(tpTicketRecordComment.getId());
761
         tpTicketRecordComment.setParentId(tpTicketRecordComment.getId());
761
-        tpTicketRecordComment.setUuid(userId);
762
+        tpTicketRecordComment.setUuid(personId);
762
         tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
763
         tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
763
         tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
764
         tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
764
         tpTicketRecordComment.setCreateDate(LocalDateTime.now());
765
         tpTicketRecordComment.setCreateDate(LocalDateTime.now());
769
 
770
 
770
     @Override
771
     @Override
771
     @Transactional(rollbackFor = Exception.class)
772
     @Transactional(rollbackFor = Exception.class)
772
-    public ResponseBean updateTicketContent(Integer ticketId, String parameter, TaUser userElement) {
773
+    public ResponseBean updateTicketContent(Integer ticketId, String parameter, String personId) {
773
         ResponseBean responseBean = new ResponseBean();
774
         ResponseBean responseBean = new ResponseBean();
774
 
775
 
775
         JSONObject jsonObject = JSONObject.parseObject(parameter);
776
         JSONObject jsonObject = JSONObject.parseObject(parameter);
785
         map.put("type", "service");
786
         map.put("type", "service");
786
         tdImagesMapper.deleteByUuidAndType(map);
787
         tdImagesMapper.deleteByUuidAndType(map);
787
 
788
 
788
-        insertTdImage(tpTicket, imageUrl, userElement.getUserId());
789
+        insertTdImage(tpTicket, imageUrl, personId);
789
 
790
 
790
         TpTicket ticket = tpTicketMapper.selectById(ticketId);
791
         TpTicket ticket = tpTicketMapper.selectById(ticketId);
791
         ticket.setTicketTitle(tpTicket.getTicketTitle());
792
         ticket.setTicketTitle(tpTicket.getTicketTitle());
820
 
821
 
821
     @Transactional(rollbackFor = Exception.class)
822
     @Transactional(rollbackFor = Exception.class)
822
     @Override
823
     @Override
823
-    public ResponseBean stopTpTicketRecord(Integer orgId, Integer ticketId, TaUser userElement) {
824
+    public ResponseBean stopTpTicketRecord(Integer orgId, Integer ticketId, String personId) {
824
         ResponseBean responseBean = new ResponseBean();
825
         ResponseBean responseBean = new ResponseBean();
825
         try {
826
         try {
826
             TpTicket tpTicket = new TpTicket();
827
             TpTicket tpTicket = new TpTicket();
836
             tpTicketRecord.setOrgId(orgId);
837
             tpTicketRecord.setOrgId(orgId);
837
 
838
 
838
             tpTicketRecord.setContent("您的联系单已被您自己终止,如果仍有问题,可以在服务页新增一个报修/投诉/联系单");
839
             tpTicketRecord.setContent("您的联系单已被您自己终止,如果仍有问题,可以在服务页新增一个报修/投诉/联系单");
839
-            tpTicketRecord.setCreateUser(userElement.getUserId());
840
+            tpTicketRecord.setCreateUser(personId);
840
             tpTicketRecord.setCreateDate(LocalDateTime.now());
841
             tpTicketRecord.setCreateDate(LocalDateTime.now());
841
             tpTicketRecordMapper.insert(tpTicketRecord);
842
             tpTicketRecordMapper.insert(tpTicketRecord);
842
             // 终止后维护tp_ticket_record_comment对话
843
             // 终止后维护tp_ticket_record_comment对话
843
-            Integer createUser= tpTicketMapper.selectById(ticketId).getCreateUser();
844
-            TaUserVerify taUserVerify= taUserVerifyMapper.selectById(createUser);
844
+            String createUser= tpTicketMapper.selectById(ticketId).getCreateUser();
845
+//            TaUserVerify taUserVerify= taUserVerifyMapper.selectById(createUser);
845
 
846
 
846
 //            User taUser= userMapper.selectById(taUserVerify.getPersonId());
847
 //            User taUser= userMapper.selectById(taUserVerify.getPersonId());
847
-            TaUser taUser = taUserMapper.selectById(taUserVerify.getPersonId());
848
+            TaUser taUser = taUserMapper.selectById(createUser);
848
             TpTicketRecordComment tpTicketRecordComment = new TpTicketRecordComment();
849
             TpTicketRecordComment tpTicketRecordComment = new TpTicketRecordComment();
849
             tpTicketRecordComment.setOrgId(orgId);
850
             tpTicketRecordComment.setOrgId(orgId);
850
             tpTicketRecordComment.setTicketId(ticketId);
851
             tpTicketRecordComment.setTicketId(ticketId);
851
             tpTicketRecordComment.setTicketRecordId(tpTicketRecord.getId());
852
             tpTicketRecordComment.setTicketRecordId(tpTicketRecord.getId());
852
-            tpTicketRecordComment.setUuid(userElement.getUserId());
853
-            tpTicketRecordComment.setUuid(taUserVerify.getId());
853
+            tpTicketRecordComment.setUuid(personId);
854
             tpTicketRecordComment.setUserName(taUser.getUserName());
854
             tpTicketRecordComment.setUserName(taUser.getUserName());
855
             tpTicketRecordComment.setContent("业主终止工单,原因——无");
855
             tpTicketRecordComment.setContent("业主终止工单,原因——无");
856
             tpTicketRecordComment.setCreateDate(LocalDateTime.now());
856
             tpTicketRecordComment.setCreateDate(LocalDateTime.now());
894
         tpMessage.setAdviceType("1");
894
         tpMessage.setAdviceType("1");
895
         // 模板类型为 消息模板
895
         // 模板类型为 消息模板
896
         tpMessage.setModelType("1");
896
         tpMessage.setModelType("1");
897
-        tpMessage.setUuid(userId);
897
+        tpMessage.setUuid(userId.toString());
898
         // 接收人类型: APP用户
898
         // 接收人类型: APP用户
899
         tpMessage.setUuidType("1");
899
         tpMessage.setUuidType("1");
900
         // 来源: APP 端用户
900
         // 来源: APP 端用户
904
         tpMessage.setStatus("1");
904
         tpMessage.setStatus("1");
905
         // 阅读状态: 0未阅读
905
         // 阅读状态: 0未阅读
906
         tpMessage.setReadStatus("0");
906
         tpMessage.setReadStatus("0");
907
-        tpMessage.setCreateUser(userId);
907
+        tpMessage.setCreateUser(userId.toString());
908
         tpMessage.setCreateDate(LocalDateTime.now());
908
         tpMessage.setCreateDate(LocalDateTime.now());
909
         tpMessage.setUpdateUser(userId);
909
         tpMessage.setUpdateUser(userId);
910
         tpMessage.setUpdateDate(LocalDateTime.now());
910
         tpMessage.setUpdateDate(LocalDateTime.now());
915
 
915
 
916
     }
916
     }
917
     @Override
917
     @Override
918
-    public ResponseBean addWxRecordComment(String parameter, Integer verifyId,Integer orgId,String userName) {
918
+    public ResponseBean addWxRecordComment(String parameter, String verifyId,Integer orgId,String userName) {
919
         ResponseBean response=new ResponseBean();
919
         ResponseBean response=new ResponseBean();
920
         JSONObject object= JSONObject.parseObject(parameter);
920
         JSONObject object= JSONObject.parseObject(parameter);
921
 
921
 

+ 3
- 3
src/main/java/com/huiju/estateagents/property/service/impl/TransactionServiceImpl.java 查看文件

191
 			tdImages.setType("transaction");
191
 			tdImages.setType("transaction");
192
 			tdImages.setUuid(tpTransaction.getId());
192
 			tdImages.setUuid(tpTransaction.getId());
193
 			tdImages.setCreateTime(LocalDateTime.now());
193
 			tdImages.setCreateTime(LocalDateTime.now());
194
-			tdImages.setCreateUser(id);
194
+			tdImages.setCreateUser(id.toString());
195
 			tdImagesMapper.insert(tdImages);
195
 			tdImagesMapper.insert(tdImages);
196
 		}
196
 		}
197
 		return response;
197
 		return response;
232
 			tdImages.setType("transaction");
232
 			tdImages.setType("transaction");
233
 			tdImages.setUuid(tpTransaction.getId());
233
 			tdImages.setUuid(tpTransaction.getId());
234
 			tdImages.setCreateTime(LocalDateTime.now());
234
 			tdImages.setCreateTime(LocalDateTime.now());
235
-			tdImages.setCreateUser(id);
235
+			tdImages.setCreateUser(id.toString());
236
 			tdImagesMapper.insert(tdImages);
236
 			tdImagesMapper.insert(tdImages);
237
 		}
237
 		}
238
 		return response;
238
 		return response;
389
 			tdImages.setType("reply");
389
 			tdImages.setType("reply");
390
 			tdImages.setUuid(transactionReply.getId());
390
 			tdImages.setUuid(transactionReply.getId());
391
 			tdImages.setCreateTime(LocalDateTime.now());
391
 			tdImages.setCreateTime(LocalDateTime.now());
392
-			tdImages.setCreateUser(userElement.getUserId());
392
+			tdImages.setCreateUser(userElement.getUserId().toString());
393
 			tdImagesMapper.insert(tdImages);
393
 			tdImagesMapper.insert(tdImages);
394
 		}
394
 		}
395
 		response.addSuccess("成功");
395
 		response.addSuccess("成功");

+ 6
- 6
src/main/resources/mapper/property/TpTicketMapper.xml 查看文件

5
     SELECT
5
     SELECT
6
     p.id,
6
     p.id,
7
     p.org_id,
7
     p.org_id,
8
-    p.ta_user_id,
8
+    p.person_id,
9
     p.ticket_title,
9
     p.ticket_title,
10
     p.ticket_content,
10
     p.ticket_content,
11
     p.STATUS,
11
     p.STATUS,
18
     p.create_date,
18
     p.create_date,
19
     p.update_user,
19
     p.update_user,
20
     p.update_date,
20
     p.update_date,
21
-    us.user_name
21
+        us.name as user_name
22
     FROM
22
     FROM
23
     tp_ticket p
23
     tp_ticket p
24
-    LEFT JOIN ta_user AS us ON p.create_user=us.user_id
24
+    LEFT JOIN ta_person AS us ON p.create_user=us.person_id
25
 <where>
25
 <where>
26
     <if test="ticket.id != null and ticket.id !=''">
26
     <if test="ticket.id != null and ticket.id !=''">
27
         and  p.id like concat('%',#{ticket.id,jdbcType=INTEGER},'%')
27
         and  p.id like concat('%',#{ticket.id,jdbcType=INTEGER},'%')
33
         and p.ticket_title like concat('%',#{ticket.ticketTitle,jdbcType=VARCHAR},'%')
33
         and p.ticket_title like concat('%',#{ticket.ticketTitle,jdbcType=VARCHAR},'%')
34
     </if>
34
     </if>
35
     <if test="userName != null and userName !=''">
35
     <if test="userName != null and userName !=''">
36
-        and AS.user_name like concat('%',#{ userName,jdbcType=VARCHAR},'%')
36
+        and us.name like concat('%',#{ userName,jdbcType=VARCHAR},'%')
37
     </if>
37
     </if>
38
     <if test="ticket.status != null and ticket.status !=''">
38
     <if test="ticket.status != null and ticket.status !=''">
39
         and  p.status=#{ticket.status,jdbcType=INTEGER}
39
         and  p.status=#{ticket.status,jdbcType=INTEGER}
40
     </if>
40
     </if>
41
     <if test="updateUserNmae != null and updateUserNmae !=''">
41
     <if test="updateUserNmae != null and updateUserNmae !=''">
42
-        and us.user_name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
42
+        and us.name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
43
     </if>
43
     </if>
44
     and p.org_id=#{orgId,jdbcType=INTEGER}
44
     and p.org_id=#{orgId,jdbcType=INTEGER}
45
 </where>
45
 </where>
50
         SELECT
50
         SELECT
51
         p.id,
51
         p.id,
52
         p.org_id,
52
         p.org_id,
53
-        p.ta_user_id,
53
+        p.person_id,
54
         p.ticket_title,
54
         p.ticket_title,
55
         p.ticket_content,
55
         p.ticket_content,
56
         p.STATUS,
56
         p.STATUS,