dingxin 6 лет назад
Родитель
Сommit
cad3f82786

+ 28
- 0
CODE/smart-community/app-api/src/main/java/com/community/huiju/model/TpTicketRecordComment.java Просмотреть файл

35
      */
35
      */
36
     private List<String> recordCommentURL;
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
     public void setRecordCommentURL(List<String> recordCommentURL) {
66
     public void setRecordCommentURL(List<String> recordCommentURL) {
39
         this.recordCommentURL = recordCommentURL;
67
         this.recordCommentURL = recordCommentURL;
40
     }
68
     }

+ 26
- 14
CODE/smart-community/app-api/src/main/java/com/community/huiju/service/impl/MessageServiceImpl.java Просмотреть файл

3
 import com.community.commom.constant.Constant;
3
 import com.community.commom.constant.Constant;
4
 import com.community.commom.mode.ResponseBean;
4
 import com.community.commom.mode.ResponseBean;
5
 import com.community.commom.session.UserElement;
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
 import com.community.huiju.model.TpBill;
7
 import com.community.huiju.model.TpBill;
11
 import com.community.huiju.model.TpMessage;
8
 import com.community.huiju.model.TpMessage;
12
 import com.community.huiju.model.TpTicket;
9
 import com.community.huiju.model.TpTicket;
10
+import com.community.huiju.model.TpTransaction;
13
 import com.community.huiju.service.MessageServiceI;
11
 import com.community.huiju.service.MessageServiceI;
14
 import com.github.pagehelper.Page;
12
 import com.github.pagehelper.Page;
15
 import com.github.pagehelper.PageHelper;
13
 import com.github.pagehelper.PageHelper;
16
 import org.springframework.beans.factory.annotation.Autowired;
14
 import org.springframework.beans.factory.annotation.Autowired;
17
 import org.springframework.stereotype.Service;
15
 import org.springframework.stereotype.Service;
16
+import org.springframework.transaction.annotation.Transactional;
18
 import org.springframework.util.StringUtils;
17
 import org.springframework.util.StringUtils;
19
 
18
 
20
 import java.util.Date;
19
 import java.util.Date;
28
  */
27
  */
29
 @Service("messageService")
28
 @Service("messageService")
30
 public class MessageServiceImpl implements MessageServiceI {
29
 public class MessageServiceImpl implements MessageServiceI {
31
-	
30
+
32
 	@Autowired
31
 	@Autowired
33
 	private TpMessageMapper tpMessageMapper;
32
 	private TpMessageMapper tpMessageMapper;
34
-	
33
+
35
 	@Autowired
34
 	@Autowired
36
 	private TpBillMapper tpBillMapper;
35
 	private TpBillMapper tpBillMapper;
37
 
36
 
38
 	@Autowired
37
 	@Autowired
39
 	private TpTicketMapper tpTicketMapper;
38
 	private TpTicketMapper tpTicketMapper;
40
-	
39
+
40
+	@Autowired
41
+	private TpTransactionMapper tpTransactionMapper;
42
+
41
 	/**
43
 	/**
42
 	 * 获取消息数量
44
 	 * 获取消息数量
43
 	 * @param communityId
45
 	 * @param communityId
47
 	public Map<String, Object> getMessageTotal(Integer communityId, Integer verifyId) {
49
 	public Map<String, Object> getMessageTotal(Integer communityId, Integer verifyId) {
48
 		return tpMessageMapper.getMessageTotal(verifyId,communityId);
50
 		return tpMessageMapper.getMessageTotal(verifyId,communityId);
49
 	}
51
 	}
50
-	
52
+
51
 	/**
53
 	/**
52
 	 * 分页获取消息或待办
54
 	 * 分页获取消息或待办
53
 	 * @param communityId
55
 	 * @param communityId
70
 			//		tpMessage.setContent(tpBill.getBillExplain());
72
 			//		tpMessage.setContent(tpBill.getBillExplain());
71
 			//	}
73
 			//	}
72
 			//}
74
 			//}
73
-			
75
+
74
 			if(tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_VISITOR) || tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_ANNOUNCEMENT)
76
 			if(tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_VISITOR) || tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_ANNOUNCEMENT)
75
 					|| tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_SYS) || tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_BILL)
77
 					|| tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_SYS) || tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_BILL)
76
 					|| tpMessage.getMessageType().equals(Constant.MESSAGE_TYPE_ACTIVITY)){
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
 			// 查询工单是否待评价,如果为待评价把Content改为工单的标题
85
 			// 查询工单是否待评价,如果为待评价把Content改为工单的标题
81
 			TpTicket tpTicket= tpTicketMapper.selectByPrimaryKey(tpMessage.getTicketId());
86
 			TpTicket tpTicket= tpTicketMapper.selectByPrimaryKey(tpMessage.getTicketId());
84
 					tpMessage.setContent(tpTicket.getTicketTitle());
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
 			if (!StringUtils.isEmpty(tpMessage.getMessageDetailUrl())){
97
 			if (!StringUtils.isEmpty(tpMessage.getMessageDetailUrl())){
88
 				Integer id = getMessageIdByType(tpMessage);
98
 				Integer id = getMessageIdByType(tpMessage);
89
 				tpMessage.setMessageDetailUrl(tpMessage.getMessageDetailUrl() + "&id=" + id);
99
 				tpMessage.setMessageDetailUrl(tpMessage.getMessageDetailUrl() + "&id=" + id);
94
 		map.put("total",page.getTotal());
104
 		map.put("total",page.getTotal());
95
 		return map;
105
 		return map;
96
 	}
106
 	}
97
-	
107
+
98
 	/**
108
 	/**
99
 	 * 根据不同的类型取不同的id
109
 	 * 根据不同的类型取不同的id
100
 	 * @param tpMessage
110
 	 * @param tpMessage
108
 				id = tpMessage.getAnnouncementId();
118
 				id = tpMessage.getAnnouncementId();
109
 				break;
119
 				break;
110
 			case Constant.MESSAGE_TYPE_SYS:
120
 			case Constant.MESSAGE_TYPE_SYS:
121
+				// 临时用系统通知测试,后期用11话题状态
122
+				id = tpMessage.getTransactionId();
111
 				break;
123
 				break;
112
 			case Constant.MESSAGE_TYPE_BILL:
124
 			case Constant.MESSAGE_TYPE_BILL:
113
 				id = tpMessage.getBillId();
125
 				id = tpMessage.getBillId();
116
 				id = tpMessage.getActivityId();
128
 				id = tpMessage.getActivityId();
117
 				break;
129
 				break;
118
 		}
130
 		}
119
-		
131
+
120
 		return id;
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
             }
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
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
642
                                           "1",null,null,"0",userElement.getUserVerifyId(),new Date(),null,null,null,null,null,tpTransactionReplyBack.getTransactionId());
643
         tpMessageMapper.insert(tpMessage);
643
         tpMessageMapper.insert(tpMessage);
644
         response.addSuccess("成功");
644
         response.addSuccess("成功");
1209
         /*当前工单发起人房产*/
1209
         /*当前工单发起人房产*/
1210
         ticketVO.setHouseProperty(taUserVerify.getPhaseName()+taUserVerify.getBuildingName()+taUserVerify.getUnitName()+taUserVerify.getLevelName()+taUserVerify.getRoomNoName());
1210
         ticketVO.setHouseProperty(taUserVerify.getPhaseName()+taUserVerify.getBuildingName()+taUserVerify.getUnitName()+taUserVerify.getLevelName()+taUserVerify.getRoomNoName());
1211
 
1211
 
1212
-
1213
-
1214
-
1215
-
1216
-
1217
         /*查询工单类容的图片*/
1212
         /*查询工单类容的图片*/
1218
         List<TdImages> tdImages = tdImagesMapper.selectImages(tickedID,Constant.SERVICE);
1213
         List<TdImages> tdImages = tdImagesMapper.selectImages(tickedID,Constant.SERVICE);
1219
         List<String> contentImg = new ArrayList<String>();
1214
         List<String> contentImg = new ArrayList<String>();
1229
         for (TpTicketRecord ticketRecord : ticketRecordList) {
1224
         for (TpTicketRecord ticketRecord : ticketRecordList) {
1230
             /*对话详情*/
1225
             /*对话详情*/
1231
             List<TpTicketRecordComment> tpTicketRecordCommentList = tpTicketRecordCommentMapper.selectList(tickedID,ticketRecord.getId());
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
             ticketRecord.setStatusContent(tpTicketRecordCommentList);
1234
             ticketRecord.setStatusContent(tpTicketRecordCommentList);
1233
             /* 遍历当前对话信息组装图片*/
1235
             /* 遍历当前对话信息组装图片*/
1234
             for (TpTicketRecordComment tpTicketRecordComment : tpTicketRecordCommentList) {
1236
             for (TpTicketRecordComment tpTicketRecordComment : tpTicketRecordCommentList) {

+ 2
- 0
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml Просмотреть файл

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

+ 1
- 1
CODE/smart-community/app-api/src/main/resources/mapper/TpTicketRecordCommentMapper.xml Просмотреть файл

181
     LIMIT 1
181
     LIMIT 1
182
   </select>
182
   </select>
183
   <select id="selectList" resultMap="BaseResultMap">
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
   </select>
185
   </select>
186
 
186
 
187
 </mapper>
187
 </mapper>

+ 6
- 0
CODE/smart-community/property-api/src/main/java/com/community/huiju/model/TpShop.java Просмотреть файл

144
      */
144
      */
145
     @TableField(exist = false)
145
     @TableField(exist = false)
146
     private List<String> appCarouselImg;
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
 			tdImages.setCreateUser(userElement.getId());
396
 			tdImages.setCreateUser(userElement.getId());
397
 			tdImagesMapper.insert(tdImages);
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
 				"1",null,null,"0",userElement.getUserVerifyId(),LocalDateTime.now(),null,null,null,null,null,tpTransaction.getId());
400
 				"1",null,null,"0",userElement.getUserVerifyId(),LocalDateTime.now(),null,null,null,null,null,tpTransaction.getId());
401
 		tpMessageMapper.insert(tpMessage);
401
 		tpMessageMapper.insert(tpMessage);
402
 		response.addSuccess("成功");
402
 		response.addSuccess("成功");

+ 1
- 1
CODE/smart-community/property-api/src/main/resources/mapper/ShopAppraisalMapper.xml Просмотреть файл

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

+ 2
- 1
CODE/smart-community/property-api/src/main/resources/mapper/TpShopMapper.xml Просмотреть файл

13
             t.update_date,
13
             t.update_date,
14
             s.type_name,
14
             s.type_name,
15
             i.img_url,
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
         FROM
18
         FROM
18
             tp_shop t
19
             tp_shop t
19
             LEFT JOIN tp_shop_img i ON t.id = i.shop_id AND i.img_type = 1
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
     url: '/shopAppraisalList',
114
     url: '/shopAppraisalList',
115
     method: 'get',
115
     method: 'get',
116
     params: {
116
     params: {
117
-      id: data.id,
117
+      id: data.shopId,
118
       shopName: data.shopName,
118
       shopName: data.shopName,
119
       score: data.score,
119
       score: data.score,
120
       content: data.content,
120
       content: data.content,

+ 12
- 0
VUECODE/smart-property-manage/src/views/shop/shopIndex.vue Просмотреть файл

60
         </template>
60
         </template>
61
       </el-table-column>
61
       </el-table-column>
62
       <el-table-column prop="updateDate" label="编辑时间" align="center" ><template slot-scope="scope">{{ formatDate(scope.row.updateDate) }}</template></el-table-column>
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
       <el-table-column prop="userName" label="编辑人" align="center"/>
72
       <el-table-column prop="userName" label="编辑人" align="center"/>
64
     </el-table>
73
     </el-table>
65
     <div class="block">
74
     <div class="block">
279
       var seconds = value.getSeconds()
288
       var seconds = value.getSeconds()
280
       // return year + '-' + month + '-' + day
289
       // return year + '-' + month + '-' + day
281
       return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
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
   <div>
2
   <div>
3
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
3
     <el-form :inline="true" :model="listQuery" class="form-listQuery">
4
       <el-form-item class="filter-item"  label="商铺编号">
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
       </el-form-item>
6
       </el-form-item>
7
       <el-form-item class="filter-item"  label="商铺名称">
7
       <el-form-item class="filter-item"  label="商铺名称">
8
         <el-input v-model="listQuery.shopName" placeholder="商铺名称"/>
8
         <el-input v-model="listQuery.shopName" placeholder="商铺名称"/>
50
       <el-table-column
50
       <el-table-column
51
         type="selection"
51
         type="selection"
52
         width="55"/>
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
       <el-table-column prop="roomName" label="商铺名称" align="center">
56
       <el-table-column prop="roomName" label="商铺名称" align="center">
55
          <template slot-scope="scope" >
57
          <template slot-scope="scope" >
56
           <a>
58
           <a>
135
     data() {
137
     data() {
136
         return {
138
         return {
137
           listQuery: {
139
           listQuery: {
140
+            shopId: '',
138
             id: '',
141
             id: '',
139
             shopName: '',
142
             shopName: '',
140
             score: '',
143
             score: '',
160
         }
163
         }
161
     },
164
     },
162
     mounted(){
165
     mounted(){
166
+    this.listQuery.shopId = this.$route.query.id
163
     this.dataQuery()
167
     this.dataQuery()
168
+    this.listQuery.shopId = ''
164
     },
169
     },
165
     methods:{
170
     methods:{
166
     dataQuery() { // 查询数据
171
     dataQuery() { // 查询数据