| | |
| | | package com.doumee.api; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.HttpsUtil; |
| | | import com.doumee.core.utils.redis.RedisUtil; |
| | | import com.doumee.core.wx.WXConstant; |
| | | import com.doumee.dao.business.model.YwContract; |
| | | import com.doumee.service.business.PlatformJobService; |
| | | import com.doumee.service.business.YwContractBillService; |
| | | import com.doumee.service.business.YwContractService; |
| | | import com.doumee.dao.business.model.YwOutinbound; |
| | | import com.doumee.service.business.*; |
| | | import com.doumee.service.business.impl.YwOutinboundServiceImpl; |
| | | import com.doumee.service.business.impl.hksync.HkSyncDeviceServiceImpl; |
| | | import com.doumee.service.system.SystemDictDataService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @Autowired |
| | | private YwContractService ywContractService; |
| | | |
| | | @Autowired |
| | | private YwPatrolSchemeService ywPatrolSchemeService; |
| | | |
| | | @Autowired |
| | | private YwOutinboundService ywOutinboundService; |
| | | |
| | | @Autowired |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | |
| | | @ApiOperation("定时处理合同账单编码") |
| | | @GetMapping("/ywDealContractBillCodeTimer") |
| | |
| | | return ApiResponse.success("定时处理合同过期与执行中"); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String url = WXConstant.GET_ACCESS_TOKEN_URL.replace("APPID","wx95ac1efb67f0330d") |
| | | .replace("APPSECRET","f228b9e3b49a37b881b51431a483c939"); |
| | | String response = HttpsUtil.get(url,false); |
| | | JSONObject json = JSONObject.parseObject(response); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("定时生成今日巡检任务任务") |
| | | @GetMapping("/ywPatrolSchemeTaskTimer") |
| | | public ApiResponse ywPatrolSchemeTaskTimer() { |
| | | ywPatrolSchemeService.timerAuto(); |
| | | return ApiResponse.success("定时生成今日巡检任务任务执行中"); |
| | | } |
| | | |
| | | @Autowired |
| | | private YwElectricalService ywElectricalService; |
| | | @ApiOperation("开启定时查询智慧电表设备状态") |
| | | @GetMapping("/getElectricalStatus") |
| | | public ApiResponse getElectricalStatus() { |
| | | ywElectricalService.getElectricalStatus(); |
| | | return ApiResponse.success("开启定时查询智慧电表设备状态成功"); |
| | | } |
| | | |
| | | @Autowired |
| | | private com.doumee.service.business.YwElectricalBizService ywElectricalBizService; |
| | | |
| | | @ApiOperation("定时批量抄表入库") |
| | | @GetMapping("/syncElectricalMeterData") |
| | | public ApiResponse syncElectricalMeterData() { |
| | | ywElectricalBizService.syncMeterDataScheduled(); |
| | | return ApiResponse.success("定时批量抄表执行成功"); |
| | | } |
| | | |
| | | @ApiOperation("清理三个月前电表接口日志") |
| | | @GetMapping("/cleanElectricalLog") |
| | | public ApiResponse cleanElectricalLog() { |
| | | ywElectricalBizService.cleanLogBeforeThreeMonths(); |
| | | return ApiResponse.success("电表接口日志清理成功"); |
| | | } |
| | | |
| | | @Autowired |
| | | private com.doumee.service.business.ConditionerBizService conditionerBizService; |
| | | |
| | | @ApiOperation("定时同步智精灵网关在线状态") |
| | | @GetMapping("/syncConditionerGatewayStatus") |
| | | public ApiResponse syncConditionerGatewayStatus() { |
| | | conditionerBizService.syncGatewayStatus(); |
| | | return ApiResponse.success("定时同步网关状态成功"); |
| | | } |
| | | |
| | | @ApiOperation("定时同步智精灵空调内机运行态") |
| | | @GetMapping("/syncConditionerIndoorUnits") |
| | | public ApiResponse syncConditionerIndoorUnits() { |
| | | conditionerBizService.syncIndoorUnits(); |
| | | return ApiResponse.success("定时同步空调内机状态成功"); |
| | | } |
| | | |
| | | @ApiOperation("定时同步前一日空调多联机用量报表") |
| | | @GetMapping("/syncConditionerUsagePreviousDay") |
| | | public ApiResponse syncConditionerUsagePreviousDay() { |
| | | String msg = conditionerBizService.syncUsagePreviousDay(); |
| | | return ApiResponse.success(msg); |
| | | } |
| | | |
| | | @ApiOperation("定时更新房源租赁状态") |
| | | @GetMapping("/ywRoomStatusTimer") |
| | | public ApiResponse ywRoomStatusTimer() { |
| | | ywContractService.updRentContractStatus(); |
| | | ywContractService.updRoomLeaseNowStatus(); |
| | | return ApiResponse.success("定时更新房源租赁状态任务执行中"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation("定时更新redis数据") |
| | | @GetMapping("/ywUpdRedisDataTimer") |
| | | public ApiResponse ywUpdRedisDataTimer() { |
| | | //加入redis缓存,入库单总数量 |
| | | RedisUtil.addObject(redisTemplate, Constants.RedisKeys.COM_OUTBOUND_IN_KEY,0); |
| | | //加入redis缓存,出库单总数量 |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.COM_OUTBOUND_OUT_KEY,0); |
| | | //加入redis缓存,盘点单总数量 |
| | | RedisUtil.addObject(redisTemplate,Constants.RedisKeys.COM_OUTBOUND_TAKING_KEY,0); |
| | | return ApiResponse.success("定时更新redis数据"); |
| | | } |
| | | |
| | | |
| | | } |