| | |
| | | @Transactional |
| | | public boolean delConferenceApply(FieldSetEntity fse) throws BaseException { |
| | | return baseDao.delete(fse.getTableName(), fse.getUUID().split(",")); |
| | | } |
| | | |
| | | @Override |
| | | public List getKbData(FieldSetEntity fse) throws BaseException { |
| | | |
| | | List<Object>param=new ArrayList<>(); |
| | | String meeting_date = fse.getValue("meeting_date").toString(); |
| | | String meeting_resource = fse.getValue("meeting_resource").toString(); |
| | | param.add(meeting_date); |
| | | param.add(meeting_resource); |
| | | 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(start_time,\"%Y-%m-%d\")=?"); |
| | | bs.append(" and meeting_resource in ( ? )"); |
| | | 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); |
| | | 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); |
| | | |
| | | } |
| | | 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); |
| | | }else { |
| | | hashMap.put(fieldSetEntity.getValues().keySet().toArray()[j].toString(),fieldSetEntity.getValue(fieldSetEntity.getValues().keySet().toArray()[j].toString())); |
| | | } |
| | | |
| | | } |
| | | listDate.add(hashMap); |
| | | |
| | | } |
| | | return listDate; |
| | | } |
| | | |
| | | |