|
|
@ -11,8 +11,10 @@ import com.hnac.hzims.operational.OperationalConstants; |
|
|
|
import com.hnac.hzims.operational.main.vo.StationCountVo; |
|
|
|
import com.hnac.hzims.operational.main.vo.StationCountVo; |
|
|
|
import com.hnac.hzims.operational.station.StationConstants; |
|
|
|
import com.hnac.hzims.operational.station.StationConstants; |
|
|
|
import com.hnac.hzims.operational.main.constant.HomePageConstant; |
|
|
|
import com.hnac.hzims.operational.main.constant.HomePageConstant; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.station.dto.StationPushConfigDTO; |
|
|
|
import com.hnac.hzims.operational.station.entity.ControlUsersEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.ControlUsersEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
import com.hnac.hzims.operational.station.entity.StationEntity; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.station.entity.StationPushConfigEntity; |
|
|
|
import com.hnac.hzims.operational.station.mapper.ControlUsersMapper; |
|
|
|
import com.hnac.hzims.operational.station.mapper.ControlUsersMapper; |
|
|
|
import com.hnac.hzims.operational.station.mapper.StationMapper; |
|
|
|
import com.hnac.hzims.operational.station.mapper.StationMapper; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationAttributeService; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationAttributeService; |
|
|
@ -20,6 +22,7 @@ import com.hnac.hzims.operational.station.service.IStationPushConfigService; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
import com.hnac.hzims.operational.station.service.IStationService; |
|
|
|
import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; |
|
|
|
import com.hnac.hzims.operational.station.vo.HzimsStationCountVo; |
|
|
|
import com.hnac.hzims.operational.station.vo.StationAndDeptVo; |
|
|
|
import com.hnac.hzims.operational.station.vo.StationAndDeptVo; |
|
|
|
|
|
|
|
import com.hnac.hzims.operational.station.vo.StationPushConfigVO; |
|
|
|
import com.hnac.hzims.operational.station.vo.StationVO; |
|
|
|
import com.hnac.hzims.operational.station.vo.StationVO; |
|
|
|
import com.hnac.hzims.operational.station.wrapper.StationWrapper; |
|
|
|
import com.hnac.hzims.operational.station.wrapper.StationWrapper; |
|
|
|
/*import com.hnac.hzinfo.sdk.core.response.Result; |
|
|
|
/*import com.hnac.hzinfo.sdk.core.response.Result; |
|
|
@ -98,11 +101,25 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn |
|
|
|
Assert.isTrue(this.saveOrUpdate(req), () -> { |
|
|
|
Assert.isTrue(this.saveOrUpdate(req), () -> { |
|
|
|
throw new ServiceException("创建/修改站点信息失败!"); |
|
|
|
throw new ServiceException("创建/修改站点信息失败!"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.update(Wrappers.<StationEntity>lambdaUpdate().set(Func.isNotEmpty(req.getIsAbroad()),StationEntity::getIsAbroad, req.getIsAbroad()).eq(StationEntity::getId, req.getId())); |
|
|
|
this.pushStation(req); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 推送站点 |
|
|
|
|
|
|
|
* @param req 推送站点内容 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private void pushStation(StationEntity req) { |
|
|
|
|
|
|
|
// 读取站点类型配置确定是否推送FDP
|
|
|
|
|
|
|
|
StationPushConfigEntity config = StationPushConfigEntity.builder().stationType(req.getType()).build(); |
|
|
|
|
|
|
|
StationPushConfigVO configVO = stationPushConfigService.getOne(BeanUtil.copy(config, StationPushConfigDTO.class)); |
|
|
|
|
|
|
|
if(ObjectUtil.isNotEmpty(configVO) && configVO.getIsPush()) { |
|
|
|
|
|
|
|
log.info("{}站点开始智能诊断站点推送",req.getCode()); |
|
|
|
|
|
|
|
new Thread(() -> questionClient.submitStationInfo(configVO.getFdpStationType(), req.getCode(), ""), "智能诊断站点推送").start(); |
|
|
|
|
|
|
|
} |
|
|
|
// 如果设备数据来源未选定其他 则进行站点初始化操作
|
|
|
|
// 如果设备数据来源未选定其他 则进行站点初始化操作
|
|
|
|
if (!(StationConstants.FILL.equals(req.getDataOrigin()) || StationConstants.HZ3000_OTHER.equals(req.getDataSource()))) { |
|
|
|
if (StationConstants.GATHER.equals(req.getDataOrigin()) && !StationConstants.HZ3000_OTHER.equals(req.getDataSource())) { |
|
|
|
new Thread(() -> questionClient.submitStationInfo(req.getCode(), ""), "智能诊断站点推送").start(); |
|
|
|
log.info("{}站点开始数据平台新建项目",req.getCode()); |
|
|
|
new Thread(() -> this.instanceProject(req), "新建项目").start(); |
|
|
|
new Thread(() -> this.instanceProject(req), "数据平台新建项目").start(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -222,34 +239,6 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public boolean updateById(StationEntity req) { |
|
|
|
|
|
|
|
return super.update(Wrappers.<StationEntity>lambdaUpdate() |
|
|
|
|
|
|
|
.set(StationEntity::getCode, req.getCode()) |
|
|
|
|
|
|
|
.set(StationEntity::getName, req.getName()) |
|
|
|
|
|
|
|
.set(StationEntity::getType, req.getType()) |
|
|
|
|
|
|
|
.set(StationEntity::getCommissionTime, req.getCommissionTime()) |
|
|
|
|
|
|
|
.set(StationEntity::getEnableControl, req.getEnableControl()) |
|
|
|
|
|
|
|
.set(StationEntity::getLgtd, req.getLgtd()) |
|
|
|
|
|
|
|
.set(StationEntity::getLttd, req.getLttd()) |
|
|
|
|
|
|
|
.set(StationEntity::getRefDept, req.getRefDept()) |
|
|
|
|
|
|
|
.set(StationEntity::getAreaCode, req.getAreaCode()) |
|
|
|
|
|
|
|
.set(StationEntity::getRefDomain, req.getRefDomain()) |
|
|
|
|
|
|
|
.set(StationEntity::getRefBasin, req.getRefBasin()) |
|
|
|
|
|
|
|
.set(StationEntity::getRefArea, req.getRefArea()) |
|
|
|
|
|
|
|
.set(StationEntity::getRemark, req.getRemark()) |
|
|
|
|
|
|
|
.set(StationEntity::getPic, req.getPic()) |
|
|
|
|
|
|
|
.set(StationEntity::getContact, req.getContact()) |
|
|
|
|
|
|
|
.set(StationEntity::getContactor, req.getContactor()) |
|
|
|
|
|
|
|
.set(StationEntity::getAddress, req.getAddress()) |
|
|
|
|
|
|
|
.set(StationEntity::getCompany, req.getCompany()) |
|
|
|
|
|
|
|
.set(StationEntity::getCreateDept, req.getCreateDept()) |
|
|
|
|
|
|
|
.set(StationEntity::getServeType, req.getServeType()) |
|
|
|
|
|
|
|
.set(StationEntity::getLimitWaterLevel, req.getLimitWaterLevel()) |
|
|
|
|
|
|
|
.eq(StationEntity::getId, req.getId())); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public List<StationEntity> getInRefDept(List<Long> depeIds, String stationType, List<String> types) { |
|
|
|
public List<StationEntity> getInRefDept(List<Long> depeIds, String stationType, List<String> types) { |
|
|
|
return this.baseMapper.selectInRefDept(depeIds, stationType, types); |
|
|
|
return this.baseMapper.selectInRefDept(depeIds, stationType, types); |
|
|
|
} |
|
|
|
} |
|
|
|