杜洪波
2025-10-13 077457f44c3185da7cf2a46fc46075bf0f1925af
src/main/java/com/product/administration/service/ConferenceManagerService.java
@@ -215,6 +215,9 @@
        return baseDao.delete(fse.getTableName(), fse.getUUID().split(","));
    }
    
    /**
     *    会议看板周信息
     */
    @Override
    @Transactional
    public DataTableEntity getKanBanData(FieldSetEntity fse) {
@@ -355,115 +358,115 @@
        }
    }
    @Override
    @Transactional
    public List getkbData(FieldSetEntity fse) throws BaseException {
        List<Object>param=new ArrayList<>();
        String meeting_date= fse.getString("meeting_date");
        String meeting_date_end= fse.getString("meeting_date_end");
        String meeting_resource = fse.getString("meeting_resource");
        param.add(meeting_date);
        param.add(meeting_date_end);
        String replace_meeting_resource="";
        if(!StringUtils.isEmpty(meeting_resource)){
            String[] split = meeting_resource.split(",");
            for (int i = 0; i < split.length; i++) {
                if(i!=split.length-1){
                    replace_meeting_resource=replace_meeting_resource+"y.meeting_resource like '%"+split[i]+"%' and ";
                }else {
                    replace_meeting_resource=replace_meeting_resource+"y.meeting_resource like '%"+split[i]+"%'";
                }
            }
        }
        StringBuilder bs=new StringBuilder();
        bs.append(" SELECT DISTINCT  g.room_name,g.uuid as meet_room_uuid,DATE_FORMAT(y.start_time, \"%d-%m-%Y %H:%i\")  start_time_format,DATE_FORMAT(y.end_time, \"%d-%m-%Y %H:%i\")  end_time_format,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 y.start_time between  ? and ? ");
        if(!StringUtils.isEmpty(meeting_resource)){
            bs.append(" where ( "+replace_meeting_resource+" )");
        }
        bs.append(" ORDER BY y.start_time");
        DataTableEntity dataTableEntity = baseDao.listTable(bs.toString(), param.toArray());
        List<String> list=new ArrayList();
        List<HashMap> listDate=new ArrayList<>();
        for(int i=0;i<dataTableEntity.getRows();i++){
            FieldSetEntity fieldSetEntity = dataTableEntity.getData().get(i);
            //初始化会议室的使用的状态
            String filter=" meeting_room = '"+fieldSetEntity.getString("meeting_room")+"' and start_time between '"+meeting_date+"'  and '"+meeting_date_end+"'";
            DataTableEntity product_oa_conference_apply = baseDao.listTable("product_oa_conference_apply", filter, new Object[]{});
            for (int i1 = 0; i1 < product_oa_conference_apply.getRows(); i1++) {
                FieldSetEntity fieldSetEntity1 = product_oa_conference_apply.getFieldSetEntity(i1);
                Date date = new Date();
                if(date.before(fieldSetEntity1.getDate("start_time"))){
                    fieldSetEntity1.setValue("status","未开始");
                }else if(date.after(fieldSetEntity1.getDate("end_time"))){
                    fieldSetEntity1.setValue("status","已结束");
                }else {
                    fieldSetEntity1.setValue("status","会议中");
                }
                baseDao.executeUpdate("update product_oa_conference_apply set status='"+fieldSetEntity1.getString("status")+"' where uuid='"+fieldSetEntity1.getString("uuid")+"'");
            }
            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 = null;
                    for (int j = 0; j < dataTableEntity.getRows(); j++) {
                        FieldSetEntity fieldSetEntity1 = dataTableEntity.getFieldSetEntity(j);
                        if(fieldSetEntity1.getString("room_name").equals(hashMap.get("room_name"))){
                            getStartTime = fieldSetEntity1.getValue("start_time");
                            SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm");
                            String time = dateFormat.format(getStartTime);
                            hashMap.put("start_time",time);
                            break;
                        }
                    }
                    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<>();
                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);
            }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());
                    hashMap.put("start_time","");
                    list.add(fieldSetEntity.getValue("room_name").toString());
                    listDate.add(hashMap);
                }
            }
        }
        return  listDate;
    }
//    @Override
//    @Transactional
//    public List getkbData(FieldSetEntity fse) throws BaseException {
//        List<Object>param=new ArrayList<>();
//        String meeting_date= fse.getString("meeting_date");
//        String meeting_date_end= fse.getString("meeting_date_end");
//        String meeting_resource = fse.getString("meeting_resource");
//        param.add(meeting_date);
//        param.add(meeting_date_end);
//        String replace_meeting_resource="";
//        if(!StringUtils.isEmpty(meeting_resource)){
//
//            String[] split = meeting_resource.split(",");
//            for (int i = 0; i < split.length; i++) {
//                if(i!=split.length-1){
//                    replace_meeting_resource=replace_meeting_resource+"y.meeting_resource like '%"+split[i]+"%' and ";
//                }else {
//                    replace_meeting_resource=replace_meeting_resource+"y.meeting_resource like '%"+split[i]+"%'";
//                }
//            }
//        }
//        StringBuilder bs=new StringBuilder();
//        bs.append(" SELECT DISTINCT  g.room_name,g.uuid as meet_room_uuid,DATE_FORMAT(y.start_time, \"%d-%m-%Y %H:%i\")  start_time_format,DATE_FORMAT(y.end_time, \"%d-%m-%Y %H:%i\")  end_time_format,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 y.start_time between  ? and ? ");
//        if(!StringUtils.isEmpty(meeting_resource)){
//            bs.append(" where ( "+replace_meeting_resource+" )");
//        }
//        bs.append(" ORDER BY y.start_time");
//        DataTableEntity dataTableEntity = baseDao.listTable(bs.toString(), param.toArray());
//        List<String> list=new ArrayList();
//        List<HashMap> listDate=new ArrayList<>();
//
//        for(int i=0;i<dataTableEntity.getRows();i++){
//            FieldSetEntity fieldSetEntity = dataTableEntity.getData().get(i);
//
//            //初始化会议室的使用的状态
//            String filter=" meeting_room = '"+fieldSetEntity.getString("meeting_room")+"' and start_time between '"+meeting_date+"'  and '"+meeting_date_end+"'";
//            DataTableEntity product_oa_conference_apply = baseDao.listTable("product_oa_conference_apply", filter, new Object[]{});
//            for (int i1 = 0; i1 < product_oa_conference_apply.getRows(); i1++) {
//                FieldSetEntity fieldSetEntity1 = product_oa_conference_apply.getFieldSetEntity(i1);
//                Date date = new Date();
//                if(date.before(fieldSetEntity1.getDate("start_time"))){
//                    fieldSetEntity1.setValue("status","未开始");
//                }else if(date.after(fieldSetEntity1.getDate("end_time"))){
//                    fieldSetEntity1.setValue("status","已结束");
//                }else {
//                    fieldSetEntity1.setValue("status","会议中");
//                }
//                baseDao.executeUpdate("update product_oa_conference_apply set status='"+fieldSetEntity1.getString("status")+"' where uuid='"+fieldSetEntity1.getString("uuid")+"'");
//            }
//
//            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 = null;
//                    for (int j = 0; j < dataTableEntity.getRows(); j++) {
//                        FieldSetEntity fieldSetEntity1 = dataTableEntity.getFieldSetEntity(j);
//                        if(fieldSetEntity1.getString("room_name").equals(hashMap.get("room_name"))){
//                            getStartTime = fieldSetEntity1.getValue("start_time");
//                            SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy HH:mm");
//                            String time = dateFormat.format(getStartTime);
//                            hashMap.put("start_time",time);
//                            break;
//                        }
//
//                    }
//                    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<>();
//                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);
//
//            }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());
//                    hashMap.put("start_time","");
//                    list.add(fieldSetEntity.getValue("room_name").toString());
//                    listDate.add(hashMap);
//                }
//            }
//
//        }
//        return  listDate;
//    }
    @Override
    public List getMeetingDetails(FieldSetEntity fse) throws BaseException {
@@ -647,8 +650,6 @@
    @Override
    public String ConferenceSign(FieldSetEntity fse) throws BaseException, ParseException {
        JSONObject jsonObject = new JSONObject();
        if(!StringUtils.isEmpty(fse.getString("uuid"))&&!StringUtils.isEmpty(fse.getString("date"))){
            String uuid = fse.getString("uuid");
@@ -687,31 +688,25 @@
        return jsonObject.toString();
    }
    @Override
    public HashMap getSignOrVisitInfo(FieldSetEntity fse) throws BaseException {
       String meeting_uuid = fse.getString("meeting_uuid");
       //type=1就是签到数据,type=2就是访问数据
          String type = fse.getString("type");
        List<Object> params=new ArrayList<>();
        params.add(meeting_uuid);
        params.add(meeting_uuid);
        StringBuilder sb=new StringBuilder();
    /**
     *    获取会议访问/签到信息
     */
    public DataTableEntity getMeetingSignOrVisit(FieldSetEntity fse) throws BaseException {
       String meeting_uuid = fse.getString("meeting_uuid");
       String type = fse.getString("type");
       StringBuilder sb = new StringBuilder();
        sb.append("\nSELECT c.* FROM ( ");
        sb.append("\n  SELECT b.staff_id,b.uuid as meeting_uuid,f.show_name,l.uuid as dept_uuid,l.org_level_name,");
        if(type.equals("1")){
         sb.append(" n.sign_status");
           sb.append(" n.sign_status");
        }else {
            sb.append(" n.visit_status");
        }
        sb.append("\n  FROM (" );
        sb.append("\n    SELECT y.*, ");
        sb.append("\n      SUBSTRING_INDEX( SUBSTRING_INDEX( participator, ',', n ), ',', - 1 ) AS staff_id");
        sb.append("\n    FROM product_oa_conference_apply y, ");
        sb.append("\n    ( SELECT @rownum := @rownum + 1 AS n FROM ( SELECT @rownum := 0 ) r, product_oa_conference_apply ) x ");
        sb.append("\n    WHERE 1 = 1 ");
        sb.append("\n    AND n <= ( LENGTH( participator ) - LENGTH( REPLACE ( participator, ',', '' ) ) + 1 )");
        sb.append("\n    FROM product_oa_conference_apply y,(SELECT @rownum := @rownum + 1 AS n FROM ( SELECT @rownum := 0 ) r, product_oa_conference_apply ) x ");
        sb.append("\n    WHERE 1 = 1 AND n <= ( LENGTH( participator ) - LENGTH( REPLACE ( participator, ',', '' ) ) + 1 )");
        sb.append("\n    and y.uuid= ? ");
        sb.append("\n  )b ");
        sb.append("\n  LEFT JOIN product_sys_staffs f on b.staff_id=f.user_id ");
@@ -721,81 +716,124 @@
        }else {
            sb.append("\n  LEFT JOIN product_oa_conference_visit n ");
        }
        sb.append("\n  on b.staff_id=n.user_id and n.meeting_uuid=? ");
        sb.append(" )c");
        DataTableEntity dataTableEntity = baseDao.listTable(sb.toString(),params.toArray());
        List<HashMap> listDate=new ArrayList<>();
        List<HashMap> listDateSign=new ArrayList<>();
        List<HashMap> listDateNoSign=new ArrayList<>();
        List<String> list=new ArrayList();
        int sign_count=0;
        int sign_all=0;
        int sign_down=0;
        HashMap<String,Object> hashMapResult=new HashMap<>();
        sb.append("\n  ON b.staff_id=n.user_id and n.meeting_uuid=? ");
        sb.append("\n)c");
        // 获取会议访问/签到信息
        DataTableEntity dataTableEntity = baseDao.listTable(sb.toString(), new Object[] {meeting_uuid, meeting_uuid});
        // 遍历会议访问/签到信息
        for (int i = 0; i < dataTableEntity.getRows(); i++) {
            FieldSetEntity fieldSetEntity = dataTableEntity.getFieldSetEntity(i);
            if(!list.contains(fieldSetEntity.getString("org_level_name"))){
                HashMap<String,Object> hashMap=new HashMap<>();
                hashMap.put("dept_uuid",fieldSetEntity.getString("dept_uuid"));
                hashMap.put("org_level_name",fieldSetEntity.getString("org_level_name"));
                list.add(fieldSetEntity.getString("org_level_name"));
                listDate.add(hashMap);
            }
            fieldSetEntity.setValue("parent",fieldSetEntity.getString("dept_uuid"));
            HashMap<String,Object> hashMap=new HashMap<>();
            for (int j = 0; j < fieldSetEntity.getValues().keySet().size(); j++) {
                hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString()));
            }
            listDate.add(hashMap);
           FieldSetEntity fieldSetEntity = dataTableEntity.getFieldSetEntity(i);
        }
        sign_all=listDate.size();
        List<String> list1=new ArrayList();
        List<String> list2=new ArrayList();
        for (int j = 0; j < listDate.size(); j++) {
            if((ObjectUtil.isNotEmpty(listDate.get(j).get("sign_status"))&&listDate.get(j).get("sign_status").equals("已签到")) || (ObjectUtil.isNotEmpty(listDate.get(j).get("visit_status"))&&listDate.get(j).get("visit_status").equals("已访问"))  ){
                if(!list1.contains(listDate.get(j).get("org_level_name"))){
                    list1.add(listDate.get(j).get("org_level_name").toString());
                    HashMap<String,Object> hashMap=new HashMap<>();
                    hashMap.put("dept_uuid",listDate.get(j).get("dept_uuid"));
                    hashMap.put("org_level_name",listDate.get(j).get("org_level_name"));
                    listDateSign.add(hashMap);
                }
                sign_count++;
                //避免重复添加部门
                if(listDate.get(j).size()!=2){
                    listDateSign.add(listDate.get(j));
                }
            }else {
                if(!list2.contains(listDate.get(j).get("org_level_name"))){
                    list2.add(listDate.get(j).get("org_level_name").toString());
                    HashMap<String,Object> hashMap=new HashMap<>();
                    hashMap.put("dept_uuid",listDate.get(j).get("dept_uuid"));
                    hashMap.put("org_level_name",listDate.get(j).get("org_level_name"));
                    listDateNoSign.add(hashMap);
                }
                //避免重复添加部门
                if(listDate.get(j).size()!=2){
                    listDateNoSign.add(listDate.get(j));
                }
            }
        }
        sign_down=sign_all-sign_count;
        hashMapResult.put("signOrvisit_down",sign_count);
        hashMapResult.put("no_signOrvisit",sign_down);
        hashMapResult.put("listDateNoSignOrVisit",listDateNoSign);
        hashMapResult.put("listDateSignOrVisit",listDateSign);
        return  hashMapResult;
        return dataTableEntity;
    }
//    @Override
//    public HashMap getSignOrVisitInfo(FieldSetEntity fse) throws BaseException {
//
//       String meeting_uuid = fse.getString("meeting_uuid");
//       //type=1就是签到数据,type=2就是访问数据
//          String type = fse.getString("type");
//        List<Object> params=new ArrayList<>();
//        params.add(meeting_uuid);
//        params.add(meeting_uuid);
//
//        StringBuilder sb = new StringBuilder();
//        sb.append("\nSELECT c.* FROM ( ");
//        sb.append("\n  SELECT b.staff_id,b.uuid as meeting_uuid,f.show_name,l.uuid as dept_uuid,l.org_level_name,");
//        if(type.equals("1")){
//           sb.append(" n.sign_status");
//        }else {
//            sb.append(" n.visit_status");
//        }
//        sb.append("\n  FROM (" );
//        sb.append("\n    SELECT y.*, ");
//        sb.append("\n      SUBSTRING_INDEX( SUBSTRING_INDEX( participator, ',', n ), ',', - 1 ) AS staff_id");
//        sb.append("\n    FROM product_oa_conference_apply y,(SELECT @rownum := @rownum + 1 AS n FROM ( SELECT @rownum := 0 ) r, product_oa_conference_apply ) x ");
//        sb.append("\n    WHERE 1 = 1 AND n <= ( LENGTH( participator ) - LENGTH( REPLACE ( participator, ',', '' ) ) + 1 )");
//        sb.append("\n    and y.uuid= ? ");
//        sb.append("\n  )b ");
//        sb.append("\n  LEFT JOIN product_sys_staffs f on b.staff_id=f.user_id ");
//        sb.append("\n  LEFT JOIN product_sys_org_levels l on f.dept_uuid=l.uuid ");
//        if(type.equals("1")){
//            sb.append("\n  LEFT JOIN product_oa_conference_sign n ");
//        }else {
//            sb.append("\n  LEFT JOIN product_oa_conference_visit n ");
//        }
//        sb.append("\n  ON b.staff_id=n.user_id and n.meeting_uuid=? ");
//        sb.append("\n)c");
//        // 获取会议访问/签到信息
//        DataTableEntity dataTableEntity = baseDao.listTable(sb.toString(), params.toArray());
//
//        // 部门信息存储
//        List<HashMap<String, Object>> listDate = new ArrayList<>();
//        List<HashMap> listDateSign = new ArrayList<>();
//        List<HashMap> listDateNoSign = new ArrayList<>();
//        // 相关人员所属部门
//        List<String> listDeptName = new ArrayList<>();
//
//        HashMap<String,Object> hashMapResult=new HashMap<>();
//
//        // 遍历会议访问/签到信息
//        for (int i = 0; i < dataTableEntity.getRows(); i++) {
//            FieldSetEntity fieldSetEntity = dataTableEntity.getFieldSetEntity(i);
//            // 新部门人员
//            if(!listDeptName.contains(fieldSetEntity.getString(CmnConst.ORG_LEVEL_NAME))){
//                HashMap<String,Object> hashMap = new HashMap<>();
//                hashMap.put(CmnConst.DEPT_UUID, fieldSetEntity.getString(CmnConst.DEPT_UUID));
//                hashMap.put(CmnConst.ORG_LEVEL_NAME, fieldSetEntity.getString(CmnConst.ORG_LEVEL_NAME));
//                listDeptName.add(fieldSetEntity.getString(CmnConst.ORG_LEVEL_NAME));
//                listDate.add(hashMap);
//            }
//            fieldSetEntity.setValue("parent", fieldSetEntity.getString("dept_uuid"));
//            HashMap<String,Object> hashMap=new HashMap<>();
//            for (int j = 0; j < fieldSetEntity.getValues().keySet().size(); j++) {
//                hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString()));
//            }
//            listDate.add(hashMap);
//
//        }
//        int sign_all = listDate.size();
//        int sign_count=0;
//        List<String> list1=new ArrayList<>();
//        List<String> list2=new ArrayList<>();
//        for (int j = 0; j < listDate.size(); j++) {
//           HashMap<String, Object> mapdata = listDate.get(j);
//            if((ObjectUtil.isNotEmpty(mapdata.get("sign_status")) && mapdata.get("sign_status").equals("已签到"))
//                  || (ObjectUtil.isNotEmpty(mapdata.get("visit_status")) && mapdata.get("visit_status").equals("已访问"))  ){
//                if(!list1.contains(mapdata.get("org_level_name"))){
//                    list1.add(mapdata.get("org_level_name").toString());
//                    HashMap<String,Object> hashMap=new HashMap<>();
//                    hashMap.put("dept_uuid", mapdata.get("dept_uuid"));
//                    hashMap.put("org_level_name", mapdata.get("org_level_name"));
//                    listDateSign.add(hashMap);
//                }
//                sign_count++;
//                //避免重复添加部门
//                if(mapdata.size()!=2){
//                    listDateSign.add(mapdata);
//                }
//
//            }else {
//                if(!list2.contains(mapdata.get("org_level_name"))){
//                    list2.add(mapdata.get("org_level_name").toString());
//                    HashMap<String,Object> hashMap=new HashMap<>();
//                    hashMap.put("dept_uuid", mapdata.get("dept_uuid"));
//                    hashMap.put("org_level_name", mapdata.get("org_level_name"));
//                    listDateNoSign.add(hashMap);
//                }
//                //避免重复添加部门
//                if(mapdata.size()!=2){
//                    listDateNoSign.add(mapdata);
//                }
//            }
//        }
//        int sign_down=sign_all-sign_count;
//        hashMapResult.put("signOrvisit_down",sign_count);
//        hashMapResult.put("no_signOrvisit",sign_down);
//        hashMapResult.put("listDateNoSignOrVisit",listDateNoSign);
//        hashMapResult.put("listDateSignOrVisit",listDateSign);
//        return  hashMapResult;
//    }
    @Override
    public void sendMsg(FieldSetEntity fse) throws BaseException {
@@ -1120,7 +1158,6 @@
            fieldSetEntity.setValue("meetint_type", fieldSetEntity.getString("meetint_type_save_value"));
        }
        //存储访问记录
        SystemUser currentUser = SpringMVCContextHolder.getCurrentUser();
        String fliter="meeting_uuid='"+fse.getUUID()+"' and  user_id='"+currentUser.getUser_id()+"'";
@@ -1134,23 +1171,21 @@
            fieldSetEntity1.setValue("visit_date_new",new Date());
            baseDao.update(fieldSetEntity1);
        }else {
        FieldSetEntity fieldSetEntityVisit = new FieldSetEntity();
        fieldSetEntityVisit.setTableName("product_oa_conference_visit");
        fieldSetEntityVisit.setValue("visit_user",currentUser.getUser_name());
        fieldSetEntityVisit.setValue("user_id",currentUser.getUser_id());
        fieldSetEntityVisit.setValue("org_level_uuid","00000000-0000-0000-0000-000000000000");
        fieldSetEntityVisit.setValue("organization",currentUser.getDept_uuid());
        fieldSetEntityVisit.setValue("organization_name",currentUser.getCurrentDept().getString("org_level_name"));
        fieldSetEntityVisit.setValue("visit_date_first",new Date());
        fieldSetEntityVisit.setValue("visit_date_new",new Date());
        fieldSetEntityVisit.setValue("visit_count",1);
        fieldSetEntityVisit.setValue("visit_status","已访问");
        fieldSetEntityVisit.setValue("meeting_uuid",fse.getUUID());
        BaseUtil.createCreatorAndCreationTime(SpringMVCContextHolder.getCurrentUser(), fieldSetEntityVisit);
        baseDao.add(fieldSetEntityVisit);
           FieldSetEntity fieldSetEntityVisit = new FieldSetEntity();
           fieldSetEntityVisit.setTableName("product_oa_conference_visit");
           fieldSetEntityVisit.setValue("visit_user",currentUser.getUser_name());
           fieldSetEntityVisit.setValue("user_id",currentUser.getUser_id());
           fieldSetEntityVisit.setValue("org_level_uuid","00000000-0000-0000-0000-000000000000");
           fieldSetEntityVisit.setValue("organization",currentUser.getDept_uuid());
           fieldSetEntityVisit.setValue("organization_name",currentUser.getCurrentDept().getString("org_level_name"));
           fieldSetEntityVisit.setValue("visit_date_first",new Date());
           fieldSetEntityVisit.setValue("visit_date_new",new Date());
           fieldSetEntityVisit.setValue("visit_count",1);
           fieldSetEntityVisit.setValue("visit_status","已访问");
           fieldSetEntityVisit.setValue("meeting_uuid",fse.getUUID());
           BaseUtil.createCreatorAndCreationTime(SpringMVCContextHolder.getCurrentUser(), fieldSetEntityVisit);
           baseDao.add(fieldSetEntityVisit);
        }
        return fieldSetEntity;
    }
@@ -1202,6 +1237,19 @@
        baseDao.loadPromptData(dt);
        return dt;
    }
    /**
     *    会议纪要列表
     * @param fse
     * @return
     */
    public DataTableEntity listMeetingMinute(FieldSetEntity fse) {
       StringBuilder sbSql = new StringBuilder();
       sbSql.append("\nSELECT B.meeting_topic, A.*");
       sbSql.append("\nFROM product_oa_conference_minute A");
       sbSql.append("\nLEFT JOIN product_oa_conference_apply B ON B.meeting_uuid = A.uuid");
       return baseDao.listTable(sbSql.toString(), new Object[] {}, fse.getInteger(CmnConst.PAGESIZE), fse.getInteger(CmnConst.CPAGE));
    }
    public void taskMeetingRminder() {
        DataTableEntity dt = baseDao.listTable(CmnConst.PRODUCT_OA_CONFERENCE_APPLY, " flow_flag=2 and ( to_remind IS NULL OR to_remind = 0 ) AND reminder_time > 0 and reminder_time>=(( UNIX_TIMESTAMP(start_time ) - UNIX_TIMESTAMP( now( ) ) ) / 60) ", new Object[]{});