dingxin 6 年之前
父節點
當前提交
cad3f82786

+ 28
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java 查看文件

@@ -35,6 +35,34 @@ public class TpTicketRecordComment {
35 35
      */
36 36
     private List<String> recordCommentURL;
37 37
 
38
+    /**
39
+     * 评分
40
+     * @param recordCommentURL
41
+     */
42
+    private String score;
43
+
44
+    /**
45
+     * 评语
46
+     * @param recordCommentURL
47
+     */
48
+    private String comment;
49
+
50
+    public String getScore() {
51
+        return score;
52
+    }
53
+
54
+    public String getComment() {
55
+        return comment;
56
+    }
57
+
58
+    public void setScore(String score) {
59
+        this.score = score;
60
+    }
61
+
62
+    public void setComment(String comment) {
63
+        this.comment = comment;
64
+    }
65
+
38 66
     public void setRecordCommentURL(List<String> recordCommentURL) {
39 67
         this.recordCommentURL = recordCommentURL;
40 68
     }

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

@@ -3,18 +3,17 @@ package com.community.huiju.service.impl;
3 3
 import com.community.commom.constant.Constant;
4 4
 import com.community.commom.mode.ResponseBean;
5 5
 import com.community.commom.session.UserElement;
6
-import com.community.huiju.dao.TpBillInvoiceMapper;
7
-import com.community.huiju.dao.TpBillMapper;
8
-import com.community.huiju.dao.TpMessageMapper;
9
-import com.community.huiju.dao.TpTicketMapper;
6
+import com.community.huiju.dao.*;
10 7
 import com.community.huiju.model.TpBill;
11 8
 import com.community.huiju.model.TpMessage;
12 9
 import com.community.huiju.model.TpTicket;
10
+import com.community.huiju.model.TpTransaction;
13 11
 import com.community.huiju.service.MessageServiceI;
14 12
 import com.github.pagehelper.Page;
15 13
 import com.github.pagehelper.PageHelper;
16 14
 import org.springframework.beans.factory.annotation.Autowired;
17 15
 import org.springframework.stereotype.Service;
16
+import org.springframework.transaction.annotation.Transactional;
18 17
 import org.springframework.util.StringUtils;
19 18
 
20 19
 import java.util.Date;
@@ -28,16 +27,19 @@ import java.util.Map;
28 27
  */
29 28
 @Service("messageService")
30 29
 public class MessageServiceImpl implements MessageServiceI {
31
-	
30
+
32 31
 	@Autowired
33 32
 	private TpMessageMapper tpMessageMapper;
34
-	
33
+
35 34
 	@Autowired
36 35
 	private TpBillMapper tpBillMapper;
37 36
 
38 37
 	@Autowired
39 38
 	private TpTicketMapper tpTicketMapper;
40
-	
39
+
40
+	@Autowired
41
+	private TpTransactionMapper tpTransactionMapper;
42
+
41 43
 	/**
42 44
 	 * 获取消息数量
43 45
 	 * @param communityId
@@ -47,7 +49,7 @@ public class MessageServiceImpl implements MessageServiceI {
47 49
 	public Map<String, Object> getMessageTotal(Integer communityId, Integer verifyId) {
48 50
 		return tpMessageMapper.getMessageTotal(verifyId,communityId);
49 51
 	}
50
-	
52
+
51 53
 	/**
52 54
 	 * 分页获取消息或待办
53 55
 	 * @param communityId
@@ -70,12 +72,15 @@ public class MessageServiceImpl implements MessageServiceI {
70 72
 			//		tpMessage.setContent(tpBill.getBillExplain());
71 73
 			//	}
72 74
 			//}
73
-			
75
+
74 76
 			if(tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_VISITOR) || tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_ANNOUNCEMENT)
75 77
 					|| tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_SYS) || tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_BILL)
76 78
 					|| tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_ACTIVITY)){
77
-				tpMessage.setContent(tpMessage.getMessageContent());
78
-				tpMessage.setMessageContent("");
79
+				// 当transactionId为空时把15条临时数据的内容去掉
80
+				if(null == tpMessage.getTransactionId()) {
81
+					tpMessage.setContent(tpMessage.getMessageContent());
82
+					tpMessage.setMessageContent("");
83
+				}
79 84
 			}
80 85
 			// 查询工单是否待评价,如果为待评价把Content改为工单的标题
81 86
 			TpTicket tpTicket= tpTicketMapper.selectByPrimaryKey(tpMessage.getTicketId());
@@ -84,6 +89,11 @@ public class MessageServiceImpl implements MessageServiceI {
84 89
 					tpMessage.setContent(tpTicket.getTicketTitle());
85 90
 				}
86 91
 			}
92
+			// 帖子推消息设置Content帖子标题
93
+			TpTransaction tpTransaction = tpTransactionMapper.selectByPrimaryKey(tpMessage.getTransactionId(),tpMessage.getCommunityId());
94
+			if (null != tpTransaction){
95
+				tpMessage.setContent(tpTransaction.getTransactionTitle());
96
+			}
87 97
 			if (!StringUtils.isEmpty(tpMessage.getMessageDetailUrl())){
88 98
 				Integer id = getMessageIdByType(tpMessage);
89 99
 				tpMessage.setMessageDetailUrl(tpMessage.getMessageDetailUrl() + "&id=" + id);
@@ -94,7 +104,7 @@ public class MessageServiceImpl implements MessageServiceI {
94 104
 		map.put("total",page.getTotal());
95 105
 		return map;
96 106
 	}
97
-	
107
+
98 108
 	/**
99 109
 	 * 根据不同的类型取不同的id
100 110
 	 * @param tpMessage
@@ -108,6 +118,8 @@ public class MessageServiceImpl implements MessageServiceI {
108 118
 				id = tpMessage.getAnnouncementId();
109 119
 				break;
110 120
 			case Constant.MESSAGE_TYPE_SYS:
121
+				// 临时用系统通知测试,后期用11话题状态
122
+				id = tpMessage.getTransactionId();
111 123
 				break;
112 124
 			case Constant.MESSAGE_TYPE_BILL:
113 125
 				id = tpMessage.getBillId();
@@ -116,10 +128,10 @@ public class MessageServiceImpl implements MessageServiceI {
116 128
 				id = tpMessage.getActivityId();
117 129
 				break;
118 130
 		}
119
-		
131
+
120 132
 		return id;
121 133
 	}
122
-	
134
+
123 135
 	/**
124 136
 	 * 消息全部已读
125 137
 	 */

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

@@ -638,7 +638,7 @@ public class SocialServiceImpl implements SocialServiceI {
638 638
             }
639 639
         }
640 640
         // 推消息
641
-        TpMessage  tpMessage=new TpMessage(null,userElement.getCommunityId(),"11","1","1", tpTransactionReplyBack.getUuid(),"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
641
+        TpMessage  tpMessage = new TpMessage(null,userElement.getCommunityId(),"9","1","1", tpTransactionReplyBack.getUuid(),"1","2",  userElement.getUserName()+":"+tpTransactionReply.getReplyContent(),
642 642
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
643 643
         tpMessageMapper.insert(tpMessage);
644 644
         response.addSuccess("成功");
@@ -1209,11 +1209,6 @@ public class SocialServiceImpl implements SocialServiceI {
1209 1209
         /*当前工单发起人房产*/
1210 1210
         ticketVO.setHouseProperty(taUserVerify.getPhaseName()+taUserVerify.getBuildingName()+taUserVerify.getUnitName()+taUserVerify.getLevelName()+taUserVerify.getRoomNoName());
1211 1211
 
1212
-
1213
-
1214
-
1215
-
1216
-
1217 1212
         /*查询工单类容的图片*/
1218 1213
         List<TdImages> tdImages = tdImagesMapper.selectImages(tickedID,Constant.SERVICE);
1219 1214
         List<String> contentImg = new ArrayList<String>();
@@ -1229,6 +1224,13 @@ public class SocialServiceImpl implements SocialServiceI {
1229 1224
         for (TpTicketRecord ticketRecord : ticketRecordList) {
1230 1225
             /*对话详情*/
1231 1226
             List<TpTicketRecordComment> tpTicketRecordCommentList = tpTicketRecordCommentMapper.selectList(tickedID,ticketRecord.getId());
1227
+            /*当status=5(待评价时)*/
1228
+             if ("5".equals(ticketRecord.getStatus())){
1229
+                 TpTicketRecordComment tpTicketRecordComment= new TpTicketRecordComment();
1230
+                 tpTicketRecordComment.setScore(ticketVO.getScore());
1231
+                 tpTicketRecordComment.setComment(ticketVO.getComment());
1232
+                 tpTicketRecordCommentList.add(tpTicketRecordComment);
1233
+             }
1232 1234
             ticketRecord.setStatusContent(tpTicketRecordCommentList);
1233 1235
             /* 遍历当前对话信息组装图片*/
1234 1236
             for (TpTicketRecordComment tpTicketRecordComment : tpTicketRecordCommentList) {

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

@@ -29,6 +29,7 @@
29 29
     <result column="bill_id" property="billId" jdbcType="INTEGER" />
30 30
     <result column="activity_id" property="activityId" jdbcType="INTEGER" />
31 31
     <result column="announcement_id" property="announcementId" jdbcType="INTEGER" />
32
+    <result column="transaction_id" property="transactionId" jdbcType="INTEGER" />
32 33
   </resultMap>
33 34
   <sql id="Base_Column_List" >
34 35
     id, ticket_id,community_id, message_type, advice_type, model_type, uuid, uuid_type, source,
@@ -326,6 +327,7 @@
326 327
         t.bill_id,
327 328
         t.activity_id,
328 329
         t.announcement_id,
330
+        t.transaction_id,
329 331
         k.status,
330 332
         r.content,
331 333
         d.name as ticket_status,

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

@@ -181,7 +181,7 @@
181 181
     LIMIT 1
182 182
   </select>
183 183
   <select id="selectList" resultMap="BaseResultMap">
184
-    select * from  tp_ticket_record_comment WHERE ticket_id =#{tickedID} and ticket_record_id = #{recordId}  ;
184
+    select * from  tp_ticket_record_comment WHERE ticket_id =#{tickedID} and ticket_record_id = #{recordId}
185 185
   </select>
186 186
 
187 187
 </mapper>

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShop.java 查看文件

@@ -144,4 +144,10 @@ public class TpShop implements Serializable {
144 144
      */
145 145
     @TableField(exist = false)
146 146
     private List<String> appCarouselImg;
147
+
148
+    /**
149
+     * 评价总数
150
+     */
151
+    @TableField(exist = false)
152
+    private int evaluateSum;
147 153
 }

+ 1
- 1
CODE/smart-community/property-api/src/main/java/com/community/huiju/service/impl/TransactionServiceImpl.java 查看文件

@@ -396,7 +396,7 @@ public class TransactionServiceImpl extends ServiceImpl<TpTransactionMapper, TpT
396 396
 			tdImages.setCreateUser(userElement.getId());
397 397
 			tdImagesMapper.insert(tdImages);
398 398
 		}
399
-		Message  tpMessage=new Message(null,userElement.getCommunityId(),"11","1","1", tpTransaction.getUuid(),"1","2",  userElement.getUserName()+":"+ replyContent,
399
+		Message  tpMessage=new Message(null,userElement.getCommunityId(),"9","1","1", tpTransaction.getUuid(),"1","2",  userElement.getUserName()+":"+ replyContent,
400 400
 				"1",null,null,"0",userElement.getUserVerifyId(),LocalDateTime.now(),null,null,null,null,null,tpTransaction.getId());
401 401
 		tpMessageMapper.insert(tpMessage);
402 402
 		response.addSuccess("成功");

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

@@ -13,7 +13,7 @@
13 13
         LEFT JOIN tp_shop_appraisal_replay ar ON sa.id = ar.shop_appraisal_id
14 14
         <where>
15 15
             <if test="id !=null and id != ''">
16
-                and sa.id like concat('%',#{id},'%')
16
+                and s.id like concat('%',#{id},'%')
17 17
             </if>
18 18
             <if test="shopName !=null and shopName != ''">
19 19
                 and s.shop_name like concat('%',#{shopName},'%')

+ 2
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TpShopMapper.xml 查看文件

@@ -13,7 +13,8 @@
13 13
             t.update_date,
14 14
             s.type_name,
15 15
             i.img_url,
16
-            u.user_name
16
+            u.user_name,
17
+           (SELECT COUNT(sa.shop_id) FROM  tp_shop_appraisal sa WHERE t.id = sa.shop_id) AS evaluateSum
17 18
         FROM
18 19
             tp_shop t
19 20
             LEFT JOIN tp_shop_img i ON t.id = i.shop_id AND i.img_type = 1

+ 1
- 1
VUECODE/smart-property-manage/src/api/shopType.js 查看文件

@@ -114,7 +114,7 @@ export function shopAppraisalList(data) {
114 114
     url: '/shopAppraisalList',
115 115
     method: 'get',
116 116
     params: {
117
-      id: data.id,
117
+      id: data.shopId,
118 118
       shopName: data.shopName,
119 119
       score: data.score,
120 120
       content: data.content,

+ 12
- 0
VUECODE/smart-property-manage/src/views/shop/shopIndex.vue 查看文件

@@ -60,6 +60,15 @@
60 60
         </template>
61 61
       </el-table-column>
62 62
       <el-table-column prop="updateDate" label="编辑时间" align="center" ><template slot-scope="scope">{{ formatDate(scope.row.updateDate) }}</template></el-table-column>
63
+      <el-table-column  label="业主评价" align="center" >
64
+        <template slot-scope="scope">
65
+         <a>
66
+           <span style="color: #63B8FF" v-if="scope.row.evaluateSum > 0" @click="evaluateSum(scope.row.id)">{{ scope.row.evaluateSum }}</span>
67
+           <span style="color: #666666" v-if="scope.row.evaluateSum === 0">{{ scope.row.evaluateSum }}</span>
68
+         </a>
69
+         
70
+        </template>
71
+      </el-table-column>
63 72
       <el-table-column prop="userName" label="编辑人" align="center"/>
64 73
     </el-table>
65 74
     <div class="block">
@@ -279,6 +288,9 @@ export default {
279 288
       var seconds = value.getSeconds()
280 289
       // return year + '-' + month + '-' + day
281 290
       return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
291
+    },
292
+    evaluateSum(id){
293
+       this.$router.push({ name: 'shop-shopReplay', query: { id: id }})
282 294
     }
283 295
   }
284 296
 }

+ 7
- 2
VUECODE/smart-property-manage/src/views/shop/shopReplay/index.vue 查看文件

@@ -2,7 +2,7 @@
2 2
   <div>
3 3
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
4 4
       <el-form-item class="filter-item"  label="商铺编号">
5
-        <el-input v-model="listQuery.id"  placeholder="商铺编号"/>
5
+        <el-input v-model="listQuery.shopId"  placeholder="商铺编号"/>
6 6
       </el-form-item>
7 7
       <el-form-item class="filter-item"  label="商铺名称">
8 8
         <el-input v-model="listQuery.shopName" placeholder="商铺名称"/>
@@ -50,7 +50,9 @@
50 50
       <el-table-column
51 51
         type="selection"
52 52
         width="55"/>
53
-      <el-table-column prop="id" label="序号" align="center"/>
53
+      <el-table-column type="index" width="55" label="序号"/>
54
+      <!-- <el-table-column prop="id" label="序号" align="center"/> -->
55
+       <el-table-column prop="shopId" label="商铺编号" align="center"/>
54 56
       <el-table-column prop="roomName" label="商铺名称" align="center">
55 57
          <template slot-scope="scope" >
56 58
           <a>
@@ -135,6 +137,7 @@ export default {
135 137
     data() {
136 138
         return {
137 139
           listQuery: {
140
+            shopId: '',
138 141
             id: '',
139 142
             shopName: '',
140 143
             score: '',
@@ -160,7 +163,9 @@ export default {
160 163
         }
161 164
     },
162 165
     mounted(){
166
+    this.listQuery.shopId = this.$route.query.id
163 167
     this.dataQuery()
168
+    this.listQuery.shopId = ''
164 169
     },
165 170
     methods:{
166 171
     dataQuery() { // 查询数据