sgj
2026-03-10 f0d0ee85eb7ae3c0cceadb119ccdc6f19d65fc75
fzzy-igdss-core/src/main/java/com/fzzy/igds/service/PatrolService.java
@@ -19,6 +19,7 @@
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Slf4j
@Service
@@ -54,24 +55,26 @@
    /**
     * 根据条件分页查询数据
     *
     * @param page
     * @param param
     */
    public void pagePatrolData(Page<Patrol> page, IgdsBaseParam param) {
        QueryWrapper<Patrol> queryWrapper = new QueryWrapper<>();
        if(StringUtils.isNotBlank(param.getDeptId())){
        if (StringUtils.isNotBlank(param.getDeptId())) {
            queryWrapper.like("dept_id", param.getDeptId());
        }else {
            if(StringUtils.isNotBlank(param.getCompanyId())){
        } else {
            if (StringUtils.isNotBlank(param.getCompanyId())) {
                queryWrapper.likeRight("dept_id", param.getCompanyId());
            }
        }
        if(null != param.getStart()){
        if (null != param.getStart()) {
            queryWrapper.ge("create_time", DateUtil.getCurZero(param.getStart()));
        }
        if(null != param.getEnd()){
        if (null != param.getEnd()) {
            queryWrapper.le("create_time", DateUtil.getCurZero(param.getEnd()));
        }
        queryWrapper.orderByDesc("create_time");
        patrolMapper.selectPage(page, queryWrapper);
    }
@@ -79,12 +82,13 @@
    /*--------------------巡更轨迹表管理------------------*/
    /**
     * 根据巡更ID查询具体点位信息
     * @param patrolId
     *
     * @param
     * @return
     */
    public List<PatrolRecord> getRecordByPatrolId(String patrolId,String userId,String confId) {
        if(StringUtils.isBlank(patrolId) || StringUtils.isBlank(userId) || StringUtils.isBlank(confId)){
        if(StringUtils.isBlank(patrolId)){
            return null;
        }
@@ -96,6 +100,31 @@
        return patrolRecordMapper.selectList(queryWrapper);
    }
    /*--------------------巡更轨迹表管理------------------*/
    /**
     * 根据巡更ID查询具体点位信息
     *
     * @param
     * @return
     */
    public List<PatrolRecord> getRecordByPatrolId(Map<String, String> param) {
        String patrolId = param.get("patrolId");
        if (StringUtils.isBlank(patrolId)) {
            return null;
        }
        String userName = param.get("name");
        QueryWrapper<PatrolRecord> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("patrol_id", patrolId);
        if (userName != null) {
            queryWrapper.eq("user_id", userName);
        }
        queryWrapper.orderByDesc("id");
        return patrolRecordMapper.selectList(queryWrapper);
    }
    /*--------------------巡更配置表管理------------------*/