瀏覽代碼

合并本地分支

weiximei 6 年之前
父節點
當前提交
4210a8b156
共有 15 個檔案被更改,包括 192 行新增160 行删除
  1. 0
    8
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java
  2. 66
    58
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java
  3. 38
    22
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  4. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java
  5. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java
  6. 2
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java
  7. 1
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java
  8. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java
  9. 2
    4
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java
  10. 5
    12
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java
  11. 2
    2
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java
  12. 58
    47
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  13. 1
    1
      CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml
  14. 1
    1
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml
  15. 12
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml

+ 0
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java 查看文件

42
         return responseBean;
42
         return responseBean;
43
     }
43
     }
44
 
44
 
45
-    @ApiOperation(value = "物业,门卫,领导电话", notes = "物业,门卫,领导电话")
46
-    @RequestMapping(value = "/allTpAnnouncementTel",method = RequestMethod.GET)
47
-    public ResponseBean getTpAnnouncementTel(){
48
-        ResponseBean responseBean = new ResponseBean();
49
-        ResponseBean agreement = agreementService.getTpAnnouncementTel();
50
-        responseBean.addSuccess(agreement);
51
-        return responseBean;
52
-    }
53
 
45
 
54
 }
46
 }

+ 66
- 58
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java 查看文件

35
 
35
 
36
     @RequestMapping(value = "/announcement/{communityId}", method = RequestMethod.GET)
36
     @RequestMapping(value = "/announcement/{communityId}", method = RequestMethod.GET)
37
     @ApiOperation(value = "论坛公告帖子详情", notes = "获取论坛公告帖子详情")
37
     @ApiOperation(value = "论坛公告帖子详情", notes = "获取论坛公告帖子详情")
38
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
38
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
39
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "id", value = "公告帖子id")})
39
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "id", value = "公告帖子id")})
40
-    public ResponseBean findAnnouncementDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("id") Integer id, HttpSession session){
40
+    public ResponseBean findAnnouncementDetail(@PathVariable(value = "communityId") Integer communityId, @RequestParam("id") Integer id, HttpSession session) {
41
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
41
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
42
         Integer userId = userElement.getId();
42
         Integer userId = userElement.getId();
43
         ResponseBean responseBean = new ResponseBean();
43
         ResponseBean responseBean = new ResponseBean();
48
 
48
 
49
     @RequestMapping(value = "/sign/{communityId}", method = RequestMethod.GET)
49
     @RequestMapping(value = "/sign/{communityId}", method = RequestMethod.GET)
50
     @ApiOperation(value = "活动报名接口", notes = "活动报名接口")
50
     @ApiOperation(value = "活动报名接口", notes = "活动报名接口")
51
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
52
-                         @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
53
-    public ResponseBean SignActivity(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId")Integer activityId, HttpSession session){
51
+
52
+
53
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
54
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动Id")})
55
+    public ResponseBean SignActivity(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
54
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
56
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
55
         Integer userId = userElement.getId();
57
         Integer userId = userElement.getId();
56
         ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId, userId);
58
         ResponseBean responseBean = socialServiceI.findTaUserInfo(activityId, communityId, userId);
57
         return responseBean;
59
         return responseBean;
58
     }
60
     }
59
-    
61
+
60
     @ApiOperation(value = "按小区获取分页公告列表", notes = "按小区获取分页公告列表,公告标题模糊查询")
62
     @ApiOperation(value = "按小区获取分页公告列表", notes = "按小区获取分页公告列表,公告标题模糊查询")
61
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
63
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
62
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "公告标题"),
64
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "公告标题"),
63
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
65
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
64
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
66
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
65
-    @RequestMapping(value = "/announcements/{communityId}",method = RequestMethod.GET)
66
-    public ResponseBean getAnnouncements(@PathVariable Integer communityId,@RequestParam String title,
67
-                                         @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
68
-                                         @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
67
+    @RequestMapping(value = "/announcements/{communityId}", method = RequestMethod.GET)
68
+    public ResponseBean getAnnouncements(@PathVariable Integer communityId, @RequestParam String title,
69
+                                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
70
+                                         @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
69
         ResponseBean responseBean = new ResponseBean();
71
         ResponseBean responseBean = new ResponseBean();
70
-        List<TpAnnouncement> announcementList = socialServiceI.getAnnouncements(communityId,title,pageNum,pageSize);
72
+        List<TpAnnouncement> announcementList = socialServiceI.getAnnouncements(communityId, title, pageNum, pageSize);
71
         responseBean.addSuccess(announcementList);
73
         responseBean.addSuccess(announcementList);
72
         return responseBean;
74
         return responseBean;
73
     }
75
     }
74
 
76
 
75
     @ApiOperation(value = "获取公告轮播图", notes = "获取公告轮播图")
77
     @ApiOperation(value = "获取公告轮播图", notes = "获取公告轮播图")
76
     @ApiImplicitParams({
78
     @ApiImplicitParams({
77
-            @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区id")
79
+            @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区id")
78
     })
80
     })
79
-    @RequestMapping(value = "/announcement/Img/{communityId}",method = RequestMethod.GET)
80
-    public ResponseBean getAnnouncement(@PathVariable(value = "communityId")Integer communityId ){
81
+    @RequestMapping(value = "/announcement/Img/{communityId}", method = RequestMethod.GET)
82
+    public ResponseBean getAnnouncement(@PathVariable(value = "communityId") Integer communityId) {
81
         ResponseBean responseBean = new ResponseBean();
83
         ResponseBean responseBean = new ResponseBean();
82
         List<TpAnnouncement> agreement = socialServiceI.getAnnouncement(communityId);
84
         List<TpAnnouncement> agreement = socialServiceI.getAnnouncement(communityId);
83
         responseBean.addSuccess(agreement);
85
         responseBean.addSuccess(agreement);
84
         return responseBean;
86
         return responseBean;
85
     }
87
     }
86
 
88
 
87
-    
89
+
88
     @ApiOperation(value = "按小区获取分页活动列表", notes = "按小区获取分页活动列表,公告标题模糊查询")
90
     @ApiOperation(value = "按小区获取分页活动列表", notes = "按小区获取分页活动列表,公告标题模糊查询")
89
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
91
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区Id"),
90
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "活动标题"),
92
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "title", value = "活动标题"),
91
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
93
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
92
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
94
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
93
-    @RequestMapping(value = "/activitys/{communityId}",method = RequestMethod.GET)
94
-    public ResponseBean getActivitys(@PathVariable Integer communityId,@RequestParam String title,
95
-                                     @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
96
-                                     @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
95
+    @RequestMapping(value = "/activitys/{communityId}", method = RequestMethod.GET)
96
+    public ResponseBean getActivitys(@PathVariable Integer communityId, @RequestParam String title,
97
+                                     @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
98
+                                     @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
97
         ResponseBean responseBean = new ResponseBean();
99
         ResponseBean responseBean = new ResponseBean();
98
-        List<TpActivity> activityList = socialServiceI.getActivitys(communityId,title,pageNum,pageSize);
100
+        List<TpActivity> activityList = socialServiceI.getActivitys(communityId, title, pageNum, pageSize);
99
         responseBean.addSuccess(activityList);
101
         responseBean.addSuccess(activityList);
100
         return responseBean;
102
         return responseBean;
101
     }
103
     }
102
-    
104
+
103
     @ApiOperation(value = "论坛活动帖子详情", notes = "获取论坛活动帖子详情")
105
     @ApiOperation(value = "论坛活动帖子详情", notes = "获取论坛活动帖子详情")
104
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
106
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
105
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
107
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
106
-    @RequestMapping(value = "/activity/{communityId}", method = RequestMethod.GET)
107
-    public ResponseBean findActivityDetail(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session){
108
+    public ResponseBean findActivityDetail(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
108
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
109
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
109
         Integer userId = userElement.getId();
110
         Integer userId = userElement.getId();
110
         ResponseBean responseBean = new ResponseBean();
111
         ResponseBean responseBean = new ResponseBean();
114
     }
115
     }
115
 
116
 
116
     @ApiOperation(value = "二手租赁详情", notes = "二手租赁详情")
117
     @ApiOperation(value = "二手租赁详情", notes = "二手租赁详情")
117
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
118
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
118
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
119
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "activityId", value = "活动帖子id")})
119
     @RequestMapping(value = "/secondHand/{communityId}", method = RequestMethod.GET)
120
     @RequestMapping(value = "/secondHand/{communityId}", method = RequestMethod.GET)
120
-    public ResponseBean findUsedDetails(@PathVariable(value = "communityId")Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session){
121
+    public ResponseBean findUsedDetails(@PathVariable(value = "communityId") Integer communityId, @RequestParam("activityId") Integer activityId, HttpSession session) {
121
         ResponseBean responseBean = new ResponseBean();
122
         ResponseBean responseBean = new ResponseBean();
122
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
123
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
123
         Integer userId = userElement.getId();
124
         Integer userId = userElement.getId();
124
-        TpTransaction activity = socialServiceI.findUsedDetails(activityId, communityId,userId);
125
+        TpTransaction activity = socialServiceI.findUsedDetails(activityId, communityId, userId);
125
         responseBean.addSuccess(activity);
126
         responseBean.addSuccess(activity);
126
         return responseBean;
127
         return responseBean;
127
     }
128
     }
128
 
129
 
129
     @ApiOperation(value = "获取所有的二手租赁帖子", notes = "获取所有的二手租赁帖子")
130
     @ApiOperation(value = "获取所有的二手租赁帖子", notes = "获取所有的二手租赁帖子")
130
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
131
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
131
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型"),
132
             @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "帖子类型"),
132
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
133
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
133
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
134
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")})
134
     @RequestMapping(value = "/getAllTransaction/{communityId}", method = RequestMethod.GET)
135
     @RequestMapping(value = "/getAllTransaction/{communityId}", method = RequestMethod.GET)
135
-    public ResponseBean getAllPosts(@PathVariable("communityId")Integer communityId, @RequestParam("type") String type,
136
-                                    @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
137
-                                    @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
136
+    public ResponseBean getAllPosts(@PathVariable("communityId") Integer communityId, @RequestParam("type") String type,
137
+                                    @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
138
+                                    @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
138
         ResponseBean responseBean = new ResponseBean();
139
         ResponseBean responseBean = new ResponseBean();
139
         List<TpTransaction> tpTransactions = socialServiceI.findAllTransaction(communityId, type, pageNum, pageSize);
140
         List<TpTransaction> tpTransactions = socialServiceI.findAllTransaction(communityId, type, pageNum, pageSize);
140
         responseBean.addSuccess(tpTransactions);
141
         responseBean.addSuccess(tpTransactions);
142
     }
143
     }
143
 
144
 
144
     @ApiOperation(value = "报修进度终止", notes = "报修进度终止")
145
     @ApiOperation(value = "报修进度终止", notes = "报修进度终止")
145
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
146
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
146
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id")})
147
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "帖子Id")})
147
     @RequestMapping(value = "/stopTicket/{communityId}", method = RequestMethod.GET)
148
     @RequestMapping(value = "/stopTicket/{communityId}", method = RequestMethod.GET)
148
-    public ResponseBean stopTicket(@PathVariable("communityId")Integer communityId, @RequestParam("ticketId")Integer ticketId, HttpSession session){
149
+    public ResponseBean stopTicket(@PathVariable("communityId") Integer communityId, @RequestParam("ticketId") Integer ticketId, HttpSession session) {
149
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
150
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
150
         Integer userId = userElement.getId();
151
         Integer userId = userElement.getId();
151
         ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId, userId);
152
         ResponseBean responseBean = socialServiceI.stopTpTicketRecord(communityId, ticketId, userId);
153
     }
154
     }
154
 
155
 
155
     @ApiOperation(value = "修改报修内容", notes = "修改报修内容")
156
     @ApiOperation(value = "修改报修内容", notes = "修改报修内容")
156
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
157
-                         @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
158
-                         @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "工单类型")})
157
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "ticketId", value = "工单Id"),
158
+            @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType = "TpTicket"),
159
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "type", value = "工单类型")})
159
     @RequestMapping(value = "/updateTicket/{ticketId}", method = RequestMethod.POST)
160
     @RequestMapping(value = "/updateTicket/{ticketId}", method = RequestMethod.POST)
160
-    public ResponseBean updateTicketContent(@PathVariable("ticketId")Integer ticketId, @RequestBody TpTicket tpTicket, @RequestParam("type")String type){
161
+    public ResponseBean updateTicketContent(@PathVariable("ticketId") Integer ticketId, @RequestBody TpTicket tpTicket, @RequestParam("type") String type) {
161
         ResponseBean responseBean = new ResponseBean();
162
         ResponseBean responseBean = new ResponseBean();
162
         socialServiceI.updateTicketContent(ticketId, tpTicket, type);
163
         socialServiceI.updateTicketContent(ticketId, tpTicket, type);
163
         return responseBean;
164
         return responseBean;
165
 
166
 
166
     @ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
167
     @ApiOperation(value = "添加二手租赁帖子", notes = "添加二手租赁帖子")
167
     @ApiImplicitParams({
168
     @ApiImplicitParams({
168
-            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionTitle",value = "交易标题"),
169
-            @ApiImplicitParam(paramType = "query",dataType = "String",name = "transactionContent",value = "交易内容"),
170
-            @ApiImplicitParam(paramType = "query",dataType = "String",name = "type",value = "0:二手 1:求购  2:租赁"),
169
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionTitle", value = "交易标题"),
170
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionContent", value = "交易内容"),
171
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "type", value = "0:二手 1:求购  2:租赁"),
171
     })
172
     })
172
-    @RequestMapping(value = "/addAllTransaction",method = RequestMethod.POST)
173
-    public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session){
173
+    @RequestMapping(value = "/addTransaction", method = RequestMethod.POST)
174
+    @ResponseBody
175
+    public ResponseBean addTransaction(TpTransaction tpTransaction, HttpSession session) {
174
         ResponseBean responseBean = new ResponseBean();
176
         ResponseBean responseBean = new ResponseBean();
175
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
177
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
176
         Integer userId = userElement.getId();
178
         Integer userId = userElement.getId();
177
-        ResponseBean response=socialServiceI.addAllTransaction(userId,tpTransaction);
179
+        ResponseBean response = socialServiceI.addAllTransaction(userId, tpTransaction);
178
         return response;
180
         return response;
179
     }
181
     }
180
 
182
 
183
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
185
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageNum", value = "分页第几页"),
184
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
186
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "pageSize", value = "分页每页长度")
185
     })
187
     })
186
-    @RequestMapping(value = "/selectAllTransaction",method = RequestMethod.POST)
187
-    public ResponseBean selectAllTransaction( HttpSession session,
188
-                                              @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
189
-                                              @RequestParam(value ="pageSize",defaultValue = "5") Integer pageSize){
188
+    @RequestMapping(value = "/selectAllTransaction", method = RequestMethod.GET)
189
+    public ResponseBean selectAllTransaction(HttpSession session,
190
+                                             @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
191
+                                             @RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
190
         ResponseBean responseBean = new ResponseBean();
192
         ResponseBean responseBean = new ResponseBean();
191
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
193
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
192
-        Integer userId=userElement.getId();
193
-        ResponseBean response=socialServiceI.selectAllTransaction(userId,pageNum, pageSize);
194
+        Integer userId = userElement.getId();
195
+        ResponseBean response = socialServiceI.selectAllTransaction(userId, pageNum, pageSize);
194
         return response;
196
         return response;
195
     }
197
     }
196
 
198
 
197
     @ApiOperation(value = "修改二手租赁帖子", notes = "修改二手租赁帖子")
199
     @ApiOperation(value = "修改二手租赁帖子", notes = "修改二手租赁帖子")
198
     @ApiImplicitParams({
200
     @ApiImplicitParams({
199
-            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "二手租赁帖子Id")
201
+            @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "二手租赁帖子Id"),
202
+            @ApiImplicitParam(paramType = "query", dataType = "String", name = "transactionTitle", value = "小区标题"),
203
+            @ApiImplicitParam(paramType = "body", dataType = "String", name = "transactionContent", value = "交易内容"),
204
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "Type", value = "0 代表,1求购,2租赁"),
200
     })
205
     })
201
-    @RequestMapping(value = "/ubDateAllTransaction",method = RequestMethod.PUT)
202
-    public ResponseBean ubdateTransaction( HttpSession session, TpTransaction tpTransaction) {
206
+    @RequestMapping(value = "/upDateTransaction/{Id}", method = RequestMethod.PUT)
207
+    public ResponseBean ubdateTransaction(HttpSession session, @PathVariable(value = "Id") Integer Id,
208
+                                          @RequestParam(value = "transactionTitle") String transactionTitle,
209
+                                          @RequestParam(value = "transactionContent") String transactionContent,
210
+                                          @RequestParam(value = "Type") Integer Type) {
203
         ResponseBean responseBean = new ResponseBean();
211
         ResponseBean responseBean = new ResponseBean();
204
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
212
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
205
         Integer userId = userElement.getId();
213
         Integer userId = userElement.getId();
206
-        ResponseBean response = socialServiceI.updateTransaction(tpTransaction, userId);
214
+        ResponseBean response = socialServiceI.updateTransaction(Id, transactionTitle, transactionContent, userId, Type);
207
         return response;
215
         return response;
208
     }
216
     }
209
 
217
 
210
     @ApiOperation(value = "评价工单内容以及评分", notes = "评价工单内容以及评分")
218
     @ApiOperation(value = "评价工单内容以及评分", notes = "评价工单内容以及评分")
211
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
212
-            @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType ="TpTicket"),
219
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
220
+            @ApiImplicitParam(name = "tpTicket", value = "报修", required = true, dataType = "TpTicket"),
213
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "工单Id")})
221
             @ApiImplicitParam(paramType = "query", dataType = "integer", name = "ticketId", value = "工单Id")})
214
     @RequestMapping(value = "/accessTicket/{communityId}", method = RequestMethod.POST)
222
     @RequestMapping(value = "/accessTicket/{communityId}", method = RequestMethod.POST)
215
-    public ResponseBean accessTicket(@PathVariable("communityId")Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId")String ticketId, HttpSession session){
223
+    public ResponseBean accessTicket(@PathVariable("communityId") Integer communityId, @RequestBody TpTicket tpTicket, @RequestParam("ticketId") String ticketId, HttpSession session) {
216
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
224
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
217
         Integer userId = userElement.getId();
225
         Integer userId = userElement.getId();
218
         ResponseBean responseBean = new ResponseBean();
226
         ResponseBean responseBean = new ResponseBean();

+ 38
- 22
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java 查看文件

7
 import com.community.huiju.model.TpTicket;
7
 import com.community.huiju.model.TpTicket;
8
 import com.community.huiju.model.TpTransaction;
8
 import com.community.huiju.model.TpTransaction;
9
 import com.community.huiju.model.TpTicketRecordComment;
9
 import com.community.huiju.model.TpTicketRecordComment;
10
+import com.community.huiju.service.AgreementServicel;
10
 import com.community.huiju.service.ITicketService;
11
 import com.community.huiju.service.ITicketService;
11
 import io.swagger.annotations.Api;
12
 import io.swagger.annotations.Api;
12
 import io.swagger.annotations.ApiImplicitParam;
13
 import io.swagger.annotations.ApiImplicitParam;
31
     @Autowired
32
     @Autowired
32
     private ITicketService iTicketService;
33
     private ITicketService iTicketService;
33
 
34
 
34
-    @RequestMapping(value = "/tickets/{communityId}",method = RequestMethod.GET)
35
-    @ApiOperation(value = "获取 报修/投诉/联系单 各3条数据",notes = "根据 小区编号,第几页,一页多少行")
35
+    @Autowired
36
+    private AgreementServicel agreementServicel;
37
+
38
+    @RequestMapping(value = "/tickets/{communityId}", method = RequestMethod.GET)
39
+    @ApiOperation(value = "获取 报修/投诉/联系单 各3条数据", notes = "根据 小区编号,第几页,一页多少行")
36
     @ApiImplicitParams({
40
     @ApiImplicitParams({
37
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区编号"),
41
             @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区编号"),
38
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum",value = "第几页"),
42
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageNum",value = "第几页"),
40
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
44
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
41
     })
45
     })
42
     public ResponseBean getService(@PathVariable(value = "communityId") String communityId,
46
     public ResponseBean getService(@PathVariable(value = "communityId") String communityId,
43
-                                   @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
44
-                                   @RequestParam(value = "pageSize",defaultValue = "3") Integer pageSize,
47
+                                   @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
48
+                                   @RequestParam(value = "pageSize", defaultValue = "3") Integer pageSize,
45
                                    HttpSession session) {
49
                                    HttpSession session) {
46
         ResponseBean response = new ResponseBean();
50
         ResponseBean response = new ResponseBean();
47
 
51
 
51
         tpTicket.setCommunityId(Integer.valueOf(communityId));
55
         tpTicket.setCommunityId(Integer.valueOf(communityId));
52
         tpTicket.setTaUserId(userElement.getId());
56
         tpTicket.setTaUserId(userElement.getId());
53
 
57
 
54
-        response = iTicketService.getList(tpTicket,pageNum,pageSize);
58
+        response = iTicketService.getList(tpTicket, pageNum, pageSize);
55
         return response;
59
         return response;
56
     }
60
     }
57
-    
58
-    @ApiOperation(value = "获取报修/投诉/联系单进度详情数据",notes = "获取报修/投诉/联系单进度详情数据")
61
+
62
+    @ApiOperation(value = "获取报修/投诉/联系单进度详情数据", notes = "获取报修/投诉/联系单进度详情数据")
59
     @ApiImplicitParams({
63
     @ApiImplicitParams({
60
-            @ApiImplicitParam(paramType = "path",dataType = "String",name = "communityId",value = "小区编号"),
61
-            @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "ticketId",value = "报修id")
64
+            @ApiImplicitParam(paramType = "path", dataType = "String", name = "communityId", value = "小区编号"),
65
+            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "ticketId", value = "报修id")
62
     })
66
     })
63
     @RequestMapping(value = "/ticket/schedule/{communityId}", method = RequestMethod.GET)
67
     @RequestMapping(value = "/ticket/schedule/{communityId}", method = RequestMethod.GET)
64
-    public ResponseBean getTicketSchedule(@PathVariable(value = "communityId") String communityId,@RequestParam Integer ticketId){
68
+    public ResponseBean getTicketSchedule(@PathVariable(value = "communityId") String communityId, @RequestParam Integer ticketId) {
65
         ResponseBean responseBean = new ResponseBean();
69
         ResponseBean responseBean = new ResponseBean();
66
-        TpTicket ticket = iTicketService.getTicketSchedule(communityId,ticketId);
70
+        TpTicket ticket = iTicketService.getTicketSchedule(communityId, ticketId);
67
         responseBean.addSuccess(ticket);
71
         responseBean.addSuccess(ticket);
68
         return responseBean;
72
         return responseBean;
69
     }
73
     }
70
-    
74
+
71
     @RequestMapping(value = "/tickets/list/{communityId}", method = RequestMethod.GET)
75
     @RequestMapping(value = "/tickets/list/{communityId}", method = RequestMethod.GET)
72
     @ApiOperation(value = "获取 报修/投诉/联系单 数据列表", notes = "根据 小区编号,工单类型,第几页,一页多少行")
76
     @ApiOperation(value = "获取 报修/投诉/联系单 数据列表", notes = "根据 小区编号,工单类型,第几页,一页多少行")
73
     @ApiImplicitParams({
77
     @ApiImplicitParams({
76
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
80
             @ApiImplicitParam(paramType = "query",dataType = "Integer",name = "pageSize", value = "一页多少数据"),
77
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
81
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "type", value = "工单类型 (0报修/1投诉/2联系单)"),
78
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
82
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
83
+
79
     })
84
     })
80
     public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
85
     public ResponseBean getServiceList(@PathVariable(value = "communityId") String communityId,
81
-                                       @RequestParam(value = "pageNum",defaultValue = "1") Integer pageNum,
82
-                                       @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
86
+                                       @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
87
+                                       @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
83
                                        @RequestParam(value = "type") String type,
88
                                        @RequestParam(value = "type") String type,
84
                                        HttpSession session) {
89
                                        HttpSession session) {
85
         ResponseBean responseBean = new ResponseBean();
90
         ResponseBean responseBean = new ResponseBean();
91
         tpTicket.setTaUserId(userElement.getId());
96
         tpTicket.setTaUserId(userElement.getId());
92
         tpTicket.setType(type);
97
         tpTicket.setType(type);
93
 
98
 
94
-        responseBean = iTicketService.getByTypeList(tpTicket,pageNum,pageSize);
99
+        responseBean = iTicketService.getByTypeList(tpTicket, pageNum, pageSize);
95
 
100
 
96
         return responseBean;
101
         return responseBean;
97
 
102
 
98
     }
103
     }
104
+
99
     @ApiOperation(value = "回复 报修/投诉/联系单 追问接口", notes = "回复 报修/投诉/联系单 追问接口")
105
     @ApiOperation(value = "回复 报修/投诉/联系单 追问接口", notes = "回复 报修/投诉/联系单 追问接口")
100
-    @ApiImplicitParams({ @ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
101
-            @ApiImplicitParam(name = "tpTicketRecordComment", value = "回复记录参数", paramType ="body")})
106
+    @ApiImplicitParams({@ApiImplicitParam(paramType = "path", dataType = "integer", name = "communityId", value = "小区Id"),
107
+            @ApiImplicitParam(name = "tpTicketRecordComment", value = "回复记录参数", paramType = "body")})
102
     @RequestMapping(value = "/ticket/reply/{communityId}", method = RequestMethod.POST)
108
     @RequestMapping(value = "/ticket/reply/{communityId}", method = RequestMethod.POST)
103
     public ResponseBean updateTicketsReply(@PathVariable(value = "communityId") Integer communityId, @RequestBody TpTicketRecordComment tpTicketRecordComment, HttpSession session){
109
     public ResponseBean updateTicketsReply(@PathVariable(value = "communityId") Integer communityId, @RequestBody TpTicketRecordComment tpTicketRecordComment, HttpSession session){
104
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
110
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
108
         Integer size = iTicketService.updateTicketsReply(tpTicketRecordComment, userId);
114
         Integer size = iTicketService.updateTicketsReply(tpTicketRecordComment, userId);
109
         if (size > 0){
115
         if (size > 0){
110
             responseBean.addSuccess(size);
116
             responseBean.addSuccess(size);
111
-        }else{
117
+        } else {
112
             responseBean.addError("更新失败");
118
             responseBean.addError("更新失败");
113
         }
119
         }
114
         return responseBean;
120
         return responseBean;
116
 
122
 
117
     @ApiOperation(value = "添加报修", notes = "添加报修")
123
     @ApiOperation(value = "添加报修", notes = "添加报修")
118
     @ApiImplicitParams({
124
     @ApiImplicitParams({
125
+
119
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketContent",value = "工单内容"),
126
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketContent",value = "工单内容"),
120
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketTitle",value = "工单标题"),
127
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "ticketTitle",value = "工单标题"),
121
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "repairType",value = "报修房屋类型"),
128
             @ApiImplicitParam(paramType = "query",dataType = "String",name = "repairType",value = "报修房屋类型"),
122
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
129
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token"),
123
     })
130
     })
124
-    @RequestMapping(value = "/addAlltpTicket",method = RequestMethod.POST)
131
+    @RequestMapping(value = "/addAlltpTicket", method = RequestMethod.POST)
125
     @ResponseBody
132
     @ResponseBody
126
-    public ResponseBean addTransaction(TpTicket tpTicket, HttpSession session){
133
+    public ResponseBean addTransaction(@RequestBody String parameter, HttpSession session) {
127
         ResponseBean responseBean = new ResponseBean();
134
         ResponseBean responseBean = new ResponseBean();
128
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
135
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
129
         Integer userId = userElement.getId();
136
         Integer userId = userElement.getId();
130
-        ResponseBean response=iTicketService.addAiTicketService(userId,tpTicket);
137
+        ResponseBean response = iTicketService.addAiTicketService(userId, parameter);
131
         return response;
138
         return response;
132
     }
139
     }
133
 
140
 
134
-
141
+    @ApiOperation(value = "物业,门卫,领导电话", notes = "物业,门卫,领导电话")
142
+    @RequestMapping(value = "/allTpAnnouncementTel", method = RequestMethod.GET)
143
+    public ResponseBean getTpAnnouncementTel() {
144
+        ResponseBean responseBean = new ResponseBean();
145
+        ResponseBean agreement = agreementServicel.getTpAnnouncementTel();
146
+                responseBean.addSuccess(agreement);
147
+        return responseBean;
148
+    }
135
 }
149
 }
150
+
151
+

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/UserController.java 查看文件

70
         ResponseBean responseBean = new ResponseBean();
70
         ResponseBean responseBean = new ResponseBean();
71
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
71
         UserElement userElement = (UserElement) session.getAttribute(Constant.APP_USER_SESSION);
72
         Integer userId=userElement.getId();
72
         Integer userId=userElement.getId();
73
-        ResponseBean response=iTaUserService.udDateloginName(userId,paramets);
73
+        ResponseBean response=iTaUserService.upDateloginName(userId,paramets);
74
         return response;
74
         return response;
75
     }
75
     }
76
 
76
 

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TaUserMapper.java 查看文件

39
      * @param record
39
      * @param record
40
      * @return
40
      * @return
41
      */
41
      */
42
-    TaUser ubdateLongName(TaUser record);
42
+    TaUser updateLongName(TaUser record);
43
 
43
 
44
     /**
44
     /**
45
      * 查询房屋成员列表
45
      * 查询房屋成员列表

+ 2
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTransactionMapper.java 查看文件

23
     List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("type") String type);
23
     List<TpTransaction> findAllTransaction(@Param("communityId") Integer communityId, @Param("type") String type);
24
 
24
 
25
     List<TpTransaction> selectTransaction(@Param("userId")Integer userId, @Param("communityId")Integer communityId);
25
     List<TpTransaction> selectTransaction(@Param("userId")Integer userId, @Param("communityId")Integer communityId);
26
+
27
+    void updateTransaction(@Param("id")Integer id, @Param("transactionTitle")String transactionTitle, @Param("transactionContent")String transactionContent, @Param("userId")Integer userId,@Param("Type")Integer Type);
26
 }
28
 }

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITaUserService.java 查看文件

39
      * @param id
39
      * @param id
40
      * @return
40
      * @return
41
      */
41
      */
42
-    ResponseBean udDateloginName(Integer id, String paramets);
42
+    ResponseBean upDateloginName(Integer id, String paramets);
43
 
43
 
44
     /**
44
     /**
45
      * 获取房屋成员列表
45
      * 获取房屋成员列表

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/ITicketService.java 查看文件

43
 	/**
43
 	/**
44
 	 * 添加报修
44
 	 * 添加报修
45
 	 * @param userId
45
 	 * @param userId
46
-	 * @param tpTicket
46
+	 * @param parameter
47
 	 * @return
47
 	 * @return
48
 	 */
48
 	 */
49
-    ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket);
49
+    ResponseBean addAiTicketService(Integer userId,String parameter);
50
 	
50
 	
51
 	/**
51
 	/**
52
 	 * 回复工单
52
 	 * 回复工单

+ 2
- 4
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/SocialServiceI.java 查看文件

88
 
88
 
89
 	/**
89
 	/**
90
 	 * 修改当前帖子
90
 	 * 修改当前帖子
91
-	 * @param tpTransaction
92
-	 * @param userId
93
-	 * @return
94
 	 */
91
 	 */
95
-	ResponseBean updateTransaction(TpTransaction tpTransaction,Integer userId);
92
+	ResponseBean updateTransaction(Integer Id,String transactionTitle,String transactionContent,Integer userId,Integer Type);
93
+
96
 	void updateTicketContent(Integer ticketId, TpTicket tpTicket, String type);
94
 	void updateTicketContent(Integer ticketId, TpTicket tpTicket, String type);
97
 
95
 
98
 	/**
96
 	/**

+ 5
- 12
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java 查看文件

246
         tpTicket.setType(type);
246
         tpTicket.setType(type);
247
         tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
247
         tpTicketMapper.updateByPrimaryKeySelective(tpTicket);
248
     }
248
     }
249
-
249
+    @Transactional
250
     @Override
250
     @Override
251
     public ResponseBean addAllTransaction(Integer userId, TpTransaction tpTransaction) {
251
     public ResponseBean addAllTransaction(Integer userId, TpTransaction tpTransaction) {
252
         ResponseBean response = new ResponseBean();
252
         ResponseBean response = new ResponseBean();
254
         tpTransaction.setCommunityId(user.getCommunityId());
254
         tpTransaction.setCommunityId(user.getCommunityId());
255
         tpTransaction.setTaUserId(userId);
255
         tpTransaction.setTaUserId(userId);
256
         tpTransaction.setCreateUser(userId);
256
         tpTransaction.setCreateUser(userId);
257
+        tpTransaction.setStatus("1");
257
         tpTransaction.setCreateDate(new Date());
258
         tpTransaction.setCreateDate(new Date());
258
         tpTransaction.setUpdateUser(userId);
259
         tpTransaction.setUpdateUser(userId);
259
         tpTransaction.setUpdateDate(new Date());
260
         tpTransaction.setUpdateDate(new Date());
260
-        tpTransactionMapper.insert(tpTransaction);
261
+        tpTransactionMapper.insertSelective(tpTransaction);
261
         response.addSuccess("发布成功");
262
         response.addSuccess("发布成功");
262
         return response;
263
         return response;
263
     }
264
     }
274
     }
275
     }
275
 
276
 
276
     @Override
277
     @Override
277
-    public ResponseBean updateTransaction(TpTransaction tpTransaction,Integer userId) {
278
+    public ResponseBean updateTransaction(Integer Id,String transactionTitle,String transactionContent,Integer userId,Integer Type) {
278
         ResponseBean response = new ResponseBean();
279
         ResponseBean response = new ResponseBean();
279
-        TaUser user=taUserMapper.selectByPrimaryKey(userId);
280
-        tpTransaction.setCommunityId(user.getCommunityId());
281
-        tpTransaction.setTaUserId(userId);
282
-        tpTransaction.setCreateUser(userId);
283
-        tpTransaction.setStatus("2");
284
-        tpTransaction.setCreateDate(new Date());
285
-        tpTransaction.setUpdateUser(userId);
286
-        tpTransaction.setUpdateDate(new Date());
287
-        tpTransactionMapper.updateByPrimaryKey(tpTransaction);
280
+        tpTransactionMapper.updateTransaction(Id,transactionTitle,transactionContent,userId,Type);
288
         response.addSuccess("修改成功");
281
         response.addSuccess("修改成功");
289
         return response;
282
         return response;
290
     }
283
     }

+ 2
- 2
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TaUserServiceImpl.java 查看文件

158
     }
158
     }
159
     @Transactional
159
     @Transactional
160
     @Override
160
     @Override
161
-    public ResponseBean udDateloginName(Integer id, String paramets) {
161
+    public ResponseBean upDateloginName(Integer id, String paramets) {
162
         ResponseBean response = new ResponseBean();
162
         ResponseBean response = new ResponseBean();
163
 
163
 
164
         JSONObject jsonObject = JSONObject.parseObject(paramets);
164
         JSONObject jsonObject = JSONObject.parseObject(paramets);
174
             TaUser taUser=new TaUser();
174
             TaUser taUser=new TaUser();
175
             taUser.setLoginName(phone);
175
             taUser.setLoginName(phone);
176
             taUser.setId(user.getId());
176
             taUser.setId(user.getId());
177
-            taUserMapper.ubdateLongName(taUser);
177
+            taUserMapper.updateLongName(taUser);
178
              response.addSuccess("修改成功");
178
              response.addSuccess("修改成功");
179
             AppkeyCache.setCache(user.getLoginName(),"null");
179
             AppkeyCache.setCache(user.getLoginName(),"null");
180
             return response;
180
             return response;

+ 58
- 47
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java 查看文件

1
 package com.community.huiju.service.impl;
1
 package com.community.huiju.service.impl;
2
 
2
 
3
 
3
 
4
+import com.alibaba.fastjson.JSONObject;
4
 import com.community.commom.constant.Constant;
5
 import com.community.commom.constant.Constant;
5
 import com.community.commom.mode.ResponseBean;
6
 import com.community.commom.mode.ResponseBean;
6
 import com.community.huiju.dao.TaUserMapper;
7
 import com.community.huiju.dao.TaUserMapper;
7
 import com.community.huiju.dao.TpTicketMapper;
8
 import com.community.huiju.dao.TpTicketMapper;
8
 import com.community.huiju.dao.TpTicketRecordCommentMapper;
9
 import com.community.huiju.dao.TpTicketRecordCommentMapper;
9
 import com.community.huiju.dao.TpTicketRecordMapper;
10
 import com.community.huiju.dao.TpTicketRecordMapper;
10
-import com.community.huiju.model.TaUser;
11
-import com.community.huiju.model.TpTicket;
12
-import com.community.huiju.model.TpTicketRecord;
13
-import com.community.huiju.model.TpTicketRecordComment;
11
+import com.community.huiju.model.*;
14
 import com.community.huiju.service.ITicketService;
12
 import com.community.huiju.service.ITicketService;
15
 import com.community.huiju.vo.TpTicketVO;
13
 import com.community.huiju.vo.TpTicketVO;
16
 import com.github.pagehelper.PageHelper;
14
 import com.github.pagehelper.PageHelper;
35
 
33
 
36
     @Autowired
34
     @Autowired
37
     private TpTicketMapper tpTicketMapper;
35
     private TpTicketMapper tpTicketMapper;
38
-    
36
+
39
     @Autowired
37
     @Autowired
40
     private TpTicketRecordMapper tpTicketRecordMapper;
38
     private TpTicketRecordMapper tpTicketRecordMapper;
41
 
39
 
42
     @Autowired
40
     @Autowired
43
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
41
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
44
-    
42
+
45
     @Autowired
43
     @Autowired
46
     private TaUserMapper taUserMapper;
44
     private TaUserMapper taUserMapper;
47
 
45
 
48
     @Override
46
     @Override
49
-    public ResponseBean getList(TpTicket tpTicket,Integer pageNum, Integer pageSize) {
47
+    public ResponseBean getList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
50
 
48
 
51
-        ResponseBean<Map<String,Object>> responseBean = new ResponseBean();
49
+        ResponseBean<Map<String, Object>> responseBean = new ResponseBean();
52
         // 最终返回值
50
         // 最终返回值
53
-        Map<String,Object> result = Maps.newHashMap();
51
+        Map<String, Object> result = Maps.newHashMap();
54
 
52
 
55
-        Map<String,Object> parameter = Maps.newHashMap();
56
-        parameter.put("communityId",tpTicket.getCommunityId());
57
-        parameter.put("taUserId",tpTicket.getTaUserId());
53
+        Map<String, Object> parameter = Maps.newHashMap();
54
+        parameter.put("communityId", tpTicket.getCommunityId());
55
+        parameter.put("taUserId", tpTicket.getTaUserId());
58
 
56
 
59
         //  0 代表 报修  1 代表 投诉  2代表 联系单
57
         //  0 代表 报修  1 代表 投诉  2代表 联系单
60
-        parameter.put("type",0);
58
+        parameter.put("type", 0);
61
         // 报修
59
         // 报修
62
-        PageHelper.startPage(pageNum,pageSize);
60
+        PageHelper.startPage(pageNum, pageSize);
63
         List<TpTicket> tpTicketRepairsList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
61
         List<TpTicket> tpTicketRepairsList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
64
         List<TpTicketVO> repairsList = Lists.newArrayList();
62
         List<TpTicketVO> repairsList = Lists.newArrayList();
65
-        tpTicketVOConvert(tpTicketRepairsList,repairsList);
63
+        tpTicketVOConvert(tpTicketRepairsList, repairsList);
66
 
64
 
67
         // 投诉
65
         // 投诉
68
         //  0 代表 报修  1 代表 投诉  2代表 联系单
66
         //  0 代表 报修  1 代表 投诉  2代表 联系单
69
-        parameter.put("type",1);
70
-        PageHelper.startPage(pageNum,pageSize);
67
+        parameter.put("type", 1);
68
+        PageHelper.startPage(pageNum, pageSize);
71
         List<TpTicket> tpTicketComplaintList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
69
         List<TpTicket> tpTicketComplaintList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
72
         List<TpTicketVO> complaintList = Lists.newArrayList();
70
         List<TpTicketVO> complaintList = Lists.newArrayList();
73
         tpTicketVOConvert(tpTicketComplaintList, complaintList);
71
         tpTicketVOConvert(tpTicketComplaintList, complaintList);
74
 
72
 
75
         // 联系工单
73
         // 联系工单
76
         //  0 代表 报修  1 代表 投诉  2代表 联系单
74
         //  0 代表 报修  1 代表 投诉  2代表 联系单
77
-        parameter.put("type",2);
78
-        PageHelper.startPage(pageNum,pageSize);
75
+        parameter.put("type", 2);
76
+        PageHelper.startPage(pageNum, pageSize);
79
         List<TpTicket> tpTicketLiaisonList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
77
         List<TpTicket> tpTicketLiaisonList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
80
         List<TpTicketVO> liaisonList = Lists.newArrayList();
78
         List<TpTicketVO> liaisonList = Lists.newArrayList();
81
         tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
79
         tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
82
 
80
 
83
-        result.put("repairs",repairsList);
84
-        result.put("complaint",complaintList);
85
-        result.put("liaison",liaisonList);
81
+        result.put("repairs", repairsList);
82
+        result.put("complaint", complaintList);
83
+        result.put("liaison", liaisonList);
86
 
84
 
87
         responseBean.addSuccess(result);
85
         responseBean.addSuccess(result);
88
         return responseBean;
86
         return responseBean;
90
 
88
 
91
     /**
89
     /**
92
      * 公共方法, 获取一条数据
90
      * 公共方法, 获取一条数据
91
+     *
93
      * @param map
92
      * @param map
94
      * @return
93
      * @return
95
      */
94
      */
96
-    private TpTicketRecordComment getTicketRecordComment(Map map){
95
+    private TpTicketRecordComment getTicketRecordComment(Map map) {
97
         List<TpTicketRecordComment> list = tpTicketRecordCommentMapper.selectByTicketId(map);
96
         List<TpTicketRecordComment> list = tpTicketRecordCommentMapper.selectByTicketId(map);
98
-        return null==list
99
-                ?null:list.size()==0
100
-                ?null:list.get(0);
97
+        return null == list
98
+                ? null : list.size() == 0
99
+                ? null : list.get(0);
101
     }
100
     }
102
 
101
 
103
     /**
102
     /**
104
      * 数据转换,并填充数据
103
      * 数据转换,并填充数据
104
+     *
105
      * @param target
105
      * @param target
106
      * @param source
106
      * @param source
107
      * @return
107
      * @return
108
      */
108
      */
109
-    public void tpTicketVOConvert(List<TpTicket> source, List<TpTicketVO> target){
109
+    public void tpTicketVOConvert(List<TpTicket> source, List<TpTicketVO> target) {
110
 
110
 
111
         // 查询参数
111
         // 查询参数
112
-        Map<String,Object> lastRecordMap = Maps.newHashMap();
112
+        Map<String, Object> lastRecordMap = Maps.newHashMap();
113
         // 表示查询出最新的一条
113
         // 表示查询出最新的一条
114
-        lastRecordMap.put("size",1);
114
+        lastRecordMap.put("size", 1);
115
 
115
 
116
-        source.stream().forEach(e->{
116
+        source.stream().forEach(e -> {
117
             TpTicketVO tpTicketVO = new TpTicketVO();
117
             TpTicketVO tpTicketVO = new TpTicketVO();
118
-            BeanUtils.copyProperties(e,tpTicketVO);
118
+            BeanUtils.copyProperties(e, tpTicketVO);
119
             // 设置工单编号
119
             // 设置工单编号
120
-            lastRecordMap.put("tickerId",e.getId());
120
+            lastRecordMap.put("tickerId", e.getId());
121
             TpTicketRecordComment comment = getTicketRecordComment(lastRecordMap);
121
             TpTicketRecordComment comment = getTicketRecordComment(lastRecordMap);
122
             if (null != comment) {
122
             if (null != comment) {
123
                 tpTicketVO.setCommentContent(comment.getContent());
123
                 tpTicketVO.setCommentContent(comment.getContent());
133
 
133
 
134
         ResponseBean response = new ResponseBean();
134
         ResponseBean response = new ResponseBean();
135
 
135
 
136
-        Map<String,Object> parameter = Maps.newHashMap();
137
-        parameter.put("communityId",tpTicket.getCommunityId());
138
-        parameter.put("taUserId",tpTicket.getTaUserId());
136
+        Map<String, Object> parameter = Maps.newHashMap();
137
+        parameter.put("communityId", tpTicket.getCommunityId());
138
+        parameter.put("taUserId", tpTicket.getTaUserId());
139
 
139
 
140
         //  0 代表 报修  1 代表 投诉  2代表 联系单
140
         //  0 代表 报修  1 代表 投诉  2代表 联系单
141
-        parameter.put("type",tpTicket.getType());
141
+        parameter.put("type", tpTicket.getType());
142
 
142
 
143
-        PageHelper.startPage(pageNum,pageSize);
143
+        PageHelper.startPage(pageNum, pageSize);
144
         List<TpTicket> tpTicketList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
144
         List<TpTicket> tpTicketList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
145
 
145
 
146
         List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
146
         List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
147
-        tpTicketVOConvert(tpTicketList,tpTicketVOList);
147
+        tpTicketVOConvert(tpTicketList, tpTicketVOList);
148
 
148
 
149
         response.addSuccess(tpTicketVOList);
149
         response.addSuccess(tpTicketVOList);
150
 
150
 
151
         return response;
151
         return response;
152
     }
152
     }
153
-    
153
+
154
     /**
154
     /**
155
      * 获取报修详情
155
      * 获取报修详情
156
+     *
156
      * @param communityId
157
      * @param communityId
157
      * @param ticketId
158
      * @param ticketId
158
      * @return
159
      * @return
160
     @Override
161
     @Override
161
     public TpTicket getTicketSchedule(String communityId, Integer ticketId) {
162
     public TpTicket getTicketSchedule(String communityId, Integer ticketId) {
162
         //查看工单详情
163
         //查看工单详情
163
-        TpTicket ticket = tpTicketMapper.selectByTicketId(communityId,ticketId);
164
-        if (null != ticket){
164
+        TpTicket ticket = tpTicketMapper.selectByTicketId(communityId, ticketId);
165
+        if (null != ticket) {
165
             //工单进度
166
             //工单进度
166
-            List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.getTicketRecordByTicketId(communityId,ticketId);
167
+            List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.getTicketRecordByTicketId(communityId, ticketId);
167
             //工单回复
168
             //工单回复
168
             ticketRecordList.stream().forEach(TpTicketRecord -> {
169
             ticketRecordList.stream().forEach(TpTicketRecord -> {
169
                 List<TpTicketRecordComment> ticketRecordCommentList = tpTicketRecordCommentMapper.selectByTicketRecordId(TpTicketRecord);
170
                 List<TpTicketRecordComment> ticketRecordCommentList = tpTicketRecordCommentMapper.selectByTicketRecordId(TpTicketRecord);
175
     }
176
     }
176
 
177
 
177
     @Override
178
     @Override
178
-    public ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket) {
179
+    public ResponseBean addAiTicketService(Integer userId, String parameter) {
179
         ResponseBean response = new ResponseBean();
180
         ResponseBean response = new ResponseBean();
181
+        JSONObject jsonObject = JSONObject.parseObject(parameter);
182
+        String ticketContent = (String) jsonObject.get("ticketContent");
183
+        String ticketTitle = (String) jsonObject.get("ticketTitle");
184
+        String repairType = (String) jsonObject.get("repairType");
180
         TaUser user = taUserMapper.selectByPrimaryKey(userId);
185
         TaUser user = taUserMapper.selectByPrimaryKey(userId);
186
+        TpTicket tpTicket=new TpTicket();
181
         tpTicket.setCommunityId(user.getCommunityId());
187
         tpTicket.setCommunityId(user.getCommunityId());
182
         tpTicket.setTaUserId(userId);
188
         tpTicket.setTaUserId(userId);
183
-        tpTicket.setTpUserId(userId);
189
+        tpTicket.setStatus("2");
190
+        tpTicket.setRepairType(repairType);
191
+        tpTicket.setTicketTitle(ticketTitle);
192
+        tpTicket.setTicketContent(ticketContent);
184
         tpTicket.setCreateUser(userId);
193
         tpTicket.setCreateUser(userId);
185
         tpTicket.setCreateDate(new Date());
194
         tpTicket.setCreateDate(new Date());
186
         tpTicket.setUpdateUser(userId);
195
         tpTicket.setUpdateUser(userId);
187
         tpTicket.setUpdateDate(new Date());
196
         tpTicket.setUpdateDate(new Date());
188
-        tpTicketMapper.insert(tpTicket);
197
+        tpTicketMapper.insertSelective(tpTicket);
198
+        Integer id=tpTicket.getId();
189
         TpTicketRecord tpTicketRecord = new TpTicketRecord();
199
         TpTicketRecord tpTicketRecord = new TpTicketRecord();
190
         //获取当前插入的信息,维护工单记录表
200
         //获取当前插入的信息,维护工单记录表
191
-        TpTicket tpTicketReco = tpTicketMapper.getById(userId, user.getCommunityId());
201
+        TpTicket tpTicketReco = tpTicketMapper.selectByPrimaryKey(id);
192
         tpTicketRecord.setCommunityId(user.getCommunityId());
202
         tpTicketRecord.setCommunityId(user.getCommunityId());
193
         tpTicketRecord.setTicketId(tpTicketReco.getId());
203
         tpTicketRecord.setTicketId(tpTicketReco.getId());
204
+        tpTicketRecord.setStatus(tpTicketReco.getStatus());
194
         tpTicketRecord.setCreateUser(userId);
205
         tpTicketRecord.setCreateUser(userId);
195
         tpTicketRecord.setCreateDate(new Date());
206
         tpTicketRecord.setCreateDate(new Date());
196
-        tpTicketRecordMapper.insert(tpTicketRecord);
207
+        tpTicketRecordMapper.insertSelective(tpTicketRecord);
197
         response.addSuccess("新增成功");
208
         response.addSuccess("新增成功");
198
         return response;
209
         return response;
199
     }
210
     }

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TaUserMapper.xml 查看文件

260
     where login_name=#{loginName,jdbcType=VARCHAR}
260
     where login_name=#{loginName,jdbcType=VARCHAR}
261
   </select>
261
   </select>
262
 
262
 
263
-  <select id="ubdateLongName" parameterType="com.community.huiju.model.TaUser" resultMap="BaseResultMap">
263
+  <select id="updateLongName" parameterType="com.community.huiju.model.TaUser" resultMap="BaseResultMap">
264
     update ta_user
264
     update ta_user
265
     set
265
     set
266
     login_name = #{loginName,jdbcType=VARCHAR}
266
     login_name = #{loginName,jdbcType=VARCHAR}

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketMapper.xml 查看文件

45
       #{comment,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
45
       #{comment,jdbcType=VARCHAR}, #{createUser,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, 
46
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
46
       #{updateUser,jdbcType=INTEGER}, #{updateDate,jdbcType=TIMESTAMP})
47
   </insert>
47
   </insert>
48
-  <insert id="insertSelective" parameterType="com.community.huiju.model.TpTicket" >
48
+  <insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.community.huiju.model.TpTicket" >
49
     insert into tp_ticket
49
     insert into tp_ticket
50
     <trim prefix="(" suffix=")" suffixOverrides="," >
50
     <trim prefix="(" suffix=")" suffixOverrides="," >
51
       <if test="id != null" >
51
       <if test="id != null" >

+ 12
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTransactionMapper.xml 查看文件

188
     from tp_transaction
188
     from tp_transaction
189
     where community_id = #{communityId,jdbcType=INTEGER} and ta_user_id = #{userId,jdbcType=INTEGER}
189
     where community_id = #{communityId,jdbcType=INTEGER} and ta_user_id = #{userId,jdbcType=INTEGER}
190
   </select>
190
   </select>
191
+
192
+  <update id="updateTransaction" parameterType="com.community.huiju.model.TpTransaction" >
193
+    update tp_transaction
194
+    set
195
+    ta_user_id = #{userId,jdbcType=INTEGER},
196
+    transaction_title = #{transactionTitle,jdbcType=VARCHAR},
197
+    transaction_content = #{transactionContent,jdbcType=VARCHAR},
198
+     type = #{Type,jdbcType=CHAR},
199
+    update_user = #{userId,jdbcType=INTEGER},
200
+    update_date = now()
201
+    where id = #{id,jdbcType=INTEGER}
202
+  </update>
191
 </mapper>
203
 </mapper>