许鹏程
2024-08-23 394d19ca078d342474a8803db3186452348ac113
src/main/java/com/product/administration/service/ConferenceManagerService.java
@@ -227,13 +227,12 @@
        }
        StringBuilder bs=new StringBuilder();
        bs.append(" SELECT DISTINCT y.*, g.room_name,g.uuid as meet_room_uuid ");
        bs.append(" FROM product_oa_conference_apply y");
        bs.append(" left JOIN product_oa_conference_room_config g ");
        bs.append(" on y.meeting_room=g.uuid ");
        bs.append(" where DATE_FORMAT(y.start_time,\"%Y-%m-%d\")=?");
        bs.append(" SELECT DISTINCT  g.room_name,g.uuid as meet_room_uuid,y.* ");
        bs.append(" FROM product_oa_conference_room_config g");
        bs.append(" left JOIN  product_oa_conference_apply y ");
        bs.append(" on y.meeting_room=g.uuid and DATE_FORMAT(y.start_time,\"%Y-%m-%d\")=? ");
        if(!StringUtils.isEmpty(meeting_resource)){
            bs.append(" and  y.meeting_resource like ? ");
            bs.append(" where  y.meeting_resource like ? ");
        }
        bs.append(" ORDER BY y.start_time");
        DataTableEntity dataTableEntity = baseDao.listTable(bs.toString(), param.toArray());
@@ -258,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;
@@ -612,9 +623,13 @@
        String meeting_uuid= fse.getString("meeting_uuid");
        String type = fse.getString("type");
        String user_ids = fse.getString("user_ids");
        FieldSetEntity product_oa_conference_apply = baseDao.getFieldSetEntity("product_oa_conference_apply", meeting_uuid, false);
        List<Object> params=new ArrayList<>();
        //此方式是根据后台自动统计未访问人员
       /* List<Object> params=new ArrayList<>();
        params.add(meeting_uuid);
        params.add(meeting_uuid);
@@ -660,7 +675,7 @@
                user_ids=user_ids+fieldSetEntity.getString("staff_id")+",";
            }
        }
        }*/
        String content="";
        if(type.equals("1")){
            content="会议将开始签到,"+product_oa_conference_apply.getString("meeting_topic")+"-"+product_oa_conference_apply.getString("start_time")+",请按时签到";
@@ -670,7 +685,7 @@
        SystemUser currentUser = SpringMVCContextHolder.getCurrentUser();
        int user_id = currentUser.getUser_id();
        String send_user=user_id+"";
        String reminder_mode = product_oa_conference_apply.getString("reminder_mode");
        //String reminder_mode = product_oa_conference_apply.getString("reminder_mode");
     /*   //短信
        if(reminder_mode.equals("0")){
        }
@@ -719,8 +734,8 @@
            sql.append(" b.end_time, ");
        }
        sql.append(" b.flow_flag, ");
        sql.append(" ( SELECT user_name FROM product_sys_users WHERE user_id = b.created_by ) proposer ");
        sql.append(" FROM ");
        sql.append(" ( SELECT user_name FROM product_sys_users WHERE user_id = b.created_by ) proposer ");
        sql.append(" product_oa_CONFERENCE_room_config a ");
        sql.append(" LEFT JOIN ( SELECT flow_flag,meeting_room,uuid,meeting_topic,start_time,end_time,created_by FROM  ");
        sql.append(" product_oa_conference_apply b WHERE ");