Quellcode durchsuchen

平台对接接口

huangxingxing vor 9 Monaten
Ursprung
Commit
e018c3ed99

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

@@ -91,3 +91,5 @@ EB3100030 = \u5B58\u5728\u76F8\u540C\u7F16\u7801\u7684\u8DEF\u5F84\uFF01
 EB3100031 = \u5B58\u5728\u8DEF\u5F84\u8282\u70B9\u4FE1\u606F\u4E0D\u80FD\u5220\u9664\uFF01
 EB3100032 = \u8DEF\u5F84\u5DF2\u5B58\u5728\u8BE5\u8282\u70B9\uFF01
 EB3100033 = \u8DEF\u5F84\u8282\u70B9\u4E0D\u5B58\u5728\uFF01
+EMB00001 = \u8BA1\u7B97\u672A\u5B8C\u6210\uFF01
+EMB00002 = \u8BA1\u7B97\u5931\u8D25\uFF01

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

@@ -91,3 +91,5 @@ EB3100030 = \u5B58\u5728\u76F8\u540C\u7F16\u7801\u7684\u8DEF\u5F84\uFF01
 EB3100031 = \u5B58\u5728\u8DEF\u5F84\u8282\u70B9\u4FE1\u606F\u4E0D\u80FD\u5220\u9664\uFF01
 EB3100032 = \u8DEF\u5F84\u5DF2\u5B58\u5728\u8BE5\u8282\u70B9\uFF01
 EB3100033 = \u8DEF\u5F84\u8282\u70B9\u4E0D\u5B58\u5728\uFF01
+EMB00001 = \u8BA1\u7B97\u672A\u5B8C\u6210\uFF01
+EMB00002 = \u8BA1\u7B97\u5931\u8D25\uFF01

+ 7 - 7
generated/com/miniframe/generate/comm/system/D_M00004.java

@@ -23,18 +23,18 @@ public class D_M00004 extends BaseMapModel implements Serializable {
 	public int getAid() {
 		return this.aid;
 	}
-	List <D_M00004_PIPES_RECODE> pipes;//管道数据
+	List <D_M00004_PTS_RECODE> pts;//管道时间数据
 	/**
-	 *管道数据
+	 *管道时间数据
 	 */
-	public void setPipes(List <D_M00004_PIPES_RECODE> pipes) {
-		this.pipes=pipes;
+	public void setPts(List <D_M00004_PTS_RECODE> pts) {
+		this.pts=pts;
 	}
 	/**
-	 *管道数据
+	 *管道时间数据
 	 */
-	public List <D_M00004_PIPES_RECODE> getPipes() {
-		return this.pipes;
+	public List <D_M00004_PTS_RECODE> getPts() {
+		return this.pts;
 	}
 	List <D_M00004_LINES_RECODE> lines;//路径数据
 	/**

+ 51 - 0
generated/com/miniframe/generate/comm/system/D_M00004_PTS_PIPES_RECODE.java

@@ -0,0 +1,51 @@
+/**
+ * 系统服务
+ */
+package com.miniframe.generate.comm.system;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * 平台对接求解结果->管道时间数据->管道数据
+ */
+public class D_M00004_PTS_PIPES_RECODE extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	String pcode;//管道编码
+	/**
+	 *管道编码
+	 */
+	public void setPcode(String pcode) {
+		this.pcode=pcode;
+	}
+	/**
+	 *管道编码
+	 */
+	public String getPcode() {
+		return this.pcode;
+	}
+	String pname;//管道名称
+	/**
+	 *管道名称
+	 */
+	public void setPname(String pname) {
+		this.pname=pname;
+	}
+	/**
+	 *管道名称
+	 */
+	public String getPname() {
+		return this.pname;
+	}
+	String grade;//危险等级
+	/**
+	 *危险等级
+	 */
+	public void setGrade(String grade) {
+		this.grade=grade;
+	}
+	/**
+	 *危险等级
+	 */
+	public String getGrade() {
+		return this.grade;
+	}
+}

+ 39 - 0
generated/com/miniframe/generate/comm/system/D_M00004_PTS_RECODE.java

@@ -0,0 +1,39 @@
+/**
+ * 系统服务
+ */
+package com.miniframe.generate.comm.system;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+import java.util.*;
+/**
+ * 平台对接求解结果->管道时间数据
+ */
+public class D_M00004_PTS_RECODE extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	String time;//时间
+	/**
+	 *时间
+	 */
+	public void setTime(String time) {
+		this.time=time;
+	}
+	/**
+	 *时间
+	 */
+	public String getTime() {
+		return this.time;
+	}
+	List <D_M00004_PTS_PIPES_RECODE> pipes;//管道数据
+	/**
+	 *管道数据
+	 */
+	public void setPipes(List <D_M00004_PTS_PIPES_RECODE> pipes) {
+		this.pipes=pipes;
+	}
+	/**
+	 *管道数据
+	 */
+	public List <D_M00004_PTS_PIPES_RECODE> getPipes() {
+		return this.pipes;
+	}
+}

+ 18 - 0
generated/validateform/d_m00004_pts_pipes_recodeForm.xml

@@ -0,0 +1,18 @@
+<?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">
+<!-- 平台对接求解结果->管道时间数据->管道数据Form配置文件系统生成请勿修改,否则重新生成将覆盖 -->
+<form-validation>
+<formset>
+<form name="d_m00004_pts_pipes_recodeForm">
+<field property="pcode" depends="required">
+    <arg0 key="d_m00004_pts_pipes_recode.pcode"/>
+</field>
+<field property="pname" depends="required">
+    <arg0 key="d_m00004_pts_pipes_recode.pname"/>
+</field>
+<field property="grade" depends="required">
+    <arg0 key="d_m00004_pts_pipes_recode.grade"/>
+</field>
+</form>
+</formset>
+</form-validation>

+ 12 - 0
generated/validateform/d_m00004_pts_recodeForm.xml

@@ -0,0 +1,12 @@
+<?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">
+<!-- 平台对接求解结果->管道时间数据Form配置文件系统生成请勿修改,否则重新生成将覆盖 -->
+<form-validation>
+<formset>
+<form name="d_m00004_pts_recodeForm">
+<field property="time" depends="required">
+    <arg0 key="d_m00004_pts_recode.time"/>
+</field>
+</form>
+</formset>
+</form-validation>

+ 4 - 0
generated/validator/resources_d_m00004_pts_pipes_recodeForm_validator.properties

@@ -0,0 +1,4 @@
+d_m00004_pts_pipes_recode.pcode = \u7BA1\u9053\u7F16\u7801
+d_m00004_pts_pipes_recode.pname = \u7BA1\u9053\u540D\u79F0
+d_m00004_pts_pipes_recode.grade = \u5371\u9669\u7B49\u7EA7
+d_m00004_pts_pipes_recodeForm = true

+ 4 - 0
generated/validator/resources_d_m00004_pts_pipes_recodeForm_validator_zh_CN.properties

@@ -0,0 +1,4 @@
+d_m00004_pts_pipes_recode.pcode = \u7BA1\u9053\u7F16\u7801
+d_m00004_pts_pipes_recode.pname = \u7BA1\u9053\u540D\u79F0
+d_m00004_pts_pipes_recode.grade = \u5371\u9669\u7B49\u7EA7
+d_m00004_pts_pipes_recodeForm = true

+ 2 - 0
generated/validator/resources_d_m00004_pts_recodeForm_validator.properties

@@ -0,0 +1,2 @@
+d_m00004_pts_recode.time = \u65F6\u95F4
+d_m00004_pts_recodeForm = true

+ 2 - 0
generated/validator/resources_d_m00004_pts_recodeForm_validator_zh_CN.properties

@@ -0,0 +1,2 @@
+d_m00004_pts_recode.time = \u65F6\u95F4
+d_m00004_pts_recodeForm = true

+ 110 - 24
src/main/java/com/miniframe/bisiness/system/M00004Service.java

@@ -7,12 +7,13 @@ import com.miniframe.core.ExecProcessFlow;
 import com.miniframe.core.exception.BusinessException;
 import com.miniframe.core.ext.UtilTools;
 import com.miniframe.generate.business.system.model.M00004BaseModel;
-import com.miniframe.generate.comm.system.D_M00004_LINES_RECODE;
-import com.miniframe.generate.comm.system.D_M00004_PIPES_RECODE;
+import com.miniframe.generate.comm.system.*;
 import com.miniframe.model.system.DAccident;
+import com.miniframe.model.system.DJob;
 import com.miniframe.model.system.DMway;
 import com.miniframe.model.system.DMwaySQLBuilder;
 import com.miniframe.model.system.dao.DAccidentMapper;
+import com.miniframe.model.system.dao.DJobMapper;
 import com.miniframe.model.system.dao.DMwayMapper;
 
 /**
@@ -32,27 +33,112 @@ public class M00004Service extends M00004BaseModel implements ExecProcessFlow {
 		if(da==null){
 			throw new BusinessException("EB3000002");
 		}
-		List<D_M00004_PIPES_RECODE> pipes =new ArrayList<>();
-		D_M00004_PIPES_RECODE pipe1 =new D_M00004_PIPES_RECODE();
-		pipe1.setGrade("0");
-		pipe1.setPcode("pipes9");
-		pipe1.setPname("巷道9");
-		pipes.add(pipe1);
-		D_M00004_PIPES_RECODE pipe2 =new D_M00004_PIPES_RECODE();
-		pipe1.setGrade("1");
-		pipe1.setPcode("pipes8");
-		pipe1.setPname("巷道8");
-		pipes.add(pipe2);
-		D_M00004_PIPES_RECODE pipe3 =new D_M00004_PIPES_RECODE();
-		pipe1.setGrade("2");
-		pipe1.setPcode("pipes2");
-		pipe1.setPname("巷道2");
-		pipes.add(pipe3);
-		D_M00004_PIPES_RECODE pipe4 =new D_M00004_PIPES_RECODE();
-		pipe1.setGrade("3");
-		pipe1.setPcode("pipes3");
-		pipe1.setPname("巷道3");
-		pipes.add(pipe4);
+
+		DJobMapper jobDao =UtilTools.getBean(DJobMapper.class);
+		DJob job =jobDao.selectByPrimaryKey(da.getJid());
+		if(job ==null){
+			throw new BusinessException("EMB00001");
+		}
+		if("0".equals(job.getState())){
+			throw new BusinessException("EMB00001");
+		}
+		if("2".equals(job.getState())){
+			throw new BusinessException("EMB00002");
+		}
+
+		List <D_M00004_PTS_RECODE> pts =new ArrayList<>();//管道时间数据
+
+		//----------------------
+		D_M00004_PTS_RECODE pt1=new D_M00004_PTS_RECODE();
+		pt1.setTime("2024-12-06 10:26:37 +0800");
+		List<D_M00004_PTS_PIPES_RECODE> pips1 =pt1.getPipes();
+
+		D_M00004_PTS_PIPES_RECODE pip1 =new D_M00004_PTS_PIPES_RECODE();
+		pip1.setGrade("0");
+		pip1.setPname("巷道1");
+		pip1.setPcode("pipes1");
+		pips1.add(pip1);
+
+		D_M00004_PTS_PIPES_RECODE pip2 =new D_M00004_PTS_PIPES_RECODE();
+		pip2.setGrade("0");
+		pip2.setPname("巷道2");
+		pip2.setPcode("pipes2");
+		pips1.add(pip2);
+
+		D_M00004_PTS_PIPES_RECODE pip3 =new D_M00004_PTS_PIPES_RECODE();
+		pip3.setGrade("0");
+		pip3.setPname("巷道3");
+		pip3.setPcode("pipes3");
+		pips1.add(pip3);
+		D_M00004_PTS_PIPES_RECODE pip4 =new D_M00004_PTS_PIPES_RECODE();
+		pip4.setGrade("0");
+		pip4.setPname("巷道4");
+		pip4.setPcode("pipes4");
+		pips1.add(pip4);
+		pts.add(pt1);
+		//----------------------
+
+		D_M00004_PTS_RECODE pt2=new D_M00004_PTS_RECODE();
+		pt2.setTime("2024-12-06 10:27:37 +0800");
+		List<D_M00004_PTS_PIPES_RECODE> pips2 =pt2.getPipes();
+
+		D_M00004_PTS_PIPES_RECODE pip_1 =new D_M00004_PTS_PIPES_RECODE();
+		pip_1.setGrade("0");
+		pip_1.setPname("巷道1");
+		pip_1.setPcode("pipes1");
+		pips2.add(pip_1);
+
+		D_M00004_PTS_PIPES_RECODE pip_2 =new D_M00004_PTS_PIPES_RECODE();
+		pip_2.setGrade("1");
+		pip_2.setPname("巷道2");
+		pip_2.setPcode("pipes2");
+		pips2.add(pip_2);
+
+		D_M00004_PTS_PIPES_RECODE pip_3 =new D_M00004_PTS_PIPES_RECODE();
+		pip_3.setGrade("1");
+		pip_3.setPname("巷道3");
+		pip_3.setPcode("pipes3");
+		pips2.add(pip_3);
+		D_M00004_PTS_PIPES_RECODE pip_4 =new D_M00004_PTS_PIPES_RECODE();
+		pip_4.setGrade("02");
+		pip_4.setPname("巷道4");
+		pip_4.setPcode("pipes4");
+		pips2.add(pip_4);
+		pts.add(pt2);
+		//----------------------
+
+		D_M00004_PTS_RECODE pt3=new D_M00004_PTS_RECODE();
+		pt3.setTime("2024-12-06 10:28:37 +0800");
+		List<D_M00004_PTS_PIPES_RECODE> pips3 =pt3.getPipes();
+
+		D_M00004_PTS_PIPES_RECODE pip_21 =new D_M00004_PTS_PIPES_RECODE();
+		pip_21.setGrade("0");
+		pip_21.setPname("巷道1");
+		pip_21.setPcode("pipes1");
+		pips3.add(pip_21);
+
+		D_M00004_PTS_PIPES_RECODE pip_22 =new D_M00004_PTS_PIPES_RECODE();
+		pip_22.setGrade("2");
+		pip_22.setPname("巷道2");
+		pip_22.setPcode("pipes2");
+		pips3.add(pip_22);
+
+		D_M00004_PTS_PIPES_RECODE pip_23 =new D_M00004_PTS_PIPES_RECODE();
+		pip_23.setGrade("2");
+		pip_23.setPname("巷道3");
+		pip_23.setPcode("pipes3");
+		pips3.add(pip_23);
+		D_M00004_PTS_PIPES_RECODE pip_24 =new D_M00004_PTS_PIPES_RECODE();
+		pip_24.setGrade("1");
+		pip_24.setPname("巷道4");
+		pip_24.setPcode("pipes4");
+		pips3.add(pip_24);
+		pts.add(pt3);
+
+
+
+
+
 
 		DMwayMapper wdao = UtilTools.getBean(DMwayMapper.class);
 		DMwaySQLBuilder wsb =new DMwaySQLBuilder();
@@ -68,7 +154,7 @@ public class M00004Service extends M00004BaseModel implements ExecProcessFlow {
 		}
 		this.getD_m00004().setAid(aid);
 		this.getD_m00004().setLines(lines);
-		this.getD_m00004().setPipes(pipes);
+		this.getD_m00004().setPts(pts);
 	}
 	
 	/**

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

@@ -105,3 +105,6 @@
 
 3100032,EB3100032,路径已存在该节点!,
 3100033,EB3100033,路径节点不存在!,
+
+4000001,EMB00001,计算未完成!,
+4000002,EMB00002,计算失败!,

+ 5 - 4
系统设计/通信设计/通讯报文/system(系统服务)/报文体/M00004_D(平台对接求解结果).csv

@@ -1,10 +1,11 @@
 序号,英文名称,中文名称,数据类型,默认值,格式化,非空/引用,最小(长度/值),最大(长度/值),验证规则,标准数据ID,XML样式,TAG标签,映射/子标签,CDATA
 1,aid,事故ID,int,,,是,,,,,,,,
-2,pipes,管道数据,list,,,,0,,,,,,,
+2,pts,管道时间数据,list,,,,0,,,,,,,
 2.1,time,时间,string,,,是,,,,,,,,
-2.2,pcode,管道编码,string,,,是,,,,,,,,
-2.3,pname,管道名称,string,,,是,,,,,,,,
-2.4,grade,危险等级,string,,,是,,,,,,,,
+2.2,pipes,管道数据,list,,,,0,,,,,,,
+2.2.1,pcode,管道编码,string,,,是,,,,,,,,
+2.2.2,pname,管道名称,string,,,是,,,,,,,,
+2.2.3,grade,危险等级,string,,,是,,,,,,,,
 3,lines,路径数据,list,,,,0,,,,,,,
 3.1,lname,路径名称,string,,,是,,,,,,,,
 3.2,level,安全等级,string,,,是,,,,,,,,