|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.alibaba.fastjson.JSONObject; | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.service.business.third.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.utils.Constants; | 
|---|
|  |  |  | import com.doumee.dao.business.join.BookingsJoinMapper; | 
|---|
|  |  |  | import com.doumee.dao.business.join.RoomsJoinMapper; | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.github.yulichang.wrapper.MPJLambdaWrapper; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RestController; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.math.BigDecimal; | 
|---|
|  |  |  | import java.math.RoundingMode; | 
|---|
|  |  |  | import java.text.ParseException; | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | 
|---|
|  |  |  | bookquery.eq(Bookings::getIsdeleted, Constants.ZERO); | 
|---|
|  |  |  | bookquery.eq(Bookings::getStatus, Constants.ZERO); | 
|---|
|  |  |  | bookquery.apply("DATE_FORMAT(t.START_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d') " ); | 
|---|
|  |  |  | Integer   todayBookingsNum= bookingsJoinMapper.selectCount(bookquery); | 
|---|
|  |  |  | Long  todayBookingsNum= bookingsJoinMapper.selectCount(bookquery); | 
|---|
|  |  |  | json.put("todayBookingsNum",todayBookingsNum); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //今日会议时长(小时) | 
|---|
|  |  |  | 
|---|
|  |  |  | bq2.eq(Bookings::getStatus, Constants.ZERO); | 
|---|
|  |  |  | bq2.apply("DATE_FORMAT(t.START_TIME,'%Y-%m-%d') = DATE_FORMAT(now(),'%Y-%m-%d') " ); | 
|---|
|  |  |  | // bq2.last("limit 1"); | 
|---|
|  |  |  | bq2.select("(select count(u.id) from user_rel u where u.ISDELETED=0 and u.OBJ_ID=t.id)as bookingUser"); | 
|---|
|  |  |  | bq2.select("(select count(u.id) from meeting_user_rel u where u.ISDELETED=0 and u.OBJ_ID=t.id)as bookingUser"); | 
|---|
|  |  |  | List<Bookings> bk2= bookingsJoinMapper.selectJoinList(Bookings.class,bq2); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Integer bookingUser=0; | 
|---|
|  |  |  | 
|---|
|  |  |  | MPJLambdaWrapper<Rooms> rm1 = new MPJLambdaWrapper<>(); | 
|---|
|  |  |  | rm1.eq(Rooms::getIsdeleted, Constants.ZERO); | 
|---|
|  |  |  | rm1.eq(Rooms::getStatus, Constants.ZERO); | 
|---|
|  |  |  | Integer roomNum=  roomsJoinMapper.selectCount(rm1); | 
|---|
|  |  |  | Long roomNum=  roomsJoinMapper.selectCount(rm1); | 
|---|
|  |  |  | json.put("roomNum",roomNum); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //员工数量 | 
|---|