Sfoglia il codice sorgente

Merge branch 'develop' of http://git.ycjcjy.com/fuxingfan/smartCommunity into develop

# Conflicts:
#	CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class
傅行帆 6 anni fa
parent
commit
2c56413caa
26 ha cambiato i file con 409 aggiunte e 12 eliminazioni
  1. 1
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/controller/TicketController.java
  2. 5
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java
  3. 8
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/TicketServiceImpl.java
  4. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/RecordCommentVO.java
  5. 1
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java
  6. 2
    10
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketInfoVO.java
  7. 43
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordCommentVO.java
  8. 35
    0
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordVO.java
  9. 2
    1
      CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java
  10. 2
    0
      CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml
  11. 7
    0
      CODE/smart-community/community-common/pom.xml
  12. 11
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/CodeEnum.java
  13. 46
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TaUserVerifyStatusEnum.java
  14. 45
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketRepairTypeEnum.java
  15. 53
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketStatusEnum.java
  16. 42
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketTypeEnum.java
  17. 39
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketUserTypeEnum.java
  18. 24
    0
      CODE/smart-community/community-common/src/main/java/com/community/commom/utils/EnumUtils.java
  19. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class
  20. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/CodeEnum.class
  21. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TaUserVerifyStatusEnum.class
  22. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketRepairTypeEnum.class
  23. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketStatusEnum.class
  24. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketTypeEnum.class
  25. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketUserTypeEnum.class
  26. BIN
      CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class

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

@@ -90,4 +90,5 @@ public class TicketController {
90 90
         return responseBean;
91 91
 
92 92
     }
93
+
93 94
 }

+ 5
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java Vedi File

@@ -6,6 +6,9 @@ import org.apache.ibatis.annotations.Param;
6 6
 
7 7
 import java.util.List;
8 8
 
9
+import java.util.List;
10
+import java.util.Map;
11
+
9 12
 @Mapper
10 13
 public interface TpTicketRecordMapper {
11 14
     int deleteByPrimaryKey(Integer id);
@@ -19,6 +22,7 @@ public interface TpTicketRecordMapper {
19 22
     int updateByPrimaryKeySelective(TpTicketRecord record);
20 23
 
21 24
     int updateByPrimaryKey(TpTicketRecord record);
22
-	
25
+
23 26
 	List<TpTicketRecord> getTicketRecordByTicketId(@Param("communityId") String communityId,@Param("ticketId") Integer ticketId);
27
+
24 28
 }

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

@@ -1,6 +1,10 @@
1 1
 package com.community.huiju.service.impl;
2 2
 
3
+import com.community.commom.constant.enums.TicketStatusEnum;
4
+import com.community.commom.constant.enums.TicketTypeEnum;
5
+import com.community.commom.constant.enums.TicketUserTypeEnum;
3 6
 import com.community.commom.mode.ResponseBean;
7
+import com.community.commom.utils.EnumUtils;
4 8
 import com.community.huiju.dao.TpTicketMapper;
5 9
 import com.community.huiju.dao.TpTicketRecordCommentMapper;
6 10
 import com.community.huiju.dao.TpTicketRecordMapper;
@@ -8,6 +12,9 @@ import com.community.huiju.model.TpTicket;
8 12
 import com.community.huiju.model.TpTicketRecord;
9 13
 import com.community.huiju.model.TpTicketRecordComment;
10 14
 import com.community.huiju.service.ITicketService;
15
+import com.community.huiju.vo.RecordCommentVO;
16
+import com.community.huiju.vo.TpTicketRecordCommentVO;
17
+import com.community.huiju.vo.TpTicketRecordVO;
11 18
 import com.community.huiju.vo.TpTicketVO;
12 19
 import com.github.pagehelper.PageHelper;
13 20
 import com.google.common.collect.Lists;
@@ -19,6 +26,7 @@ import org.springframework.stereotype.Service;
19 26
 
20 27
 import java.util.List;
21 28
 import java.util.Map;
29
+import java.util.stream.Collectors;
22 30
 
23 31
 /**
24 32
  * 工单业务 实现

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/RecordCommentVO.java Vedi File

@@ -0,0 +1,43 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.commom.constant.enums.TicketUserTypeEnum;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+import java.util.Date;
9
+
10
+/**
11
+ * 工单处理
12
+ *
13
+ *     回复/追问 数据
14
+ *
15
+ * @author weiximei
16
+ */
17
+@Data
18
+@AllArgsConstructor
19
+@NoArgsConstructor
20
+public class RecordCommentVO {
21
+
22
+    /** 编号 **/
23
+    private Integer id;
24
+
25
+    /** 追问人id(tp_user_id也就是物业用户)  或者是 发起人id(ta_user_id也就是住户app的id) **/
26
+    private Integer uuid;
27
+
28
+    /** 对应上面 uuid 的 用户姓名 **/
29
+    private String userName;
30
+
31
+    /** 用户类型 追问人/发起人 **/
32
+    private String userType;
33
+
34
+    /** 追问内容 或者 回复记录 **/
35
+    private String content;
36
+
37
+    /** 回复的是哪一条记录, 0表示当前(比如 待分配 等状态)状态下第一条 **/
38
+    private Integer parentId;
39
+
40
+    /** 创建时间 **/
41
+    private Date createDate;
42
+
43
+}

+ 1
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TaUserVO.java Vedi File

@@ -5,6 +5,7 @@ import lombok.Data;
5 5
 import lombok.NoArgsConstructor;
6 6
 
7 7
 /**
8
+ * 用户数据
8 9
  * @author weiximei
9 10
  */
10 11
 @Data

+ 2
- 10
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketInfoVO.java Vedi File

@@ -7,6 +7,8 @@ import lombok.NoArgsConstructor;
7 7
 import java.util.Date;
8 8
 
9 9
 /**
10
+ * 工单不包含所有的 答复 记录
11
+ * 只包含最新的 答复和答复时间
10 12
  * @author weiximei
11 13
  */
12 14
 @Data
@@ -24,16 +26,6 @@ public class TpTicketInfoVO extends TpTicketVO {
24 26
     /** 报修类型 0:公共区域  1: 房屋质量  2::户内设施   **/
25 27
     private String repairType;
26 28
 
27
-    private String ticketMatchImg1;
28
-
29
-    private String ticketMatchImg2;
30
-
31
-    private String ticketMatchImg3;
32
-
33
-    private String ticketMatchImg4;
34
-
35
-    private String ticketMatchImg5;
36
-
37 29
     /** 评分 **/
38 30
     private String score;
39 31
 

+ 43
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordCommentVO.java Vedi File

@@ -0,0 +1,43 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.commom.constant.enums.TicketTypeEnum;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+import java.util.Date;
9
+import java.util.List;
10
+
11
+/**
12
+ * 工单包含 答复记录
13
+ * @author weiximei
14
+ */
15
+@Data
16
+@AllArgsConstructor
17
+@NoArgsConstructor
18
+public class TpTicketRecordCommentVO {
19
+
20
+    /** 编号 **/
21
+    private Integer id;
22
+
23
+    /** 小区编号 **/
24
+    private Integer communityId;
25
+
26
+    /** 用户app的id **/
27
+    private Integer taUserId;
28
+
29
+    /** ================================ **/
30
+
31
+    /** 工单标题 **/
32
+    private String ticketTitle;
33
+
34
+    /** 类型 报修/投诉/联系单 **/
35
+    private String type;
36
+
37
+    /** 工单 创建时间 **/
38
+    private Date createDate;
39
+
40
+    /** 待分配,已分配等记录 集合 **/
41
+    List<TpTicketRecordVO> content;
42
+
43
+}

+ 35
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketRecordVO.java Vedi File

@@ -0,0 +1,35 @@
1
+package com.community.huiju.vo;
2
+
3
+import com.community.commom.constant.enums.TicketStatusEnum;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Data;
6
+import lombok.NoArgsConstructor;
7
+
8
+import java.util.Date;
9
+import java.util.List;
10
+
11
+/**
12
+ * 工单 处理记录
13
+ *
14
+ *  比如 待分配,已分配等记录
15
+ *
16
+ * @author weiximei
17
+ */
18
+@Data
19
+@AllArgsConstructor
20
+@NoArgsConstructor
21
+public class TpTicketRecordVO {
22
+
23
+    /** 工单处理ID **/
24
+    private Integer id;
25
+
26
+    /** 工单记录 流转状态 **/
27
+    private String status;
28
+
29
+    /** 创建时间 **/
30
+    private Date createDate;
31
+
32
+    /** 回复/追问 记录 集合 **/
33
+    private List<RecordCommentVO> comments;
34
+
35
+}

+ 2
- 1
CODE/smart-community/app-api/src/main/java/com/community/huiju/vo/TpTicketVO.java Vedi File

@@ -7,6 +7,7 @@ import lombok.NoArgsConstructor;
7 7
 import java.util.Date;
8 8
 
9 9
 /**
10
+ * 工单列表数据
10 11
  * @author weiximei
11 12
  */
12 13
 @Data
@@ -20,7 +21,7 @@ public class TpTicketVO {
20 21
     /** 小区编号 **/
21 22
     private Integer communityId;
22 23
 
23
-    /** 用户appd的id **/
24
+    /** 用户app的id **/
24 25
     private Integer taUserId;
25 26
 
26 27
     /** ================================ **/

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordMapper.xml Vedi File

@@ -104,6 +104,7 @@
104 104
     where id = #{id,jdbcType=INTEGER}
105 105
   </update>
106 106
 
107
+
107 108
   <select id="getTicketRecordByTicketId" resultType="com.community.huiju.model.TpTicketRecord">
108 109
     SELECT
109 110
         t.id,
@@ -117,5 +118,6 @@
117 118
     WHERE
118 119
         community_id = #{communityId,jdbcType=INTEGER}
119 120
         AND ticket_id = #{ticketId,jdbcType=INTEGER}
121
+
120 122
   </select>
121 123
 </mapper>

+ 7
- 0
CODE/smart-community/community-common/pom.xml Vedi File

@@ -66,6 +66,13 @@
66 66
             <artifactId>core</artifactId>
67 67
             <version>3.2.1</version>
68 68
         </dependency>
69
+        <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
70
+        <dependency>
71
+            <groupId>org.projectlombok</groupId>
72
+            <artifactId>lombok</artifactId>
73
+            <version>1.18.2</version>
74
+            <scope>provided</scope>
75
+        </dependency>
69 76
         <dependency>
70 77
             <groupId>com.google.zxing</groupId>
71 78
             <artifactId>javase</artifactId>

+ 11
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/CodeEnum.java Vedi File

@@ -0,0 +1,11 @@
1
+package com.community.commom.constant.enums;
2
+
3
+/**
4
+ * 公共接口
5
+ * @author weiximei
6
+ */
7
+public interface CodeEnum {
8
+
9
+    Integer getCode();
10
+
11
+}

+ 46
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TaUserVerifyStatusEnum.java Vedi File

@@ -0,0 +1,46 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.AllArgsConstructor;
5
+import lombok.Getter;
6
+
7
+/**
8
+ * app用户  认证状态
9
+ *
10
+ * 认证状态  0 是未认证    1是认证通过   2是已作废
11
+ *
12
+ * @author weiximei
13
+ */
14
+@Getter
15
+public enum  TaUserVerifyStatusEnum implements CodeEnum {
16
+
17
+    UNAUTHORIZED(0,"未认证"),
18
+
19
+    CERTIFICATION_BY(1,"认证通过"),
20
+
21
+    THE_CANCELLATION(2,"已作废"),
22
+
23
+    ;
24
+
25
+    private Integer code;
26
+
27
+    private String comments;
28
+
29
+    TaUserVerifyStatusEnum(Integer code, String comments) {
30
+        this.code = code;
31
+        this.comments = comments;
32
+    }
33
+
34
+    /**
35
+     * 重写toString,单个转化成json
36
+     * @return
37
+     */
38
+    @Override
39
+    public String toString() {
40
+        JSONObject object = new JSONObject();
41
+        object.put("code",code);
42
+        object.put("comments",comments);
43
+        return object.toString();
44
+    }
45
+
46
+}

+ 45
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketRepairTypeEnum.java Vedi File

@@ -0,0 +1,45 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 工单 报修类型
8
+ *
9
+ * 0:公共区域  1: 房屋质量  2::户内设施  PS : 报修的情况下才有报修类型
10
+ *
11
+ * @author weiximei
12
+ */
13
+@Getter
14
+public enum  TicketRepairTypeEnum implements CodeEnum {
15
+
16
+    THE_PUBLIC_AREAS(0,"公共区域"),
17
+
18
+    BUILDING_QUALITY(1,"房子质量"),
19
+
20
+    INDOOR_FACILITIES(2,"户内设施"),
21
+
22
+    ;
23
+
24
+    private Integer code;
25
+
26
+    private String comments;
27
+
28
+    TicketRepairTypeEnum(Integer code, String comments) {
29
+        this.code = code;
30
+        this.comments = comments;
31
+    }
32
+
33
+    /**
34
+     * 重写toString,单个转化成json
35
+     * @return
36
+     */
37
+    @Override
38
+    public String toString() {
39
+        JSONObject object = new JSONObject();
40
+        object.put("code",code);
41
+        object.put("comments",comments);
42
+        return object.toString();
43
+    }
44
+
45
+}

+ 53
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketStatusEnum.java Vedi File

@@ -0,0 +1,53 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 工单 流转状态
8
+ *
9
+ *  0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:被终止
10
+ *
11
+ * @author weiximei
12
+ */
13
+@Getter
14
+public enum TicketStatusEnum implements CodeEnum {
15
+
16
+    TO_BE_DISTRIBUTED(0,"待分配"),
17
+
18
+    REFUSED_TO_ACCEPT(1,"拒绝受理"),
19
+
20
+    TO_BE_PROCESSED(2,"待处理"),
21
+
22
+    ARE_DEALING_WITH(3,"正在处理"),
23
+
24
+    TO_EVALUATE(4,"待评价"),
25
+
26
+    HAVE_EVALUATION(5,"已评价"),
27
+
28
+    BE_TERMINATED(6,"被终止"),
29
+
30
+    ;
31
+
32
+    private Integer code;
33
+
34
+    private String comments;
35
+
36
+    TicketStatusEnum(Integer code, String comments) {
37
+        this.code = code;
38
+        this.comments = comments;
39
+    }
40
+
41
+    /**
42
+     * 重写toString,单个转化成json
43
+     * @return
44
+     */
45
+    @Override
46
+    public String toString() {
47
+        JSONObject object = new JSONObject();
48
+        object.put("code",code);
49
+        object.put("comments",comments);
50
+        return object.toString();
51
+    }
52
+
53
+}

+ 42
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketTypeEnum.java Vedi File

@@ -0,0 +1,42 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 工单类型
8
+ * @author weiximei
9
+ */
10
+@Getter
11
+public enum TicketTypeEnum implements CodeEnum {
12
+
13
+    REPAIRS(0,"报修"),
14
+
15
+    COMPLAINT(1,"投诉"),
16
+
17
+    LIAISON(2,"联系单"),
18
+
19
+    ;
20
+
21
+    private Integer code;
22
+
23
+    private String comments;
24
+
25
+    TicketTypeEnum(Integer code, String comments) {
26
+        this.code = code;
27
+        this.comments = comments;
28
+    }
29
+
30
+
31
+    /**
32
+     * 重写toString,单个转化成json
33
+     * @return
34
+     */
35
+    @Override
36
+    public String toString() {
37
+        JSONObject object = new JSONObject();
38
+        object.put("code",code);
39
+        object.put("comments",comments);
40
+        return object.toString();
41
+    }
42
+}

+ 39
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/constant/enums/TicketUserTypeEnum.java Vedi File

@@ -0,0 +1,39 @@
1
+package com.community.commom.constant.enums;
2
+
3
+import com.alibaba.fastjson.JSONObject;
4
+import lombok.Getter;
5
+
6
+/**
7
+ * 追问表 用户类型
8
+ * @author weiximei
9
+ */
10
+@Getter
11
+public enum TicketUserTypeEnum implements CodeEnum {
12
+
13
+    ASK_A_PERSON(0,"追问人"),
14
+
15
+    THE_ORIGINATOR(1,"发起人"),
16
+    ;
17
+
18
+    private Integer code;
19
+
20
+    private String comments;
21
+
22
+    TicketUserTypeEnum(Integer code, String comments) {
23
+        this.code = code;
24
+        this.comments = comments;
25
+    }
26
+
27
+    /**
28
+     * 重写toString,单个转化成json
29
+     * @return
30
+     */
31
+    @Override
32
+    public String toString() {
33
+        JSONObject object = new JSONObject();
34
+        object.put("code",code);
35
+        object.put("comments",comments);
36
+        return object.toString();
37
+    }
38
+
39
+}

+ 24
- 0
CODE/smart-community/community-common/src/main/java/com/community/commom/utils/EnumUtils.java Vedi File

@@ -1,5 +1,8 @@
1 1
 package com.community.commom.utils;
2 2
 
3
+import com.community.commom.constant.enums.CodeEnum;
4
+import com.community.commom.constant.enums.TicketRepairTypeEnum;
5
+
3 6
 import java.lang.reflect.InvocationTargetException;
4 7
 import java.lang.reflect.Method;
5 8
 import java.util.Arrays;
@@ -117,4 +120,25 @@ public class EnumUtils {
117 120
         }
118 121
         return enumConstants;
119 122
     }
123
+
124
+
125
+    /**
126
+     * 获取枚举类型
127
+     *
128
+     * @param code
129
+     * @param enumClass
130
+     * @param <T>
131
+     * @return
132
+     */
133
+    public static <T extends CodeEnum> T getByCode(Integer code,Class<T> enumClass){
134
+        for (T each:enumClass.getEnumConstants()){
135
+            if (code.equals(each.getCode())){
136
+                return each;
137
+            }
138
+        }
139
+
140
+        return null;
141
+    }
142
+
143
+
120 144
 }

BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/Constant.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/CodeEnum.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TaUserVerifyStatusEnum.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketRepairTypeEnum.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketStatusEnum.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketTypeEnum.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/constant/enums/TicketUserTypeEnum.class Vedi File


BIN
CODE/smart-community/community-common/target/classes/com/community/commom/utils/EnumUtils.class Vedi File