dingxin 6 anni fa
parent
commit
bb943fdce1

+ 0
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/AgreementController.java Vedi File

@@ -42,13 +42,5 @@ public class AgreementController {
42 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
 }

+ 69
- 66
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/SocialController.java Vedi File

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

+ 49
- 35
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Vedi File

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

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/SocialServiceImpl.java Vedi File

@@ -282,7 +282,7 @@ public class SocialServiceImpl implements SocialServiceI {
282 282
     @Override
283 283
     public ResponseBean ubdateTransaction(TpTransaction tpTransaction,Integer userId) {
284 284
         ResponseBean response = new ResponseBean();
285
-        TaUser user=taUserMapper.selectByPrimaryKey(userId);
285
+        TaUser user = taUserMapper.selectByPrimaryKey(userId);
286 286
         tpTransaction.setCommunityId(user.getCommunityId());
287 287
         tpTransaction.setTaUserId(userId);
288 288
         tpTransaction.setCreateUser(userId);
@@ -293,6 +293,7 @@ public class SocialServiceImpl implements SocialServiceI {
293 293
         tpTransactionMapper.updateByPrimaryKey(tpTransaction);
294 294
         response.addSuccess("修改成功");
295 295
         return response;
296
+    }
296 297
     public void accessTicket(Integer communityId, TpTicket tpTicket, String ticketId) {
297 298
         //修改工单内容和评分
298 299
         tpTicket.setId(Integer.valueOf(ticketId));

+ 64
- 61
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Vedi File

@@ -35,13 +35,13 @@ public class TicketServiceImpl implements ITicketService {
35 35
 
36 36
     @Autowired
37 37
     private TpTicketMapper tpTicketMapper;
38
-    
38
+
39 39
     @Autowired
40 40
     private TpTicketRecordMapper tpTicketRecordMapper;
41 41
 
42 42
     @Autowired
43 43
     private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
44
-    
44
+
45 45
     @Autowired
46 46
     private TaUserMapper taUserMapper;
47 47
 
@@ -49,43 +49,43 @@ public class TicketServiceImpl implements ITicketService {
49 49
     private TaUserMapper taUserMapper;
50 50
 
51 51
     @Override
52
-    public ResponseBean getList(TpTicket tpTicket,Integer pageNum, Integer pageSize) {
52
+    public ResponseBean getList(TpTicket tpTicket, Integer pageNum, Integer pageSize) {
53 53
 
54
-        ResponseBean<Map<String,Object>> responseBean = new ResponseBean();
54
+        ResponseBean<Map<String, Object>> responseBean = new ResponseBean();
55 55
         // 最终返回值
56
-        Map<String,Object> result = Maps.newHashMap();
56
+        Map<String, Object> result = Maps.newHashMap();
57 57
 
58
-        Map<String,Object> parameter = Maps.newHashMap();
59
-        parameter.put("communityId",tpTicket.getCommunityId());
60
-        parameter.put("taUserId",tpTicket.getTaUserId());
58
+        Map<String, Object> parameter = Maps.newHashMap();
59
+        parameter.put("communityId", tpTicket.getCommunityId());
60
+        parameter.put("taUserId", tpTicket.getTaUserId());
61 61
 
62 62
         //  0 代表 报修  1 代表 投诉  2代表 联系单
63
-        parameter.put("type",0);
63
+        parameter.put("type", 0);
64 64
         // 报修
65
-        PageHelper.startPage(pageNum,pageSize);
65
+        PageHelper.startPage(pageNum, pageSize);
66 66
         List<TpTicket> tpTicketRepairsList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
67 67
         List<TpTicketVO> repairsList = Lists.newArrayList();
68
-        tpTicketVOConvert(tpTicketRepairsList,repairsList);
68
+        tpTicketVOConvert(tpTicketRepairsList, repairsList);
69 69
 
70 70
         // 投诉
71 71
         //  0 代表 报修  1 代表 投诉  2代表 联系单
72
-        parameter.put("type",1);
73
-        PageHelper.startPage(pageNum,pageSize);
72
+        parameter.put("type", 1);
73
+        PageHelper.startPage(pageNum, pageSize);
74 74
         List<TpTicket> tpTicketComplaintList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
75 75
         List<TpTicketVO> complaintList = Lists.newArrayList();
76 76
         tpTicketVOConvert(tpTicketComplaintList, complaintList);
77 77
 
78 78
         // 联系工单
79 79
         //  0 代表 报修  1 代表 投诉  2代表 联系单
80
-        parameter.put("type",2);
81
-        PageHelper.startPage(pageNum,pageSize);
80
+        parameter.put("type", 2);
81
+        PageHelper.startPage(pageNum, pageSize);
82 82
         List<TpTicket> tpTicketLiaisonList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
83 83
         List<TpTicketVO> liaisonList = Lists.newArrayList();
84 84
         tpTicketVOConvert(tpTicketLiaisonList, liaisonList);
85 85
 
86
-        result.put("repairs",repairsList);
87
-        result.put("complaint",complaintList);
88
-        result.put("liaison",liaisonList);
86
+        result.put("repairs", repairsList);
87
+        result.put("complaint", complaintList);
88
+        result.put("liaison", liaisonList);
89 89
 
90 90
         responseBean.addSuccess(result);
91 91
         return responseBean;
@@ -93,34 +93,36 @@ public class TicketServiceImpl implements ITicketService {
93 93
 
94 94
     /**
95 95
      * 公共方法, 获取一条数据
96
+     *
96 97
      * @param map
97 98
      * @return
98 99
      */
99
-    private TpTicketRecordComment getTicketRecordComment(Map map){
100
+    private TpTicketRecordComment getTicketRecordComment(Map map) {
100 101
         List<TpTicketRecordComment> list = tpTicketRecordCommentMapper.selectByTicketId(map);
101
-        return null==list
102
-                ?null:list.size()==0
103
-                ?null:list.get(0);
102
+        return null == list
103
+                ? null : list.size() == 0
104
+                ? null : list.get(0);
104 105
     }
105 106
 
106 107
     /**
107 108
      * 数据转换,并填充数据
109
+     *
108 110
      * @param target
109 111
      * @param source
110 112
      * @return
111 113
      */
112
-    public void tpTicketVOConvert(List<TpTicket> source, List<TpTicketVO> target){
114
+    public void tpTicketVOConvert(List<TpTicket> source, List<TpTicketVO> target) {
113 115
 
114 116
         // 查询参数
115
-        Map<String,Object> lastRecordMap = Maps.newHashMap();
117
+        Map<String, Object> lastRecordMap = Maps.newHashMap();
116 118
         // 表示查询出最新的一条
117
-        lastRecordMap.put("size",1);
119
+        lastRecordMap.put("size", 1);
118 120
 
119
-        source.stream().forEach(e->{
121
+        source.stream().forEach(e -> {
120 122
             TpTicketVO tpTicketVO = new TpTicketVO();
121
-            BeanUtils.copyProperties(e,tpTicketVO);
123
+            BeanUtils.copyProperties(e, tpTicketVO);
122 124
             // 设置工单编号
123
-            lastRecordMap.put("tickerId",e.getId());
125
+            lastRecordMap.put("tickerId", e.getId());
124 126
             TpTicketRecordComment comment = getTicketRecordComment(lastRecordMap);
125 127
             if (null != comment) {
126 128
                 tpTicketVO.setCommentContent(comment.getContent());
@@ -136,26 +138,27 @@ public class TicketServiceImpl implements ITicketService {
136 138
 
137 139
         ResponseBean response = new ResponseBean();
138 140
 
139
-        Map<String,Object> parameter = Maps.newHashMap();
140
-        parameter.put("communityId",tpTicket.getCommunityId());
141
-        parameter.put("taUserId",tpTicket.getTaUserId());
141
+        Map<String, Object> parameter = Maps.newHashMap();
142
+        parameter.put("communityId", tpTicket.getCommunityId());
143
+        parameter.put("taUserId", tpTicket.getTaUserId());
142 144
 
143 145
         //  0 代表 报修  1 代表 投诉  2代表 联系单
144
-        parameter.put("type",tpTicket.getType());
146
+        parameter.put("type", tpTicket.getType());
145 147
 
146
-        PageHelper.startPage(pageNum,pageSize);
148
+        PageHelper.startPage(pageNum, pageSize);
147 149
         List<TpTicket> tpTicketList = tpTicketMapper.selectByCommuniytIdAndByTaUserIdAndByType(parameter);
148 150
 
149 151
         List<TpTicketVO> tpTicketVOList = Lists.newArrayList();
150
-        tpTicketVOConvert(tpTicketList,tpTicketVOList);
152
+        tpTicketVOConvert(tpTicketList, tpTicketVOList);
151 153
 
152 154
         response.addSuccess(tpTicketVOList);
153 155
 
154 156
         return response;
155 157
     }
156
-    
158
+
157 159
     /**
158 160
      * 获取报修详情
161
+     *
159 162
      * @param communityId
160 163
      * @param ticketId
161 164
      * @return
@@ -163,10 +166,10 @@ public class TicketServiceImpl implements ITicketService {
163 166
     @Override
164 167
     public TpTicket getTicketSchedule(String communityId, Integer ticketId) {
165 168
         //查看工单详情
166
-        TpTicket ticket = tpTicketMapper.selectByTicketId(communityId,ticketId);
167
-        if (null != ticket){
169
+        TpTicket ticket = tpTicketMapper.selectByTicketId(communityId, ticketId);
170
+        if (null != ticket) {
168 171
             //工单进度
169
-            List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.getTicketRecordByTicketId(communityId,ticketId);
172
+            List<TpTicketRecord> ticketRecordList = tpTicketRecordMapper.getTicketRecordByTicketId(communityId, ticketId);
170 173
             //工单回复
171 174
             ticketRecordList.stream().forEach(TpTicketRecord -> {
172 175
                 List<TpTicketRecordComment> ticketRecordCommentList = tpTicketRecordCommentMapper.selectByTicketRecordId(TpTicketRecord);
@@ -180,7 +183,7 @@ public class TicketServiceImpl implements ITicketService {
180 183
     @Override
181 184
     public ResponseBean addAiTicketService(Integer userId, TpTicket tpTicket) {
182 185
         ResponseBean response = new ResponseBean();
183
-        TaUser user=taUserMapper.selectByPrimaryKey(userId);
186
+        TaUser user = taUserMapper.selectByPrimaryKey(userId);
184 187
         tpTicket.setCommunityId(user.getCommunityId());
185 188
         tpTicket.setTaUserId(userId);
186 189
         tpTicket.setTpUserId(userId);
@@ -189,9 +192,9 @@ public class TicketServiceImpl implements ITicketService {
189 192
         tpTicket.setUpdateUser(userId);
190 193
         tpTicket.setUpdateDate(new Date());
191 194
         tpTicketMapper.insert(tpTicket);
192
-        TpTicketRecord  tpTicketRecord=new TpTicketRecord();
195
+        TpTicketRecord tpTicketRecord = new TpTicketRecord();
193 196
         //获取当前插入的信息,维护工单记录表
194
-        TpTicket tpTicketReco=tpTicketMapper.getById(userId,user.getCommunityId());
197
+        TpTicket tpTicketReco = tpTicketMapper.getById(userId, user.getCommunityId());
195 198
         tpTicketRecord.setCommunityId(user.getCommunityId());
196 199
         tpTicketRecord.setTicketId(tpTicketReco.getId());
197 200
         tpTicketRecord.setCreateUser(userId);
@@ -199,24 +202,24 @@ public class TicketServiceImpl implements ITicketService {
199 202
         tpTicketRecordMapper.insert(tpTicketRecord);
200 203
         response.addSuccess("新增成功");
201 204
         return response;
202
-    
203
-    /**
204
-     * 回复工单
205
-     * @param tpTicketRecordComment
206
-     * @return
207
-     */
208
-    @Override
209
-    public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment) {
210
-        Integer userId = 1;
211
-        //查询用户名
212
-        TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
213
-        
214
-        tpTicketRecordComment.setUserName(taUser.getUserName());
215
-        tpTicketRecordComment.setParentId(tpTicketRecordComment.getTicketRecordCommentId());
216
-        tpTicketRecordComment.setUuid(userId);
217
-        tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
218
-        tpTicketRecordComment.setCreateDate(new Date());
219
-        //插入回复数据
220
-        return tpTicketRecordCommentMapper.insertSelective(tpTicketRecordComment);
221 205
     }
222
-}
206
+        /**
207
+         * 回复工单
208
+         * @param tpTicketRecordComment
209
+         * @return
210
+         */
211
+        @Override
212
+        public Integer updateTicketsReply(TpTicketRecordComment tpTicketRecordComment){
213
+            Integer userId = 1;
214
+            //查询用户名
215
+            TaUser taUser = taUserMapper.selectByPrimaryKey(userId);
216
+
217
+            tpTicketRecordComment.setUserName(taUser.getUserName());
218
+            tpTicketRecordComment.setParentId(tpTicketRecordComment.getTicketRecordCommentId());
219
+            tpTicketRecordComment.setUuid(userId);
220
+            tpTicketRecordComment.setUserType(Constant.TICKET_USER_TYPE);
221
+            tpTicketRecordComment.setCreateDate(new Date());
222
+            //插入回复数据
223
+            return tpTicketRecordCommentMapper.insertSelective(tpTicketRecordComment);
224
+        }
225
+    }