台站运行管理查询有效率接口新增used返回字段内容
This commit is contained in:
parent
ebf03f6949
commit
1164b9c9ea
|
@ -61,6 +61,7 @@ public class CalculateDataRateThread implements Runnable{
|
|||
calculateDataRate.setParameter(mRateparam);
|
||||
//根据台站编码 查询 台站信息
|
||||
StationInfo stationInfo = calCulStationDataService.getStationInfo(originalstationsinfo.getStationCode());
|
||||
stationInfo.setUsed(calCulStationDataService.getUsed(Integer.valueOf(stationInfo.getId())));
|
||||
//赋值台站信息
|
||||
calculateDataRate.setMStationId(stationInfo.getId());
|
||||
calculateDataRate.setMStationCode(stationInfo.getStationCode());
|
||||
|
|
|
@ -4,6 +4,8 @@ import org.apache.ibatis.annotations.Param;
|
|||
import org.jeecg.modules.entity.data.ProvisionData;
|
||||
import org.jeecg.modules.entity.data.StationInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CalCulStationInfoMapper {
|
||||
|
||||
StationInfo getStationInfo(@Param("stationCode") String stationCode);
|
||||
|
@ -62,4 +64,6 @@ public interface CalCulStationInfoMapper {
|
|||
|
||||
ProvisionData findSphdMetSohProvisionParticulate(@Param("SPHD_NUM") String SPHD_NUM, @Param("MET_NUM") String MET_NUM, @Param("curDateTime") String curDateTime, @Param("pretime") String pretime, @Param("sphdMetSoh") String sphdMetSoh, @Param("stationId") String stationId);
|
||||
|
||||
List<Integer> getUsed(Integer stationId);
|
||||
|
||||
}
|
||||
|
|
|
@ -395,4 +395,8 @@
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getUsed" resultType="java.lang.Integer">
|
||||
SELECT DETECTOR_ID FROM CONFIGURATION.GARDS_DETECTORS WHERE STATION_ID = #{stationId} AND STATUS = 'Operating'
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -61,4 +61,6 @@ public interface ICalCulStationDataService {
|
|||
|
||||
ProvisionData findSphdMetSohProvisionParticulate(String SPHD_NUM, String MET_NUM, String curDateTime, String pretime, String sphdMetSoh,String stationId);
|
||||
|
||||
String getUsed(Integer stationId);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import org.jeecg.modules.entity.data.ProvisionData;
|
||||
import org.jeecg.modules.entity.data.StationInfo;
|
||||
import org.jeecg.modules.mapper.CalCulStationInfoMapper;
|
||||
import org.jeecg.modules.service.ICalCulStationDataService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("calCulStationDataService")
|
||||
@DS("ora")
|
||||
|
@ -440,5 +446,13 @@ public class CalCulStationInfoServiceImpl implements ICalCulStationDataService {
|
|||
return sphdMetSohProvision;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(propagation = Propagation.REQUIRES_NEW)
|
||||
public String getUsed(Integer stationId){
|
||||
List<Integer> detectorIds = calCulStationInfoMapper.getUsed(stationId);
|
||||
String result = CollectionUtils.isNotEmpty(detectorIds) ? "YES" : "NO";
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user