pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/daoPr/PrIntakeMapper.java
@@ -198,7 +198,7 @@ * 获取未绑定到轮灌组的取水口列表 * @return */ List<VoIntakeSimple> getFreeIntakes(); List<VoIntakeSimple> getFreeIntakes(Map<?, ?> params); /** * 获取未绑定虚拟卡的取水口列表,给取水口绑虚拟卡使用 pipIrr-platform/pipIrr-global/src/main/resources/mapper/PrIntakeMapper.xml
@@ -744,11 +744,13 @@ id AS intakeId, name AS intakeName FROM pr_intake inta WHERE NOT EXISTS ( SELECT 1 FROM ir_group_intake gi WHERE gi.intake_id = inta.id ) AND inta.deleted = 0 <where> AND inta.deleted = 0 AND NOT EXISTS (SELECT 1 FROM ir_group_intake gi WHERE gi.intake_id = inta.id) <if test="intakeName != null and intakeName != ''"> AND LOWER(inta.name) LIKE CONCAT('%', #{intakeName}, '%') </if> </where> </select> <!--获取未绑定虚拟卡的取水口列表,给取水口绑虚拟卡使用--> pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeCtrl.java
@@ -11,6 +11,7 @@ import com.dy.pipIrrGlobal.pojoPr.PrIntake; import com.dy.pipIrrGlobal.voPr.*; import com.dy.pipIrrGlobal.voSe.VoActiveCard; import com.dy.pipIrrProject.intake.qo.QoIntake; import com.dy.pipIrrProject.result.ProjectResultCode; import com.taobao.api.ApiException; import io.swagger.v3.oas.annotations.Operation; @@ -351,9 +352,9 @@ */ @GetMapping(path = "getFreeIntakes") @SsoAop() public BaseResponse<QueryResultVo<List<VoIntakeSimple>>> getFreeIntakes() { public BaseResponse<List<VoIntakeSimple>> getFreeIntakes(QoIntake qo) { try { QueryResultVo<List<VoIntakeSimple>> res = intakeSv.getFreeIntakes(); List<VoIntakeSimple> res = intakeSv.getFreeIntakes(qo); return BaseResponseUtils.buildSuccess(res); } catch (Exception e) { log.error("查询取水口异常", e); pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/IntakeSv.java
@@ -13,6 +13,7 @@ import com.dy.pipIrrGlobal.daoPr.PrIntakeMapper; import com.dy.pipIrrGlobal.pojoPr.PrIntake; import com.dy.pipIrrGlobal.voPr.*; import com.dy.pipIrrProject.intake.qo.QoIntake; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.common.utils.PojoUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -353,9 +354,8 @@ * 获取未绑定到轮灌组的取水口列表 * @return */ public QueryResultVo<List<VoIntakeSimple>> getFreeIntakes() { QueryResultVo<List<VoIntakeSimple>> rsVo = new QueryResultVo<>(); rsVo.obj = prIntakeMapper.getFreeIntakes(); return rsVo; public List<VoIntakeSimple> getFreeIntakes(QoIntake queryVo) { Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); return prIntakeMapper.getFreeIntakes(params); } } pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/intake/qo/QoIntake.java
New file @@ -0,0 +1,17 @@ package com.dy.pipIrrProject.intake.qo; import lombok.Data; import lombok.EqualsAndHashCode; /** * @author ZhuBaoMin * @date 2025-04-11 14:02 * @LastEditTime 2025-04-11 14:02 * @Description 取水口查询对象,获取未绑定轮灌组时使用 */ @Data @EqualsAndHashCode(callSuper = false) public class QoIntake { private String intakeName; }