dingxin преди 6 години
родител
ревизия
2391e3cba7
променени са 14 файла, в които са добавени 398 реда и са изтрити 28 реда
  1. 50
    3
      CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpTicketController.java
  2. 5
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java
  3. 8
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java
  4. 8
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java
  5. 2
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpTicketRecord.java
  6. 5
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java
  7. 36
    1
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/TpTicketService.java
  8. 159
    7
      CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpTicketServiceImpl.java
  9. 40
    0
      CODE/smart-community/property-api/src/main/java/com/community/huiju/vo/TpTicketVO.java
  10. 25
    3
      CODE/smart-community/property-api/src/main/resources/mapper/TpTicketMapper.xml
  11. 32
    2
      CODE/smart-community/property-api/src/main/resources/mapper/TpTicketRecordMapper.xml
  12. 16
    0
      CODE/smart-community/property-api/src/main/resources/mapper/UserMapper.xml
  13. 3
    1
      VUECODE/smart-property-manage/src/api/ticket.js
  14. 9
    9
      VUECODE/smart-property-manage/src/views/ticket/index.vue

+ 50
- 3
CODE/smart-community/property-api/src/main/java/com/community/huiju/controller/TpTicketController.java Целия файл

@@ -44,11 +44,58 @@ public class TpTicketController extends BaseController {
44 44
                     "status:流转状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止')" +
45 45
                     "tpUserId:当前处理人" )
46 46
     })
47
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
47 48
     @RequestMapping(value = "/ticketLiset", method = RequestMethod.POST)
48
-    public ResponseBean addUser(@RequestBody String parameter, HttpSession session){
49
-//        UserElement userElement = getUserElement(session);
50
-        ResponseBean  responseBean = tpTicketService.ticketLiset(parameter);
49
+    public ResponseBean ticketLiset(@RequestBody String parameter, HttpSession session){
50
+        UserElement userElement = getUserElement(session);
51
+        ResponseBean  responseBean = tpTicketService.ticketLiset(parameter,userElement.getCommunityId());
51 52
         return responseBean;
52 53
     }
53 54
 
55
+    @ApiOperation(value = "工单详情", notes = "工单详情")
56
+    @ApiImplicitParams({
57
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "id:工单编号")
58
+    })
59
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
60
+    @RequestMapping(value = "/ticketDetails", method = RequestMethod.POST)
61
+    public ResponseBean ticketDetails(@RequestBody String parameter, HttpSession session){
62
+        UserElement userElement = getUserElement(session);
63
+        ResponseBean  responseBean = tpTicketService.ticketDetails(parameter,userElement.getId(),userElement.getCommunityId());
64
+        return responseBean;
65
+    }
66
+    @ApiOperation(value = "添加工单对话", notes = "添加工单对话")
67
+    @ApiImplicitParams({
68
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "content:对话内容,imageUrl:[]图片,ticketId:工单id," +
69
+                    "status:工单状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止)")
70
+    })
71
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
72
+    @RequestMapping(value = "/addRecordComment", method = RequestMethod.POST)
73
+    public ResponseBean addRecordComment(@RequestBody String parameter, HttpSession session){
74
+        UserElement userElement = getUserElement(session);
75
+        ResponseBean  responseBean = tpTicketService.addRecordComment(parameter,userElement.getId(),userElement.getCommunityId(),userElement.getUserName());
76
+        return responseBean;
77
+    }
78
+    @ApiOperation(value = "工单受理分配", notes = "工单受理分配")
79
+    @ApiImplicitParams({
80
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "ticketId:工单id," +
81
+                    "status:工单状态(0:待分配  1:拒绝受理 2:待处理 3:正在处理 4:待评价 5:已评价 6:已终止),currentId:当前分配处理人Id")
82
+    })
83
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
84
+    @RequestMapping(value = "/addRecord", method = RequestMethod.POST)
85
+    public ResponseBean addRecord(@RequestBody String parameter, HttpSession session){
86
+        UserElement userElement = getUserElement(session);
87
+        ResponseBean  responseBean = tpTicketService.addRecord(parameter,userElement.getId(),userElement.getCommunityId());
88
+        return responseBean;
89
+    }
90
+    @ApiOperation(value = "修改工单状态为拒绝处理", notes = "修改工单状态为拒绝处理")
91
+    @ApiImplicitParams({
92
+            @ApiImplicitParam(paramType = "body",dataType = "String",name = "parameter",value = "ticketId:工单id" )
93
+    })
94
+    @ApiImplicitParam(paramType = "header", dataTypeClass = String.class, name = "X-Auth-Token", value = "token")
95
+    @RequestMapping(value = "/updateTicketStatus", method = RequestMethod.POST)
96
+    public ResponseBean updateTicketStatus(@RequestBody String parameter, HttpSession session){
97
+        UserElement userElement = getUserElement(session);
98
+        ResponseBean  responseBean = tpTicketService.updateTicketStatus(parameter,userElement.getId());
99
+        return responseBean;
100
+    }
54 101
 }

+ 5
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpTicketMapper.java Целия файл

@@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.baomidou.mybatisplus.core.metadata.IPage;
5 5
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 6
 import com.community.huiju.model.TpTicket;
7
+import com.community.huiju.vo.TpTicketVO;
7 8
 import org.apache.ibatis.annotations.Mapper;
8 9
 import org.apache.ibatis.annotations.Param;
9 10
 
11
+import java.util.List;
12
+
10 13
 /**
11 14
  * <p>
12 15
  * 工单表 Mapper 接口
@@ -18,5 +21,6 @@ import org.apache.ibatis.annotations.Param;
18 21
 @Mapper
19 22
 public interface TpTicketMapper extends BaseMapper<TpTicket> {
20 23
 
21
-    IPage<TpTicket> ticketList(Page page, @Param("ticket")TpTicket ticket ,@Param("UserNmae") String UserNmae,@Param("updateUserNmae") String updateUserNmae);
24
+    IPage<TpTicket> ticketList(Page page, @Param("ticket")TpTicket ticket ,@Param("UserNmae") String UserNmae,@Param("updateUserNmae") String updateUserNmae,@Param("communityId") Integer communityId);
25
+    TpTicketVO ticketDetails(@Param("id") Integer id);
22 26
 }

+ 8
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/TpTicketRecordMapper.java Целия файл

@@ -2,6 +2,7 @@ package com.community.huiju.dao;
2 2
 
3 3
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
4 4
 import com.community.huiju.model.TpTicketRecord;
5
+import org.apache.ibatis.annotations.Param;
5 6
 
6 7
 /**
7 8
  * <p>
@@ -13,4 +14,11 @@ import com.community.huiju.model.TpTicketRecord;
13 14
  */
14 15
 public interface TpTicketRecordMapper extends BaseMapper<TpTicketRecord> {
15 16
 
17
+    TpTicketRecord selectTpTicketRecord(@Param("ticketId") Integer ticketId, @Param("status") Integer status);
18
+
19
+    /**
20
+     * 在状态为待分配的情况下根据工单ID修改
21
+     * @param tpTicketRecord
22
+     */
23
+    void updateTicketRecord(TpTicketRecord tpTicketRecord);
16 24
 }

+ 8
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/dao/UserMapper.java Целия файл

@@ -60,4 +60,12 @@ public interface UserMapper extends BaseMapper<User> {
60 60
      * @return
61 61
      */
62 62
     List<Map<String, Object>> selectByPermissionList(@Param("array") List<String> permissionList);
63
+
64
+    /**
65
+     * 获取所有物业人员并排除自身
66
+     * @param id
67
+     * @param communityId
68
+     * @return
69
+     */
70
+    List<User> getUser(@Param("id") Integer id, @Param("communityId") Integer communityId);
63 71
 }

+ 2
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpTicketRecord.java Целия файл

@@ -23,6 +23,8 @@ public class TpTicketRecord implements Serializable {
23 23
 
24 24
     private static final long serialVersionUID = 1L;
25 25
 
26
+    private Integer id;
27
+
26 28
     /**
27 29
      * 小区id
28 30
      */
@@ -53,5 +55,4 @@ public class TpTicketRecord implements Serializable {
53 55
      */
54 56
     private LocalDateTime createDate;
55 57
 
56
-
57 58
 }

+ 5
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java Целия файл

@@ -1,5 +1,7 @@
1 1
 package com.community.huiju.model;
2 2
 
3
+import com.baomidou.mybatisplus.annotation.IdType;
4
+import com.baomidou.mybatisplus.annotation.TableId;
3 5
 import com.baomidou.mybatisplus.annotation.TableName;
4 6
 import java.time.LocalDateTime;
5 7
 import java.io.Serializable;
@@ -23,6 +25,9 @@ public class TpTicketRecordComment implements Serializable {
23 25
 
24 26
     private static final long serialVersionUID = 1L;
25 27
 
28
+    @TableId(value = "id", type = IdType.AUTO)
29
+    private  Integer id;
30
+
26 31
     /**
27 32
      * 小区id
28 33
      */

+ 36
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/TpTicketService.java Целия файл

@@ -17,7 +17,42 @@ public interface TpTicketService extends IService<TpTicket> {
17 17
     /**
18 18
      * 工单列表
19 19
      * @param parameter
20
+     * @param communityId
20 21
      * @return
21 22
      */
22
-    ResponseBean ticketLiset(String parameter);
23
+    ResponseBean ticketLiset(String parameter,Integer communityId);
24
+
25
+    /**
26
+     * 工单详情
27
+     * @param parameter
28
+     * @return
29
+     */
30
+    ResponseBean ticketDetails(String parameter,Integer userID,Integer communityId);
31
+
32
+    /**
33
+     * 添加工单回复
34
+     * @param parameter
35
+     * @param id
36
+     * @param communityId
37
+     * @param userName
38
+     * @return
39
+     */
40
+    ResponseBean addRecordComment(String parameter, Integer id,Integer communityId,String userName);
41
+
42
+    /**
43
+     * 添加工单分配受理
44
+     * @param parameter
45
+     * @param id
46
+     * @param communityId
47
+     * @return
48
+     */
49
+    ResponseBean addRecord(String parameter, Integer id, Integer communityId);
50
+
51
+    /**
52
+     * 修改工单状态为拒绝处理
53
+     * @param parameter
54
+     * @param id
55
+     * @return
56
+     */
57
+    ResponseBean updateTicketStatus(String parameter, Integer id);
23 58
 }

+ 159
- 7
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TpTicketServiceImpl.java Целия файл

@@ -1,20 +1,20 @@
1 1
 package com.community.huiju.service.impl;
2
+import com.alibaba.fastjson.JSONArray;
2 3
 import com.alibaba.fastjson.JSONObject;
4
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
3 5
 import com.baomidou.mybatisplus.core.metadata.IPage;
4 6
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
5 7
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
6 8
 import com.community.commom.mode.ResponseBean;
7
-import com.community.huiju.dao.TpTicketMapper;
8
-import com.community.huiju.dao.UserMapper;
9
-import com.community.huiju.model.TpBuildingOwnerInfo;
10
-import com.community.huiju.model.TpTicket;
11
-import com.community.huiju.model.User;
9
+import com.community.huiju.dao.*;
10
+import com.community.huiju.model.*;
12 11
 import com.community.huiju.service.TpTicketService;
13 12
 import com.community.huiju.vo.TpTicketVO;
14 13
 import org.springframework.beans.BeanUtils;
15 14
 import org.springframework.beans.factory.annotation.Autowired;
16 15
 import org.springframework.stereotype.Service;
17 16
 
17
+import java.time.LocalDateTime;
18 18
 import java.util.ArrayList;
19 19
 import java.util.HashMap;
20 20
 import java.util.List;
@@ -36,8 +36,17 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
36 36
 
37 37
     @Autowired
38 38
     private UserMapper userMapper;
39
+
40
+    @Autowired
41
+    private TdImagesMapper tdImagesMapper;
42
+
43
+    @Autowired
44
+    private TpTicketRecordMapper tpTicketRecordMapper;
45
+
46
+    @Autowired
47
+    private TpTicketRecordCommentMapper tpTicketRecordCommentMapper;
39 48
     @Override
40
-    public ResponseBean ticketLiset(String parameter) {
49
+    public ResponseBean ticketLiset(String parameter,Integer communityId) {
41 50
          ResponseBean response= new ResponseBean<>();
42 51
         TpTicket   ticket= JSONObject.parseObject(parameter, TpTicket.class);
43 52
 
@@ -50,7 +59,7 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
50 59
         Page<TpTicket> page = new Page<>();
51 60
         page.setSize(pageSize == null ? 10 : pageSize);
52 61
         page.setCurrent(pageNum == null ? 1 : pageNum);
53
-        IPage<TpTicket> pageInfo = tpTicketMapper.ticketList(page,ticket,UserNmae,updateUserNmae);
62
+        IPage<TpTicket> pageInfo = tpTicketMapper.ticketList(page,ticket,UserNmae,updateUserNmae,communityId);
54 63
         List<TpTicket> ticketList = pageInfo.getRecords();
55 64
 
56 65
         List<TpTicket> tpTicketArrayList= new ArrayList<>();
@@ -75,4 +84,147 @@ public class TpTicketServiceImpl extends ServiceImpl<TpTicketMapper, TpTicket> i
75 84
         response.addSuccess(map);
76 85
         return response;
77 86
     }
87
+
88
+    @Override
89
+    public ResponseBean ticketDetails(String parameter,Integer userID,Integer communityId) {
90
+         ResponseBean response= new ResponseBean();
91
+        JSONObject object= JSONObject.parseObject(parameter);
92
+        Integer ticketId = object.getInteger("id");
93
+        TpTicketVO ticketVO= tpTicketMapper.ticketDetails(ticketId);
94
+        /*查询当前工单创建人(发起人)*/
95
+        ticketVO.setCreateUserNmae(userMapper.selectByIdUserName(ticketVO.getCreateUser()));
96
+        /*发起人手机号码*/
97
+        ticketVO.setLoginName(userMapper.selectById(ticketVO.getCreateUser()).getLoginName());
98
+          /*查询当前受理人*/
99
+        ticketVO.setTpUserNmae(userMapper.selectByIdUserName(ticketVO.getTpUserId()));
100
+        /*所有物业端本小区的人员*/
101
+        ticketVO.setUserList(userMapper.getUser( userID,communityId));
102
+        /*本人*/
103
+        ticketVO.setCurrentUserName(userID);
104
+
105
+
106
+        /*查询工单类容的图片*/
107
+        QueryWrapper<TdImages> queryWrapper = new QueryWrapper<>();
108
+        queryWrapper.lambda().eq(TdImages::getUuid,ticketId);
109
+        queryWrapper.lambda().eq(TdImages::getType,ticketVO.getType());
110
+        List<TdImages> tdImages= tdImagesMapper.selectList(queryWrapper);
111
+        List<String> contentImg = new ArrayList<String>();
112
+        for (TdImages images:tdImages){
113
+            contentImg.add(images.getImageUrl());
114
+        }
115
+        ticketVO.setContentImageUrl(contentImg);
116
+
117
+        /*查询沟通的记录*/
118
+        QueryWrapper<TpTicketRecord> RecordWrapper = new QueryWrapper<>();
119
+        RecordWrapper.lambda().eq(TpTicketRecord::getTicketId,ticketId);
120
+        List<TpTicketRecord> ticketRecordList= tpTicketRecordMapper.selectList(RecordWrapper);
121
+        ticketVO.setRecordList(ticketRecordList);
122
+
123
+        /*对话详情*/
124
+        QueryWrapper<TpTicketRecordComment> RecordCommentWrapper = new QueryWrapper<>();
125
+        RecordCommentWrapper.lambda().eq(TpTicketRecordComment::getTicketId,ticketId);
126
+        List<TpTicketRecordComment> tpTicketRecordCommentList= tpTicketRecordCommentMapper.selectList(RecordCommentWrapper);
127
+        /*设置所有的对话*/
128
+        ticketVO.setTpTicketRecordCommentList(tpTicketRecordCommentList);
129
+        /*获取对话的图片*/
130
+        for (TpTicketRecordComment tpTicketRecordComment :tpTicketRecordCommentList){
131
+            QueryWrapper<TdImages> RecordCommentImg = new QueryWrapper<>();
132
+            RecordCommentImg.lambda().eq(TdImages::getUuid,tpTicketRecordComment.getId());
133
+            /*注意reply用于标记工单回复类的图片*/
134
+            RecordCommentImg.lambda().eq(TdImages::getType,"reply");
135
+            RecordCommentImg.lambda().eq(TdImages::getType,ticketVO.getType());
136
+            List<TdImages> ticketRecordCommentImages= tdImagesMapper.selectList(queryWrapper);
137
+            List<String> ticketRecordCommentImg = new ArrayList<String>();
138
+            for (TdImages images:ticketRecordCommentImages){
139
+                ticketRecordCommentImg.add(images.getImageUrl());
140
+            }
141
+            ticketVO.setTicketRecordCommentImagesUrl(contentImg);
142
+        }
143
+        response.addSuccess(ticketVO);
144
+        return response;
145
+    }
146
+
147
+    @Override
148
+    public ResponseBean addRecordComment(String parameter, Integer id,Integer communityId,String userName) {
149
+        ResponseBean response=new ResponseBean();
150
+        JSONObject object= JSONObject.parseObject(parameter);
151
+
152
+        String  content = object.getString("content");
153
+        Integer  ticketId = object.getInteger("ticketId");
154
+        Integer  status = object.getInteger("status");
155
+
156
+        /*根据工单Id和状态查出工单记录ID*/
157
+        TpTicketRecord ticketRecord= tpTicketRecordMapper.selectTpTicketRecord(ticketId,status);
158
+
159
+        TpTicketRecordComment tpTicketRecordComment= new TpTicketRecordComment();
160
+        tpTicketRecordComment.setCommunityId(communityId);
161
+        tpTicketRecordComment.setContent(content);
162
+        tpTicketRecordComment.setTicketId(ticketId);
163
+        tpTicketRecordComment.setTicketRecordId(ticketRecord.getId());
164
+        tpTicketRecordComment.setUuid(id);
165
+        tpTicketRecordComment.setUserType("0");
166
+        tpTicketRecordComment.setUserName(userName);
167
+        tpTicketRecordComment.setCreateDate(LocalDateTime.now());
168
+        tpTicketRecordCommentMapper.insert(tpTicketRecordComment);
169
+
170
+        JSONArray contentImg = object.getJSONArray("imageUrl");
171
+        String[] contentImgArray = contentImg.toArray(new String[]{});
172
+
173
+        for (String img : contentImgArray) {
174
+            TdImages tdImages = new TdImages();
175
+            tdImages.setImageUrl(img);
176
+             /*注意reply用于标记工单回复类的图片*/
177
+            tdImages.setType("reply");
178
+            tdImages.setUuid(tpTicketRecordComment.getId());
179
+            tdImages.setCreateTime(LocalDateTime.now());
180
+            tdImages.setCreateUser(id);
181
+            tdImagesMapper.insert(tdImages);
182
+        }
183
+        response.addSuccess("成功");
184
+        return response;
185
+    }
186
+
187
+    @Override
188
+    public ResponseBean addRecord(String parameter, Integer id, Integer communityId) {
189
+        ResponseBean response=new ResponseBean();
190
+
191
+        JSONObject object= JSONObject.parseObject(parameter);
192
+        Integer  ticketId = object.getInteger("ticketId");
193
+        String  status = object.getString("status");
194
+        String  currentId = object.getString("currentId");
195
+
196
+        User userName= userMapper.selectById(currentId);
197
+
198
+        TpTicketRecord tpTicketRecord= new TpTicketRecord();
199
+        tpTicketRecord.setCommunityId(communityId);
200
+        tpTicketRecord.setTicketId(ticketId);
201
+        tpTicketRecord.setContent("您的联系单已经分配给物业处理人员" + userName.getUserName()+",联系方式:" + userName.getLoginName());
202
+        tpTicketRecord.setStatus(status);
203
+        tpTicketRecord.setCreateUser(id);
204
+        tpTicketRecord.setCreateDate(LocalDateTime.now());
205
+        tpTicketRecordMapper.insert(tpTicketRecord);
206
+        response.addSuccess("成功");
207
+        return response;
208
+    }
209
+
210
+    @Override
211
+    public ResponseBean updateTicketStatus(String parameter, Integer id) {
212
+        /*拒绝处理仅在待分配的情况下修改,由前台控制拒绝处理的按钮是否显示*/
213
+        ResponseBean response=  new ResponseBean();
214
+        JSONObject object= JSONObject.parseObject(parameter);
215
+        Integer  ticketId = object.getInteger("ticketId");
216
+        TpTicket tpTicket= new TpTicket();
217
+        tpTicket.setId(ticketId);
218
+        tpTicket.setStatus("1");
219
+        tpTicket.setUpdateUser(id);
220
+        tpTicket.setUpdateDate(LocalDateTime.now());
221
+        tpTicketMapper.updateById(tpTicket);
222
+
223
+        TpTicketRecord tpTicketRecord= new TpTicketRecord();
224
+        tpTicketRecord.setTicketId(ticketId);
225
+        tpTicketRecord.setStatus("1");
226
+        tpTicketRecordMapper.updateTicketRecord(tpTicketRecord);
227
+        response.addSuccess("成功");
228
+        return response;
229
+    }
78 230
 }

+ 40
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/vo/TpTicketVO.java Целия файл

@@ -1,8 +1,14 @@
1 1
 package com.community.huiju.vo;
2 2
 
3 3
 import com.community.huiju.model.TpTicket;
4
+import com.community.huiju.model.TpTicketRecord;
5
+import com.community.huiju.model.TpTicketRecordComment;
6
+import com.community.huiju.model.User;
4 7
 import lombok.Data;
5 8
 
9
+import java.util.ArrayList;
10
+import java.util.List;
11
+
6 12
 /**
7 13
  * version V1.0
8 14
  * class_name: $METHOD_NAME$
@@ -23,4 +29,38 @@ public class TpTicketVO extends TpTicket {
23 29
      */
24 30
     private String tpUserNmae;
25 31
 
32
+    /**
33
+     *工单内容下的图片
34
+     */
35
+    private  List<String> contentImageUrl;
36
+
37
+    /**
38
+     * 工单流程状态
39
+     */
40
+    private List<TpTicketRecord> recordList;
41
+
42
+    /**
43
+     * 工单对话图片
44
+     */
45
+    private  List<String> ticketRecordCommentImagesUrl;
46
+
47
+    /**
48
+     * 工单对话记录
49
+     */
50
+    private List<TpTicketRecordComment> tpTicketRecordCommentList;
51
+
52
+    /**
53
+     * 发起人手机号码
54
+     */
55
+    private  String loginName;
56
+
57
+    /**
58
+     * 所有当前小区的物业人员
59
+     */
60
+    private List<User> userList;
61
+
62
+    /**
63
+     * 当前人
64
+     */
65
+    private Integer CurrentUserName;
26 66
 }

+ 25
- 3
CODE/smart-community/property-api/src/main/resources/mapper/TpTicketMapper.xml Целия файл

@@ -21,7 +21,8 @@
21 21
     us.user_name
22 22
     FROM
23 23
     tp_ticket p
24
-    LEFT JOIN tp_user AS us on p.create_user=us.id
24
+    LEFT JOIN tp_user AS us ON p.create_user=us.id
25
+    LEFT JOIN tp_user AS u ON p.tp_user_id = u.id
25 26
 <where>
26 27
     <if test="ticket.id != null and ticket.id !=''">
27 28
         and  p.id=#{ticket.id,jdbcType=INTEGER}
@@ -39,11 +40,32 @@
39 40
         and  p.status=#{ticket.status,jdbcType=INTEGER}
40 41
     </if>
41 42
     <if test="updateUserNmae != null and updateUserNmae !=''">
42
-        and  p.user_name=#{updateUserNmae,jdbcType=INTEGER}
43
+        and u.user_name like concat('%',#{ updateUserNmae,jdbcType=VARCHAR},'%')
43 44
     </if>
45
+    and p.community_id=#{communityId,jdbcType=INTEGER}
44 46
 </where>
45 47
         order by  create_date desc
46
-
47 48
     </select>
48 49
 
50
+    <select id="ticketDetails" resultType="com.community.huiju.vo.TpTicketVO">
51
+        SELECT
52
+        p.id,
53
+        p.community_id,
54
+        p.ta_user_id,
55
+        p.ticket_title,
56
+        p.ticket_content,
57
+        p.STATUS,
58
+        p.type,
59
+        p.repair_type,
60
+        p.tp_user_id,
61
+        p.score,
62
+        p.COMMENT,
63
+        p.create_user,
64
+        p.create_date,
65
+        p.update_user,
66
+        p.update_date
67
+        FROM
68
+        tp_ticket p
69
+        WHERE p.id=#{id,jdbcType=INTEGER}
70
+    </select>
49 71
 </mapper>

+ 32
- 2
CODE/smart-community/property-api/src/main/resources/mapper/TpTicketRecordMapper.xml Целия файл

@@ -1,5 +1,35 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
-<mapper namespace="com.community.huiju.tp.mapper.TpTicketRecordMapper">
4
-
3
+<mapper namespace="com.community.huiju.dao.TpTicketRecordMapper">
4
+<select id="selectTpTicketRecord" resultType="com.community.huiju.model.TpTicketRecord">
5
+    SELECT
6
+    id, community_id, ticket_id, content, status, create_user, create_date
7
+    FROM tp_ticket_record
8
+    WHERE ticket_id = #{ticketId,jdbcType=INTEGER}
9
+          and status = #{status,jdbcType=INTEGER}
10
+</select>
11
+    <update id="updateTicketRecord" parameterType="com.community.huiju.model.TpTicketRecord" >
12
+        update tp_ticket_record
13
+        <set >
14
+            <if test="communityId != null" >
15
+                community_id = #{communityId,jdbcType=INTEGER},
16
+            </if>
17
+            <if test="ticketId != null" >
18
+                ticket_id = #{ticketId,jdbcType=INTEGER},
19
+            </if>
20
+            <if test="content != null">
21
+                content = #{content,jdbcType=VARCHAR},
22
+            </if>
23
+            <if test="status != null" >
24
+                status = #{status,jdbcType=CHAR},
25
+            </if>
26
+            <if test="createUser != null" >
27
+                create_user = #{createUser,jdbcType=INTEGER},
28
+            </if>
29
+            <if test="createDate != null" >
30
+                create_date = #{createDate,jdbcType=TIMESTAMP},
31
+            </if>
32
+        </set>
33
+        where ticket_id = #{ticketId,jdbcType=INTEGER}
34
+    </update>
5 35
 </mapper>

+ 16
- 0
CODE/smart-community/property-api/src/main/resources/mapper/UserMapper.xml Целия файл

@@ -127,4 +127,20 @@
127 127
         </foreach>
128 128
         )
129 129
     </select>
130
+
131
+    <select id="getUser" resultType="com.community.huiju.model.User">
132
+        SELECT
133
+        tu.create_user,
134
+        tu.create_date,
135
+        tu.update_date,
136
+        tu.user_name,
137
+        tu.remark,
138
+        tu.login_name,
139
+        tu.status,
140
+        tu.id
141
+        FROM
142
+         tp_user tu
143
+        WHERE   tu.community_id=#{communityId,jdbcType=INTEGER}
144
+        and tu.id!=#{id,jdbcType=INTEGER}
145
+    </select>
130 146
 </mapper>

+ 3
- 1
VUECODE/smart-property-manage/src/api/ticket.js Целия файл

@@ -12,7 +12,9 @@ export function listTicket(data) {
12 12
       createUser: data.createUser,
13 13
       status: data.status,
14 14
       tpUserId: data.tpUserId,
15
-      updateUserNmae: data.updateUserNmae
15
+      updateUserNmae: data.updateUserNmae,
16
+      pageNum: data.pageNum,
17
+      pageSize: data.pageSize
16 18
     }
17 19
   })
18 20
 }

+ 9
- 9
VUECODE/smart-property-manage/src/views/ticket/index.vue Целия файл

@@ -31,7 +31,7 @@
31 31
         </el-select>
32 32
       </el-form-item>
33 33
       <el-form-item class="filter-item" label="处理人">
34
-        <el-input v-model.trim="listQuery.tpUserNmae" placeholder="处理人" />
34
+        <el-input v-model.trim="listQuery.updateUserNmae" placeholder="处理人" />
35 35
       </el-form-item>       
36 36
       <el-form-item>
37 37
         <el-button type="info" class="filter-item" @click="handleFilter">清空</el-button>
@@ -46,9 +46,6 @@
46 46
       tooltip-effect="dark"
47 47
       style="width: 100%; margin-top: 20px;"
48 48
       @selection-change="handleSelectionChange">
49
-      <el-table-column
50
-        type="selection"
51
-        width="55"/>
52 49
       <el-table-column prop="id" label="编号" align="center"/>
53 50
       <el-table-column prop="type" label="类型" align="center">
54 51
         <template slot-scope="scope">
@@ -60,7 +57,7 @@
60 57
       <el-table-column prop="ticketTitle" label="标题" align="center">
61 58
       <template slot-scope="scope">
62 59
         <a :title="scope.row.ticketTitle">
63
-          <span style="color: #8B8378	">
60
+          <span style="color: #009FCC	">
64 61
            {{ scope.row.ticketTitle.length>='15'?scope.row.ticketTitle.substring(0,15)+'..':scope.row.ticketTitle }}
65 62
           </span>
66 63
         </a>
@@ -79,7 +76,7 @@
79 76
           <span v-if="scope.row.status==='6'">{{ '已终止' }}</span>
80 77
         </template>
81 78
       </el-table-column>
82
-      <el-table-column prop="updateUserNmae" label="当前处理人" align="center"/>
79
+      <el-table-column prop="tpUserNmae" label="当前处理人" align="center"/>
83 80
       <el-table-column prop="updateDate" label="最近操作时间" align="center"><template slot-scope="scope">{{ formatDate(scope.row.updateDate) }}</template></el-table-column> 
84 81
     </el-table>
85 82
     <div class="block">
@@ -192,9 +189,12 @@ export default {
192 189
       }
193 190
       var value = new Date(val)
194 191
       var year = value.getFullYear()
195
-      var month = value.getMonth() + 1
196
-      var day = value.getDate()
197
-      return year + '-' + month + '-' + day
192
+      var month = this.padDate(value.getMonth() + 1)
193
+      var day = this.padDate(value.getDate())
194
+      var hour = this.padDate(value.getHours())
195
+      var minutes = this.padDate(value.getMinutes())
196
+      var seconds = this.padDate(value.getSeconds())
197
+      return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
198 198
     }
199 199
   }
200 200
 }