Przeglądaj źródła

边界条件保存

huangxingxing 9 miesięcy temu
rodzic
commit
017927314f

+ 32 - 2
modelsrc/com/miniframe/model/system/DBoundary.java

@@ -11,6 +11,9 @@ public class DBoundary extends MiniserviceBaseModel implements Serializable {
 
     private Integer nid;
 
+    /**
+     * 节点名称
+     */
     private String nname;
 
     /**
@@ -48,6 +51,11 @@ public class DBoundary extends MiniserviceBaseModel implements Serializable {
      */
     private String polcon2;
 
+    /**
+     * 节点编码
+     */
+    private String ncode;
+
     private static final long serialVersionUID = 1L;
 
     /**
@@ -79,14 +87,18 @@ public class DBoundary extends MiniserviceBaseModel implements Serializable {
     }
 
     /**
-     * @return nname
+     * 获取节点名称
+     *
+     * @return nname - 节点名称
      */
     public String getNname() {
         return nname;
     }
 
     /**
-     * @param nname
+     * 设置节点名称
+     *
+     * @param nname 节点名称
      */
     public void setNname(String nname) {
         this.nname = nname == null ? null : nname.trim();
@@ -217,4 +229,22 @@ public class DBoundary extends MiniserviceBaseModel implements Serializable {
     public void setPolcon2(String polcon2) {
         this.polcon2 = polcon2 == null ? null : polcon2.trim();
     }
+
+    /**
+     * 获取节点编码
+     *
+     * @return ncode - 节点编码
+     */
+    public String getNcode() {
+        return ncode;
+    }
+
+    /**
+     * 设置节点编码
+     *
+     * @param ncode 节点编码
+     */
+    public void setNcode(String ncode) {
+        this.ncode = ncode == null ? null : ncode.trim();
+    }
 }

+ 70 - 0
modelsrc/com/miniframe/model/system/DBoundarySQLBuilder.java

@@ -773,6 +773,76 @@ public class DBoundarySQLBuilder {
             addCriterion("polcon2 not between", value1, value2, "polcon2");
             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 static class Criteria extends GeneratedCriteria {

+ 1 - 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 Mon Dec 09 09:20:51 CST 2024.
+    This file was generated on Mon Dec 09 09:32:55 CST 2024.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />

+ 11 - 5
src/main/java/com/miniframe/bisiness/system/D10008Service.java

@@ -29,7 +29,8 @@ public class D10008Service extends D10008BaseModel implements ExecProcessFlow {
 //		String nname =this.getA_d10008().getNname();
 		DNodeMapper nodeMapper = UtilTools.getBean(DNodeMapper.class);
 		DNode node =nodeMapper.selectByPrimaryKey(nid);
-		String nname=node.getCode();
+		String nname=node.getName();
+		String ncode=node.getCode();
 		String type =this.getA_d10008().getType();
 		String flow=this.getA_d10008().getFlow();
 		String pressure=this.getA_d10008().getPressure();
@@ -39,22 +40,25 @@ public class D10008Service extends D10008BaseModel implements ExecProcessFlow {
 		DBoundaryMapper bDao = UtilTools.getBean(DBoundaryMapper.class);
 		if(bid==null||bid<=0){//添加
 			pdAidNidType(nid, aid, type, bDao);
-			saveDBoundary(nid, aid, nname, type, flow, pressure, temperature, polcon1, polcon2, bDao);
+			saveDBoundary(nid, aid, nname,ncode, type, flow, pressure, temperature, polcon1, polcon2, bDao);
 		}else{//修改
 			DBoundary b =bDao.selectByPrimaryKey(bid);
 			if(b==null){
 				throw  new BusinessException("EB3100006");
 			}
 			pdAidNidTypeByBid(nid, aid, type, bDao,bid);
-			updateDBoundary(nid, aid, nname, type, flow, pressure, temperature, polcon1, polcon2, bDao, b);
+			updateDBoundary(nid, aid, nname,ncode,type, flow, pressure, temperature, polcon1, polcon2, bDao, b);
 		}
 
 	}
 
-	private void updateDBoundary(Integer nid, Integer aid, String nname, String type, String flow, String pressure, String temperature, String polcon1, String polcon2, DBoundaryMapper bDao, DBoundary b) {
+	private void updateDBoundary(Integer nid, Integer aid, String nname,String ncode,
+								 String type, String flow, String pressure, String temperature, String polcon1, String polcon2,
+								 DBoundaryMapper bDao, DBoundary b) {
 		b.setAid(aid);
 		b.setNid(nid);
 		b.setNname(nname);
+		b.setNcode(ncode);
 		b.setType(type);
 		b.setFlow(backNumString(flow));
 		b.setPressure(backNumString(pressure));
@@ -64,11 +68,13 @@ public class D10008Service extends D10008BaseModel implements ExecProcessFlow {
 		bDao.updateByPrimaryKey(b);
 	}
 
-	private void saveDBoundary(Integer nid, Integer aid, String nname, String type, String flow, String pressure, String temperature, String polcon1, String polcon2, DBoundaryMapper bDao) {
+	private void saveDBoundary(Integer nid, Integer aid, String nname,String ncode,
+							   String type, String flow, String pressure, String temperature, String polcon1, String polcon2, DBoundaryMapper bDao) {
 		DBoundary b =new DBoundary();
 		b.setAid(aid);
 		b.setNid(nid);
 		b.setNname(nname);
+		b.setNcode(ncode);
 		b.setType(type);
 		b.setFlow(backNumString(flow));
 		b.setPressure(backNumString(pressure));

+ 1 - 1
src/main/resources/templates/fireInit.ftl

@@ -3,7 +3,7 @@
 #end
 #boundaries Inlet
 <#list boundaries as b>
-${b.nname},${b.type},${b.flow},${b.pressure},${b.temperature} ,${b.polcon1} ,${b.polcon2}
+${b.ncode},${b.type},${b.flow},${b.pressure},${b.temperature} ,${b.polcon1} ,${b.polcon2}
 </#list>
 #end
 #Fires

+ 1 - 1
src/main/resources/templates/waterInit.ftl

@@ -3,7 +3,7 @@
 #end
 #boundaries
 <#list boundaries as b>
-${b.nname},outlet
+${b.ncode},outlet
 </#list>
 #end
 #waters