Administrator
2023-08-07 269ed22bc4dc1ed182a9aaf04d717176881f040d
ard-work/src/main/java/com/ruoyi/app/patrolplan/service/impl/ArdAppPatrolplanServiceImpl.java
@@ -6,6 +6,10 @@
import java.util.List;
import java.util.Map;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell;
import com.ruoyi.alarmpoints.well.mapper.ArdAlarmpointsWellMapper;
import com.ruoyi.app.patrolplan.domain.ArdAppPatrolpoint;
import com.ruoyi.app.patrolplan.domain.ArdAppPatroluser;
import com.ruoyi.app.patrolplan.mapper.ArdAppPatrolpointMapper;
@@ -15,6 +19,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.uuid.IdUtils;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.utils.result.Results;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -41,6 +46,12 @@
    @Resource
    private ArdAppPatroluserMapper ardAppPatroluserMapper;
    @Resource
    private ArdAlarmpointsWellMapper ardAlarmpointsWellMapper;
    @Resource
    private SysUserMapper sysUserMapper;
    /**
     * 查询app巡检计划
@@ -153,4 +164,19 @@
        ardAppPatroluserMapper.insertArdAppPatroluserList(ardAppPatroluserList);//新增关联人员
        return result;
    }
    @Override
    public Results oneById(String id) {
        ArdAppPatrolplan ardAppPatrolplan = ardAppPatrolplanMapper.selectById(id);
        List<ArdAlarmpointsWell> ardAlarmpointsWellList = ardAlarmpointsWellMapper.wellByPlanId(id);
        List<SysUser> sysUserList = sysUserMapper.userByPlanId(id);
        ardAppPatrolplan.setUserList(sysUserList);
        ardAppPatrolplan.setWellList(ardAlarmpointsWellList);
        return Results.succeed(ardAppPatrolplan);
    }
    @Override
    public Results allPlanUser(String id) {
        return null;
    }
}