优化查询算法曲线逻辑和任务调用失败逻辑
This commit is contained in:
parent
d8e90a9bd8
commit
f3cc9ac27c
@ -160,14 +160,13 @@ public class SubstationModelController {
|
||||
queryWrapper.orderByAsc(TaskResult::getOrderNum);
|
||||
List<TaskResult> results = taskResultMapper.selectList(queryWrapper);
|
||||
List<Map<String, Object>> listMaps = new ArrayList<>();
|
||||
for (int i = 0; i < results.size(); i++) {
|
||||
TaskResult result = results.get(i);
|
||||
for (TaskResult result : results) {
|
||||
LambdaQueryWrapper<SubstationModel> modelWrapper = new LambdaQueryWrapper<>();
|
||||
modelWrapper.eq(SubstationModel::getStationId, stationid);
|
||||
modelWrapper.eq(SubstationModel::getType, "02");
|
||||
modelWrapper.like(SubstationModel::getObjinfo,result.getDeviceId());
|
||||
modelWrapper.like(SubstationModel::getObjinfo, result.getDeviceId());
|
||||
List<Map<String, Object>> list = substationModelService.listMaps(modelWrapper);
|
||||
if(list.size()>0){
|
||||
if (list.size() > 0) {
|
||||
listMaps.add(list.get(0));
|
||||
}
|
||||
}
|
||||
|
@ -1747,6 +1747,12 @@ public class TaskTodoServiceImpl extends ServiceImpl<TaskTodoMapper, TaskTodo> i
|
||||
***********************************/
|
||||
@Override
|
||||
public synchronized void setTaskResultAndTodo(String stationCode, String resultId, Integer deviceSumnum, String taskTodoId) {
|
||||
Integer integer =
|
||||
taskResultMapper.selectCount(new LambdaQueryWrapper<TaskResult>().eq(TaskResult::getResultId,
|
||||
resultId).eq(TaskResult::getFlag, "2"));
|
||||
if (integer > 0) {
|
||||
return;
|
||||
}
|
||||
TaskResult taskResult = new TaskResult();
|
||||
taskResult.setResultId(resultId);
|
||||
taskResult.setFlag("4");
|
||||
@ -1756,7 +1762,8 @@ public class TaskTodoServiceImpl extends ServiceImpl<TaskTodoMapper, TaskTodo> i
|
||||
// 赋值执行数量
|
||||
List<Map<String, Object>> list = this.getTaskResultById(taskTodo.getTaskTodoId(), null, null, null);
|
||||
// 已送检点数
|
||||
long patrolCount = list.stream().filter(t -> !("0").equals(t.get("flag")) && !("1").equals(t.get("flag"))).count();
|
||||
long patrolCount =
|
||||
list.stream().filter(t -> !("0").equals(t.get("flag")) && !("1").equals(t.get("flag"))).count();
|
||||
// 失败的数量
|
||||
long failCount =
|
||||
list.stream().filter(t -> ("4").equals(t.get("flag")) || ("6").equals(t.get("flag"))).count();
|
||||
|
@ -29,12 +29,8 @@
|
||||
INNER JOIN iis_algorithm_device ad ON ap.id = ad.param_id
|
||||
WHERE
|
||||
ap.param_fixed = '0'
|
||||
<if test="algorithmId != null and algorithmId != ''">
|
||||
AND ad.algorithm_id =#{algorithmId}
|
||||
</if>
|
||||
<if test="componentId != null and componentId != ''">
|
||||
AND ad.component_id =#{componentId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getReturnDesc" resultType="java.lang.String">
|
||||
SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user