parent
4d60ca38aa
commit
bc8cb2a220
|
@ -280,41 +280,44 @@ public class AppInfoApiController {
|
|||
}
|
||||
|
||||
AppUserScopeEntity scope = appUserScopeService.getById(user.getCurrentScopeId());
|
||||
params.put("tenantId",user.getTenantId());
|
||||
TenCellEntity cellEntity = tenCellService.getById(scope.getCellId());
|
||||
if(cellEntity!=null){
|
||||
params.put("tenantId",cellEntity.getTenantId());
|
||||
int during = Integer.parseInt((String)params.get("during"));
|
||||
String recordTimeStart = null;
|
||||
String recordTimeEnd = null;
|
||||
if(during == 0){ //当天
|
||||
recordTimeStart = MyDateUtils.getCurrentDayStartTime();
|
||||
recordTimeEnd = MyDateUtils.getCurrentDayEndTime();
|
||||
}else if(during == 1){ //本周
|
||||
recordTimeStart = MyDateUtils.getCurrentWeekStartTime();
|
||||
recordTimeEnd = MyDateUtils.getCurrentWeekEndTime();
|
||||
}else if(during == 2){ //本月
|
||||
recordTimeStart = MyDateUtils.getCurrentMonthStartTime();
|
||||
recordTimeEnd = MyDateUtils.getCurrentMonthEndTime();
|
||||
}
|
||||
params.put("recordTimeStart",recordTimeStart);
|
||||
params.put("recordTimeEnd",recordTimeEnd);
|
||||
|
||||
int during = Integer.parseInt((String)params.get("during"));
|
||||
String recordTimeStart = null;
|
||||
String recordTimeEnd = null;
|
||||
if(during == 0){ //当天
|
||||
recordTimeStart = MyDateUtils.getCurrentDayStartTime();
|
||||
recordTimeEnd = MyDateUtils.getCurrentDayEndTime();
|
||||
}else if(during == 1){ //本周
|
||||
recordTimeStart = MyDateUtils.getCurrentWeekStartTime();
|
||||
recordTimeEnd = MyDateUtils.getCurrentWeekEndTime();
|
||||
}else if(during == 1){ //本月
|
||||
recordTimeStart = MyDateUtils.getCurrentMonthStartTime();
|
||||
recordTimeEnd = MyDateUtils.getCurrentMonthEndTime();
|
||||
}
|
||||
params.put("recordTimeStart",recordTimeStart);
|
||||
params.put("recordTimeEnd",recordTimeEnd);
|
||||
|
||||
///小区管理员
|
||||
if(scope.getRoleId() == Constant.ROLE_TEN_CELL){
|
||||
params.put("cellId",scope.getCellId().toString());
|
||||
PageUtils page = tenRecordService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
//业主
|
||||
else if(scope.getRoleId() == Constant.PERSON_TYPE_OWNER
|
||||
|| scope.getRoleId() == Constant.PERSON_TYPE_MEMBER
|
||||
|| scope.getRoleId() == Constant.PERSON_TYPE_TENANT){
|
||||
TenPersonEntity personEntity = tenPersonService.getById(scope.getPersonId(),scope.getCellId());
|
||||
///小区管理员
|
||||
if(scope.getRoleId() == Constant.ROLE_TEN_CELL){
|
||||
params.put("cellId",scope.getCellId().toString());
|
||||
PageUtils page = tenRecordService.queryPage(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
//业主
|
||||
else if(scope.getRoleId() == Constant.PERSON_TYPE_OWNER
|
||||
|| scope.getRoleId() == Constant.PERSON_TYPE_MEMBER
|
||||
|| scope.getRoleId() == Constant.PERSON_TYPE_TENANT){
|
||||
TenPersonEntity personEntity = tenPersonService.getById(scope.getPersonId(),scope.getCellId());
|
||||
// pList = tenPersonService.getByRoomId(personEntity.getRoomId(),scope.getCellId(),key);
|
||||
params.put("cellId",scope.getCellId().toString());
|
||||
params.put("roomId",personEntity.getRoomId().toString());
|
||||
PageUtils page = tenRecordService.queryPageRoomRecord(params);
|
||||
return R.ok().put("data", page);
|
||||
params.put("cellId",scope.getCellId().toString());
|
||||
params.put("roomId",personEntity.getRoomId().toString());
|
||||
PageUtils page = tenRecordService.queryPageRoomRecord(params);
|
||||
return R.ok().put("data", page);
|
||||
}
|
||||
}
|
||||
|
||||
return R.ok().put("data",new PageUtils(new ArrayList<>(),0,0,0));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue