|
@@ -1,16 +1,21 @@
|
|
|
package com.template.controller;
|
|
package com.template.controller;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.template.annotation.DESRespondSecret;
|
|
import com.template.annotation.DESRespondSecret;
|
|
|
import com.template.api.SmartAccessControllerAPI;
|
|
import com.template.api.SmartAccessControllerAPI;
|
|
|
import com.template.common.utils.ExcelUtils;
|
|
import com.template.common.utils.ExcelUtils;
|
|
|
import com.template.model.pojo.SmartAccess;
|
|
import com.template.model.pojo.SmartAccess;
|
|
|
|
|
+import com.template.model.pojo.SmartCarAccess;
|
|
|
import com.template.model.result.CommonResult;
|
|
import com.template.model.result.CommonResult;
|
|
|
import com.template.model.result.PageUtils;
|
|
import com.template.model.result.PageUtils;
|
|
|
import com.template.model.vo.SmartAccessVo;
|
|
import com.template.model.vo.SmartAccessVo;
|
|
|
import com.template.model.vo.SmartAttendanceVo;
|
|
import com.template.model.vo.SmartAttendanceVo;
|
|
|
|
|
+import com.template.model.vo.TotalCountVo;
|
|
|
import com.template.services.SmartAccessService;
|
|
import com.template.services.SmartAccessService;
|
|
|
|
|
+import com.template.services.SmartCarAccessService;
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
import org.apache.poi.ss.usermodel.Workbook;
|
|
@@ -40,6 +45,9 @@ public class SmartAccessController implements SmartAccessControllerAPI {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
SmartAccessService smartAccessService;
|
|
SmartAccessService smartAccessService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ SmartCarAccessService smartCarAccessService;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
@DESRespondSecret(validated = true)
|
|
@DESRespondSecret(validated = true)
|
|
|
public CommonResult getPage(Integer currentPage, Integer pageCount, String keyWord,Integer gradeId, Integer classId, Integer departmentId,String openType,String resultStatus,String startTime,String endTime) {
|
|
public CommonResult getPage(Integer currentPage, Integer pageCount, String keyWord,Integer gradeId, Integer classId, Integer departmentId,String openType,String resultStatus,String startTime,String endTime) {
|
|
@@ -137,5 +145,18 @@ public class SmartAccessController implements SmartAccessControllerAPI {
|
|
|
PageUtils<SmartAccessVo> pageUtils=smartAccessService.getAccessPage(currentPage,pageCount,keyWord,gradeId,classId,resultStatus,inOut,startTime,endTime);
|
|
PageUtils<SmartAccessVo> pageUtils=smartAccessService.getAccessPage(currentPage,pageCount,keyWord,gradeId,classId,resultStatus,inOut,startTime,endTime);
|
|
|
return CommonResult.ok(pageUtils);
|
|
return CommonResult.ok(pageUtils);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ @DESRespondSecret(validated = true)
|
|
|
|
|
+ public CommonResult totalCount() {
|
|
|
|
|
+ Wrapper<SmartAccess> wrapperAccess=new LambdaQueryWrapper<>();
|
|
|
|
|
+ int countAccess = smartAccessService.count(wrapperAccess);
|
|
|
|
|
+ Wrapper<SmartCarAccess> wrapperCar=new LambdaQueryWrapper<>();
|
|
|
|
|
+ int countCar = smartCarAccessService.count(wrapperCar);
|
|
|
|
|
+ TotalCountVo totalCountVo = new TotalCountVo();
|
|
|
|
|
+ totalCountVo.setAccessCount(countAccess);
|
|
|
|
|
+ totalCountVo.setCarCount(countCar);
|
|
|
|
|
+ return CommonResult.ok(totalCountVo);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|