Browse Source

#定时任务bug修改

zhongwei
yang_shj 1 year ago
parent
commit
1688efb514
  1. 2
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java
  2. 2
      hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IPushMsgClient.java
  3. 4
      hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java
  4. 4
      hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/DeviceMapper.xml
  5. 5
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java
  6. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java

2
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/main/constant/MainConstants.java

@ -35,7 +35,7 @@ public interface MainConstants {
String LOAD_HOME_TARGET = "loadHomeTarget"; String LOAD_HOME_TARGET = "loadHomeTarget";
// 水利-泵站实时数据 // 水利-泵站实时数据
String LOAD_WATER_PUMP_REAL = "loadWaterPumpReal"; String LOAD_WATER_PUMP_REAL = "loadWaterPumpReal";
// 水利-站点水位数据 // 水利-站点水位数据
String LOAD_WATER_LEVEL = "loadWaterLevel"; String LOAD_WATER_LEVEL = "loadWaterLevel";

2
hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/fegin/IPushMsgClient.java

@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RequestBody;
public interface IPushMsgClient { public interface IPushMsgClient {
String API_PREFIX = "/feign/message"; String API_PREFIX = "/feign/message";
String PUSH_MESSAGE_MAIL = API_PREFIX + "/sendMail"; String PUSH_MESSAGE_MAIL = API_PREFIX + "/sendMail";
String PUSH_MESSAGE_SMS = API_PREFIX + "/sendSms"; String PUSH_MESSAGE_SMS = API_PREFIX + "/sendSms";
String PUSH_MESSAGE_APP = API_PREFIX + "/sendPush"; String PUSH_MESSAGE_APP = API_PREFIX + "/sendPush";
String PUSH_MESSAGE_WEB = API_PREFIX + "/sendWebsocket"; String PUSH_MESSAGE_WEB = API_PREFIX + "/sendWebsocket";

4
hzims-service/hzims-scheduled/src/main/java/com/hnac/hzims/scheduled/service/operation/home/impl/RealTargetServiceImpl.java

@ -189,6 +189,7 @@ public class RealTargetServiceImpl implements RealTargetService {
HydropowerUnitRealVo real = new HydropowerUnitRealVo(); HydropowerUnitRealVo real = new HydropowerUnitRealVo();
real.setDeptId(device.getCreateDept()); real.setDeptId(device.getCreateDept());
real.setDeviceCode(device.getEmCode()); real.setDeviceCode(device.getEmCode());
real.setOrd(device.getOrd());
real.setDeptName(device.getName()); real.setDeptName(device.getName());
real.setDeviceName(device.getName()); real.setDeviceName(device.getName());
// 装机容量 // 装机容量
@ -935,8 +936,7 @@ public class RealTargetServiceImpl implements RealTargetService {
private Map<Integer, String> getWaterLevelMap(String instanceCode, String signage) { private Map<Integer, String> getWaterLevelMap(String instanceCode, String signage) {
String beginTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATE) + " 00:00:00"; String beginTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATE) + " 00:00:00";
String endTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATETIME); String endTime = DateUtil.format(new Date(), DateUtil.PATTERN_DATETIME);
AnalyseCodeByAnalyseDataPO po = new AnalyseCodeByAnalyseDataPO(); List<AnalyseDataTaosVO> datas = dataService.periodTargetData(beginTime, endTime,6, 2,instanceCode,signage);
List<AnalyseDataTaosVO> datas = dataService.periodTargetData(beginTime, endTime,2, 6,instanceCode,signage);
if(CollectionUtil.isEmpty(datas)){ if(CollectionUtil.isEmpty(datas)){
return new HashMap<>(); return new HashMap<>();
} }

4
hzims-service/hzims-scheduled/src/main/resources/mapper/equipment/DeviceMapper.xml

@ -9,7 +9,9 @@
`NUMBER` AS emCode, `NUMBER` AS emCode,
CREATE_DEPT AS createDept, CREATE_DEPT AS createDept,
RUN_STATUS AS runStatus, RUN_STATUS AS runStatus,
EM_INDEX AS ord EM_INDEX AS ord,
LGTD,
LTTD
FROM FROM
`hzims_em_info` `hzims_em_info`
WHERE WHERE

5
hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java

@ -112,14 +112,15 @@ public class CentralMonitorServiceImpl implements CentralMonitorService {
StationEntity station = stationService.getOne(Wrappers.<StationEntity>lambdaQuery() StationEntity station = stationService.getOne(Wrappers.<StationEntity>lambdaQuery()
.eq(StationEntity::getCode,code) .eq(StationEntity::getCode,code)
); );
if(ObjectUtil.isEmpty(station)){ if(ObjectUtil.isNotEmpty(station)){
pointDataVo.setStationName(station.getName()); pointDataVo.setStationName(station.getName());
} }
return pointDataVo; return pointDataVo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
IPage<PointDataVo> iPage = new Page(data.getCurrent(), data.getSize()); IPage<PointDataVo> iPage = new Page<>(data.getCurrent(), data.getSize());
iPage.setRecords(collect); iPage.setRecords(collect);
iPage.setTotal(originalDataByRealIds.getData().getTotal());
return iPage; return iPage;
} }

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java

@ -327,7 +327,7 @@ public class WaterServiceImpl implements IWaterService {
*/ */
private List<HzimsAnalyzeModelStationEntity> getModelStationList() { private List<HzimsAnalyzeModelStationEntity> getModelStationList() {
// 水利站点(All) // 水利站点(All)
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, null, null,true); List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, null, null,false);
if(CollectionUtil.isEmpty(stationList)){ if(CollectionUtil.isEmpty(stationList)){
return null; return null;
} }
@ -827,7 +827,7 @@ public class WaterServiceImpl implements IWaterService {
@Override @Override
public WaterConservancyVo waterConservancy(Long deptId) { public WaterConservancyVo waterConservancy(Long deptId) {
// 查询水利站点 // 查询水利站点
List<StationEntity> stations = stationService.getHomeStationList(deptId, HomePageConstant.waterList, HomePageConstant.HYDROPOWER_SERVETYPE,true); List<StationEntity> stations = stationService.getHomeStationList(deptId, HomePageConstant.waterList, HomePageConstant.HYDROPOWER_SERVETYPE,false);
if (CollectionUtil.isEmpty(stations)) { if (CollectionUtil.isEmpty(stations)) {
return new WaterConservancyVo(); return new WaterConservancyVo();
} }
@ -888,7 +888,7 @@ public class WaterServiceImpl implements IWaterService {
public List<WaterDetailsVo> waterDetails(Long deptId) { public List<WaterDetailsVo> waterDetails(Long deptId) {
// 获取区域map : key-区域机构 value-水利站点集合 // 获取区域map : key-区域机构 value-水利站点集合
// 获取区域或者站点map结构 // 获取区域或者站点map结构
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList,true); Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList,false);
if(MapUtils.isEmpty(map)){ if(MapUtils.isEmpty(map)){
return null; return null;
} }
@ -933,7 +933,7 @@ public class WaterServiceImpl implements IWaterService {
@Override @Override
public List<WaterRankingVo> waterUseEleRanking(Long deptId) { public List<WaterRankingVo> waterUseEleRanking(Long deptId) {
// 获取区域map : key-区域机构 value-水利站点集合 // 获取区域map : key-区域机构 value-水利站点集合
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList,true); Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList,false);
if(MapUtils.isEmpty(map)){ if(MapUtils.isEmpty(map)){
return null; return null;
} }
@ -1002,7 +1002,7 @@ public class WaterServiceImpl implements IWaterService {
return null; return null;
} }
// 获取水利站点 // 获取水利站点
List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,true); List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,false);
if(CollectionUtil.isEmpty(stationList)){ if(CollectionUtil.isEmpty(stationList)){
return null; return null;
} }
@ -1062,7 +1062,7 @@ public class WaterServiceImpl implements IWaterService {
return null; return null;
} }
// 获取水利站点 // 获取水利站点
List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,true); List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,false);
if(CollectionUtil.isEmpty(stationList)){ if(CollectionUtil.isEmpty(stationList)){
return null; return null;
} }

Loading…
Cancel
Save