Răsfoiți Sursa

项目组件属性值处理

huangxingxing 3 luni în urmă
părinte
comite
a81cda3ee9
32 a modificat fișierele cu 445 adăugiri și 116 ștergeri
  1. 5 0
      dbscript/init/generate/01-appcodeInit.sql
  2. 68 0
      definitionsrc/com/miniframe/generate/appcode/AttSimulationType.java
  3. 2 1
      definitionsrc/returncode/returncode-business.properties
  4. 2 1
      definitionsrc/returncode/returncode-business_zh_CN.properties
  5. 13 0
      generated/com/miniframe/generate/comm/es/A_ES0006.java
  6. 13 0
      generated/com/miniframe/generate/comm/es/D_ES0002.java
  7. 13 0
      generated/com/miniframe/generate/comm/es/D_ES0010_HEADERS_RECODE.java
  8. 3 0
      generated/validateform/a_es0006Form.xml
  9. 1 0
      generated/validator/resources_a_es0006Form_validator.properties
  10. 1 0
      generated/validator/resources_a_es0006Form_validator_zh_CN.properties
  11. 2 1
      generated/validator/resources_d_es0002Form_validator.properties
  12. 2 1
      generated/validator/resources_d_es0002Form_validator_zh_CN.properties
  13. 1 0
      generated/validator/resources_d_es0010_headers_recodeForm_validator.properties
  14. 1 0
      generated/validator/resources_d_es0010_headers_recodeForm_validator_zh_CN.properties
  15. 46 23
      modelsrc/com/miniframe/model/es/EsProComCon.java
  16. 130 60
      modelsrc/com/miniframe/model/es/EsProComConSQLBuilder.java
  17. 1 1
      modelsrc/com/miniframe/model/es/dbconfig/MapperConfig-es.xml
  18. 1 1
      modelsrc/com/miniframe/model/system/dbconfig/MapperConfig-system.xml
  19. 53 5
      src/main/java/com/miniframe/bisiness/es/ES0002Service.java
  20. 7 0
      src/main/java/com/miniframe/bisiness/es/ES0003Service.java
  21. 7 4
      src/main/java/com/miniframe/bisiness/es/ES0004Service.java
  22. 9 4
      src/main/java/com/miniframe/bisiness/es/ES0005Service.java
  23. 10 8
      src/main/java/com/miniframe/bisiness/es/ES0006Service.java
  24. 2 0
      src/main/java/com/miniframe/bisiness/es/ES0010Service.java
  25. 2 0
      src/main/java/com/miniframe/bisiness/es/ES0011Service.java
  26. 32 0
      src/main/java/com/miniframe/mappers/es/dao/EsMapper.java
  27. 8 0
      系统设计/数据定义/标准数据/attSimulationType(仿真类型).csv
  28. 5 2
      系统设计/数据定义/返 回 码/business(业务系统).csv
  29. 0 2
      系统设计/系统模块/ES(无锡发动机).csv
  30. 1 0
      系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0002_D(项目新增修改).csv
  31. 2 1
      系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0006_A(项目组件连线).csv
  32. 2 1
      系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0010_D(项目组件属性值数据查询).csv

+ 5 - 0
dbscript/init/generate/01-appcodeInit.sql

@@ -115,6 +115,11 @@ INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_D
 -- 重量单位
 INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attQualityType1','service','attQualityType', 'g', 'g','g',1);
 INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attQualityType2','service','attQualityType', 'kg', 'kg','kg',2);
+-- 仿真类型
+INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attSimulationType1','service','attSimulationType', 'IncompressibleSteadyState', 'Incompressible Steady State','不可压稳态',1);
+INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attSimulationType2','service','attSimulationType', 'IncompressibleTransient', 'Incompressible Transient','不可压瞬态',2);
+INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attSimulationType3','service','attSimulationType', 'CompressibleSteadyState', 'Compressible Steady State','可压缩稳态',3);
+INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attSimulationType4','service','attSimulationType', 'CompressibleTransient', 'Compressible Transient','可压缩瞬态',4);
 -- 热膨胀常数单位
 INSERT INTO SYS_APPCODE(CODE_ID, SYSID, CODE_TYPE, CODE_NAME, CODE_VALUE, CODE_DESC, CODE_ORDER)VALUES ('attTECoefficientType1','service','attTECoefficientType', 'TECoefficient', 'm²/K','m²/K',1);
 -- 温度单位

+ 68 - 0
definitionsrc/com/miniframe/generate/appcode/AttSimulationType.java

@@ -0,0 +1,68 @@
+package com.miniframe.generate.appcode;
+
+/**
+ * 仿真类型
+ */
+public enum AttSimulationType {
+
+	IncompressibleSteadyState("IncompressibleSteadyState", "Incompressible Steady State", "不可压稳态"),
+	IncompressibleTransient("IncompressibleTransient", "Incompressible Transient", "不可压瞬态"),
+	CompressibleSteadyState("CompressibleSteadyState", "Compressible Steady State", "可压缩稳态"),
+	CompressibleTransient("CompressibleTransient", "Compressible Transient", "可压缩瞬态");
+
+	// 成员变量
+	private String index; // value
+	private String name; // key
+	private String desc; // 描述
+	
+	/**
+	 * 构造方法
+	 * @param name
+	 * @param index
+	 * @param desc
+	 */
+	private AttSimulationType(String name, String index, String desc) {
+		this.name = name;
+		this.index = index;
+		this.desc = desc;
+	}
+
+	/**
+	 * 通过index获取对象
+	 * 
+	 * @param index
+	 * @return
+	 */
+	public static AttSimulationType getAttSimulationType(String index) {
+		for (AttSimulationType c : AttSimulationType.values()) {
+			if (c.getIndex().equals(index)) {
+				return c;
+			}
+		}
+		return null;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public String getIndex() {
+		return index;
+	}
+
+	public void setIndex(String index) {
+		this.index = index;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+	public void setDesc(String desc) {
+		this.desc = desc;
+	}
+}

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

@@ -56,8 +56,9 @@ EB2000005 = \u53EA\u80FD\u4F20\u8F93\u5355\u4E2A\u6587\u4EF6\uFF01
 EB2000006 = \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01
 EB2000007 = \u6587\u4EF6\u8BFB\u53D6\u5931\u8D25\uFF01
 EB2000008 = \u6587\u4EF6\u4E0D\u5B58\u5728\uFF01
-EB2000008 = \u6587\u4EF6\u79FB\u52A8\u62F7\u8D1D\u5931\u8D25\uFF01
+EB2000009 = \u6587\u4EF6\u79FB\u52A8\u62F7\u8D1D\u5931\u8D25\uFF01
 ES000001 = \u9879\u76EE\u7EC4\u4EF6\u5C5E\u6027\u4E0D\u5B58\u5728\uFF01
 ES000002 = \u7EC4\u4EF6\u5C5E\u6027\u6570\u636E\u4E0D\u5B58\u5728\uFF01
 ES000003 = \u8BE5\u7EC4\u4EF6\u5C5E\u6027\u6570\u636E\u7C7B\u578B\u4E0D\u662F\u6570\u5217\uFF01
 ES000004 = \u6570\u636E\u5B9A\u4E49\u9519\u8BEF\uFF01
+ES000005 = \u9879\u76EE\u4E0D\u5B58\u5728\uFF01

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

@@ -56,8 +56,9 @@ EB2000005 = \u53EA\u80FD\u4F20\u8F93\u5355\u4E2A\u6587\u4EF6\uFF01
 EB2000006 = \u6587\u4EF6\u4E0A\u4F20\u5931\u8D25\uFF01
 EB2000007 = \u6587\u4EF6\u8BFB\u53D6\u5931\u8D25\uFF01
 EB2000008 = \u6587\u4EF6\u4E0D\u5B58\u5728\uFF01
-EB2000008 = \u6587\u4EF6\u79FB\u52A8\u62F7\u8D1D\u5931\u8D25\uFF01
+EB2000009 = \u6587\u4EF6\u79FB\u52A8\u62F7\u8D1D\u5931\u8D25\uFF01
 ES000001 = \u9879\u76EE\u7EC4\u4EF6\u5C5E\u6027\u4E0D\u5B58\u5728\uFF01
 ES000002 = \u7EC4\u4EF6\u5C5E\u6027\u6570\u636E\u4E0D\u5B58\u5728\uFF01
 ES000003 = \u8BE5\u7EC4\u4EF6\u5C5E\u6027\u6570\u636E\u7C7B\u578B\u4E0D\u662F\u6570\u5217\uFF01
 ES000004 = \u6570\u636E\u5B9A\u4E49\u9519\u8BEF\uFF01
+ES000005 = \u9879\u76EE\u4E0D\u5B58\u5728\uFF01

+ 13 - 0
generated/com/miniframe/generate/comm/es/A_ES0006.java

@@ -61,4 +61,17 @@ public class A_ES0006 extends BaseMapModel implements Serializable {
 	public int getType() {
 		return this.type;
 	}
+	String pid;//项目Id
+	/**
+	 *项目Id
+	 */
+	public void setPid(String pid) {
+		this.pid=pid;
+	}
+	/**
+	 *项目Id
+	 */
+	public String getPid() {
+		return this.pid;
+	}
 }

+ 13 - 0
generated/com/miniframe/generate/comm/es/D_ES0002.java

@@ -9,4 +9,17 @@ import java.io.Serializable;
  */
 public class D_ES0002 extends BaseMapModel implements Serializable {
 	private static final long serialVersionUID = -1463838678425832212L;
+	String pid;//项目Id
+	/**
+	 *项目Id
+	 */
+	public void setPid(String pid) {
+		this.pid=pid;
+	}
+	/**
+	 *项目Id
+	 */
+	public String getPid() {
+		return this.pid;
+	}
 }

+ 13 - 0
generated/com/miniframe/generate/comm/es/D_ES0010_HEADERS_RECODE.java

@@ -100,4 +100,17 @@ public class D_ES0010_HEADERS_RECODE extends BaseMapModel implements Serializabl
 	public String getValueDef() {
 		return this.valueDef;
 	}
+	String unitType;//单位类型
+	/**
+	 *单位类型
+	 */
+	public void setUnitType(String unitType) {
+		this.unitType=unitType;
+	}
+	/**
+	 *单位类型
+	 */
+	public String getUnitType() {
+		return this.unitType;
+	}
 }

+ 3 - 0
generated/validateform/a_es0006Form.xml

@@ -13,6 +13,9 @@
 <field property="type" depends="required">
     <arg0 key="a_es0006.type"/>
 </field>
+<field property="pid" depends="required">
+    <arg0 key="a_es0006.pid"/>
+</field>
 </form>
 </formset>
 </form-validation>

+ 1 - 0
generated/validator/resources_a_es0006Form_validator.properties

@@ -2,4 +2,5 @@ a_es0006.npcId = N\u8282\u70B9\u9879\u76EE\u7EC4\u4EF6Id
 a_es0006.pcId1 = \u9879\u76EE\u7EC4\u4EF6Id
 a_es0006.pcId2 = \u9879\u76EE\u7EC4\u4EF6Id
 a_es0006.type = \u8FDE\u7EBF\u7C7B\u578B
+a_es0006.pid = \u9879\u76EEId
 a_es0006Form = true

+ 1 - 0
generated/validator/resources_a_es0006Form_validator_zh_CN.properties

@@ -2,4 +2,5 @@ a_es0006.npcId = N\u8282\u70B9\u9879\u76EE\u7EC4\u4EF6Id
 a_es0006.pcId1 = \u9879\u76EE\u7EC4\u4EF6Id
 a_es0006.pcId2 = \u9879\u76EE\u7EC4\u4EF6Id
 a_es0006.type = \u8FDE\u7EBF\u7C7B\u578B
+a_es0006.pid = \u9879\u76EEId
 a_es0006Form = true

+ 2 - 1
generated/validator/resources_d_es0002Form_validator.properties

@@ -1 +1,2 @@
-d_es0002Form = false
+d_es0002.pid = \u9879\u76EEId
+d_es0002Form = true

+ 2 - 1
generated/validator/resources_d_es0002Form_validator_zh_CN.properties

@@ -1 +1,2 @@
-d_es0002Form = false
+d_es0002.pid = \u9879\u76EEId
+d_es0002Form = true

+ 1 - 0
generated/validator/resources_d_es0010_headers_recodeForm_validator.properties

@@ -5,4 +5,5 @@ d_es0010_headers_recode.code = \u6570\u636E\u5C5E\u6027Code
 d_es0010_headers_recode.dataType = \u503C\u6570\u636E\u7C7B\u578B
 d_es0010_headers_recode.valueType = \u503C\u7C7B\u578B
 d_es0010_headers_recode.valueDef = \u9ED8\u8BA4\u503C
+d_es0010_headers_recode.unitType = \u5355\u4F4D\u7C7B\u578B
 d_es0010_headers_recodeForm = true

+ 1 - 0
generated/validator/resources_d_es0010_headers_recodeForm_validator_zh_CN.properties

@@ -5,4 +5,5 @@ d_es0010_headers_recode.code = \u6570\u636E\u5C5E\u6027Code
 d_es0010_headers_recode.dataType = \u503C\u6570\u636E\u7C7B\u578B
 d_es0010_headers_recode.valueType = \u503C\u7C7B\u578B
 d_es0010_headers_recode.valueDef = \u9ED8\u8BA4\u503C
+d_es0010_headers_recode.unitType = \u5355\u4F4D\u7C7B\u578B
 d_es0010_headers_recodeForm = true

+ 46 - 23
modelsrc/com/miniframe/model/es/EsProComCon.java

@@ -14,6 +14,16 @@ public class EsProComCon extends MiniserviceBaseModel implements Serializable {
     @Column(name = "pcc_id")
     private String pccId;
 
+    /**
+     * 工程ID
+     */
+    private String pid;
+
+    /**
+     * 连线类型
+     */
+    private Short type;
+
     /**
      * 项目NODE组件ID
      */
@@ -50,11 +60,6 @@ public class EsProComCon extends MiniserviceBaseModel implements Serializable {
     @Column(name = "update_time")
     private Date updateTime;
 
-    /**
-     * 连线类型
-     */
-    private Short type;
-
     private static final long serialVersionUID = 1L;
 
     /**
@@ -75,6 +80,42 @@ public class EsProComCon extends MiniserviceBaseModel implements Serializable {
         this.pccId = pccId == null ? null : pccId.trim();
     }
 
+    /**
+     * 获取工程ID
+     *
+     * @return pid - 工程ID
+     */
+    public String getPid() {
+        return pid;
+    }
+
+    /**
+     * 设置工程ID
+     *
+     * @param pid 工程ID
+     */
+    public void setPid(String pid) {
+        this.pid = pid == null ? null : pid.trim();
+    }
+
+    /**
+     * 获取连线类型
+     *
+     * @return type - 连线类型
+     */
+    public Short getType() {
+        return type;
+    }
+
+    /**
+     * 设置连线类型
+     *
+     * @param type 连线类型
+     */
+    public void setType(Short type) {
+        this.type = type;
+    }
+
     /**
      * 获取项目NODE组件ID
      *
@@ -190,22 +231,4 @@ public class EsProComCon extends MiniserviceBaseModel implements Serializable {
     public void setUpdateTime(Date updateTime) {
         this.updateTime = updateTime;
     }
-
-    /**
-     * 获取连线类型
-     *
-     * @return type - 连线类型
-     */
-    public Short getType() {
-        return type;
-    }
-
-    /**
-     * 设置连线类型
-     *
-     * @param type 连线类型
-     */
-    public void setType(Short type) {
-        this.type = type;
-    }
 }

+ 130 - 60
modelsrc/com/miniframe/model/es/EsProComConSQLBuilder.java

@@ -175,6 +175,136 @@ public class EsProComConSQLBuilder {
             return (Criteria) this;
         }
 
+        public Criteria andPidIsNull() {
+            addCriterion("pid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidIsNotNull() {
+            addCriterion("pid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidEqualTo(String value) {
+            addCriterion("pid =", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotEqualTo(String value) {
+            addCriterion("pid <>", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidGreaterThan(String value) {
+            addCriterion("pid >", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidGreaterThanOrEqualTo(String value) {
+            addCriterion("pid >=", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidLessThan(String value) {
+            addCriterion("pid <", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidLessThanOrEqualTo(String value) {
+            addCriterion("pid <=", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidLike(String value) {
+            addCriterion("pid like", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotLike(String value) {
+            addCriterion("pid not like", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidIn(List<String> values) {
+            addCriterion("pid in", values, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotIn(List<String> values) {
+            addCriterion("pid not in", values, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidBetween(String value1, String value2) {
+            addCriterion("pid between", value1, value2, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotBetween(String value1, String value2) {
+            addCriterion("pid not between", value1, value2, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Short value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Short value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Short value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Short value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Short value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Short value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Short> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Short> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Short value1, Short value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Short value1, Short value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
         public Criteria andNpcIdIsNull() {
             addCriterion("npc_id is null");
             return (Criteria) this;
@@ -574,66 +704,6 @@ public class EsProComConSQLBuilder {
             addCriterion("update_time not between", value1, value2, "updateTime");
             return (Criteria) this;
         }
-
-        public Criteria andTypeIsNull() {
-            addCriterion("type is null");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeIsNotNull() {
-            addCriterion("type is not null");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeEqualTo(Short value) {
-            addCriterion("type =", value, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeNotEqualTo(Short value) {
-            addCriterion("type <>", value, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeGreaterThan(Short value) {
-            addCriterion("type >", value, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeGreaterThanOrEqualTo(Short value) {
-            addCriterion("type >=", value, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeLessThan(Short value) {
-            addCriterion("type <", value, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeLessThanOrEqualTo(Short value) {
-            addCriterion("type <=", value, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeIn(List<Short> values) {
-            addCriterion("type in", values, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeNotIn(List<Short> values) {
-            addCriterion("type not in", values, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeBetween(Short value1, Short value2) {
-            addCriterion("type between", value1, value2, "type");
-            return (Criteria) this;
-        }
-
-        public Criteria andTypeNotBetween(Short value1, Short value2) {
-            addCriterion("type not between", value1, value2, "type");
-            return (Criteria) this;
-        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 1 - 1
modelsrc/com/miniframe/model/es/dbconfig/MapperConfig-es.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 Fri May 30 10:06:19 CST 2025.
+    This file was generated on Fri May 30 15:01:21 CST 2025.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/es/xml/EsProMapper.xml" />

+ 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 Fri May 30 10:06:20 CST 2025.
+    This file was generated on Fri May 30 15:01:22 CST 2025.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />

+ 53 - 5
src/main/java/com/miniframe/bisiness/es/ES0002Service.java

@@ -1,12 +1,14 @@
 package com.miniframe.bisiness.es;
 
 import java.util.Date;
+import java.util.List;
 import java.util.Map;
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.es.model.ES0002BaseModel;
-import com.miniframe.model.es.EsPro;
-import com.miniframe.model.es.dao.EsProMapper;
+import com.miniframe.mappers.es.dao.EsMapper;
+import com.miniframe.model.es.*;
+import com.miniframe.model.es.dao.*;
 import com.miniframe.model.system.SysUser;
 import com.miniframe.model.system.dao.SysUserMapper;
 import com.miniframe.tools.XIFileUtils;
@@ -31,9 +33,7 @@ public class ES0002Service extends ES0002BaseModel implements ExecProcessFlow {
 		String keywords =this.getA_es0002().getKeywords();
 		SysUserMapper udao = UtilTools.getBean(SysUserMapper.class);
 		SysUser user = udao.selectByPrimaryKey(uid);
-
 		EsProMapper pdao = UtilTools.getBean(EsProMapper.class);
-
 		EsPro p;
 		if(StringUtil.isNullOrEmpty(pid)){//新增
 			p =new EsPro();
@@ -53,6 +53,13 @@ public class ES0002Service extends ES0002BaseModel implements ExecProcessFlow {
 			XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/"+p.getPid()+"/Calculate");
 			XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/"+p.getPid()+"/Calculate/Geometry");//几何路径
 			XIFileUtils.mkdir(XIFileUtils.getRootPathStr()+"/"+p.getPid()+"/LinearModel");
+
+			//添加模拟数据组件
+			pid = p.getPid();
+			EsComMapper cdao = UtilTools.getBean(EsComMapper.class);
+			EsCom c = cdao.selectByPrimaryKey("-1");//模拟数据组件
+			EsProCom pc =savePc(pid, c, uid);
+			savePca(pid, uid, pc);
 		}else{
 			p = pdao.selectByPrimaryKey(pid);
 			if(p!=null){
@@ -66,8 +73,49 @@ public class ES0002Service extends ES0002BaseModel implements ExecProcessFlow {
 				pdao.updateByPrimaryKey(p);
 			}
 		}
+		this.getD_es0002().setPid(p.getPid());
 	}
-	
+	private void savePca(String pid, String uid, EsProCom pc) {
+		EsProComAttMapper pcadao = UtilTools.getBean(EsProComAttMapper.class);
+		EsAttMapper adao = UtilTools.getBean(EsAttMapper.class);
+		EsAttSQLBuilder asb =new EsAttSQLBuilder();
+		EsAttSQLBuilder.Criteria asc = asb.createCriteria();
+		asc.andComIdEqualTo(pc.getComId());
+		List<EsAtt> atts = adao.selectByExample(asb);
+		for (EsAtt a :atts) {
+			EsProComAtt pca = new EsProComAtt();
+			pca.setPcaId(UtilTools.getUUid());
+			pca.setPid(pid);
+			pca.setPcId(pc.getPcId());
+			pca.setComId(pc.getComId());
+			pca.setAttId(a.getAttId());
+			pca.setUid(uid);
+			Date now = new Date();
+			pca.setUpdateTime(now);
+			pca.setCreateTime(now);
+			pcadao.insert(pca);
+		}
+	}
+
+	private EsProCom savePc(String pid, EsCom c, String uid) {
+		Date now = new Date();
+		EsProCom pc =new EsProCom();
+		pc.setPcId(UtilTools.getUUid());
+		pc.setComId(c.getComId());
+		pc.setUid(uid);
+		pc.setCreateTime(now);
+		pc.setUpdateTime(now);
+		pc.setPid(pid);
+		EsMapper edao = UtilTools.getBean(EsMapper.class);
+		Integer maxser =edao.getProComSer(pid, c.getIdCode());
+		maxser=maxser==null?0:maxser;
+		pc.setSer(maxser+1);
+		pc.setIdCode(c.getIdCode());
+		EsProComMapper pcdao = UtilTools.getBean(EsProComMapper.class);
+		pcdao.insert(pc);
+		return pc;
+	}
+
 	/**
 	 * 无锡发动机,“项目新增修改”业务前处理
  	 */

+ 7 - 0
src/main/java/com/miniframe/bisiness/es/ES0003Service.java

@@ -5,6 +5,8 @@ import java.util.Map;
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.es.model.ES0003BaseModel;
+import com.miniframe.mappers.es.dao.EsMapper;
+import com.miniframe.model.es.dao.EsComMapper;
 import com.miniframe.model.es.dao.EsProMapper;
 import com.miniframe.tools.XIFileUtils;
 
@@ -20,6 +22,11 @@ public class ES0003Service extends ES0003BaseModel implements ExecProcessFlow {
  	 */
 	public void transExecute() throws Exception {
 		String pid = this.getA_es0003().getPid();
+		EsMapper esdao = UtilTools.getBean(EsMapper.class);
+		esdao.deleteEsProComAttData(pid);
+		esdao.deleteEsProComAtt(pid);
+		esdao.deleteEsProComCon(pid);
+		esdao.deletEsProCom(pid);
 		EsProMapper pdao = UtilTools.getBean(EsProMapper.class);
 		XIFileUtils.deleteFolder(Paths.get(XIFileUtils.getRootPathStr()+"/"+pid));
 		pdao.deleteByPrimaryKey(pid);

+ 7 - 4
src/main/java/com/miniframe/bisiness/es/ES0004Service.java

@@ -4,14 +4,12 @@ import java.util.Date;
 import java.util.List;
 import java.util.Map;
 import com.miniframe.core.ExecProcessFlow;
+import com.miniframe.core.exception.BusinessException;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.es.model.ES0004BaseModel;
 import com.miniframe.mappers.es.dao.EsMapper;
 import com.miniframe.model.es.*;
-import com.miniframe.model.es.dao.EsAttMapper;
-import com.miniframe.model.es.dao.EsComMapper;
-import com.miniframe.model.es.dao.EsProComAttMapper;
-import com.miniframe.model.es.dao.EsProComMapper;
+import com.miniframe.model.es.dao.*;
 import com.miniframe.tools.XIDateTimeUtils;
 import com.miniframe.tools.ali.Data;
 
@@ -30,6 +28,11 @@ public class ES0004Service extends ES0004BaseModel implements ExecProcessFlow {
 	public void transExecute() throws Exception {
 		String pid = this.getA_es0004().getPid();
 		String comId = this.getA_es0004().getComId();
+		EsProMapper  pdao = UtilTools.getBean(EsProMapper.class);
+		EsPro p = pdao.selectByPrimaryKey(pid);
+		if(p==null){
+			throw  new BusinessException("ES000005");
+		}
 		EsComMapper cdao = UtilTools.getBean(EsComMapper.class);
 		EsCom c = cdao.selectByPrimaryKey(comId);
 		String uid =this.getA_eshead().getUserId();

+ 9 - 4
src/main/java/com/miniframe/bisiness/es/ES0005Service.java

@@ -4,10 +4,8 @@ import java.util.Map;
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.es.model.ES0005BaseModel;
-import com.miniframe.model.es.EsProComAtt;
-import com.miniframe.model.es.EsProComAttSQLBuilder;
-import com.miniframe.model.es.EsProComCon;
-import com.miniframe.model.es.EsProComConSQLBuilder;
+import com.miniframe.model.es.*;
+import com.miniframe.model.es.dao.EsProComAttDataMapper;
 import com.miniframe.model.es.dao.EsProComAttMapper;
 import com.miniframe.model.es.dao.EsProComConMapper;
 import com.miniframe.model.es.dao.EsProComMapper;
@@ -25,6 +23,13 @@ public class ES0005Service extends ES0005BaseModel implements ExecProcessFlow {
 	public void transExecute() throws Exception {
 		String pcId = this.getA_es0005().getPcId();
 
+		//删除项目组件属性数值
+		EsProComAttDataMapper pcaddao = UtilTools.getBean(EsProComAttDataMapper.class);
+		EsProComAttDataSQLBuilder pcadsb = new EsProComAttDataSQLBuilder();
+		EsProComAttDataSQLBuilder.Criteria pcadsc = pcadsb.createCriteria();
+		pcadsc.andPcIdEqualTo(pcId);
+		pcaddao.deleteByExample(pcadsb);
+
 		//删除项目组件属性
 		EsProComAttMapper adao = UtilTools.getBean(EsProComAttMapper.class);
 		EsProComAttSQLBuilder asb = new EsProComAttSQLBuilder();

+ 10 - 8
src/main/java/com/miniframe/bisiness/es/ES0006Service.java

@@ -26,6 +26,7 @@ public class ES0006Service extends ES0006BaseModel implements ExecProcessFlow {
 	 * 无锡发动机,“项目组件连线”业务核心处理
  	 */
 	public void transExecute() throws Exception {
+		String pid =this.getA_es0006().getPid();
 		String npcId = this.getA_es0006().getNpcId();
 		String pcId1 = this.getA_es0006().getPcId1();
 		String pcId2 = this.getA_es0006().getPcId2();
@@ -35,23 +36,23 @@ public class ES0006Service extends ES0006BaseModel implements ExecProcessFlow {
 		EsProCom  proCom1 = findEsProCom(pcId1);
 		EsProCom  proCom2 = findEsProCom(pcId2);
 		if(nProcom==null){
-			throw  new BusinessException("");
+			throw  new BusinessException("ES000006");//节点不存在
 		}
-		if(nProcom.getComId()!="3"){
-			throw  new BusinessException("");
+		if(!nProcom.getComId().equals("3")){//节点不存在
+			throw  new BusinessException("ES000006");
 		}
 		if(proCom1==null){
-			throw  new BusinessException("");
+			throw  new BusinessException("ES000007");//组件不存在
 		}
-		String pccId1 = savePcc(npcId, uid, pcId1,type);
+		String pccId1 = savePcc(pid,npcId, uid, pcId1,type);
 		this.getD_es0006().setPccId1(pccId1);
 		if(proCom2!=null){
-			String pccId2 = savePcc(npcId, uid, pcId1,type);
+			String pccId2 = savePcc(pid,npcId, uid, pcId2,type);
 			this.getD_es0006().setPccId2(pccId2);
 		}
 	}
 
-	private String  savePcc(String npcId, String uid, String pcId,Integer type) {
+	private String  savePcc(String pid,String npcId, String uid, String pcId,Integer type) {
 		EsProComConMapper condao = UtilTools.getBean(EsProComConMapper.class);
 		EsProComConSQLBuilder consb = new EsProComConSQLBuilder();
 		EsProComConSQLBuilder.Criteria consc = consb.createCriteria();
@@ -68,10 +69,11 @@ public class ES0006Service extends ES0006BaseModel implements ExecProcessFlow {
 			comCon.setCreateTime(new Date());
 			comCon.setUpdateTime(new Date());
 			comCon.setType(Short.valueOf(type.toString()));
+			comCon.setPid(pid);
 			condao.insert(comCon);
 			return comCon.getPccId();
 		}else{
-			return  comCons.get(0).getPccId();
+			return comCons.get(0).getPccId();
 		}
 	}
 

+ 2 - 0
src/main/java/com/miniframe/bisiness/es/ES0010Service.java

@@ -60,6 +60,7 @@ public class ES0010Service extends ES0010BaseModel implements ExecProcessFlow {
 			hr.setDataType(data.getType());
 			hr.setValueDef(datt.getValueDef());
 			hr.setValueType(datt.getValueType());
+			hr.setUnitType(datt.getUnitType());
 			hrs.add(hr);
 		}
 		this.getD_es0010().setHeaders(hrs);
@@ -81,6 +82,7 @@ public class ES0010Service extends ES0010BaseModel implements ExecProcessFlow {
 			das.add(da);
 		}
 		this.getD_es0010().setDatas(das);
+		this.getD_es0010().setPcaId(pcaId);
 	}
 	
 	/**

+ 2 - 0
src/main/java/com/miniframe/bisiness/es/ES0011Service.java

@@ -57,6 +57,7 @@ public class ES0011Service extends ES0011BaseModel implements ExecProcessFlow {
 				d.setUid(this.getA_eshead().getUserId());
 				d.setCreateTime(new Date());
 				d.setUpdateTime(new Date());
+				d.setSer(datt.getSer());
 				pcaddao.insert(d);
 			}else{//修改
 				d =pcaddao.selectByPrimaryKey(pcadId);
@@ -72,6 +73,7 @@ public class ES0011Service extends ES0011BaseModel implements ExecProcessFlow {
 					d.setUnit(unit);
 					d.setUid(this.getA_eshead().getUserId());
 					d.setUpdateTime(new Date());
+					d.setSer(datt.getSer());
 					pcaddao.updateByPrimaryKey(d);
 				}
 			}

+ 32 - 0
src/main/java/com/miniframe/mappers/es/dao/EsMapper.java

@@ -4,11 +4,43 @@ import com.miniframe.mappers.es.model.ProComAttDto;
 import com.miniframe.model.es.EsDataAtt;
 import com.miniframe.model.system.SysUser;
 import com.miniframe.system.MiniserviceBaseDao;
+import org.apache.ibatis.annotations.Delete;
 import org.apache.ibatis.annotations.Select;
 
 import java.util.List;
 
 public interface EsMapper extends MiniserviceBaseDao {
+    /**
+     * 删除 连线
+     * @param pid
+     * @return
+     */
+    @Delete("delete  from es_pro_com_con where pid =#{pid}")
+    void deleteEsProComCon(String pid);
+    /**
+     * 删除 组件属性值
+     * @param pid
+     * @return
+     */
+    @Delete("delete  from es_pro_com_att_data where pid =#{pid}")
+    Integer deleteEsProComAttData(String pid);
+    /**
+     * 删除 组件属性
+     * @param pid
+     * @return
+     */
+    @Delete("delete  from es_pro_com_att where pid =#{pid}")
+    Integer deleteEsProComAtt(String pid);
+
+    /**
+     * 删除 组件
+     * @param pid
+     * @return
+     */
+    @Delete("delete  from es_pro_com where pid =#{pid}")
+    Integer deletEsProCom(String pid);
+
+
     /**
      * 项目组件 获取最大编号
      * @param pid

+ 8 - 0
系统设计/数据定义/标准数据/attSimulationType(仿真类型).csv

@@ -0,0 +1,8 @@
+序号,代码编号,代码值,代码名称
+"1","IncompressibleSteadyState","Incompressible Steady State","不可压稳态"
+"2","IncompressibleTransient","Incompressible Transient","不可压瞬态"
+"3","CompressibleSteadyState","Compressible Steady State","可压缩稳态"
+"4","CompressibleTransient","Compressible Transient","可压缩瞬态"
+
+
+

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

@@ -60,9 +60,12 @@
 2000006,EB2000006,文件上传失败!,
 2000007,EB2000007,文件读取失败!,
 2000008,EB2000008,文件不存在!,
-2000009,EB2000008,文件移动拷贝失败!,
+2000009,EB2000009,文件移动拷贝失败!,
 
 3000001,ES000001,项目组件属性不存在!,
 3000002,ES000002,组件属性数据不存在!,
 3000003,ES000003,该组件属性数据类型不是数列!,
-3000004,ES000004,数据定义错误!,
+3000004,ES000004,数据定义错误!,
+3000005,ES000005,项目不存在!,
+3000006,ES000006,项目节点不存在!,
+3000007,ES000007,项目组件不存在!,

+ 0 - 2
系统设计/系统模块/ES(无锡发动机).csv

@@ -2,7 +2,6 @@
 100001,ES0001,项目查询,service,
 100002,ES0002,项目新增修改,service,
 100003,ES0003,项目删除,service,
-
 100004,ES0004,项目添加组件,service,
 100005,ES0005,项目删除组件,service,
 100006,ES0006,项目组件连线,service,
@@ -11,5 +10,4 @@
 100008,ES0009,项目组件属性查询,service,
 100010,ES0010,项目组件属性值数据查询,service,
 100011,ES0011,项目组件属性值数据添加修改,service,
-
 110001,ES1001,组件查询,service,

+ 1 - 0
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0002_D(项目新增修改).csv

@@ -1 +1,2 @@
 "序号","英文名称","中文名称","数据类型","默认值","格式化","非空/引用","最小(长度/值)","最大(长度/值)","验证规则","标准数据ID","XML样式","TAG标签","映射/子标签","CDATA"
+1,pid,项目Id,string,,,,,,,,,,,

+ 2 - 1
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0006_A(项目组件连线).csv

@@ -2,4 +2,5 @@
 1,npcId,N节点项目组件Id,string,,,是,,,,,,,,
 2,pcId1,项目组件Id,string,,,是,,,,,,,,
 3,pcId2,项目组件Id,string,,,,,,,,,,,
-4,type,连线类型,int,,,是,,,,,,,,
+4,type,连线类型,int,,,是,,,,,,,,
+5,pid,项目Id,string,,,是,,,,,,,,

+ 2 - 1
系统设计/通信设计/通讯报文/es(无锡发动机)/报文体/ES0010_D(项目组件属性值数据查询).csv

@@ -8,9 +8,10 @@
 2.5,dataType,值数据类型,int,,,,,,,,,,,
 2.6,valueType,值类型,int,,,,,,,,,,,
 2.7,valueDef,默认值,string,,,,,,,,,,,
+2.8,unitType,单位类型,string,,,,,,,,,,,
 3,datas,数据,list,,,,0,,,,,,,
 3.1,pcadgId,行号,int,,,,,,,,,,,
 3.2,pcadId,项目组件属性数据ID,string,,,,,,,,,,,
 3.3,value,数值,string,,,,,,,,,,,
 3.4,unit,单位,string,,,,,,,,,,,
-3.5,cdvId,数据属性id,string,,,,,,,,,,,
+3.5,cdvId,数据属性id,string,,,,,,,,,,,