Jelajahi Sumber

FEM bdf 文件上传

huangxingxing 2 tahun lalu
induk
melakukan
e86ef06e73
24 mengubah file dengan 1555 tambahan dan 4 penghapusan
  1. 1 0
      dbscript/init/generate/03-functionInit.sql
  2. 112 0
      generated/com/miniframe/generate/business/system/model/FEM001BaseModel.java
  3. 99 0
      generated/com/miniframe/generate/comm/httpclientapater/FEM001Client.java
  4. 38 0
      generated/com/miniframe/generate/comm/system/A_FEM001.java
  5. 12 0
      generated/com/miniframe/generate/comm/system/D_FEM001.java
  6. 15 0
      generated/validateform/a_fem001Form.xml
  7. 3 0
      generated/validator/resources_a_fem001Form_validator.properties
  8. 3 0
      generated/validator/resources_a_fem001Form_validator_zh_CN.properties
  9. 1 0
      generated/validator/resources_d_fem001Form_validator.properties
  10. 1 0
      generated/validator/resources_d_fem001Form_validator_zh_CN.properties
  11. 24 0
      modelsrc/com/miniframe/model/system/AdiModeling.java
  12. 70 0
      modelsrc/com/miniframe/model/system/AdiModelingSQLBuilder.java
  13. 1 1
      modelsrc/com/miniframe/model/system/dbconfig/MapperConfig-system.xml
  14. 179 0
      src/main/java/com/miniframe/aftercure/SliceMsg.java
  15. 31 1
      src/main/java/com/miniframe/bisiness/system/AFT001Service.java
  16. 5 0
      src/main/java/com/miniframe/bisiness/system/D00001Service.java
  17. 3 0
      src/main/java/com/miniframe/bisiness/system/D00002Service.java
  18. 109 0
      src/main/java/com/miniframe/bisiness/system/FEM001Service.java
  19. 786 0
      src/main/java/com/miniframe/solverconfig/fem/VTK.java
  20. 11 1
      src/main/java/com/miniframe/tools/CaeFileUtils.java
  21. 44 0
      src/test/java/com/miniframe/comm/httpclientapater/FEM001Test.java
  22. 3 1
      系统设计/系统模块/SYSTEM(基础系统).csv
  23. 3 0
      系统设计/通信设计/通讯报文/system(系统服务)/报文体/FEM001_A(bdf文件绑定).csv
  24. 1 0
      系统设计/通信设计/通讯报文/system(系统服务)/报文体/FEM001_D(bdf文件绑定).csv

+ 1 - 0
dbscript/init/generate/03-functionInit.sql

@@ -35,3 +35,4 @@ INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('D0
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('D00002', '基础系统','HCFDMapbc绑定',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('AFT001', '基础系统','后处理消息发送',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('AFT002', '基础系统','获取步数',true);
+INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('FEM001', '基础系统','bdf文件绑定',true);

+ 112 - 0
generated/com/miniframe/generate/business/system/model/FEM001BaseModel.java

@@ -0,0 +1,112 @@
+package com.miniframe.generate.business.system.model;
+
+import java.util.Map;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import com.miniframe.core.BaseMapModel;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.core.ext.HttpMapFormater;
+import java.time.ZonedDateTime;
+import java.time.format.DateTimeFormatter;
+import com.miniframe.generate.global.AppGlobalVariableSysconfig;
+
+import com.miniframe.generate.comm.system.A_SYSTEMHEAD;
+import com.miniframe.generate.comm.system.D_SYSTEMHEAD;
+import com.miniframe.generate.comm.system.A_FEM001;
+import com.miniframe.generate.comm.system.D_FEM001;
+
+/**
+ * 系统服务,“bdf文件绑定”模型类(不要维护,重新生成将覆盖)。
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class FEM001BaseModel extends BaseMapModel {
+
+	private static final long serialVersionUID = -1326184831746814093L;
+
+	A_SYSTEMHEAD a_systemhead;//上行头
+	D_SYSTEMHEAD d_systemhead;//下行头
+	A_FEM001 a_fem001;//上行体
+	D_FEM001 d_fem001;//下行体
+
+	public FEM001BaseModel(){
+		a_systemhead=new A_SYSTEMHEAD();
+		d_systemhead=new D_SYSTEMHEAD();
+		a_fem001=new A_FEM001();
+		d_fem001=new D_FEM001();
+	}
+
+	public void validater() throws Exception {
+		this.a_systemhead.validater();
+		this.a_fem001.validater();
+	}
+
+	public void setTransMap(Map map) throws Exception {
+		Map headMap = HttpMapFormater.format(map, A_SYSTEMHEAD.class);
+		this.a_systemhead = UtilTools.map2Obj(headMap, A_SYSTEMHEAD.class);
+		Map bodyMap = HttpMapFormater.format(map, A_FEM001.class);
+		this.a_fem001 = UtilTools.map2Obj(bodyMap, A_FEM001.class);
+	}
+
+	public Map getTransMap() throws Exception {
+		Map reMap = new LinkedHashMap();
+
+		if(UtilTools.isNullOrBlank((this.d_systemhead).getTransCode())){
+			(this.d_systemhead).setTransCode((this.a_systemhead).getTransCode());
+		}
+		if(UtilTools.isNullOrBlank((this.d_systemhead).getChannelNo())){
+			(this.d_systemhead).setChannelNo((this.a_systemhead).getChannelNo());
+		}
+		if(UtilTools.isNullOrBlank((this.d_systemhead).getUserId())){
+			(this.d_systemhead).setUserId((this.a_systemhead).getUserId());
+		}
+        if(UtilTools.isNullOrBlank((this.d_systemhead).getTransTime())){
+            (this.d_systemhead).setTransTime(DateTimeFormatter.ofPattern(AppGlobalVariableSysconfig.DATETIMEFORMAT).format(ZonedDateTime.now()));
+        }
+
+		reMap.putAll(UtilTools.obj2Map(this.d_systemhead));
+		reMap.putAll(UtilTools.obj2Map(this.d_fem001));
+
+		return reMap;
+	}
+
+	public A_SYSTEMHEAD getA_systemhead() {
+		return this.a_systemhead;
+	}
+
+	public void setA_systemhead(A_SYSTEMHEAD a_systemhead) {
+		this.a_systemhead=a_systemhead;
+	}
+
+	public D_SYSTEMHEAD getD_systemhead() {
+		return d_systemhead;
+	}
+
+	public void setD_systemhead(D_SYSTEMHEAD d_systemhead) {
+		this.d_systemhead=d_systemhead;
+	}
+
+	public A_FEM001 getA_fem001() {
+		return a_fem001;
+	}
+
+	public void setA_fem001(A_FEM001 a_fem001) {
+		this.a_fem001=a_fem001;
+	}
+
+	public D_FEM001 getD_fem001() {
+		return this.d_fem001;
+	}
+
+	public void setD_fem001(D_FEM001 d_fem001) {
+		this.d_fem001=d_fem001;
+	}
+
+	@Override
+	public String toString() {
+		try {
+			return UtilTools.obj2Json(this,true);
+		} catch (IOException e) {
+			return "";
+		}
+	}
+}

+ 99 - 0
generated/com/miniframe/generate/comm/httpclientapater/FEM001Client.java

@@ -0,0 +1,99 @@
+package com.miniframe.generate.comm.httpclientapater;
+
+import com.miniframe.spring.httpclient.MFHttpRespInfo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import com.miniframe.core.Transmitter;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.comm.system.D_FEM001;
+import com.miniframe.generate.comm.system.D_SYSTEMHEAD;
+
+import com.miniframe.generate.business.system.model.FEM001BaseModel;
+
+public class FEM001Client {
+
+	private static final Logger logger = LoggerFactory.getLogger(FEM001Client.class);
+	private MFHttpRespInfo respInfo;
+
+	public MFHttpRespInfo getRespInfo(){
+		return respInfo;
+	}
+
+	/**
+	 * 调用 [系统服务->bdf文件绑定((FEM001)]的通讯接口
+	 * @param model 接口模型
+	 * @param extMap 扩展输入
+	 * @param url 请求地址
+	 * @return model 接口模型
+	 * @throws Exception
+	 */
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public FEM001BaseModel execute(FEM001BaseModel model,final Map extMap,final String url) throws Exception {
+		this.executeToRespInfo(model,extMap,url);
+		return model;
+	}
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public FEM001BaseModel execute(FEM001BaseModel model,final Map extMap) throws Exception {
+		this.executeToRespInfo(model,extMap,null);
+		return model;
+	}
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public MFHttpRespInfo executeToRespInfo(FEM001BaseModel model,final Map extMap,final String url) throws Exception {
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(FEM001BaseModel) - start");
+		}
+
+		if(UtilTools.isNullOrBlank(model.getA_systemhead().getTransCode())){
+			model.getA_systemhead().setTransCode("FEM001");
+		}
+
+		Map inMap = new LinkedHashMap();
+		inMap.putAll(UtilTools.obj2Map(model.getA_systemhead()));
+		inMap.putAll(UtilTools.obj2Map(model.getA_fem001()));
+		if(extMap!=null && extMap.size()>0){
+			inMap.putAll(extMap);
+		}
+
+		Transmitter httpclientApater = (Transmitter) UtilTools.getBean("httpclientApater");
+		MFHttpRespInfo respInfo;
+		if(UtilTools.isNotNullAndBlank(url)){
+			respInfo = httpclientApater.doPostDataToRespInfo(inMap,url);
+		}else{
+			respInfo = httpclientApater.doPostDataToRespInfo(inMap);
+		}
+
+		if(respInfo!=null) {
+			Map outMap=respInfo.getParamMap();
+			D_SYSTEMHEAD d_systemhead =  UtilTools.map2Obj(outMap, D_SYSTEMHEAD.class);
+			D_FEM001 d_fem001 =  UtilTools.map2Obj(outMap, D_FEM001.class);
+			model.setD_systemhead(d_systemhead);
+			model.setD_fem001(d_fem001);
+
+
+		}
+
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(FEM001BaseModel) - end");
+		}
+
+        this.respInfo=respInfo;
+
+		return respInfo;
+	}
+
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public FEM001BaseModel execute(FEM001BaseModel model) throws Exception {
+		return this.execute(model,null,null);
+	}
+
+
+}

+ 38 - 0
generated/com/miniframe/generate/comm/system/A_FEM001.java

@@ -0,0 +1,38 @@
+/**
+ * 系统服务
+ */
+package com.miniframe.generate.comm.system;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * bdf文件绑定
+ */
+public class A_FEM001 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;
+	}
+	String gridFileId;//上传文件ID
+	/**
+	 *上传文件ID
+	 */
+	public void setGridFileId(String gridFileId) {
+		this.gridFileId=gridFileId;
+	}
+	/**
+	 *上传文件ID
+	 */
+	public String getGridFileId() {
+		return this.gridFileId;
+	}
+}

+ 12 - 0
generated/com/miniframe/generate/comm/system/D_FEM001.java

@@ -0,0 +1,12 @@
+/**
+ * 系统服务
+ */
+package com.miniframe.generate.comm.system;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * bdf文件绑定
+ */
+public class D_FEM001 extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+}

+ 15 - 0
generated/validateform/a_fem001Form.xml

@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE form-validation PUBLIC "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN" "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
+<!-- bdf文件绑定Form配置文件系统生成请勿修改,否则重新生成将覆盖 -->
+<form-validation>
+<formset>
+<form name="a_fem001Form">
+<field property="pid" depends="required">
+    <arg0 key="a_fem001.pid"/>
+</field>
+<field property="gridFileId" depends="required">
+    <arg0 key="a_fem001.gridFileId"/>
+</field>
+</form>
+</formset>
+</form-validation>

+ 3 - 0
generated/validator/resources_a_fem001Form_validator.properties

@@ -0,0 +1,3 @@
+a_fem001.pid = \u9879\u76EEID
+a_fem001.gridFileId = \u4E0A\u4F20\u6587\u4EF6ID
+a_fem001Form = true

+ 3 - 0
generated/validator/resources_a_fem001Form_validator_zh_CN.properties

@@ -0,0 +1,3 @@
+a_fem001.pid = \u9879\u76EEID
+a_fem001.gridFileId = \u4E0A\u4F20\u6587\u4EF6ID
+a_fem001Form = true

+ 1 - 0
generated/validator/resources_d_fem001Form_validator.properties

@@ -0,0 +1 @@
+d_fem001Form = false

+ 1 - 0
generated/validator/resources_d_fem001Form_validator_zh_CN.properties

@@ -0,0 +1 @@
+d_fem001Form = false

+ 24 - 0
modelsrc/com/miniframe/model/system/AdiModeling.java

@@ -52,6 +52,12 @@ public class AdiModeling extends MiniserviceBaseModel implements Serializable {
     @Column(name = "grid_file_type")
     private String gridFileType;
 
+    /**
+     * 存储fem vtk显示文件
+     */
+    @Column(name = "vtk_file")
+    private String vtkFile;
+
     private static final long serialVersionUID = 1L;
 
     /**
@@ -197,4 +203,22 @@ public class AdiModeling extends MiniserviceBaseModel implements Serializable {
     public void setGridFileType(String gridFileType) {
         this.gridFileType = gridFileType == null ? null : gridFileType.trim();
     }
+
+    /**
+     * 获取存储fem vtk显示文件
+     *
+     * @return vtk_file - 存储fem vtk显示文件
+     */
+    public String getVtkFile() {
+        return vtkFile;
+    }
+
+    /**
+     * 设置存储fem vtk显示文件
+     *
+     * @param vtkFile 存储fem vtk显示文件
+     */
+    public void setVtkFile(String vtkFile) {
+        this.vtkFile = vtkFile == null ? null : vtkFile.trim();
+    }
 }

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

@@ -663,6 +663,76 @@ public class AdiModelingSQLBuilder {
             addCriterion("grid_file_type not between", value1, value2, "gridFileType");
             return (Criteria) this;
         }
+
+        public Criteria andVtkFileIsNull() {
+            addCriterion("vtk_file is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileIsNotNull() {
+            addCriterion("vtk_file is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileEqualTo(String value) {
+            addCriterion("vtk_file =", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileNotEqualTo(String value) {
+            addCriterion("vtk_file <>", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileGreaterThan(String value) {
+            addCriterion("vtk_file >", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileGreaterThanOrEqualTo(String value) {
+            addCriterion("vtk_file >=", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileLessThan(String value) {
+            addCriterion("vtk_file <", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileLessThanOrEqualTo(String value) {
+            addCriterion("vtk_file <=", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileLike(String value) {
+            addCriterion("vtk_file like", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileNotLike(String value) {
+            addCriterion("vtk_file not like", value, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileIn(List<String> values) {
+            addCriterion("vtk_file in", values, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileNotIn(List<String> values) {
+            addCriterion("vtk_file not in", values, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileBetween(String value1, String value2) {
+            addCriterion("vtk_file between", value1, value2, "vtkFile");
+            return (Criteria) this;
+        }
+
+        public Criteria andVtkFileNotBetween(String value1, String value2) {
+            addCriterion("vtk_file not between", value1, value2, "vtkFile");
+            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 Tue Apr 11 13:40:39 CST 2023.
+    This file was generated on Mon May 08 11:23:35 CST 2023.
   -->
   <mappers>
     <mapper resource="com/miniframe/model/system/xml/SysAppcodeMapper.xml" />

+ 179 - 0
src/main/java/com/miniframe/aftercure/SliceMsg.java

@@ -0,0 +1,179 @@
+package com.miniframe.aftercure;
+
+import com.alibaba.nacos.shaded.com.google.gson.JsonArray;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.miniframe.tools.XiJsonUtil;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class SliceMsg<main> {
+
+    private int index;
+    private String type;//line contour
+    private String variableName; //标量
+    private int level;
+    private double normalx;
+    private double normaly;
+    private double normalz;
+    private double positionx;
+    private double positiony;
+    private double positionz;
+
+    private Boolean scalar_value_state;
+    private Boolean solid_state;
+    private Boolean sectional_plane_state;
+    private Boolean sectional_contour_state;
+
+    private String xrange ;//0,0
+    private String yrange ;//0,0
+    private String zrange ;//0,0
+    private String areaRange; //区域范围
+
+    public String getAreaRange() {
+        return areaRange;
+    }
+
+    public void setAreaRange(String areaRange) {
+        this.areaRange = areaRange;
+    }
+
+    public int getIndex() {
+        return index;
+    }
+
+    public void setIndex(int index) {
+        this.index = index;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getVariableName() {
+        return variableName;
+    }
+
+    public void setVariableName(String variableName) {
+        this.variableName = variableName;
+    }
+
+    public int getLevel() {
+        return level;
+    }
+
+    public void setLevel(int level) {
+        this.level = level;
+    }
+
+    public double getNormalx() {
+        return normalx;
+    }
+
+    public void setNormalx(double normalx) {
+        this.normalx = normalx;
+    }
+
+    public double getNormaly() {
+        return normaly;
+    }
+
+    public void setNormaly(double normaly) {
+        this.normaly = normaly;
+    }
+
+    public double getNormalz() {
+        return normalz;
+    }
+
+    public void setNormalz(double normalz) {
+        this.normalz = normalz;
+    }
+
+    public double getPositionx() {
+        return positionx;
+    }
+
+    public void setPositionx(double positionx) {
+        this.positionx = positionx;
+    }
+
+    public double getPositiony() {
+        return positiony;
+    }
+
+    public void setPositiony(double positiony) {
+        this.positiony = positiony;
+    }
+
+    public double getPositionz() {
+        return positionz;
+    }
+
+    public void setPositionz(double positionz) {
+        this.positionz = positionz;
+    }
+
+    public Boolean getScalar_value_state() {
+        return scalar_value_state;
+    }
+
+    public void setScalar_value_state(Boolean scalar_value_state) {
+        this.scalar_value_state = scalar_value_state;
+    }
+
+    public Boolean getSolid_state() {
+        return solid_state;
+    }
+
+    public void setSolid_state(Boolean solid_state) {
+        this.solid_state = solid_state;
+    }
+
+    public Boolean getSectional_plane_state() {
+        return sectional_plane_state;
+    }
+
+    public void setSectional_plane_state(Boolean sectional_plane_state) {
+        this.sectional_plane_state = sectional_plane_state;
+    }
+
+    public Boolean getSectional_contour_state() {
+        return sectional_contour_state;
+    }
+
+    public void setSectional_contour_state(Boolean sectional_contour_state) {
+        this.sectional_contour_state = sectional_contour_state;
+    }
+
+    public String getXrange() {
+        return xrange;
+    }
+
+    public void setXrange(String xrange) {
+        this.xrange = xrange;
+    }
+
+    public String getYrange() {
+        return yrange;
+    }
+
+    public void setYrange(String yrange) {
+        this.yrange = yrange;
+    }
+
+    public String getZrange() {
+        return zrange;
+    }
+
+    public void setZrange(String zrange) {
+        this.zrange = zrange;
+    }
+
+
+
+}

+ 31 - 1
src/main/java/com/miniframe/bisiness/system/AFT001Service.java

@@ -1,10 +1,13 @@
 package com.miniframe.bisiness.system;
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 
+import com.alibaba.nacos.shaded.com.google.gson.JsonArray;
 import com.alibaba.nacos.shaded.com.google.gson.JsonObject;
 import com.miniframe.aftercure.ActionMsg;
+import com.miniframe.aftercure.SliceMsg;
 import com.miniframe.constant.MFConstant;
 import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.exception.BusinessException;
@@ -169,12 +172,39 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
 			obj.put("transparency",transparency);
 			obj.put("showHideState","1".equals(showHideState)?true:false);
 			msg.setParamJson(obj.toString());
+		}else if(action.equals("SliceDisplayAdd")){
+			JSONObject obj  = new JSONObject();
+			obj.put("index","1");
+			msg.setParamJson(obj.toString());
+		}else if(action.equals("SliceDisplayUpdate")){
+
+
+		}else if(action.equals("SliceDisplayDel")){
+			JSONObject obj  = new JSONObject();
+			obj.put("index","1");
+			msg.setParamJson(obj.toString());
+		}else if(action.equals("SliceDisplayApple")){
+			List<SliceMsg> b =new ArrayList<>();
+			for (int i = 0; i <2 ; i++) {
+				b.add( inib(i));
+			}
+			String t= XiJsonUtil.objectToJson(b);
+			msg.setParamJson(t);
 		}
 		System.out.println(XiJsonUtil.objectToJson(msg));
 		MFMqUtils.get(CaeMQ.class).sendCaein(XiJsonUtil.objectToJson(msg));
 
 	}
-	
+	private static SliceMsg inib(int id) {
+		SliceMsg  b= new SliceMsg();
+		b.setIndex(id);
+		b.setLevel(2);
+		b.setNormalx(12.0);
+		b.setNormaly(2.0);
+		b.setNormalz(3.0);
+		b.setPositionx(0.23);
+		return b;
+	}
 	/**
 	 * 基础系统,“后处理消息发送”业务前处理
  	 */

+ 5 - 0
src/main/java/com/miniframe/bisiness/system/D00001Service.java

@@ -10,6 +10,7 @@ import com.miniframe.model.system.AdiModelingSQLBuilder;
 import com.miniframe.model.system.AdiProjectSQLBuilder;
 import com.miniframe.model.system.dao.AdiModelingMapper;
 import com.miniframe.model.system.dao.AdiSolverJobMapper;
+import com.miniframe.tools.CaeFileUtils;
 
 /**
  * 基础系统,“HCFDUgrid绑定”逻辑处理(重新生成不覆盖)。
@@ -41,6 +42,10 @@ public class D00001Service extends D00001BaseModel implements ExecProcessFlow {
 			modelingMapper.insert(modeling);
 		}else{
 			AdiModeling modeling =modelings.get(0);
+			if(!gridFileId.equals(modeling.getGridFile())) {
+				CaeFileUtils.deleFile(modeling.getGridFile());
+			}
+
 			modeling.setGridFile(gridFileId);
 			modeling.setGridFileType(gridFileType);
 			modelingMapper.updateByPrimaryKey(modeling);

+ 3 - 0
src/main/java/com/miniframe/bisiness/system/D00002Service.java

@@ -34,11 +34,14 @@ public class D00002Service extends D00002BaseModel implements ExecProcessFlow {
 		String configId=this.getA_d00002().getSolverConfigId();
 		AdiSolverConfigMapper configMapper = UtilTools.getBean(AdiSolverConfigMapper.class);
 		AdiSolverConfig config= configMapper.selectByPrimaryKey(configId);
+		CaeFileUtils.deleFile(config.getMapbcFile());
 		if(config==null){
 			throw new BusinessException("EB4000011");
 		}else{
 			SysFileMapper sysFileDAO = UtilTools.getBean(SysFileMapper.class);
 			SysFile mapbcFile =  sysFileDAO.selectByPrimaryKey(mapbcFileId);
+
+
 			String filePath = XIFileUtils.getRootPathStr()+ MFConstant.separator+mapbcFile.getFilepath();
 			ArrayList<String> mpbcStrs= CaeFileUtils.readFileByLines(filePath);
 			List<HcfdBoundary> hcfdBoundarys =CaeFileUtils.readMapbcBoundary(mpbcStrs);

+ 109 - 0
src/main/java/com/miniframe/bisiness/system/FEM001Service.java

@@ -0,0 +1,109 @@
+package com.miniframe.bisiness.system;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+
+import com.miniframe.constant.MFConstant;
+import com.miniframe.core.ExecProcessFlow;
+import com.miniframe.core.exception.BusinessException;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.business.system.model.FEM001BaseModel;
+import com.miniframe.model.system.AdiModeling;
+import com.miniframe.model.system.AdiModelingSQLBuilder;
+import com.miniframe.model.system.SysFile;
+import com.miniframe.model.system.dao.AdiModelingMapper;
+import com.miniframe.model.system.dao.SysFileMapper;
+import com.miniframe.solverconfig.fem.VTK;
+import com.miniframe.tools.CaeFileUtils;
+import com.miniframe.tools.XIFileUtils;
+
+/**
+ * 基础系统,“bdf文件绑定”逻辑处理(重新生成不覆盖)。
+ */
+public class FEM001Service extends FEM001BaseModel implements ExecProcessFlow {
+	
+	private static final long serialVersionUID = -7051358269847459502L;
+		
+	/**
+	 * 基础系统,“bdf文件绑定”业务核心处理
+ 	 */
+	public void transExecute() throws Exception {
+		String pid =this.getA_fem001().getPid();
+		String gridFileId =this.getA_fem001().getGridFileId();
+		String usrId =this.getA_systemhead().getUserId();
+		AdiModelingMapper modelingMapper = UtilTools.getBean(AdiModelingMapper.class);
+		AdiModelingSQLBuilder sb = new AdiModelingSQLBuilder();
+		AdiModelingSQLBuilder.Criteria sc =sb.createCriteria();
+		sc.andPidEqualTo(pid);
+		List<AdiModeling> modelings =modelingMapper.selectByExample(sb);
+		SysFileMapper sysFileDAO = UtilTools.getBean(SysFileMapper.class);
+		if(modelings.isEmpty()){
+			AdiModeling modeling =new AdiModeling();
+			modeling.setId(UtilTools.getUUid());
+			modeling.setPid(pid);
+			modeling.setGridFile(gridFileId);
+			modeling.setGridFileType("bdf");
+			modeling.setUid(usrId);
+
+			String vtkfileId = bdfToVtk(gridFileId, usrId, sysFileDAO);
+			modeling.setVtkFile(vtkfileId);
+			modelingMapper.insert(modeling);
+		}else{
+			AdiModeling modeling =modelings.get(0);
+			if(!gridFileId.equals(modeling.getGridFile())) {
+				CaeFileUtils.deleFile(modeling.getGridFile());
+			}
+			CaeFileUtils.deleFile(modeling.getVtkFile());
+
+			modeling.setGridFile(gridFileId);
+			modeling.setGridFileType("bdf");
+
+			String vtkfileId = bdfToVtk(gridFileId, usrId, sysFileDAO);
+			modeling.setVtkFile(vtkfileId);
+			modelingMapper.updateByPrimaryKey(modeling);
+
+
+		}
+	}
+
+	private String bdfToVtk(String gridFileId, String usrId, SysFileMapper sysFileDAO) throws IOException, BusinessException {
+		SysFile bdfFile = sysFileDAO.selectByPrimaryKey(gridFileId);
+		String bdfFilePath = XIFileUtils.getRootPathStr() + MFConstant.separator + bdfFile.getFilepath();
+		File bfile = new File(bdfFilePath);
+		String vtkfileId = UtilTools.getUUid();
+		String vtkfilePath = VTK.CreateVTKFile(bfile, vtkfileId);
+		CaeFileUtils.saveFile(vtkfileId, vtkfilePath, usrId, "vtk", "");
+		return vtkfileId;
+	}
+
+
+	/**
+	 * 基础系统,“bdf文件绑定”业务前处理
+ 	 */
+	public void preTransFlow() throws Exception {
+		this.validater();
+	}
+	
+	/**
+	 * 基础系统,“bdf文件绑定”业务后处理
+ 	 */
+	public void afterTransFlow() throws Exception {
+	
+	}
+	
+	/**
+	 * 基础系统,“bdf文件绑定”逻辑入口处理方法
+ 	 */
+ 	@SuppressWarnings("rawtypes")
+	@Override
+	public Map execute(Map vars) throws Exception {
+		this.setTransMap(vars);
+		preTransFlow();// 执行业务开始的规则检查和校验
+		transExecute();// 执行核心业务段
+		afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
+		return this.getTransMap();
+	}
+
+}

+ 786 - 0
src/main/java/com/miniframe/solverconfig/fem/VTK.java

@@ -0,0 +1,786 @@
+package com.miniframe.solverconfig.fem;
+
+import com.miniframe.constant.MFConstant;
+
+import java.io.*;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class VTK {
+
+
+    public static String CreateVTKFile(File dbfFile,String uuid) {
+        if(!dbfFile.exists()){
+            return "";
+        }
+        File vtkFile =new File(dbfFile.getParent()+ MFConstant.separator+uuid+".vtk");
+        InputStreamReader reader = null;
+        FileInputStream bdfInputSteam=null;
+        BufferedReader bfreader=null;
+        FileWriter writer = null;
+
+        if(vtkFile.exists()){
+            vtkFile.delete();
+        }
+        try {
+            vtkFile.createNewFile();
+            ArrayList<ArrayList<Integer>> cells = new ArrayList<>();
+            ArrayList<Integer> cellTypes = new ArrayList<>();
+            ArrayList<ArrayList<Float>> points = new ArrayList<>();
+
+            bdfInputSteam=new FileInputStream(dbfFile);
+            reader=new InputStreamReader(bdfInputSteam,"UTF-8");
+            bfreader=new BufferedReader(reader);
+            String patCQUAD = "^CQUAD.*";
+//            String patGRID = "^GRID.*";
+            String line;
+            Integer nele =0;
+            Integer neln =0;
+
+
+
+
+            while((line=bfreader.readLine())!=null) {//包含该行内容的字符串,不包含任何行终止符,如果已到达流末尾,则返回 null
+
+                /**
+                 * CROD     1       1       1       2
+                 */
+                 if(line.indexOf("CROD")>-1){
+                    ArrayList<Integer> tmp=patInts(line);
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cells.add(cellst);
+                    cellTypes.add(3);
+
+                    nele=nele+1;
+                    neln=neln+1+2;
+                    continue;
+                }
+                else if(line.indexOf("CBAR")>-1){
+                    ArrayList<Integer> tmp=patInts(line);
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cells.add(cellst);
+                    cellTypes.add(3);
+
+                    nele=nele+1;
+                    neln=neln+1+2;
+                    continue;
+                }
+                //单元数据
+                // CQUAD4   1       1       6       7       16      15
+                // 第1列表示单元类型代号;
+                // 第2列表示单元编号;
+                // 第3列表示单元对应的材料编号(转vtk不需要此列);
+                // 第4列表示单元第1个节点的编号;
+                // 第5列表示单元第2个节点的编号;
+                // 第6列表示单元第3个节点的编号;
+                // 第7列表示单元第4个节点的编号
+                else if(line.indexOf("CQUAD4")>-1){
+                    ArrayList<Integer> tmp=patInts(line);
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cellst.add(tmp.get(4)-1);
+                    cellst.add(tmp.get(5)-1);
+                    cells.add(cellst);
+                    cellTypes.add(9);
+                    nele=nele+1;
+                    neln=neln+1+4;
+                    continue;
+                }
+                // CQUAD4   1       1       6       7       16      15       16      15
+                // *        12      12
+                else if(line.indexOf("CQUAD8")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    String line2=bfreader.readLine();
+                    ArrayList<Integer> tmp2=patInts(line2);
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cellst.add(tmp.get(4)-1);
+                    cellst.add(tmp.get(5)-1);
+                    cellst.add(tmp.get(6)-1);
+                    cellst.add(tmp.get(7)-1);
+                    cellst.add(tmp2.get(0)-1);
+                    cellst.add(tmp2.get(1)-1);
+                    cells.add(cellst);
+                    cellTypes.add(23);
+                    nele=nele+1;
+                    neln=neln+1+8;
+                    continue;
+                }
+                //CTRIA3   21      1       31      5       6       0.      0.
+                else if(line.indexOf("CTRIA3")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cellst.add(tmp.get(4)-1);
+                    cells.add(cellst);
+                    cellTypes.add(5);
+                    nele=nele+1;
+                    neln=neln+1+3;
+                    continue;
+                }
+                //CTRIA6   21      1       31      5       6       3      4      2
+                else if(line.indexOf("CTRIA3")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cellst.add(tmp.get(4)-1);
+                    cellst.add(tmp.get(5)-1);
+                    cellst.add(tmp.get(6)-1);
+                    cellst.add(tmp.get(7)-1);
+
+
+                    cells.add(cellst);
+                    cellTypes.add(22);
+                    nele=nele+1;
+                    neln=neln+1+6;
+                    continue;
+                }
+                //第一种
+                //CPENTA   1       1       1       2       8       29      30      36
+
+                //第二种
+                //CPENTA   1       1       1       2       8       29      30      36
+                //         1       1       1       2       8       29      30      36
+                //         1
+                else if(line.indexOf("CPENTA")>-1){
+                     bfreader.mark(2000);
+                     String cpentatype=null;
+                     if(line.indexOf("CPENTA")>-1){
+                        String line2= bfreader.readLine();
+                        String sbtmp =line2.substring(0,8);
+                         if("".equals(sbtmp.trim())){
+                             cpentatype="two";
+                         }else{
+                             cpentatype="one";
+                         }
+                     }
+                     bfreader.reset();
+                    if(cpentatype.equals("one")){
+                        ArrayList<Integer> cellst =new ArrayList<>();
+                        ArrayList<Integer> tmp=patInts(line);
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cellst.add(tmp.get(6)-1);
+                        cellst.add(tmp.get(7)-1);
+                        cells.add(cellst);
+                        cellTypes.add(13);
+                        nele=nele+1;
+                        neln=neln+1+6;
+                    }else {
+                        ArrayList<Integer> cellst =new ArrayList<>();
+                        ArrayList<Integer> tmp=patInts(line);
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cellst.add(tmp.get(6)-1);
+                        cellst.add(tmp.get(7)-1);
+                        String line2=bfreader.readLine();
+                        ArrayList<Integer> tmp2=patInts(line2);
+                        cellst.add(tmp2.get(0)-1);
+                        cellst.add(tmp2.get(1)-1);
+                        cellst.add(tmp2.get(2)-1);
+                        cellst.add(tmp2.get(3)-1);
+                        cellst.add(tmp2.get(4)-1);
+                        cellst.add(tmp2.get(5)-1);
+                        cellst.add(tmp2.get(6)-1);
+                        cellst.add(tmp2.get(7)-1);
+                        String line3=bfreader.readLine();
+                        ArrayList<Integer> tmp3=patInts(line2);
+                        cellst.add(tmp3.get(0)-1);
+                        cells.add(cellst);
+                        cellTypes.add(26);
+                        nele=nele+1;
+                        neln=neln+1+15;
+                    }
+                    continue;
+                }
+                //第一种
+                //CHEXA    320     1       163     164     173     172     244     245
+                //         254     253
+                //第二种
+                //CHEXA    320     1       163     164     173     172     244     245
+                //         254     253     163     164     173     172     244     245
+                //         254     253     163     164     173
+                else if(line.indexOf("CHEXA")>-1){
+                     bfreader.mark(2000);
+                     String chexatype=null;
+                     if(line.indexOf("CHEXA")>-1){
+                         String line2= bfreader.readLine();
+                         ArrayList<Integer> tmp=patInts(line2);
+                         if(tmp.size()>3){
+                             chexatype="two";
+                         }else{
+                             chexatype="one";
+                         }
+                     }
+                     bfreader.reset();
+                    if("one".equals(chexatype)){
+                        ArrayList<Integer> cellst =new ArrayList<>();
+                        ArrayList<Integer> tmp=patInts(line);
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cellst.add(tmp.get(6)-1);
+                        cellst.add(tmp.get(7)-1);
+                        String line2=bfreader.readLine();
+                        ArrayList<Integer> tmp2=patInts(line2);
+                        cellst.add(tmp2.get(0)-1);
+                        cellst.add(tmp2.get(1)-1);
+                        cells.add(cellst);
+                        cellTypes.add(12);
+                        nele=nele+1;
+                        neln=neln+1+8;
+                    }else{
+                        ArrayList<Integer> cellst =new ArrayList<>();
+                        ArrayList<Integer> tmp=patInts(line);
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cellst.add(tmp.get(6)-1);
+                        cellst.add(tmp.get(7)-1);
+                        String line2=bfreader.readLine();
+                        ArrayList<Integer> tmp2=patInts(line2);
+                        cellst.add(tmp2.get(0)-1);
+                        cellst.add(tmp2.get(1)-1);
+                        cellst.add(tmp2.get(2)-1);
+                        cellst.add(tmp2.get(3)-1);
+                        cellst.add(tmp2.get(4)-1);
+                        cellst.add(tmp2.get(5)-1);
+                        cellst.add(tmp2.get(6)-1);
+                        cellst.add(tmp2.get(7)-1);
+                        String line3=bfreader.readLine();
+                        ArrayList<Integer> tmp3=patInts(line3);
+                        cellst.add(tmp3.get(2)-1);
+                        cellst.add(tmp3.get(3)-1);
+                        cellst.add(tmp3.get(4)-1);
+                        cellst.add(tmp3.get(0)-1);
+                        cellst.add(tmp3.get(1)-1);
+                        cells.add(cellst);
+                        cellTypes.add(25);
+                        nele=nele+1;
+                        neln=neln+1+20;
+                    }
+
+                    continue;
+                }
+                //第一种
+                //CTETRA   1       1       1       2       8       29
+                //第二种
+                //CTETRA   320     1       163     164     173     172     244     245
+                //         254     253     163     164
+                else if(line.indexOf("CTETRA")>-1){
+
+                     bfreader.mark(2000);
+                     String ctetratype=null;
+                     if(line.indexOf("CTETRA")>-1){
+                        String line2= bfreader.readLine();
+                         String sbtmp =line2.substring(0,8);
+                         if("".equals(sbtmp.trim())){
+                             ctetratype="two";
+                         }else{
+                             ctetratype="one";
+                         }
+
+                     }
+                     bfreader.reset();
+                    if("one".equals(ctetratype)){
+                        ArrayList<Integer> cellst =new ArrayList<>();
+                        ArrayList<Integer> tmp=patInts(line);
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cells.add(cellst);
+                        cellTypes.add(10);
+                        nele=nele+1;
+                        neln=neln+1+4;
+                    }else{
+                        ArrayList<Integer> cellst =new ArrayList<>();
+                        ArrayList<Integer> tmp=patInts(line);
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cellst.add(tmp.get(6)-1);
+                        cellst.add(tmp.get(7)-1);
+                        String line2=bfreader.readLine();
+                        ArrayList<Integer> tmp2=patInts(line2);
+                        cellst.add(tmp2.get(0)-1);
+                        cellst.add(tmp2.get(1)-1);
+                        cellst.add(tmp2.get(2)-1);
+                        cellst.add(tmp2.get(3)-1);
+                        cells.add(cellst);
+                        cellTypes.add(24);
+                        nele=nele+1;
+                        neln=neln+1+10;
+                    }
+
+                    continue;
+                }
+
+                //CONM2    5       21             2500.
+                else if(line.indexOf("CONM2")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(1)-1);
+                    cells.add(cellst);
+                    cellTypes.add(1);
+                    nele=nele+1;
+                    neln=neln+1+1;
+                    continue;
+                }
+
+                else if(line.indexOf("TSTEP")>-1||
+                        line.indexOf("TSTEPNL")>-1  ){
+
+                    continue;
+                }
+                //CBEAM   1       1       1       2
+                else  if(line.indexOf("CBEAM")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cells.add(cellst);
+                    cellTypes.add(3);
+                    nele=nele+1;
+                    neln=neln+1+2;
+                    continue;
+                }
+                //CBEAM3   1       1       1       2       2
+                else if(line.indexOf("CBEAM3")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cellst.add(tmp.get(4)-1);
+
+                    cells.add(cellst);
+                    cellTypes.add(21);
+                    nele=nele+1;
+                    neln=neln+1+3;
+                    continue;
+                }
+                //CONROD   1       1       1
+                else if(line.indexOf("CONROD")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(1)-1);
+                    cellst.add(tmp.get(2)-1);
+                    cells.add(cellst);
+                    cellTypes.add(3);
+                    nele=nele+1;
+                    neln=neln+1+2;
+                    continue;
+                }
+                //CTUBE   1       1       1       1
+                else  if(line.indexOf("CONROD")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cells.add(cellst);
+                    cellTypes.add(3);
+                    nele=nele+1;
+                    neln=neln+1+2;
+                    continue;
+                }
+                //CSHEAR   1       1       1       1       1       1
+                else   if(line.indexOf("CONROD")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    cellst.add(tmp.get(2)-1);
+                    cellst.add(tmp.get(3)-1);
+                    cellst.add(tmp.get(4)-1);
+                    cellst.add(tmp.get(5)-1);
+                    cells.add(cellst);
+                    cellTypes.add(9);
+                    nele=nele+1;
+                    neln=neln+1+4;
+                    continue;
+                }
+                //第一种
+                //CELAS1   2       3       4
+                //第二种
+                //CELAS1   2       3       4       5       6
+                else  if(line.indexOf("CELAS1")>-1
+                        ||line.indexOf("CELAS2")>-1
+                        ||line.indexOf("CDAMP1")>-1
+                        ||line.indexOf("CDAMP2")>-1
+                        ||line.indexOf("CMASS1")>-1
+                        ||line.indexOf("CMASS2")>-1
+                ){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    if(tmp.size()>4){
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cells.add(cellst);
+                        cellTypes.add(3);
+                        nele=nele+1;
+                        neln=neln+1+2;
+                    }else{
+                        cellst.add(tmp.get(2)-1);
+                        cells.add(cellst);
+                        cellTypes.add(1);
+
+                        nele=nele+1;
+                        neln=neln+1+1;
+                    }
+                }
+                //第一种
+                //CTRIAX6   2       3       4               6               8
+                //第二种
+                //CTRIAX6   2       3       4       5       6       7       8       9
+                else  if(line.indexOf("CTRIAX6")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    if(tmp.size()<=6){
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(4)-1);
+
+
+                        cells.add(cellst);
+                        cellTypes.add(5);
+                        nele=nele+1;
+                        neln=neln+1+3;
+                    }else{
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(4)-1);
+                        cellst.add(tmp.get(6)-1);
+
+                        cellst.add(tmp.get(3)-1);
+                        cellst.add(tmp.get(5)-1);
+                        cellst.add(tmp.get(7)-1);
+                        cells.add(cellst);
+                        cellTypes.add(22);
+                        nele=nele+1;
+                        neln=neln+1+6;
+                    }
+                }
+                //第一种
+                //CBUSH   2       3       4
+                //第二种
+                //CBUSH   2       3       4       5
+                else   if(line.indexOf("CBUSH")>-1){
+                    ArrayList<Integer> cellst =new ArrayList<>();
+                    ArrayList<Integer> tmp=patInts(line);
+                    if(tmp.size()<=3){
+
+                        cellst.add(tmp.get(2)-1);
+                        cells.add(cellst);
+                        cellTypes.add(1);
+                        nele=nele+1;
+                        neln=neln+1+1;
+                    }else{
+                        cellst.add(tmp.get(2)-1);
+                        cellst.add(tmp.get(3)-1);
+                        cells.add(cellst);
+                        cellTypes.add(3);
+                        nele=nele+1;
+                        neln=neln+1+2;
+                    }
+                }
+                else  if(line.indexOf("EIGRL")>-1){
+
+                }
+                else if(line.indexOf("SOL 153")>-1){
+
+                }
+                else if(line.indexOf("SOL 159")>-1){
+
+                }
+                //节点数据
+//                GRID     175            .25     .75      0.
+//                GRID*    176                            -2.98023-8      .75
+//                        *        0.
+                // 第1列表示节点代号;
+                // 第2列表示节点编号;
+                // 第3列表示节点的X坐标;
+                // 第4列表示节点的Y坐标;
+                // 第5列表示节点的Z坐标;
+                else if(line.indexOf("GRID*")>-1){
+                    ArrayList<Float> pointst =new ArrayList<>();
+                    ArrayList<Float> tmp=patFloats2(line);
+                    String line2=bfreader.readLine();
+                    ArrayList<Float> tmp2=patFloats2(line2);
+                    pointst.add(tmp.get(1));
+                    pointst.add(tmp.get(2));
+                    pointst.add(tmp2.get(0));
+                    points.add(pointst);
+
+                }
+                else if(line.indexOf("GRID")>-1){
+                    ArrayList<Float> pointst =new ArrayList<>();
+                    ArrayList<Float> tmp=patFloats(line);
+                    pointst.add(tmp.get(1));
+                    pointst.add(tmp.get(2));
+                    pointst.add(tmp.get(3));
+                    points.add(pointst);
+                }
+
+
+            }
+            writer=new FileWriter(vtkFile,true);
+            writer.write("# vtk DataFile Version 1.0");
+            writer.write("\r\n");//换行
+            writer.write("Unstructured vtk Grid");
+            writer.write("\r\n");//换行
+            writer.write("ASCII");
+            writer.write("\r\n");//换行
+            writer.write("\r\n");//换行
+            writer.write("DATASET UNSTRUCTURED_GRID");
+            writer.write("\r\n");//换行
+            writer.write("POINTS");
+            writer.write(blanks(1));
+            writer.write(fixedString(9,String.valueOf(points.size())));
+            writer.write(blanks(1));
+            writer.write("float");
+            writer.write("\r\n");//换行
+
+            for (ArrayList<Float> point:points) {
+                for (int i = 0; i <point.size() ; i++) {
+                    writer.write(blanks(5));
+                    writer.write(fixedFloat(point.get(i)));
+                }
+                writer.write("\r\n");//换行
+            }
+            writer.write("\r\n");//换行
+
+            writer.write("CELLS");
+            writer.write(blanks(1));
+            writer.write(fixedString(9,nele.toString()));
+            writer.write(blanks(1));
+            writer.write(fixedString(9,neln.toString()));
+            writer.write("\r\n");//换行
+
+            for (ArrayList<Integer> cell:cells) {
+                writer.write(fixedString(8,String.valueOf(cell.size())));
+                writer.write(blanks(2));
+                for (int i = 0; i <cell.size() ; i++) {
+                        writer.write(fixedString(8,String.valueOf(cell.get(i))));
+                }
+                writer.write("\r\n");//换行
+            }
+
+            writer.write("CELL_TYPES");
+            writer.write(blanks(1));
+            writer.write(fixedString(9,String.valueOf(cells.size())));
+            writer.write("\r\n");//换行
+            for (Integer type:cellTypes) {
+                    writer.write(blanks(10));
+                    writer.write(type.toString());
+                    writer.write("\r\n");//换行
+            }
+            writer.write("\r\n");//换行
+        }catch (Exception e){
+                e.printStackTrace();
+        }finally {
+            if (writer != null) {
+                try {
+                    writer.close();
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                }
+            }
+            if (reader != null) {
+                try {
+                    reader.close();
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                }
+            }
+            if (bdfInputSteam != null) {
+                try {
+                    bdfInputSteam.close();
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                }
+            }
+            if (bfreader != null) {
+                try {
+                    bfreader.close();
+                } catch (IOException e1) {
+                    e1.printStackTrace();
+                }
+            }
+        }
+        return vtkFile.getPath();
+    }
+
+
+
+    public static ArrayList<Integer> patInts(String line){
+        ArrayList<Integer>  cells =new ArrayList<>();
+        for (int i = 1; i <9 ; i++) {
+            int min = i*8;
+            if(min>line.length()){
+                min = line.length();
+            }
+            int max = (i+1)*8;
+            if(max>line.length()){
+                max = line.length();
+            }
+            String sbtmp =line.substring(min,max);
+            if(!"".equals(sbtmp.trim())){
+                cells.add(Integer.valueOf(sbtmp.trim().replace(".","")));
+            }
+        }
+        return cells;
+    }
+    /**
+     * -2.98023-8  转换 -2.98023E-8
+     */
+    public static String  doubeAddE(String lostEdoube){
+        if(lostEdoube.indexOf("e")>0||lostEdoube.indexOf("E")>0){
+            return lostEdoube;
+        }
+        if(lostEdoube.lastIndexOf("-")>1){
+            String addE ="";
+            addE =addE+lostEdoube.substring(0,lostEdoube.lastIndexOf("-"));
+            addE=addE+"E";
+            addE =addE+lostEdoube.substring(lostEdoube.lastIndexOf("-"));
+            return addE;
+        }
+        return lostEdoube;
+    }
+    public static ArrayList<Float> patFloats(String line){
+        ArrayList<Float>  cells =new ArrayList<>();
+        for (int i = 1; i <9 ; i++) {
+            int min = i*8;
+            if(min>line.length()){
+                min = line.length();
+            }
+            int max = (i+1)*8;
+            if(max>line.length()){
+                max = line.length();
+            }
+            String sbtmp =line.substring(min,max);
+            if(!"".equals(sbtmp.trim())){
+                cells.add(strToFloat(VTK.doubeAddE(sbtmp.trim())));
+            }
+        }
+        return cells;
+    }
+
+    /**
+     * GRID*    37                             -.04            -1.74846-9
+     * *        0.
+     * @param line
+     * @return
+     */
+
+    /**
+     *  read(10,'(A8,A16,16X,2A16)')cname,chnnod,chcood2(1:2)
+     *  read(10,'(A8,A16)')cname,chcood2(3)
+     */
+    public static ArrayList<Float> patFloats2(String line){
+        ArrayList<Float>  cells =new ArrayList<>();
+        String patFloat = "(\\-?\\d+\\.?[\\d\\-\\+E]*|\\.\\d+)";
+        Pattern r = Pattern.compile(patFloat);
+        int matcher_start = 0;
+        Matcher m = r.matcher(line);
+        while (m.find(matcher_start)){
+//            System.out.println(m.group(1));
+            cells.add(strToFloat(VTK.doubeAddE(m.group(1))));
+            matcher_start = m.end();
+        }
+        return cells;
+    }
+    public static Float strToFloat(String line){
+        String pat = "^\\..*";
+        if(Pattern.matches(pat,line)){
+            return Float.valueOf("0"+line);
+        }else{
+            return Float.valueOf(line);
+        }
+    }
+    public  static  String  fixedString(int length ,String str){
+        if(length>0)        return String.format("%"+length+"s",str);
+        return str;
+    }
+    public  static  String  fixedFloat(float fl){
+        return String.format("%25f",fl);
+    }
+    public  static  String  blanks(int length){
+        String t="";
+        if(length>0){
+            for (int i = 0; i <length ; i++) {
+                t +=" ";
+            }
+        }
+        return t;
+    }
+    public static void main(String[] args) {
+//        String ling ="                4.000000000000                0.500000000000               -0.500000000000";
+//        System.out.println(ling.length());
+//        System.out.println(String.format("%25.12f",1.51597));
+//       String tmp ="CELL";
+//       int nele=12;
+//       int melo =1212;
+//        System.out.print(VTK.fixedString(0,tmp));
+//        System.out.print(VTK.fixedString(0," "));
+//        System.out.print(VTK.fixedString(9,String.valueOf(nele)));
+//        System.out.print(VTK.fixedString(0," "));
+//        System.out.print(VTK.fixedString(9,String.valueOf(melo)));
+//        System.out.println(VTK.patInts("CROD     1       1       1       2"));
+//        System.out.println(VTK.patFloats("GRID     1735           13.6682 20.9328 24."));
+
+//        String tmp="GRID     434            -33.333325.     21.6667";
+//        ArrayList<Float>  cells =new ArrayList<>();
+//        for (int i = 1; i <9 ; i++) {
+//            int min = i*8;
+//            if(min>tmp.length()){
+//                min = tmp.length();
+//            }
+//            int max = (i+1)*8;
+//            if(max>tmp.length()){
+//                max = tmp.length();
+//            }
+//            String sbtmp =tmp.substring(min,max);
+//            if(!"".equals(sbtmp.trim())){
+//                cells.add(strToFloat(VTK.doubeAddE(sbtmp.trim())));
+//            }
+//        }
+//        System.out.println(cells);
+//        System.out.println( tmp.substring(47,47));
+//        System.out.println( tmp.substring(9,17));
+//        System.out.println( tmp.substring(17,15));
+//        tmp.substring(tmp.indexOf(".")).length()
+//        String line ="CQUAD   1       1       6       7       16      15";
+//        String patCQUAD = "^CQUAD4.*";
+//        String patGRID = "^GRID/*.*";
+//        System.out.println("GRID     359            .498624 24.995  4.5".indexOf("GRID*"));
+////        System.out.println(Pattern.matches(patCQUAD,line));
+//
+//
+//        String line2 ="GRID*    176                            -2.98023-8      .75";
+//        System.out.println(Pattern.matches(patGRID,line2));
+//        System.out.println( VTK.doubeAddE(" -2.980238"));
+
+//        String line =".5";
+//        String patCQUAD = "^\\..*";
+
+//        System.out.println(Pattern.matches(patCQUAD,line));
+        File file =new File("D:\\FEMLab\\ADI.SimWork4.0\\FEMLab\\data\\transient analysis\\2.3_wing-transient.bdf");
+        VTK.CreateVTKFile(file,"tt");
+    }
+
+}

+ 11 - 1
src/main/java/com/miniframe/tools/CaeFileUtils.java

@@ -29,6 +29,16 @@ public class CaeFileUtils {
         logger.info(t);
     }
 
+    public static void deleFile(String fileId){
+        SysFileMapper sysFileDAO = UtilTools.getBean(SysFileMapper.class);
+        SysFile pFile =  sysFileDAO.selectByPrimaryKey(fileId);
+        if(pFile!=null){
+            File file =new File(XIFileUtils.getRootPathStr()+ MFConstant.separator+pFile.getFilepath());
+            file.delete();
+            sysFileDAO.deleteByPrimaryKey(pFile.getId());
+        }
+    }
+
     /**
      * 创建 存储文件
      */
@@ -103,7 +113,7 @@ public class CaeFileUtils {
         sysFile.setFilepath(fielRelativePath);
         sysFile.setChunk(1);
         sysFile.setChunks(1);
-        sysFile.setNeedop("1");//合并
+        sysFile.setNeedop("1");//合并
         sysFileDAO.insertSelective(sysFile);
     }
 

+ 44 - 0
src/test/java/com/miniframe/comm/httpclientapater/FEM001Test.java

@@ -0,0 +1,44 @@
+package com.miniframe.comm.httpclientapater;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.miniframe.comm.httpclientapater.HttpclientapaterUtil;
+import com.miniframe.generate.comm.system.A_FEM001;
+import com.miniframe.generate.comm.httpclientapater.FEM001Client;
+import com.miniframe.generate.business.system.model.FEM001BaseModel;
+
+public class FEM001Test {
+
+	private static final Logger logger = LoggerFactory.getLogger(FEM001Test.class);
+
+	/**
+	 * BDF文件绑定,获取报文体
+	 * @return
+	 */
+	public static A_FEM001 getA_fem001() {
+		A_FEM001 a_fem001 = new A_FEM001();
+
+		// ----------以下增加【BDF文件绑定】上行体赋值-------------
+
+
+
+		// ---------------------------------------------------
+		return a_fem001;
+	}
+	
+	/**
+	 * 运行客户端测试,BDF文件绑定
+	 * 
+	 * @param args
+	 * @throws Exception
+	 */
+	public static void main(String[] args) throws Exception {
+		FEM001BaseModel model = new FEM001BaseModel();
+		model.setA_systemhead(HttpclientapaterUtil.getA_systemhead("FEM001"));
+		model.setA_fem001(FEM001Test.getA_fem001());
+		FEM001Client client = new FEM001Client();
+		logger.error("客户端发送前总线:\r\n"+model);
+		model = client.execute(model);
+		logger.error("客户端发送后总线:\r\n"+model);
+	}
+}

+ 3 - 1
系统设计/系统模块/SYSTEM(基础系统).csv

@@ -35,4 +35,6 @@
 400002,D00002,HCFDMapbc绑定,service,,
 
 400008,AFT001,后处理消息发送,service,,
-400008,AFT002,获取步数,service,,
+400009,AFT002,获取步数,service,,
+
+410001,FEM001,bdf文件绑定,service,,

+ 3 - 0
系统设计/通信设计/通讯报文/system(系统服务)/报文体/FEM001_A(bdf文件绑定).csv

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

+ 1 - 0
系统设计/通信设计/通讯报文/system(系统服务)/报文体/FEM001_D(bdf文件绑定).csv

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