| | |
| | | lqw.eq(!StringUtils.isEmpty(String.valueOf(meetingStatistic.getFamilyId())), MeetingStatistic::getFamilyId, meetingStatistic.getFamilyId());
|
| | | return lqw;
|
| | | }
|
| | | public static String getDatePoor(Date endDate, Date nowDate, MeetingStatistic meetingStatistic) {
|
| | | public static void getDatePoor(Date endDate, Date nowDate, MeetingStatistic meetingStatistic) {
|
| | |
|
| | | long nd = 1000 * 24 * 60 * 60;
|
| | | long nh = 1000 * 60 * 60;
|
| | |
| | | long sec = diff % nd % nh % nm / ns;
|
| | | System.out.println(hour + "小时" + min + "分钟"+ sec + "秒");
|
| | | meetingStatistic.setUseTime(hour + "小时" + min + "分钟" + sec + "秒");
|
| | | return meetingStatistic.getUseTime();
|
| | | }
|
| | | private LambdaQueryWrapper<MeetingStatistic> buildCondition(MeetingStatistic meetingStatistic) {
|
| | | LambdaQueryWrapper<MeetingStatistic> lqw = new LambdaQueryWrapper<>();
|
| | |
| | | Page<MeetingStatistic> pageResult = page(meetingStatisticPage, lqw);
|
| | |
|
| | | List<MeetingStatistic> beanRecords = pageResult.getRecords();//得到查询出来的数据
|
| | | System.out.println("-----------数据库-----------"+beanRecords);
|
| | | HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords);
|
| | | return AjaxResult.success(data);
|
| | | }
|
| | |
| | | if (meetingStatistic.getUseTime()==null){
|
| | | if(meetingStatistic.getHappenEndTime()!=null && meetingStatistic.getHappenStartTime() !=null){
|
| | | getDatePoor(meetingStatistic.getHappenEndTime(),meetingStatistic.getHappenStartTime(),meetingStatistic);
|
| | | System.out.println("===============使用时间1====================="+meetingStatistic.getUseTime());
|
| | | newModel.setBy1(meetingStatistic.getUseTime());
|
| | | }
|
| | | else {
|
| | |
| | | // newModel.setBy3(dataById.getConferenceRoom());
|
| | | // }
|
| | | if(meetingStatistic.getTitle()!=null){
|
| | | // System.out.println("===============使用时间2====================="+dataById);
|
| | | // System.out.println("===============使用时间2====================="+meetingStatistic);
|
| | | newModel.setBy2(meetingStatistic.getTitle());
|
| | | }else {
|
| | | // System.out.println("===============使用时间2====================="+dataById);
|
| | | // System.out.println("===============使用时间2====================="+meetingStatistic);
|
| | | newModel.setBy2(dataById.getTitle());
|
| | | }
|
| | | // if(meetingStatistic.getApplyPerson()!=null){
|
| | |
| | | // }else {
|
| | | // newModel.setBy11(dataById.getStatus());
|
| | | // }
|
| | | System.out.println("===============使用时间2====================="+dataById);
|
| | | System.out.println("===============使用时间2====================="+meetingStatistic);
|
| | | UpdateRequest updateRequest = new UpdateRequest("allsearchdata", esResult.getId());
|
| | | updateRequest.doc(
|
| | | "by1",newModel.getBy1(),
|
| | |
| | |
|
| | | );
|
| | |
|
| | | LambdaQueryWrapper<MeetingStatistic> lqw = new LambdaQueryWrapper<>();
|
| | | List<MeetingStatistic> beanRecords = list(lqw);
|
| | | log.info("sss从数据库中查到的为:{}", beanRecords);
|
| | |
|
| | | try {
|
| | | restHighLevelClient.update(updateRequest, RequestOptions.DEFAULT);
|
| | | } catch (IOException e) {
|
| | | throw new RuntimeException(e);
|
| | | }
|
| | |
|
| | |
|
| | | return AjaxResult.success();
|
| | | }else {
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<MeetingStatistic> selectByIds(Long[] ids) {
|
| | | List<MeetingStatistic> list = new ArrayList<>();
|
| | | if (ids.length != 0)
|
| | | list = listByIds(Arrays.asList(ids));
|
| | | else
|
| | | list = list();
|
| | | return list;
|
| | |
|
| | | }
|
| | | @Override
|
| | | public AjaxResult addData(MeetingStatistic meetingStatistic) {
|
| | |
|
| | | ZInfoUser myself = zInfoUserService.getMyself();
|