| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.model.YwPatrolTaskRecord; |
| | | import com.doumee.dao.business.model.YwQuickModel; |
| | | import com.doumee.dao.business.model.YwElectricalWarning; |
| | | import com.doumee.dao.business.vo.DailyEnergyStatVO; |
| | | import com.doumee.dao.business.vo.MonthDataResponse; |
| | | import com.doumee.dao.business.vo.WarningTypeStatVO; |
| | | import com.doumee.dao.business.vo.WorkDeskDataResponse; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.service.business.WorkbenchesService; |
| | | import com.doumee.service.business.YwElectricalWarningService; |
| | | import com.doumee.service.business.YwWorkDeskEnergyService; |
| | | import com.doumee.service.business.YwPatrolTaskRecordService; |
| | | 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.*; |
| | | |
| | |
| | | @Autowired |
| | | private WorkbenchesService workbenchesService; |
| | | |
| | | @Autowired |
| | | private YwElectricalWarningService ywElectricalWarningService; |
| | | |
| | | @Autowired |
| | | private YwWorkDeskEnergyService ywWorkDeskEnergyService; |
| | | |
| | | @ApiOperation("获取快捷菜单模块信息") |
| | | @GetMapping("/getYwQuickList") |
| | | public ApiResponse<List<YwQuickModel>> getYwQuickList(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(workbenchesService.getYwQuickList(getLoginUser(token))); |
| | | } |
| | | |
| | | @ApiOperation("获取默认快捷菜单模块信息") |
| | | @GetMapping("/getDefaultYwQuickList") |
| | | public ApiResponse<List<YwQuickModel>> getDefaultYwQuickList() { |
| | | return ApiResponse.success(workbenchesService.getYwQuickList(null)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("更新快捷模块数据") |
| | | @GetMapping("/updMyYwQuickModel") |
| | | @PostMapping("/updMyYwQuickModel") |
| | | public ApiResponse updMyYwQuickModel(@RequestBody List<Integer> idList,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | workbenchesService.updMyYwQuickModel(idList,getLoginUser(token)); |
| | | return ApiResponse.success("操作成功"); |
| | |
| | | return ApiResponse.success(workbenchesService.workDeskData(getLoginUser(token))); |
| | | } |
| | | |
| | | @ApiOperation("H5-我的待办") |
| | | @PostMapping("/myNoticesH5") |
| | | public ApiResponse<PageData<Notices>> myNoticesH5 (@RequestBody PageWrap<Notices> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(workbenchesService.getMyNotices(pageWrap,getLoginUser(token))); |
| | | } |
| | | |
| | | @ApiOperation("工作台-电表报警类型统计") |
| | | @GetMapping("/electricalWarningStats") |
| | | public ApiResponse<List<WarningTypeStatVO>> electricalWarningStats(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywElectricalWarningService.warningTypeStats()); |
| | | } |
| | | |
| | | @ApiOperation("工作台-电表报警分页") |
| | | @PostMapping("/electricalWarningPage") |
| | | public ApiResponse<PageData<YwElectricalWarning>> electricalWarningPage(@RequestBody PageWrap<YwElectricalWarning> pageWrap, |
| | | @RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywElectricalWarningService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("工作台-近30天智能电表每日电量/电费") |
| | | @GetMapping("/electricalDailyEnergyStats") |
| | | public ApiResponse<List<DailyEnergyStatVO>> electricalDailyEnergyStats(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywWorkDeskEnergyService.electricalDailyStats()); |
| | | } |
| | | |
| | | @ApiOperation("工作台-近30天空调多联机每日电量/电费") |
| | | @GetMapping("/conditionerDailyEnergyStats") |
| | | public ApiResponse<List<DailyEnergyStatVO>> conditionerDailyEnergyStats(@RequestHeader(Constants.HEADER_USER_TOKEN) String token) { |
| | | return ApiResponse.success(ywWorkDeskEnergyService.conditionerDailyStats()); |
| | | } |
| | | |
| | | } |