From 82271cc1140d5a56b103544d1a02142289fd84a0 Mon Sep 17 00:00:00 2001 From: 18756 <1875631620@qq.com> Date: 星期五, 16 八月 2024 14:59:02 +0800 Subject: [PATCH] 会议室看板8.16 --- src/main/java/com/product/administration/service/ConferenceManagerService.java | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/product/administration/service/ConferenceManagerService.java b/src/main/java/com/product/administration/service/ConferenceManagerService.java index 758e224..fc520c9 100644 --- a/src/main/java/com/product/administration/service/ConferenceManagerService.java +++ b/src/main/java/com/product/administration/service/ConferenceManagerService.java @@ -122,10 +122,10 @@ if (nameVerification!=null) { throw new BaseException(SystemCode.CONFERENCE_ROOM_SAVE_FIAL_DUPLICATE_NAME.getValue(), SystemCode.CONFERENCE_ROOM_SAVE_FIAL_DUPLICATE_NAME.getText()); } - + BaseUtil.createCreatorAndCreationTime(SpringMVCContextHolder.getCurrentUser(), fse); //閲嶅悕楠岃瘉 - + return baseDao.saveFieldSetEntity(fse); } @@ -200,6 +200,54 @@ 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; + } + /** * 浼氳瀹や娇鐢ㄦ儏鍐� -- Gitblit v1.9.2