zhubaomin
3 天以前 4b3f119b61143fed474b9dfcafd2369fc558a3b9
pipIrr-platform/pipIrr-web/pipIrr-web-project/src/main/java/com/dy/pipIrrProject/controller/ControllerSv.java
@@ -6,6 +6,7 @@
import com.dy.common.multiDataSource.DataSourceContext;
import com.dy.common.mw.protocol.Command;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pipIrrGlobal.daoPr.PrControllerMapper;
import com.dy.pipIrrGlobal.daoPr.PrIntakeControllerMapper;
@@ -13,6 +14,7 @@
import com.dy.pipIrrGlobal.pojoPr.PrController;
import com.dy.pipIrrGlobal.pojoPr.PrIntakeController;
import com.dy.pipIrrGlobal.voPr.VoController;
import com.dy.pipIrrGlobal.voPr.VoControllerSimple;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.common.utils.PojoUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -25,7 +27,10 @@
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Optional;
/**
 * @author ZhuBaoMin
@@ -80,6 +85,8 @@
        comSendUrl = env.getProperty(pro_mw + "." + DataSourceContext.get() + "." + key_mw);
        JSONObject response = (JSONObject) JSON.toJSON(sendCom2Mw(com));
        if (response != null && response.getString("code").equals("0001")) {
            JSONObject attachment = response.getJSONObject("content").getJSONObject("attachment");
@@ -256,6 +263,19 @@
        } catch (Exception e) {
            e.printStackTrace();
        }
        if(response == null) {
            return BaseResponseUtils.buildErrorMsg("中间件调用失败");
        }
        return response.getBody();
    }
    /**
     * 不分页获取全部未删除的阀控器列表
     * @return
     */
    public List<VoControllerSimple> getSimpleControllers() {
        return prControllerMapper.getSimpleControllers();
    }
}