Explorar o código

平台巷道映射

huangxingxing hai 7 meses
pai
achega
69eb9728a5

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

@@ -105,3 +105,4 @@ INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('M0
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('M00005', '基础系统','平台对接安全路径求解结果',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('M00006', '基础系统','平台管道映射查询',true);
 INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('M00007', '基础系统','平台管道映射添加修改',true);
+INSERT INTO SYS_FUNCTION(FUNCTIONID, CLASSNAME, FUNCTIONNAME ,ENABLE)VALUES ('M00008', '基础系统','平台管道映射删除',true);

+ 112 - 0
generated/com/miniframe/generate/business/system/model/M00008BaseModel.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_M00008;
+import com.miniframe.generate.comm.system.D_M00008;
+
+/**
+ * 系统服务,“平台管道映射删除”模型类(不要维护,重新生成将覆盖)。
+ */
+@SuppressWarnings({ "rawtypes", "unchecked" })
+public class M00008BaseModel extends BaseMapModel {
+
+	private static final long serialVersionUID = -1326184831746814093L;
+
+	A_SYSTEMHEAD a_systemhead;//上行头
+	D_SYSTEMHEAD d_systemhead;//下行头
+	A_M00008 a_m00008;//上行体
+	D_M00008 d_m00008;//下行体
+
+	public M00008BaseModel(){
+		a_systemhead=new A_SYSTEMHEAD();
+		d_systemhead=new D_SYSTEMHEAD();
+		a_m00008=new A_M00008();
+		d_m00008=new D_M00008();
+	}
+
+	public void validater() throws Exception {
+		this.a_systemhead.validater();
+		this.a_m00008.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_M00008.class);
+		this.a_m00008 = UtilTools.map2Obj(bodyMap, A_M00008.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_m00008));
+
+		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_M00008 getA_m00008() {
+		return a_m00008;
+	}
+
+	public void setA_m00008(A_M00008 a_m00008) {
+		this.a_m00008=a_m00008;
+	}
+
+	public D_M00008 getD_m00008() {
+		return this.d_m00008;
+	}
+
+	public void setD_m00008(D_M00008 d_m00008) {
+		this.d_m00008=d_m00008;
+	}
+
+	@Override
+	public String toString() {
+		try {
+			return UtilTools.obj2Json(this,true);
+		} catch (IOException e) {
+			return "";
+		}
+	}
+}

+ 99 - 0
generated/com/miniframe/generate/comm/httpclientapater/M00008Client.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_M00008;
+import com.miniframe.generate.comm.system.D_SYSTEMHEAD;
+
+import com.miniframe.generate.business.system.model.M00008BaseModel;
+
+public class M00008Client {
+
+	private static final Logger logger = LoggerFactory.getLogger(M00008Client.class);
+	private MFHttpRespInfo respInfo;
+
+	public MFHttpRespInfo getRespInfo(){
+		return respInfo;
+	}
+
+	/**
+	 * 调用 [系统服务->平台管道映射删除((M00008)]的通讯接口
+	 * @param model 接口模型
+	 * @param extMap 扩展输入
+	 * @param url 请求地址
+	 * @return model 接口模型
+	 * @throws Exception
+	 */
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public M00008BaseModel execute(M00008BaseModel model,final Map extMap,final String url) throws Exception {
+		this.executeToRespInfo(model,extMap,url);
+		return model;
+	}
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public M00008BaseModel execute(M00008BaseModel model,final Map extMap) throws Exception {
+		this.executeToRespInfo(model,extMap,null);
+		return model;
+	}
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public MFHttpRespInfo executeToRespInfo(M00008BaseModel model,final Map extMap,final String url) throws Exception {
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(M00008BaseModel) - start");
+		}
+
+		if(UtilTools.isNullOrBlank(model.getA_systemhead().getTransCode())){
+			model.getA_systemhead().setTransCode("M00008");
+		}
+
+		Map inMap = new LinkedHashMap();
+		inMap.putAll(UtilTools.obj2Map(model.getA_systemhead()));
+		inMap.putAll(UtilTools.obj2Map(model.getA_m00008()));
+		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_M00008 d_m00008 =  UtilTools.map2Obj(outMap, D_M00008.class);
+			model.setD_systemhead(d_systemhead);
+			model.setD_m00008(d_m00008);
+
+
+		}
+
+		if (logger.isDebugEnabled()) {
+			logger.debug("execute(M00008BaseModel) - end");
+		}
+
+        this.respInfo=respInfo;
+
+		return respInfo;
+	}
+
+
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public M00008BaseModel execute(M00008BaseModel model) throws Exception {
+		return this.execute(model,null,null);
+	}
+
+
+}

+ 8 - 8
generated/com/miniframe/generate/comm/system/A_M00008.java

@@ -5,21 +5,21 @@ package com.miniframe.generate.comm.system;
 import com.miniframe.core.BaseMapModel;
 import java.io.Serializable;
 /**
- * 角色删除
+ * 平台管道映射删除
  */
 public class A_M00008 extends BaseMapModel implements Serializable {
 	private static final long serialVersionUID = -1463838678425832212L;
-	String roleId;//角色ID
+	int ptid;//映射编号
 	/**
-	 *角色ID
+	 *映射编号
 	 */
-	public void setRoleId(String roleId) {
-		this.roleId=roleId;
+	public void setPtid(int ptid) {
+		this.ptid=ptid;
 	}
 	/**
-	 *角色ID
+	 *映射编号
 	 */
-	public String getRoleId() {
-		return this.roleId;
+	public int getPtid() {
+		return this.ptid;
 	}
 }

+ 1 - 27
generated/com/miniframe/generate/comm/system/D_M00008.java

@@ -5,34 +5,8 @@ package com.miniframe.generate.comm.system;
 import com.miniframe.core.BaseMapModel;
 import java.io.Serializable;
 /**
- * 角色删除
+ * 平台管道映射删除
  */
 public class D_M00008 extends BaseMapModel implements Serializable {
 	private static final long serialVersionUID = -1463838678425832212L;
-	String roleIds;//指定角色
-	/**
-	 *指定角色
-	 */
-	public void setRoleIds(String roleIds) {
-		this.roleIds=roleIds;
-	}
-	/**
-	 *指定角色
-	 */
-	public String getRoleIds() {
-		return this.roleIds;
-	}
-	String showFlag;//显示选择
-	/**
-	 *显示选择
-	 */
-	public void setShowFlag(String showFlag) {
-		this.showFlag=showFlag;
-	}
-	/**
-	 *显示选择
-	 */
-	public String getShowFlag() {
-		return this.showFlag;
-	}
 }

+ 2 - 0
generated/validator/resources_a_m00008Form_validator.properties

@@ -0,0 +1,2 @@
+a_m00008.ptid = \u6620\u5C04\u7F16\u53F7
+a_m00008Form = true

+ 2 - 0
generated/validator/resources_a_m00008Form_validator_zh_CN.properties

@@ -0,0 +1,2 @@
+a_m00008.ptid = \u6620\u5C04\u7F16\u53F7
+a_m00008Form = true

+ 1 - 0
generated/validator/resources_d_m00008Form_validator.properties

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

+ 1 - 0
generated/validator/resources_d_m00008Form_validator_zh_CN.properties

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

+ 52 - 0
src/main/java/com/miniframe/bisiness/system/M00008Service.java

@@ -0,0 +1,52 @@
+package com.miniframe.bisiness.system;
+
+import java.util.Map;
+import com.miniframe.core.ExecProcessFlow;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.business.system.model.M00008BaseModel;
+import com.miniframe.model.system.dao.DPtpipeassMapper;
+
+/**
+ * 基础系统,“平台管道映射删除”逻辑处理(重新生成不覆盖)。
+ */
+public class M00008Service extends M00008BaseModel implements ExecProcessFlow {
+	
+	private static final long serialVersionUID = -7051358269847459502L;
+		
+	/**
+	 * 基础系统,“平台管道映射删除”业务核心处理
+ 	 */
+	public void transExecute() throws Exception {
+		Integer ptid = this.getA_m00008().getPtid();
+		DPtpipeassMapper pDao = UtilTools.getBean(DPtpipeassMapper.class);
+		pDao.deleteByPrimaryKey(ptid);
+	}
+	
+	/**
+	 * 基础系统,“平台管道映射删除”业务前处理
+ 	 */
+	public void preTransFlow() throws Exception {
+		this.validater();
+	}
+	
+	/**
+	 * 基础系统,“平台管道映射删除”业务后处理
+ 	 */
+	public void afterTransFlow() throws Exception {
+	
+	}
+	
+	/**
+	 * 基础系统,“平台管道映射删除”逻辑入口处理方法
+ 	 */
+ 	@SuppressWarnings("rawtypes")
+	@Override
+	public Map execute(Map vars) throws Exception {
+		this.setTransMap(vars);
+		preTransFlow();// 执行业务开始的规则检查和校验
+		transExecute();// 执行核心业务段
+		afterTransFlow();// 执行核心逻辑完成后的收尾逻辑
+		return this.getTransMap();
+	}
+
+}

+ 44 - 0
src/test/java/com/miniframe/comm/httpclientapater/M00008Test.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_M00008;
+import com.miniframe.generate.comm.httpclientapater.M00008Client;
+import com.miniframe.generate.business.system.model.M00008BaseModel;
+
+public class M00008Test {
+
+	private static final Logger logger = LoggerFactory.getLogger(M00008Test.class);
+
+	/**
+	 * 平台管道映射删除,获取报文体
+	 * @return
+	 */
+	public static A_M00008 getA_m00008() {
+		A_M00008 a_m00008 = new A_M00008();
+
+		// ----------以下增加【平台管道映射删除】上行体赋值-------------
+
+
+
+		// ---------------------------------------------------
+		return a_m00008;
+	}
+	
+	/**
+	 * 运行客户端测试,平台管道映射删除
+	 * 
+	 * @param args
+	 * @throws Exception
+	 */
+	public static void main(String[] args) throws Exception {
+		M00008BaseModel model = new M00008BaseModel();
+		model.setA_systemhead(HttpclientapaterUtil.getA_systemhead("M00008"));
+		model.setA_m00008(M00008Test.getA_m00008());
+		M00008Client client = new M00008Client();
+		logger.error("客户端发送前总线:\r\n"+model);
+		model = client.execute(model);
+		logger.error("客户端发送后总线:\r\n"+model);
+	}
+}

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

@@ -117,4 +117,5 @@
 400004,M00004,平台对接求解结果 ,service,,
 400005,M00005,平台对接安全路径求解结果 ,service,,
 400006,M00006,平台管道映射查询,service,,
-400007,M00007,平台管道映射添加修改,service,,
+400007,M00007,平台管道映射添加修改,service,,
+400008,M00008,平台管道映射删除,service,,

+ 2 - 0
系统设计/通信设计/通讯报文/system(系统服务)/报文体/M00008_A(平台管道映射删除).csv

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

+ 1 - 0
系统设计/通信设计/通讯报文/system(系统服务)/报文体/M00008_D(平台管道映射删除).csv

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