|
|
@@ -70,12 +70,9 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
public List<InspectionVO> track(Integer id) { |
|
|
|
|
|
|
|
LambdaQueryWrapper<ThInspection> lambdaQueryWrapper=new LambdaQueryWrapper<>(); |
|
|
|
User user = ShiroUtils.getUserInfo();//xz |
|
|
|
Integer tenantId = user.getTenantId();//xz |
|
|
|
|
|
|
|
lambdaQueryWrapper.eq(ThInspection::getTenantId, tenantId) |
|
|
|
.eq(ThInspection::getMissionId,id) |
|
|
|
.orderByAsc(ThInspection::getCreateTime);//xz |
|
|
|
lambdaQueryWrapper.eq(ThInspection::getMissionId,id) |
|
|
|
.orderByAsc(ThInspection::getCreateTime); |
|
|
|
List<InspectionVO> result=new ArrayList<>(); |
|
|
|
List<ThInspection> thInspections = inspectionMapper.selectList(lambdaQueryWrapper); |
|
|
|
|
|
|
@@ -94,7 +91,6 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
BeanUtils.copyProperties(inspectionRequest,inspection); |
|
|
|
//获取当前巡检正在执行的任务 |
|
|
|
List<ThMission> thMissions = missionMapper.selectList(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getTenantId, ShiroUtils.getTenantId())//xz |
|
|
|
.eq(ThMission::getInspectionLine, inspectionRequest.getInspectionId()) |
|
|
|
.eq(ThMission::getStatus, TaskStatusEnum.FLIGHT.getCode()) |
|
|
|
.eq(ThMission::getMark, MarkTypeEnum.VALID.getCode()).orderByAsc(ThMission::getExecutionStartTime)); |
|
|
@@ -103,7 +99,6 @@ public class ThInspectionServiceImpl extends BaseServiceImpl<ThInspectionMapper, |
|
|
|
} |
|
|
|
ThMission mission = thMissions.get(0); |
|
|
|
inspection.setMissionId(mission.getId()); |
|
|
|
inspection.setTenantId(mission.getTenantId());//xz |
|
|
|
inspectionMapper.insert(inspection); |
|
|
|
return inspection.getId(); |
|
|
|
} |