Administrator
2024-05-28 171f021009d50ba63d1f74fc7fd8eeabc9ddbb94
pipIrr-platform/pipIrr-web/pipIrr-web-irrigate/src/main/java/com/dy/pipIrrIrrigate/irrigateGroup/IrrigateGroupCtrl.java
@@ -31,10 +31,7 @@
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.*;
/**
 * @author :WuZeYu
@@ -322,10 +319,15 @@
    @GetMapping(path = "bind_units")
    @SsoAop()
    public BaseResponse<List<Long>> getGroupBindUnits(Long id) {
    public BaseResponse<List<String>> getGroupBindUnits(Long id) {
        try {
            List<Long> res = irrigateGroupSv.getGroupBindUnits(id);
            return BaseResponseUtils.buildSuccess(res);
            ArrayList<Object> list = new ArrayList<>();
            for (int i = 0; i < res.size(); i++) {
                String aLong = res.get(i).toString();
                list.add(aLong);
            }
            return BaseResponseUtils.buildSuccess(list);
        } catch (Exception e) {
            log.error("获取一个轮灌组绑定灌溉单元记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
@@ -334,10 +336,15 @@
    @GetMapping(path = "notBind_units")
    @SsoAop()
    public BaseResponse<List<Long>> getNotBindUnits() {
    public BaseResponse<List<String>> getNotBindUnits() {
        try {
            List<Long> res = irrigateGroupSv.getNotBindUnits();
            return BaseResponseUtils.buildSuccess(res);
            ArrayList<Object> list = new ArrayList<>();
            for (int i = 0; i < res.size(); i++) {
                String aLong = res.get(i).toString();
                list.add(aLong);
            }
            return BaseResponseUtils.buildSuccess(list);
        } catch (Exception e) {
            log.error("获取未绑定轮灌组的灌溉单元id记录异常", e);
            return BaseResponseUtils.buildException(e.getMessage());