|
@@ -50,14 +50,14 @@ public class PersonDeviceLogController {
|
|
|
@ApiImplicitParam(name = "deviceNo",value = "设备编号", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "aliasName",value = "设备别名", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "personName",value = "人员姓名", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "matchStatus",value = "开门类型", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "timeRanges",value = "时间范围", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "timeRanges",value = "时间范围", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "temperatureRanges",value = "温度范围", paramType = "query")
|
|
|
|
|
|
})
|
|
|
public MessageResult<Map> pageList(
|
|
|
String companyId,
|
|
|
String deviceNo,String aliasName,String personName,
|
|
|
- String matchStatus,String timeRanges,
|
|
|
+ String timeRanges,String temperatureRanges,
|
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
@RequestAttribute String subject){
|
|
@@ -84,9 +84,7 @@ public class PersonDeviceLogController {
|
|
|
if(StringUtil.isNotEmpty(personName)){
|
|
|
searchParams.put("personName","%"+personName+"%");
|
|
|
}
|
|
|
- if(StringUtil.isNotEmpty(matchStatus)){
|
|
|
- searchParams.put("matchStatus",matchStatus);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
if(StringUtil.isNotEmpty(timeRanges)){
|
|
|
String[] timeRangeArray = timeRanges.split(",");
|
|
@@ -104,6 +102,28 @@ public class PersonDeviceLogController {
|
|
|
searchParams.put("endTime",endTime);
|
|
|
}
|
|
|
|
|
|
+ if(StringUtil.isNotEmpty(temperatureRanges)){
|
|
|
+ String[] temperatureRangeArray = temperatureRanges.split(",");
|
|
|
+
|
|
|
+ String minTemperature = "";
|
|
|
+ String maxTemperature = "";
|
|
|
+
|
|
|
+ if(temperatureRangeArray.length == 1){
|
|
|
+ minTemperature = temperatureRangeArray[0];
|
|
|
+ }
|
|
|
+ if(temperatureRangeArray.length == 2){
|
|
|
+ minTemperature = temperatureRangeArray[0];
|
|
|
+ maxTemperature = temperatureRangeArray[1];
|
|
|
+ }
|
|
|
+
|
|
|
+ if(StringUtil.isNotEmpty(minTemperature)){
|
|
|
+ searchParams.put("minTemperature",minTemperature);
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotEmpty(maxTemperature)){
|
|
|
+ searchParams.put("maxTemperature",maxTemperature);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Page<PersonDeviceLog> page = personDeviceLogService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
|
msgResult.setResult(true);
|
|
@@ -120,13 +140,13 @@ public class PersonDeviceLogController {
|
|
|
@ApiImplicitParam(name = "deviceNo",value = "设备编号", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "aliasName",value = "设备别名", paramType = "query"),
|
|
|
@ApiImplicitParam(name = "personName",value = "人员姓名", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "matchStatus",value = "开门类型", paramType = "query"),
|
|
|
- @ApiImplicitParam(name = "timeRanges",value = "时间范围", paramType = "query")
|
|
|
+ @ApiImplicitParam(name = "timeRanges",value = "时间范围", paramType = "query"),
|
|
|
+ @ApiImplicitParam(name = "temperatureRanges",value = "温度范围", paramType = "query")
|
|
|
})
|
|
|
public MessageResult<String> exportXls(
|
|
|
String companyId,
|
|
|
String deviceNo,String aliasName,String personName,
|
|
|
- String matchStatus,String timeRanges,
|
|
|
+ String timeRanges,String temperatureRanges,
|
|
|
@RequestAttribute String subject) {
|
|
|
MessageResult<String> msgResult = new MessageResult<>();
|
|
|
|
|
@@ -170,9 +190,6 @@ public class PersonDeviceLogController {
|
|
|
if(StringUtil.isNotEmpty(personName)){
|
|
|
searchParams.put("personName","%"+personName+"%");
|
|
|
}
|
|
|
- if(StringUtil.isNotEmpty(matchStatus)){
|
|
|
- searchParams.put("matchStatus",matchStatus);
|
|
|
- }
|
|
|
|
|
|
if(StringUtil.isNotEmpty(timeRanges)){
|
|
|
String[] timeRangeArray = timeRanges.split(",");
|
|
@@ -190,6 +207,23 @@ public class PersonDeviceLogController {
|
|
|
searchParams.put("endTime",endTime);
|
|
|
}
|
|
|
|
|
|
+ if(StringUtil.isNotEmpty(temperatureRanges)){
|
|
|
+ String[] temperatureRangeArray = temperatureRanges.split(",");
|
|
|
+
|
|
|
+ String minTemperature = "";
|
|
|
+ String maxTemperature = "";
|
|
|
+ if(temperatureRangeArray.length==1){
|
|
|
+ minTemperature = temperatureRangeArray[0];
|
|
|
+ }
|
|
|
+ else if(temperatureRangeArray.length==2){
|
|
|
+ minTemperature = temperatureRangeArray[0];
|
|
|
+ maxTemperature = temperatureRangeArray[1];
|
|
|
+ }
|
|
|
+
|
|
|
+ searchParams.put("minTemperature",minTemperature);
|
|
|
+ searchParams.put("maxTemperature",maxTemperature);
|
|
|
+ }
|
|
|
+
|
|
|
Page<PersonDeviceLog> page = personDeviceLogService.pageSearch(searchParams,1,10000,false,sortList);
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|