huangxingxing преди 1 година
родител
ревизия
47a23878e3

+ 25 - 0
generated/com/miniframe/generate/comm/system/A_D000015.java

@@ -0,0 +1,25 @@
+/**
+ * 系统服务
+ */
+package com.miniframe.generate.comm.system;
+import com.miniframe.core.BaseMapModel;
+import java.io.Serializable;
+/**
+ * 日志文件获取
+ */
+public class A_D000015 extends BaseMapModel implements Serializable {
+	private static final long serialVersionUID = -1463838678425832212L;
+	int aid;//事故ID
+	/**
+	 *事故ID
+	 */
+	public void setAid(int aid) {
+		this.aid=aid;
+	}
+	/**
+	 *事故ID
+	 */
+	public int getAid() {
+		return this.aid;
+	}
+}

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

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

+ 12 - 0
generated/validateform/a_d000015Form.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="a_d000015Form">
+<field property="aid" depends="required">
+    <arg0 key="a_d000015.aid"/>
+</field>
+</form>
+</formset>
+</form-validation>

+ 2 - 0
generated/validator/resources_a_d000015Form_validator.properties

@@ -0,0 +1,2 @@
+a_d000015.aid = \u4E8B\u6545ID
+a_d000015Form = true

+ 2 - 0
generated/validator/resources_a_d000015Form_validator_zh_CN.properties

@@ -0,0 +1,2 @@
+a_d000015.aid = \u4E8B\u6545ID
+a_d000015Form = true

+ 1 - 0
generated/validator/resources_d_d000015Form_validator.properties

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

+ 1 - 0
generated/validator/resources_d_d000015Form_validator_zh_CN.properties

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

+ 64 - 0
src/main/java/com/miniframe/bisiness/system/D000015Service.java

@@ -0,0 +1,64 @@
+package com.miniframe.bisiness.system;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Map;
+import com.miniframe.core.ExecProcessFlow;
+import com.miniframe.core.ext.UtilTools;
+import com.miniframe.generate.business.system.model.D000015BaseModel;
+import com.miniframe.httpserver.HttpServerTransFile;
+import com.miniframe.model.system.DAccident;
+import com.miniframe.model.system.dao.DAccidentMapper;
+import com.miniframe.template.TemplateGenerator;
+import com.miniframe.utils.MFMimeTypeUtils;
+
+/**
+ * 基础系统,“日志文件获取”逻辑处理(重新生成不覆盖)。
+ */
+public class D000015Service extends D000015BaseModel implements ExecProcessFlow {
+	
+	private static final long serialVersionUID = -7051358269847459502L;
+		
+	/**
+	 * 基础系统,“日志文件获取”业务核心处理
+ 	 */
+	public void transExecute() throws Exception {
+		Integer aid= getA_d000015().getAid();
+		DAccidentMapper accidentDao  = UtilTools.getBean(DAccidentMapper.class);
+		DAccident accident= accidentDao.selectByPrimaryKey(aid);
+		String outPath= TemplateGenerator.BPATH+"/"+aid+"/"+accident.getSid()+"/"+accident.getStype().toLowerCase()+"/out";
+		String fileName ="log.txt";
+		Path path = Paths.get(outPath+"/"+fileName);
+		String mimeType = MFMimeTypeUtils.getMimeType(path);
+		HttpServerTransFile transFile = new HttpServerTransFile(fileName, mimeType, path);
+		UtilTools.setHttpServerTransFile(transFile);
+	}
+	
+	/**
+	 * 基础系统,“日志文件获取”业务前处理
+ 	 */
+	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();
+	}
+
+}