Browse Source

FEM 求解

huangxingxing 2 năm trước cách đây
mục cha
commit
6002552307

+ 13 - 0
generated/com/miniframe/generate/comm/system/A_AFT001.java

@@ -256,4 +256,17 @@ public class A_AFT001 extends BaseMapModel implements Serializable {
 	public String getTransparency() {
 		return this.transparency;
 	}
+	String index;//切片添加删除ID
+	/**
+	 *切片添加删除ID
+	 */
+	public void setIndex(String index) {
+		this.index=index;
+	}
+	/**
+	 *切片添加删除ID
+	 */
+	public String getIndex() {
+		return this.index;
+	}
 }

+ 13 - 0
generated/validateform/a_aft001Form.xml

@@ -238,6 +238,19 @@
       <var-value>2048</var-value>
     </var>
 </field>
+<field property="index" depends="minlength,maxlength">
+    <arg0 key="a_aft001.index"/>
+    <arg1 name="minlength" key="${var:minlength}"/>
+    <var>
+      <var-name>minlength</var-name>
+      <var-value>1</var-value>
+    </var>
+    <arg1 name="maxlength" key="${var:maxlength}"/>
+    <var>
+      <var-name>maxlength</var-name>
+      <var-value>1024</var-value>
+    </var>
+</field>
 </form>
 </formset>
 </form-validation>

+ 1 - 0
generated/validator/resources_a_aft001Form_validator.properties

@@ -17,4 +17,5 @@ a_aft001.g = g
 a_aft001.b = b
 a_aft001.showHideState = \u663E\u793A1\u9690\u85CF0
 a_aft001.transparency = transparency
+a_aft001.index = \u5207\u7247\u6DFB\u52A0\u5220\u9664ID
 a_aft001Form = true

+ 1 - 0
generated/validator/resources_a_aft001Form_validator_zh_CN.properties

@@ -17,4 +17,5 @@ a_aft001.g = g
 a_aft001.b = b
 a_aft001.showHideState = \u663E\u793A1\u9690\u85CF0
 a_aft001.transparency = transparency
+a_aft001.index = \u5207\u7247\u6DFB\u52A0\u5220\u9664ID
 a_aft001Form = true

+ 13 - 29
src/main/java/com/miniframe/bisiness/system/AFT001Service.java

@@ -191,47 +191,31 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
 			obj.put("showHideState","1".equals(showHideState)?true:false);
 			msg.setParamJson(obj.toString());
 		}else if(action.equals("SliceDisplayAdd")){
+			String index = this.getA_aft001().getIndex();
 			JSONObject obj  = new JSONObject();
-			obj.put("index","1");
+			obj.put("index",index);
 			msg.setParamJson(obj.toString());
 		}else if(action.equals("SliceDisplayUpdate")){
 
 
 		}else if(action.equals("SliceDisplayDel")){
+			String index = this.getA_aft001().getIndex();
 			JSONObject obj  = new JSONObject();
-			obj.put("index","1");
+			obj.put("index",index);
 			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));
+		}else if(action.equals("SliceDisplayApply")){
+			try {
+				List<SliceMsg> list = XiJsonUtil.jsonToList(paramJson,SliceMsg.class);
+				System.out.println(XiJsonUtil.objectToJson(list));
+				MFMqUtils.get(CaeMQ.class).sendCaein(XiJsonUtil.objectToJson(msg));
+			}catch (Exception e){
+				throw new BusinessException("EB4000013");
 			}
-			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);
-//		b.setAreaRange("(0,0)");
-		b.setPositiony(0.25);
-		b.setPositionx(0.35);
-		b.setPositionz(0.22);
-		b.setScalar_value_state(true);
-		b.setSectional_contour_state(true);
-		b.setSectional_plane_state(true);
-		b.setVariableName("p");
-		b.setType("contour");
-		return b;
-	}
+
 	/**
 	 * 基础系统,“后处理消息发送”业务前处理
  	 */

+ 1 - 1
src/main/java/com/miniframe/solverjob/AdiSolverJobService.java

@@ -84,7 +84,7 @@ public class AdiSolverJobService {
 
         AdiSolverConfigMapper configDao = UtilTools.getBean(AdiSolverConfigMapper.class);
         AdiSolverConfig  config =configDao.selectByPrimaryKey(job.getConfigid());
-        config.setState((short)0);
+        config.setState((short)-1);
         config.setSolverEtime(XIDateTimeUtils.getNowDate());
         return job;
     }

+ 40 - 4
src/test/java/com/miniframe/FileMain.java

@@ -1,8 +1,13 @@
 package com.miniframe;
 
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.miniframe.aftercure.SliceMsg;
 import com.miniframe.tools.XIDateTimeUtils;
+import com.miniframe.tools.XiJsonUtil;
 
 import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
 
 public class FileMain {
 
@@ -61,9 +66,40 @@ public class FileMain {
         }
     }
 
-    public static void main(String[] args) {
-        String pathDir ="E:\\官网\\adicn";
-        File file =new File(pathDir);
-        allFiles(file);
+    public static void main(String[] args) throws JsonProcessingException {
+//        String pathDir ="E:\\官网\\adicn";
+//        File file =new File(pathDir);
+//        allFiles(file);
+
+        List<SliceMsg> b =new ArrayList<>();
+        for (int i = 1; i <3 ; i++) {
+            b.add( inib(i));
+        }
+        String t= XiJsonUtil.objectToJson(b);
+        System.out.println(t);
+    }
+
+    private static SliceMsg inib(int id) {
+        SliceMsg  b= new SliceMsg();
+        b.setIndex(id);
+        b.setLevel(10);
+        b.setNormalx(12.0);
+        b.setNormaly(2.0);
+        b.setNormalz(3.0);
+        b.setPositionx(0.23);
+//		b.setAreaRange("(0,0)");
+        b.setPositiony(0.25);
+        b.setPositionx(0.35);
+        b.setPositionz(0.22);
+        b.setScalar_value_state(true);
+        b.setSectional_contour_state(true);
+        b.setSectional_plane_state(true);
+        b.setSolid_state(true);
+        b.setVariableName("P");
+        b.setType("contour");
+        return b;
     }
+
+
+
 }

+ 1 - 0
系统设计/通信设计/通讯报文/system(系统服务)/报文体/AFT001_A(后处理消息操作消息发送).csv

@@ -18,3 +18,4 @@
 17,b,b,string,,,,1,2048,,,,,,
 18,showHideState,显示1隐藏0,string,,,,1,2048,,,,,,
 19,transparency,transparency,string,,,,1,2048,,,,,,
+20,index,切片添加删除ID,string,,,,1,1024,,,,,,