1.定时任务重试代码提交
2.pmsbug修改
This commit is contained in:
@@ -9,6 +9,7 @@ import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.param.LineIntegrityDataParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.pojo.vo.LineIntegrityDataVO;
|
||||
@@ -101,4 +102,18 @@ public class LineIntegrityDataController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS,integrityDataOfLine,methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 通过监测点集合查询总监测点数据完整性
|
||||
* @param param
|
||||
* @Author: wr
|
||||
* @Date: 2024/1/8 13:58
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getTotalIntegrityByLineIds")
|
||||
@ApiOperation("通过监测点集合查询总监测点数据完整性")
|
||||
public HttpResult<Float> getTotalIntegrityByLineIds(@RequestBody LineBaseQueryParam param) {
|
||||
String methodDescribe = getMethodDescribe("getTotalIntegrityByLineIds");
|
||||
Float integrity = irStatIntegrityDService.getTotalIntegrityByLineIds(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, integrity, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,4 +39,13 @@ public interface RStatIntegrityDMapper extends BaseMapper<RStatIntegrityD> {
|
||||
List<RStatIntegrityVO> getOnIntegrityByIds(@Param("param") OnlineRateParam param);
|
||||
|
||||
List<RStatIntegrityVO> getOnIntegrityByIdsAndTime (@Param("list")List<String> lineIds,@Param("startTime")String startTime,@Param("endTime")String endTime);
|
||||
|
||||
/**
|
||||
* @Description: 通过监测点集合查询总监测点数据完整性
|
||||
* @param param
|
||||
* @return: java.lang.Float
|
||||
* @Author: wr
|
||||
* @Date: 2024/1/8 14:01
|
||||
*/
|
||||
Float selectTotalIntegrityByLineIds(@Param("param") LineBaseQueryParam param);
|
||||
}
|
||||
|
||||
@@ -63,4 +63,24 @@
|
||||
</where>
|
||||
group by line_index ;
|
||||
</select>
|
||||
<select id="selectTotalIntegrityByLineIds" resultType="java.lang.Float">
|
||||
select
|
||||
ROUND( sum(real_time)/sum(due_time)*100,2) as integrityRate
|
||||
from
|
||||
r_stat_integrity_d
|
||||
<where>
|
||||
<if test="param!=null and param.lineIds != null and param.ids.lineIds > 0">
|
||||
AND line_index IN
|
||||
<foreach collection='param.lineIds' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test=" param.startTime != null and param.startTime !=''">
|
||||
AND time_id >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param.endTime != null and param.endTime != ''">
|
||||
AND time_id <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.device.pq.service;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
|
||||
/**
|
||||
@@ -14,6 +15,11 @@ import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
*/
|
||||
public interface IRStatIntegrityDService extends IService<RStatIntegrityD> {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 通过监测点集合查询总监测点数据完整性
|
||||
* @param param
|
||||
* @Author: wr
|
||||
* @Date: 2024/1/8 13:59
|
||||
*/
|
||||
Float getTotalIntegrityByLineIds(LineBaseQueryParam param);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.njcn.device.pq.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.device.pq.mapper.RStatIntegrityDMapper;
|
||||
import com.njcn.device.pq.pojo.param.LineBaseQueryParam;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.device.pq.service.IRStatIntegrityDService;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -18,4 +19,8 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class RStatIntegrityDServiceImpl extends ServiceImpl<RStatIntegrityDMapper, RStatIntegrityD> implements IRStatIntegrityDService {
|
||||
|
||||
@Override
|
||||
public Float getTotalIntegrityByLineIds(LineBaseQueryParam param) {
|
||||
return this.baseMapper.selectTotalIntegrityByLineIds(param);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user