1.修改小程序端跨运营商无法显示开门记录的bug
This commit is contained in:
gaoben 2021-11-08 14:18:03 +08:00
parent 4d60ca38aa
commit bc8cb2a220
1 changed files with 35 additions and 32 deletions

View File

@ -280,41 +280,44 @@ public class AppInfoApiController {
} }
AppUserScopeEntity scope = appUserScopeService.getById(user.getCurrentScopeId()); 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; if(scope.getRoleId() == Constant.ROLE_TEN_CELL){
String recordTimeEnd = null; params.put("cellId",scope.getCellId().toString());
if(during == 0){ //当天 PageUtils page = tenRecordService.queryPage(params);
recordTimeStart = MyDateUtils.getCurrentDayStartTime(); return R.ok().put("data", page);
recordTimeEnd = MyDateUtils.getCurrentDayEndTime(); }
}else if(during == 1){ //本周 //业主
recordTimeStart = MyDateUtils.getCurrentWeekStartTime(); else if(scope.getRoleId() == Constant.PERSON_TYPE_OWNER
recordTimeEnd = MyDateUtils.getCurrentWeekEndTime(); || scope.getRoleId() == Constant.PERSON_TYPE_MEMBER
}else if(during == 1){ //本月 || scope.getRoleId() == Constant.PERSON_TYPE_TENANT){
recordTimeStart = MyDateUtils.getCurrentMonthStartTime(); TenPersonEntity personEntity = tenPersonService.getById(scope.getPersonId(),scope.getCellId());
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());
// pList = tenPersonService.getByRoomId(personEntity.getRoomId(),scope.getCellId(),key); // pList = tenPersonService.getByRoomId(personEntity.getRoomId(),scope.getCellId(),key);
params.put("cellId",scope.getCellId().toString()); params.put("cellId",scope.getCellId().toString());
params.put("roomId",personEntity.getRoomId().toString()); params.put("roomId",personEntity.getRoomId().toString());
PageUtils page = tenRecordService.queryPageRoomRecord(params); PageUtils page = tenRecordService.queryPageRoomRecord(params);
return R.ok().put("data", page); return R.ok().put("data", page);
}
} }
return R.ok().put("data",new PageUtils(new ArrayList<>(),0,0,0)); return R.ok().put("data",new PageUtils(new ArrayList<>(),0,0,0));
} }