dingxin 6 lat temu
rodzic
commit
0aab5b149e

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/config/HttpSessionConfig.java Wyświetl plik

@@ -2,6 +2,7 @@ package com.community.huiju.config;
2 2
 
3 3
 import org.springframework.context.annotation.Bean;
4 4
 import org.springframework.context.annotation.Configuration;
5
+import org.springframework.session.MapSession;
5 6
 import org.springframework.session.jdbc.config.annotation.web.http.EnableJdbcHttpSession;
6 7
 import org.springframework.session.web.http.HeaderHttpSessionIdResolver;
7 8
 import org.springframework.session.web.http.HttpSessionIdResolver;
@@ -10,7 +11,7 @@ import org.springframework.session.web.http.HttpSessionIdResolver;
10 11
  * @author weiximei
11 12
  */
12 13
 @Configuration
13
-@EnableJdbcHttpSession
14
+@EnableJdbcHttpSession(maxInactiveIntervalInSeconds = MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS*4)
14 15
 public class HttpSessionConfig {
15 16
 
16 17
     @Bean

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/MonitoringController.java Wyświetl plik

@@ -55,7 +55,7 @@ public class MonitoringController extends BaseController {
55 55
     @RequestMapping(value = "/monitoring/token/{communityId}",method = RequestMethod.GET)
56 56
     public ResponseBean getMonitoringToken(@PathVariable("communityId") Integer communityId,
57 57
                                 @RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
58
-                                @RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
58
+                                @RequestParam(value = "pageSize",defaultValue = "100") Integer pageSize){
59 59
         ResponseBean response = new ResponseBean();
60 60
         if (!check(communityId)) {
61 61
             response.addError("小区不存在");

+ 1
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java Wyświetl plik

@@ -148,7 +148,7 @@ public class TicketController extends BaseController {
148 148
     @ApiOperation(value = "添加报修", notes = "添加报修")
149 149
     @ApiImplicitParams({
150 150
             @ApiImplicitParam(paramType = "body", dataType = "String", name = "paramets", value =
151
-                    "ticketTitle:工单内容,ticketContent:小区标题,repairType:0:公共区域  1: 房屋质量  2:户内设施, imageUrl:图片地址 "),
151
+                    "ticketTitle:工单内容,ticketContent:小区标题,type: 0 代表 报修  1 代表 投诉  2代表 联系单 , repairType:0:公共区域  1: 房屋质量  2:户内设施, imageUrl:图片地址 "),
152 152
             @ApiImplicitParam(paramType = "header",dataType = "String",name = "X-Auth-Token",value = "Token")
153 153
     })
154 154
     @RequestMapping(value = "/addtpTicket", method = RequestMethod.POST)

+ 5
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TdImagesMapper.java Wyświetl plik

@@ -3,6 +3,9 @@ package com.community.huiju.dao;
3 3
 import com.community.huiju.model.TdImages;
4 4
 import org.apache.ibatis.annotations.Mapper;
5 5
 
6
+import java.util.List;
7
+import java.util.Map;
8
+
6 9
 @Mapper
7 10
 public interface TdImagesMapper {
8 11
     int deleteByPrimaryKey(Integer id);
@@ -16,4 +19,6 @@ public interface TdImagesMapper {
16 19
     int updateByPrimaryKeySelective(TdImages record);
17 20
 
18 21
     int updateByPrimaryKey(TdImages record);
22
+
23
+    List<TdImages> getByUUIDAndByType(Map<String,Object> map);
19 24
 }

+ 12
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicket.java Wyświetl plik

@@ -38,9 +38,12 @@ public class TpTicket {
38 38
     private Integer updateUser;
39 39
 
40 40
     private Date updateDate;
41
-    
41
+
42
+    private List<TdImages> tdImagesList;
43
+
42 44
     private List<TpTicketRecord> ticketRecordList;
43 45
 
46
+
44 47
     public Integer getId() {
45 48
         return id;
46 49
     }
@@ -176,4 +179,12 @@ public class TpTicket {
176 179
     public void setTicketRecordList(List<TpTicketRecord> ticketRecordList) {
177 180
         this.ticketRecordList = ticketRecordList;
178 181
     }
182
+
183
+    public List<TdImages> getTdImagesList() {
184
+        return tdImagesList;
185
+    }
186
+
187
+    public void setTdImagesList(List<TdImages> tdImagesList) {
188
+        this.tdImagesList = tdImagesList;
189
+    }
179 190
 }

+ 29
- 8
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java Wyświetl plik

@@ -122,6 +122,17 @@ public class TicketServiceImpl implements ITicketService {
122 122
             // 设置工单编号
123 123
             lastRecordMap.put("tickerId", e.getId());
124 124
             TpTicketRecordComment comment = getTicketRecordComment(lastRecordMap);
125
+            List<TpTicketRecord> recordList = tpTicketRecordMapper.getTicketRecordByTicketId(e.getCommunityId()+"",e.getId());
126
+            // 报修类型:0:公共区域  1: 房屋质量  2::户内设施  PS : 报修的情况下才有报修类型
127
+            String repairType = e.getRepairType();
128
+            String repairName = repairType == null?
129
+                    null:"0".equals(repairType)?
130
+                    "公共区域":"1".equals(repairType)?
131
+                    "房屋质量":"2".equals(repairType)?
132
+                    "户内设施":null;
133
+            tpTicketVO.setRepairName(repairName);
134
+            tpTicketVO.setStatus(recordList.get(0).getStatus());
135
+            tpTicketVO.setTicketStatusName(recordList.get(0).getTicketStatusName());
125 136
             if (null != comment) {
126 137
                 tpTicketVO.setCommentContent(comment.getContent());
127 138
                 tpTicketVO.setCommentCreateDate(comment.getCreateDate());
@@ -176,7 +187,15 @@ public class TicketServiceImpl implements ITicketService {
176 187
                 List<TpTicketRecordComment> ticketRecordCommentList = tpTicketRecordCommentMapper.selectByTicketRecordId(TpTicketRecord);
177 188
                 TpTicketRecord.setTicketRecordCommentList(ticketRecordCommentList);
178 189
             });
190
+
191
+            Map<String,Object> map = Maps.newHashMap();
192
+            map.put("uuid",ticket.getId());
193
+            map.put("type","service");
194
+            List<TdImages> tdImagesList = tdImagesMapper.getByUUIDAndByType(map);
195
+
196
+            ticket.setTdImagesList(tdImagesList);
179 197
             ticket.setTicketRecordList(ticketRecordList);
198
+
180 199
         }
181 200
         return ticket;
182 201
     }
@@ -185,26 +204,21 @@ public class TicketServiceImpl implements ITicketService {
185 204
     public ResponseBean addAiTicketService(Integer userId, String parameter) throws IOException {
186 205
         ResponseBean response = new ResponseBean();
187 206
         JSONObject jsonObject = JSONObject.parseObject(parameter);
188
-        String ticketContent = (String) jsonObject.get("ticketContent");
189
-        String ticketTitle = (String) jsonObject.get("ticketTitle");
190
-        String repairType = (String) jsonObject.get("repairType");
191 207
         String imageUrl = (String) jsonObject.get("imageUrl");
192 208
 
209
+
210
+        TpTicket tpTicket = JSONObject.parseObject(parameter,TpTicket.class);
211
+
193 212
         TaUser user = taUserMapper.selectByPrimaryKey(userId);
194 213
 
195
-        TpTicket tpTicket=new TpTicket();
196 214
         tpTicket.setCommunityId(user.getCommunityId());
197 215
         tpTicket.setTaUserId(userId);
198 216
         tpTicket.setStatus("2");
199
-        tpTicket.setRepairType(repairType);
200
-        tpTicket.setTicketTitle(ticketTitle);
201
-        tpTicket.setTicketContent(ticketContent);
202 217
         tpTicket.setCreateUser(userId);
203 218
         tpTicket.setCreateDate(new Date());
204 219
         tpTicket.setUpdateUser(userId);
205 220
         tpTicket.setUpdateDate(new Date());
206 221
 
207
-
208 222
         tpTicketMapper.insertSelective(tpTicket);
209 223
         insertTdImage(tpTicket, imageUrl, userId);
210 224
 
@@ -223,6 +237,13 @@ public class TicketServiceImpl implements ITicketService {
223 237
         return response;
224 238
     }
225 239
 
240
+    /**
241
+     * 存入图片
242
+     * @param tpTicket
243
+     * @param imageUrl
244
+     * @param userId
245
+     * @throws IOException
246
+     */
226 247
     private void insertTdImage(TpTicket tpTicket, String imageUrl, Integer userId) throws IOException {
227 248
         TdImages tdImages = new TdImages();
228 249
         Integer uuId = tpTicket.getId();

+ 14
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java Wyświetl plik

@@ -39,8 +39,22 @@ public class TpTicketVO {
39 39
 
40 40
     private Date updateDate;
41 41
 
42
+    /** 报修类型:0:公共区域  1: 房屋质量  2::户内设施  PS : 报修的情况下才有报修类型  **/
43
+    private String repairType;
44
+
45
+    /**
46
+     * 报修类型的名字
47
+     */
48
+    private String repairName;
49
+
42 50
     /** ====================================== **/
43 51
 
52
+    /** 流程状态 **/
53
+    private String status;
54
+
55
+    /** 流程状态名称 **/
56
+    private String ticketStatusName;
57
+
44 58
     /** 最新进展 **/
45 59
     private String commentContent;
46 60
 

+ 9
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TdImagesMapper.xml Wyświetl plik

@@ -103,4 +103,13 @@
103 103
       create_time = #{createTime,jdbcType=TIMESTAMP}
104 104
     where id = #{id,jdbcType=INTEGER}
105 105
   </update>
106
+
107
+  <select id="getByUUIDAndByType" parameterType="map" resultMap="BaseResultMap">
108
+    select
109
+    <include refid="Base_Column_List" />
110
+    from td_images
111
+    where uuid = #{uuid,jdbcType=INTEGER} and type = #{type,jdbcType=CHAR}
112
+    order by create_time DESC
113
+  </select>
114
+
106 115
 </mapper>

+ 2
- 2
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordCommentMapper.xml Wyświetl plik

@@ -154,8 +154,8 @@
154 154
   <select id="selectByTicketId" parameterType="map" resultMap="BaseResultMap" >
155 155
     select ttrc.* from tp_ticket tp
156 156
                 inner join tp_ticket_record ttr on tp.id = ttr.ticket_id
157
-                inner join tp_ticket_record_comment ttrc on ttr.ticket_id = ttrc.ticket_record_id
158
-    where tp.id=#{ticketId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
157
+                inner join tp_ticket_record_comment ttrc on ttr.id = ttrc.ticket_record_id
158
+    where tp.id=#{tickerId,jdbcType=INTEGER} order by ttrc.create_date DESC LIMIT #{size,jdbcType=INTEGER}
159 159
   </select>
160 160
 
161 161
   <select id="selectByTicketRecordId" parameterType="com.community.huiju.model.TpTicketRecord" resultMap="BaseResultMap" >

+ 2
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml Wyświetl plik

@@ -108,6 +108,7 @@
108 108
   <select id="getTicketRecordByTicketId" resultType="com.community.huiju.model.TpTicketRecord">
109 109
     SELECT
110 110
         t.id,
111
+        t.status,
111 112
         t.ticket_id AS ticketId,
112 113
         t.community_id AS communityId,
113 114
         d.NAME AS ticketStatusName
@@ -118,6 +119,6 @@
118 119
     WHERE
119 120
         community_id = #{communityId,jdbcType=INTEGER}
120 121
         AND ticket_id = #{ticketId,jdbcType=INTEGER}
121
-
122
+    order by t.create_date DESC
122 123
   </select>
123 124
 </mapper>

BIN
CODE/smart-community/community-common/target/community-common-0.0.1.jar Wyświetl plik


+ 0
- 4
CODE/smart-community/community-common/target/maven-archiver/pom.properties Wyświetl plik

@@ -1,4 +0,0 @@
1
-#Created by Apache Maven 3.3.9
2
-version=0.0.1
3
-groupId=com.community
4
-artifactId=community-common

+ 0
- 28
CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst Wyświetl plik

@@ -1,28 +0,0 @@
1
-com\community\commom\redis\RedisTemplate.class
2
-com\community\commom\redis\RedisConfiguration.class
3
-com\community\commom\utils\OssUtil.class
4
-com\community\commom\redis\SingleRedisTemplate.class
5
-com\community\commom\utils\EnumUtils.class
6
-com\community\commom\hk\HttpClientSSLUtils$2.class
7
-com\community\commom\redis\RedisJsonSerializer.class
8
-com\community\commom\utils\BeanTools.class
9
-com\community\commom\hk\HttpClientSSLUtils.class
10
-com\community\commom\session\UserElement.class
11
-com\community\commom\utils\CommonUtils.class
12
-com\community\commom\redis\RedisSerializer.class
13
-com\community\commom\utils\StringConverter.class
14
-com\community\commom\mode\ResponseBean.class
15
-com\community\commom\utils\DESUtils.class
16
-com\community\commom\redis\FastJsonSerializer.class
17
-com\community\commom\utils\DateUtils.class
18
-com\community\commom\utils\HttpClientUtils.class
19
-com\community\commom\constant\Constant.class
20
-com\community\commom\utils\CookieUtil.class
21
-com\community\commom\ailiyun\AESDecode.class
22
-com\community\commom\hk\HttpClientSSLUtils$1.class
23
-com\community\commom\utils\MD5Utils.class
24
-com\community\commom\redis\RedisObjectSerializer.class
25
-com\community\commom\utils\QRCodeGeneratorUtils.class
26
-com\community\commom\redis\SerializationFailedException.class
27
-com\community\commom\hk\Digests.class
28
-com\community\commom\utils\AccountValidatorUtil.class

+ 0
- 26
CODE/smart-community/community-common/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst Wyświetl plik

@@ -1,26 +0,0 @@
1
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\QRCodeGeneratorUtils.java
2
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\OssUtil.java
3
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisObjectSerializer.java
4
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\session\UserElement.java
5
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\CookieUtil.java
6
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\SerializationFailedException.java
7
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\EnumUtils.java
8
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\constant\Constant.java
9
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\mode\ResponseBean.java
10
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisSerializer.java
11
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisTemplate.java
12
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\ailiyun\AESDecode.java
13
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisConfiguration.java
14
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\SingleRedisTemplate.java
15
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\HttpClientUtils.java
16
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\DateUtils.java
17
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\hk\Digests.java
18
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\BeanTools.java
19
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\MD5Utils.java
20
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\CommonUtils.java
21
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\StringConverter.java
22
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\AccountValidatorUtil.java
23
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\RedisJsonSerializer.java
24
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\redis\FastJsonSerializer.java
25
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\utils\DESUtils.java
26
-E:\weiximei\git\smartCommunity\CODE\smart-community\community-common\src\main\java\com\community\commom\hk\HttpClientSSLUtils.java