Ver Fonte

平台巷道映射

huangxingxing há 7 meses atrás
pai
commit
571f6a0740

+ 1 - 0
definitionsrc/returncode/returncode-business.properties

@@ -99,3 +99,4 @@ EB3100038 = aid:{0}\u4E8B\u6545\u4E0D\u5B58\u5728\uFF01
 EMB00001 = \u8BA1\u7B97\u672A\u5B8C\u6210\uFF01
 EMB00002 = \u8BA1\u7B97\u5931\u8D25\uFF01
 EMB00003 = \u4EBA\u5458\u4F4D\u7F6E\u6570\u636E\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u4F7F\u7528\u5982\u4E0B\u683C\u5F0F01
+EMB00004 = \u6839\u636E\u5E73\u53F0\u8DEF\u5F84\u751F\u6210\u672C\u5730\u8DEF\u5F84\u5931\u8D25\uFF01

+ 1 - 0
definitionsrc/returncode/returncode-business_zh_CN.properties

@@ -99,3 +99,4 @@ EB3100038 = aid:{0}\u4E8B\u6545\u4E0D\u5B58\u5728\uFF01
 EMB00001 = \u8BA1\u7B97\u672A\u5B8C\u6210\uFF01
 EMB00002 = \u8BA1\u7B97\u5931\u8D25\uFF01
 EMB00003 = \u4EBA\u5458\u4F4D\u7F6E\u6570\u636E\u683C\u5F0F\u9519\u8BEF\uFF0C\u8BF7\u4F7F\u7528\u5982\u4E0B\u683C\u5F0F01
+EMB00004 = \u6839\u636E\u5E73\u53F0\u8DEF\u5F84\u751F\u6210\u672C\u5730\u8DEF\u5F84\u5931\u8D25\uFF01

+ 142 - 0
modelsrc/com/miniframe/model/system/DMwaynode.java

@@ -0,0 +1,142 @@
+package com.miniframe.model.system;
+
+import com.miniframe.system.MiniserviceBaseModel;
+import java.io.Serializable;
+import javax.persistence.*;
+
+@Table(name = "d_mwaynode")
+public class DMwaynode extends MiniserviceBaseModel implements Serializable {
+    @Id
+    private Integer id;
+
+    /**
+     * 路径编号
+     */
+    private Integer mwid;
+
+    /**
+     * 节点ID
+     */
+    private Integer nid;
+
+    /**
+     * 节点名称
+     */
+    private String nname;
+
+    /**
+     * 节点编号
+     */
+    private String ncode;
+
+    /**
+     * 序列号
+     */
+    private Integer seq;
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * @return id
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * @param id
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 获取路径编号
+     *
+     * @return mwid - 路径编号
+     */
+    public Integer getMwid() {
+        return mwid;
+    }
+
+    /**
+     * 设置路径编号
+     *
+     * @param mwid 路径编号
+     */
+    public void setMwid(Integer mwid) {
+        this.mwid = mwid;
+    }
+
+    /**
+     * 获取节点ID
+     *
+     * @return nid - 节点ID
+     */
+    public Integer getNid() {
+        return nid;
+    }
+
+    /**
+     * 设置节点ID
+     *
+     * @param nid 节点ID
+     */
+    public void setNid(Integer nid) {
+        this.nid = nid;
+    }
+
+    /**
+     * 获取节点名称
+     *
+     * @return nname - 节点名称
+     */
+    public String getNname() {
+        return nname;
+    }
+
+    /**
+     * 设置节点名称
+     *
+     * @param nname 节点名称
+     */
+    public void setNname(String nname) {
+        this.nname = nname == null ? null : nname.trim();
+    }
+
+    /**
+     * 获取节点编号
+     *
+     * @return ncode - 节点编号
+     */
+    public String getNcode() {
+        return ncode;
+    }
+
+    /**
+     * 设置节点编号
+     *
+     * @param ncode 节点编号
+     */
+    public void setNcode(String ncode) {
+        this.ncode = ncode == null ? null : ncode.trim();
+    }
+
+    /**
+     * 获取序列号
+     *
+     * @return seq - 序列号
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * 设置序列号
+     *
+     * @param seq 序列号
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+}

+ 580 - 0
modelsrc/com/miniframe/model/system/DMwaynodeSQLBuilder.java

@@ -0,0 +1,580 @@
+package com.miniframe.model.system;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DMwaynodeSQLBuilder {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    public DMwaynodeSQLBuilder() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidIsNull() {
+            addCriterion("mwid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidIsNotNull() {
+            addCriterion("mwid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidEqualTo(Integer value) {
+            addCriterion("mwid =", value, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidNotEqualTo(Integer value) {
+            addCriterion("mwid <>", value, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidGreaterThan(Integer value) {
+            addCriterion("mwid >", value, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidGreaterThanOrEqualTo(Integer value) {
+            addCriterion("mwid >=", value, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidLessThan(Integer value) {
+            addCriterion("mwid <", value, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidLessThanOrEqualTo(Integer value) {
+            addCriterion("mwid <=", value, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidIn(List<Integer> values) {
+            addCriterion("mwid in", values, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidNotIn(List<Integer> values) {
+            addCriterion("mwid not in", values, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidBetween(Integer value1, Integer value2) {
+            addCriterion("mwid between", value1, value2, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andMwidNotBetween(Integer value1, Integer value2) {
+            addCriterion("mwid not between", value1, value2, "mwid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidIsNull() {
+            addCriterion("nid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidIsNotNull() {
+            addCriterion("nid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidEqualTo(Integer value) {
+            addCriterion("nid =", value, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidNotEqualTo(Integer value) {
+            addCriterion("nid <>", value, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidGreaterThan(Integer value) {
+            addCriterion("nid >", value, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidGreaterThanOrEqualTo(Integer value) {
+            addCriterion("nid >=", value, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidLessThan(Integer value) {
+            addCriterion("nid <", value, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidLessThanOrEqualTo(Integer value) {
+            addCriterion("nid <=", value, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidIn(List<Integer> values) {
+            addCriterion("nid in", values, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidNotIn(List<Integer> values) {
+            addCriterion("nid not in", values, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidBetween(Integer value1, Integer value2) {
+            addCriterion("nid between", value1, value2, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNidNotBetween(Integer value1, Integer value2) {
+            addCriterion("nid not between", value1, value2, "nid");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameIsNull() {
+            addCriterion("nname is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameIsNotNull() {
+            addCriterion("nname is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameEqualTo(String value) {
+            addCriterion("nname =", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameNotEqualTo(String value) {
+            addCriterion("nname <>", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameGreaterThan(String value) {
+            addCriterion("nname >", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameGreaterThanOrEqualTo(String value) {
+            addCriterion("nname >=", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameLessThan(String value) {
+            addCriterion("nname <", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameLessThanOrEqualTo(String value) {
+            addCriterion("nname <=", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameLike(String value) {
+            addCriterion("nname like", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameNotLike(String value) {
+            addCriterion("nname not like", value, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameIn(List<String> values) {
+            addCriterion("nname in", values, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameNotIn(List<String> values) {
+            addCriterion("nname not in", values, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameBetween(String value1, String value2) {
+            addCriterion("nname between", value1, value2, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNnameNotBetween(String value1, String value2) {
+            addCriterion("nname not between", value1, value2, "nname");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeIsNull() {
+            addCriterion("ncode is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeIsNotNull() {
+            addCriterion("ncode is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeEqualTo(String value) {
+            addCriterion("ncode =", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeNotEqualTo(String value) {
+            addCriterion("ncode <>", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeGreaterThan(String value) {
+            addCriterion("ncode >", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeGreaterThanOrEqualTo(String value) {
+            addCriterion("ncode >=", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeLessThan(String value) {
+            addCriterion("ncode <", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeLessThanOrEqualTo(String value) {
+            addCriterion("ncode <=", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeLike(String value) {
+            addCriterion("ncode like", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeNotLike(String value) {
+            addCriterion("ncode not like", value, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeIn(List<String> values) {
+            addCriterion("ncode in", values, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeNotIn(List<String> values) {
+            addCriterion("ncode not in", values, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeBetween(String value1, String value2) {
+            addCriterion("ncode between", value1, value2, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andNcodeNotBetween(String value1, String value2) {
+            addCriterion("ncode not between", value1, value2, "ncode");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqIsNull() {
+            addCriterion("seq is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqIsNotNull() {
+            addCriterion("seq is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqEqualTo(Integer value) {
+            addCriterion("seq =", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqNotEqualTo(Integer value) {
+            addCriterion("seq <>", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqGreaterThan(Integer value) {
+            addCriterion("seq >", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqGreaterThanOrEqualTo(Integer value) {
+            addCriterion("seq >=", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqLessThan(Integer value) {
+            addCriterion("seq <", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqLessThanOrEqualTo(Integer value) {
+            addCriterion("seq <=", value, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqIn(List<Integer> values) {
+            addCriterion("seq in", values, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqNotIn(List<Integer> values) {
+            addCriterion("seq not in", values, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqBetween(Integer value1, Integer value2) {
+            addCriterion("seq between", value1, value2, "seq");
+            return (Criteria) this;
+        }
+
+        public Criteria andSeqNotBetween(Integer value1, Integer value2) {
+            addCriterion("seq not between", value1, value2, "seq");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 10 - 0
modelsrc/com/miniframe/model/system/dao/DMwaynodeMapper.java

@@ -0,0 +1,10 @@
+package com.miniframe.model.system.dao;
+
+import com.miniframe.model.system.DMwaynode;
+import com.miniframe.model.system.DMwaynodeSQLBuilder;
+import com.miniframe.spring.db.MFBaseMapper;
+import com.miniframe.system.MiniserviceBaseDao;
+
+public interface DMwaynodeMapper extends MiniserviceBaseDao, MFBaseMapper<DMwaynode> {
+    long countByExample(DMwaynodeSQLBuilder example);
+}

+ 2 - 1
modelsrc/com/miniframe/model/system/dbconfig/MapperConfig-system.xml

@@ -5,7 +5,7 @@
     This file is generated by MyBatis Generator.
     This file is the shell of a Mapper Config file - in many cases you will need to add
       to this file before it is usable by MyBatis.
-    This file was generated on Thu Feb 06 11:07:43 CST 2025.
+    This file was generated on Thu Feb 06 11:39:29 CST 2025.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />
@@ -48,5 +48,6 @@
     <mapper resource="com/miniframe/model/system/xml/DVentfanMapper.xml" />
     <mapper resource="com/miniframe/model/system/xml/DSensorValMapper.xml" />
     <mapper resource="com/miniframe/model/system/xml/DPtpipeassMapper.xml" />
+    <mapper resource="com/miniframe/model/system/xml/DMwaynodeMapper.xml" />
   </mappers>
 </configuration>

+ 50 - 0
modelsrc/com/miniframe/model/system/xml/DMwaynodeMapper.xml

@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.miniframe.model.system.dao.DMwaynodeMapper">
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <select id="countByExample" parameterType="com.miniframe.model.system.DMwaynodeSQLBuilder" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+    -->
+    select count(*) from d_mwaynode
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <cache>
+    <!--
+      WARNING - @mbg.generated
+    -->
+  </cache>
+</mapper>

+ 31 - 31
pom.xml

@@ -34,17 +34,17 @@
 
         <!-- nacos 依赖 -->
         <!-- https://mvnrepository.com/artifact/com.alibaba.cloud/spring-cloud-starter-alibaba-nacos-discovery -->
-<!--        <dependency>-->
-<!--            <groupId>com.alibaba.cloud</groupId>-->
-<!--            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
-<!--            <version>2.2.7.RELEASE</version>-->
-<!--            <exclusions>-->
-<!--                <exclusion>-->
-<!--                    <groupId>org.springframework.cloud</groupId>-->
-<!--                    <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>-->
-<!--                </exclusion>-->
-<!--            </exclusions>-->
-<!--        </dependency>-->
+        <!--        <dependency>-->
+        <!--            <groupId>com.alibaba.cloud</groupId>-->
+        <!--            <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
+        <!--            <version>2.2.7.RELEASE</version>-->
+        <!--            <exclusions>-->
+        <!--                <exclusion>-->
+        <!--                    <groupId>org.springframework.cloud</groupId>-->
+        <!--                    <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>-->
+        <!--                </exclusion>-->
+        <!--            </exclusions>-->
+        <!--        </dependency>-->
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>
@@ -216,11 +216,11 @@
             <scope>system</scope>
             <systemPath>${project.basedir}/lib/taobao-sdk-java-auto.jar</systemPath>
         </dependency>
-<!--        <dependency>-->
-<!--            <groupId>com.taobao</groupId>-->
-<!--            <artifactId>taobao-sdk-java-auto</artifactId>-->
-<!--            <version>1.0.0</version>-->
-<!--        </dependency>-->
+        <!--        <dependency>-->
+        <!--            <groupId>com.taobao</groupId>-->
+        <!--            <artifactId>taobao-sdk-java-auto</artifactId>-->
+        <!--            <version>1.0.0</version>-->
+        <!--        </dependency>-->
 
 
         <!--全局排除spring-boot-starter-logging内的所有依赖-->
@@ -256,11 +256,11 @@
             <scope>test</scope>
         </dependency>
 
-<!--        <dependency>-->
-<!--            <groupId>com.aliyun</groupId>-->
-<!--            <artifactId>dysmsapi20170525</artifactId>-->
-<!--            <version>2.0.9</version>-->
-<!--        </dependency>-->
+        <!--        <dependency>-->
+        <!--            <groupId>com.aliyun</groupId>-->
+        <!--            <artifactId>dysmsapi20170525</artifactId>-->
+        <!--            <version>2.0.9</version>-->
+        <!--        </dependency>-->
         <dependency>
             <groupId>adi</groupId>
             <artifactId>vtk</artifactId>
@@ -308,16 +308,16 @@
         </dependency>
 
 
-            <dependency>
-                <groupId>com.github.docker-java</groupId>
-                <artifactId>docker-java</artifactId>
-                <version>3.2.13</version> <!-- 请检查最新版本 -->
-            </dependency>
-            <dependency>
-                <groupId>com.github.docker-java</groupId>
-                <artifactId>docker-java-transport-httpclient5</artifactId>
-                <version>3.2.13</version>
-            </dependency>
+        <dependency>
+            <groupId>com.github.docker-java</groupId>
+            <artifactId>docker-java</artifactId>
+            <version>3.2.13</version> <!-- 请检查最新版本 -->
+        </dependency>
+        <dependency>
+            <groupId>com.github.docker-java</groupId>
+            <artifactId>docker-java-transport-httpclient5</artifactId>
+            <version>3.2.13</version>
+        </dependency>
         <dependency>
             <groupId>com.aliyun</groupId>
             <artifactId>dysmsapi20170525</artifactId>

+ 200 - 11
src/main/java/com/miniframe/bisiness/system/M00002Service.java

@@ -1,17 +1,14 @@
 package com.miniframe.bisiness.system;
 
-import java.util.List;
-import java.util.Map;
+import java.util.*;
+
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.exception.BusinessException;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.system.model.M00002BaseModel;
-import com.miniframe.model.system.DAccident;
-import com.miniframe.model.system.DMway;
-import com.miniframe.model.system.DMwaySQLBuilder;
-import com.miniframe.model.system.DWay;
-import com.miniframe.model.system.dao.DAccidentMapper;
-import com.miniframe.model.system.dao.DMwayMapper;
+import com.miniframe.model.system.*;
+import com.miniframe.model.system.dao.*;
+import com.miniframe.ptdj.AllPahtsDFS;
 
 import javax.rmi.CORBA.Util;
 
@@ -37,14 +34,12 @@ public class M00002Service extends M00002BaseModel implements ExecProcessFlow {
 				throw new BusinessException("EMB00003");
 			}
 		}
-
 		DMwayMapper wdao = UtilTools.getBean(DMwayMapper.class);
 		DAccidentMapper accDao  = UtilTools.getBean(DAccidentMapper.class);
 		DAccident da =accDao.selectByPrimaryKey(aid);
 		if(da==null){
 			throw new BusinessException("EB3000002");
 		}
-
 		DMwaySQLBuilder wsb =new DMwaySQLBuilder();
 		DMwaySQLBuilder.Criteria wsc =wsb.createCriteria();
 		wsc.andAidEqualTo(aid);
@@ -63,9 +58,203 @@ public class M00002Service extends M00002BaseModel implements ExecProcessFlow {
 			mway.setPersonsites(personsites);
 			wdao.updateByPrimaryKey(mway);
 		}
+		List<DMway> ways2= wdao.selectByExample(wsb);
+		DMway mway =ways2.get(0);
+		//作业地点,pipes88,pipes185,pipes184,pipes183,pipes168,pipes165,pipes166,pipes165,pipes163,pipes159,pipes162,pipes159,pipes161,pipes159,pipes160,pipes131,pipes8,主井,地面
+		saveMayNodes(lnodes,mway);
 
 	}
-	
+	//根据映射生成路径信息
+	private void saveMayNodes(String lnodes,DMway way) throws BusinessException {
+		DPtpipeassMapper ptDao = UtilTools.getBean(DPtpipeassMapper.class);
+		DPtpipeassSQLBuilder ptsb = new DPtpipeassSQLBuilder();
+		DPipeMapper pDao = UtilTools.getBean(DPipeMapper.class);
+		DPipeSQLBuilder psb =new DPipeSQLBuilder();
+		String[] lnode_s = lnodes.split(",");
+		List<String> lnode_sl = new ArrayList<>();
+		for (int i = 1; i < lnode_s.length-2; i++) {
+			lnode_sl.add(lnode_s[i]);
+		}
+		List<DPipe> pList = getdPipes(ptDao, ptsb, pDao, lnode_sl);
+		AllPahtsDFS pathFinder = new AllPahtsDFS();
+		DPipeSQLBuilder.Criteria psc = psb.createCriteria();
+		DPipe genPipe = pList.get(0);
+		List<Integer> pids = getPids(pList, pathFinder, genPipe);
+		List<DPipe> ps = new ArrayList<>();
+		for (Integer pid: pids) {
+			ps.add(pDao.selectByPrimaryKey(pid));
+		}
+		List<Integer> nids = getNids(ps);
+		insetWayNodes(way, nids);
+
+	}
+
+	/**
+	 * 根据平台映射关系 获取 管道
+	 * @param ptDao
+	 * @param ptsb
+	 * @param pDao
+	 * @param lnode_sl
+	 * @return
+	 * @throws BusinessException
+	 */
+	private List<DPipe> getdPipes(DPtpipeassMapper ptDao, DPtpipeassSQLBuilder ptsb, DPipeMapper pDao, List<String> lnode_sl) throws BusinessException {
+		List<DPtpipeass>  ptpList = new ArrayList<>();
+		for (String ptcode : lnode_sl) {
+			ptsb.clear();
+			DPtpipeassSQLBuilder.Criteria ptsc = ptsb.createCriteria();
+			ptsc.andPtcodeEqualTo(ptcode);
+			List<DPtpipeass> ptpsonList = new ArrayList<>();
+			ptpsonList=  ptDao.selectByExample(ptsb);
+			if(!ptpsonList.isEmpty()){
+				ptpList.addAll(ptpsonList);
+			}
+		}
+
+		List<DPipe> pList= new ArrayList<>();
+		System.out.println("------------------");
+		for (DPtpipeass pt: ptpList) {
+			DPipe p = pDao.selectByPrimaryKey(pt.getPid());
+			if(p !=null){
+				System.out.println(p.getId());
+				pList.add(p);
+			}
+		}
+		if(pList.isEmpty()){
+			throw  new BusinessException("EMB00004");
+		}
+		return pList;
+	}
+
+	/**
+	 * 根据DFS 规则 获取路径
+	 * @param pList
+	 * @param pathFinder
+	 * @param genPipe
+	 * @return
+	 * @throws BusinessException
+	 */
+	private List<Integer> getPids(List<DPipe> pList, AllPahtsDFS pathFinder, DPipe genPipe) throws BusinessException {
+		//结果队列
+		Queue<DPipe> queue = new LinkedList<>();
+		queue.add(genPipe);
+		List<Integer> notids = new ArrayList<>();
+		notids.add(genPipe.getId());
+		while (!queue.isEmpty()){
+			DPipe fpipe = queue.poll();
+			List<DPipe> sonList = getSonPipes(fpipe,notids);
+			for (DPipe sonPipe: sonList) {
+				pathFinder.addEdge(fpipe.getId(),sonPipe.getId());
+				notids.add(sonPipe.getId());//已经查询的数据排除
+				// System.out.println(fpipe.getId()+","+sonPipe.getId());
+			}
+			if(sonList.isEmpty()){
+				continue;
+			}
+			for (DPipe sonPipe: sonList) {
+				queue.add(sonPipe);
+			}
+		}
+		System.out.println("------------------");
+		//获取所有路径
+		List<List<Integer>> paths= pathFinder.findAllPaths(pList.get(0).getId(), pList.get(pList.size()-1).getId());
+		if(paths.isEmpty()){
+			throw new BusinessException("EMB00004");
+		}
+		List<Integer> pids = paths.get(0);
+		return pids;
+	}
+
+	/**
+	 * 根据节点编号保存 DMwayNode
+	 * @param way
+	 * @param nids
+	 */
+	private void insetWayNodes(DMway way, List<Integer> nids) {
+		//删除历史
+		DMwaynodeMapper mwnDao =UtilTools.getBean(DMwaynodeMapper.class);
+		DMwaynodeSQLBuilder mwnSb = new DMwaynodeSQLBuilder();
+		DMwaynodeSQLBuilder.Criteria mwnsc = mwnSb.createCriteria();
+		mwnsc.andMwidEqualTo(way.getId());
+		mwnDao.deleteByExample(mwnSb);
+		//新增
+		DNodeMapper nodeDao =UtilTools.getBean(DNodeMapper.class);
+		int seq =0;
+		for (Integer nid: nids) {
+			DNode n = nodeDao.selectByPrimaryKey(nid);
+			DMwaynode mwaynode = new DMwaynode();
+			mwaynode.setMwid(way.getId());
+			mwaynode.setNcode(n.getCode());
+			mwaynode.setNid(n.getId());
+			mwaynode.setNname(n.getName());
+			mwaynode.setSeq(seq++);
+			mwnDao.insertSelective(mwaynode);
+		}
+	}
+
+	/**
+	 * 按顺序获取 节点编号
+	 * @param ps
+	 * @return
+	 */
+	private List<Integer> getNids(List<DPipe> ps) {
+		List<Integer> nids = new ArrayList<>();
+		DPipe temp =null;
+		for (int i = 0; i< ps.size(); i++) {
+			DPipe p = ps.get(i);
+			if(temp==null){
+				temp =p;
+			}else {
+				int x1 = temp.getSnid();
+				int x2 = temp.getEnid();
+				int y1 = p.getSnid();
+				int y2 = p.getEnid();
+				if(x1 ==y1){
+					nids.add(x2);
+					nids.add(x1);
+					nids.add(y2);
+				}else if (x1==y2){
+					nids.add(x2);
+					nids.add(x1);
+					nids.add(y1);
+				}else if(x2==y1){
+					nids.add(x1);
+					nids.add(x2);
+					nids.add(y2);
+				}else if(x2==y2){
+					nids.add(x1);
+					nids.add(x2);
+					nids.add(y1);
+				}
+			}
+			temp= p;
+		}
+		System.out.println(nids);
+		LinkedHashSet<Integer> set = new LinkedHashSet<>(nids);
+		nids = new ArrayList<>(set);
+		System.out.println("------------------");
+		System.out.println(nids);
+		return nids;
+	}
+
+	private  List<DPipe> getSonPipes(DPipe fPipe,List<Integer> notids){
+		DPipeMapper pDao = UtilTools.getBean(DPipeMapper.class);
+		DPipeSQLBuilder psb =new DPipeSQLBuilder();
+		DPipeSQLBuilder.Criteria psc = psb.createCriteria();
+		List<Integer> nids = new ArrayList<>();
+		nids.add(fPipe.getSnid());
+		nids.add(fPipe.getEnid());
+		psc.andSnidIn(nids);
+		psc.andIdNotIn(notids);
+		List<DPipe> s1List = pDao.selectByExample(psb);
+		psb.clear();
+		psc = psb.createCriteria();
+		psc.andEnidIn(nids);
+		psc.andIdNotIn(notids);
+		List<DPipe> s2List = pDao.selectByExample(psb);
+		s1List.addAll(s2List);
+		return s1List;
+	}
 	/**
 	 * 基础系统,“平台对接预设路径”业务前处理
  	 */

+ 23 - 0
src/main/java/com/miniframe/dbtransfer/DMwaynodeDbTransfer.java

@@ -0,0 +1,23 @@
+package com.miniframe.dbtransfer;
+
+import com.miniframe.core.DbTransfer;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+import com.miniframe.model.system.DMwaynode;
+
+/**
+ * 实体列表,“D_MWAYNODE”数据库数据转化逻辑处理(重新生成不覆盖)。
+ */
+public class DMwaynodeDbTransfer extends DbTransfer implements Serializable {
+	
+	private static final long serialVersionUID = -7051358269847459502L;
+
+	@Override
+	public List transfer(final List l,Map map) throws Exception{
+		List<DMwaynode> list=l;
+		return list;
+	};
+
+}

+ 50 - 0
src/main/java/com/miniframe/ptdj/AllPahtsDFS.java

@@ -0,0 +1,50 @@
+package com.miniframe.ptdj;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AllPahtsDFS {
+    private Map<Integer, List<Integer>> grah;
+    private List<List<Integer>> allPahts;
+    public AllPahtsDFS(){
+        grah = new HashMap<>();
+        allPahts = new ArrayList<>();
+    }
+    public void addEdge(int from,int to){
+        grah.putIfAbsent(from,new ArrayList<>());
+        grah.get(from).add(to);
+    }
+    private void dfs(int current,int target,List<Integer> path){
+        path.add(current);
+        if(current==target){
+            allPahts.add(new ArrayList<>(path));
+        }else {
+            for (int neighbor:grah.getOrDefault(current,new ArrayList<>())) {
+                dfs(neighbor,target,path);
+            }
+        }
+        path.remove(path.size()-1);
+    }
+    public List<List<Integer>> findAllPaths(int start, int target){
+        allPahts.clear();
+        dfs(start,target,new ArrayList<>());
+        return  allPahts;
+    }
+
+    public static void main(String[] args) {
+        AllPahtsDFS pathFander = new AllPahtsDFS();
+        pathFander.addEdge(1,2);
+        pathFander.addEdge(3,1);
+        pathFander.addEdge(2,3);
+        pathFander.addEdge(2,4);
+        pathFander.addEdge(3,4);
+        pathFander.addEdge(3,5);
+        pathFander.addEdge(4,5);
+        List<List<Integer>> paths= pathFander.findAllPaths(1,5);
+        for (List<Integer> path:paths) {
+            System.out.println(path);
+        }
+    }
+}

+ 52 - 0
src/test/java/com/miniframe/AllPahtsDFS.java

@@ -0,0 +1,52 @@
+package com.miniframe;
+
+import com.miniframe.model.system.DPipe;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class AllPahtsDFS {
+    private Map<Integer, List<Integer>> grah;
+    private List<List<Integer>> allPahts;
+    public AllPahtsDFS(){
+        grah = new HashMap<>();
+        allPahts = new ArrayList<>();
+    }
+    public void addEdge(int from,int to){
+        grah.putIfAbsent(from,new ArrayList<>());
+        grah.get(from).add(to);
+    }
+    private void dfs(int current,int target,List<Integer> path){
+        path.add(current);
+        if(current==target){
+            allPahts.add(new ArrayList<>(path));
+        }else {
+            for (int neighbor:grah.getOrDefault(current,new ArrayList<>())) {
+                dfs(neighbor,target,path);
+            }
+        }
+        path.remove(path.size()-1);
+    }
+    public List<List<Integer>> findAllPaths(int start, int target){
+        allPahts.clear();
+        dfs(start,target,new ArrayList<>());
+        return  allPahts;
+    }
+
+    public static void main(String[] args) {
+        AllPahtsDFS pathFander = new AllPahtsDFS();
+        pathFander.addEdge(1,2);
+        pathFander.addEdge(1,3);
+        pathFander.addEdge(2,3);
+        pathFander.addEdge(2,4);
+        pathFander.addEdge(3,4);
+        pathFander.addEdge(3,5);
+        pathFander.addEdge(4,5);
+        List<List<Integer>> paths= pathFander.findAllPaths(1,5);
+        for (List<Integer> path:paths) {
+            System.out.println(path);
+        }
+    }
+}

+ 204 - 1
src/test/java/com/miniframe/ApplicationTests.java

@@ -1,19 +1,222 @@
 package com.miniframe;
 
 import com.miniframe.core.ext.UtilTools;
-import com.miniframe.model.system.AdiSolverConfigImg;
+import com.miniframe.model.system.*;
 import com.miniframe.model.system.dao.AdiSolverConfigImgMapper;
+import com.miniframe.model.system.dao.DPipeMapper;
+import com.miniframe.model.system.dao.DPtpipeassMapper;
 import com.miniframe.template.TemplateGenerator;
 import com.miniframe.utils.MFServiceUtils;
 import freemarker.template.TemplateException;
 import org.junit.jupiter.api.Test;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ImportResource;
 
 import java.io.IOException;
+import java.util.*;
+import java.util.stream.Collectors;
+
 
 @SpringBootTest
 class ApplicationTests {
 
+    @Test
+    void ptpipetest(){
+        //作业地点,pipes88,pipes185,pipes184,pipes183,pipes168,pipes165,pipes166,pipes165,pipes163,pipes159,pipes162,pipes159,pipes161,pipes159,pipes160,pipes131,pipes8,主井,地面
+        String   lnodes ="作业地点,pipes174,pipes192,pipes193,pipes194,pipes178,pipes177,pipes155,pipes154,pipes153,pipes151,pipes149,pipes150,pipes142,pipes141,pipes140,pipes139,pipes135,pipes8,主井,地面";
+        String[] lnode_s = lnodes.split(",");
+        List<String> lnode_sl = new ArrayList<>();
+        for (int i = 1; i < lnode_s.length-2; i++) {
+            lnode_sl.add(lnode_s[i]);
+        }
+        DPtpipeassMapper ptDao = UtilTools.getBean(DPtpipeassMapper.class);
+        DPtpipeassSQLBuilder ptsb = new DPtpipeassSQLBuilder();
+
+        List<DPtpipeass>  ptpList = new ArrayList<>();
+        for (String ptcode :lnode_sl) {
+            ptsb.clear();
+            DPtpipeassSQLBuilder.Criteria ptsc = ptsb.createCriteria();
+            ptsc.andPtcodeEqualTo(ptcode);
+            List<DPtpipeass> ptpsonList = new ArrayList<>();
+            ptpsonList=  ptDao.selectByExample(ptsb);
+            if(!ptpsonList.isEmpty()){
+                ptpList.addAll(ptpsonList);
+            }
+        }
+        DPipeMapper pDao = UtilTools.getBean(DPipeMapper.class);
+        DPipeSQLBuilder psb =new DPipeSQLBuilder();
+
+        List<DPipe> pList= new ArrayList<>();
+        System.out.println("------------------");
+        for (DPtpipeass pt: ptpList) {
+            DPipe p = pDao.selectByPrimaryKey(pt.getPid());
+            if(p !=null){
+                 System.out.println(p.getId());
+                pList.add(p);
+            }
+        }
+        DPipeSQLBuilder.Criteria psc = psb.createCriteria();
+        DPipe genPipe = pList.get(0);
+        //结果队列
+        Queue<DPipe> queue = new LinkedList<>();
+        queue.add(genPipe);
+        List<Integer> notids = new ArrayList<>();
+        notids.add(genPipe.getId());
+        AllPahtsDFS pathFinder = new AllPahtsDFS();
+        while (!queue.isEmpty()){
+            DPipe fpipe = queue.poll();
+            List<DPipe> sonList = getSonPipes(fpipe,notids);
+            for (DPipe sonPipe: sonList) {
+                pathFinder.addEdge(fpipe.getId(),sonPipe.getId());
+                notids.add(sonPipe.getId());//已经查询的数据排除
+               // System.out.println(fpipe.getId()+","+sonPipe.getId());
+            }
+            if(sonList.isEmpty()){
+                continue;
+            }
+            for (DPipe sonPipe: sonList) {
+                queue.add(sonPipe);
+            }
+        }
+        System.out.println("------------------");
+        //获取所有路径
+        List<List<Integer>> paths= pathFinder.findAllPaths(pList.get(0).getId(),pList.get(pList.size()-1).getId());
+        for (List<Integer> path:paths) {
+            System.out.println(path);
+        }
+        List<Integer> pids = paths.get(0);
+        getNids(pDao, pids);
+    }
+
+    private void getNids(DPipeMapper pDao, List<Integer> pids) {
+        List<DPipe> ps = new ArrayList<>();
+        for (Integer pid: pids) {
+            ps.add(pDao.selectByPrimaryKey(pid));
+        }
+        List<Integer> nids = new ArrayList<>();
+        DPipe temp =null;
+        for (int i =0;i<ps.size();i++) {
+            DPipe p = ps.get(i);
+            if(temp==null){
+                temp =p;
+            }else {
+                int x1 = temp.getSnid();
+                int x2 = temp.getEnid();
+                int y1 = p.getSnid();
+                int y2 = p.getEnid();
+                if(x1 ==y1){
+                    nids.add(x2);
+                    nids.add(x1);
+                    nids.add(y2);
+                }else if (x1==y2){
+                    nids.add(x2);
+                    nids.add(x1);
+                    nids.add(y1);
+                }else if(x2==y1){
+                    nids.add(x1);
+                    nids.add(x2);
+                    nids.add(y2);
+                }else if(x2==y2){
+                    nids.add(x1);
+                    nids.add(x2);
+                    nids.add(y1);
+                }
+            }
+            temp= p;
+        }
+        System.out.println(nids);
+        LinkedHashSet<Integer> set = new LinkedHashSet<>(nids);
+        nids = new ArrayList<>(set);
+        System.out.println("------------------");
+        System.out.println(nids);
+    }
+
+    private  List<DPipe> getSonPipes(DPipe fPipe,List<Integer> notids){
+        DPipeMapper pDao = UtilTools.getBean(DPipeMapper.class);
+        DPipeSQLBuilder psb =new DPipeSQLBuilder();
+        DPipeSQLBuilder.Criteria psc = psb.createCriteria();
+        List<Integer> nids = new ArrayList<>();
+        nids.add(fPipe.getSnid());
+        nids.add(fPipe.getEnid());
+        psc.andSnidIn(nids);
+        psc.andIdNotIn(notids);
+        List<DPipe> s1List = pDao.selectByExample(psb);
+        psb.clear();
+        psc = psb.createCriteria();
+        psc.andEnidIn(nids);
+        psc.andIdNotIn(notids);
+        List<DPipe> s2List = pDao.selectByExample(psb);
+        s1List.addAll(s2List);
+        return s1List;
+    }
+    private void findPipeFs(DPipeFS pfs,List<DPipe> bjList,List<Integer> notids){
+        DPipe fPipe =pfs.getPipe();
+        fpipeGetSons(pfs, notids, fPipe);
+
+
+        if(pfs.getSonPipes().isEmpty()){
+            return;
+        }
+
+        //判断 生效
+        boolean isFlag = false;
+        for (DPipeFS sonpfs :pfs.getSonPipes()) {
+            System.out.println(sonpfs.getPipe().getId());
+            for (int i = 0; i < bjList.size(); i++) {
+                DPipe bjp = bjList.get(i);
+                if(bjp.getId().equals(sonpfs.getPipe().getId())&& ((i+1)!=bjList.size())){
+                    sonpfs.setFlag(true);
+                    isFlag = true;
+                    findPipeFs(sonpfs,bjList,notids);
+                }
+                if(bjp.getId().equals(sonpfs.getPipe().getId()) && ((i+1)==bjList.size())){
+                    sonpfs.setFlag(true);
+                    isFlag = true;
+                    return;
+                }
+            }
+        }
+        if(!isFlag){
+            for (DPipeFS sonpfs :pfs.getSonPipes()) {
+                findPipeFs(sonpfs, bjList,notids);
+            }
+        }
+    }
+
+    private void fpipeGetSons(DPipeFS pfs, List<Integer> notids, DPipe fPipe) {
+        DPipeMapper pDao = UtilTools.getBean(DPipeMapper.class);
+        DPipeSQLBuilder psb =new DPipeSQLBuilder();
+        DPipeSQLBuilder.Criteria psc = psb.createCriteria();
+        List<Integer> nids = new ArrayList<>();
+        nids.add(fPipe.getSnid());
+        nids.add(fPipe.getEnid());
+        psc.andSnidIn(nids);
+        psc.andIdNotIn(notids);
+        List<DPipe> s1List = pDao.selectByExample(psb);
+        pfs.getSonPipes().addAll( pipeListToFs(s1List));
+        psb.clear();
+        psc = psb.createCriteria();
+        psc.andEnidIn(nids);
+        psc.andIdNotIn(notids);
+        List<DPipe> s2List = pDao.selectByExample(psb);
+        pfs.getSonPipes().addAll(pipeListToFs(s2List));
+    }
+
+    private  List<DPipeFS> pipeListToFs(List<DPipe> s1List) {
+        List<DPipeFS> s1fsList = new ArrayList<>();
+        for (DPipe sp: s1List) {
+            DPipeFS sfs1 = new DPipeFS();
+            sfs1.setPipe(sp);
+            s1fsList.add(sfs1);
+        }
+        return s1fsList;
+    }
+
+
     @Test
     void contextLoads() throws IOException, TemplateException {
 //        TemplateGenerator.createFireControl(5);

+ 27 - 0
src/test/java/com/miniframe/DPfz.java

@@ -0,0 +1,27 @@
+package com.miniframe;
+
+import com.miniframe.model.system.DPipe;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DPfz {
+    DPipe  fpipe;
+    DPipe  spipe;
+
+    public DPipe getFpipe() {
+        return fpipe;
+    }
+
+    public void setFpipe(DPipe fpipe) {
+        this.fpipe = fpipe;
+    }
+
+    public DPipe getSpipe() {
+        return spipe;
+    }
+
+    public void setSpipe(DPipe spipe) {
+        this.spipe = spipe;
+    }
+}

+ 35 - 0
src/test/java/com/miniframe/DPipeFS.java

@@ -0,0 +1,35 @@
+package com.miniframe;
+
+import com.miniframe.model.system.DPipe;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class DPipeFS {
+    DPipe  pipe;
+    List<DPipeFS> sonPipes = new ArrayList<>();
+    Boolean flag =false;
+    public DPipe getPipe() {
+        return pipe;
+    }
+
+    public void setPipe(DPipe pipe) {
+        this.pipe = pipe;
+    }
+
+    public List<DPipeFS> getSonPipes() {
+        return sonPipes;
+    }
+
+    public void setSonPipes(List<DPipeFS> sonPipes) {
+        this.sonPipes = sonPipes;
+    }
+
+    public Boolean getFlag() {
+        return flag;
+    }
+
+    public void setFlag(Boolean flag) {
+        this.flag = flag;
+    }
+}

+ 4 - 2
系统设计/实体Bean/system(实体列表).csv

@@ -31,7 +31,7 @@
 26,D_CHECKNODE_VAL,监测点求解结果val,FALSE,
 27,D_THRESHOLD,报警设置,FALSE,
 
-28,d_way,预设路径,FALSE,
+28,D_WAY,预设路径,FALSE,
 29,D_WAYNODE,预设路径节点,FALSE,
 20,D_WAY_RESULT,路径求解结果,FALSE,
 21,D_WAYNODE_RESULT,路径节点求解结果,FALSE,
@@ -42,4 +42,6 @@
 26,D_VENTFAN,风机,FALSE,
 
 27,D_SENSOR_VAL,传感器对接数据,FALSE,
-27,D_PTPIPEASS,平台管道映射,FALSE,
+28,D_PTPIPEASS,平台管道映射,FALSE,
+29,D_MWAYNODE,平台对接预设路径,FALSE,
+

+ 1 - 1
系统设计/数据定义/返 回 码/business(业务系统).csv

@@ -119,4 +119,4 @@
 4000001,EMB00001,计算未完成!,
 4000002,EMB00002,计算失败!,
 4000003,EMB00003,人员位置数据格式错误,请使用如下格式 01,pipes2,0.1;02,pipes2,0.1,
-
+4000004,EMB00004,根据平台路径生成本地路径失败!