| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell; |
| | | import com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellParam; |
| | | import com.ruoyi.alarmpoints.well.service.IArdAlarmpointsWellService; |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.dao.DuplicateKeyException; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | } |
| | | |
| | | @PostMapping("/conditionList") |
| | | @ApiOperation("查询并筛选权限下所有兴趣点") |
| | | @ApiOperation("查看部门下筛选条件的兴趣点") |
| | | public Results conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam) { |
| | | String usersId = SecurityUtils.getUserId(); |
| | | //根据userId查询部门Id |
| | |
| | | package com.ruoyi.alarmpoints.well.domain; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.annotation.Excel; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 井管理对象 ard_alarmpoints_well |
| | |
| | | /** 运行状态 */ |
| | | private String runStatus; |
| | | |
| | | @TableField(exist = false) |
| | | private List<Long> deptList; |
| | | |
| | | @TableField(exist = false) |
| | | private Integer pageNum = 1; |
| | | @TableField(exist = false) |
| | | |
| | | private Integer pageSize = 10; |
| | | |
| | | } |
| | |
| | | ArdAlarmpointsWell getWellDataByPatrolplanIdAndPosition(@Param("patrolplanId") String patrolplanId,@Param("longitude") Double longitude,@Param("latitude") Double latitude); |
| | | |
| | | ArdAlarmpointsWell getWellById(String id); |
| | | List<ArdAlarmpointsWell> conditionList(ArdAlarmpointsWellParam ardAlarmpointsWellParam); |
| | | List<ArdAlarmpointsWell> conditionList(@Param("wellId") String wellId,@Param("deptList") List<Long> deptList); |
| | | |
| | | } |
| | |
| | | |
| | | /** |
| | | * 井管理Service接口 |
| | | * |
| | | * |
| | | * @author 刘苏义 |
| | | * @date 2023-03-07 |
| | | */ |
| | | public interface IArdAlarmpointsWellService |
| | | public interface IArdAlarmpointsWellService |
| | | { |
| | | /** |
| | | * 查询井管理 |
| | | * |
| | | * |
| | | * @param id 井管理主键 |
| | | * @return 井管理 |
| | | */ |
| | |
| | | public ArdAlarmpointsWell selectArdAlarmpointsWellByWellId(String wellId); |
| | | /** |
| | | * 查询井管理列表 |
| | | * |
| | | * |
| | | * @param ardAlarmpointsWell 井管理 |
| | | * @return 井管理集合 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 新增井管理 |
| | | * |
| | | * |
| | | * @param ardAlarmpointsWell 井管理 |
| | | * @return 结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 修改井管理 |
| | | * |
| | | * |
| | | * @param ardAlarmpointsWell 井管理 |
| | | * @return 结果 |
| | | */ |
| | |
| | | public int updateArdAlarmpointsWellByWellId(ArdAlarmpointsWell ardAlarmpointsWell); |
| | | /** |
| | | * 批量删除井管理 |
| | | * |
| | | * |
| | | * @param ids 需要删除的井管理主键集合 |
| | | * @return 结果 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除井管理信息 |
| | | * |
| | | * |
| | | * @param id 井管理主键 |
| | | * @return 结果 |
| | | */ |
| | |
| | | Integer pageNum = ardAlarmpointsWellParam.getPageNum(); |
| | | Integer pageSize = ardAlarmpointsWellParam.getPageSize(); |
| | | PageHelper.startPage(pageNum, pageSize); |
| | | // QueryWrapper<ArdAlarmpointsWell> queryWrapper = new QueryWrapper<>(); |
| | | // queryWrapper.select("id","altitude","metering_station","displacement_mode","latitude","dehydration_station", |
| | | // "well_type","production_date","well_id","transfer_station","oil_production","run_status","longitude", |
| | | // "installed_load","dept_id","user_id","surrounding_environment","well_number","well_block") |
| | | // .eq(!StringUtils.isBlank(ardAlarmpointsWellParam.getWellId()), "well_id", ardAlarmpointsWellParam.getWellId()) |
| | | // .in("dept_id", ardAlarmpointsWellParam.getDeptList()); |
| | | // List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.selectList(queryWrapper); |
| | | List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.conditionList(ardAlarmpointsWellParam); |
| | | QueryWrapper<ArdAlarmpointsWell> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.select("id","altitude","metering_station","displacement_mode","latitude","dehydration_station", |
| | | "well_type","production_date","well_id","transfer_station","oil_production","run_status","longitude", |
| | | "installed_load","dept_id","user_id","surrounding_environment","well_number","well_block") |
| | | .eq(!StringUtils.isBlank(ardAlarmpointsWellParam.getWellId()), "well_id", ardAlarmpointsWellParam.getWellId()) |
| | | .in("dept_id", ardAlarmpointsWellParam.getDeptList()); |
| | | List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.selectList(queryWrapper); |
| | | // List<ArdAlarmpointsWell> list = ardAlarmpointsWellMapper.conditionList(ardAlarmpointsWellParam.getWellId(),ardAlarmpointsWellParam.getDeptList()); |
| | | return new PageInfo<>(list); |
| | | } |
| | | |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="conditionList" parameterType="List" |
| | | resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWellDeptVo"> |
| | | <select id="conditionList" resultType="com.ruoyi.alarmpoints.well.domain.ArdAlarmpointsWell"> |
| | | Select * from ard_alarmpoints_well well |
| | | where WHERE well.well_id = #{wellId} |
| | | and well.dept_id in |
| | | <foreach collection="list" index="index" item="item" open="(" separator="," close=")"> |
| | | #{item} |
| | | <foreach item="deptList" collection="deptList" open="(" separator="," close=")"> |
| | | #{deptList} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |