18756
2024-08-22 33dbf637c8527e9f8d66a454ee711b7f7aee7102
会议室功能
已修改1个文件
66 ■■■■■ 文件已修改
src/main/java/com/product/administration/service/ConferenceManagerService.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/product/administration/service/ConferenceManagerService.java
@@ -257,38 +257,50 @@
                }
               baseDao.executeUpdate("update product_oa_conference_apply set status='"+fieldSetEntity1.getString("status")+"' where uuid='"+fieldSetEntity1.getString("uuid")+"'");
            }
            //构造所需要的格式
            if(!list.contains(fieldSetEntity.getValue("room_name").toString())){
            if(ObjectUtil.isNotEmpty(fieldSetEntity.getString("uuid"))){
                //构造所需要的格式
                if(!list.contains(fieldSetEntity.getValue("room_name").toString())){
                    HashMap<String,Object> hashMap=new HashMap<>();
                    hashMap.put("room_name",fieldSetEntity.getValue("room_name").toString());
                    hashMap.put("uuid",fieldSetEntity.getValue("meet_room_uuid").toString());
                    Object getStartTime = dataTableEntity.getData().get(0).getValue("start_time");
                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    String time = dateFormat.format(getStartTime);
                    hashMap.put("start_time",time);
                    list.add(fieldSetEntity.getValue("room_name").toString());
                    listDate.add(hashMap);
                }
                fieldSetEntity.setValue("parent",fieldSetEntity.getValue("meet_room_uuid").toString());
                HashMap<String,Object> hashMap=new HashMap<>();
                hashMap.put("room_name",fieldSetEntity.getValue("room_name").toString());
                hashMap.put("uuid",fieldSetEntity.getValue("meet_room_uuid").toString());
                Object getStartTime = dataTableEntity.getData().get(0).getValue("start_time");
                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                String time = dateFormat.format(getStartTime);
                hashMap.put("start_time",time);
                list.add(fieldSetEntity.getValue("room_name").toString());
                for (int j = 0; j < fieldSetEntity.getValues().keySet().size(); j++) {
                    if(fieldSetEntity.getValues().keySet().toArray()[j].toString().equals("start_time") || fieldSetEntity.getValues().keySet().toArray()[j].toString().equals("end_time")){
                        Object meeting_time = fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString());
                        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                        String time = dateFormat.format(meeting_time);
                        hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),time);
                        if(fieldSetEntity.getValues().keySet().toArray()[j].equals("start_time")){
                            hashMap.put("start_date",time);
                        }else {
                            hashMap.put("end_date",time);
                        }
                    }else {
                        hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString()));
                    }
                }
                listDate.add(hashMap);
            }
            fieldSetEntity.setValue("parent",fieldSetEntity.getValue("meet_room_uuid").toString());
            HashMap<String,Object> hashMap=new HashMap<>();
            for (int j = 0; j < fieldSetEntity.getValues().keySet().size(); j++) {
                if(fieldSetEntity.getValues().keySet().toArray()[j].toString().equals("start_time") || fieldSetEntity.getValues().keySet().toArray()[j].toString().equals("end_time")){
                    Object meeting_time = fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString());
                    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                    String time = dateFormat.format(meeting_time);
                    hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),time);
                    if(fieldSetEntity.getValues().keySet().toArray()[j].equals("start_time")){
                        hashMap.put("start_date",time);
                    }else {
                        hashMap.put("end_date",time);
                    }
                }else {
                    hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString()));
            }else {
                if(!list.contains(fieldSetEntity.getValue("room_name").toString())){
                    HashMap<String,Object> hashMap=new HashMap<>();
                    hashMap.put("room_name",fieldSetEntity.getValue("room_name").toString());
                    hashMap.put("uuid",fieldSetEntity.getValue("meet_room_uuid").toString());
                    list.add(fieldSetEntity.getValue("room_name").toString());
                    listDate.add(hashMap);
                }
            }
            listDate.add(hashMap);
        }
        return  listDate;