|
@@ -115,6 +115,7 @@ public class OrdinaryController {
|
|
public List<ReservationVo> findAllReservationByRoomId(@RequestBody String id) throws Exception {
|
|
public List<ReservationVo> findAllReservationByRoomId(@RequestBody String id) throws Exception {
|
|
JSONObject jsonObject = JSONObject.parseObject(id);
|
|
JSONObject jsonObject = JSONObject.parseObject(id);
|
|
Integer roomId = jsonObject.getInteger("id");
|
|
Integer roomId = jsonObject.getInteger("id");
|
|
|
|
+ String date = jsonObject.getString("date");
|
|
List<ReservationVo> list = null;
|
|
List<ReservationVo> list = null;
|
|
list = reservationService.findByRoomId(roomId);
|
|
list = reservationService.findByRoomId(roomId);
|
|
return list;
|
|
return list;
|
|
@@ -164,11 +165,14 @@ public class OrdinaryController {
|
|
JSONArray enterUsers = jsonObject.getJSONArray("enterUsers");
|
|
JSONArray enterUsers = jsonObject.getJSONArray("enterUsers");
|
|
|
|
|
|
JSONArray dateArray = jsonObject.getJSONArray("dateArray");
|
|
JSONArray dateArray = jsonObject.getJSONArray("dateArray");
|
|
|
|
+ String date = "";
|
|
|
|
+ String beginTime = "";
|
|
|
|
+ String endTime = "";
|
|
for (int i = 0; i <dateArray.size() ; i++) {
|
|
for (int i = 0; i <dateArray.size() ; i++) {
|
|
JSONObject json = dateArray.getJSONObject(i);
|
|
JSONObject json = dateArray.getJSONObject(i);
|
|
- String date = json.getString("date");
|
|
|
|
- String beginTime = json.getString("beginTime");
|
|
|
|
- String endTime = json.getString("endTime");
|
|
|
|
|
|
+ date = json.getString("date");
|
|
|
|
+ beginTime = json.getString("beginTime");
|
|
|
|
+ endTime = json.getString("endTime");
|
|
// String a = date+""+
|
|
// String a = date+""+
|
|
ReservationCustom reservationCustom = new ReservationCustom();
|
|
ReservationCustom reservationCustom = new ReservationCustom();
|
|
reservationCustom.setDate(date);
|
|
reservationCustom.setDate(date);
|
|
@@ -199,22 +203,18 @@ public class OrdinaryController {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
result.put("users",users);
|
|
result.put("users",users);
|
|
- JSONObject message = new JSONObject();
|
|
|
|
|
|
+ JSONObject result2 = new JSONObject();
|
|
|
|
+ JSONObject message = new JSONObject();
|
|
JSONObject head = new JSONObject();
|
|
JSONObject head = new JSONObject();
|
|
head.put("title","会议参加提醒");
|
|
head.put("title","会议参加提醒");
|
|
JSONObject first = new JSONObject();
|
|
JSONObject first = new JSONObject();
|
|
- head.put("first","欢迎参加“"+userName+"”组织的【"+theme+"】会议,会议将于");
|
|
|
|
-// message.put("head,new )
|
|
|
|
-// {
|
|
|
|
-// "head":{
|
|
|
|
-// "title":"会议室提醒"
|
|
|
|
-// },
|
|
|
|
-// "first":{
|
|
|
|
-// "content":"2019-08-24"
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
- result.put("text","theme");
|
|
|
|
-// sendMessage(result.toString());
|
|
|
|
|
|
+ first.put("first","欢迎参加“"+userName+"”组织的【"+theme+"】会议," +
|
|
|
|
+ "会议将于"+date+" "+beginTime+"-"+endTime+"召开,请届时参见");
|
|
|
|
+ message.put("head",head);
|
|
|
|
+ message.put("first",first);
|
|
|
|
+ result2.put("composite",message);
|
|
|
|
+ result.put("text",result2);
|
|
|
|
+ sendMessage(result.toString());
|
|
|
|
|
|
return "success";
|
|
return "success";
|
|
}
|
|
}
|
|
@@ -432,19 +432,13 @@ public class OrdinaryController {
|
|
obj.put("corpId",corpId);
|
|
obj.put("corpId",corpId);
|
|
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
|
|
JSONObject jsonObject = JSONObject.parseObject(jsonStr);
|
|
//消息内容
|
|
//消息内容
|
|
- String text = jsonObject.getString("text");
|
|
|
|
|
|
+ JSONObject text = jsonObject.getJSONObject("text");
|
|
//发送人
|
|
//发送人
|
|
JSONArray users = jsonObject.getJSONArray("users");
|
|
JSONArray users = jsonObject.getJSONArray("users");
|
|
|
|
|
|
-
|
|
|
|
-// JSONArray users = new JSONArray();
|
|
|
|
-// users.add("FSUID_782A9585B3CEB91B9DC0C709FA4D3119");
|
|
|
|
-
|
|
|
|
obj.put("toUser",users);
|
|
obj.put("toUser",users);
|
|
- obj.put("msgType","text");
|
|
|
|
- JSONObject content = new JSONObject();
|
|
|
|
- content.put("content","luo nb");
|
|
|
|
- obj.put("text",content);
|
|
|
|
|
|
+ obj.put("msgType","composite");
|
|
|
|
+ obj.put("composite",text);
|
|
|
|
|
|
String result = httpPostRequest(messageURL, obj);
|
|
String result = httpPostRequest(messageURL, obj);
|
|
return result;
|
|
return result;
|